Token Requests
Token requests enable the output-first model for crosschain transactions. Instead of specifying which tokens to spend (input), you specify what tokens you need to receive (output). The orchestrator automatically finds the optimal route to deliver those tokens.
Why output-first?
Traditional blockchain transactions require you to:
- Know exactly which token to spend
- Calculate swap rates and slippage
- Handle bridging between chains
- Manage gas tokens on each chain
With token requests, you simply say "I need 100 USDC on Base" and the orchestrator handles everything else.
Benefits
- Simpler UX - Users don't need to think about routing or bridging
- Optimal routing - Orchestrator finds the cheapest path across all chains
- Flexible funding - Uses whatever assets the user has available
- Single signature - User signs once with their passkey
Using token requests
Add tokenRequests to your sendCalls to specify what tokens you need:
How it works
When you include tokenRequests:
- Orchestrator analyzes the user's balances across all supported chains
- Finds optimal route - cheapest combination of bridges and swaps
- Executes atomically - bridging, swapping, and your calls all succeed or fail together
- Delivers tokens - the requested tokens arrive on the target chain before your calls execute
TokenRequest object
| Field | Type | Description |
|---|---|---|
token | string | ERC-20 token contract address on the target chain |
amount | bigint | Amount in base units (e.g., parseUnits('100', 6) for 100 USDC) |
Multiple token requests
You can request multiple tokens in a single transaction:
sendCalls({
calls: [{ to: '0x...', data: '0x...' }],
chainId: 8453,
tokenRequests: [
{
token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC
amount: parseUnits('100', 6),
},
{
token: '0x4200000000000000000000000000000000000006', // WETH
amount: parseUnits('0.05', 18),
},
],
})Common use cases
E-commerce checkout
User wants to buy an item priced in USDC, but only has ETH on mainnet:
sendCalls({
calls: [{
to: SHOP_CONTRACT,
data: encodeFunctionData({
abi: shopAbi,
functionName: 'purchase',
args: [itemId],
}),
}],
chainId: 8453, // Shop is on Base
tokenRequests: [{
token: USDC_BASE,
amount: parseUnits('29.99', 6), // Item price
}],
})DeFi interactions
Provide liquidity with tokens from any chain:
sendCalls({
calls: [{
to: LP_CONTRACT,
data: encodeFunctionData({
abi: lpAbi,
functionName: 'addLiquidity',
args: [amount0, amount1],
}),
}],
chainId: 42161, // Arbitrum
tokenRequests: [
{ token: USDC_ARB, amount: parseUnits('1000', 6) },
{ token: WETH_ARB, amount: parseUnits('0.5', 18) },
],
})NFT minting
Mint an NFT with payment in any token:
sendCalls({
calls: [{
to: NFT_CONTRACT,
data: encodeFunctionData({
abi: nftAbi,
functionName: 'mint',
args: [tokenId],
}),
}],
chainId: 8453,
tokenRequests: [{
token: USDC_BASE,
amount: parseUnits('0.5', 6), // Mint price
}],
})Next steps
- Crosschain - Back to crosschain overview
- Batch Transactions - Combine multiple operations