Skip to main content

RedactedTree

Index

Constructors

constructor

  • new RedactedTree(height: number, originalTree: MerkleTree): RedactedTree
  • Parameters

    • height: number
    • originalTree: MerkleTree

    Returns RedactedTree

Properties

contracts

contracts: any

height

height: number

leafs

leafs: { key: number; value: Field }[] = []

originalTree

originalTree: MerkleTree

redactedTree

redactedTree: MerkleTree

verificationKey

verificationKey: undefined | VerificationKey = undefined

Methods

publiccompile

  • compile(): Promise<VerificationKey>
  • Returns Promise<VerificationKey>

publicdeploy

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

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

    Returns Promise<undefined | PendingTransaction>

publicproof

  • proof(verbose?: boolean): Promise<TreeStateProof>

  • Parameters

    • verbose: boolean = false

    Returns Promise<TreeStateProof>

    proof

publicset

  • set(key: number, value: Field): void
  • copy public attribute


    Parameters

    • key: number

      key of the attribute

    • value: Field

    Returns void