v1

latestOpenAPI 3.0.02026-07-2442242189.1 KB
Transactions

ReplaceTransaction

Creates a new transaction that replaces an existing signed transaction in the system which has not been mined yet.

Only works for blockchains that support replacement of signed transactions, e.g.

  • Ethereum - which has nonce management.
  • BTC - which has RBF (Replace-By-Fee) and CPFP (Child-Pays-For-Parent) mechanisms.

Some blockchains do not support transaction replacement, e.g. TRON - which is based on transaction expiration time - for these cases, the transaction will be either mined or expired after the configured expiration time.

If the transaction has not been signed yet, and you wish to cancel it, use CancelTransaction instead.

post/v2/vaults/{vault_id}/transactions/{transaction_id}:replace

Path parameters

vault_idstring required
transaction_idstring required

Request body

type'CANCEL' | 'ACCELERATE' required

The type of the replacement.

  • CANCEL: Cancel the transaction.
  • ACCELERATE: Accelerate the transaction.
designatedSignersstring[]

If the transaction is designated to be signed by a specific signer, this field should be set.

Format: users/{email} or users/{id}

Example: ["users/name@example.com"] or ["users/a3e4f5"]

notestring

The note to be added to the replacement transaction.

This note will be visible to all vault members.

expireTimestring date-time

The expiration time of the replacement transaction.

Format: 2023-08-29T18:04:00Z

includeReferencedResourcesboolean

Include referenced resources in the response.

Example request

{
  "designatedSigners": [
    "users/name@example.com"
  ]
}

Response

A successful response.

referencedResourcesobject

A mapping of the referenced resources in the message. The key is the resource name and the value is the corresponding resource.

referencedAddressesInfoobject

A mapping of the referenced addresses in the message. The key is the address and the value is the corresponding address info.

Example response

{
  "transaction": {
    "name": "vaults/1b25635a5b3f/transactions/95257c5a522f",
    "network": "networks/ethereum-mainnet",
    "signingSession": "vaults/2d2e40r3/signingSessions/132e40r3",
    "request": {
      "name": "vaults/1b25635a5b3f/transactionRequests/95257c5a522f",
      "initiator": "users/2d2e40r3",
      "sourceWallet": "wallets/2d2e40r3"
    },
    "transfers": [
      {
        "asset": "assets/native.ethereum-mainnet"
      }
    ],
    "tokenAllowances": [
      {
        "asset": "assets/native.ethereum-mainnet"
      }
    ],
    "designatedSigners": [
      "users/name@example.com"
    ],
    "evmTransaction": {
      "data": "0xda82fb4c00000a"
    },
    "tronTransaction": {
      "freezeBalanceV2": {
        "amount": "1500000",
        "asset": "assets/native.tron-mainnet"
      },
      "unfreezeBalanceV2": {
        "amount": "1500000",
        "asset": "assets/native.tron-mainnet"
      },
      "delegateResource": {
        "amount": "1500000",
        "asset": "assets/native.tron-mainnet"
      },
      "undelegateResource": {
        "amount": "1500000",
        "asset": "assets/native.tron-mainnet"
      },
      "transferContract": {
        "amount": "1500000"
      }
    },
    "btcTransaction": {
      "inputs": [
        {
          "signingSession": "vaults/2d2e40r3/signingSessions/132e40r3"
        }
      ],
      "asset": "assets/native.bitcoin-mainnet"
    },
    "btcPsbt": {
      "inputs": [
        {
          "signingSession": "vaults/2d2e40r3/signingSessions/132e40r3"
        }
      ]
    }
  }
}