Skip to main content

NFTData

Represents the data associated with an NFT, including state and permission flags.

Hierarchy

  • { canChangeMetadata: Bool; canChangeMetadataVerificationKeyHash: Bool; canChangeName: Bool; canChangeOwnerByProof: Bool; canChangeOwnerBySignature: Bool; canChangePrice: Bool; canChangeStorage: Bool; canPause: Bool; id: UInt32; isPaused: Bool; price: UInt64; requireOwnerSignatureToUpgrade: Bool; version: UInt32 }
    • NFTData

Index

Constructors

externalconstructor

  • new NFTData(value: { canChangeMetadata: Bool; canChangeMetadataVerificationKeyHash: Bool; canChangeName: Bool; canChangeOwnerByProof: Bool; canChangeOwnerBySignature: Bool; canChangePrice: Bool; canChangeStorage: Bool; canPause: Bool; id: UInt32; isPaused: Bool; price: UInt64; requireOwnerSignatureToUpgrade: Bool; version: UInt32 }): NFTData
  • Parameters

    • externalvalue: { canChangeMetadata: Bool; canChangeMetadataVerificationKeyHash: Bool; canChangeName: Bool; canChangeOwnerByProof: Bool; canChangeOwnerBySignature: Bool; canChangePrice: Bool; canChangeStorage: Bool; canPause: Bool; id: UInt32; isPaused: Bool; price: UInt64; requireOwnerSignatureToUpgrade: Bool; version: UInt32 }
      • externalcanChangeMetadata: Bool = Bool

        Indicates whether the NFT's metadata can be updated (readonly).

      • externalcanChangeMetadataVerificationKeyHash: Bool = Bool

        Indicates whether the verification key hash for the metadata can be changed (readonly).

      • externalcanChangeName: Bool = Bool

        Specifies if the name of the NFT can be changed (readonly).

      • externalcanChangeOwnerByProof: Bool = Bool

        Determines whether the NFT's ownership can be changed via a zero-knowledge proof (readonly).

      • externalcanChangeOwnerBySignature: Bool = Bool

        Specifies if the NFT's ownership can be transferred through the owner's signature (readonly).

      • externalcanChangePrice: Bool = Bool

        Indicates if the price of the NFT can be modified (readonly).

      • externalcanChangeStorage: Bool = Bool

        Determines whether the storage associated with the NFT can be altered (readonly).

      • externalcanPause: Bool = Bool

        Specifies if the NFT contract can be paused, preventing certain operations (readonly).

      • externalid: UInt32 = UInt32

        The unique identifier of the NFT within the collection.

      • externalisPaused: Bool = Bool

        Indicates whether the NFT contract is currently paused.

      • externalprice: UInt64 = UInt64

        The price of the NFT.

      • externalrequireOwnerSignatureToUpgrade: Bool = Bool

        Determines whether the owner's signature is required to upgrade the NFT's verification key (readonly).

      • externalversion: UInt32 = UInt32

        The version number of the NFT state.

    Returns NFTData

Properties

canChangeMetadata

canChangeMetadata: Bool = Bool

Indicates whether the NFT's metadata can be updated (readonly).

canChangeMetadataVerificationKeyHash

canChangeMetadataVerificationKeyHash: Bool = Bool

Indicates whether the verification key hash for the metadata can be changed (readonly).

canChangeName

canChangeName: Bool = Bool

Specifies if the name of the NFT can be changed (readonly).

canChangeOwnerByProof

canChangeOwnerByProof: Bool = Bool

Determines whether the NFT's ownership can be changed via a zero-knowledge proof (readonly).

canChangeOwnerBySignature

canChangeOwnerBySignature: Bool = Bool

Specifies if the NFT's ownership can be transferred through the owner's signature (readonly).

canChangePrice

canChangePrice: Bool = Bool

Indicates if the price of the NFT can be modified (readonly).

canChangeStorage

canChangeStorage: Bool = Bool

Determines whether the storage associated with the NFT can be altered (readonly).

canPause

canPause: Bool = Bool

Specifies if the NFT contract can be paused, preventing certain operations (readonly).

id

id: UInt32 = UInt32

The unique identifier of the NFT within the collection.

isPaused

isPaused: Bool = Bool

Indicates whether the NFT contract is currently paused.

price

price: UInt64 = UInt64

The price of the NFT.

requireOwnerSignatureToUpgrade

requireOwnerSignatureToUpgrade: Bool = Bool

Determines whether the owner's signature is required to upgrade the NFT's verification key (readonly).

version

version: UInt32 = UInt32

The version number of the NFT state.

Methods

pack

  • pack(): Field
  • Packs the NFTData into a single Field for efficient storage.


    Returns Field

    The packed Field representation of the NFTData.

staticnew

  • new(params?: { canChangeMetadata?: boolean; canChangeMetadataVerificationKeyHash?: boolean; canChangeName?: boolean; canChangeOwnerByProof?: boolean; canChangeOwnerBySignature?: boolean; canChangePrice?: boolean; canChangeStorage?: boolean; canPause?: boolean; id?: number; isPaused?: boolean; price?: number; requireOwnerSignatureToUpgrade?: boolean; version?: number }): NFTData
  • Creates a new NFTData instance with optional parameters.


    Parameters

    • params: { canChangeMetadata?: boolean; canChangeMetadataVerificationKeyHash?: boolean; canChangeName?: boolean; canChangeOwnerByProof?: boolean; canChangeOwnerBySignature?: boolean; canChangePrice?: boolean; canChangeStorage?: boolean; canPause?: boolean; id?: number; isPaused?: boolean; price?: number; requireOwnerSignatureToUpgrade?: boolean; version?: number } = {}

      The parameters to create the NFTData.

      • optionalcanChangeMetadata: boolean
      • optionalcanChangeMetadataVerificationKeyHash: boolean
      • optionalcanChangeName: boolean
      • optionalcanChangeOwnerByProof: boolean
      • optionalcanChangeOwnerBySignature: boolean
      • optionalcanChangePrice: boolean
      • optionalcanChangeStorage: boolean
      • optionalcanPause: boolean
      • optionalid: number
      • optionalisPaused: boolean
      • optionalprice: number
      • optionalrequireOwnerSignatureToUpgrade: boolean
      • optionalversion: number

    Returns NFTData

    A new NFTData instance.

staticunpack

  • Unpacks a Field into an NFTData instance.


    Parameters

    • packed: Field

      The packed Field representation of the NFTData.

    Returns NFTData

    A new NFTData instance.