Skip to main content

NFTStateStruct

Represents the on-chain state structure of an NFT. The order of the fields is important and should match the NFT SmartContract.

Hierarchy

  • { metadata: Field; metadataVerificationKeyHash: Field; name: Field; owner: PublicKey; packedData: Field; storage: Storage }
    • NFTStateStruct

Index

Constructors

externalconstructor

  • new NFTStateStruct(value: { metadata: Field; metadataVerificationKeyHash: Field; name: Field; owner: PublicKey; packedData: Field; storage: Storage }): NFTStateStruct
  • Parameters

    • externalvalue: { metadata: Field; metadataVerificationKeyHash: Field; name: Field; owner: PublicKey; packedData: Field; storage: Storage }
      • externalmetadata: Field = Field
      • externalmetadataVerificationKeyHash: Field = Field
      • externalname: Field = Field
      • externalowner: PublicKey = PublicKey
      • externalpackedData: Field = Field
      • externalstorage: Storage = Storage

    Returns NFTStateStruct

Properties

metadata

metadata: Field = Field

metadataVerificationKeyHash

metadataVerificationKeyHash: Field = Field

name

name: Field = Field

owner

owner: PublicKey = PublicKey

packedData

packedData: Field = Field

storage

storage: Storage = Storage

Methods

staticassertEqual

  • Asserts that two NFTStateStruct instances are equal.


    Parameters

    Returns void

staticfromAccount

  • fromAccount(account: Account): { metadata: Field; metadataVerificationKeyHash: Field; name: Field; owner: PublicKey; packedData: Field; storage: Storage }
  • Creates an NFTStateStruct from an account's app state.


    Parameters

    • account: Account

      The account containing the zkApp state.

    Returns { metadata: Field; metadataVerificationKeyHash: Field; name: Field; owner: PublicKey; packedData: Field; storage: Storage }

    A new NFTStateStruct instance.

    • metadata: Field
    • metadataVerificationKeyHash: Field
    • name: Field
    • owner: PublicKey
    • packedData: Field
    • storage: Storage