@solarity/zkit 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/core/CircuitZKit.d.ts +16 -4
- package/dist/core/CircuitZKit.d.ts.map +1 -1
- package/dist/core/CircuitZKit.js +31 -7
- package/dist/core/CircuitZKit.js.map +1 -1
- package/dist/core/protocols/AbstractImplementer.d.ts +2 -2
- package/dist/core/protocols/AbstractImplementer.d.ts.map +1 -1
- package/dist/core/protocols/AbstractImplementer.js +5 -4
- package/dist/core/protocols/AbstractImplementer.js.map +1 -1
- package/dist/types/protocols/index.d.ts +2 -2
- package/dist/types/protocols/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +2 -0
- package/src/core/CircuitZKit.ts +37 -10
- package/src/core/protocols/AbstractImplementer.ts +4 -4
- package/src/types/protocols/index.ts +1 -2
package/README.md
CHANGED
|
@@ -53,12 +53,13 @@ The `implementer` is the instance of a certain proving system. Currently `groth1
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
- **`async createVerifier("sol" | "vy")`**
|
|
56
|
+
- **`async createVerifier("sol" | "vy", verifierNameSuffix?: string)`**
|
|
57
57
|
|
|
58
|
-
Creates a Solidity | Vyper verifier contract on `verifierDirPath` path, which was specified in the config.
|
|
58
|
+
Creates a Solidity | Vyper verifier contract with the optional `verifierNameSuffix` on `verifierDirPath` path, which was specified in the config.
|
|
59
59
|
|
|
60
60
|
```typescript
|
|
61
61
|
await circuit.createVerifier("sol");
|
|
62
|
+
await circuit.createVerifier("sol", "_suffix_");
|
|
62
63
|
```
|
|
63
64
|
|
|
64
65
|
- **`async calculateWitness(inputs) -> bigint[]`**
|
|
@@ -101,12 +102,12 @@ const calldata = await circuit.generateCalldata(proof);
|
|
|
101
102
|
|
|
102
103
|
Returns the name of the circuit from the config.
|
|
103
104
|
|
|
104
|
-
- **`getVerifierName() -> string`**
|
|
105
|
+
- **`getVerifierName(verifierNameSuffix?: string) -> string`**
|
|
105
106
|
|
|
106
107
|
Returns the name of the verifier in the following form:
|
|
107
108
|
|
|
108
109
|
```typescript
|
|
109
|
-
<Circuit name><Proving system>Verifier
|
|
110
|
+
<Circuit name><Suffix><Proving system>Verifier
|
|
110
111
|
```
|
|
111
112
|
|
|
112
113
|
- **`getProvingSystemType() -> "groth16" | "plonk"`**
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,eAAO,MAAM,oBAAoB,MAAM,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BN128_CURVE_NAME = void 0;
|
|
3
|
+
exports.MAX_FILE_NAME_LENGTH = exports.BN128_CURVE_NAME = void 0;
|
|
4
4
|
exports.BN128_CURVE_NAME = "bn128";
|
|
5
|
+
exports.MAX_FILE_NAME_LENGTH = 255;
|
|
5
6
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAE3B,QAAA,oBAAoB,GAAG,GAAG,CAAC"}
|
|
@@ -9,9 +9,18 @@ export declare class CircuitZKit<Type extends ProvingSystemType> {
|
|
|
9
9
|
private readonly _implementer;
|
|
10
10
|
constructor(_config: CircuitZKitConfig, _implementer: IProtocolImplementer<Type>);
|
|
11
11
|
/**
|
|
12
|
-
* Creates a verifier contract for the specified contract language.
|
|
12
|
+
* Creates a verifier contract for the specified contract language with optional name suffix.
|
|
13
|
+
* For more details regarding the structure of the contract verifier name, see {@link getVerifierName} description.
|
|
14
|
+
*
|
|
15
|
+
* In case the length of the verifier filename exceeds the {@link MAX_FILE_NAME_LENGTH},
|
|
16
|
+
* the `verifierNameSuffix` will be replaced by the first four bytes of its `sha1` hash.
|
|
17
|
+
*
|
|
18
|
+
* If no suffix was passed, but the verifier's filename still exceeds {@link MAX_FILE_NAME_LENGTH}, an error will be thrown.
|
|
19
|
+
*
|
|
20
|
+
* @param {VerifierLanguageType} languageExtension - The verifier contract language extension.
|
|
21
|
+
* @param {string} verifierNameSuffix - The optional verifier name suffix.
|
|
13
22
|
*/
|
|
14
|
-
createVerifier(languageExtension: VerifierLanguageType): Promise<void>;
|
|
23
|
+
createVerifier(languageExtension: VerifierLanguageType, verifierNameSuffix?: string): Promise<void>;
|
|
15
24
|
/**
|
|
16
25
|
* Calculates a witness for the given inputs.
|
|
17
26
|
*
|
|
@@ -54,11 +63,14 @@ export declare class CircuitZKit<Type extends ProvingSystemType> {
|
|
|
54
63
|
*/
|
|
55
64
|
getCircuitName(): string;
|
|
56
65
|
/**
|
|
57
|
-
* Returns the verifier name. The verifier name
|
|
66
|
+
* Returns the verifier name. The verifier name has the next structure:
|
|
67
|
+
* `<template name><suffix><proving system>Verifier.<extension>`.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} verifierNameSuffix - The optional verifier name suffix.
|
|
58
70
|
*
|
|
59
71
|
* @returns {string} The verifier name.
|
|
60
72
|
*/
|
|
61
|
-
getVerifierName(): string;
|
|
73
|
+
getVerifierName(verifierNameSuffix?: string): string;
|
|
62
74
|
/**
|
|
63
75
|
* Returns the type of the proving protocol
|
|
64
76
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircuitZKit.d.ts","sourceRoot":"","sources":["../../src/core/CircuitZKit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CircuitZKit.d.ts","sourceRoot":"","sources":["../../src/core/CircuitZKit.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAIxH;;GAEG;AACH,qBAAa,WAAW,CAAC,IAAI,SAAS,iBAAiB;IAEnD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,OAAO,EAAE,iBAAiB,EAC1B,YAAY,EAAE,oBAAoB,CAAC,IAAI,CAAC;IAG3D;;;;;;;;;;;OAWG;IACU,cAAc,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBhH;;;;;OAKG;IACU,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAiBjE;;;;;;;;OAQG;IACU,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAOjF;;;;;;;;OAQG;IACU,WAAW,CAAC,KAAK,EAAE,qBAAqB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAM9E;;;;;;OAMG;IACU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAIpG;;;;OAIG;IACI,cAAc,IAAI,MAAM;IAI/B;;;;;;;OAOG;IACI,eAAe,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM;IAI3D;;;;OAIG;IACI,oBAAoB,IAAI,iBAAiB;IAIhD;;;;OAIG;IACI,mBAAmB,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,MAAM;IAI3E;;;;;OAKG;IACI,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM;IAUpE;;;;;OAKG;IACI,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM;CAgCjE"}
|
package/dist/core/CircuitZKit.js
CHANGED
|
@@ -31,6 +31,8 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
31
31
|
const path_1 = __importDefault(require("path"));
|
|
32
32
|
const os = __importStar(require("os"));
|
|
33
33
|
const snarkjs = __importStar(require("snarkjs"));
|
|
34
|
+
const crypto_1 = require("crypto");
|
|
35
|
+
const constants_1 = require("../constants");
|
|
34
36
|
/**
|
|
35
37
|
* `CircuitZKit` represents a single circuit and provides a high-level API to work with it.
|
|
36
38
|
*/
|
|
@@ -42,12 +44,31 @@ class CircuitZKit {
|
|
|
42
44
|
this._implementer = _implementer;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
|
-
* Creates a verifier contract for the specified contract language.
|
|
47
|
+
* Creates a verifier contract for the specified contract language with optional name suffix.
|
|
48
|
+
* For more details regarding the structure of the contract verifier name, see {@link getVerifierName} description.
|
|
49
|
+
*
|
|
50
|
+
* In case the length of the verifier filename exceeds the {@link MAX_FILE_NAME_LENGTH},
|
|
51
|
+
* the `verifierNameSuffix` will be replaced by the first four bytes of its `sha1` hash.
|
|
52
|
+
*
|
|
53
|
+
* If no suffix was passed, but the verifier's filename still exceeds {@link MAX_FILE_NAME_LENGTH}, an error will be thrown.
|
|
54
|
+
*
|
|
55
|
+
* @param {VerifierLanguageType} languageExtension - The verifier contract language extension.
|
|
56
|
+
* @param {string} verifierNameSuffix - The optional verifier name suffix.
|
|
46
57
|
*/
|
|
47
|
-
async createVerifier(languageExtension) {
|
|
58
|
+
async createVerifier(languageExtension, verifierNameSuffix) {
|
|
48
59
|
const vKeyFilePath = this.mustGetArtifactsFilePath("vkey");
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
let verifierFileName = `${this.getVerifierName(verifierNameSuffix)}.${languageExtension}`;
|
|
61
|
+
if (verifierFileName.length >= constants_1.MAX_FILE_NAME_LENGTH) {
|
|
62
|
+
const modifiedSuffix = verifierNameSuffix
|
|
63
|
+
? `_0x${(0, crypto_1.createHash)("sha1").update(verifierNameSuffix).digest("hex").slice(0, 8)}_`
|
|
64
|
+
: "";
|
|
65
|
+
verifierFileName = `${this.getVerifierName(modifiedSuffix)}.${languageExtension}`;
|
|
66
|
+
if (verifierFileName.length >= constants_1.MAX_FILE_NAME_LENGTH) {
|
|
67
|
+
throw new Error(`Verifier file name "${verifierFileName}" exceeds the maximum file name length`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const verifierFilePath = path_1.default.join(this._config.verifierDirPath, verifierFileName);
|
|
71
|
+
this._implementer.createVerifier(vKeyFilePath, verifierFilePath, languageExtension);
|
|
51
72
|
}
|
|
52
73
|
/**
|
|
53
74
|
* Calculates a witness for the given inputs.
|
|
@@ -112,12 +133,15 @@ class CircuitZKit {
|
|
|
112
133
|
return this._config.circuitName;
|
|
113
134
|
}
|
|
114
135
|
/**
|
|
115
|
-
* Returns the verifier name. The verifier name
|
|
136
|
+
* Returns the verifier name. The verifier name has the next structure:
|
|
137
|
+
* `<template name><suffix><proving system>Verifier.<extension>`.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} verifierNameSuffix - The optional verifier name suffix.
|
|
116
140
|
*
|
|
117
141
|
* @returns {string} The verifier name.
|
|
118
142
|
*/
|
|
119
|
-
getVerifierName() {
|
|
120
|
-
return this._implementer.getVerifierName(this._config.circuitName);
|
|
143
|
+
getVerifierName(verifierNameSuffix) {
|
|
144
|
+
return this._implementer.getVerifierName(this._config.circuitName, verifierNameSuffix);
|
|
121
145
|
}
|
|
122
146
|
/**
|
|
123
147
|
* Returns the type of the proving protocol
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircuitZKit.js","sourceRoot":"","sources":["../../src/core/CircuitZKit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,uCAAyB;AACzB,iDAAmC;
|
|
1
|
+
{"version":3,"file":"CircuitZKit.js","sourceRoot":"","sources":["../../src/core/CircuitZKit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,uCAAyB;AACzB,iDAAmC;AACnC,mCAAoC;AAMpC,4CAAoD;AAEpD;;GAEG;AACH,MAAa,WAAW;IAEH;IACA;IAFnB,YACmB,OAA0B,EAC1B,YAAwC;QADxC,YAAO,GAAP,OAAO,CAAmB;QAC1B,iBAAY,GAAZ,YAAY,CAA4B;IACxD,CAAC;IAEJ;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,cAAc,CAAC,iBAAuC,EAAE,kBAA2B;QAC9F,MAAM,YAAY,GAAW,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;QAEnE,IAAI,gBAAgB,GAAW,GAAG,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,iBAAiB,EAAE,CAAC;QAElG,IAAI,gBAAgB,CAAC,MAAM,IAAI,gCAAoB,EAAE,CAAC;YACpD,MAAM,cAAc,GAAW,kBAAkB;gBAC/C,CAAC,CAAC,MAAM,IAAA,mBAAU,EAAC,MAAM,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,KAAK,C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2,13 +2,13 @@ import { Signals } from "../../types/proof-utils";
|
|
|
2
2
|
import { IProtocolImplementer, ProvingSystemType, ProofStructByProtocol, CalldataByProtocol } from "../../types/protocols";
|
|
3
3
|
import { VerifierLanguageType } from "../../types/circuit-zkit";
|
|
4
4
|
export declare abstract class AbstractProtocolImplementer<T extends ProvingSystemType> implements IProtocolImplementer<T> {
|
|
5
|
-
createVerifier(
|
|
5
|
+
createVerifier(vKeyFilePath: string, verifierFilePath: string, languageExtension: VerifierLanguageType): Promise<void>;
|
|
6
6
|
abstract generateProof(inputs: Signals, zKeyFilePath: string, wasmFilePath: string): Promise<ProofStructByProtocol<T>>;
|
|
7
7
|
abstract verifyProof(proof: ProofStructByProtocol<T>, vKeyFilePath: string): Promise<boolean>;
|
|
8
8
|
abstract generateCalldata(proof: ProofStructByProtocol<T>): Promise<CalldataByProtocol<T>>;
|
|
9
9
|
abstract getProvingSystemType(): ProvingSystemType;
|
|
10
10
|
getTemplate(languageExtension: VerifierLanguageType): string;
|
|
11
|
-
getVerifierName(circuitName: string): string;
|
|
11
|
+
getVerifierName(circuitName: string, verifierNameSuffix?: string): string;
|
|
12
12
|
getZKeyFileName(circuitName: string): string;
|
|
13
13
|
getVKeyFileName(circuitName: string): string;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractImplementer.d.ts","sourceRoot":"","sources":["../../../src/core/protocols/AbstractImplementer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,8BAAsB,2BAA2B,CAAC,CAAC,SAAS,iBAAiB,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAClG,cAAc,CACzB,
|
|
1
|
+
{"version":3,"file":"AbstractImplementer.d.ts","sourceRoot":"","sources":["../../../src/core/protocols/AbstractImplementer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,8BAAsB,2BAA2B,CAAC,CAAC,SAAS,iBAAiB,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAClG,cAAc,CACzB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,iBAAiB,EAAE,oBAAoB,GACtC,OAAO,CAAC,IAAI,CAAC;aAeA,aAAa,CAC3B,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;aAEpB,WAAW,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;aAEpF,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;aAEjF,oBAAoB,IAAI,iBAAiB;IAElD,WAAW,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,MAAM;IAO5D,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM;IAOzE,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAI5C,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;CAGpD"}
|
|
@@ -8,22 +8,23 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
8
8
|
const ejs_1 = __importDefault(require("ejs"));
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
class AbstractProtocolImplementer {
|
|
11
|
-
async createVerifier(
|
|
11
|
+
async createVerifier(vKeyFilePath, verifierFilePath, languageExtension) {
|
|
12
12
|
const verifierTemplate = this.getTemplate(languageExtension);
|
|
13
13
|
if (!fs_1.default.existsSync(path_1.default.dirname(verifierFilePath))) {
|
|
14
14
|
fs_1.default.mkdirSync(path_1.default.dirname(verifierFilePath), { recursive: true });
|
|
15
15
|
}
|
|
16
16
|
const templateParams = JSON.parse(fs_1.default.readFileSync(vKeyFilePath, "utf-8"));
|
|
17
|
-
templateParams["verifier_id"] =
|
|
17
|
+
templateParams["verifier_id"] = path_1.default.parse(verifierFilePath).name;
|
|
18
18
|
const verifierCode = ejs_1.default.render(verifierTemplate, templateParams);
|
|
19
19
|
fs_1.default.writeFileSync(verifierFilePath, verifierCode, "utf-8");
|
|
20
20
|
}
|
|
21
21
|
getTemplate(languageExtension) {
|
|
22
22
|
return fs_1.default.readFileSync(path_1.default.join(__dirname, "..", "templates", `verifier_${this.getProvingSystemType()}.${languageExtension}.ejs`), "utf8");
|
|
23
23
|
}
|
|
24
|
-
getVerifierName(circuitName) {
|
|
24
|
+
getVerifierName(circuitName, verifierNameSuffix) {
|
|
25
25
|
const protocolType = this.getProvingSystemType();
|
|
26
|
-
|
|
26
|
+
const nameSuffix = verifierNameSuffix ?? "";
|
|
27
|
+
return `${circuitName}${nameSuffix}${protocolType.charAt(0).toUpperCase() + protocolType.slice(1)}Verifier`;
|
|
27
28
|
}
|
|
28
29
|
getZKeyFileName(circuitName) {
|
|
29
30
|
return `${circuitName}.${this.getProvingSystemType()}.zkey`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractImplementer.js","sourceRoot":"","sources":["../../../src/core/protocols/AbstractImplementer.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,8CAAsB;AACtB,gDAAwB;AAWxB,MAAsB,2BAA2B;IACxC,KAAK,CAAC,cAAc,CACz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,UAAU,GAAW,kBAAkB,IAAI,EAAE,CAAC;QAEpD,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;IAC9G,CAAC;IAEM,eAAe,CAAC,WAAmB;QACxC,OAAO,GAAG,WAAW,IAAI,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAC9D,CAAC;IAEM,eAAe,CAAC,WAAmB;QACxC,OAAO,GAAG,WAAW,IAAI,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC;IACnE,CAAC;CACF;AArDD,kEAqDC"}
|
|
@@ -5,13 +5,13 @@ import { VerifierLanguageType } from "../circuit-zkit";
|
|
|
5
5
|
export * from "./groth16";
|
|
6
6
|
export * from "./plonk";
|
|
7
7
|
export interface IProtocolImplementer<T extends ProvingSystemType> {
|
|
8
|
-
createVerifier(
|
|
8
|
+
createVerifier(vKeyFilePath: string, verifierFilePath: string, languageExtension: VerifierLanguageType): Promise<void>;
|
|
9
9
|
generateProof(inputs: Signals, zKeyFilePath: string, wasmFilePath: string): Promise<ProofStructByProtocol<T>>;
|
|
10
10
|
verifyProof(proof: ProofStructByProtocol<T>, vKeyFilePath: string): Promise<boolean>;
|
|
11
11
|
generateCalldata(proof: ProofStructByProtocol<T>): Promise<CalldataByProtocol<T>>;
|
|
12
12
|
getProvingSystemType(): ProvingSystemType;
|
|
13
13
|
getTemplate(fileExtension: VerifierLanguageType): string;
|
|
14
|
-
getVerifierName(circuitName: string): string;
|
|
14
|
+
getVerifierName(circuitName: string, verifierNameSuffix?: string): string;
|
|
15
15
|
getZKeyFileName(circuitName: string): string;
|
|
16
16
|
getVKeyFileName(circuitName: string): string;
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/protocols/index.ts"],"names":[],"mappings":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AC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAElF,oBAAoB,IAAI,iBAAiB,CAAC;IAE1C,WAAW,CAAC,aAAa,EAAE,oBAAoB,GAAG,MAAM,CAAC;IAEzD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1E,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAE7C,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE;QACP,WAAW,EAAE,kBAAkB,CAAC;QAChC,QAAQ,EAAE,eAAe,CAAC;KAC3B,CAAC;IACF,KAAK,EAAE;QACL,WAAW,EAAE,gBAAgB,CAAC;QAC9B,QAAQ,EAAE,aAAa,CAAC;KACzB,CAAC;CACH;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,sBAAsB,CAAC;AAE7D,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;AAC1G,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,iBAAiB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/core/CircuitZKit.ts
CHANGED
|
@@ -2,11 +2,14 @@ import fs from "fs";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
import * as os from "os";
|
|
4
4
|
import * as snarkjs from "snarkjs";
|
|
5
|
+
import { createHash } from "crypto";
|
|
5
6
|
|
|
6
7
|
import { ArtifactsFileType, CircuitZKitConfig, VerifierLanguageType } from "../types/circuit-zkit";
|
|
7
8
|
import { Signals } from "../types/proof-utils";
|
|
8
9
|
import { CalldataByProtocol, IProtocolImplementer, ProofStructByProtocol, ProvingSystemType } from "../types/protocols";
|
|
9
10
|
|
|
11
|
+
import { MAX_FILE_NAME_LENGTH } from "../constants";
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* `CircuitZKit` represents a single circuit and provides a high-level API to work with it.
|
|
12
15
|
*/
|
|
@@ -17,16 +20,37 @@ export class CircuitZKit<Type extends ProvingSystemType> {
|
|
|
17
20
|
) {}
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
|
-
* Creates a verifier contract for the specified contract language.
|
|
23
|
+
* Creates a verifier contract for the specified contract language with optional name suffix.
|
|
24
|
+
* For more details regarding the structure of the contract verifier name, see {@link getVerifierName} description.
|
|
25
|
+
*
|
|
26
|
+
* In case the length of the verifier filename exceeds the {@link MAX_FILE_NAME_LENGTH},
|
|
27
|
+
* the `verifierNameSuffix` will be replaced by the first four bytes of its `sha1` hash.
|
|
28
|
+
*
|
|
29
|
+
* If no suffix was passed, but the verifier's filename still exceeds {@link MAX_FILE_NAME_LENGTH}, an error will be thrown.
|
|
30
|
+
*
|
|
31
|
+
* @param {VerifierLanguageType} languageExtension - The verifier contract language extension.
|
|
32
|
+
* @param {string} verifierNameSuffix - The optional verifier name suffix.
|
|
21
33
|
*/
|
|
22
|
-
public async createVerifier(languageExtension: VerifierLanguageType): Promise<void> {
|
|
34
|
+
public async createVerifier(languageExtension: VerifierLanguageType, verifierNameSuffix?: string): Promise<void> {
|
|
23
35
|
const vKeyFilePath: string = this.mustGetArtifactsFilePath("vkey");
|
|
24
|
-
const verifierFilePath = path.join(
|
|
25
|
-
this._config.verifierDirPath,
|
|
26
|
-
`${this._implementer.getVerifierName(this._config.circuitName)}.${languageExtension}`,
|
|
27
|
-
);
|
|
28
36
|
|
|
29
|
-
this.
|
|
37
|
+
let verifierFileName: string = `${this.getVerifierName(verifierNameSuffix)}.${languageExtension}`;
|
|
38
|
+
|
|
39
|
+
if (verifierFileName.length >= MAX_FILE_NAME_LENGTH) {
|
|
40
|
+
const modifiedSuffix: string = verifierNameSuffix
|
|
41
|
+
? `_0x${createHash("sha1").update(verifierNameSuffix).digest("hex").slice(0, 8)}_`
|
|
42
|
+
: "";
|
|
43
|
+
|
|
44
|
+
verifierFileName = `${this.getVerifierName(modifiedSuffix)}.${languageExtension}`;
|
|
45
|
+
|
|
46
|
+
if (verifierFileName.length >= MAX_FILE_NAME_LENGTH) {
|
|
47
|
+
throw new Error(`Verifier file name "${verifierFileName}" exceeds the maximum file name length`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const verifierFilePath = path.join(this._config.verifierDirPath, verifierFileName);
|
|
52
|
+
|
|
53
|
+
this._implementer.createVerifier(vKeyFilePath, verifierFilePath, languageExtension);
|
|
30
54
|
}
|
|
31
55
|
|
|
32
56
|
/**
|
|
@@ -104,12 +128,15 @@ export class CircuitZKit<Type extends ProvingSystemType> {
|
|
|
104
128
|
}
|
|
105
129
|
|
|
106
130
|
/**
|
|
107
|
-
* Returns the verifier name. The verifier name
|
|
131
|
+
* Returns the verifier name. The verifier name has the next structure:
|
|
132
|
+
* `<template name><suffix><proving system>Verifier.<extension>`.
|
|
133
|
+
*
|
|
134
|
+
* @param {string} verifierNameSuffix - The optional verifier name suffix.
|
|
108
135
|
*
|
|
109
136
|
* @returns {string} The verifier name.
|
|
110
137
|
*/
|
|
111
|
-
public getVerifierName(): string {
|
|
112
|
-
return this._implementer.getVerifierName(this._config.circuitName);
|
|
138
|
+
public getVerifierName(verifierNameSuffix?: string): string {
|
|
139
|
+
return this._implementer.getVerifierName(this._config.circuitName, verifierNameSuffix);
|
|
113
140
|
}
|
|
114
141
|
|
|
115
142
|
/**
|
|
@@ -13,7 +13,6 @@ import { VerifierLanguageType } from "../../types/circuit-zkit";
|
|
|
13
13
|
|
|
14
14
|
export abstract class AbstractProtocolImplementer<T extends ProvingSystemType> implements IProtocolImplementer<T> {
|
|
15
15
|
public async createVerifier(
|
|
16
|
-
circuitName: string,
|
|
17
16
|
vKeyFilePath: string,
|
|
18
17
|
verifierFilePath: string,
|
|
19
18
|
languageExtension: VerifierLanguageType,
|
|
@@ -25,7 +24,7 @@ export abstract class AbstractProtocolImplementer<T extends ProvingSystemType> i
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
const templateParams = JSON.parse(fs.readFileSync(vKeyFilePath, "utf-8"));
|
|
28
|
-
templateParams["verifier_id"] =
|
|
27
|
+
templateParams["verifier_id"] = path.parse(verifierFilePath).name;
|
|
29
28
|
|
|
30
29
|
const verifierCode = ejs.render(verifierTemplate, templateParams);
|
|
31
30
|
|
|
@@ -51,10 +50,11 @@ export abstract class AbstractProtocolImplementer<T extends ProvingSystemType> i
|
|
|
51
50
|
);
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
public getVerifierName(circuitName: string): string {
|
|
53
|
+
public getVerifierName(circuitName: string, verifierNameSuffix?: string): string {
|
|
55
54
|
const protocolType: ProvingSystemType = this.getProvingSystemType();
|
|
55
|
+
const nameSuffix: string = verifierNameSuffix ?? "";
|
|
56
56
|
|
|
57
|
-
return `${circuitName}${protocolType.charAt(0).toUpperCase() + protocolType.slice(1)}Verifier`;
|
|
57
|
+
return `${circuitName}${nameSuffix}${protocolType.charAt(0).toUpperCase() + protocolType.slice(1)}Verifier`;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
public getZKeyFileName(circuitName: string): string {
|
|
@@ -9,7 +9,6 @@ export * from "./plonk";
|
|
|
9
9
|
|
|
10
10
|
export interface IProtocolImplementer<T extends ProvingSystemType> {
|
|
11
11
|
createVerifier(
|
|
12
|
-
circuitName: string,
|
|
13
12
|
vKeyFilePath: string,
|
|
14
13
|
verifierFilePath: string,
|
|
15
14
|
languageExtension: VerifierLanguageType,
|
|
@@ -25,7 +24,7 @@ export interface IProtocolImplementer<T extends ProvingSystemType> {
|
|
|
25
24
|
|
|
26
25
|
getTemplate(fileExtension: VerifierLanguageType): string;
|
|
27
26
|
|
|
28
|
-
getVerifierName(circuitName: string): string;
|
|
27
|
+
getVerifierName(circuitName: string, verifierNameSuffix?: string): string;
|
|
29
28
|
|
|
30
29
|
getZKeyFileName(circuitName: string): string;
|
|
31
30
|
|