Evalanche — Multi-EVM Agent Wallet
Headless wallet SDK with ERC-8004 identity, x402 payments, Li.Fi cross-chain liquidity (bridging + DEX aggregation + DeFi Composer), Gas.zip gas funding, dYdX v4 perpetuals, CoinGecko market intelligence, Polymarket market discovery and execution, contract interaction helpers (approve-and-call + UUPS upgrade), and DeFi operations (liquid staking + EIP-4626 vaults). Works on 21+ EVM chains. Works as CLI or MCP server.
Source: https://github.com/iJaack/evalanche
License: MIT
Supported Chains
Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, Fantom, Gnosis, zkSync Era, Linea, Scroll, Blast, Mantle, Celo, Moonbeam, Cronos, Berachain, + testnets (Fuji, Sepolia, Base Sepolia).
Routescan RPCs preferred where available, with public fallback RPCs.
Security Model
Key Storage & Encryption
Evalanche.boot() manages keys autonomously with encrypted-at-rest storage:
- First run: Generates a BIP-39 mnemonic via
ethers.HDNodeWallet.createRandom()
- Encryption: AES-128-CTR + scrypt KDF (geth-compatible keystore format)
- Password derivation: 32-byte random entropy file via
crypto.randomBytes(32)
- File permissions: chmod 0o600 (owner read/write only)
- Storage location:
~/.evalanche/keys/ by default
MCP Server Access Controls
- Stdio mode (default): stdin/stdout only. No network exposure.
- HTTP mode (
--http): localhost:3402 by default and requires EVALANCHE_MCP_HTTP_TOKEN (or startHTTP({ authToken })). Do not expose publicly without additional network controls.
OpenClaw External Secrets (Preferred when available)
Priority: OpenClaw secrets → raw env vars → encrypted keystore.
Setup
1. Install
npm install -g evalanche
2. Boot on any chain
import { Evalanche } from 'evalanche';
// Base
const { agent } = await Evalanche.boot({ network: 'base' });
// Ethereum
const { agent: eth } = await Evalanche.boot({ network: 'ethereum' });
// Arbitrum
const { agent: arb } = await Avalanche.boot({ network: 'arbitrum' });
// Avalanche (with identity)
const { agent: avax } = await Evalanche.boot({
network: 'avalanche',
identity: { agentId: '1599' },
});
3. Run as MCP server
AVALANCHE_NETWORK=base evalanche-mcp
Available Tools (MCP)
Wallet
| Tool |
Description |
get_address |
Get agent wallet address |
get_balance |
Get native token balance |
sign_message |
Sign arbitrary message |
send_avax |
Send native tokens |
call_contract |
Call a contract method |
Identity (ERC-8004)
| Tool |
Description |
resolve_identity |
Resolve agent identity + reputation |
resolve_agent |
Look up any agent by ID |
Payments (x402)
| Tool |
Description |
pay_and_fetch |
x402 payment-gated HTTP request |
Reputation
| Tool |
Description |
submit_feedback |
Submit on-chain reputation feedback |
Network & Chains
| Tool |
Description |
get_network |
Get current network config |
get_supported_chains |
List all 21+ supported chains |
get_chain_info |
Get details for a specific chain |
switch_network |
Switch to different EVM chain |
Arena DEX (Avalanche)
| Tool |
Description |
arena_buy |
Buy Arena community tokens via bonding curve (spends $ARENA) |
arena_sell |
Sell Arena community tokens for $ARENA |
arena_token_info |
Get token info (fees, curve params) by address |
arena_buy_cost |
Calculate $ARENA cost for a given buy amount (read-only) |
Polymarket (Polygon)
| Tool |
Description |
pm_search |
Search active Polymarket markets by keyword |
pm_market |
Get market details and outcome tokens by condition ID |
pm_positions |
Get Polymarket positions for a wallet |
pm_orderbook |
Get the order book for an outcome token |
pm_balances |
Get normalized collateral and outcome-token balances |
pm_order |
Get venue-truth order status and reconciliation |
pm_cancel_order |
Cancel an open Polymarket order |
pm_open_orders |
List open Polymarket orders |
pm_trades |
List recent Polymarket venue trades |
pm_approve |
Approve collateral spending for Polymarket on Polygon |
pm_preflight |
Run deterministic buy/sell/limit-sell preflight checks |
pm_buy |
Buy YES/NO shares with market or limit orders |
pm_sell |
Slippage-protected immediate YES/NO sell toward a target USDC proceeds amount |
pm_limit_sell |
Post or take a YES/NO limit sell depending on postOnly |
pm_reconcile |
Reconcile balances, positions, orders, and trades against venue truth |
pm_withdraw |
Withdraw Polygon USDC.e from the Polymarket wallet through the official Polymarket bridge |
pm_redeem |
Redeem winning positions from a resolved Polymarket market for USDC via the CTF contract |
Contract Interaction Helpers (v0.9.0)
| Tool |
Description |
approve_and_call |
Approve ERC-20 spending, then execute a follow-up contract call |
upgrade_proxy |
Upgrade a UUPS proxy via upgradeToAndCall |
Bridging & Cross-Chain
| Tool |
Description |
get_bridge_quote |
Get cross-chain bridge quote (Li.Fi) |
get_bridge_routes |
Get all bridge route options |
bridge_tokens |
Bridge tokens between chains |
check_bridge_status |
Poll cross-chain transfer status (PENDING/DONE/FAILED) |
fund_destination_gas |
Fund gas via Gas.zip |
Li.Fi Liquidity SDK (v0.8.0)
| Tool |
Description |
lifi_swap_quote |
Get same-chain DEX swap quote (31+ aggregators) |
lifi_swap |
Execute same-chain DEX swap |
lifi_get_tokens |
List tokens with prices on specified chains |
lifi_get_token |
Get specific token info (symbol, decimals, priceUSD) |
lifi_get_chains |
List all Li.Fi supported chains |
lifi_get_tools |
List available bridges and DEX aggregators |
lifi_gas_prices |
Get gas prices across all chains |
lifi_gas_suggestion |
Get gas suggestion for a specific chain |
lifi_get_connections |
Discover possible transfer paths between chains |
lifi_compose |
Cross-chain DeFi Composer (bridge + deposit into Morpho/Aave/Pendle/Lido/etc in one tx) |
lifi_swap and lifi_compose return execution envelopes with request, submission, verification, and warnings.
Platform CLI (requires platform-cli binary — go install github.com/ava-labs/platform-cli@latest)
| Tool |
Description |
platform_cli_available |
Check if platform-cli is installed |
subnet_create |
Create a new Avalanche subnet |
subnet_convert_l1 |
Convert subnet to L1 blockchain |
subnet_transfer_ownership |
Transfer subnet ownership |
add_validator |
Add validator with BLS keys to Primary Network |
l1_register_validator |
Register a new L1 validator |
l1_add_balance |
Add balance to L1 validator |
l1_disable_validator |
Disable an L1 validator |
node_info |
Get NodeID + BLS keys from running node |
pchain_send |
Send AVAX on P-Chain (P→P) |
dYdX v4 Perpetuals (v0.7.0 — requires mnemonic)
| Tool |
Description |
dydx_get_markets |
List all dYdX perpetual markets with prices/leverage |
dydx_has_market |
Check if a specific perp market exists (e.g. AKT-USD) |
dydx_get_balance |
Get USDC equity on dYdX subaccount |
dydx_get_positions |
Get all open perpetual positions |
dydx_place_market_order |
Place a market order (BUY/SELL) |
dydx_place_limit_order |
Place a limit order |
dydx_cancel_order |
Cancel an open order |
dydx_close_position |
Close position with reduce-only market order |
dydx_get_orders |
List orders (optionally filter by status) |
hyperliquid_get_markets |
List Hyperliquid perpetual markets |
hyperliquid_get_account_state |
Get Hyperliquid account summary |
hyperliquid_get_positions |
Get Hyperliquid open positions |
hyperliquid_place_market_order |
Place Hyperliquid market order |
hyperliquid_place_limit_order |
Place Hyperliquid limit order |
hyperliquid_cancel_order |
Cancel Hyperliquid order |
hyperliquid_close_position |
Close Hyperliquid position |
hyperliquid_get_order |
Get Hyperliquid order status |
hyperliquid_get_orders |
List Hyperliquid open orders |
hyperliquid_get_trades |
List Hyperliquid recent fills |
find_perp_market |
Search for a market across all connected perp venues |
Programmatic Usage
Check balance on Base
node -e "
const { Evalanche } = require('evalanche');
const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'base' });
agent.provider.getBalance(agent.address).then(b => {
const { formatEther } = require('ethers');
console.log(formatEther(b) + ' ETH');
});
"
Bridge tokens (Ethereum → Arbitrum)
node -e "
const { Evalanche } = require('evalanche');
const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'ethereum' });
agent.bridgeTokens({
fromChainId: 1, toChainId: 42161,
fromToken: '0x0000000000000000000000000000000000000000',
toToken: '0x0000000000000000000000000000000000000000',
fromAmount: '0.1', fromAddress: agent.address,
}).then(r => console.log('tx:', r.txHash));
"
Same-chain DEX swap (ETH → USDC on Base)
node -e "
const { Evalanche } = require('evalanche');
const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'base' });
agent.swap({
fromChainId: 8453, toChainId: 8453,
fromToken: '0x0000000000000000000000000000000000000000',
toToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
fromAmount: '0.05', fromAddress: agent.address,
}).then(r => console.log('swap tx:', r.txHash));
"
Track bridge transfer status
node -e "
const { Evalanche } = require('evalanche');
const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'ethereum' });
agent.checkBridgeStatus({ txHash: '0x...', fromChainId: 1, toChainId: 8453 })
.then(s => console.log(s.status, s.substatus));
"
Token discovery
node -e "
const { Evalanche } = require('evalanche');
const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'base' });
agent.getToken(8453, '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913')
.then(t => console.log(t.symbol, t.priceUSD));
"
Cross-chain transfer on Avalanche (requires mnemonic)
node -e "
const { Evalanche } = require('evalanche');
const agent = new Evalanche({ mnemonic: process.env.AGENT_MNEMONIC, multiVM: true });
agent.transfer({ from: 'C', to: 'P', amount: '25' })
.then(r => console.log('export:', r.exportTxId, 'import:', r.importTxId));
"
Key Concepts
ERC-8004 Agent Identity (Avalanche only)
- On-chain agent identity registry on Avalanche C-Chain
- Agent ID → tokenURI, owner, reputation score (0-100), trust level
- Trust levels: high (≥75), medium (≥40), low (<40)
Li.Fi Cross-Chain Liquidity (v0.8.0)
- Bridging: Aggregated routes across 27+ bridges (Across, Stargate, Hop, etc.)
- DEX Aggregation: Same-chain swaps via 31+ DEX aggregators (1inch, Paraswap, Jupiter, etc.)
- DeFi Composer: One-tx cross-chain DeFi (bridge + deposit into Morpho, Aave V3, Euler, Pendle, Lido wstETH, EtherFi, etc.)
- Status Tracking: Poll transfer status (PENDING → DONE/FAILED with substatus)
- Token Discovery: List/lookup tokens with prices across all chains
- Gas Pricing: Gas prices and suggestions per chain
- Uses Li.Fi REST API (no SDK dependency needed)
Gas.zip
- Cheap cross-chain gas funding
- Send gas to any destination chain via deposit addresses
x402 Payment Protocol
- HTTP 402 Payment Required → parse requirements → sign payment → retry
maxPayment prevents overspending
Multi-VM (Avalanche X-Chain, P-Chain)
- Requires mnemonic and
network: 'avalanche' or 'fuji'
- C-Chain: EVM (ethers v6), X-Chain: AVM (UTXO), P-Chain: PVM (staking)
Contracts
| Contract |
Address |
Chain |
| Identity Registry |
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 |
AVAX C-Chain (43114) |
| Reputation Registry |
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 |
AVAX C-Chain (43114) |
| sAVAX (Benqi) |
0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE |
AVAX C-Chain (43114) |
| yoUSD Vault |
0x0000000f2eb9f69274678c76222b35eec7588a65 |
Base (8453) |
DeFi — Liquid Staking & EIP-4626 Vaults (v1.2.0)
const { agent } = await Evalanche.boot({ network: 'avalanche' });
const { staking, vaults } = agent.defi();
// sAVAX unstake (instant if pool available, delayed otherwise)
const q = await staking.sAvaxUnstakeQuote('5');
// { avaxOut, isInstant, poolBalance, minOutput }
await staking.sAvaxUnstakeInstant('5'); // redeemInstant on Benqi
await staking.sAvaxUnstakeDelayed('5'); // requestRedeem (no pool needed)
// Stake AVAX → sAVAX
await staking.sAvaxStake('10', 50); // 50bps slippage
// EIP-4626 vault deposit (any chain)
const YOUSD = '0x0000000f2eb9f69274678c76222b35eec7588a65';
const baseAgent = new Evalanche({ privateKey: '0x...', network: 'base' });
const { vaults: baseVaults } = baseAgent.defi();
const info = await baseVaults.vaultInfo(YOUSD);
// { assetDecimals: 6, shareDecimals: 18, ... }
await baseVaults.deposit(YOUSD, '1000'); // approve + deposit
await baseVaults.withdraw(YOUSD, '998'); // redeem shares
MCP tools (defi):
savax_stake_quote, savax_stake, savax_unstake_quote, savax_unstake,
vault_info, vault_deposit_quote, vault_deposit, vault_withdraw_quote, vault_withdraw
Known DeFi routing behavior:
- yoUSD auto-routes to Base
- sAVAX auto-routes to Avalanche
- explicit wrong-chain overrides fail clearly before contract reads
- interoperable address inputs like
0x...@base are accepted for address-based DeFi tools
Live Smoke Checklist
Use docs/live-smoke-checklist.md as the release-certification runbook for:
- Polymarket tiny write + reconciliation
- Hyperliquid tiny trade + order verification
- LI.FI tiny swap/bridge execution + tx verification
- sAVAX / EIP-4626 tiny round-trip + balance/share verification
1---2name: evalanche3description: >4 Multi-EVM agent wallet SDK with onchain identity (ERC-8004), payment rails (x402),5 cross-chain liquidity (Li.Fi bridging + DEX aggregation + DeFi Composer), destination gas funding (Gas.zip),6 perpetual futures trading (dYdX v4), market intelligence (CoinGecko), prediction markets (Polymarket CLOB), and DeFi operations (liquid staking + EIP-4626 vaults).7 Supports 21+ EVM chains: Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, and more.8 Agents generate and manage their own keys — no human input required.9 Use when: booting an autonomous agent wallet on any EVM chain, sending tokens, calling contracts,10 resolving agent identity, checking reputation, making x402 payment-gated API calls,11 bridging tokens cross-chain (Li.Fi), same-chain DEX swaps (31+ aggregators via Li.Fi),12 one-click DeFi operations (Composer: bridge + deposit into Morpho/Aave/Pendle/Lido/etc),13 tracking cross-chain transfer status, discovering tokens and prices across chains,14 querying gas prices, finding available bridges and DEX aggregators,15 funding gas on destination chains (Gas.zip),16 cross-chain transfers (Avalanche C↔X↔P), delegating stake, querying validators, signing messages,17 creating subnets, managing L1 validators, adding validators with BLS keys, querying node info,18 trading perpetual futures on dYdX v4 (100+ markets), searching for perp markets across venues,19 querying CoinGecko market data, searching Polymarket markets and order books,20 buying or selling Polymarket outcome shares on Polygon,21 staking/unstaking sAVAX via Benqi, depositing/withdrawing from EIP-4626 vaults (yoUSD, Morpho, Aave, etc),22 and resolving known Avalanche/Base DeFi contracts with canonical chain routing or interoperable-address inputs.23 Don't use when: managing ENS (use moltbook scripts).24 Network: yes (EVM RPCs via Routescan + public fallbacks, dYdX Cosmos chain). Cost: gas fees per transaction.25metadata:26 source: https://skillmd.com/skills/jinhong270/evalanche27 openclaw:28 emoji: ⛓️29 homepage: https://github.com/iJaack/evalanche30 source: https://github.com/iJaack/evalanche31 requires:32 bins:33 - node34 env:35 - name: AGENT_PRIVATE_KEY36 description: Hex-encoded private key (EVM). Optional if using boot() or AGENT_MNEMONIC.37 required: false38 secret: true39 - name: AGENT_MNEMONIC40 description: BIP-39 mnemonic phrase (required for Avalanche multi-VM X/P-Chain). Optional if using boot() or AGENT_PRIVATE_KEY.41 required: false42 secret: true43 - name: AGENT_ID44 description: ERC-8004 agent token ID for identity resolution (Avalanche C-Chain only).45 required: false46 - name: AGENT_KEYSTORE_DIR47 description: "Directory for encrypted keystore in boot() mode. Default: ~/.evalanche/keys"48 required: false49 - name: AVALANCHE_NETWORK50 description: "EVM chain alias: 'ethereum', 'base', 'arbitrum', 'optimism', 'polygon', 'bsc', 'avalanche', 'fuji', etc. Default: avalanche."51 required: false52 - name: EVM_CHAIN53 description: Alias for AVALANCHE_NETWORK. EVM chain to connect to.54 required: false55 configPaths:56 - ~/.evalanche/keys/agent.json57 install:58 - id: node59 kind: node60 package: evalanche61 bins:62 - evalanche-mcp63 label: Install evalanche (npm)64---6566# Evalanche — Multi-EVM Agent Wallet6768Headless wallet SDK with ERC-8004 identity, x402 payments, Li.Fi cross-chain liquidity (bridging + DEX aggregation + DeFi Composer), Gas.zip gas funding, dYdX v4 perpetuals, CoinGecko market intelligence, Polymarket market discovery and execution, contract interaction helpers (approve-and-call + UUPS upgrade), and DeFi operations (liquid staking + EIP-4626 vaults). Works on 21+ EVM chains. Works as CLI or MCP server.6970**Source:** https://github.com/iJaack/evalanche71**License:** MIT7273## Supported Chains7475Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, Fantom, Gnosis, zkSync Era, Linea, Scroll, Blast, Mantle, Celo, Moonbeam, Cronos, Berachain, + testnets (Fuji, Sepolia, Base Sepolia).7677Routescan RPCs preferred where available, with public fallback RPCs.7879## Security Model8081### Key Storage & Encryption8283`Evalanche.boot()` manages keys autonomously with **encrypted-at-rest** storage:84851. **First run:** Generates a BIP-39 mnemonic via `ethers.HDNodeWallet.createRandom()`862. **Encryption:** AES-128-CTR + scrypt KDF (geth-compatible keystore format)873. **Password derivation:** 32-byte random entropy file via `crypto.randomBytes(32)`884. **File permissions:** chmod 0o600 (owner read/write only)895. **Storage location:** `~/.evalanche/keys/` by default9091### MCP Server Access Controls9293- **Stdio mode (default):** stdin/stdout only. No network exposure.94- **HTTP mode (`--http`):** localhost:3402 by default and requires `EVALANCHE_MCP_HTTP_TOKEN` (or `startHTTP({ authToken })`). Do not expose publicly without additional network controls.9596### OpenClaw External Secrets (Preferred when available)9798Priority: OpenClaw secrets → raw env vars → encrypted keystore.99100## Setup101102### 1. Install103```bash104npm install -g evalanche105```106107### 2. Boot on any chain108```javascript109import { Evalanche } from 'evalanche';110111// Base112const { agent } = await Evalanche.boot({ network: 'base' });113114// Ethereum115const { agent: eth } = await Evalanche.boot({ network: 'ethereum' });116117// Arbitrum118const { agent: arb } = await Avalanche.boot({ network: 'arbitrum' });119120// Avalanche (with identity)121const { agent: avax } = await Evalanche.boot({122 network: 'avalanche',123 identity: { agentId: '1599' },124});125```126127### 3. Run as MCP server128```bash129AVALANCHE_NETWORK=base evalanche-mcp130```131132## Available Tools (MCP)133134### Wallet135| Tool | Description |136|------|-------------|137| `get_address` | Get agent wallet address |138| `get_balance` | Get native token balance |139| `sign_message` | Sign arbitrary message |140| `send_avax` | Send native tokens |141| `call_contract` | Call a contract method |142143### Identity (ERC-8004)144| Tool | Description |145|------|-------------|146| `resolve_identity` | Resolve agent identity + reputation |147| `resolve_agent` | Look up any agent by ID |148149### Payments (x402)150| Tool | Description |151|------|-------------|152| `pay_and_fetch` | x402 payment-gated HTTP request |153154### Reputation155| Tool | Description |156|------|-------------|157| `submit_feedback` | Submit on-chain reputation feedback |158159### Network & Chains160| Tool | Description |161|------|-------------|162| `get_network` | Get current network config |163| `get_supported_chains` | List all 21+ supported chains |164| `get_chain_info` | Get details for a specific chain |165| `switch_network` | Switch to different EVM chain |166167### Arena DEX (Avalanche)168| Tool | Description |169|------|-------------|170| `arena_buy` | Buy Arena community tokens via bonding curve (spends $ARENA) |171| `arena_sell` | Sell Arena community tokens for $ARENA |172| `arena_token_info` | Get token info (fees, curve params) by address |173| `arena_buy_cost` | Calculate $ARENA cost for a given buy amount (read-only) |174175### Polymarket (Polygon)176| Tool | Description |177|------|-------------|178| `pm_search` | Search active Polymarket markets by keyword |179| `pm_market` | Get market details and outcome tokens by condition ID |180| `pm_positions` | Get Polymarket positions for a wallet |181| `pm_orderbook` | Get the order book for an outcome token |182| `pm_balances` | Get normalized collateral and outcome-token balances |183| `pm_order` | Get venue-truth order status and reconciliation |184| `pm_cancel_order` | Cancel an open Polymarket order |185| `pm_open_orders` | List open Polymarket orders |186| `pm_trades` | List recent Polymarket venue trades |187| `pm_approve` | Approve collateral spending for Polymarket on Polygon |188| `pm_preflight` | Run deterministic buy/sell/limit-sell preflight checks |189| `pm_buy` | Buy YES/NO shares with market or limit orders |190| `pm_sell` | Slippage-protected immediate YES/NO sell toward a target USDC proceeds amount |191| `pm_limit_sell` | Post or take a YES/NO limit sell depending on `postOnly` |192| `pm_reconcile` | Reconcile balances, positions, orders, and trades against venue truth |193| `pm_withdraw` | Withdraw Polygon USDC.e from the Polymarket wallet through the official Polymarket bridge |194| `pm_redeem` | Redeem winning positions from a resolved Polymarket market for USDC via the CTF contract |195196### Contract Interaction Helpers (v0.9.0)197| Tool | Description |198|------|-------------|199| `approve_and_call` | Approve ERC-20 spending, then execute a follow-up contract call |200| `upgrade_proxy` | Upgrade a UUPS proxy via `upgradeToAndCall` |201202### Bridging & Cross-Chain203| Tool | Description |204|------|-------------|205| `get_bridge_quote` | Get cross-chain bridge quote (Li.Fi) |206| `get_bridge_routes` | Get all bridge route options |207| `bridge_tokens` | Bridge tokens between chains |208| `check_bridge_status` | Poll cross-chain transfer status (PENDING/DONE/FAILED) |209| `fund_destination_gas` | Fund gas via Gas.zip |210211### Li.Fi Liquidity SDK (v0.8.0)212| Tool | Description |213|------|-------------|214| `lifi_swap_quote` | Get same-chain DEX swap quote (31+ aggregators) |215| `lifi_swap` | Execute same-chain DEX swap |216| `lifi_get_tokens` | List tokens with prices on specified chains |217| `lifi_get_token` | Get specific token info (symbol, decimals, priceUSD) |218| `lifi_get_chains` | List all Li.Fi supported chains |219| `lifi_get_tools` | List available bridges and DEX aggregators |220| `lifi_gas_prices` | Get gas prices across all chains |221| `lifi_gas_suggestion` | Get gas suggestion for a specific chain |222| `lifi_get_connections` | Discover possible transfer paths between chains |223| `lifi_compose` | Cross-chain DeFi Composer (bridge + deposit into Morpho/Aave/Pendle/Lido/etc in one tx) |224225`lifi_swap` and `lifi_compose` return execution envelopes with `request`, `submission`, `verification`, and `warnings`.226227### Platform CLI (requires `platform-cli` binary — `go install github.com/ava-labs/platform-cli@latest`)228| Tool | Description |229|------|-------------|230| `platform_cli_available` | Check if platform-cli is installed |231| `subnet_create` | Create a new Avalanche subnet |232| `subnet_convert_l1` | Convert subnet to L1 blockchain |233| `subnet_transfer_ownership` | Transfer subnet ownership |234| `add_validator` | Add validator with BLS keys to Primary Network |235| `l1_register_validator` | Register a new L1 validator |236| `l1_add_balance` | Add balance to L1 validator |237| `l1_disable_validator` | Disable an L1 validator |238| `node_info` | Get NodeID + BLS keys from running node |239| `pchain_send` | Send AVAX on P-Chain (P→P) |240241### dYdX v4 Perpetuals (v0.7.0 — requires mnemonic)242| Tool | Description |243|------|-------------|244| `dydx_get_markets` | List all dYdX perpetual markets with prices/leverage |245| `dydx_has_market` | Check if a specific perp market exists (e.g. AKT-USD) |246| `dydx_get_balance` | Get USDC equity on dYdX subaccount |247| `dydx_get_positions` | Get all open perpetual positions |248| `dydx_place_market_order` | Place a market order (BUY/SELL) |249| `dydx_place_limit_order` | Place a limit order |250| `dydx_cancel_order` | Cancel an open order |251| `dydx_close_position` | Close position with reduce-only market order |252| `dydx_get_orders` | List orders (optionally filter by status) |253| `hyperliquid_get_markets` | List Hyperliquid perpetual markets |254| `hyperliquid_get_account_state` | Get Hyperliquid account summary |255| `hyperliquid_get_positions` | Get Hyperliquid open positions |256| `hyperliquid_place_market_order` | Place Hyperliquid market order |257| `hyperliquid_place_limit_order` | Place Hyperliquid limit order |258| `hyperliquid_cancel_order` | Cancel Hyperliquid order |259| `hyperliquid_close_position` | Close Hyperliquid position |260| `hyperliquid_get_order` | Get Hyperliquid order status |261| `hyperliquid_get_orders` | List Hyperliquid open orders |262| `hyperliquid_get_trades` | List Hyperliquid recent fills |263| `find_perp_market` | Search for a market across all connected perp venues |264265## Programmatic Usage266267### Check balance on Base268```bash269node -e "270const { Evalanche } = require('evalanche');271const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'base' });272agent.provider.getBalance(agent.address).then(b => {273 const { formatEther } = require('ethers');274 console.log(formatEther(b) + ' ETH');275});276"277```278279### Bridge tokens (Ethereum → Arbitrum)280```bash281node -e "282const { Evalanche } = require('evalanche');283const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'ethereum' });284agent.bridgeTokens({285 fromChainId: 1, toChainId: 42161,286 fromToken: '0x0000000000000000000000000000000000000000',287 toToken: '0x0000000000000000000000000000000000000000',288 fromAmount: '0.1', fromAddress: agent.address,289}).then(r => console.log('tx:', r.txHash));290"291```292293### Same-chain DEX swap (ETH → USDC on Base)294```bash295node -e "296const { Evalanche } = require('evalanche');297const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'base' });298agent.swap({299 fromChainId: 8453, toChainId: 8453,300 fromToken: '0x0000000000000000000000000000000000000000',301 toToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',302 fromAmount: '0.05', fromAddress: agent.address,303}).then(r => console.log('swap tx:', r.txHash));304"305```306307### Track bridge transfer status308```bash309node -e "310const { Evalanche } = require('evalanche');311const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'ethereum' });312agent.checkBridgeStatus({ txHash: '0x...', fromChainId: 1, toChainId: 8453 })313 .then(s => console.log(s.status, s.substatus));314"315```316317### Token discovery318```bash319node -e "320const { Evalanche } = require('evalanche');321const agent = new Evalanche({ privateKey: process.env.AGENT_PRIVATE_KEY, network: 'base' });322agent.getToken(8453, '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913')323 .then(t => console.log(t.symbol, t.priceUSD));324"325```326327### Cross-chain transfer on Avalanche (requires mnemonic)328```bash329node -e "330const { Evalanche } = require('evalanche');331const agent = new Evalanche({ mnemonic: process.env.AGENT_MNEMONIC, multiVM: true });332agent.transfer({ from: 'C', to: 'P', amount: '25' })333 .then(r => console.log('export:', r.exportTxId, 'import:', r.importTxId));334"335```336337## Key Concepts338339### ERC-8004 Agent Identity (Avalanche only)340- On-chain agent identity registry on Avalanche C-Chain341- Agent ID → tokenURI, owner, reputation score (0-100), trust level342- Trust levels: **high** (≥75), **medium** (≥40), **low** (<40)343344### Li.Fi Cross-Chain Liquidity (v0.8.0)345- **Bridging:** Aggregated routes across 27+ bridges (Across, Stargate, Hop, etc.)346- **DEX Aggregation:** Same-chain swaps via 31+ DEX aggregators (1inch, Paraswap, Jupiter, etc.)347- **DeFi Composer:** One-tx cross-chain DeFi (bridge + deposit into Morpho, Aave V3, Euler, Pendle, Lido wstETH, EtherFi, etc.)348- **Status Tracking:** Poll transfer status (PENDING → DONE/FAILED with substatus)349- **Token Discovery:** List/lookup tokens with prices across all chains350- **Gas Pricing:** Gas prices and suggestions per chain351- Uses Li.Fi REST API (no SDK dependency needed)352353### Gas.zip354- Cheap cross-chain gas funding355- Send gas to any destination chain via deposit addresses356357### x402 Payment Protocol358- HTTP 402 Payment Required → parse requirements → sign payment → retry359- `maxPayment` prevents overspending360361### Multi-VM (Avalanche X-Chain, P-Chain)362- Requires **mnemonic** and `network: 'avalanche'` or `'fuji'`363- C-Chain: EVM (ethers v6), X-Chain: AVM (UTXO), P-Chain: PVM (staking)364365## Contracts366367| Contract | Address | Chain |368|----------|---------|-------|369| Identity Registry | `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` | AVAX C-Chain (43114) |370| Reputation Registry | `0x8004BAa17C55a88189AE136b182e5fdA19dE9b63` | AVAX C-Chain (43114) |371| sAVAX (Benqi) | `0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE` | AVAX C-Chain (43114) |372| yoUSD Vault | `0x0000000f2eb9f69274678c76222b35eec7588a65` | Base (8453) |373374### DeFi — Liquid Staking & EIP-4626 Vaults (v1.2.0)375376```javascript377const { agent } = await Evalanche.boot({ network: 'avalanche' });378const { staking, vaults } = agent.defi();379380// sAVAX unstake (instant if pool available, delayed otherwise)381const q = await staking.sAvaxUnstakeQuote('5');382// { avaxOut, isInstant, poolBalance, minOutput }383await staking.sAvaxUnstakeInstant('5'); // redeemInstant on Benqi384await staking.sAvaxUnstakeDelayed('5'); // requestRedeem (no pool needed)385386// Stake AVAX → sAVAX387await staking.sAvaxStake('10', 50); // 50bps slippage388389// EIP-4626 vault deposit (any chain)390const YOUSD = '0x0000000f2eb9f69274678c76222b35eec7588a65';391const baseAgent = new Evalanche({ privateKey: '0x...', network: 'base' });392const { vaults: baseVaults } = baseAgent.defi();393const info = await baseVaults.vaultInfo(YOUSD);394// { assetDecimals: 6, shareDecimals: 18, ... }395await baseVaults.deposit(YOUSD, '1000'); // approve + deposit396await baseVaults.withdraw(YOUSD, '998'); // redeem shares397```398399**MCP tools (defi):**400`savax_stake_quote`, `savax_stake`, `savax_unstake_quote`, `savax_unstake`,401`vault_info`, `vault_deposit_quote`, `vault_deposit`, `vault_withdraw_quote`, `vault_withdraw`402403Known DeFi routing behavior:404- yoUSD auto-routes to Base405- sAVAX auto-routes to Avalanche406- explicit wrong-chain overrides fail clearly before contract reads407- interoperable address inputs like `0x...@base` are accepted for address-based DeFi tools408409### Live Smoke Checklist410411Use [docs/live-smoke-checklist.md](/Users/jaack/Desktop/Github/evalanche/docs/live-smoke-checklist.md) as the release-certification runbook for:412- Polymarket tiny write + reconciliation413- Hyperliquid tiny trade + order verification414- LI.FI tiny swap/bridge execution + tx verification415- sAVAX / EIP-4626 tiny round-trip + balance/share verification