https://github.com/democracyearth/micropayment-voting
🦅 Vote as bitcoin micropayment.
https://github.com/democracyearth/micropayment-voting
bitcoin blockchain micropayments vote
Last synced: 11 months ago
JSON representation
🦅 Vote as bitcoin micropayment.
- Host: GitHub
- URL: https://github.com/democracyearth/micropayment-voting
- Owner: DemocracyEarth
- License: mit
- Created: 2016-06-29T21:25:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-05-31T15:50:13.000Z (about 4 years ago)
- Last Synced: 2025-04-07T21:40:50.882Z (over 1 year ago)
- Topics: bitcoin, blockchain, micropayments, vote
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 14
- Watchers: 7
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 21API
Python API able to get chains from web-app database and automatically
writes/secure them on the bitcoin blockchain via 21 micropayment services.
## API Endpoints
Web browser <--> Front-end <--> **api.py <--> connector.py**
### api.py
RESTful service for vote saving. This module only receives and transmits
information to the connector.py script and to the front-end instances.
Resource | HTTP Method | URL and arguments | Returns
----|-----|----- |-----|
Vote saving | POST | /send-vote?proposal=yes/no | JSON object with confirmation, vote and the wallet's address that stores our votes
Vote status | GET | /vote-count | Total number of votes on each option for the proposal
### connector.py
21.co server for operations over micropayments (One satoshi per operation). This
connector provides information for the api.py module and manages the operations
for Blockchain events
Resource | HTTP Method | URL and arguments | Returns
----|-----|-----|-----|
Vote accounting to the Blockchain | POST | /write-vote?proposal=yes/no | Wallet address
Votes on each proposal | GET | /count | Total votes for the proposal