Home

Get Metadata for Transaction Construction

POST
https://ada.nownodes.io/construction/metadata

Authorizations

ApiKeyAuthApiKeyAuth

api-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

application/json

Request value.

network_identifierNetworkIdentifierrequired

Rosetta network identifier object.

Show child attributes
blockchainstringrequired

Blockchain value.

networkstringrequired

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, preprod, or preview.

sub_network_identifierSubNetworkIdentifier

Sub Network Identifier value.

Show child attributes
networkstringrequired

Network value.

metadataobject

Additional metadata object.

optionsobjectrequired

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

Show child attributes
relative_ttlnumberrequired

Relative Ttl value.

transaction_sizenumberrequired

Transaction Size value.

public_keysArray<PublicKey>

Public Keys value.

Show child attributes
hex_bytesstringrequired

Hex-encoded public key bytes in the format specified by the CurveType.

curve_typeCurveTypesecp256k1secp256r1edwards25519tweedlerequired

Curve Type value.

Response

200OK

HTTP 200 response for constructionMetadata.

400Bad Request

Bad Request. The request is malformed or contains invalid parameters.

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal Server Error. The gateway or backend failed while processing the request.