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
Properties
alpha1
• alpha1: G1Point
Defined in
beta2
• beta2: G2Point
Defined in
delta2
• delta2: G2Point
Defined in
gamma2
• gamma2: G2Point
Defined in
ic
• ic: G1Point
[]
Defined in
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
copy
▸ copy(): VerifyingKey
Produce a copy of this verifying key
Returns
the copy
Defined in
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
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
fromJSON
▸ fromJSON(json
): VerifyingKey
Deserialize into a VerifyingKey instance
Parameters
Name | Type | Description |
---|---|---|
json | string | the JSON representation |
Returns
the VerifyingKey
Defined in
fromObj
▸ fromObj(data
): VerifyingKey
Convert an object representation to a VerifyingKey
Parameters
Name | Type | Description |
---|---|---|
data | IVkObjectParams | the object representation |
Returns
the VerifyingKey