Skip to main content
Version: 2.1.x

Class: CircuitConfig

src.CircuitConfig

Use the default circuit config like so:

Example

import { CircuitConfig } from '@unirep/circuits'

const {
STATE_TREE_DEPTH,
EPOCH_TREE_DEPTH,
HISTORY_TREE_DEPTH,
NUM_EPOCH_KEY_NONCE_PER_EPOCH,
FIELD_COUNT,
SUM_FIELD_COUNT,
REPL_NONCE_BITS,
SNARK_SCALAR_FIELD,
EPOCH_BITS,
NONCE_BITS,
ATTESTER_ID_BITS,
CHAIN_ID_BITS,
REVEAL_NONCE_BITS,
REP_BITS,
ONE_BIT
} = CircuitConfig.default
info

See current deployment config: testnet-deployment

Constructors

constructor

new CircuitConfig(_config?)

Parameters

NameType
_configObject
_config.EPOCH_TREE_DEPTH?number
_config.FIELD_COUNT?number
_config.HISTORY_TREE_DEPTH?number
_config.NUM_EPOCH_KEY_NONCE_PER_EPOCH?number
_config.REPL_NONCE_BITS?number
_config.STATE_TREE_DEPTH?number
_config.SUM_FIELD_COUNT?number

Defined in

circuits/src/CircuitConfig.ts:91

Properties

ATTESTER_ID_BITS

ATTESTER_ID_BITS: bigint = ATTESTER_ID_BITS

Defined in

circuits/src/CircuitConfig.ts:64


CHAIN_ID_BITS

CHAIN_ID_BITS: bigint = CHAIN_ID_BITS

Defined in

circuits/src/CircuitConfig.ts:65


EPOCH_BITS

EPOCH_BITS: bigint = EPOCH_BITS

Defined in

circuits/src/CircuitConfig.ts:62


EPOCH_TREE_DEPTH

EPOCH_TREE_DEPTH: number

Defined in

circuits/src/CircuitConfig.ts:52


FIELD_COUNT

FIELD_COUNT: number

Defined in

circuits/src/CircuitConfig.ts:55


HISTORY_TREE_DEPTH

HISTORY_TREE_DEPTH: number

Defined in

circuits/src/CircuitConfig.ts:53


MAX_SAFE_BITS

MAX_SAFE_BITS: bigint

Defined in

circuits/src/CircuitConfig.ts:61


NONCE_BITS

NONCE_BITS: bigint = NONCE_BITS

Defined in

circuits/src/CircuitConfig.ts:63


NUM_EPOCH_KEY_NONCE_PER_EPOCH

NUM_EPOCH_KEY_NONCE_PER_EPOCH: number

Defined in

circuits/src/CircuitConfig.ts:54


ONE_BIT

ONE_BIT: bigint = ONE_BIT

Defined in

circuits/src/CircuitConfig.ts:68


REPL_NONCE_BITS

REPL_NONCE_BITS: number

Defined in

circuits/src/CircuitConfig.ts:57


REP_BITS

REP_BITS: bigint = REP_BITS

Defined in

circuits/src/CircuitConfig.ts:67


REVEAL_NONCE_BITS

REVEAL_NONCE_BITS: bigint = REVEAL_NONCE_BITS

Defined in

circuits/src/CircuitConfig.ts:66


SNARK_SCALAR_FIELD

SNARK_SCALAR_FIELD: string

Defined in

circuits/src/CircuitConfig.ts:59


STATE_TREE_DEPTH

STATE_TREE_DEPTH: number

Defined in

circuits/src/CircuitConfig.ts:51


SUM_FIELD_COUNT

SUM_FIELD_COUNT: number

Defined in

circuits/src/CircuitConfig.ts:56

Accessors

REPL_FIELD_BITS

get REPL_FIELD_BITS(): number

Returns

number

Defined in

circuits/src/CircuitConfig.ts:87


contractConfig

get contractConfig(): Object

Returns

Object

NameType
epochTreeDepthnumber
fieldCountnumber
historyTreeDepthnumber
numEpochKeyNoncePerEpochnumber
replFieldBitsnumber
replNonceBitsnumber
stateTreeDepthnumber
sumFieldCountnumber

Defined in

circuits/src/CircuitConfig.ts:74


default

Static get default(): CircuitConfig

Returns

CircuitConfig

Defined in

circuits/src/CircuitConfig.ts:70