Skip to main content

Kaspa Python SDK

The Kaspa Python SDK provides bindings to Rust & Rusty-Kaspa source, allowing Python developers to interact with the Kaspa BlockDAG.

A native extension module, kaspa, is built from these bindings using PyO3 and Maturin.

Features

This SDK provides features across the following categories:

  • RPC Client — RPC API for the Kaspa node using WebSockets.
  • Wallet SDK — Bindings for wallet-related primitives such as key management, derivation, and transactions.
  • Managed Wallet — A fully managed interface for the Rusty Kaspa Wallet API bundled into one Python class.
  • SilverScript — Experimental SilverScript contract compilation, locking scripts, and unlocking scripts.
  • ZK Scripts — Experimental builder that turns RISC Zero zero-knowledge proofs into Kaspa locking and unlocking scripts, verified on-chain.

This package strives to mirror the Kaspa WASM32 SDK from a feature and API perspective, while respecting Python conventions.

Documentation

Full documentation is available on the documentation site, including (but not limited to):

The documentation site is versioned:

  • dev refers to the latest in main branch
  • latest refers to the most recent production release
  • Specific version tags are available

Documentation is not available for versions prior to 1.1.0. However, the API is very close, if not the exact same, for those versions and 1.1.0.

Quick Install

The Kaspa Python SDK is available on PyPI (link). As such, it can be installed from PyPI via:

pip install kaspa

Security-critical applications should consider building and installing from source. Instructions can be found here on the documentation site.

Example

A very basic RPC example:

import asyncio
from kaspa import Resolver, RpcClient

async def main():
    # Connect to Public Node Network (PNN) with Resolver
    client = RpcClient(resolver=Resolver())
    await client.connect()

    # Execute RPC Call
    print(await client.get_block_dag_info())

if __name__ == "__main__":
    asyncio.run(main())

Additional detailed examples can be found in the following locations:

Core Concepts & Contributing

The Contributing Guide details various technical core concepts and information about this project.

License

This project is licensed under the ISC License.

Release files for kaspa 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for kaspa 2.1.0
File
kaspa-2.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
kaspa-2.1.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
kaspa-2.1.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
kaspa-2.1.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
kaspa-2.1.0-cp314-cp314-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.12+ x86-64 Details
kaspa-2.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
kaspa-2.1.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
kaspa-2.1.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
kaspa-2.1.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
kaspa-2.1.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
kaspa-2.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
kaspa-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
kaspa-2.1.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
kaspa-2.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
kaspa-2.1.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
kaspa-2.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
kaspa-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
kaspa-2.1.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
kaspa-2.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
kaspa-2.1.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
kaspa-2.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
kaspa-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
kaspa-2.1.0-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details
kaspa-2.1.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
kaspa-2.1.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details

Total release size: 362.2 MB

Release files / kaspa-2.1.0-cp314-cp314-win_amd64.whl

Download URL kaspa-2.1.0-cp314-cp314-win_amd64.whl
Size 14.1 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
ed368cbb80919c5a960311cfadf58963f4ef0e30323e5b1472be88ecb93d4679
BLAKE2b-256 checksum
How to use checksums
90b69adcbd25ef08deaa1abb6c6558ed56145732e6b7df9addcdfbdb60d98ba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL kaspa-2.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 16.1 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b739abd308326611f07a67d97d677c7adc68e955f3661fb4e5759b7bd6c12b02
BLAKE2b-256 checksum
How to use checksums
6c6dd122e56eb673d0aea71b0b2395f73b303d44f89ee7ba61cc19d7a321a470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL kaspa-2.1.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 15.5 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
9d85931a1d26e475cfd99a0943bade17567bdbdf2e4713a32aaf9d8023fdc7b3
BLAKE2b-256 checksum
How to use checksums
a7ea9130328a289eb49d875a27abd6341f735bf4388737e75babef7074d9bd68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL kaspa-2.1.0-cp314-cp314-macosx_11_0_arm64.whl
Size 13.3 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2b63f2fc8451dd7c1c3570e8b38229af90f534acb256dfff3706fa3c345d9e0d
BLAKE2b-256 checksum
How to use checksums
d9c2e99a64ad0c88d38418c712c0c2cb72517d0cdb13f4d210456978afa12c26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp314-cp314-macosx_10_12_x86_64.whl

Download URL kaspa-2.1.0-cp314-cp314-macosx_10_12_x86_64.whl
Size 13.5 MB
Tags CPython 3.14 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8d6b1c02d395984f0ce239e30a267884499777b849ac00d97d27dfed52f3a3d3
BLAKE2b-256 checksum
How to use checksums
b09fb7ddcac47763a860fd6c20315dca5ebc801f0387420528b6b0f4d6daeedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp313-cp313-win_amd64.whl

Download URL kaspa-2.1.0-cp313-cp313-win_amd64.whl
Size 14.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
55675cbc0d29f93643bd0243f51f5904707af59e646e3da59dd9f99ef64bdbb5
BLAKE2b-256 checksum
How to use checksums
7486d874651eb3b99dbf0058857aa16f7a8d1cbbaacd26ffadc8b9e21e45029c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL kaspa-2.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 16.0 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ac229614aa41872276d4d7e75ede8d5f663761b0756d211c05c138e0741ed9a8
BLAKE2b-256 checksum
How to use checksums
c0e0867aa3d738821dabc2a6bcd4c119d1d04a6e5b07d9ce3e8bf0bfd90b15c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL kaspa-2.1.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 15.5 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7408356fc141984a05f4ecacafa813e3084b7932c0d03a8a9b8859e54824a1f2
BLAKE2b-256 checksum
How to use checksums
9b068e1ee054d2a796c9d41b50cba0e71f463fee0b8b552c246ddb9cad16bf4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL kaspa-2.1.0-cp313-cp313-macosx_11_0_arm64.whl
Size 13.3 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
47ea0de1dce088a63d160a89a3244b7b6402aea8fc1fa81968520d6a100d212a
BLAKE2b-256 checksum
How to use checksums
0862ce00846cba8be0142dc2baf5e037487002882239e6aa565943ad8f672f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL kaspa-2.1.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 13.5 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3c92845d84cd418e115fc326621e1a18c45c069d266cd2ee3b9133e4af40dcea
BLAKE2b-256 checksum
How to use checksums
88ecdca05bb73dd292e545d6805bd365f28b57a59f2dab2b8821512f5bc617f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp312-cp312-win_amd64.whl

