Skip to main content
Read the details of an asset before you list it or credit deposits of it. Any issuer can set any name or ticker. Identify an asset by its asset ID, never by its name or ticker.

Setup

Load the mnemonic you stored when you created your wallet, for example from an environment variable. In Node.js, also pass storage to Wallet.create.
Reading asset details needs no signing key. A ReadonlyWallet has the same assetManager.getAssetDetails method.

Read Asset Details

Pass the asset ID to getAssetDetails. Get the asset ID from the issuer:

Check the Details

Before you list an asset, check these fields:
  • decimals: amounts are in base units. Divide by 10decimals to show them to users. If decimals is absent, show base units.
  • supply: the units that exist now, in base units: every unit issued, minus every unit burned.
  • controlAssetId: if present, the holder of the control asset can issue more units. If absent, the supply is fixed.
Every metadata field is optional, and an asset can have no metadata. Metadata can’t change after issuance. If the asset has a control asset, read its details too:

Read Custom Fields

name, ticker, and icon return as strings, and decimals returns as a number. Custom fields return as hex strings. Decode them with @scure/base (pnpm add @scure/base) to read text values: