Skip to main content
Version: v3.x

Minimal Anti Collusion Infrastructure (MACI) / ProofGenerator

Class: ProofGenerator

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

Proof generator class for message processing and tally.

Constructors​

Constructor​

new ProofGenerator(params): ProofGenerator

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

Initialize class properties

Parameters​

params​

IProofGeneratorParams

initialization params

Returns​

ProofGenerator

Methods​

generateMpProofs()​

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

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

Generate message processing proofs

Parameters​

options?​

IGenerateProofsOptions

Returns​

Promise<Proof[]>

message processing proofs


generateTallyProofs()​

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

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

Generate tally proofs

Parameters​

networkName​

string

current network name

chainId?​

string

current chain id

options?​

IGenerateProofsOptions

Returns​

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

tally proofs


prepareState()​

static prepareState(params): Promise<MaciState>

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

Get maci state from local file or from contract

Parameters​

params​

IPrepareStateParams

params to prepare maci state

Returns​

Promise<MaciState>

maci state