Hierarchy

  • BaseFT
    • NativeToken

Constructors

Properties

metadata: FTMetadata

Methods

  • Get the available balance of an account in indivisible units

    Parameters

    • account: AccountLike

      The account to get the balance of

    Returns Promise<bigint>

  • Converts indivisible units to a decimal number (represented as a string)

    Parameters

    • amount: string | number | bigint

    Returns string

    The amount as a decimal string (e.g. "1.234")

  • Converts a decimal number to indivisible units

    Parameters

    • amount: string | number

      The amount in decimal format (e.g. "1.234")

    Returns bigint

    The amount in indivisible units (e.g. "1234")

  • Transfer tokens from one account to another

    Parameters

    • param: { amount: string | number | bigint; from: AccountLike; receiverId: string }
      • amount: string | number | bigint

        The amount of tokens to transfer in the smallest unit

      • from: AccountLike

        The Account that will transfer the tokens

      • receiverId: string

        The AccountID that will receive the tokens

    Returns Promise<any>