Class Arc54

The Arc54 class provides methods for interacting with the ARC54 contract.

Constructors

Methods

  • Burn a specific amount of an asset.

    Parameters

    • network: Network

      The network to use.

    • assetId: number

      The ID of the asset to burn.

    • amount: number

      The amount of the asset to burn.

    • sender: {
          address: string;
          signer: TransactionSigner;
      }

      The sender's address and signer.

      • address: string
      • signer: TransactionSigner

    Returns Promise<string>

    The transaction ID.

  • Get the application ID and address for the ARC54 contract on a given network.

    Parameters

    • network: Network

      The network to use.

    Returns {
        appAddress: Address;
        appId: number;
    }

    An object containing the application ID and address.

    • appAddress: Address
    • appId: number
  • Get the total amount of a specific asset that has been burned.

    Parameters

    • network: Network

      The network to use.

    • assetId: number

      The ID of the asset to check.

    Returns Promise<bigint>

    The total amount of the asset that has been burned.

  • Check if an address is opted into a specific asset.

    Parameters

    • network: Network

      The network to use.

    • assetId: number

      The ID of the asset to check.

    • address: string

      The address to check.

    Returns Promise<boolean>

    A boolean indicating whether the address is opted in.