NFTImmutableState
Class: NFTImmutableState
Properties overview
- address: PublicKey = PublicKey; ↗
- canApprove: Bool = Bool; ↗
- canChangeMetadata: Bool = Bool; ↗
- canChangeMetadataVerificationKeyHash: Bool = Bool; ↗
- canChangeName: Bool = Bool; ↗
- canChangeOwnerByProof: Bool = Bool; ↗
- canChangeStorage: Bool = Bool; ↗
- canPause: Bool = Bool; ↗
- canTransfer: Bool = Bool; ↗
- id: UInt64 = UInt64; ↗
- tokenId: Field = Field; ↗
Methods overview
Defined in: packages/nft/src/interfaces/types.ts:91
Represents the immutable state of an NFT, containing read-only properties
and flags that determine the NFT's behavior and permissions.
Extends
- {
address
:PublicKey
;
canApprove
:Bool
;
canChangeMetadata
:Bool
;
canChangeMetadataVerificationKeyHash
:Bool
;
canChangeName
:Bool
;
canChangeOwnerByProof
:Bool
;
canChangeStorage
:Bool
;
canPause
:Bool
;
canTransfer
:Bool
;
id
:UInt64
;
tokenId
:Field
;
}
Constructors
new NFTImmutableState()
new NFTImmutableState(value: {
address: PublicKey;
canApprove: Bool;
canChangeMetadata: Bool;
canChangeMetadataVerificationKeyHash: Bool;
canChangeName: Bool;
canChangeOwnerByProof: Bool;
canChangeStorage: Bool;
canPause: Bool;
canTransfer: Bool;
id: UInt64;
tokenId: Field;
}): NFTImmutableState
Defined in: node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:103
Parameters
value
address
PublicKey
= PublicKey
The address of the NFT contract (readonly).
canApprove
Bool
= Bool
Specifies if the NFT's approved address can be changed (readonly).
canChangeMetadata
Bool
= Bool
Indicates whether the NFT's metadata can be updated (readonly).
canChangeMetadataVerificationKeyHash
Bool
= Bool
Indicates whether the verification key hash for the metadata can be changed (readonly).
canChangeName
Bool
= Bool
Specifies if the name of the NFT can be changed (readonly).
canChangeOwnerByProof
Bool
= Bool
Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly).
canChangeStorage
Bool
= Bool
Determines whether the storage associated with the NFT can be altered (readonly).
canPause
Bool
= Bool
Specifies if the NFT contract can be paused, preventing certain operations (readonly).
canTransfer
Bool
= Bool
Specifies if the NFT's ownership can be transferred (readonly).
id
UInt64
= UInt64
The unique identifier of the NFT within the collection (readonly).
tokenId
Field
= Field
The token ID associated with the NFT (readonly).
Returns
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).constructor
Properties
address
address: PublicKey = PublicKey;
Defined in: packages/nft/src/interfaces/types.ts:109
The address of the NFT contract (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).address
canApprove
canApprove: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:97
Specifies if the NFT's approved address can be changed (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canApprove
canChangeMetadata
canChangeMetadata: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:99
Indicates whether the NFT's metadata can be updated (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canChangeMetadata
canChangeMetadataVerificationKeyHash
canChangeMetadataVerificationKeyHash: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:105
Indicates whether the verification key hash for the metadata can be changed (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canChangeMetadataVerificationKeyHash
canChangeName
canChangeName: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:103
Specifies if the name of the NFT can be changed (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canChangeName
canChangeOwnerByProof
canChangeOwnerByProof: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:93
Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canChangeOwnerByProof
canChangeStorage
canChangeStorage: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:101
Determines whether the storage associated with the NFT can be altered (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canChangeStorage
canPause
canPause: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:107
Specifies if the NFT contract can be paused, preventing certain operations (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canPause
canTransfer
canTransfer: Bool = Bool;
Defined in: packages/nft/src/interfaces/types.ts:95
Specifies if the NFT's ownership can be transferred (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).canTransfer
id
id: UInt64 = UInt64;
Defined in: packages/nft/src/interfaces/types.ts:113
The unique identifier of the NFT within the collection (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).id
tokenId
tokenId: Field = Field;
Defined in: packages/nft/src/interfaces/types.ts:111
The token ID associated with the NFT (readonly).
Inherited from
Struct({
/ Determines if the NFT's ownership can be changed via a zero-knowledge proof (readonly). /
canChangeOwnerByProof: Bool, // readonly
/ Specifies if the NFT's ownership can be transferred (readonly). /
canTransfer: Bool, // readonly
/ Specifies if the NFT's approved address can be changed (readonly). /
canApprove: Bool, // readonly
/ Indicates whether the NFT's metadata can be updated (readonly). /
canChangeMetadata: Bool, // readonly
/ Determines whether the storage associated with the NFT can be altered (readonly). /
canChangeStorage: Bool, // readonly
/ Specifies if the name of the NFT can be changed (readonly). /
canChangeName: Bool, // readonly
/ Indicates whether the verification key hash for the metadata can be changed (readonly). /
canChangeMetadataVerificationKeyHash: Bool, // readonly
/ Specifies if the NFT contract can be paused, preventing certain operations (readonly). /
canPause: Bool, // readonly
/ The address of the NFT contract (readonly). /
address: PublicKey, // readonly
/ The token ID associated with the NFT (readonly). /
tokenId: Field, // readonly
/ The unique identifier of the NFT within the collection (readonly). /
id: UInt64, // readonly
}).tokenId
Methods
assertEqual()
static assertEqual(a: NFTImmutableState, b: NFTImmutableState): void
Defined in: packages/nft/src/interfaces/types.ts:120
Asserts that two NFTImmutableState instances are equal.
Parameters
a
The first NFTImmutableState instance.
b
The second NFTImmutableState instance.
Returns
void
fromNFTData()
static fromNFTData(params: {
address: PublicKey;
nftData: NFTData;
tokenId: Field;
}): NFTImmutableState
Defined in: packages/nft/src/interfaces/types.ts:141
Creates a new NFTImmutableState from NFTData and other parameters.
Parameters
params
The parameters including nftData, creator, address, and tokenId.
address
PublicKey
nftData
tokenId
Field
Returns
A new NFTImmutableState instance.
Updated 10 days ago