View Source FireblocksSdk.Api.Transaction (FireblocksSdk v0.1.3)
Summary
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.
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.
Returns a transaction by ID.
Overrides the required number of confirmations for transaction completion by transaction ID.
List all transactions
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_transaction([
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):operation:fee(String.t/0):feeLevel:failOnLowFee(boolean/0):maxFee(String.t/0):priorityFee(String.t/0):gasPrice(String.t/0):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):externalTxId(String.t/0):treatAsGrossAmount(boolean/0):forceSweep(boolean/0):feePayerInfo(map/0):feePayerAccountId(String.t/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
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
Returns a transaction by ID.
txId: Fireblocks transaction id
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.
List all transactions
FireblocksSdk.Api.Transaction.transactions([
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:limit(integer/0):txHash(String.t/0):assets(String.t/0):sourceType:destType:sourceId(String.t/0):destId(String.t/0)
Unfreezes a transaction by ID and makes the transaction available again.
txId: Fireblocks transaction id