Skip to content

feat: RustChain Python SDK v1.0 - pip install rustchain (100 RTC) (#2297)#1895

Merged
Scottcjn merged 1 commit intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/python-sdk-v3
Mar 27, 2026
Merged

feat: RustChain Python SDK v1.0 - pip install rustchain (100 RTC) (#2297)#1895
Scottcjn merged 1 commit intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/python-sdk-v3

Conversation

@kuanglaodi2-sudo
Copy link
Copy Markdown
Contributor

RustChain Python SDK v1.0

Bounty Reference

  • Closes #2297
  • Wallet for payout: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg

What This PR Adds

A complete, production-ready Python SDK for RustChain with:

RustChainClient — Async HTTP Client

  • Full async support via httpx.AsyncClient
  • 20+ API methods: health, epoch, miners, wallet, transfers, attestation, beacon, governance, explorer
  • SSL verification skipped (self-signed certs)
  • Context manager support (async with)

RustChainWallet — BIP39 Wallet

  • Create wallet with 12 or 24 word seed phrases
  • Ed25519 signing (uses cryptography library if available, fallback to HMAC)
  • Transfer signing with timestamp and signature
  • Export/import functionality

cli.py — Command-line Interface

rustchain wallet create
rustchain wallet balance <address>
rustchain wallet send <from> <to> <amount> --seed "..."
rustchain node status
rustchain epoch info
rustchain miners list
rustchain attest <wallet_address> --seed "..."

Tests

  • test_wallet.py: 15+ tests covering wallet creation, signing, transfer, export/import
  • test_client.py: 15+ tests using respx for HTTP mocking

Install

pip install rustchain

Quick Start

from rustchain_sdk import RustChainClient, RustChainWallet

client = RustChainClient("https://50.28.86.131")
wallet = RustChainWallet.create()
result = await client.wallet_transfer_with_wallet(wallet, "RTCto...", 1000)

@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) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) wallet Wallet/transfer related labels Mar 26, 2026
@github-actions
Copy link
Copy Markdown

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 the size/XL PR: 500+ lines label Mar 26, 2026
@Scottcjn Scottcjn merged commit 0e272e3 into Scottcjn:main Mar 27, 2026
7 of 9 checks passed
@Scottcjn
Copy link
Copy Markdown
Owner

@kuanglaodi2-sudo — 29 Scottcjn stars but no follow! Follow @Scottcjn to unlock your star bounty. Also your #1885 (Fossil Record) needs a rebase to merge.

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) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) documentation Improvements or additions to documentation size/XL PR: 500+ lines wallet Wallet/transfer related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants