POST request containing the transaction’s chainId and txHash.
Get status
API Reference: Get Status The status endpoint supports three query parameters:| Parameter | Description |
|---|---|
chainId | Source chain ID of the transaction |
txHash | Source or destination transaction hash |
txId | Unique identifier applied to each transaction by the Swaps protocol |
TxDetails object.
Register transaction
API Reference: Register Transaction Registering a transaction triggers indexing after it is broadcasted on the source chain. This is required for any transactions that return analt-vm-* bridge ID in the Action Response. The Action Response also includes a requiresRegisterTx flag. The request used to generate the transaction will return a vmId in the response. If the vmId is alt-vm or solana, you know you will need to register your transaction. This is covered in the alt VM broadcast guide. Swaps will automatically register any transaction submitted to a named VM. If you believe we have missed a transaction, calling the register transaction endpoint will trigger indexing.
This endpoint does support registering multiple transactions in a single call.
| Parameter | Description |
|---|---|
txId | The transaction ID from the action response. |
chainId | The source chain ID where the transaction originated. |
txHash | The transaction hash from the source chain. |
vmId | The virtual machine ID associated with the bridge. For alt-vm-\* bridge IDs, use alt-vm. For all other bridges, use the vmId returned in the action response. |
Webhooks
Swaps can emit webhooks on transaction creation and completion (success or failure) events. To use webhooks, please register a webhook URL in the developer console. Webhook URLs should correspond to a certain API key — each API key represents a uniqueappId. Each appId can have its own webhook URL.
Swaps’ webhooks are sent with a x-signature-256 header that hashes the raw request body and delivery timestamp. This signature ensures that neither the request body nor the timestamp were modified and can be trusted as sent from Swaps.
The webhook body mirrors the TxDetails object returned from the /getStatus endpoint. The schema is: