Cancels a specified transaction from a developer-controlled wallet. Gas fees may still be incurred.
This is a best-effort operation, it won't be effective if the original transaction has already been processed by the blockchain.
Represents the input parameters for cancelling a transaction.
The ID of the transaction to be cancelled.
The optional idempotency key. An idempotency key is a unique identifier used to identify and handle duplicate requests in order to ensure idempotent behavior, where multiple identical requests have the same effect as a single request.
We will generate one if you do not provide it.
1const response = await client.cancelTransaction({
2 id: "transaction-id",
3})
4console.log(response.data)
1{
2 "data": {
3 "id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
4 "state": "CANCELLED"
5 }
6}