Metadata-Version: 2.4
Name: lichen-sdk
Version: 1.0.0
Summary: Official Python SDK for Lichen blockchain
Author-email: Lichen Labs <hello@lichen.network>
License-Expression: MIT
Project-URL: Homepage, https://github.com/lobstercove/lichen
Project-URL: Documentation, https://developers.lichen.network
Project-URL: Bug Tracker, https://github.com/lobstercove/lichen/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25.0
Requires-Dist: websockets>=12.0
Requires-Dist: base58>=2.1.1
Requires-Dist: cryptography>=43.0.0
Requires-Dist: dilithium-py>=1.4.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"

# Lichen Python SDK

Official Python SDK for interacting with Lichen blockchain.

## Installation

```bash
pip install lichen-sdk
```

## Quick Start

```python
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](https://developers.lichen.network/sdk-python.html) for detailed API reference.

## License

MIT
