List Assets

GET /byron-wallets/{walletId}/assets

List all assets associated with the wallet, and their metadata if known.

An asset is associated with a wallet if it is involved in a transaction of the wallet.

Path parameters

  • walletId string(hex) Required

    Minimum length is 40, maximum length is 40.

Responses

  • 406 application/json

    Not Acceptable

    Hide response attributes Show response attributes object
    • message string Required

      May occur when providing an invalid 'Accept' header.

    • code string Required

      Value is not_acceptable.

  • 200 application/json

    Ok

    Hide response attributes Show response attributes object
    • policy_id string(hex) Required

      A unique identifier of the asset's monetary policy. The policy controls how assets of this kind are created and destroyed.

      The contents are the blake2b-224 hash of the monetary policy script, encoded in hexadecimal.

      Minimum length is 56, maximum length is 56.

    • asset_name string(hex) Required

      The asset on-chain type which acts as a sub-identifier within a policy. Although we call it "asset name", the value needn't be text, and it could even be empty.

      For policies with a single fungible asset item, asset name is typically an empty string.

      This value can be up to 32 bytes of arbitrary data (which is 64 hexadecimal digits).

      Maximum length is 64.

    • fingerprint string Required

      A user-facing short fingerprint which combines the policy_id and asset_name to allow for an easier human comparison of assets. Note that it is generally not okay to use this fingerprint as a unique identifier for it is not collision resistant. Yet within the context of a single wallet, it makes for a (rather) short user-facing comparison mean.

      Minimum length is 44, maximum length is 44. Format should match the following pattern: ^(asset)1[0-9a-z]*$.

    • metadata object

      In the Mary era of Cardano, UTxO may contain native assets. These assets are represented on-chain by opaque identifiers which are meaningless to end-users. Therefore, user-facing metadata regarding each token must be stored off-chain, in a metadata registry.

      Token creators may publish metadata into the registry and client applications can consume these metadata for display to end users. This will work in a similar way to how it is done for stake pool metadata.

      Hide metadata attributes Show metadata attributes object
      • name string Required

        A human-readable name for the asset, intended for display in user interfaces.

        Minimum length is 1, maximum length is 50.

      • description string Required

        A human-readable description for the asset. Good for display in user interfaces.

        Maximum length is 500.

      • ticker string

        An optional human-readable very short name or acronym for the asset, intended for display in user interfaces. If ticker is not present, then name will be used, but it might be truncated to fit within the available space.

        Minimum length is 2, maximum length is 5.

      • decimals integer

        Defines a scaling factor for the asset of 10-n. The decimals value n is therefore the number of digits after the decimal point for quantities of this token.

        It is up to API clients to use this metadata field to decimalize asset quantities before displaying to users. The wallet backend will always return unscaled token quantities as whole numbers.

        Minimum value is 0, maximum value is 255.

      • url string(uri)

        A URL to the policy's owner(s) or the entity website in charge of the asset.

        Maximum length is 250. Format should match the following pattern: ^https://.+.

    • If there was an error fetching metadata from the server, this will be set to one of fetch or parse, to indicate the kind of error.

      Values are fetch or parse.

GET /byron-wallets/{walletId}/assets
curl \
 --request GET https://localhost:8090/v2/byron-wallets/{walletId}/assets
Response examples (406)
{
  "message": "string",
  "code": "not_acceptable"
}
Response examples (200)
[
  {
    "policy_id": "65ab82542b0ca20391caaf66a4d4d7897d281f9c136cd3513136945b",
    "asset_name": "string",
    "fingerprint": "asset1rjklcrnsdzqp65wjgrg55sy9723kw09mlgvlc3",
    "metadata": {
      "name": "SwaggerCoin",
      "description": "string",
      "ticker": "SWAG",
      "decimals": 2,
      "url": "https://example.com",
      "logo": "string"
    },
    "metadata_error": "fetch"
  }
]