Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InMemoryProvingKey

description

holds the proving key, create proof for spend descriptions The class can be instantiated from a proving key or a spending key

Hierarchy

  • InMemoryProvingKey

Index

Constructors

constructor

Methods

prepareSpendDescription

  • prepareSpendDescription(parametersSpendProof: Pick<ParametersSpendProof, "amount" | "root" | "address" | "randomCommitmentTrapdoor" | "publicKeyReRandomization" | "saplingContext" | "witness">): Promise<Pick<SaplingSpendDescription, "rtAnchor" | "commitmentValue" | "nullifier" | "publicKeyReRandomization" | "proof">>
  • description

    Prepare an unsigned sapling spend description using the proving key

    Parameters

    • parametersSpendProof: Pick<ParametersSpendProof, "amount" | "root" | "address" | "randomCommitmentTrapdoor" | "publicKeyReRandomization" | "saplingContext" | "witness">

    Returns Promise<Pick<SaplingSpendDescription, "rtAnchor" | "commitmentValue" | "nullifier" | "publicKeyReRandomization" | "proof">>

    The unsinged spend description

Static fromSpendingKey

  • description

    Allows to instantiate the InMemoryProvingKey from an encrypted/unencrypted spending key

    example
    await InMemoryProvingKey.fromSpendingKey('sask27SLmU9herddHz4qFJBLMjWYMbJF8RtS579w9ej9mfCYK7VUdyCJPHK8AzW9zMsopGZEkYeNjAY7Zz1bkM7CGu8eKLzrjBLTMC5wWJDhxiK91ahA29rhDRsHdJDV2u2jFwb2MNUix8JW7sAkAqYVaJpCehTBPgRQ1KqKwqqUaNmuD8kazd4Q8MCWmgbWs21Yuomdqyi9FLigjRp7oY4m5adaVU19Nj1AHvsMY2tePeU2L')
    

    Parameters

    • spendingKey: string

      Base58Check-encoded spending key

    • Optional password: string

      Optional password to decrypt the spending key

    Returns Promise<InMemoryProvingKey>

Generated using TypeDoc