Skip to main content

RedactedMinaNFT

Base class for MinaNFT

Hierarchy

Index

Constructors

constructor

Properties

metadata

metadata: Map<string, PrivateMetadata>

nft

staticbadgeVerificationKey

badgeVerificationKey: undefined | VerificationKey

staticbadgeVerifierVerificationKey

badgeVerifierVerificationKey: undefined | VerificationKey

staticcache

cache: undefined | Cache

staticescrowVerificationKey

escrowVerificationKey: undefined | VerificationKey

staticnamesVerificationKey

namesVerificationKey: undefined | VerificationKey

staticredactedMapVerificationKey

redactedMapVerificationKey: undefined | VerificationKey

statictransferVerificationKey

transferVerificationKey: undefined | VerificationKey

staticupdateVerificationKey

updateVerificationKey: undefined | VerificationKey

staticupdaterVerificationKey

updaterVerificationKey: undefined | VerificationKey

staticverificationKey

verificationKey: undefined | VerificationKey

staticverifierVerificationKey

verifierVerificationKey: undefined | VerificationKey

Methods

publiccopyMetadata

  • copyMetadata(key: string): void
  • copy public attribute


    Parameters

    • key: string

      key of the attribute

    Returns void

publicgetMetadata

  • Gets public attribute


    Parameters

    • key: string

      key of the attribute

    Returns undefined | PrivateMetadata

    value of the attribute

publicgetMetadataRootAndMap

  • Calculates a root and MerkleMap of the publicAttributes


    Returns { map: MetadataMap; root: Metadata }

    Root and MerkleMap of the publicAttributes

publicprepareProofData

  • prepareProofData(): Promise<string[]>

  • Returns Promise<string[]>

    proof

publicproof

publicstaticcompile

  • compile(rollup?: boolean): Promise<VerificationKey>
  • Compiles MinaNFT contract


    Parameters

    • rollup: boolean = false

    Returns Promise<VerificationKey>

    verification key

publicstaticcompileBadge

  • compileBadge(): Promise<VerificationKey>
  • Compiles MinaNFTVerifierBadge contract


    Returns Promise<VerificationKey>

    verification key

publicstaticcompileEscrow

  • compileEscrow(): Promise<VerificationKey>
  • Compiles Escrow contract


    Returns Promise<VerificationKey>

    verification key

publicstaticcompileRedactedMap

  • compileRedactedMap(): Promise<VerificationKey>
  • Compiles RedactedMinaNFTMapCalculation contract


    Returns Promise<VerificationKey>

    verification key

publicstaticcompileVerifier

  • compileVerifier(): Promise<VerificationKey>
  • Compiles MinaNFTVerifier contract


    Returns Promise<VerificationKey>

    verification key

publicstaticdeploy

  • deploy(deployer: PrivateKey, privateKey: PrivateKey, nonce?: number): Promise<undefined | PendingTransaction>
  • Parameters

    • deployer: PrivateKey
    • privateKey: PrivateKey
    • optionalnonce: number

    Returns Promise<undefined | PendingTransaction>

publicstaticsetCache

  • setCache(cache: Cache): void
  • Sets a cache for prover keys


    Parameters

    • cache: Cache

    Returns void

publicstaticsetCacheFolder

  • setCacheFolder(folder?: string): void
  • Sets a cache folder for prover keys


    Parameters

    • folder: string = "./cache"

      folder for prover keys default is "./cache"

    Returns void

publicstaticstringFromField

  • stringFromField(field: Field): string
  • Converts a Field to a string


    Parameters

    • field: Field

      Field to convert

    Returns string

    string

publicstaticstringFromFields

  • stringFromFields(fields: Field[]): string
  • Converts a Field[] to a string


    Parameters

    • fields: Field[]

      Fields to convert

    Returns string

    string

publicstaticstringToField

  • stringToField(item: string): Field
  • Converts a string to a Field


    Parameters

    • item: string

      string to convert

    Returns Field

    string as a Field

publicstaticstringToFields

  • stringToFields(item: string): Field[]
  • Converts a string to a Fields


    Parameters

    • item: string

      string to convert

    Returns Field[]

    string as a Field[]

publicstaticurlFromStorage

  • urlFromStorage(storage: Storage): string
  • Converts a Storage to a storage url string


    Parameters

    Returns string

    string

publicstaticurlFromStorageString

  • urlFromStorageString(storageStr: string): string
  • Converts a string "i:..." or "a:..." to a storage url string


    Parameters

    • storageStr: string

      string to convert

    Returns string

    string