NFTStandardApproval

Class: NFTStandardApproval

Properties overview

  • admin: State;
  • Overrides: SmartContract.deploy

Methods overview

  • canTransfer()
  • deploy()
  • ensureOwnerSignature()

Defined in: packages/nft/src/interfaces/approval.ts:56

The NFTStandardApproval contract is the default implementation of the NFTApprovalBase interface.

Extends

  • SmartContract

Implements

Constructors

new NFTStandardApproval()

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

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

Parameters

address

PublicKey

tokenId?

Field

Returns

NFTStandardApproval

Inherited from

SmartContract.constructor

Properties

admin

admin: State<PublicKey>;

Defined in: packages/nft/src/interfaces/approval.ts:61

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

canTransfer()

canTransfer(params: TransferExtendedParams): Promise<Bool>

Defined in: packages/nft/src/interfaces/approval.ts:95

Determines if an NFT can be transferred.

Parameters

params

TransferExtendedParams

The transfer details.

Returns

Promise<Bool>

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

Implementation of

NFTApprovalBase.canTransfer

deploy()

deploy(props: NFTApprovalDeployProps): Promise<void>

Defined in: packages/nft/src/interfaces/approval.ts:67

Deploys the contract with initial settings.

Parameters

props

NFTApprovalDeployProps

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

Returns

Promise<void>

Implementation of

NFTApprovalBase.deploy

Overrides

SmartContract.deploy

ensureOwnerSignature()

ensureOwnerSignature(): Promise<AccountUpdate>

Defined in: packages/nft/src/interfaces/approval.ts:82

Ensures that the transaction is authorized by the contract owner.

Returns

Promise<AccountUpdate>

A signed AccountUpdate from the admin.