nft-standard-draft
Index
Classes
- BuyEvent
- CollectionConfigurationUpdate
- CollectionData
- CollectionDataPacked
- CollectionStateStruct
- ColorPlugin
- LimitMintingEvent
- Metadata
- MetadataMap
- MetadataTree
- MetadataValue
- MintEvent
- MintParams
- MintParamsOption
- MintRequest
- NFT
- NFTData
- NFTImmutableState
- NFTState
- NFTStateStruct
- NFTUpdateProof
- OwnershipChangeEvent
- PauseData
- PauseEvent
- PauseNFTEvent
- PublicKeyOption
- SellEvent
- Storage
- Text
- TransferEvent
- UpdateEvent
- UpgradeAuthorityAnswer
- UpgradeAuthorityDatabase
- UpgradeDatabaseState
- UpgradeDatabaseStatePacked
- UpgradeVerificationKeyEvent
- ValidatorsDecision
- ValidatorsDecisionState
- ValidatorsList
- ValidatorsListEvent
- ValidatorsState
- ValidatorsVotingNativeProof
- ValidatorsVotingProof
- VerificationKeyUpgradeAuthority
- VerificationKeyUpgradeData
- Whitelist
Functions
Interfaces
Type Aliases
Variables
Type Aliases
ChainId
MetadataFieldType
NFTAdminBase
The NFTAdminBase
interface defines the administrative functionalities required for managing an NFT collection on the Mina Protocol.
It extends the SmartContract
class and specifies methods that enforce permissions and validations for various NFT operations.
NFTAdminContractConstructor
Defines a constructor for contracts implementing NFTAdminBase
, accepting an admin
public key and returning an instance of NFTAdminBase
.
Type declaration
Parameters
admin: PublicKey
The public key of the contract's administrator.
Returns NFTAdminBase
PausableContract
The PausableContract interface provides a mechanism to dynamically enable or disable
certain functionalities within smart contracts. It extends the SmartContract
class
and introduces methods that allow a contract to be paused and resumed, which is crucial
for managing emergencies, upgrades, or maintenance periods.
By implementing the PausableContract interface, contracts gain greater control over their operational states, enhancing security and flexibility in response to various scenarios.
UpgradableContract
Interface for contracts that can be upgraded.
Extends SmartContract
and requires methods to retrieve the associated upgrade authority contract
and to upgrade the contract's verification key using the provided verification key.
UpgradeAuthorityBase
Interface that any upgrade authority contract should implement.
Extends SmartContract
and requires the implementation of the verifyUpgradeData()
method,
which takes VerificationKeyUpgradeData
as input and returns an UpgradeAuthorityAnswer
.
UpgradeAuthorityContractConstructor
Defines a constructor for contracts implementing UpgradeAuthorityBase
,
accepting an upgradeAuthority
public key and returning an instance of UpgradeAuthorityBase
.
Type declaration
Parameters
upgradeAuthority: PublicKey
Returns UpgradeAuthorityBase
ValidatorDecisionType
Variables
constChainId
Chain IDs following Auro Wallet naming conventions.
Type declaration
mina:devnet: Field
mina:mainnet: Field
zeko:devnet: Field
zeko:mainnet: Field
constCollectionErrors
Type declaration
adminContractAddressNotSet: string
cannotMint: string
cannotMintMasterNFT: string
cannotUpgradeVerificationKey: string
collectionNotPaused: string
collectionPaused: string
creatorSignatureRequiredToUpgradeCollection: string
creatorSignatureRequiredToUpgradeNFT: string
mintApprovalNotRequired: string
mintApprovalRequired: string
noPermissionToChangeBaseUri: string
noPermissionToChangeCreator: string
noPermissionToChangeName: string
noPermissionToChangeRoyalty: string
noPermissionToChangeTransferFee: string
noPermissionToPause: string
noPermissionToResume: string
noPermissionToSetAdmin: string
transferApprovalNotRequired: string
transferApprovalRequired: string
transferNotAllowed: string
updateApprovalNotRequired: string
updateApprovalRequired: string
upgradeContractAddressNotSet: string
wrongMasterNFTaddress: string
constMetadataFieldTypeValues
Mapping of metadata field types to their code values and associated types.
Type declaration
readonlyfield: { code: [object Object]; inputType: typeof Field & (x: string | number | bigint | Field | FieldVar | FieldConst) => Field; storedType: typeof Field & (x: string | number | bigint | Field | FieldVar | FieldConst) => Field }
readonlycode: [object Object]
readonlyinputType: typeof Field & (x: string | number | bigint | Field | FieldVar | FieldConst) => Field
readonlystoredType: typeof Field & (x: string | number | bigint | Field | FieldVar | FieldConst) => Field
readonlyimage: { code: [object Object]; inputType: string; storedType: typeof Text }
readonlycode: [object Object]
readonlyinputType: string
readonlystoredType: typeof Text
readonlymap: { code: [object Object]; inputType: typeof Metadata; storedType: typeof Metadata }
readonlystring: { code: [object Object]; inputType: string; storedType: typeof Field & (x: string | number | bigint | Field | FieldVar | FieldConst) => Field }
readonlycode: [object Object]
readonlyinputType: string
readonlystoredType: typeof Field & (x: string | number | bigint | Field | FieldVar | FieldConst) => Field
readonlytext: { code: [object Object]; inputType: string; storedType: typeof Text }
readonlycode: [object Object]
readonlyinputType: string
readonlystoredType: typeof Text
readonlytree: { code: [object Object]; inputType: typeof MetadataTree; storedType: typeof MetadataTree }
readonlycode: [object Object]
readonlyinputType: typeof MetadataTree
readonlystoredType: typeof MetadataTree
readonlyurl: { code: [object Object]; inputType: string; storedType: typeof Text }
readonlycode: [object Object]
readonlyinputType: string
readonlystoredType: typeof Text
constNFTProgram
Defines the NFTProgram ZkProgram with methods for updating NFT metadata.
constTEXT_TREE_HEIGHT
The default height of the Merkle tree used to represent the text data.
constValidatorDecisionType
Validator decision types for upgrade proposals.
Type declaration
readonlyupdateDatabase: Field
readonlyupdateValidatorsList: Field
constValidatorsVoting
The ValidatorsVoting
ZkProgram implements the voting logic for validators.
The possible types for metadata fields.