Rosetta
v1.0.0https://ada.nownodes.ioNOWNodes Cardano rosetta endpoint.Build Once. Integrate Your Blockchain Everywhere.
Authentication
api-keyAuthapiKeyNOWNodes API key passed in the api-key header.
API Key: api-key in header
Rosetta
Network
Network operations.
Get List of Available Networks
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
This endpoint returns a list of NetworkIdentifiers that the Rosetta server supports.
Body
Request value.
metadataobjectAdditional metadata object.
Response
HTTP 200 response for networkList.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get Network Status
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
This endpoint returns the current status of the network requested. Any NetworkIdentifier returned by /network/list should be accessible here.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
metadataobjectAdditional metadata object.
Response
HTTP 200 response for networkStatus.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get Network Options
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
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.
Body
Request value.
network_identifierobjectrequiredRosetta network identifier.
Response
HTTP 200 response for networkOptions.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Block
Block operations.
Get a Block
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get a block by its Block Identifier. If transactions are returned in the same call to the node as fetching the block, the response should include these transactions in the Block object. If not, an array of Transaction Identifiers should be returned so /block/transaction fetches can be done to get all transaction information. When requesting a block by the hash component of the BlockIdentifier, this request MUST be idempotent: repeated invocations for the same hash-identified block must return the exact same block contents. No such restriction is imposed when requesting a block by height, given that a chain reorg event might cause the specific block at height n to be set to a different one.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
block_identifierPartialBlockIdentifierrequiredRosetta block identifier object.
Response
HTTP 200 response for block.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get a Block Transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get a transaction in a block by its Transaction Identifier. This endpoint should only be used when querying a node for a block does not return all transactions contained within it. All transactions returned by this endpoint must be appended to any transactions returned by the /block method by consumers of this data. Fetching a transaction by hash is considered an Explorer Method (which is classified under the Future Work section). This method can be used to let consumers to paginate results when the block trasactions count is too big to be returned in a single BlockResponse. Calling this endpoint requires reference to a BlockIdentifier because transaction parsing can change depending on which block contains the transaction. For example, in Bitcoin it is necessary to know which block contains a transaction to determine the destination of fee payments. Without specifying a block identifier, the node would have to infer which block to use (which could change during a re-org). Implementations that require fetching previous transactions to populate the response (ex: Previous UTXOs in Bitcoin) may find it useful to run a cache within the Rosetta server in the /data directory (on a path that does not conflict with the node).
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
block_identifierBlockIdentifierrequiredRosetta block identifier object.
transaction_identifierTransactionIdentifierrequiredRosetta transaction identifier object.
Response
HTTP 200 response for blockTransaction.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Mempool
Mempool operations.
Get All Mempool Transactions
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get all Transaction Identifiers in the mempool
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
metadataobjectAdditional metadata object.
Response
HTTP 200 response for mempool.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get a Mempool Transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get a transaction in the mempool by its Transaction Identifier. This is a separate request than fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a transaction query is for something in the mempool instead of a transaction in a block. Transactions may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to pay before a transaction is executed). On this endpoint, it is ok that returned transactions are only estimates of what may actually be included in a block.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
transaction_identifierTransactionIdentifierrequiredRosetta transaction identifier object.
Response
HTTP 200 response for mempoolTransaction.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Account
Account operations.
Get an Account's Balance
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get an array of all AccountBalances for an AccountIdentifier and the BlockIdentifier at which the balance lookup was performed. The BlockIdentifier must always be returned because some consumers of account balance data need to know specifically at which block the balance was calculated to compare balances they compute from operations with the balance returned by the node. It is important to note that making a balance request for an account without populating the SubAccountIdentifier should not result in the balance of all possible SubAccountIdentifiers being returned. Rather, it should result in the balance pertaining to no SubAccountIdentifiers being returned (sometimes called the liquid balance). To get all balances associated with an account, it may be necessary to perform multiple balance requests with unique AccountIdentifiers. It is also possible to perform a historical balance lookup (if the server supports it) by passing in an optional BlockIdentifier.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
account_identifierAccountIdentifierrequiredRosetta account identifier object.
block_identifierPartialBlockIdentifierRosetta block identifier object.
currenciesArray<Currency>In some cases, the caller may not want to retrieve all available balances for an AccountIdentifier. If the currencies field is populated, only balances for the specified currencies will be returned. If not populated, all available balances will be returned.
Response
HTTP 200 response for accountBalance.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get an Account's Unspent Coins
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get an array of all unspent coins for an AccountIdentifier and the BlockIdentifier at which the lookup was performed. If your implementation does not support coins (i.e. it is for an account-based blockchain), you do not need to implement this endpoint. If you implementation does support coins (i.e. it is fro a UTXO-based blockchain), you MUST also complete the /account/balance endpoint. It is important to note that making a coins request for an account without populating the SubAccountIdentifier should not result in the coins of all possible SubAccountIdentifiers being returned. Rather, it should result in the coins pertaining to no SubAccountIdentifiers being returned. To get all coins associated with an account, it may be necessary to perform multiple coin requests with unique AccountIdentifiers. Optionally, an implementation may choose to support updating an AccountIdentifier's unspent coins based on the contents of the mempool. Note, using this functionality breaks any guarantee of idempotency.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
account_identifierAccountIdentifierrequiredRosetta account identifier object.
include_mempoolbooleanInclude state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency.
currenciesArray<Currency>In some cases, the caller may not want to retrieve coins for all currencies for an AccountIdentifier. If the currencies field is populated, only coins for the specified currencies will be returned. If not populated, all unspent coins will be returned.
Response
HTTP 200 response for accountCoins.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Construction
Construction operations.
Derive an AccountIdentifier from a PublicKey
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Derive returns the AccountIdentifier associated with a public key. Blockchains that require an on-chain action to create an account should not implement this method.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
public_keyPublicKeyrequiredPublic Key value.
metadataobjectAdditional metadata object.
Response
HTTP 200 response for constructionDerive.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Create a Request to Fetch Metadata
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Preprocess is called prior to /construction/payloads to construct a request for any metadata that is needed for transaction construction given (i.e. account nonce). The options object returned from this endpoint will be sent to the /construction/metadata endpoint UNMODIFIED by the caller (in an offline execution environment). If your Construction API implementation has configuration options, they MUST be specified in the /construction/preprocess request (in the metadata field).
Body
Request value.
network_identifierobjectrequiredRosetta network identifier.
operationsArray<object>requiredList of operations to preprocess.
Response
HTTP 200 response for constructionPreprocess.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get Metadata for Transaction Construction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get any information required to construct a transaction for a specific network. Metadata returned here could be a recent hash to use, an account sequence number, or even arbitrary chain state. The request used when calling this endpoint is created by calling /construction/preprocess in an offline environment. You should NEVER assume that the request sent to this endpoint will be created by the caller or populated with any custom parameters. This must occur in /construction/preprocess. It is important to clarify that this endpoint should not pre-construct any transactions for the client (this should happen in /construction/payloads). This endpoint is left purposely unstructured because of the wide scope of metadata that could be required.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
optionsobjectrequiredSome blockchains require different metadata for different types of transaction construction (ex: delegation versus a transfer). Instead of requiring a blockchain node to return all possible types of metadata for construction (which may require multiple node fetches), the client can populate an options object to limit the metadata returned to only the subset required.
public_keysArray<PublicKey>Public Keys value.
Response
HTTP 200 response for constructionMetadata.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Generate an Unsigned Transaction and Signing Payloads
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Payloads is called with an array of operations and the response from /construction/metadata. It returns an unsigned transaction blob and a collection of payloads that must be signed by particular AccountIdentifiers using a certain SignatureType. The array of operations provided in transaction construction often times can not specify all "effects" of a transaction (consider invoked transactions in Ethereum). However, they can deterministically specify the "intent" of the transaction, which is sufficient for construction. For this reason, parsing the corresponding transaction in the Data API (when it lands on chain) will contain a superset of whatever operations were provided during construction.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
operationsArray<Operation>requiredOperations value.
metadataobjectrequiredAdditional metadata object.
public_keysArray<PublicKey>Public Keys value.
Response
HTTP 200 response for constructionPayloads.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Create Network Transaction from Signatures
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Combine creates a network-specific transaction from an unsigned transaction and an array of provided signatures. The signed transaction returned from this method will be sent to the /construction/submit endpoint by the caller.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
unsigned_transactionstringrequiredUnsigned Transaction value.
signaturesArray<Signature>requiredSignatures value.
Response
HTTP 200 response for constructionCombine.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Parse a Transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Parse is called on both unsigned and signed transactions to understand the intent of the formulated transaction. This is run as a sanity check before signing (after /construction/payloads) and before broadcast (after /construction/combine).
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
signedbooleanrequiredSigned is a boolean indicating whether the transaction is signed.
transactionstringrequiredThis must be either the unsigned transaction blob returned by /construction/payloads or the signed transaction blob returned by /construction/combine.
Response
HTTP 200 response for constructionParse.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Get the Hash of a Signed Transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
TransactionHash returns the network-specific transaction hash for a signed transaction.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
signed_transactionstringrequiredSigned Transaction value.
Response
HTTP 200 response for constructionHash.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Submit a Signed Transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Submit a pre-signed transaction to the node. This call should not block on the transaction being included in a block. Rather, it should return immediately with an indication of whether or not the transaction was included in the mempool. The transaction submission response should only return a 200 status if the submitted transaction could be included in the mempool. Otherwise, it should return an error.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
signed_transactionstringrequiredSigned Transaction value.
Response
HTTP 200 response for constructionSubmit.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Events
Events operations.
[INDEXER] Get a range of BlockEvents
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
/events/blocks allows the caller to query a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state. Following BlockEvents allows lightweight clients to update their state without needing to implement their own syncing logic (like finding the common parent in a reorg). /events/blocks is considered an "indexer" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta "indexer" MUST support this endpoint.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
offsetinteger<int64>>= 0offset is the offset into the event stream to sync events from. If this field is not populated, we return the limit events backwards from tip. If this is set to 0, we start from the beginning.
limitinteger<int64>>= 0limit is the maximum number of events to fetch in one call. The implementation may return <= limit events.
Response
HTTP 200 response for eventsBlocks.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.
Search
Search operations.
[INDEXER] Search for Transactions
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
/search/transactions allows the caller to search for transactions that meet certain conditions. Some conditions include matching a transaction hash, containing an operation with a certain status, or containing an operation that affects a certain account. /search/transactions is considered an "indexer" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta "indexer" MUST support this endpoint.
Body
Request value.
network_identifierNetworkIdentifierrequiredRosetta network identifier object.
operatorOperatororandOperator value.
max_blockinteger<int64>>= 0max_block is the largest block index to consider when searching for transactions. If this field is not populated, the current block is considered the max_block. If you do not specify a max_block, it is possible a newly synced block will interfere with paginated transaction queries (as the offset could become invalid with newly added rows).
offsetinteger<int64>>= 0offset is the offset into the query result to start returning transactions. If any search conditions are changed, the query offset will change and you must restart your search iteration.
limitinteger<int64>>= 0limit is the maximum number of transactions to return in one call. The implementation may return <= limit transactions.
transaction_identifierTransactionIdentifierRosetta transaction identifier object.
account_identifierAccountIdentifierRosetta account identifier object.
coin_identifierCoinIdentifierRosetta coin identifier object.
currencyCurrencyRosetta currency object.
statusstringstatus is the network-specific operation type.
typestringtype is the network-specific operation type.
addressstringaddress is AccountIdentifier.Address. This is used to get all transactions related to an AccountIdentifier.Address, regardless of SubAccountIdentifier.
successbooleansuccess is a synthetic condition populated by parsing network-specific operation statuses (using the mapping provided in /network/options).
Response
HTTP 200 response for searchTransactions.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or backend failed while processing the request.