Download URL kaspa-2.1.0-cp312-cp312-win_amd64.whl
Size 14.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f5f989014abb1c642591ee4116afc43dcc62f1a87f0a0073efd5b093b83c94a3
BLAKE2b-256 checksum
How to use checksums
f3402a30b02cb153ccdfe8225fb1b0213a5cbc557c5924631672c36b2ebfabc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL kaspa-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 16.0 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1f12fc746709f230228cc50a4a2ceedf485806978e4a33421ba4753551807315
BLAKE2b-256 checksum
How to use checksums
f32ad48283d471a49ce09c23f18a58db051b56cc61a3f34789b907de7191e7d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL kaspa-2.1.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 15.5 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
28c2e95974dabeed18800ad1a524903182c14b6a355482a3b216cbd6116868a1
BLAKE2b-256 checksum
How to use checksums
76e0c85aeb9843a37a93ef3067f699c84a2fbf1feaef299d8c97f4998fd6f965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL kaspa-2.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 13.3 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5980a5e63f43c393992f2dcdf5545526454a5bc8d5e945881e0356df18ba1559
BLAKE2b-256 checksum
How to use checksums
9ad5739ab7ac7ab4545ea53768f0c6157c0b93894f3d41b433cd38624d6f3f6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL kaspa-2.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 13.5 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5f8aa348044bb7892935b86e248723fe78d8b5cfdaa9adba45b955d8776ef63b
BLAKE2b-256 checksum
How to use checksums
760cdba8d73e61eec0ca76249a5526a11e7b40a614e1539a626dba11e6436877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp311-cp311-win_amd64.whl

Download URL kaspa-2.1.0-cp311-cp311-win_amd64.whl
Size 14.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
27b954da3ce75dbae62d4927c093adce35bdf2f884bfcddc32f66f71021021d1
BLAKE2b-256 checksum
How to use checksums
4df96a2112721f7a5fad485fdd2e5cda8e3c470f56309d125f4344c4ab483902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL kaspa-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 16.0 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ec0217993a4de22ad2aa8f15f0e71887f2861fd62d2152dcf6097d6d19aa4696
BLAKE2b-256 checksum
How to use checksums
3748df65e2aa00909a194593c74e2ba3c4e622c95a406631197b37a5a836085c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL kaspa-2.1.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 15.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f6a92cce01de1601438940eb717ce25ba9e7314ea9f7bfce1e740f2267d506d5
BLAKE2b-256 checksum
How to use checksums
62cb71b628e66a5e8e3af9c3b85b6fcae9e3a22814b0b3e8c70cbc6c7d4a1788
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL kaspa-2.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 13.3 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9ac8cc271f9b3f033af00a01f85395e4d9f0da94c8d66fcc91f96bbcd385b1ca
BLAKE2b-256 checksum
How to use checksums
b98c6c237019504d243e2370cc118fab70da2c0f9109576f6d807ea5f3391e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL kaspa-2.1.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 13.5 MB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9a5821521ed6a864d1c00593ded5643eb7165554ebaf0e459c5f68409881b453
BLAKE2b-256 checksum
How to use checksums
ef591f22d219bbe62295d13942768355715c886443e5d15dd0da409185617641
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp310-cp310-win_amd64.whl

Download URL kaspa-2.1.0-cp310-cp310-win_amd64.whl
Size 14.1 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
44256c40911a853d582e3cd3f39e20ad1bf26033f4e078906a88e3c5a19d89fc
BLAKE2b-256 checksum
How to use checksums
1032a6e6a626323346a50bb01631d22ee714c58662d306a162b1741e2fbc3347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL kaspa-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 16.0 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3b73371839461a50718fc6c16f49f9b9215a20974e685d93b640a6cdb7db53ed
BLAKE2b-256 checksum
How to use checksums
bb32c8f74ccc567ae44f707e7a4ff6796fad8411924a13ef05779ec05a4c53ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL kaspa-2.1.0-cp310-cp310-manylinux_2_28_aarch64.whl
Size 15.5 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
d06fd4e2e90943c75038f232a750ca34123b52231fbaf2f017ba0de25bcfbd4e
BLAKE2b-256 checksum
How to use checksums
f703600540aba23873f87a10af8a328665d4e4ebb4a5b643261b3797e6df8813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL kaspa-2.1.0-cp310-cp310-macosx_11_0_arm64.whl
Size 13.3 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e7560f3b311d0260e6a472995c1765dcaff9dbb86792de7a4c0d3051c7651b86
BLAKE2b-256 checksum
How to use checksums
eea6f99b7398bd10ad4144774d783db6138fa7a1547d33bafc4ec69c6f94a958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / kaspa-2.1.0-cp310-cp310-macosx_10_12_x86_64.whl

Download URL kaspa-2.1.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 13.5 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e0a50a80ef2893574d2dfdd3b60c1b1f7720c4005ae2cfa9220f9f174eacde3c
BLAKE2b-256 checksum
How to use checksums
f9db948f3365d2e96eca88acfe35d81328f322da6ca0ce8abbd001c168092f6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page