Python client for the SolarCoins SOLAR/1 ledger API
Project description
solarcoins — Python SDK for the SolarCoins ledger
Open-source client for the SOLAR/1 protocol. MIT licensed.
pip install solarcoins # once published to PyPI
# or
pip install -e ./sdk # local dev
Quickstart
from solarcoins import SolarClient, generate_keypair
client = SolarClient("https://solarcoins.net")
# Generate keys client-side — private key never leaves the local machine
kp = generate_keypair()
# Sign up + auto-login
client.signup("alice", "supersecret123", kp)
# Read balance
print(client.get_balance(kp.public_key))
# Send 5 SOLAR — caller manages sequence numbers
bob_pubkey = bytes.fromhex("...")
client.transfer(kp, bob_pubkey, "5.0", sequence_number=0)
Spec reference
This SDK speaks the v1.4 protocol — see
SOLAR_protocol_spec_v1.4.md.
The wire encoding (canonical CBOR, BLAKE2s tx_ids, Ed25519 signatures)
is implemented in solarcoins.canonical and solarcoins.keys to match
the server byte-for-byte.
License
MIT
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 solarcoins-0.1.0.tar.gz.
File metadata
- Download URL: solarcoins-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b97a7d944cf6a840b58e11e0f5f15736c3ea98704a5b10c7cd550e6e1c691b62
|
|
| MD5 |
233dc0dae98b27d89cbf79f6141404c9
|
|
| BLAKE2b-256 |
e86b7a0dde9dd96f1f4d4930ae6e45ccb8d493998d4e502e0a5c5b98368aaff3
|
File details
Details for the file solarcoins-0.1.0-py3-none-any.whl.
File metadata
- Download URL: solarcoins-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79db7554a266f76fda6005d8c26e92f61ee61639d9de0b16688d6b4fb519efeb
|
|
| MD5 |
6c30222813688b7880ba9c0ac3346ca9
|
|
| BLAKE2b-256 |
9ac1a229bb8db1537738a5ccfa959c1443f10fee14761f82388013c19e0b9de1
|