API integration
Intents API allows you to perform cross-chain deposits across all Supported Chains.
You'll need to reference supported assets by their IDs, then request a quote that generates a deposited address to which the requested funds need to be transferred. After that, the swap will be processed, and the destination asset will land in the recipient's account.
1
Get supported tokens
Use Get supported tokens to find the assetId values you will need.
curl "https://intents-api.aurora.dev/api/tokens/${appKey}"const response = await fetch(`https://intents-api.aurora.dev/api/tokens/${appKey}`);
const tokens = await response.json();2
Request a quote
Use Request a quote with your desired parameters
curl -X POST "https://intents-api.aurora.dev/api/tokens/${appKey}" \
-H "Content-Type: application/json" \
-d '{
"dry": false,
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:wrap.near",
"depositType": "ORIGIN_CHAIN",
"destinationAsset": "nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near",
"amount": "100000000000000000000000",
"recipient": "0xYourArbitrumAddress",
"recipientType": "DESTINATION_CHAIN",
"refundTo": "your-account.near",
"refundType": "ORIGIN_CHAIN",
"deadline": "2025-01-01T00:00:00.000Z"
}'const quote = await fetch(`https://intents-api.aurora.dev/api/tokens/${appKey}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
dry: false,
swapType: 'EXACT_INPUT',
slippageTolerance: 100,
originAsset: 'nep141:wrap.near',
depositType: 'ORIGIN_CHAIN',
destinationAsset: 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
amount: '100000000000000000000000',
recipient: '0xYourArbitrumAddress',
recipientType: 'DESTINATION_CHAIN',
refundTo: 'your-account.near',
refundType: 'ORIGIN_CHAIN',
deadline: new Date(Date.now() + 3 * 60 * 1000).toISOString()
})
});
const result = await quote.json();3
4
Monitor the swap
Use Get transactions history for your account to monitor the status of the swap.
curl "https://intents-api.aurora.dev/api/transactions/${appKey}?walletAddress=${walletAddress}"const response = await fetch(`https://intents-api.aurora.dev/api/transactions/${appKey}`);
const tokens = await response.json();Last updated
