Kaspa Python SDK¶
This Python package, kaspa, provides an SDK for interacting with the Kaspa network from Python.
kaspa is a native extension module built from bindings to Rust and rusty-kaspa source. PyO3 and Maturin are used to create bindings and build the extension module. More information on the inner workings can be found in the Contributing section.
Beta Status
This project is in beta status.
This project very closely mirrors Kaspa's WASM SDK, while trying to respect Python conventions. Feature parity with WASM SDK is a work in progress, not all features are available yet in Python.
This documentation site currently provides API reference and basic usage guides. General cryptocurrency concepts, development practices, and Kaspa specific concepts are not covered here.
Features¶
This SDK provides features in two primary categories:
- RPC Client - Connect to Kaspa nodes via RPC.
- Wallet Management - Wallet related functionality (key management, derivation, addresses, transactions, etc.).
Most features gaps with Kaspa WASM SDK exist around Wallet functionality.
A (Very) Basic Example¶
import asyncio
from kaspa import Resolver, RpcClient
async def main():
client = RpcClient(resolver=Resolver())
await client.connect()
print(await client.get_server_info())
if __name__ == "__main__":
asyncio.run(main())
Getting Started¶
- Installation - Set up the SDK in your environment
- Examples - Build your first Kaspa application
Guides¶
-
RPC Client
Connect to Kaspa nodes -
Transactions
Build and sign transactions -
Addresses
Create and validate Kaspa addresses -
Mnemonics
Generate and use seed phrases -
Key Derivation
HD wallet key generation -
Message Signing
Sign and verify messages
API Reference¶
For complete API documentation, see the API Reference.
License¶
This project is licensed under the ISC License.