Full Reference
Version: 1.3.1
Endpoints
Account
Method | Endpoint | Description |
---|---|---|
POST | /account/balance | Get an Account Balance |
Block
Method | Endpoint | Description |
---|---|---|
POST | /block | Get a Block |
POST | /block/transaction | Get a Block Transaction |
Construction
Method | Endpoint | Description |
---|---|---|
POST | /construction/metadata | Get Transaction Construction Metadata |
POST | /construction/submit | Submit a Signed Transaction |
Mempool
Method | Endpoint | Description |
---|---|---|
POST | /mempool | Get All Mempool Transactions |
POST | /mempool/transaction | Get a Mempool Transaction |
Network
Method | Endpoint | Description |
---|---|---|
POST | /network/list | Get List of Available Networks |
POST | /network/options | Get Network Options |
POST | /network/status | Get Network Status |
Models
Objects
Model | Description |
---|---|
Allow | 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. |
Amount | Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency. |
Block | Blocks contain an array of Transactions that occurred at a particular BlockIdentifier. |
Currency | Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins). |
Operation | Operations contain all balance-changing information within a transaction. They are always one-sided (only affect 1 AccountIdentifier) and can succeed or fail independently from a Transaction. |
Transaction | Transactions contain an array of Operations that are attributable to the same TransactionIdentifier. |
Identifiers
Model | Description |
---|---|
AccountIdentifier | The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated). |
BlockIdentifier | The block_identifier uniquely identifies a block in a particular network. |
NetworkIdentifier | The network_identifier specifies which network a particular object is associated with. |
OperationIdentifier | The operation_identifier uniquely identifies an operation within a transaction. |
PartialBlockIdentifier | When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block. |
SubAccountIdentifier | An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to. |
SubNetworkIdentifier | 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. |
TransactionIdentifier | The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool. |
Requests and Responses
Model | Description |
---|---|
AccountBalanceRequest | An AccountBalanceRequest is utilized to make a balance request on the /account/balance endpoint. If the block_identifier is populated, a historical balance query should be performed. |
AccountBalanceResponse | An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier. |
BlockRequest | A BlockRequest is utilized to make a block request on the /block endpoint. |
BlockResponse | A BlockResponse includes a fully-populated block or a partially-populated block with a list of other transactions to fetch (other_transactions). |
BlockTransactionRequest | A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse. |
BlockTransactionResponse | A BlockTransactionResponse contains information about a block transaction. |
ConstructionMetadataRequest | A ConstructionMetadataRequest is utilized to get information required to construct a transaction. The Options object used to specify which metadata to return is left purposely unstructured to allow flexibility for implementers. |
ConstructionMetadataResponse | The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. It is likely that the client will not inspect this metadata before passing it to a client SDK that uses it for construction. |
ConstructionSubmitRequest | The transaction submission request includes a signed transaction. |
ConstructionSubmitResponse | A TransactionSubmitResponse contains the transaction_identifier of a submitted transaction that was accepted into the mempool. |
MempoolRequest | A MempoolRequest is utilized to retrieve all transaction identifiers in the mempool for a particular network_identifier. |
MempoolResponse | A MempoolResponse contains all transaction identifiers in the mempool for a particular network_identifier. |
MempoolTransactionRequest | A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool. |
MempoolTransactionResponse | A MempoolTransactionResponse contains an estimate of a mempool transaction. It may not be possible to know the full impact of a transaction in the mempool (ex: fee paid). |
MetadataRequest | A MetadataRequest is utilized in any request where the only argument is optional metadata. |
NetworkListResponse | A NetworkListResponse contains all NetworkIdentifiers that the node can serve information for. |
NetworkOptionsResponse | NetworkOptionsResponse contains information about the versioning of the node and the allowed operation statuses, operation types, and errors. |
NetworkRequest | A NetworkRequest is utilized to retrieve some data specific exclusively to a NetworkIdentifier. |
NetworkStatusResponse | NetworkStatusResponse contains basic information about the node's view of a blockchain network. |
Miscellaneous
Model | Description |
---|---|
Error | Instead of utilizing HTTP status codes to describe node errors (which often do not have a good analog), rich errors are returned using this object. |
OperationStatus | OperationStatus is utilized to indicate which Operation status are considered successful. |
Peer | A Peer is a representation of a node's peer. |
Version | The Version object is utilized to inform the client of the versions of different components of the Rosetta implementation. |