> ## Documentation Index
> Fetch the complete documentation index at: https://nexus.gerowallet.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Decode a Cardano address into its credentials

> Splits a Cardano address into its structural parts: era, network, type and the payment / stake credentials. Accepts Shelley-era bech32 (addr1, addr_test1, stake1, stake_test1) and Byron-era base58 (Ddz, Ae2). This is pure computation on the address string, with no chain lookup: the network query parameter is accepted for consistency with the rest of the API and ignored, and the reported network is the one the address itself encodes. Byron addresses report era and type 'byron' with no credentials, because their spending data is a CBOR-enveloped key hash rather than a Shelley credential, and with no network: Byron encodes it as an optional protocol-magic attribute inside that envelope, which is not parsed here, so the field is omitted rather than guessed. Pointer addresses report the payment credential only; the (slot, txIndex, certIndex) pointer target is not resolved.



## OpenAPI

````yaml https://nexus.gerowallet.io/v3/api-docs get /api/addresses/decode/{address}
openapi: 3.1.0
info:
  title: Nexus API
  description: >-
    Multi-chain blockchain data API for Cardano (and Apex), Bitcoin, and
    Midnight.


    ## Blockchains & Networks

    Endpoints are grouped by **blockchain**. Pick the target **network** with
    the

    `network` query parameter. A network is an environment *within* a
    blockchain,

    not a separate endpoint family.


    - **Cardano & Apex**: one shared set of UTxO endpoints serves
    `CARDANO_MAINNET`,
      `CARDANO_PREPROD`, `CARDANO_PREVIEW`, `APEX_PRIME_MAINNET`, `APEX_VECTOR_MAINNET`,
      `APEX_VECTOR_TESTNET`
    - **Bitcoin**: `BITCOIN_MAINNET`, `BITCOIN_TESTNET4`

    - **Midnight**: `MIDNIGHT_MAINNET`, `MIDNIGHT_PREPROD`, `MIDNIGHT_STAGENET`


    These are the values published on each operation's `network` schema, and
    what

    generated clients send. A kebab-case alias (`cardano-mainnet`) is also
    accepted,

    and matching is case-insensitive — see the note on the parameter itself.


    ### Key scope: one chain, one network

    Each API key is scoped to **one chain and one network**, fixed at creation
    time.

    A `CARDANO_MAINNET` key cannot query `CARDANO_PREPROD`, and it cannot query

    Bitcoin or Midnight at all. Create one key per chain and network under the
    same

    account. Sending a `network` value that does not match the key returns

    **400 Network Mismatch**; omit the parameter and the request runs against
    the

    key's own network.


    What is uniform across chains is the integration surface, not the
    credential:

    one account, one base URL, one auth header, one docs site.


    ## Authentication

    Send your API key in the `X-Api-Key` header. This is the credential for

    programmatic access (create one in the dashboard; keys start with `nxs_`).

    `Authorization: Bearer <token>` is only for JWT **session** tokens issued by

    `/api/auth/login` (browser/mobile apps), not for API keys.


    ## Add-ons

    Capability is gated separately from network scope. Market data, wallet
    analytics,

    transaction building, MCP, and IPFS are paid add-ons; those endpoints return

    **402 Payment Required** on a key whose plan does not carry the matching
    add-on,

    even when the chain and network match.
  contact:
    name: Nexus Team
    url: https://nexus.gerowallet.io/support
    email: nexus@gerowallet.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://nexus.gerowallet.io
    description: API Server
security:
  - apiKeyAuth: []
  - bearerAuth: []
tags:
  - name: Cardano · Blocks
    description: Cardano Block API
  - name: Cardano · Policy
    description: Cardano Policy API
  - name: IPFS
    description: IPFS Content Resolution API
  - name: Bitcoin · Ordinals
    description: Ordinals + runes metadata (ord indexer)
  - name: Partner
    description: Aggregator revenue share for partner key holders
  - name: Cardano · Metadata
    description: Label-scoped transaction metadata API
  - name: Cardano · Assets
    description: Token Registry Metadata
  - name: Cardano · Transactions
    description: Cardano Transactions API
  - name: Midnight · Transactions
    description: Midnight-specific transaction endpoints (unshielded UTXOs)
  - name: Bitcoin · Mempool
    description: Bitcoin mempool snapshot
  - name: Midnight · DUST
    description: DUST registration + generation status
  - name: Cardano · Stake Pools
    description: >-
      Cardano stake pool information including registrations, retirements, and
      pool metadata
  - name: Cardano · Network
    description: Cardano Network API - Query static network / genesis parameters
  - name: Cardano · Addresses
    description: Cardano Address API
  - name: Bitcoin · Addresses
    description: >-
      Bitcoin address-keyed queries: stats / balance / UTxOs via electrs;
      ordinals via ord
  - name: Bitcoin · Transactions
    description: Bitcoin transaction lookup and submission
  - name: Cardano · Governance
    description: >-
      Cardano on-chain governance: DReps, governance actions + votes,
      constitutional committee, constitution
  - name: Cardano · DReps
    description: >-
      Cardano delegate representatives (DReps): voting power, status, metadata,
      delegators
  - name: Cardano · Transaction Builder
    description: >-
      Cardano transaction building API. Builds unsigned transactions server-side
      for client-side signing and submission. Network can be specified in the
      request body or as a query parameter. Body takes precedence over query
      parameter.
  - name: Cardano · Assets
    description: Cardano Asset API
  - name: Cardano · Accounts
    description: Cardano Account API
  - name: Bitcoin · Fees
    description: Bitcoin fee-rate estimates by confirmation block target
  - name: Bitcoin · Blocks
    description: Bitcoin block lookup
  - name: Cardano · Handles
    description: ADA Handle resolution
  - name: Cardano Market Data
    description: Endpoints from cardano-market-data
  - name: Midnight · Indexer
    description: Transparent proxy to the Midnight GraphQL indexer
  - name: Cardano · Scripts
    description: Cardano script & datum API
  - name: Cardano · Epochs
    description: Cardano Epoch API - Query protocol parameters and epoch information
  - name: Bitcoin · Chain
    description: Bitcoin chain-tip and sync state
