Confidential Swaps
Confidential Swaps route your swap through a private shard of NEAR. The origin wallet and the routing trail are hidden from the outside world. The destination transaction settles publicly as normal.
There is no separate API and no new integration. If you have already called the Swap API Reference, you enable confidentiality by enabling confidentiality mode in the quote request.
Get your API key
Navigate to Widget Studio and generate an API key. Confidential Swaps use the same key as your standard swaps.
Request a confidential quote
Call the quote endpoint exactly as you do today, then add confidentiality: "advanced" to the request body. Everything else stays the same.
curl -X POST https://intents-api.aurora.dev/api/quote/${API_KEY} \
-H "Content-Type: application/json" \
-d '{
"dry": false,
"confidentiality": "advanced",
"swapType": "EXACT_INPUT",
"amount": "1000000",
"originAsset": "<originAssetId>",
"destinationAsset": "<destinationAssetId>",
"depositType": "ORIGIN_CHAIN",
"recipient": "<recipientAddress>",
"recipientType": "DESTINATION_CHAIN",
"refundTo": "<refundAddress>",
"refundType": "ORIGIN_CHAIN",
"slippageTolerance": 100,
"deadline": "2026-07-06T12:00:00.000Z"
}'Or in JavaScript:
const res = await fetch(
`https://intents-api.aurora.dev/api/quote/${API_KEY}`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
dry: false,
confidentiality: "advanced",
swapType: "EXACT_INPUT",
amount: "1000000",
originAsset: originAssetId,
destinationAsset: destinationAssetId,
depositType: "ORIGIN_CHAIN",
recipient: recipientAddress,
recipientType: "DESTINATION_CHAIN",
refundTo: refundAddress,
refundType: "ORIGIN_CHAIN",
slippageTolerance: 100,
deadline: new Date(Date.now() + 10 * 60_000).toISOString(),
}),
}
);
const { quote } = await res.json();
// quote.depositAddress is the confidential deposit addressDeposit and complete the swap
The response returns a depositAddress as usual. Send the origin asset to that address, then poll for status with Get swap status. The flow is identical to a standard swap.
// Notify the API after depositing to speed up processing
await fetch(`https://intents-api.aurora.dev/api/status/${API_KEY}?depositAddress=0x76b4c56085ED136a8744D52bE956396624a730E8`, {
method: "POST",
});
// Poll until terminal: SUCCESS, FAILED, REFUNDEDThat is it
The only difference from a standard swap is the confidentiality mode. Deposit addresses, status polling, refunds, and your configured fees all behave exactly as they do today.
(Optional) Read Confidential Intents balance
Use Authenticate user with signed data to authenticate your account and read your balance using Get user token balances.
Last updated
