Skip to content

feat(sdk): RustChain Python SDK v3 -- pip install rustchain (Bounty #2297, 125 RTC)#1831

Open
kuanglaodi2-sudo wants to merge 1 commit intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/python-sdk-v3
Open

feat(sdk): RustChain Python SDK v3 -- pip install rustchain (Bounty #2297, 125 RTC)#1831
kuanglaodi2-sudo wants to merge 1 commit intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/python-sdk-v3

Conversation

@kuanglaodi2-sudo
Copy link
Contributor

Summary

Implements a comprehensive Python SDK for RustChain (Bounty #2419 / #2297, 125 RTC).

What

  • rustchain/ package with full async httpx client, dataclass models, typed exceptions
  • CLI with 7 subcommands: health, epoch, miners, balance, transfer-signed, admin-transfer, settle
  • 15+ pytest unit tests with mocked responses
  • pyproject.toml with pip install rustchain support and entry point

Files

File Description
rustchain/__init__.py Package init, exports
rustchain/client.py Async RustChainClient with context manager
rustchain/models.py NodeHealth, EpochInfo, MinerInfo, BalanceInfo, SignedTransfer
rustchain/exceptions.py RustChainError, APIError, ValidationError, AuthenticationError
rustchain/cli.py CLI with argparse subcommands
tests/test_client.py 15 pytest tests with mocked httpx
pyproject.toml Package metadata, entry point
README.md Full SDK documentation

API Coverage

  • GET /healthNodeHealth
  • GET /epochEpochInfo
  • GET /api/minerslist[MinerInfo]
  • GET /wallet/balance?miner_id=BalanceInfo
  • POST /wallet/transfer/signed → signed transfer
  • POST /wallet/transfer (X-Admin-Key) → admin transfer
  • POST /rewards/settle (X-Admin-Key) → settle rewards

Bounty Payout

Wallet: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg


Bounty #2419 — 125 RTC

@github-actions
Copy link

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions bot added documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) tests Test suite changes size/XL PR: 500+ lines labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) documentation Improvements or additions to documentation size/XL PR: 500+ lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant