Mycelium TFChain Client
A Rust client library for interacting with the ThreeFold Grid infrastructure.
Modules
This library provides two main modules:
| Module | Description |
|---|---|
| tfchain | TFChain blockchain client with dynamic metadata support |
| explorer | TFGrid Explorer API client with optional Redis caching |
Installation
Add to your Cargo.toml:
[]
= "0.1"
= { = "1", = ["rt-multi-thread", "macros"] }
Quick Start
TFChain Client
Query the blockchain directly for twins, farms, nodes, and balances:
use ;
async
Explorer Client
Query the Grid Proxy API for nodes, farms, and grid statistics:
use GridExplorerBuilder;
async
Examples
Run the examples:
# TFChain client example (requires TFCHAIN_SECRET env var)
# Explorer client examples
Network Endpoints
TFChain (WebSocket)
| Network | URL |
|---|---|
| Mainnet | wss://tfchain.grid.tf:443 |
| Testnet | wss://tfchain.test.grid.tf:443 |
| Devnet | wss://tfchain.dev.grid.tf:443 |
Grid Proxy (HTTP)
| Network | URL |
|---|---|
| Mainnet | https://gridproxy.grid.tf |
| Testnet | https://gridproxy.test.grid.tf |
| Devnet | https://gridproxy.dev.grid.tf |
License
Apache-2.0