FireblocksSdk.Api.Transaction (FireblocksSdk v0.1.4)
View SourceSummary
Functions
Cancels a transaction by ID.
Creates a new transaction with the specified options
Drops a stuck ETH transaction and creates a replacement transaction.
Estimates the transaction fee for a transaction request.
Freezes a transaction by ID.
Returns a transaction by ID.
Gets the estimated required fee for an asset. For UTXO based assets, the response will contain the suggested fee per byte, for ETH/ETC based assets, the suggested gas price, and for XRP/XLM, the transaction fee.
Returns transaction by external transaction ID.
List all transactions
Overrides the required number of confirmations for transaction completion by transaction ID.
Unfreezes a transaction by ID and makes the transaction available again.
Functions
Cancels a transaction by ID.
txId
: Fireblocks transaction id
Creates a new transaction with the specified options
FireblocksSdk.Api.Transaction.create([
assetId: "ETH",
operation: :transfer, # :mint | :burn | :raw
source: %{
type: :vault_account,
id: "1"
},
destination: %{
type: :vault_account,
id: "2"
},
amount: "0.005",
note: "donation!"
])
Supported options:
:assetId
(String.t/0
):source
(map/0
):type
:id
(String.t/0
):virtualId
(String.t/0
):virtualType
:address
(String.t/0
)
:destination
(map/0
):type
:id
(String.t/0
):virtualId
(String.t/0
):virtualType
:oneTimeAddress
(map/0
):address
(String.t/0
):tag
(String.t/0
)
:amount
(String.t/0
) - For TRANSFER operations, the requested amount to transfer, in the asset’s unit.:operation
:fee
(String.t/0
):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.:failOnLowFee
(boolean/0
):maxFee
(String.t/0
):priorityFee
(String.t/0
):gasPrice
(String.t/0
) - 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. Although a number input exists, it is deprecated.
:gasLimit
(String.t/0
):note
(String.t/0
):cpuStaking
(integer/0
):networkStaking
(integer/0
):autoStaking
(boolean/0
):customerRefId
(String.t/0
):extraParameters
(map/0
):destinations
(map/0
):amount
(String.t/0
):destination
(map/0
):type
:id
(String.t/0
):oneTimeAddress
(map/0
):address
(String.t/0
):tag
(String.t/0
)
:replaceTxByHash
(String.t/0
) - 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.:externalTxId
(String.t/0
):treatAsGrossAmount
(boolean/0
) - 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
(boolean/0
) - 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.
:feePayerInfo
(map/0
):feePayerAccountId
(String.t/0
)
:travelRuleMessageId
(String.t/0
):useGasless
(boolean/0
)
Drops a stuck ETH transaction and creates a replacement transaction.
FireblocksSdk.Api.Transaction.drop([
txId: "fireblock-tx-id",
feeLevel: :medium,
gasFee: ""
])
Options:
:txId
(String.t/0
) - Required.:feeLevel
:gasFee
(String.t/0
)
Estimates the transaction fee for a transaction request.
Note: Supports all Fireblocks assets except ZCash (ZEC).
Freezes a transaction by ID.
txId
: Fireblocks transaction id
Returns a transaction by ID.
txId
: Fireblocks transaction id
Gets the estimated required fee for an asset. For UTXO based assets, the response will contain the suggested fee per byte, for ETH/ETC based assets, the suggested gas price, and for XRP/XLM, the transaction fee.
asset
: The asset for which to estimate the fee
Returns transaction by external transaction ID.
externalTxId
: The external ID of the transaction to return
List all transactions
FireblocksSdk.Api.Transaction.list([
status: :rejected,
sourceType: :vault_account,
sourceId: "1",
limit: 10
])
Options:
:before
(String.t/0
) - Unix timestamp in milliseconds. Returns only transactions created before the specified date:after
(String.t/0
) - Unix timestamp in milliseconds. Returns only transactions created after the specified date:status
:orderBy
:sort
:limit
(integer/0
) - Limits the number of results. If not provided, a limit of 200 will be used. The maximum allowed limit is 500:txHash
(String.t/0
) - Returns only results with a specified txHash:assets
(String.t/0
) - A list of assets to filter by, seperated by commas:sourceType
:destType
:sourceId
(String.t/0
):destId
(String.t/0
) - The destination ID of the transaction:sourceWalletId
(String.t/0
) - Returns only results where the source is a specific end user wallet:destWalletId
(String.t/0
) - Returns only results where the destination is a specific end user wallet
Overrides the required number of confirmations for transaction completion by transaction ID.
Options:
:type
:id
(String.t/0
) - Fireblocks transaction id or blockchain transaction hash:numOfConfirmations
(integer/0
) - The default value is0
.
Unfreezes a transaction by ID and makes the transaction available again.
txId
: Fireblocks transaction id