curl --request POST \
--url https://xreserve-api-testnet.circle.com/v1/prepare-withdrawal \
--header 'Content-Type: application/json' \
--data '
{
"batches": [
{
"token": "USDC",
"remoteDomain": 2,
"remoteDepositor": "<string>",
"finalDestinationDomain": 1,
"finalDestinationRecipient": "<string>",
"useCircleForwarding": true,
"valueExcludingFees": "10.00",
"valueIncludingFees": "10.00",
"finalDestinationCaller": "<string>",
"salt": "<string>",
"forwardingOptions": {
"maxFee": "<string>",
"hookData": "<string>",
"usesFastFinality": true
}
}
]
}
'{
"batches": [
{
"burnIntents": [
{
"maxBlockHeight": "1000000",
"maxFee": "100000",
"spec": {
"version": 1,
"sourceDomain": 0,
"destinationDomain": 1,
"sourceContract": "0x000000000000000000000000a0b86a33e6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6",
"destinationContract": "0x000000000000000000000000b1c97a44e7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7",
"sourceToken": "0x000000000000000000000000c2d8b55f8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c",
"destinationToken": "0x000000000000000000000000d3e9c66f9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d",
"sourceDepositor": "0x000000000000000000000000e4fad77fadadadadadadadadadadadadadadadad",
"destinationRecipient": "0x000000000000000000000000f5abc88abebebebebebebebebebebebebebebebe",
"sourceSigner": "0x000000000000000000000000a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
"destinationCaller": "0x000000000000000000000000b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1",
"value": "1000000",
"salt": "0xc3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4",
"hookData": {
"remoteDomain": 10001,
"remoteDepositor": "0x000000000000000000000000a0b86a33e6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6",
"remoteToken": "0x000000000000000000000000b1c97a44e7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7",
"forwardingContractAddress": "0x0000000000000000000000000000000000000000",
"forwardingCalldata": "0x"
}
}
}
],
"encoded": "<string>",
"messageHashToSign": "<string>"
}
]
}Turns the user’s burn transaction data on the remote chain into fully encoded burn intents to send to the /withdraw endpoint. This endpoint performs the following:
maxBlockHeight and maxFee values with safety buffers.Note: The /withdraw endpoint requires signatures and the remote chain burnTxId in addition to the burn intent prepared by this endpoint.
curl --request POST \
--url https://xreserve-api-testnet.circle.com/v1/prepare-withdrawal \
--header 'Content-Type: application/json' \
--data '
{
"batches": [
{
"token": "USDC",
"remoteDomain": 2,
"remoteDepositor": "<string>",
"finalDestinationDomain": 1,
"finalDestinationRecipient": "<string>",
"useCircleForwarding": true,
"valueExcludingFees": "10.00",
"valueIncludingFees": "10.00",
"finalDestinationCaller": "<string>",
"salt": "<string>",
"forwardingOptions": {
"maxFee": "<string>",
"hookData": "<string>",
"usesFastFinality": true
}
}
]
}
'{
"batches": [
{
"burnIntents": [
{
"maxBlockHeight": "1000000",
"maxFee": "100000",
"spec": {
"version": 1,
"sourceDomain": 0,
"destinationDomain": 1,
"sourceContract": "0x000000000000000000000000a0b86a33e6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6",
"destinationContract": "0x000000000000000000000000b1c97a44e7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7",
"sourceToken": "0x000000000000000000000000c2d8b55f8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c",
"destinationToken": "0x000000000000000000000000d3e9c66f9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d",
"sourceDepositor": "0x000000000000000000000000e4fad77fadadadadadadadadadadadadadadadad",
"destinationRecipient": "0x000000000000000000000000f5abc88abebebebebebebebebebebebebebebebe",
"sourceSigner": "0x000000000000000000000000a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
"destinationCaller": "0x000000000000000000000000b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1",
"value": "1000000",
"salt": "0xc3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4",
"hookData": {
"remoteDomain": 10001,
"remoteDepositor": "0x000000000000000000000000a0b86a33e6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6",
"remoteToken": "0x000000000000000000000000b1c97a44e7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7",
"forwardingContractAddress": "0x0000000000000000000000000000000000000000",
"forwardingCalldata": "0x"
}
}
}
],
"encoded": "<string>",
"messageHashToSign": "<string>"
}
]
}Contains data that prepares burn intents for withdrawal.
Array of burn intent batches.
Show child attributes
Symbol of the token to transfer.
USDC The remote domain ID. Typically greater than 10000. Must be different from finalDestinationDomain.
x >= 1The remote depositor address as a 32-byte hexadecimal string. This address initiated the withdrawal on the remote chain.
The destination domain where forwarded funds are withdrawn, either a CCTP supported domain or another remote domain. Must be different from remoteDomain.
x >= 0The recipient address on the final destination domain as a 32-byte hexadecimal string.
Indicates whether Circle should forward the transaction and release funds on either a CCTP supported blockchain or another remote blockchain.
Crosschain transfer amount excluding fees, in decimal string formatting. Pass either this field or valueIncludingFees, but not both.
"10.00"
Crosschain transfer amount including fees, in decimal string formatting. Pass either this field or valueExcludingFees, but not both.
"10.00"
Authorized caller address on the final destination chain as a 32-byte hexadecimal string. If this field is present, the caller must be this address.
A salt that is used to ensure uniqueness in the burn intent as a 32-byte hexadecimal string. If omitted, this field is randomly generated.
Options for forwarding the transaction.
Show child attributes
Maximum fee for redeposits or CCTP forwarding. This required fee is in addition to the burnIntent.maxFee.
Optional hook data for forwarding, in hexadecimal format.
Indicates whether to use fast finality. Required for CCTP forwarding.
Successfully prepared burn intents ready for withdrawal.
Contains prepared burn intents.
List of prepared burn intents.
Show child attributes
Show child attributes
The maximum block height at which the burn intent is valid.
"1000000"
The maximum fee allowed for the burn intent in the smallest token unit.
"100000"
Contains transfer specifications for a withdrawal.
Show child attributes
Transfer specification version.
1
Source domain ID.
0
Destination domain ID.
1
Source contract address as a 32-byte hexadecimal string.
"0x000000000000000000000000a0b86a33e6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6"
Destination contract address as a 32-byte hexadecimal string.
"0x000000000000000000000000b1c97a44e7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7"
Source token address as a 32-byte hexadecimal string.
"0x000000000000000000000000c2d8b55f8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c"
Destination token address as a 32-byte hexadecimal string.
"0x000000000000000000000000d3e9c66f9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d9d"
Source depositor address as a 32-byte hexadecimal string.
"0x000000000000000000000000e4fad77fadadadadadadadadadadadadadadadad"
Destination recipient address as a 32-byte hexadecimal string.
"0x000000000000000000000000f5abc88abebebebebebebebebebebebebebebebe"
Source signer address as a 32-byte hexadecimal string.
"0x000000000000000000000000a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
Destination caller address as a 32-byte hexadecimal string.
"0x000000000000000000000000b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1"
The transfer amount in the smallest token unit.
"1000000"
Random salt that ensures uniqueness as a 32-byte hexadecimal string.
"0xc3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4"
Contains structured hook data for withdrawals, including forwarding and remote chain information.
Show child attributes
Remote chain domain identifier.
10001
Remote depositor address as a 32-byte hexadecimal string.
"0x000000000000000000000000a0b86a33e6b6b6b6b6b6b6b6b6b6b6b6b6b6b6b6"
Remote token address as a 32-byte hexadecimal string.
"0x000000000000000000000000b1c97a44e7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7"
Forwarding contract address as a 20-byte hexadecimal string. If you are not forwarding funds, set to 0x0.
"0x0000000000000000000000000000000000000000"
Forwarding call data. If you are forwarding funds, set to 0x + a 4-byte function selector + optional data. If not forwarding, set to 0x.
"0x"
Encoded burn intent data
The message hash to sign before submitting the withdrawal request.
Was this page helpful?