VerifyingKey
Notice
A TS Class representing a zk-SNARK VerifyingKey
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new VerifyingKey(alpha1
, beta2
, gamma2
, delta2
, ic
): VerifyingKey
Generate a new VerifyingKey
Parameters
Name | Type | Description |
---|---|---|
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
Defined in
verifyingKey.ts:27
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
Return this as an object which can be passed to the smart contract
Returns
the object representation of this
Defined in
verifyingKey.ts:40
copy
▸ copy(): VerifyingKey
Produce a copy of this verifying key
Returns
the copy
Defined in
verifyingKey.ts:94
equals
▸ equals(vk
): boolean
Check whether this is equal to another verifying key
Parameters
Name | Type | Description |
---|---|---|
vk | VerifyingKey | the other verifying key |
Returns
boolean
whether this is equal to the other verifying key
Defined in
verifyingKey.ts:73
fromContract
▸ fromContract(data
): VerifyingKey
Create a new verifying key from a contract representation of the VK
Parameters
Name | Type | Description |
---|---|---|
data | IVkContractParams | the object representation |
Returns
a new VerifyingKey
Defined in
verifyingKey.ts:55
fromJSON
▸ fromJSON(json
): VerifyingKey
Deserialize into a VerifyingKey instance
Parameters
Name | Type | Description |
---|---|---|
json | string | the JSON representation |
Returns
the VerifyingKey
Defined in
verifyingKey.ts:115
fromObj
▸ fromObj(data
): VerifyingKey
Convert an object representation to a VerifyingKey
Parameters
Name | Type | Description |
---|---|---|
data | IVkObjectParams | the object representation |
Returns
the VerifyingKey
Defined in
verifyingKey.ts:125