Quick Start
Quick Start
Installation
# Using npm
npm install @tetrics/sdk viem
# Using pnpm
pnpm add @tetrics/sdk viem
# Using yarn
yarn add @tetrics/sdk viemYour First Execution
import { TetricsClient } from '@tetrics/sdk'
// 1. Create a client with your API credentials
const client = TetricsClient.fromApiKey(
'your-api-key-id',
'your-api-secret'
)
// 2. Define your execution plan
const plan = {
name: 'Stake ETH on Lido',
actions: [{
chain: 'ethereum',
protocol: 'lido',
method: 'deposit',
params: {
amount: '1000000000000000000' // 1 ETH in wei
},
value: '1000000000000000000'
}]
}
// 3. Execute the plan
const receipt = await client.executePlanDirect({
name: plan.name,
steps: plan.actions,
executionMode: 'atomic'
})
console.log('Success!', receipt)That's it! 🎉
Getting an API Key

Option 1: API Key from Dashboard (Production)
Option 2: Wallet Authentication (Development)
Environment Variables
Common Patterns
Check API Health
Query Supported Protocols
Validate Execution Plan Before Running
Complete Example
Troubleshooting
"Authentication failed"
"Validation failed"
"Rate limit exceeded"
Example: Gas Savings
Last updated