FireblocksSdk.Api.NetworkConnection (FireblocksSdk v0.2.1)

Copy Markdown View Source

Fireblocks Network Connections API.

Covers two resource families within the "Network connections" tag:

  • Network Connections (/v1/network_connections) — peer-to-peer connections between Fireblocks workspaces.
  • Network IDs (/v1/network_ids) — local and remote discoverable network identifiers used to establish those connections.

Routing policies (passed as plain map() values) support three destination schemes:

  • %{"scheme" => "CUSTOM", "dstType" => "VAULT"|"EXCHANGE"|"FIAT_ACCOUNT", "dstId" => id}
  • %{"scheme" => "DEFAULT"} — available for network-connection policies only
  • %{"scheme" => "NONE"}

Summary

Functions

Validates whether future transactions on a given connection are routed to the displayed recipient or to a third party.

Deletes an existing network connection by its ID.

Deletes a network ID by its ID.

Returns a single network connection by its ID.

Returns all network connections.

Returns a specific network ID by its ID.

get_network_ids() deprecated

Returns all local and discoverable remote network IDs.

Returns all enabled routing policy asset groups for the workspace.

Returns both local and discoverable remote network IDs with optional filtering.

Updates the discoverability setting of a network ID.

Updates the display name of a specified network ID.

Updates the routing policy of a specified network ID.

Updates the routing policy of an existing network connection.

Functions

check_third_party_routing(connection_id, asset_type)

@spec check_third_party_routing(String.t(), String.t()) :: map()

Validates whether future transactions on a given connection are routed to the displayed recipient or to a third party.

  • connection_id: The ID of the network connection.
  • asset_type: The destination asset type to check (e.g. "ETH").

create_network_connection(params, idempotency_key \\ "")

@spec create_network_connection(
  keyword(),
  String.t()
) :: map()

Creates a new network connection.

Initiates a connection between the local workspace's network ID and a remote network ID. Subject to Flexible Routing Schemes. When custom routing is chosen but no destination is specified it defaults to dstId=0, dstType=VAULT.

  • idempotency_key: Optional idempotency key (X-Idempotency-Key header).

Options:

  • :localNetworkId (String.t/0) - Required. Network ID of the profile initiating the connection

  • :remoteNetworkId (String.t/0) - Required. Network ID the profile is connecting to

  • :routingPolicy (map/0) - Map of asset-group → routing destination (CustomRoutingDest, DefaultNetworkRoutingDest, or NoneNetworkRoutingDest)

create_network_id(params, idempotency_key \\ "")

@spec create_network_id(
  keyword(),
  String.t()
) :: map()

Creates a new Network ID.

  • idempotency_key: Optional idempotency key (X-Idempotency-Key header).

Options:

  • :name (String.t/0) - Required. Display name for the new network ID

  • :routingPolicy (map/0) - Map of asset-group → routing destination. Supports CustomRoutingDest or NoneNetworkRoutingDest only (no DEFAULT scheme)

delete_network_connection(connection_id)

@spec delete_network_connection(String.t()) :: map()

Deletes an existing network connection by its ID.

  • connection_id: The ID of the network connection to delete.

delete_network_id(network_id)

@spec delete_network_id(String.t()) :: map()

Deletes a network ID by its ID.

  • network_id: The ID of the network to delete.

get_network_connection(connection_id)

@spec get_network_connection(String.t()) :: map()

Returns a single network connection by its ID.

  • connection_id: The ID of the network connection.

get_network_connections()

@spec get_network_connections() :: list()

Returns all network connections.

Subject to Flexible Routing Schemes. Each connection includes a routing policy that controls how outgoing transactions are dispatched — None, Custom, or Default.

get_network_id(network_id)

@spec get_network_id(String.t()) :: map()

Returns a specific network ID by its ID.

  • network_id: The ID of the network to retrieve.

get_network_ids()

This function is deprecated. Use search_network_ids/1 instead. See Fireblocks swagger spec for details..
@spec get_network_ids() :: list()

Returns all local and discoverable remote network IDs.

Deprecated

This endpoint is deprecated. Use search_network_ids/1 instead.

get_routing_policy_asset_groups()

@spec get_routing_policy_asset_groups() :: list()

Returns all enabled routing policy asset groups for the workspace.

Asset groups are the keys used in routing policy maps (e.g. "ETH", "BTC", "ERC20").

search_network_ids(opts \\ [])

@spec search_network_ids(keyword()) :: map()

Returns both local and discoverable remote network IDs with optional filtering.

This is the preferred replacement for the deprecated get_network_ids/0.

Options:

  • :search (String.t/0) - Filter results by displayName or networkId (minimum 1 character)

  • :excludeSelf (boolean/0) - When true, excludes your own workspace's network IDs from results

  • :onlySelf (boolean/0) - When true, returns only your own workspace's network IDs

  • :excludeConnected (boolean/0) - When true, excludes network IDs that already have an active connection

  • :pageCursor (String.t/0) - Cursor for the next page of results

  • :pageSize (non_neg_integer/0) - Number of records per page (1–50, default 50)

set_network_id_discoverability(network_id, params)

@spec set_network_id_discoverability(
  String.t(),
  keyword()
) :: map()

Updates the discoverability setting of a network ID.

When isDiscoverable is true, other workspaces can find and connect to this network ID. When false, it is hidden from remote searches.

  • network_id: The ID of the network to update.

Options:

  • :isDiscoverable (boolean/0) - Required. Whether this network ID should be visible and discoverable by other workspaces

set_network_id_name(network_id, params)

@spec set_network_id_name(
  String.t(),
  keyword()
) :: map()

Updates the display name of a specified network ID.

  • network_id: The ID of the network to rename.

Options:

  • :name (String.t/0) - Required. New display name for the network ID

set_network_id_routing_policy(network_id, params)

@spec set_network_id_routing_policy(
  String.t(),
  keyword()
) :: map()

Updates the routing policy of a specified network ID.

  • network_id: The ID of the network to update.

Options:

  • :routingPolicy (map/0) - Required. New routing policy — map of asset-group → routing destination. Supports CustomRoutingDest or NoneNetworkRoutingDest only

set_routing_policy(connection_id, params)

@spec set_routing_policy(
  String.t(),
  keyword()
) :: map()

Updates the routing policy of an existing network connection.

  • connection_id: The ID of the network connection to update.

Options:

  • :routingPolicy (map/0) - Required. New routing policy — map of asset-group → routing destination (CustomRoutingDest, DefaultNetworkRoutingDest, or NoneNetworkRoutingDest)