Distributed currency
Project description
Client | Node | Networking | Glossary
Running listrum
Requirements: python3, pip, domain with an SSL certificate
- Installing python package:
pip install listrum -U
- Starting a node:
python3 -m listrum.nodeSetup node_config.json in your home dir and start again
Client
Client class API
Client(key: dict = {}) - use plain JWK from browser or generates new
send_all(to: str) - sends all funds to wallet address
balance() -> float - balance of imported key
wallet: str - get padded wallet address
Making apps:
from listrum.client import Client
cash = Client(req["cash_key"])
cash.withdraw(1)
print("Success")
Node
Node Config:
Stored in your home user directory in /listrum/node_config.json
{
"port": 2525,
"wallet": your wallet for app payments and issue
"cert": full path to SSL sertificate
"cert_key": full path to SSL private key
}
Node commands:
- /issue Value - add value to your wallet
- /q - close node
- /update - update your nodes list
Node class API
on_send(Tx) - called on successfull tx
on_request(Request) - called on request
Node apps:
Start all apps with
python3 -m listrum.apps
Launchaing app example: from listrum.node import Node, Request from listrum.node.tx import Tx
def on_request(req: Request) -> None:
on_buy(req)
def log(tx: Tx) -> None:
print(tx.params)
node = Node()
node.on_request = on_request
node.on_send = log
Glossary:
Nodes:
- trusted_nodes - nodes your node will ask for unknown balances
- broadcast_nodes - nodes where tx will be broadcasted (auto for trusted nodes)
- storage - store wallets' balance in home dir /listrum/storage
Wallets:
- pad_length - short public key length
Transactions:
- Repay - amount of value payed back to sender
- Fee - difference between sended and received value
- tx_ttl - time tx will be stored until timestamp invalid
- 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
Cash:
Send an amount to temporary wallet and send their private key
Networking:
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
Get fee
HTTPS GET :2525/fee
200 OK Fee
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Listrum-1.3.3b0.tar.gz.
File metadata
- Download URL: Listrum-1.3.3b0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77049a430f32b372d5456998ddddeaab5886a09e16d58be7b411ddb54457d5cb
|
|
| MD5 |
e6c0258cf84826104df46a8c13e3a6b5
|
|
| BLAKE2b-256 |
85e271607366c5a27385d4100eb857998f762b1303b8afbc21171f0b1ff3a742
|
File details
Details for the file Listrum-1.3.3b0-py3-none-any.whl.
File metadata
- Download URL: Listrum-1.3.3b0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b86c73d106edec498292b41eb7c51f672a779ff216dd3d94c827b86c989f90ea
|
|
| MD5 |
2af5b96735cabf84e417549b54b5b0fb
|
|
| BLAKE2b-256 |
53802fde74ac3aee894bbd2f6b7246b0b38a2895bbd732a9a72aac902f7174ed
|