Skip to main content

MinaNFTNameServiceContract

MinaNFTNameServiceContract is a smart contract that implements the Mina NFT Name Service standard.

Hierarchy

  • TokenContract
    • MinaNFTNameServiceContract

Index

Constructors

externalconstructor

  • Parameters

    • externaladdress: PublicKey
    • externaloptionaltokenId: Field

    Returns MinaNFTNameServiceContract

Properties

events

events: { approveEscrow: typeof EscrowApproval; escrowTransfer: typeof EscrowTransfer; mint: typeof NFTMintData; update: typeof Update; upgrade: typeof PublicKey } = ...

Type declaration

oracle

oracle: State<PublicKey> = ...

The oracle of the contract - the public key used to sign name allowances

Methods

approveBase

  • approveBase(forest: AccountUpdateForest): Promise<void>
  • Parameters

    • forest: AccountUpdateForest

    Returns Promise<void>

approveEscrow

deploy

  • deploy(args: DeployArgs): Promise<void>
  • Parameters

    • args: DeployArgs

    Returns Promise<void>

escrowTransfer

  • escrowTransfer(address: PublicKey, data: EscrowTransfer, signature1: Signature, signature2: Signature, signature3: Signature, escrow1: PublicKey, escrow2: PublicKey, escrow3: PublicKey): Promise<void>
  • Transfer the NFT to new owner


    Parameters

    • address: PublicKey

      address of the NFT

    • data: EscrowTransfer

      EscrowTransfer - data for the transfer

    • signature1: Signature

      signature of the first escrow

    • signature2: Signature

      signature of the second escrow

    • signature3: Signature

      signature of the third escrow

    • escrow1: PublicKey

      public key of the first escrow

    • escrow2: PublicKey

      public key of the second escrow

    • escrow3: PublicKey

      public key of the third escrow

    Returns Promise<void>

init

  • init(): void
  • Returns void

isNFT

  • isNFT(address: PublicKey): void
  • Parameters

    • address: PublicKey

    Returns void

mint

  • Mints the NFT


    Parameters

    Returns Promise<void>

setOracle

  • setOracle(newOracle: PublicKey, signature: Signature): Promise<void>
  • Parameters

    • newOracle: PublicKey
    • signature: Signature

    Returns Promise<void>

update

  • Updates metadata of the NFT


    Parameters

    Returns Promise<void>

upgrade

  • upgrade(address: PublicKey, vk: VerificationKey, signature: Signature): Promise<void>
  • Upgrade the NFT to the new version


    Parameters

    • address: PublicKey

      the address of the NFT

    • vk: VerificationKey

      the verification key of the new MinaNFTContract

    • signature: Signature

      the signature of the name service allowing the upgrading of the NFT

    Returns Promise<void>