Home

Derive an AccountIdentifier from a PublicKey

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

CHANGELOG — Cardano Rosetta Java 2.3.3 → 2.4.0 Add metadata.address_type=CIP-113 smart-wallet derivation, rejection of staking_credential with CIP-113 (5062), new PLB validation errors (5063/5064); correct the existing success schema/example to account_identifier.address (old page incorrectly showed /construction/payloads fields).


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.

Cardano Rosetta Java 2.4.0 supports metadata.address_type="CIP-113" (case-sensitive). For this type, an edwards25519 payment public key is used to derive a smart-wallet base address: the configured programmable-logic-base script hash is the payment credential, and the hash of the supplied public key is the stake credential. Do not supply metadata.staking_credential with CIP-113 (error 5062). CIP113_BASE_SCRIPT_HASH must be configured for this operation (errors 5063/5064). Other address types Enterprise, Base, Reward are unchanged; the response uses account_identifier.address.

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.

public_keyPublicKeyrequired

Public Key value.

Show child attributes
hex_bytesstringrequired

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

curve_typeCurveTypesecp256k1secp256r1edwards25519tweedlerequired

Curve Type value.

metadataobject

Cardano address-derivation options. Set address_type to CIP-113 for a programmable-token smart-wallet address. Do not pass staking_credential for CIP-113 (error 5062).

Show child attributes
staking_credentialPublicKey

Only for other supported address types; NOT allowed when address_type is CIP-113 (error 5062).

Show child attributes
hex_bytesstringrequired

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

curve_typeCurveTypesecp256k1secp256r1edwards25519tweedlerequired

Curve Type value.

address_typeAddressTypeEnterpriseBaseRewardCIP-113

Case-sensitive Cardano address type; CIP-113 is new in 2.4.0.

Response

200OK

HTTP 200 response for constructionDerive.

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.