SDK Integration Guide
Integration Checklist
- [ ] Install @epoch-protocol/epoch-intents-sdk, viem (peer dep)
- [ ] Set apiBaseUrl env var (testnet: https://testnet-dev.epochprotocol.xyz)
- [ ] Configure wallet client (viem or wagmi) on a supported chain
- [ ] Fetch allocator address via sdk.getHealthCheck() (do not hard-code)
- [ ] Implement: getTaskData → getIntentQuote → solveIntent → getIntentStatus
- [ ] Use testnetGraph/mainnetGraph for token/chain discovery
- [ ] (Optional, testnet) Gasless Compact deposits: `convertToSmartAccount` → `solveIntent({ gasless: true, allowGaslessSmartAccount: true })` — see [Gasless Deposits](gasless-deposits.md)Install
npm install @epoch-protocol/epoch-intents-sdk viemEnvironment
APIs Quick Reference
Item
Value
Core Intent Flow
Vanilla TypeScript (Node / any JS)
Routing & liquidity options (optional)
React + wagmi Pattern (from compact-demo-epoch)
1. Wagmi chains
2. Token/chain discovery from SDK graphs
3. Instantiate SDK per action
4. Swap submit (compact-demo-epoch/src/pages/BalancePage.tsx)
5. Compact balances & withdrawals
6. Health / allocator address
7. Gasless mode (testnet, optional)
Task Types
Task
Enum
Use case
Key SDK Exports
compact-demo-epoch File Map
File
Purpose
Common Mistakes
Next steps
Last updated