Minimal Anti Collusion Infrastructure (MACI) / VerifyingKey
Class: VerifyingKey
Defined in: verifyingKey.ts:8
Notice
A TS Class representing a zk-SNARK VerifyingKey
Constructors
new VerifyingKey()
new VerifyingKey(
alpha1
,beta2
,gamma2
,delta2
,ic
):VerifyingKey
Defined in: verifyingKey.ts:27
Generate a new VerifyingKey
Parameters
alpha1
G1Point
the alpha1 point
beta2
G2Point
the beta2 point
gamma2
G2Point
the gamma2 point
delta2
G2Point
the delta2 point
ic
G1Point
[]
the ic points
Returns
Properties
alpha1
alpha1:
G1Point
Defined in: verifyingKey.ts:9
beta2
beta2:
G2Point
Defined in: verifyingKey.ts:11
delta2
delta2:
G2Point
Defined in: verifyingKey.ts:15
gamma2
gamma2:
G2Point
Defined in: verifyingKey.ts:13
ic
ic:
G1Point
[]
Defined in: verifyingKey.ts:17
Methods
asContractParam()
asContractParam():
IVkContractParams
Defined in: verifyingKey.ts:40
Return this as an object which can be passed to the smart contract
Returns
the object representation of this
copy()
copy():
VerifyingKey
Defined in: verifyingKey.ts:94
Produce a copy of this verifying key
Returns
the copy
equals()
equals(
vk
):boolean
Defined in: verifyingKey.ts:73
Check whether this is equal to another verifying key
Parameters
vk
the other verifying key
Returns
boolean
whether this is equal to the other verifying key
fromContract()
static
fromContract(data
):VerifyingKey
Defined in: verifyingKey.ts:55
Create a new verifying key from a contract representation of the VK
Parameters
data
the object representation
Returns
a new VerifyingKey
fromJSON()
static
fromJSON(json
):VerifyingKey
Defined in: verifyingKey.ts:115
Deserialize into a VerifyingKey instance
Parameters
json
string
the JSON representation
Returns
the VerifyingKey
fromObj()
static
fromObj(data
):VerifyingKey
Defined in: verifyingKey.ts:125
Convert an object representation to a VerifyingKey
Parameters
data
the object representation
Returns
the VerifyingKey