paths:
  /api/addresses/decode/{address}:
    get:
      tags:
        - Cardano · Addresses
      summary: Decode a Cardano address into its credentials
      description: >-
        Splits a Cardano address into its structural parts: era, network, type
        and the payment / stake credentials. Accepts Shelley-era bech32 (addr1,
        addr_test1, stake1, stake_test1) and Byron-era base58 (Ddz, Ae2). This
        is pure computation on the address string, with no chain lookup: the
        network query parameter is accepted for consistency with the rest of the
        API and ignored, and the reported network is the one the address itself
        encodes. Byron addresses report era and type 'byron' with no
        credentials, because their spending data is a CBOR-enveloped key hash
        rather than a Shelley credential, and with no network: Byron encodes it
        as an optional protocol-magic attribute inside that envelope, which is
        not parsed here, so the field is omitted rather than guessed. Pointer
        addresses report the payment credential only; the (slot, txIndex,
        certIndex) pointer target is not resolved.
      operationId: decodeAddress
      parameters:
        - name: network
          in: query
          description: Accepted and ignored. Decoding never consults a network.
          required: false
          schema:
            type: string
            default: ''
        - name: address
          in: path
          required: true
          schema:
            type: string
            maxLength: 200
            minLength: 1
            pattern: ^[a-zA-Z0-9_]+$
      responses:
        '200':
          description: Address decoded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressDecodeDto'
                additionalProperties:
                  default: ''
                default: ''
        '400':
          description: Not a valid Cardano address
          content:
            application/json:
              schema:
                type: string
                additionalProperties:
                  default: ''
                default: ''
                example:
                  error: Not a valid Cardano address
components:
  schemas:
    AddressDecodeDto:
      type: object
      default: null
      description: Decoded components of a Cardano address
      properties:
        address:
          type: string
          default: ''
          description: The address exactly as decoded (whitespace-trimmed)
          example: >-
            addr1qx2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgse35a3x
        era:
          type: string
          default: ''
          description: Address-format era. Every post-Byron format is 'shelley'.
          enum:
            - shelley
            - byron
          example: shelley
        network:
          type: string
          default: ''
          description: >-
            Network the address encodes. Absent for Byron addresses: Byron
            carries its network as an optional protocol-magic attribute inside
            the address's CBOR envelope, and that parsing is not performed here,
            so the network is reported as undetermined rather than guessed.
          enum:
            - mainnet
            - testnet
          example: mainnet
        type:
          type: string
          default: ''
          description: Address type
          enum:
            - base
            - enterprise
            - pointer
            - reward
            - byron
          example: base
        paymentCredential:
          $ref: '#/components/schemas/AddressCredentialDto'
          default: ''
          description: Payment (spending) credential. Null for reward and Byron addresses.
        stakeCredential:
          $ref: '#/components/schemas/AddressCredentialDto'
          default: ''
          description: >-
            Stake (delegation) credential. Null for enterprise, pointer and
            Byron addresses. For a reward address this holds the address's
            single credential and paymentCredential is null.
    AddressCredentialDto:
      type: object
      default: null
      description: A Cardano address credential (key hash or script hash)
      properties:
        kind:
          type: string
          default: ''
          description: Credential kind
          enum:
            - key
            - script
          example: key
        hash:
          type: string
          default: ''
          description: Hex-encoded 28-byte credential hash
          example: 9493315cd92eb5d8c4304e67b7e16ae36d61d34502694657811a2c8e
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        ### API key (programmatic access — recommended)

        Send your API key in the `X-Api-Key` header. Keys start with `nxs_` and
        are

        created in the dashboard (or via **POST /api/keys** with a session JWT).


        Each key is scoped to **one chain and one network** (for example

        `CARDANO_MAINNET`), fixed at creation time. It cannot query a different
        network

        on the same chain, and it cannot query a different chain at all. A
        mismatched

        `network` parameter returns **400 Network Mismatch**. Create one key per
        chain

        and network under the same account.


        This is the credential most integrations should use.
      name: X-Api-Key
      in: header
    bearerAuth:
      type: http
      description: >-
        ### JWT session token (browser / mobile apps)

        A short-lived JWT issued by `/api/auth/login` or `/api/auth/device`,
        sent as

        `Authorization: Bearer <token>`. This is the **session** credential for
        the web

        dashboard and mobile apps, not for server-to-server API access.


        For programmatic API access use an **API key** in the `X-Api-Key` header

        instead — do **not** put an `nxs_` API key in this Bearer field.
      scheme: bearer
      bearerFormat: JWT

````