curl --request PUT \
--url https://api.dfns.io/wallets/{walletId}/transactions/{transactionId}/abort \
--header 'Authorization: Bearer <token>' \
--header 'X-DFNS-USERACTION: <api-key>'{
"id": "tx-583hu-sp2p7-slvb9nqpa3hd8bus",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"network": "Algorand",
"requester": {
"userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
"tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
},
"requestBody": {
"kind": "Transaction",
"transaction": "<string>",
"externalId": "<string>"
},
"status": "Pending",
"dateRequested": "2023-04-14T20:41:28.715Z",
"reason": "<string>",
"txHash": "<string>",
"fee": "<string>",
"approvalId": "ap-2a9in-tt2a1-983lho480p35ejd0",
"datePolicyResolved": "2023-04-14T20:41:28.715Z",
"dateBroadcasted": "2023-04-14T20:41:28.715Z",
"dateConfirmed": "2023-04-14T20:41:28.715Z",
"externalId": "<string>"
}Aborts a transaction that is currently in ‘Executing’ status and has not yet been signed. Sets the transaction status to ‘Failed’ and removes it from the retry queue.
This is useful when a transaction is stuck in the execution pipeline (e.g., during construct or sign phase) and you want to abort it without waiting for it to fail on its own.
Unlike cancel, which creates a replacement on-chain transaction, abort simply marks the transaction as failed without any blockchain interaction.
curl --request PUT \
--url https://api.dfns.io/wallets/{walletId}/transactions/{transactionId}/abort \
--header 'Authorization: Bearer <token>' \
--header 'X-DFNS-USERACTION: <api-key>'{
"id": "tx-583hu-sp2p7-slvb9nqpa3hd8bus",
"walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
"network": "Algorand",
"requester": {
"userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
"tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
},
"requestBody": {
"kind": "Transaction",
"transaction": "<string>",
"externalId": "<string>"
},
"status": "Pending",
"dateRequested": "2023-04-14T20:41:28.715Z",
"reason": "<string>",
"txHash": "<string>",
"fee": "<string>",
"approvalId": "ap-2a9in-tt2a1-983lho480p35ejd0",
"datePolicyResolved": "2023-04-14T20:41:28.715Z",
"dateBroadcasted": "2023-04-14T20:41:28.715Z",
"dateConfirmed": "2023-04-14T20:41:28.715Z",
"externalId": "<string>"
}CustomerEmployee)EndUser)Wallets:Transactions:Abort: Always required.Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows
User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows
Wallet id.
1 - 64Transaction id.
1 - 64Success
Transaction id.
1 - 64^tx-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"tx-583hu-sp2p7-slvb9nqpa3hd8bus"
Wallet id.
1 - 64^wa-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"wa-5pfuu-9euek-h0odgb6snva8ph3k"
Algorand, AlgorandTestnet, Aptos, AptosTestnet, ArbitrumOne, ArbitrumSepolia, ArcTestnet, AvalancheC, AvalancheCFuji, BabylonGenesis, BabylonTestnet5, Base, BaseSepolia, Berachain, BerachainBepolia, Bitcoin, BitcoinSignet, BitcoinTestnet3, BitcoinCash, Bob, BobSepolia, Bsc, BscTestnet, Canton, CantonTestnet, Cardano, CardanoPreprod, Concordium, ConcordiumTestnet, Celo, CeloAlfajores, Codex, CodexSepolia, CosmosHub4, CosmosIcsTestnet, Dogecoin, DogecoinTestnet, Ethereum, EthereumClassic, EthereumClassicMordor, EthereumSepolia, EthereumHolesky, EthereumHoodi, FantomOpera, FantomTestnet, FlareC, FlareCCoston2, FlowEvm, FlowEvmTestnet, Hedera, HederaTestnet, Ink, InkSepolia, InternetComputer, Ion, IonTestnet, Iota, IotaTestnet, Kaspa, Kusama, KusamaAssetHub, Litecoin, LitecoinTestnet, Near, NearTestnet, Optimism, OptimismSepolia, Origyn, Plasma, PlasmaTestnet, Plume, PlumeSepolia, Paseo, PaseoAssetHub, Polkadot, PolkadotAssetHub, Polygon, PolygonAmoy, Polymesh, PolymeshTestnet, Race, RaceSepolia, SeiAtlantic2, SeiPacific1, Solana, SolanaDevnet, Starknet, StarknetSepolia, Stellar, StellarTestnet, Sui, SuiTestnet, Tezos, TezosGhostnet, Tempo, TempoModerato, Tsc, TscTestnet1, Ton, TonTestnet, Tron, TronNile, Westend, WestendAssetHub, XrpLedger, XrpLedgerTestnet The user who initiated the request.
Show child attributes
Signs an unsigned transaction and broadcasts it to chain. For EVM transactions, you may use JSON objects:
| Field | Description | Type - Optional |
|---|---|---|
| type | Ethereum transaction type. 0 for legacy transaction; 2 for EIP-1559 transaction; 4 for EIP-7702 transaction. Default is 2 if undefined. | Integer (optional) |
| to | The destination address or target contract. Leave undefined when the transaction is a contract deployment. | String (optional) |
| value | The amount of native tokens to transfer in minimum denomination. | String (optional) |
| data | ABI encoded function call data in hex format. Can also be the encoded smart contract data when the transaction is a contract deployment. | String (optional) |
| nonce | The transaction number to guarantee idempotency. If omitted, it will be provided automatically. Note the same nonce can be submitted multiple times with a higher maxFeePerGas to "overwrite" existing transactions in the mempool. | Integer or String (optional) |
| gasLimit | The maximum amount of gas that can be spent for executing the transaction. If omitted, it will be calculated automatically. | String (optional) |
| gasPrice | The amount of per unit gas. Only valid for a type 0 legacy transaction. If omitted, it will be calculated automatically. | String (optional) |
| maxFeePerGas | The maximum amount of per unit gas willing to be paid for the transaction. Valid for type 2 and type 4 transactions. If omitted, it will be calculated automatically. | String (optional) |
| maxPriorityFeePerGas | The maximum amount of per unit gas to be included as a tip to the validator. Valid for type 2 and type 4 transactions. If omitted, it will be calculated automatically. | String (optional) |
| authorizationList | A list that indicates what code the signer of each authorization desires to execute in the context of their EOA. Only valid for type 4 transaction. | Authorization (optional) |
For Starknet transactions, you may use invocation request objects (https://github.com/starkware-libs/starknet-specs/blob/v0.8.1/api/starknet_api_openrpc.json#L2621):
| Field | Description | Type - Optional |
|---|---|---|
| calldata | Array of encoded function call parameters | Array of Strings (required) |
| nonce | Transaction nonce in hex format | String (required) |
| version | Transaction version in hex format. Typically "0x3" for current transactions | String (required) |
| resourceBounds | Gas bounds for L1, L2, and L1 data gas | Object (required) |
| ↳ resourceBounds.l1Gas | L1 gas configuration with maxAmount and maxPricePerUnit | Object (required) |
| ↳ resourceBounds.l2Gas | L2 gas configuration with maxAmount and maxPricePerUnit | Object (required) |
| ↳ resourceBounds.l1DataGas | L1 data gas configuration with maxAmount and maxPricePerUnit | Object (required) |
| tip | Transaction tip in hex format. Typically "0x0" | String (required) |
| paymasterData | Paymaster data array | Array of Strings (required) |
| accountDeploymentData | Account deployment data array | Array of Strings (required) |
| nonceDataAvailabilityMode | Data availability mode for nonce. Typically "L1" for now | String (required) |
| feeDataAvailabilityMode | Data availability mode for fee. Typically "L1" for now | String (required) |
For Concordium transactions, you may use JSON objects (from https://github.com/Concordium/concordium-node-sdk-js/blob/sdk/12.0.0-alpha.3/packages/sdk/src/transactions/Transaction.ts#L102)
| Field | Description | Type - Optional |
|---|---|---|
| Header | Transaction header for the intermediary state of account transactions, i.e. prior to being signing. | Object (required) |
| ↳ Header.executionEnergyAmount | The destination address or target contract. Leave undefined when the transaction is a contract deployment. | String/Number/BigInt (required) |
| ↳ Header.numSignatures | The number of signatures the transaction can hold. If "undefined", this will be defined at the time of signing | Integer (optional) |
| ↳ Header.sender | The account address that is source of this transaction | String (optional) |
| ↳ Header.nonce | The account nonce | String/Number/BigInt (optional) |
| ↳ Header.expiry | expiration of the transaction | Integer (optional) |
| Payload | The transaction account payload in JSON format (https://github.com/Concordium/concordium-node-sdk-js/blob/main/packages/sdk/src/accountTransactions.ts#L646) | Object (required) |
{
"kind": "Transaction",
"transaction": {
"to": "0x00fb58432ef9d418bf6688bcf0a226d2fcaa18e2",
"data": "0x40d097c3000000000000000000000000d2f77f85a50cdd650ca562f3a180284e1d5b4934",
"maxFeePerGas": "1626000000000",
"maxPriorityFeePerGas": "1332000000000"
}
}{
"kind": "Transaction",
"transaction": {
"type": "INVOKE",
"calldata": [
"1",
"2009894490435840142178314390393166646092438090257831307886760648929397478285",
"232670485425082704932579856502088130646006032362877466777181098476241604910",
"3",
"296727860213112272332383824629975240127004024814636931420022890499591637514",
"1",
"0"
],
"nonce": "0x51",
"version": "0x3",
"resourceBounds": {
"l1Gas": { "maxAmount": "0x0", "maxPricePerUnit": "0x239a01ff6e6c" },
"l2Gas": { "maxAmount": "0x1694a0", "maxPricePerUnit": "0x10c388d00" },
"l1DataGas": { "maxAmount": "0x120", "maxPricePerUnit": "0x98e8" }
},
"tip": "0x0",
"paymasterData": [],
"accountDeploymentData": [],
"nonceDataAvailabilityMode": "L1",
"feeDataAvailabilityMode": "L1",
}
}{
"kind": "Transaction",
"transaction": {
"header": {
"sender": undefined,
"nonce": undefined,
"expiry": undefined,
"executionEnergyAmount": 300
},
"payload": {
"type": "transferWithMemo",
"toAddress": "4HhAcToZs6rtxGcgsBRS3VcjeAECPTTSTFVUKS6rBSVEZAPL6d",
"memo": "000968656c6c6f20636364",
"amount": "1"
}
}
}Show child attributes
Pending, Executing, Broadcasted, Confirmed, Failed, Rejected 1 - 64^ap-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{14,16}$"ap-2a9in-tt2a1-983lho480p35ejd0"
Was this page helpful?