Network

Get Network Options

Changed on

This endpoint returns the version information and allowed network-specific types for a NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here.

Because options are retrievable in the context of a NetworkIdentifier, it is possible to define unique options for each network.

post/network/options

Request

  • The document declares no server URL.
  • Auth
    none declared

Request body

NetworkRequest required

A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier.

network_identifier, NetworkIdentifier required

The network_identifier specifies which network a particular object is associated with.

metadata, object

Example request

{
  "network_identifier": {
    "blockchain": "bitcoin",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  }
}

Response

Expected response to a valid request

NetworkOptionsResponse required

NetworkOptionsResponse contains information about the versioning of the node and the allowed operation statuses, operation types, and errors.

version, Version required

The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation.

allow, Allow required

Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here.

Example response

{
  "version": {
    "rosetta_version": "1.2.5",
    "node_version": "1.0.2",
    "middleware_version": "0.2.7"
  },
  "allow": {
    "operation_statuses": [
      {
        "status": "SUCCESS",
        "successful": true
      }
    ],
    "operation_types": [
      "TRANSFER"
    ],
    "errors": [
      {
        "code": 12,
        "message": "Invalid account format",
        "description": "This error is returned when the requested AccountIdentifier is improperly formatted.",
        "details": {
          "address": "0x1dcc4de8dec75d7aab85b567b6",
          "error": "not base64"
        }
      }
    ],
    "call_methods": [
      "eth_call"
    ],
    "balance_exemptions": [
      {
        "sub_account_address": "staking",
        "currency": {
          "symbol": "BTC",
          "decimals": 8,
          "metadata": {
            "Issuer": "Satoshi"
          }
        }
      }
    ]
  }
}

Changes

    • breaking

      added the new required request property network_identifier/blockchain

    • breaking

      added the new required request property network_identifier/network

    • breaking

      the network_identifier request property type changed from no type to object

    17 more changes in this revision