FireblocksSdk.Api.Vault (FireblocksSdk v0.1.8)

View Source

Summary

Functions

Initiates activation for a wallet in a vault account.

Creates a new vault account with the requested name.

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.

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.

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.

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_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 asset wallets 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_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.

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 asset wallets 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 asset wallets 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: