CLI tool to generate and replay intents on the Rhinestone Orchestrator.
pnpm i
cp .env.example .envSet the API key for your target environment in .env. The owner private key is used for signing and can be any valid private key.
| Variable | Description |
|---|---|
OWNER_PRIVATE_KEY |
Private key for signing intents |
PROD_API_KEY |
API key for prod orchestrator |
DEV_API_KEY |
API key for dev orchestrator |
LOCAL_API_KEY |
API key for local orchestrator |
DEFAULT_TOKEN_RECIPIENT |
Default recipient address (falls back to owner) |
LOCAL_TESTNET |
Set to true to enable local testnet funding |
Prints the smart account address.
Shows token balances across all supported chains.
Interactive CLI to create, save, and execute a new intent.
Replay saved intents from the intents/ directory.
| Option | Description |
|---|---|
filename |
Replay a specific file (.json extension optional) |
--all |
Replay all intents without prompting |
--env <prod|dev|local> |
Set environment |
--mode <execute|simulate|route> |
Set execution mode |
--async [delay] |
Run in parallel with optional delay in ms (default: 2500) |
--verbose |
Print all returned routes after transaction preparation |
--quote <best|<layer>|interactive> |
Pick the route to sign. Defaults to best. Pass a settlement layer name (e.g. ECO, ACROSS, RELAY) to force that layer, or interactive to choose from a list (incompatible with --async). |
Examples:
pnpm replay # interactive
pnpm replay my-intent --env prod --mode execute # specific file
pnpm replay --all --env dev --async 3000 # all, parallel
pnpm replay my-intent --quote ECO # force ECO settlement
pnpm replay my-intent --quote interactive # pick from a listIntents are stored in intents/*.json. A file contains either a single intent object or { "intentList": [...] }.
| Field | Type | Required | Description |
|---|---|---|---|
targetChain |
string |
yes | Target chain name (e.g. "ArbitrumOne", "Base") |
targetTokens |
{ symbol, amount? }[] |
yes | Tokens to receive on target chain |
sourceChains |
string[] |
yes | Source chain names (can be empty for auto-routing) |
sourceTokens |
string[] | object[] |
yes | Source tokens (symbols or { chain, address, amount } objects) |
tokenRecipient |
string |
yes | Address to receive tokens on target chain |
settlementLayers |
string[] |
yes | Settlement layers ("ACROSS", "ECO", "RELAY", or []) |
sponsored |
boolean |
yes | Whether the intent is sponsored |
sourceAssets |
see below | no | Source asset configuration (overrides sourceTokens for routing) |
recipient |
string |
no | Recipient address for the orchestrator |
feeAsset |
string |
no | Fee token symbol or address (e.g. "USDC") |
destinationOps |
boolean |
no | Whether to include target chain executions (default: true) |
auxiliaryFunds |
Record<chain, Record<token, amount>> |
no | Off-chain balances for route-finding |
Three formats are supported:
Simple token list (same tokens across all source chains):
"sourceAssets": ["WETH", "USDC"]Per-chain token map (different tokens per chain):
"sourceAssets": { "Base": ["WETH", "USDC"], "ArbitrumOne": ["USDC"] }Exact inputs with amounts:
"sourceAssets": [{ "chain": "Base", "token": "WETH", "amount": "0.001" }]Specifies off-chain balances (e.g. exchange accounts) that the route-finder can consider. Uses human-readable chain names. Token keys must be addresses (not symbols) since the SDK requires addresses here; decimals are read from the chain.
"auxiliaryFunds": {
"ArbitrumOne": { "0xaf88d065e77c8cC2239327C5EDb3A432268e5831": "500" },
"Base": { "0x4200000000000000000000000000000000000006": "0.5" }
}{
"intentList": [{
"targetChain": "ArbitrumOne",
"targetTokens": [{ "symbol": "WETH", "amount": "0.001" }],
"sourceChains": ["Base"],
"sourceTokens": [],
"sourceAssets": { "Base": ["WETH", "USDC"] },
"tokenRecipient": "0x...",
"recipient": "0x...",
"settlementLayers": ["ACROSS"],
"sponsored": false,
"feeAsset": "USDC",
"auxiliaryFunds": { "ArbitrumOne": { "0xaf88d065e77c8cC2239327C5EDb3A432268e5831": "500" } }
}]
}