POST
/
construction
/
derive
curl --request POST \
  --url https://example.com/construction/derive \
  --header 'Content-Type: application/json' \
  --data '{
  "network_identifier": {
    "blockchain": "bitcoin",
    "network": "mainnet",
    "sub_network_identifier": {
      "network": "shard 1",
      "metadata": {
        "producer": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5"
      }
    }
  },
  "public_key": {
    "hex_bytes": "<string>",
    "curve_type": "secp256k1"
  },
  "metadata": {}
}'
{
  "address": "<string>",
  "account_identifier": {
    "address": "0x3a065000ab4183c6bf581dc1e55a605455fc6d61",
    "sub_account": {
      "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
      "metadata": {}
    },
    "metadata": {}
  },
  "metadata": {}
}

Body

application/json

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

Response

200
application/json

Expected response to a valid request

ConstructionDeriveResponse is returned by the /construction/derive endpoint.