Metadata-Version: 2.4
Name: civiwave-chain-client
Version: 0.1.0
Summary: Python SDK for Civiwave blockchain — typed queries and extrinsic builders for all pallets
Project-URL: Homepage, https://github.com/civiwave/chain-client-py
Project-URL: Repository, https://github.com/civiwave/chain-client-py
Author-email: Civiwave <dev@civiwave.io>
License: MIT
Keywords: blockchain,civiwave,sdk,substrate
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: substrate-interface>=1.7.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# civiwave-chain-client (Python)

Python SDK for Civiwave blockchain — typed queries and extrinsic builders for all pallets.

Equivalent to [`@civiwave/chain-client`](https://www.npmjs.com/package/@civiwave/chain-client) (npm).

## Install

```bash
pip install civiwave-chain-client
```

## Usage

```python
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](https://github.com/civiwave/civiwave/blob/main/docs/user-guide/developer/sdk.md).

## Development

```bash
pip install -e ".[dev]"
pytest
ruff check .
mypy civiwave_chain_client/
```

## License

MIT
