Prerequisites
@dynamic-labs-sdk/clientinstalled- RPC provider API keys (optional)
Quick Start
Common Patterns
Multiple networks:NetworkData shape
Thenetwork object passed to your transformer has the following fields:
| Field | Type | Description |
|---|---|---|
networkId | string | Unique identifier for the network (chain ID for EVM, cluster for Solana) |
name | string | Human-readable network name |
rpcUrls | { http: string[] } | List of RPC endpoints for the network |
nativeCurrency | { name: string, symbol: string, decimals: number } | Native token details |
blockExplorerUrls | string[] | Block explorer URLs |
chainName | string | The blockchain family (e.g., 'ETH', 'SOL', 'SUI') |
Network IDs
EVM networks use chain IDs:'1' (Ethereum), '137' (Polygon), '8453' (Base), '42161' (Arbitrum), '10' (Optimism), '11155111' (Sepolia)
Solana networks use cluster names: 'mainnet-beta', 'devnet', 'testnet'
The transformer applies to all chains — EVM, Solana, Sui, and others enabled in your project.
Provider Examples
Alchemy:Rules
- Always return valid
NetworkDatastructure - Use environment variables for API keys
- Keep transformers synchronous (no async/await)
- Transformers are called once during initialization