SDK Overview
Tenzro provides two official SDKs for building applications on the network: a comprehensive Rust SDK and a TypeScript SDK for web and server-side applications. Both SDKs include the AppClient pattern for developer-funded applications with master wallets and gas sponsorship.
Available SDKs
Rust SDK
Full-featured SDK with 36 modules covering wallets, agents, inference, bridge, crypto, TEE, and more. Includes 9 runnable examples.
tenzro-sdk →TypeScript SDK
26 client modules for building web and server applications, with full type safety and async/await patterns.
tenzro-ts-sdk →AppClient Pattern
The AppClient is the top-level developer entry point for building applications. It wraps a master wallet and provides methods to create user sub-wallets, sponsor gas, manage spending policies, and track usage:
use tenzro_sdk::AppClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize with master wallet private key
let app = AppClient::new(
"https://rpc.tenzro.network",
"your-master-wallet-private-key",
).await?;
// Or initialize with API key
let app = AppClient::from_api_key(
"https://rpc.tenzro.network",
"your-api-key",
).await?;
// Create a user wallet (funded from master)
let user = app.create_user_wallet("alice", 100_000_000_000_000_000).await?;
// Sponsor an inference request for the user
let result = app.sponsor_inference(
&user.address,
"gemma3-270m",
"Hello, how are you?",
).await?;
// Check usage stats
let stats = app.get_usage_stats().await?;
println!("Total gas spent: {} wei", stats.total_gas_spent);
Ok(())
}SDK Modules
Both SDKs provide client modules for every major subsystem:
| Module | Description |
|---|---|
| app | AppClient with master wallet, user sub-wallets, gas sponsorship |
| wallet | Wallet creation, balance queries, transfers |
| custody | MPC wallets, session keys, spending policies, key rotation |
| identity | TDIP identity registration, DID resolution, credentials |
| inference | Model listing, chat completion, streaming inference |
| agent | Agent registration, messaging, templates, swarms |
| bridge | Cross-chain transfers via LayerZero, CCIP, deBridge |
| payment | MPP and x402 payment protocol clients |
| staking | Stake, unstake, provider registration |
| governance | Proposals, voting, voting power queries |
| token | Token creation, registry, cross-VM transfers |
| crypto | Signing, verification, encryption, hashing |
| tee | TEE attestation, seal/unseal, provider queries |
| zk | ZK proof generation and verification |
ProviderClient
Both SDKs include a ProviderClient for making direct HTTP requests to the JSON-RPC endpoint. The Rust SDK uses reqwest and the TypeScript SDK uses fetch:
// TypeScript
import { TenzroClient } from "@tenzro/sdk";
const client = new TenzroClient("https://rpc.tenzro.network");
// All modules available as properties
const balance = await client.wallet.getBalance("0x...");
const models = await client.inference.listModels();
const identity = await client.identity.register("human", "Alice");