Class AptosToken

Class for managing aptos_token

Hierarchy

  • AptosToken

Constructors

Properties

provider: Provider
tokenType: string = "0x4::token::Token"

Methods

  • Add token property

    Returns

    The hash of the transaction submitted to the API

    Parameters

    • creator: AptosAccount

      Creator account

    • token: MaybeHexString

      Token address

    • propertyKey: string
    • propertyType: "U64" | "U128" | "U256" | "BOOLEAN" | "U8" | "U16" | "U32" | "ADDRESS" | "VECTOR" | "STRING"
    • propertyValue: string
    • Optional tokenType: string
    • Optional extraArgs: OptionalTransactionArgs

    Returns Promise<string>

  • Mint a new token within the specified account

    Returns

    The hash of the transaction submitted to the API

    Parameters

    • account: AptosAccount

      AptosAccount where token will be created

    • collection: string

      Name of collection, that token belongs to

    • description: string

      Token description

    • name: string

      Token name

    • uri: string

      URL to additional info about token

    • propertyKeys: string[] = []

      the property keys for storing on-chain properties

    • propertyTypes: string[] = []

      the type of property values

    • propertyValues: string[] = []

      the property values to be stored on-chain

    • Optional extraArgs: OptionalTransactionArgs

    Returns Promise<string>

  • Mint a soul bound token into a recipient's account

    Returns

    The hash of the transaction submitted to the API

    Parameters

    • account: AptosAccount

      AptosAccount that mints the token

    • collection: string

      Name of collection, that token belongs to

    • description: string

      Token description

    • name: string

      Token name

    • uri: string

      URL to additional info about token

    • recipient: AptosAccount

      AptosAccount where token will be created

    • propertyKeys: string[] = []

      the property keys for storing on-chain properties

    • propertyTypes: string[] = []

      the type of property values

    • propertyValues: string[] = []

      the property values to be stored on-chain

    • Optional extraArgs: OptionalTransactionArgs

    Returns Promise<string>

  • Update token property

    Returns

    The hash of the transaction submitted to the API

    Parameters

    • creator: AptosAccount

      Creator account

    • token: MaybeHexString

      Token address

    • propertyKey: string
    • propertyType: "U64" | "U128" | "U256" | "BOOLEAN" | "U8" | "U16" | "U32" | "ADDRESS" | "VECTOR" | "STRING"
    • propertyValue: string
    • Optional tokenType: string
    • Optional extraArgs: OptionalTransactionArgs

    Returns Promise<string>

Generated using TypeDoc