Python SDK for Civiwave blockchain — typed queries and extrinsic builders for all pallets
Project description
civiwave-chain-client (Python)
Python SDK for Civiwave blockchain — typed queries and extrinsic builders for all pallets.
Equivalent to @civiwave/chain-client (npm).
Install
pip install civiwave-chain-client
Usage
from civiwave_chain_client import CiviwaveClient
client = CiviwaveClient(endpoint="ws://127.0.0.1:9944")
# Query a DID
did_info = client.get_did("5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY")
# Submit a step event claim
client.submit_step_event_claim(
keypair=keypair,
hub_netuid=1,
goal_hash="0xabc...",
claim_hash="0xdef...",
claimant_did="did:civiwave:5Grw...",
subject_did="did:civiwave:5FHn...",
initiative_category=0,
)
# Add stake
client.add_stake(keypair, hotkey="5FHn...", netuid=1, amount=1_000_000_000)
API
See the full API reference in SDK docs.
Development
pip install -e ".[dev]"
pytest
ruff check .
mypy civiwave_chain_client/
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 civiwave_chain_client-0.1.0.tar.gz.
File metadata
- Download URL: civiwave_chain_client-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abc43dc29766f3a9666d98f5d24d43878b31479e0966a81341db46372131bf1b
|
|
| MD5 |
13d0520520c2e687f548510022cee8a6
|
|
| BLAKE2b-256 |
617aa80f2384afb0bd946d667b8cbe880c7e208136446be9bca59266c7637878
|
File details
Details for the file civiwave_chain_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: civiwave_chain_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 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 |
ac69e34b59fcbcba1f35153b1eee6f395b9b87024e7b902111774fb5817d6dc8
|
|
| MD5 |
a30cea2face3d51152bc47561125b62b
|
|
| BLAKE2b-256 |
7146f9ad39d019f00c2b3a28c0cf696228d50481ffe3892394fdca9a9ca440bd
|