---
title: "deriveAccount"
method: POST
path: "/construction/derive"
tags: ["Cardano - Rosetta"]
---

# deriveAccount

`POST /construction/derive`

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.

## Request body

- ConstructionDeriveRequest — ConstructionDeriveRequest is passed to the `/construction/derive` endpoint. Network is provided in the request because some blockchains have different address formats for different networks. Metadata is provided in the request because some blockchains allow for multiple address types (i.e. different address for validators vs normal accounts).
  - `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
  - `public_key` PublicKey, required — PublicKey contains a public key byte array for a particular CurveType encoded in hex. Note that there is no PrivateKey struct as this is NEVER the concern of an implementation.
    - `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)
  - `metadata` object

## Response `200`

Expected response to a valid request

- ConstructionDeriveResponse — ConstructionDeriveResponse is returned by the `/construction/derive` endpoint.
  - `address` string — [DEPRECATED by `account_identifier` in `v1.4.4`] Address in network-specific format.
  - `account_identifier` 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).
    - `address` string, required — The address may be a cryptographic public key (or some encoding of it) or a provided username.
    - `sub_account` 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.
      - `address` string, required — The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount.
      - `metadata` object — If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients.
    - `metadata` object — Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata.
  - `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)
