Skip to main content

Get Network Options

Retrieves 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.

Request Body REQUIRED
network_identifier object REQUIRED

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

blockchain string REQUIRED

Blockchain name

network string REQUIRED

If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet or testnet.

sub_network_identifier object

In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains.

network string REQUIRED

Network name

metadata object

Meta data from subnetwork identifier

producer string REQUIRED

producer

metadata object
Responses
200

Success

Schema OPTIONAL
version object

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

rosetta_version string

The rosetta_version is the version of the Rosetta interface the implementation adheres to. This can be useful for clients looking to reliably parse responses.

node_version string

The node_version is the canonical version of the node runtime. This can help clients manage deployments.

middleware_version string OPTIONAL

When a middleware server is used to adhere to the Rosetta interface, it should return its version here. This can help clients manage deployments.

metadata object OPTIONAL

Any other information that may be useful about versioning of dependent services should be returned here.

allow object

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.

operation_statuses object[]

All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error.

status string

The status is the network-specific status of the operation.

successful boolean

An Operation is considered successful if the Operation.Amount should affect the Operation.Account. Some blockchains (like Bitcoin) only include successful operations in blocks but other blockchains (like Ethereum) include unsuccessful operations that incur a fee. To reconcile the computed balance from the stream of Operations, it is critical to understand which Operation.Status indicate an Operation is successful and should affect an Account.

operation_types undefined[]

All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error.

errors object[]

All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error.

code integer

Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code.

message string

Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field.

retriable boolean

An error is retriable if the same request may succeed if submitted again.

historical_balance_lookup boolean

Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true.

400

Error

Schema OPTIONAL
code integer

Code is a network-specific error code. If desired, this code can be equivalent to an HTTP status code.

message string

Message is a network-specific error message. The message MUST NOT change for a given code. In particular, this means that any contextual information should be included in the details field.

retriable boolean

An error is retriable if the same request may succeed if submitted again.

details object OPTIONAL

Often times it is useful to return context specific to the request that caused the error (i.e. a sample of the stack trace or impacted account) in addition to the standard error message.

address string OPTIONAL
error string OPTIONAL