Skip to main content
POST
/
v1
/
withdraw
Submit signed burn intents for withdrawal
curl --request POST \
  --url https://xreserve-api-testnet.circle.com/v1/withdraw \
  --header 'Content-Type: application/json' \
  --data '
{
  "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"
            }
          }
        }
      ],
      "burnSignatures": [
        "<string>"
      ],
      "burnTxId": "<string>",
      "useCircleForwarding": true
    }
  ]
}
'
[
  {
    "withdrawalId": "6149dc3d-71bf-4d57-8cc1-5e2d4c0a8e70",
    "burnTxId": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
    "status": "created",
    "useCircleForwarding": true,
    "transferSpecHashes": [
      "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
    ],
    "attestationPayload": "<string>",
    "attestation": "<string>",
    "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "failureReason": "verification_failed"
  }
]

Body

application/json

Contains signed burn intents to submit for withdrawal.

batches
object[]
required

Array of burn intent batches to submit, up to five per request.

Required array length: 1 - 5 elements

Response

Successfully created withdrawal records.

withdrawalId
string<uuid>
required

The unique identifier of the withdrawal group.

Example:

"6149dc3d-71bf-4d57-8cc1-5e2d4c0a8e70"

burnTxId
string
required

The transaction ID of the burn on the remote network.

Example:

"0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"

status
enum<string>
required

The status of the withdrawal.

  • 'created': The withdrawal has been created but the burn transaction on the remote network has not been verified yet.
  • 'verified': The burn transaction on the remote network has been successfully verified. The attestation is available but has been submitted on chain yet.
  • 'confirmed': The attestation has been submitted onchain but the transaction has not been finalized yet.
  • 'finalized': The transaction has been successfully finalized. This state is terminal.
  • 'expired': The attestation expired before it was used. This state is terminal and can be retried.
  • 'failed': The verification failed. The withdrawal cannot proceed. This state is terminal and cannot be retried.
Available options:
created,
verified,
confirmed,
finalized,
expired,
failed
useCircleForwarding
boolean
required

Indicates whether Circle should forward the transaction and release funds on either a CCTP supported blockchain or another remote blockchain.

Example:

true

transferSpecHashes
string[]
required

List of transfer specification hashes for all withdrawal intents in the group.

Example:
[
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
]
attestationPayload
string

The full attestation payload.

attestation
string

The xReserve attestation signature.

transactionHash
string

The hash of forwarded transaction.

Example:

"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

failureReason
string

The reason for failure. Returned when the status is 'failed'.

Example:

"verification_failed"