NFTStandardOwner

Class: NFTStandardOwner

Properties overview

  • admin: State;
  • Overrides: SmartContract.deploy

Methods overview

  • canApproveAddress()
  • canChangeVerificationKey()
  • canPause()
  • canResume()
  • canTransfer()
  • deploy()
  • ensureOwnerSignature()

Defined in: packages/nft/src/interfaces/owner.ts:73

The NFTStandardOwner contract is the default implementation of the NFTOwnerBase interface.

Extends

  • SmartContract

Implements

Constructors

new NFTStandardOwner()

new NFTStandardOwner(address: PublicKey, tokenId?: Field): NFTStandardOwner

Defined in: node_modules/o1js/dist/node/lib/mina/zkapp.d.ts:148

Parameters

address

PublicKey

tokenId?

Field

Returns

NFTStandardOwner

Inherited from

SmartContract.constructor

Properties

admin

admin: State<PublicKey>;

Defined in: packages/nft/src/interfaces/owner.ts:78

The public key of the contract's administrator.
This account has the authority to perform administrative actions such as pausing the contract or upgrading the verification key.

Methods

canApproveAddress()

canApproveAddress(
   collection: PublicKey, 
   nft: PublicKey, 
approved: PublicKey): Promise<Bool>

Defined in: packages/nft/src/interfaces/owner.ts:135

Parameters

collection

PublicKey

nft

PublicKey

approved

PublicKey

Returns

Promise<Bool>

Implementation of

NFTOwnerBase.canApproveAddress

canChangeVerificationKey()

canChangeVerificationKey(
   collection: PublicKey, 
   nft: PublicKey, 
vk: VerificationKey): Promise<Bool>

Defined in: packages/nft/src/interfaces/owner.ts:125

Parameters

collection

PublicKey

nft

PublicKey

vk

VerificationKey

Returns

Promise<Bool>

Implementation of

NFTOwnerBase.canChangeVerificationKey

canPause()

canPause(collection: PublicKey, nft: PublicKey): Promise<Bool>

Defined in: packages/nft/src/interfaces/owner.ts:113

Parameters

collection

PublicKey

nft

PublicKey

Returns

Promise<Bool>

Implementation of

NFTOwnerBase.canPause

canResume()

canResume(collection: PublicKey, nft: PublicKey): Promise<Bool>

Defined in: packages/nft/src/interfaces/owner.ts:119

Parameters

collection

PublicKey

nft

PublicKey

Returns

Promise<Bool>

Implementation of

NFTOwnerBase.canResume

canTransfer()

canTransfer(params: TransferExtendedParams): Promise<Bool>

Defined in: packages/nft/src/interfaces/owner.ts:107

Determines if an NFT can be transferred from one owner (from) to another (to) for a specific NFT contract address.

Parameters

params

TransferExtendedParams

The transfer event details.

Returns

Promise<Bool>

A Promise resolving to a Bool indicating whether the transfer is allowed.

Implementation of

NFTOwnerBase.canTransfer

deploy()

deploy(props: NFTOwnerDeployProps): Promise<void>

Defined in: packages/nft/src/interfaces/owner.ts:84

Deploys the contract with initial settings.

Parameters

props

NFTOwnerDeployProps

Deployment properties including admin, upgradeAuthority, uri, canPause, and isPaused.

Returns

Promise<void>

Implementation of

NFTOwnerBase.deploy

Overrides

SmartContract.deploy

ensureOwnerSignature()

ensureOwnerSignature(): Promise<AccountUpdate>

Defined in: packages/nft/src/interfaces/owner.ts:99

Ensures that the transaction is authorized by the contract owner.

Returns

Promise<AccountUpdate>

A signed AccountUpdate from the admin.