Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ae9eae9
fix: create missing ip_rate_limit table in init_db
createkr Feb 17, 2026
9689db5
feat: add public RustChain network status dashboard
nicepopo86-lang Feb 17, 2026
9eff30f
ci: make PR test pipeline blocking and deterministic
createkr Feb 17, 2026
bb55fe8
docs: add Simplified Chinese translation
addidea Feb 17, 2026
369fb50
feat: decentralized GPU render protocol with escrow
createkr Feb 17, 2026
0890bed
feat: wRTC Telegram price ticker bot
createkr Feb 17, 2026
97db4b5
feat: Docker deployment with nginx and SSL
addidea Feb 17, 2026
80914e6
feat: Grafana monitoring with Prometheus dashboards
addidea Feb 17, 2026
de55f96
docs: comprehensive API reference
createkr Feb 17, 2026
6b27dec
feat: implement multi-node database sync protocol #36 (#219)
createkr Feb 17, 2026
39665a1
Add US regulatory position document — RTC is not a security
Scottcjn Feb 17, 2026
5a89527
feat(telegram-bot): add RustChain community bot commands (#265)
createkr Feb 18, 2026
b88179d
fix(windows-miner): headless fallback when tkinter missing
Scottcjn Feb 18, 2026
ac39d4d
fix(windows setup): detect/install tkinter (Tcl/Tk) + headless hint
Scottcjn Feb 18, 2026
78db134
security: trust X-Forwarded-For only from trusted proxies
Scottcjn Feb 18, 2026
2ddc12f
Merge pull request #270 from Scottcjn/security/trusted-proxy
sophiaeagent-beep Feb 18, 2026
b38e9d9
Merge pull request #269 from Scottcjn/fix/windows-miner-headless
sophiaeagent-beep Feb 18, 2026
e2901a6
docs: complete SEO overhaul and technical documentation expansion (#2…
firaslamouchi21 Feb 18, 2026
0a00d2d
feat(museum): integrate Hall of Hunters panel into PoA living museum
Scottcjn Feb 18, 2026
b05f98c
feat(museum): add hunters API proxy and 3D hall HUD
Scottcjn Feb 18, 2026
388655d
docs: add SECURITY.md safe harbor and token-value disclaimer
Scottcjn Feb 19, 2026
8a69293
feat: Add shared x402 config module for Coinbase wallet + x402 payments
Scottcjn Feb 19, 2026
09a2d60
feat: Add RustChain x402 module (swap-info + coinbase linking)
Scottcjn Feb 19, 2026
047c006
feat: Add Beacon Atlas x402 module (agent wallets + premium endpoints)
Scottcjn Feb 19, 2026
d5acfdf
feat: Add Agent Wallets + x402 documentation page
Scottcjn Feb 19, 2026
cb35a92
feat: Add Coinbase wallet CLI module for ClawRTC (v1.5.0)
Scottcjn Feb 19, 2026
1d27e70
feat: Add Agent Wallets + x402 section to README
Scottcjn Feb 19, 2026
fb030bd
fix: Restore README + add Agent Wallets / x402 section
Scottcjn Feb 19, 2026
ba1e8e0
docs: add one-page mechanism spec and falsification matrix
Scottcjn Feb 19, 2026
0fcef17
fix(rate-limit): prevent X-Forwarded-For spoof bypass
liu971227-sys Feb 20, 2026
d3e4262
fix(attest): block missing-fingerprint bypass
liu971227-sys Feb 20, 2026
06a057b
fix(wallet): reject sub-micro transfer amounts
liu971227-sys Feb 20, 2026
fdebe37
feat(monitoring): add cross-node consistency probe
liu971227-sys Feb 20, 2026
dbd2874
hardening(anchor): remove default Ergo API key and wallet password
liu971227-sys Feb 20, 2026
12adee9
security(fingerprint): add AWS, GCP, Azure, and cloud provider VM det…
Scottcjn Feb 22, 2026
3bb2911
fix: add inline attestation nonce replay protection
Feb 22, 2026
81e3982
Merge pull request #327 from autonomy414941/fix/attest-nonce-replay-i…
sophiaeagent-beep Feb 22, 2026
7601eda
fix: reject non-finite withdrawal amounts (#330)
autonomy414941 Feb 22, 2026
4be4c0a
docs: add documentation quality checklist and troubleshooting guidanc…
nicepopo86-lang Feb 22, 2026
402b214
docs: fix manual install commands and repository structure paths
autonomy414941 Feb 22, 2026
46cb78d
feat: add /api/badge/<miner_id> endpoint + GitHub Action for mining s…
AdnanMehr8 Feb 22, 2026
938f05e
feat: add GitHub gamification — welcome bot, auto-labeler, stale bot,…
Scottcjn Feb 22, 2026
fa6a648
feat: add dynamic badges and contributor engagement section to README
Scottcjn Feb 22, 2026
f654c21
feat: add --version flag to all miners
Pitrat-wav Feb 23, 2026
696429c
docs: add requirements.txt
Pitrat-wav Feb 23, 2026
8becd34
feat: add colored output to all miners
Pitrat-wav Feb 23, 2026
b656fd3
feat: add JSON output mode to universal miner
Pitrat-wav Feb 23, 2026
7e8a271
docs: add installation troubleshooting section
nicepopo86-lang Feb 23, 2026
5b9de27
feat: add reusable mining status badge action
nicepopo86-lang Feb 23, 2026
0caf5c5
feat: add BoTTube API integration example
nicepopo86-lang Feb 23, 2026
6da30da
fix: correct f-string quoting in hardware_fingerprint output
Feb 23, 2026
fb2f3ea
Merge pull request #363 from autonomy414941/fix/hardware-fingerprint-…
Scottcjn Feb 23, 2026
248948b
fix: fail closed on mock signature mode outside test runtime
Feb 23, 2026
c6dcea2
fix: prevent unauthenticated sensitive API disclosure
Feb 23, 2026
29d5a32
Merge pull request #366 from autonomy414941/fix/mock-signature-fail-c…
Scottcjn Feb 23, 2026
6e1b71a
Merge pull request #368 from autonomy414941/fix/api-sensitive-disclos…
Scottcjn Feb 23, 2026
ac9679b
security: validate limit query params to avoid endpoint 500s (#372)
autonomy414941 Feb 24, 2026
ff840dc
security: enforce entropy-quality thresholds in hardware collision ch…
createkr Feb 25, 2026
363a7da
feat: add RustChain Telegram Bot (Bounty #249)
zzjpython Feb 25, 2026
a3eddab
fix: extract badge Python to separate file, reduce cron to daily
Scottcjn Feb 26, 2026
aab1582
fix: extract badge Python to separate file, reduce cron to daily
Scottcjn Feb 26, 2026
5585b68
fix: extract badge Python to separate file, reduce cron to daily
Scottcjn Feb 26, 2026
13a8390
fix: auto-label PRs with BCOS tiers, default to L1 instead of hard-fail
Scottcjn Feb 26, 2026
f7efe09
fix: auto-label PRs with BCOS tiers, default to L1 instead of hard-fail
Scottcjn Feb 26, 2026
a339572
Add sdk/python/rustchain/__init__.py
sungdark Mar 26, 2026
4272d80
Add sdk/python/rustchain/client.py
sungdark Mar 26, 2026
f158f22
Add sdk/python/rustchain/cli.py
sungdark Mar 26, 2026
ca7cae6
Add sdk/python/rustchain/explorer.py
sungdark Mar 26, 2026
c799087
Add sdk/python/rustchain/exceptions.py
sungdark Mar 26, 2026
23f34d2
Add sdk/python/test_rustchain_sdk.py
sungdark Mar 26, 2026
5ad048a
Add sdk/python/setup.py
sungdark Mar 26, 2026
1bb6650
Add sdk/python/README.md
sungdark Mar 26, 2026
d10912c
Add sdk/python/requirements.txt
sungdark Mar 26, 2026
3d4ed6c
Add sdk/python/rustchain/bottube/__init__.py
sungdark Mar 26, 2026
f2e5f36
Add sdk/python/rustchain/bottube/client.py
sungdark Mar 26, 2026
eda3149
Add sdk/python/rustchain/bottube/exceptions.py
sungdark Mar 26, 2026
08313bd
Add sdk/python/test_bottube.py
sungdark Mar 26, 2026
e88fb7e
Update sdk/README.md
sungdark Mar 26, 2026
65f27e6
Update sdk/pyproject.toml
sungdark Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 152 additions & 14 deletions sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,89 @@
# RustChain Python SDK
# RustChain SDK

A Python client library for interacting with the RustChain blockchain.
Comprehensive client libraries for interacting with the RustChain blockchain and Agent Economy.

**Version:** 1.0.0

## Available SDKs

| SDK | Language | Description |
|-----|----------|-------------|
| [Python SDK](python/) | Python 3.8+ | Full blockchain + BoTTube client |
| [BoTTube Python](python/rustchain_sdk/bottube/) | Python 3.8+ | BoTTube video platform API |
| [BoTTube JavaScript](javascript/bottube-sdk/) | Node.js 18+ / Browser | BoTTube video platform API |

## Features

- Core blockchain client for node interactions
- **RIP-302 Agent Economy SDK** for AI agent participation
- x402 payment protocol for machine-to-machine payments
- Beacon Atlas reputation system integration
- **BoTTube SDK** for video platform integration (Python + JavaScript)
- Automated bounty system

## Installation

```bash
pip install rustchain-sdk
pip install rustchain
```

Or from source:

```bash
cd sdk/
pip install -e .
```

## Quick Start

### Core Blockchain Client

```python
from rustchain import RustChainClient

# Initialize client
client = RustChainClient("https://50.28.86.131", verify_ssl=False)
client = RustChainClient("https://rustchain.org")

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

# Get current epoch
epoch = client.epoch()
print(f"Current epoch: {epoch['epoch']}")
print(f"Slot: {epoch['slot']}")

# Get all miners
miners = client.miners()
print(f"Total miners: {len(miners)}")

# Get wallet balance
balance = client.balance("wallet_address")
print(f"Balance: {balance['balance']} RTC")

# Close client
client.close()
```

### RIP-302 Agent Economy SDK

```python
from rustchain import AgentEconomyClient

# Initialize agent economy client
client = AgentEconomyClient(
agent_id="my-ai-agent",
wallet_address="agent_wallet_123",
)

# Get agent reputation
reputation = client.reputation.get_score()
print(f"Reputation: {reputation.score}/100 ({reputation.tier.value})")

# Send x402 payment
payment = client.payments.send(
to="content-creator",
amount=0.5,
memo="Great content!",
)

# Find bounties
bounties = client.bounties.list(status="open", limit=10)

client.close()
```

Expand All @@ -55,7 +104,7 @@ RustChainClient(
```

**Parameters:**
- `base_url`: Base URL of RustChain node (e.g., "https://50.28.86.131")
- `base_url`: Base URL of RustChain node (e.g., "https://rustchain.org")
- `verify_ssl`: Whether to verify SSL certificates (default: True)
- `timeout`: Request timeout in seconds (default: 30)

Expand Down Expand Up @@ -216,7 +265,7 @@ result = client.enroll_miner("wallet_address")
The client supports context manager for automatic cleanup:

```python
with RustChainClient("https://50.28.86.131") as client:
with RustChainClient("https://rustchain.org") as client:
health = client.health()
print(health)
# Session automatically closed
Expand All @@ -236,7 +285,7 @@ from rustchain.exceptions import (
TransferError,
)

client = RustChainClient("https://50.28.86.131")
client = RustChainClient("https://rustchain.org")

try:
balance = client.balance("wallet_address")
Expand Down Expand Up @@ -284,6 +333,94 @@ black rustchain/
- Python 3.8+
- requests >= 2.28.0

## Agent Economy SDK (RIP-302)

The SDK includes comprehensive support for the RIP-302 Agent Economy specification:

### Components

| Module | Description |
|--------|-------------|
| `agent_economy.client` | Main `AgentEconomyClient` for unified access |
| `agent_economy.agents` | Agent wallet and profile management |
| `agent_economy.payments` | x402 payment protocol implementation |
| `agent_economy.reputation` | Beacon Atlas reputation system |
| `agent_economy.analytics` | Agent analytics and metrics |
| `agent_economy.bounties` | Bounty system automation |

### Quick Examples

```python
from rustchain.agent_economy import AgentEconomyClient

with AgentEconomyClient(agent_id="my-agent") as client:
# Get reputation
score = client.reputation.get_score()

# Send payment
payment = client.payments.send(to="creator", amount=0.5)

# Find bounties
bounties = client.bounties.list(status="open")

# Get analytics
earnings = client.analytics.get_earnings()
```

### Documentation

See [docs/AGENT_ECONOMY_SDK.md](docs/AGENT_ECONOMY_SDK.md) for complete documentation including:
- Full API reference
- Usage examples
- Error handling
- Integration guides

### Examples

Run the comprehensive examples:

```bash
python examples/agent_economy_examples.py
```

### Testing

```bash
# Run Agent Economy tests
pytest tests/test_agent_economy.py -v

# With coverage
pytest tests/test_agent_economy.py --cov=rustchain.agent_economy
```

## Testing

Run tests:

```bash
# Unit tests (with mocks)
pytest tests/ -m "not integration"

# Integration tests (against live node)
pytest tests/ -m integration

# All tests with coverage
pytest tests/ --cov=rustchain --cov-report=html
```

## Development

```bash
# Install in development mode
pip install -e ".[dev]"

# Run type checking
mypy rustchain/

# Format code
black rustchain/
```

## License

MIT License
Expand All @@ -293,3 +430,4 @@ MIT License
- [RustChain GitHub](https://github.com/Scottcjn/Rustchain)
- [RustChain Explorer](https://rustchain.org/explorer)
- [RustChain Whitepaper](https://github.com/Scottcjn/Rustchain/blob/main/docs/RustChain_Whitepaper_Flameholder_v0.97-1.pdf)
- [Agent Economy SDK Docs](docs/AGENT_ECONOMY_SDK.md)
2 changes: 1 addition & 1 deletion sdk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "rustchain-sdk"
name = "rustchain"
version = "0.1.0"
description = "Python SDK for RustChain blockchain"
readme = "README.md"
Expand Down
Loading