View Source FireblocksSdk.Api.Transaction (FireblocksSdk v0.1.2)

Link to this section 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.

Link to this section Functions

Link to this function

cancel(txId, idempotencyKey \\ "")

View Source

Cancels a transaction by ID.

  • txId: Fireblocks transaction id
Link to this function

create_transaction(transaction, idempotent_key \\ "")

View Source

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:

Link to this function

drop(tx_drop_req, idempotencyKey \\ "")

View Source

Drops a stuck ETH transaction and creates a replacement transaction.

Options:

Link to this function

estimate_fee(transaction, idempotent_key \\ "")

View Source

Estimates the transaction fee for a transaction request.

Note: Supports all Fireblocks assets except ZCash (ZEC).

Link to this function

freeze(txId, idempotencyKey \\ "")

View Source

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
Link to this function

get_external_tx_id(exteralTxId)

View Source

Returns transaction by external transaction ID.

  • externalTxId: The external ID of the transaction to return
Link to this function

get_transaction_by_id(txId)

View Source

Returns a transaction by ID.

  • txId: Fireblocks transaction id
Link to this function

set_confirmation_threshold(threshold, idempotencyKey \\ "")

View Source

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 is 0.

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)

Link to this function

unfreeze(txId, idempotencyKey \\ "")

View Source

Unfreezes a transaction by ID and makes the transaction available again.

  • txId: Fireblocks transaction id