Skip to main content
Version: v2.x

Minimal Anti Collusion Infrastructure (MACI) / ProofGenerator

Class: ProofGenerator

Defined in: packages/contracts/build/tasks/helpers/ProofGenerator.d.ts:8

Proof generator class for message processing and tally.

Constructors

new ProofGenerator()

new ProofGenerator(params): ProofGenerator

Defined in: packages/contracts/build/tasks/helpers/ProofGenerator.d.ts:57

Initialize class properties

Parameters

params

IProofGeneratorParams

initialization params

Returns

ProofGenerator

Methods

generateMpProofs()

generateMpProofs(options?): Promise<Proof[]>

Defined in: packages/contracts/build/tasks/helpers/ProofGenerator.d.ts:63

Generate message processing proofs

Parameters

options?

IGenerateProofsOptions

Returns

Promise<Proof[]>

message processing proofs


generateTallyProofs()

generateTallyProofs(network, options?): Promise<{ proofs: Proof[]; tallyData: TallyData; }>

Defined in: packages/contracts/build/tasks/helpers/ProofGenerator.d.ts:70

Generate tally proofs

Parameters

network

Network

current network

options?

IGenerateProofsOptions

Returns

Promise<{ proofs: Proof[]; tallyData: TallyData; }>

tally proofs


prepareState()

static prepareState(params): Promise<MaciState>

Defined in: packages/contracts/build/tasks/helpers/ProofGenerator.d.ts:51

Get maci state from local file or from contract

Parameters

params

IPrepareStateParams

params to prepare maci state

Returns

Promise<MaciState>

maci state