---
title: "getTransactionConstructionMetadata"
method: POST
path: "/construction/metadata"
tags: ["Cardano - Rosetta"]
---

# getTransactionConstructionMetadata

`POST /construction/metadata`

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.

## Request body

- 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. Options is not required in the case that there is network-wide metadata of interest. Optionally, the request can also include an array of PublicKeys associated with the AccountIdentifiers returned in ConstructionPreprocessResponse.
  - `network_identifier` NetworkIdentifier, required — The network_identifier specifies which network a particular object is associated with.
    - `blockchain` string, required
    - `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` 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.
      - `network` string, required
      - `metadata` object
  - `options` object — 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.
  - `public_keys` PublicKey[]
    - `hex_bytes` string, required — Hex-encoded public key bytes in the format specified by the CurveType.
    - `curve_type` 'secp256k1' | 'secp256k1_bip340' | 'secp256r1' | 'edwards25519' | 'tweedle' | 'pallas', required — CurveType is the type of cryptographic curve associated with a PublicKey. * secp256k1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * secp256k1_bip340: x-only - `32 bytes` (implicitly even `Y` coord. Secp256k1 compressed keys may be repurposed by dropping the first byte. (https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#Public_Key_Generation)) * secp256r1: SEC compressed - `33 bytes` (https://secg.org/sec1-v2.pdf#subsubsection.2.3.3) * edwards25519: `y (255-bits) || x-sign-bit (1-bit)` - `32 bytes` (https://ed25519.cr.yp.to/ed25519-20110926.pdf) * tweedle: 1st pk : Fq.t (32 bytes) || 2nd pk : Fq.t (32 bytes) (https://github.com/CodaProtocol/coda/blob/develop/rfcs/0038-rosetta-construction-api.md#marshal-keys) * pallas: `x (255 bits) || y-parity-bit (1-bit) - 32 bytes` (https://github.com/zcash/pasta)

## Response `200`

Expected response to a valid request

- ConstructionMetadataResponse — The ConstructionMetadataResponse returns network-specific metadata used for transaction construction. Optionally, the implementer can return the suggested fee associated with the transaction being constructed. The caller may use this info to adjust the intent of the transaction or to create a transaction with a different account that can pay the suggested fee. Suggested fee is an array in case fee payment must occur in multiple currencies.
  - `metadata` object, required
  - `suggested_fee` Amount[]
    - `value` string, required — Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.
    - `currency` RpcCurrency, required — 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).
      - `symbol` string, required — Canonical symbol associated with a currency.
      - `decimals` integer, required — Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.
      - `metadata` object — Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.
    - `metadata` object

## Other responses

- `500` — unexpected error

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/versions/8622ee4b8fae/schema)
