Skip to main content

Setup

Import the SDK and create a wallet:
import { MnemonicIdentity, Wallet } from '@arkade-os/sdk'

const identity = MnemonicIdentity.fromMnemonic("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about")

const wallet = await Wallet.create({
  identity,
  arkServerUrl: 'https://arkade.computer',
})

Read Asset Metadata

Use getAssetDetails to retrieve the metadata attached to an asset at issuance time:
const { assetId } = await wallet.assetManager.issue({
  amount: 100_000_000, // [100.000000]
  metadata: {
    name: 'Tether USD',
    ticker: 'USD₮',
    decimals: 6,
    icon: 'https://tether.to/images/logoMarkGreen.svg',
  },
})

const { metadata } = await wallet.assetManager.getAssetDetails(assetId)

console.log(metadata)
// { name: 'Tether USD', ticker: 'USD₮', decimals: 6, icon: 'https://tether.to/images/logoMarkGreen.svg' }
Response shape:
type AssetMetadata = Partial<{
  name: string;           // human-readable asset name
  ticker: string;         // short symbol (e.g. "USD₮")
  decimals: number;       // decimal places
  icon: string;           // url to an image for display
}> & Record<string, unknown>;
Metadata is immutable and cannot be changed after issuance. See Asset Metadata for how it’s committed onchain.

Next Steps

Issue Assets

Create new assets with metadata

Check Balance

Query how many units your wallet holds