Distributed currency
Project description
Run / Networking / API
Running listrum
Requirements: python3, pip, domain with an SSL certificate
- Installing python package:
pip install listrum
- Starting a node:
python3 -m listrum.node
Config:
{
"storage": "temp/storage", - Storage of balances
"port": 2525,
"wallet": "vNNMgYUdN_bgsQuE0", - your wallet for app payments
"cert": "keys/fullchain.pem", - SSL sertificate
"cert_key": "keys/privkey.pem", - SSL private key
"node_connect": {
"enabled": true, - connect to your nodes to broadcast txs
"price": 1.0, - price of connection
"prime": "listrum.com" - first node address, can be your
},
"history": {
"enabled": true, - save history
"path": "temp/history" - path to save history
},
"key_storage": {
"enabled": true, - store user's keys, launch with key_storage.py
"port": 2526,
"path": "temp/key_storage",
"price": 1.0
}
}
Glossary:
- Node list - node list to send and get data from
- Repay - amount of value payed back to sender
- Fee - difference between sended and received value
- History node - node that saves txs and sends it with /history/
- Key storage - store wrapped keys remotely for a price labled by a name
- tx_ttl - time tx will be stored until timestamp invalid
- pad_length - short public key length
- fee - present of sended value that will be received
- repay_update - time after repay value will be updated
- repay_value - present of all repay value per transaction
- Connect node - resend transactions to your node for a price
- Primary node (connect node) - node where you get balances, can be the same node
Commands:
- /list - list all connected nodes
- /add Node - add node to node list
- /remove Node - remove node from node list
- /issue Value - add value to your wallet
- /clear - remove all nodes
- /wallet - change your wallet for payable methods
Node interface:
Balance:
HTTPS GET :2525/balance/WalletAddress
200 OK balance
Send:
HTTPS GET :2525/send/
{
"from": {
"pub": FullWalletAddress,
"time": Timestamp,
"sign": sign(to + time)
},
"data": {
"to": WalletAddress,
"value": FloatValue
}
}
200 OK
History node interface:
HTTPS GET :2525/history/WalletAddress
200 OK [{"to": WalletAddress, "value": FloatValue}, ..]
Get fee
HTTPS GET :2525/fee
200 OK Fee
Key storage interface:
Store your key:
HTTPS GET :2522/store/
{
"from": PrivateKey,
"data" {
"key": [Key, WrappedPrivateKey],
"name": KeyName
}
}
200 OK
Get key:
HTTPS GET :2522/get/KeyName
200 OK [Key, WrappedPrivateKey]
Connect node:
HTTPS GET :2525/connect/
{
"from": PrivateKey,
"data": NodeAddress,
}
200 OK
Get app price
HTTPS GET :2525/price
200 OK Price
Nodes API
add_node(address: str)
remove_node(address: str)
clear()
send(data) -> spend
balance(padded_key)
client(key: dict = {}) -> Client - create client using nodes from list
Client API
Client(key: dict = {}) - use plain JWK from browser
send_all(to: str) - sends all funds to address
balance() -> float - balance of the key, with nodes provided
wallet: str - client's padded wallet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Listrum-1.2.1b0-py3-none-any.whl
(12.2 kB
view hashes)
Close
Hashes for Listrum-1.2.1b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ad693d2f6acdeffa728dc95352e9f69e7fb21667a9ce7a48acc04f6e858bf9 |
|
MD5 | bb426d2567475b2213657d4d33bf16ee |
|
BLAKE2b-256 | 970cfce22216655c271a107608245e3c3a5fd15aaab545160193f54921e14736 |