@arkade-os/sdk Documentation - v0.4.36
    Preparing search index...

    Class AssetManager

    Asset manager interface for asset operations that require wallet identity.

    IReadonlyAssetManager

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    wallet: Wallet

    Methods

    • Burn assets.

      Parameters

      • params: BurnParams

        Parameters for burning

        Parameters accepted by IAssetManager.burn.

        • amount: bigint

          Amount of asset to burn

        • assetId: string

          Existing asset ID, made up of genesis (Arkade) transaction ID and zero-based asset group index

      Returns Promise<string>

      Promise resolving to the Arkade transaction ID

      const txid = await wallet.assetManager.burn({
      assetId: 'abc123...',
      amount: 100
      });
    • Issue a new asset.

      Parameters

      • params: IssuanceParams

        Parameters for asset issuance

        Parameters accepted by IAssetManager.issue.

        • amount: bigint

          Initial amount of asset to issue

        • OptionalcontrolAssetId?: string

          Optional control asset ID that can be used for future reissuance

        • Optionalmetadata?: AssetMetadata

          Immutable asset metadata including ticker, decimals, icon

      Returns Promise<IssuanceResult>

      Promise resolving to the Arkade transaction ID and asset ID

      // Issue a simple non-reissuable asset
      const result = await wallet.assetManager.issue({ amount: 1000 });
      console.log('Asset ID:', result.assetId);

      // Issue a reissuable asset with an existing control asset
      const result = await wallet.assetManager.issue({
      amount: 1000,
      controlAssetId: 'existingControlAssetId'
      });
      console.log('Asset ID:', result.assetId);
    • Reissue more units of an existing asset. Requires ownership of the control asset.

      Parameters

      • params: ReissuanceParams

        Parameters for asset reissuance

        Parameters accepted by IAssetManager.reissue.

        • amount: bigint

          Amount of asset to issue

        • assetId: string

          Existing asset ID, made up of genesis (Arkade) transaction ID and zero-based asset group index

      Returns Promise<string>

      Promise resolving to the Arkade transaction ID

      const txid = await wallet.assetManager.reissue({
      assetId: 'def456...',
      amount: 500
      });