Skip to content

whynice724-cell/rustchain-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

RustChain SDK

Python SDK for RustChain blockchain - Proof-of-Antiquity with vintage hardware mining.

Installation

pip install rustchain-sdk

Or install from GitHub:

pip install git+https://github.com/whynice724-cell/rustchain-sdk.git

Quick Start

from rustchain_sdk import create_client

# Create client (sync)
client = create_client()

# Get node health
health = client.health()
print(f"Node version: {health['version']}")

# Get active miners
miners = client.get_miners()
print(f"Active miners: {len(miners)}")

# Check balance
balance = client.get_balance("your-miner-id")
print(f"Balance: {balance}")

Async Usage

import asyncio
from rustchain_sdk import RustChainClient

async def main():
    async with RustChainClient() as client:
        health = await client.health()
        print(f"Status: {health['ok']}")

asyncio.run(main())

API Reference

Method Endpoint Description
health() GET /health Node health status
get_miners() GET /api/miners List active miners
get_balance(miner_id) GET /wallet/balance Get wallet balance
get_epoch() GET /epoch Current epoch info
check_eligibility(miner_id) GET /lottery/eligibility Lottery eligibility
submit_attestation(payload) POST /attest/submit Submit attestation
transfer(from, to, amount, key) POST /wallet/transfer Transfer RTC

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages