FireblocksSdk.Api.Vault (FireblocksSdk v0.2.1)

Copy Markdown View Source

Summary

Functions

Initiates activation for a wallet in a vault account.

Attach or detach tags from one or more vault accounts.

Creates a new vault account with the requested name.

Bulk creation of new vault accounts.

Bulk creation of deposit addresses for a vault account asset.

Creates a new deposit address for an asset of a vault account.

Creates a wallet for a specific asset in a vault account.

Gets a single vault account

Get the asset balance for a vault account.

Gets all asset wallets at all of the vault accounts in your workspace. An asset wallet is an asset at a vault account. This method allows fast traversal of all account balances.

Gets the assets amount summary for all accounts or filtered accounts.

Get the status of a bulk vault account creation job.

Get the status of a bulk deposit address creation job.

Get the maximum BIP44 index used for a vault account asset.

Gets the public key information based on derivation path and signing algorithm.

Get the maximum amount of a particular asset that can be spent in a single transaction from a specified vault account (UTXO assets only, with a limitation on number of inputs embedded).

Get UTXO unspent input information.

Get the aggregated vault balance for a specific asset across all vault accounts.

Hides the requested vault account from the web console view.

Gets a list of vault accounts per page matching the given filter or path

Returns a paginated response of the addresses for a given vault account and asset.

Updates the balance of a specific asset in a vault account.

Renames the requested vault account.

Converts an existing segwit address to the legacy format.

Sets the autofueling property of the vault account to enabled or disabled.

Assigns an AML/KYT customer reference ID for the vault account.

Makes a hidden vault account visible in web console view.

Updates the description of an existing address of an asset in a vault account.

Functions

activate(vault_id, asset_id, idempotentKey \\ "")

Initiates activation for a wallet in a vault account.

attach_detach_tags(params, idempotent_key \\ "")

Attach or detach tags from one or more vault accounts.

FireblocksSdk.Api.Vault.attach_detach_tags([
  vaultAccountIds: ["1", "2", "3"],
  tagIdsToAttach: ["tag-uuid-1"],
  tagIdsToDetach: ["tag-uuid-2"]
])

Options:

  • :vaultAccountIds (list of String.t/0) - Required. The IDs of the vault accounts to modify tags on (1–100 accounts)

  • :tagIdsToAttach (list of String.t/0) - The IDs of the tags to attach (1–20 UUIDs)

  • :tagIdsToDetach (list of String.t/0) - The IDs of the tags to detach (1–20 UUIDs)

create(vault, idempotentKey \\ "")

Creates a new vault account with the requested name.

FireblocksSdk.Api.Vault.create([
  name: "MyVault",
  hiddenOnUI: false,
  customerRefId: "MyCustomerRefId",
  autoFuel: false
])

Options:

create_multiple_accounts(params, idempotent_key \\ "")

Bulk creation of new vault accounts.

Initiates a background job that creates multiple vault accounts in a single request. Poll the returned jobId with get_create_multiple_accounts_job/1 to track progress.

FireblocksSdk.Api.Vault.create_multiple_accounts([
  count: 10,
  baseAssetIds: ["ETH", "BTC"],
  prefix: "Ops-"
])

Options:

  • :count (integer/0) - Required. Number of vault accounts to create

  • :baseAssetIds (list of String.t/0) - Required. Array of base asset IDs to initialise in each new vault account

  • :names (list of String.t/0) - Names to assign to vault accounts. Cannot be combined with vaultAccountNamesStartingIndex or prefix

  • :vaultAccountNamesStartingIndex (integer/0) - Copy vault account names starting from this index. Cannot be combined with names

  • :prefix (String.t/0) - When copying from existing vault accounts (vaultAccountNamesStartingIndex), adds a prefix to the names. Cannot be combined with names

  • :tagIds (list of String.t/0) - Optional list of tag IDs (UUIDs, max 20) to attach to all created vault accounts

create_multiple_deposit_addresses(params, idempotent_key \\ "")

Bulk creation of deposit addresses for a vault account asset.

Initiates a background job that creates multiple deposit addresses in a single request. Poll the returned jobId with get_create_multiple_deposit_addresses_job/1 to track progress.

FireblocksSdk.Api.Vault.create_multiple_deposit_addresses([
  vaultAccountId: 1,
  assetId: "ETH",
  count: 5
])

Options:

  • :vaultAccountId (integer/0) - Required. Existing vault account ID to add deposit addresses to

  • :assetId (String.t/0) - Required. Asset ID

  • :count (integer/0) - Required. Number of deposit addresses to create

  • :descriptions (list of String.t/0) - Descriptions for the newly created addresses

  • :vaultAccountToCopyDescFrom (integer/0) - Existing vault account ID to copy deposit address descriptions from when no descriptions are provided

  • :vaultAccountToCopyDescFromIndex (integer/0) - Starting index within the source vault account to copy deposit address descriptions from

create_new_asset_deposit_address(vault_id, asset_id, idempotentKey \\ "")

Creates a new deposit address for an asset of a vault account.

create_wallet(wallet, idempotentKey \\ "")

Creates a wallet for a specific asset in a vault account.

FireblocksSdk.Api.Vault.create_wallet([
  vaultId: "1",
  assetId: "XLM"
])

Options:

get(vault_id)

Gets a single vault account

  • vault_id: Fireblock vault id

