Skip to main content

MinaNFTContract

MinaNFTContract is a smart contract that implements the Mina NFT standard.

Hierarchy

  • SmartContract
    • MinaNFTContract

Index

Constructors

externalconstructor

  • Parameters

    • externaladdress: PublicKey
    • externaloptionaltokenId: Field

    Returns MinaNFTContract

Properties

escrow

escrow: State<Field> = ...

The escrow of the NFT - Poseidon hash of three escrow's public keys

metadata

metadata: State<Metadata> = ...

The metadata of the NFT.

name

name: State<Field> = ...

The name of the NFT.

owner

owner: State<Field> = ...

The owner of the NFT - Poseidon hash of owner's public key

storage

storage: State<Storage> = ...

The storage of the NFT - IPFS (i:...) or Arweave (a:...) hash string

version

version: State<UInt64> = ...

The version of the NFT, increases by one with the changing of the metadata or the owner

Methods

approveEscrow

escrowTransfer

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


    Parameters

    • 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>

update