Pay out in any asset
Add dest to the single output when the recipient should receive an asset other
than direct USDC. Supply live destination metadata from the same source that powers your asset
picker; do not hardcode a menu of supported destination assets.
import { parseUsdc, type QuoteRequest, type SilentSwapClient } from '@silentswap/sdk';
declare const client: SilentSwapClient;
const payout: QuoteRequest = {
privacy: true,
inputAddress: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8',
sourceAsset: 'USDC',
sourceChainId: 56,
outputs: [{
address: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
chainId: 1,
amount: parseUsdc('50'),
dest: {
kind: 'evm',
chainId: 1,
assetId: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
assetSymbol: 'WETH',
assetDecimals: 18,
slippageBps: 100,
},
}],
};
const quote = await client.quote(payout);
if (quote.dest) {
console.log('Minimum received', quote.dest.minDestAmount, quote.dest.assetSymbol);
}
// Render every output, asset, fee, and expiry in trusted UI before this line.
const order = await client.placeOrder(quote);
void order;This route accepts exactly one recipient, and dest.chainId must equal
outputs[0].chainId. Display quote.dest.minDestAmount as “minimum
received” in the destination asset's smallest units, formatted with its live decimals. The
USDC-in outputs[0].amount must be at least 10 USDC.
The available destination assets are operator-controlled. If arbitrary output is disabled,
order creation rejects with arbitrary_dest_disabled. See quotes for
the full destination-intent shape.
Render all outputs, assets, fees, and expiry in trusted UI before calling
placeOrder.