get_asset_balance(vault_id, asset_id)

Get the asset balance for a vault account.

FireblocksSdk.Api.Vault.get_asset_balance("1", "XLM")

get_asset_wallets(options)

Gets all asset wallets at all of the vault accounts in your workspace. An asset wallet is an asset at a vault account. This method allows fast traversal of all account balances.

FireblocksSdk.Api.Vault.get_asset_wallets([
  totalAmountLargerThan: 0,
  assetId: "USDC",
  limit: 1
])

Supported options:

  • :totalAmountLargerThan - When specified, only asset wallets with total balance larger than this amount are returned.

  • :assetId (String.t/0) - When specified, only asset wallets cross vault accounts that have this asset ID are returned.

  • :orderBy - order by :asc or :desc

  • :limit (non_neg_integer/0) - The maximum number of results in a single response. The default is 200 and the maximum is 1000. The default value is 200.

  • :before (String.t/0) - Fetches the next paginated response before this element. This element is a cursor and is returned at the response of the previous page.

  • :after (String.t/0) - Fetches the next paginated response after this element. This element is a cursor and is returned at the response of the previous page.

get_assets_balance(options)

Gets the assets amount summary for all accounts or filtered accounts.

FireblocksSdk.Api.Vault.get_assets_balance([
  accountNamePrefix: "Operation"
])

Supported options:

get_create_multiple_accounts_job(job_id)

Get the status of a bulk vault account creation job.

get_create_multiple_deposit_addresses_job(job_id)

Get the status of a bulk deposit address creation job.

get_max_bip44_index_used(vault_account_id, asset_id)

Get the maximum BIP44 index used for a vault account asset.

Returns the highest derivation index currently in use for the given vault account and asset, which is useful before generating new addresses.

  • vault_account_id: The vault account ID
  • asset_id: The asset ID (e.g. "ETH")

get_public_key_info(filter)

Gets the public key information based on derivation path and signing algorithm.

Options:

get_utxo_max_spendable_amount(vault_id, asset_id, manual_signing \\ false)

Get the maximum amount of a particular asset that can be spent in a single transaction from a specified vault account (UTXO assets only, with a limitation on number of inputs embedded).

Send several transactions if you want to spend more than the maximum spendable amount.

get_utxo_unspent_inputs(vault_id, asset_id)

Get UTXO unspent input information.

get_vault_balance_by_asset(asset_id)

Get the aggregated vault balance for a specific asset across all vault accounts.

  • asset_id: The asset ID (e.g. "ETH")

hide(vault_id, idempotentKey \\ "")

Hides the requested vault account from the web console view.

list(listing)

Gets a list of vault accounts per page matching the given filter or path

FireblocksSdk.Api.Vault.list([
  namePrefix: "Operations",
  assetId: "ETH",
  limit: 30
])

Supported options:

  • :namePrefix (String.t/0)

  • :nameSuffix (String.t/0)

  • :minAmountThreshold (non_neg_integer/0)

  • :assetId (String.t/0)

  • :orderBy - order by :asc or :desc

  • :limit (non_neg_integer/0) - The maximum number of results in a single response. The default is 200 and the maximum is 1000. The default value is 200.

  • :before (String.t/0) - Fetches the next paginated response before this element. This element is a cursor and is returned at the response of the previous page.

  • :after (String.t/0) - Fetches the next paginated response after this element. This element is a cursor and is returned at the response of the previous page.

list_vault_asset_addresses(options)

Returns a paginated response of the addresses for a given vault account and asset.

FireblocksSdk.Api.list_vault_asset_addresses([
  vaultAccountId: "1",
  assetId: "XLM",
  limit: 200
])

Options:

  • :vaultAccountId (String.t/0) - Required.

  • :assetId (String.t/0) - Required.

  • :limit (non_neg_integer/0) - The maximum number of results in a single response. The default is 200 and the maximum is 1000. The default value is 200.

  • :before (String.t/0) - Fetches the next paginated response before this element. This element is a cursor and is returned at the response of the previous page.

  • :after (String.t/0) - Fetches the next paginated response after this element. This element is a cursor and is returned at the response of the previous page.

refresh_balance(vault_id, asset_id, idempotentKey \\ "")

Updates the balance of a specific asset in a vault account.

rename(vault_id, name, idempotentKey \\ "")

Renames the requested vault account.

segwit_to_legacy(vault_id, asset_id, address_id, idempotentKey \\ "")

Converts an existing segwit address to the legacy format.

set_auto_fuel(fuel, idempotentKey \\ "")

Sets the autofueling property of the vault account to enabled or disabled.

Options:

set_customer_ref_id(reference, idempotentKey \\ "")

Assigns an AML/KYT customer reference ID for the vault account.

# set customer reference on vault
FireblocksSdk.Api.Vault.set_customer_ref_id([
  vaultId: "1",
  customerRefId: "Customer#1"
])

# set customer reference on vault asset
FireblocksSdk.Api.Vault.set_customer_ref_id([
  vaultId: "1",
  assetId: "ETH",
  customerRefId: "Customer#1"
])

Options:

unhide(vault_id, idempotentKey \\ "")

Makes a hidden vault account visible in web console view.

update_address_description(change, idempotentKey \\ "")

Updates the description of an existing address of an asset in a vault account.

Options: