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

Import the SDK and create a wallet:
Reading asset details needs no signing key. A ReadonlyWallet has the same assetManager.getAssetDetails method.

Read Asset Details

Use getAssetDetails with the asset ID. Get the asset ID from the issuer:
Response shape:
Metadata is immutable and cannot be changed after issuance. See Asset Metadata for how it’s committed onchain.

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 total units issued so far.
  • controlAssetId: if present, the holder of the control asset can issue more units. If absent, the supply is fixed.
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 to read text values:

Next Steps

Detect Deposits

Watch an address for incoming units of an asset

Issue Assets

Create new assets with metadata