Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Tzip12ContractAbstraction

Hierarchy

  • Tzip12ContractAbstraction

Index

Constructors

constructor

  • new Tzip12ContractAbstraction(contractAbstraction: ContractAbstraction<ContractProvider | Wallet, DefaultMethods<ContractProvider | Wallet>, DefaultMethodsObject<ContractProvider | Wallet>, DefaultViews, DefaultContractViews, unknown>, context: MetadataContext): Tzip12ContractAbstraction

Methods

getTokenMetadata

  • description

    Fetches the token metadata for a specified token ID. The function first tries to find a token_metadata view in the contract metadata and to execute it with the token ID. If there is no view, the function tries to find a token_metadata bigmap in the top-level pairs of the storage.

    throws

    {@link TokenIdNotFound, TokenMetadataNotFound, InvalidTokenMetadata}

    Parameters

    • tokenId: number

      The ID of the token for which we want to retrieve token metadata

    Returns Promise<TokenMetadata>

    An object of type TokenMetadata

isTzip12Compliant

  • isTzip12Compliant(): Promise<boolean>
  • description

    The Tzip-016 "interfaces" field MUST be present in the contract metadata. It should contain "TZIP-012[version-info]"

    Returns Promise<boolean>

    True if "interfaces" field is present and contains "TZIP-012", false otherwise

Generated using TypeDoc