TransactionRequest

data class TransactionRequest(val operation: TransactionOperation? = null, val note: String? = null, val externalTxId: String? = null, val assetId: String? = null, val source: SourceTransferPeerPath? = null, val destination: DestinationTransferPeerPath? = null, val destinations: List<TransactionRequestDestination>? = null, val amount: String? = null, val treatAsGrossAmount: Boolean? = null, val forceSweep: Boolean? = null, val feeLevel: FeeLevel? = null, val fee: String? = null, val priorityFee: String? = null, val failOnLowFee: Boolean? = null, val maxFee: String? = null, val maxTotalFee: String? = null, val gasLimit: String? = null, val gasPrice: String? = null, val networkFee: String? = null, val replaceTxByHash: String? = null, val extraParameters: Any? = null, val customerRefId: String? = null, val travelRuleMessage: TravelRuleCreateTransactionRequest? = null, val useGasless: Boolean? = null)

Created by Fireblocks Ltd. on 07/10/2024.

Parameters

note

Custom note, not sent to the blockchain, to describe the transaction at your Fireblocks workspace.

externalTxId

An optional but highly recommended parameter. Fireblocks will reject future transactions with same ID. You should set this to a unique ID representing the transaction, to avoid submitting the same transaction twice. This helps with cases where submitting the transaction responds with an error code due to Internet interruptions, but the transaction was actually sent and processed. To validate whether a transaction has been processed, Find a specific transaction by external transaction ID. There is no specific format required for this parameter.

assetId

The ID of the asset to transfer, for TRANSFER, MINT or BURN operations. See the list of supported assets and their IDs on Fireblocks.

source

The source of the transaction. SourceTransferPeerPath

destination

The destination of the transaction.

destinations

For UTXO based blockchains, you can send a single transaction to multiple destinations.

amount

For TRANSFER operations, the requested amount to transfer, in the asset’s unit. Fireblocks recommends using a numeric string for accurate precision.

treatAsGrossAmount

\"When set to true, the fee will be deducted from the requested amount.\" Note: This parameter can only be considered if a transaction’s asset is a base asset, such as ETH or MATIC. If the asset can’t be used for transaction fees, like USDC, this parameter is ignored and the fee is deducted from the relevant base asset wallet in the source account.

forceSweep

For Polkadot, Kusama and Westend transactions only. When set to true, Fireblocks will empty the asset wallet. Note: If set to true when the source account is exactly 1 DOT, the transaction will fail. Any amount more or less than 1 DOT succeeds. This is a Polkadot blockchain limitation.

feeLevel

For UTXO or EVM-based blockchains only. Defines the blockchain fee level which will be payed for the transaction. Alternatively, specific fee estimation parameters exist below.

fee

For UTXO-based blockchains, the fee per bytes in the asset’s smallest unit (Satoshi, Latoshi, etc.). For Ripple, the fee for the transaction. Fireblocks recommends using a numeric string for accurate precision.

priorityFee

For Ethereum-based blockchains only, the fee for EIP-1559 transaction pricing mechanism. Value is in Gwei. Fireblocks recommends using a numeric string for accurate precision.

failOnLowFee

When set to true, in case the current MEDIUM fee level is higher than the one specified in the transaction, the transaction will fail to avoid getting stuck with no confirmations.

maxFee

The maximum fee (gas price or fee per byte) that should be payed for the transaction. In case the current value of the requested feeLevel is higher than this requested maximum fee. Represented by a numeric string for accurate precision.

maxTotalFee

For BTC-based blockchains only. The maximum fee (in the units of the fee-paying asset) that should be paid for the transaction.

gasLimit

For EVM-based blockchains only. Units of gas required to process the transaction. Note: Only two of the three arguments can be specified in a single transaction: gasLimit, gasPrice and networkFee. Fireblocks recommends using a numeric string for accurate precision.

gasPrice

For non-EIP-1559, EVM-based transactions. Price per gas unit (in Ethereum this is specified in Gwei). Note: Only two of the three arguments can be specified in a single transaction: gasLimit, gasPrice and networkFee. Fireblocks recommends using a numeric string for accurate precision.

networkFee

For EVM-based blockchains only. The total transaction fee in the blockchain’s largest unit. Note: Only two of the three arguments can be specified in a single transaction: gasLimit, gasPrice and networkFee. Fireblocks recommends using a numeric string for accurate precision. Although a number input exists, it is deprecated. - The transaction blockchain fee. For Ethereum, you can't pass gasPrice, gasLimit and networkFee all together.

replaceTxByHash

For EVM-based blockchains only. In case a transaction is stuck, specify the hash of the stuck transaction to replace it by this transaction with a higher fee, or to replace it with this transaction with a zero fee and drop it from the blockchain.

extraParameters

Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key inputsSelection with the value set the input selection structure. The inputs can be retrieved from the Retrieve Unspent Inputs endpoint. For RAW operations, add the key rawMessageData with the value set to the raw message data structure. For CONTRACT_CALL operations, add the key contractCallData with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks development libraries are recommended for building contract call transactions.

customerRefId

The ID for AML providers to associate the owner of funds with transactions.

useGasless
  • Override the default gaslsess configuration by sending true\\false

Constructors

Link copied to clipboard
constructor(operation: TransactionOperation? = null, note: String? = null, externalTxId: String? = null, assetId: String? = null, source: SourceTransferPeerPath? = null, destination: DestinationTransferPeerPath? = null, destinations: List<TransactionRequestDestination>? = null, amount: String? = null, treatAsGrossAmount: Boolean? = null, forceSweep: Boolean? = null, feeLevel: FeeLevel? = null, fee: String? = null, priorityFee: String? = null, failOnLowFee: Boolean? = null, maxFee: String? = null, maxTotalFee: String? = null, gasLimit: String? = null, gasPrice: String? = null, networkFee: String? = null, replaceTxByHash: String? = null, extraParameters: Any? = null, customerRefId: String? = null, travelRuleMessage: TravelRuleCreateTransactionRequest? = null, useGasless: Boolean? = null)

Properties

Link copied to clipboard
val amount: String? = null
Link copied to clipboard
val assetId: String? = null
Link copied to clipboard
val customerRefId: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val externalTxId: String? = null
Link copied to clipboard
val extraParameters: Any? = null
Link copied to clipboard
val failOnLowFee: Boolean? = null
Link copied to clipboard
val fee: String? = null
Link copied to clipboard
val feeLevel: FeeLevel? = null
Link copied to clipboard
val forceSweep: Boolean? = null
Link copied to clipboard
val gasLimit: String? = null
Link copied to clipboard
val gasPrice: String? = null
Link copied to clipboard
val maxFee: String? = null
Link copied to clipboard
val maxTotalFee: String? = null
Link copied to clipboard
val networkFee: String? = null
Link copied to clipboard
val note: String? = null
Link copied to clipboard
Link copied to clipboard
val priorityFee: String? = null
Link copied to clipboard
val replaceTxByHash: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val useGasless: Boolean? = null