Official Python SDK for Lichen blockchain
Project description
Lichen Python SDK
Official Python SDK for interacting with Lichen blockchain.
Installation
pip install lichen-sdk
Quick Start
import asyncio
from lichen import Connection, Keypair, PublicKey
async def main():
# Connect to Lichen
connection = Connection('http://localhost:8899')
# Generate a native PQ keypair
keypair = Keypair.generate()
print(f"Address: {keypair.pubkey().to_base58()}")
# Get account balance
pubkey = PublicKey('YourPublicKeyHere...')
balance = await connection.get_balance(pubkey)
print(f"Balance: {balance['licn']} LICN")
# Subscribe to blocks
async def on_block(block):
print(f"New block: {block}")
await connection.on_block(on_block)
asyncio.run(main())
Features
- ✅ Complete async RPC client (24 endpoints)
- ✅ WebSocket subscriptions (real-time events)
- ✅ Native PQ keypairs and self-contained signatures
- ✅ Transaction builder
- ✅ Type hints throughout
- ✅ Address and PQ public-key utilities
- ✅ Full blockchain interaction
Documentation
See the Python SDK reference for detailed API reference.
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
lichen_sdk-1.0.0.tar.gz
(30.4 kB
view details)
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 lichen_sdk-1.0.0.tar.gz.
File metadata
- Download URL: lichen_sdk-1.0.0.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
115a7d0914a9476725c0ccb339f557b79dd44b2e7ea9ce392fe124b8f745a27e
|
|
| MD5 |
c720f0c5b0d63ae18e9141d2c1058b02
|
|
| BLAKE2b-256 |
a2c87f6ada269e14540ddfb6a1f6fc84c24a99e9051dd5c9855832c2acef93be
|
File details
Details for the file lichen_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lichen_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e00ded1929483975d92273df50dbc573827f67cf7bd9a4631f618e4951ca0ff7
|
|
| MD5 |
fb7f2ea582074ea7a234164a1d6b0a69
|
|
| BLAKE2b-256 |
0ca218e09c895d04b64fc1b3202b1bcb3df5d7bb3b025141f3cc0ac70358dc83
|