@aztec/stdlib 1.0.0-nightly.20250724 → 1.0.0-nightly.20250726
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/dest/interfaces/aztec-node-admin.d.ts +140 -8
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +5 -4
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +4 -4
- package/dest/zkpassport/index.d.ts +3 -3
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +8 -8
- package/package.json +7 -7
- package/src/interfaces/aztec-node-admin.ts +13 -15
- package/src/vks/verification_key.ts +4 -7
- package/src/zkpassport/index.ts +5 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defaultFetch } from '@aztec/foundation/json-rpc/client';
|
|
2
|
+
import { z } from 'zod';
|
|
2
3
|
import type { ApiSchemaFor } from '../schemas/schemas.js';
|
|
3
4
|
import { type ComponentsVersions } from '../versioning/index.js';
|
|
4
5
|
import { type SequencerConfig } from './configs.js';
|
|
@@ -8,17 +9,14 @@ import { type ProverConfig } from './prover-client.js';
|
|
|
8
9
|
*/
|
|
9
10
|
export interface AztecNodeAdmin {
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param config - Updated configuration to be merged with the current one.
|
|
12
|
+
* Retrieves the configuration of this node.
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
maxTxPoolSize: number;
|
|
16
|
-
}>): Promise<void>;
|
|
14
|
+
getConfig(): Promise<AztecNodeAdminConfig>;
|
|
17
15
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* Updates the configuration of this node.
|
|
17
|
+
* @param config - Updated configuration to be merged with the current one.
|
|
20
18
|
*/
|
|
21
|
-
|
|
19
|
+
setConfig(config: Partial<AztecNodeAdminConfig>): Promise<void>;
|
|
22
20
|
/**
|
|
23
21
|
* Pauses syncing, creates a backup of archiver and world-state databases, and uploads them. Returns immediately.
|
|
24
22
|
* @param location - The location to upload the snapshot to.
|
|
@@ -35,6 +33,140 @@ export interface AztecNodeAdmin {
|
|
|
35
33
|
/** Resumes archiver and world state syncing. */
|
|
36
34
|
resumeSync(): Promise<void>;
|
|
37
35
|
}
|
|
36
|
+
export type AztecNodeAdminConfig = SequencerConfig & ProverConfig & {
|
|
37
|
+
maxTxPoolSize: number;
|
|
38
|
+
};
|
|
39
|
+
export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
40
|
+
transactionPollingIntervalMS: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
maxTxsPerBlock: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
minTxsPerBlock: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
maxL2BlockGas: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
publishTxsWithProposals: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
maxDABlockGas: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
coinbase: z.ZodOptional<import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").EthAddress>>;
|
|
47
|
+
feeRecipient: z.ZodOptional<import("../schemas/schemas.js").ZodFor<import("../aztec-address/index.js").AztecAddress>>;
|
|
48
|
+
acvmWorkingDirectory: z.ZodOptional<z.ZodString>;
|
|
49
|
+
acvmBinaryPath: z.ZodOptional<z.ZodString>;
|
|
50
|
+
txPublicSetupAllowList: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
51
|
+
address: import("../schemas/schemas.js").ZodFor<import("../aztec-address/index.js").AztecAddress>;
|
|
52
|
+
selector: import("../schemas/schemas.js").ZodFor<import("../abi/function_selector.js").FunctionSelector>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
55
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
56
|
+
}, {
|
|
57
|
+
selector?: any;
|
|
58
|
+
address?: any;
|
|
59
|
+
}>, z.ZodObject<{
|
|
60
|
+
address: import("../schemas/schemas.js").ZodFor<import("../aztec-address/index.js").AztecAddress>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
63
|
+
}, {
|
|
64
|
+
address?: any;
|
|
65
|
+
}>, z.ZodObject<{
|
|
66
|
+
classId: import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").Fr>;
|
|
67
|
+
selector: import("../schemas/schemas.js").ZodFor<import("../abi/function_selector.js").FunctionSelector>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
70
|
+
classId: import("@aztec/foundation/schemas").Fr;
|
|
71
|
+
}, {
|
|
72
|
+
selector?: any;
|
|
73
|
+
classId?: any;
|
|
74
|
+
}>, z.ZodObject<{
|
|
75
|
+
classId: import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").Fr>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
classId: import("@aztec/foundation/schemas").Fr;
|
|
78
|
+
}, {
|
|
79
|
+
classId?: any;
|
|
80
|
+
}>]>, "many">>;
|
|
81
|
+
maxBlockSizeInBytes: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
governanceProposerPayload: z.ZodOptional<import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").EthAddress>>;
|
|
83
|
+
maxL1TxInclusionTimeIntoSlot: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
enforceTimeTable: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
fakeProcessingDelayPerTxMs: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
attestationPropagationTime: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, {
|
|
88
|
+
nodeUrl: z.ZodOptional<z.ZodString>;
|
|
89
|
+
realProofs: z.ZodBoolean;
|
|
90
|
+
proverId: z.ZodOptional<import("../schemas/schemas.js").ZodFor<import("@aztec/foundation/schemas").Fr>>;
|
|
91
|
+
proverTestDelayType: z.ZodEnum<["fixed", "realistic"]>;
|
|
92
|
+
proverTestDelayMs: z.ZodNumber;
|
|
93
|
+
proverTestDelayFactor: z.ZodNumber;
|
|
94
|
+
proverAgentCount: z.ZodNumber;
|
|
95
|
+
}>, {
|
|
96
|
+
maxTxPoolSize: z.ZodNumber;
|
|
97
|
+
}>, "strip", z.ZodTypeAny, {
|
|
98
|
+
realProofs: boolean;
|
|
99
|
+
proverTestDelayType: "fixed" | "realistic";
|
|
100
|
+
proverTestDelayMs: number;
|
|
101
|
+
proverTestDelayFactor: number;
|
|
102
|
+
proverAgentCount: number;
|
|
103
|
+
maxTxPoolSize: number;
|
|
104
|
+
coinbase?: import("@aztec/foundation/schemas").EthAddress | undefined;
|
|
105
|
+
feeRecipient?: import("../aztec-address/index.js").AztecAddress | undefined;
|
|
106
|
+
transactionPollingIntervalMS?: number | undefined;
|
|
107
|
+
maxTxsPerBlock?: number | undefined;
|
|
108
|
+
minTxsPerBlock?: number | undefined;
|
|
109
|
+
maxL2BlockGas?: number | undefined;
|
|
110
|
+
publishTxsWithProposals?: boolean | undefined;
|
|
111
|
+
maxDABlockGas?: number | undefined;
|
|
112
|
+
acvmWorkingDirectory?: string | undefined;
|
|
113
|
+
acvmBinaryPath?: string | undefined;
|
|
114
|
+
txPublicSetupAllowList?: ({
|
|
115
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
116
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
117
|
+
} | {
|
|
118
|
+
address: import("../aztec-address/index.js").AztecAddress;
|
|
119
|
+
} | {
|
|
120
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
121
|
+
classId: import("@aztec/foundation/schemas").Fr;
|
|
122
|
+
} | {
|
|
123
|
+
classId: import("@aztec/foundation/schemas").Fr;
|
|
124
|
+
})[] | undefined;
|
|
125
|
+
maxBlockSizeInBytes?: number | undefined;
|
|
126
|
+
governanceProposerPayload?: import("@aztec/foundation/schemas").EthAddress | undefined;
|
|
127
|
+
maxL1TxInclusionTimeIntoSlot?: number | undefined;
|
|
128
|
+
enforceTimeTable?: boolean | undefined;
|
|
129
|
+
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
130
|
+
attestationPropagationTime?: number | undefined;
|
|
131
|
+
proverId?: import("@aztec/foundation/schemas").Fr | undefined;
|
|
132
|
+
nodeUrl?: string | undefined;
|
|
133
|
+
}, {
|
|
134
|
+
realProofs: boolean;
|
|
135
|
+
proverTestDelayType: "fixed" | "realistic";
|
|
136
|
+
proverTestDelayMs: number;
|
|
137
|
+
proverTestDelayFactor: number;
|
|
138
|
+
proverAgentCount: number;
|
|
139
|
+
maxTxPoolSize: number;
|
|
140
|
+
coinbase?: any;
|
|
141
|
+
feeRecipient?: any;
|
|
142
|
+
transactionPollingIntervalMS?: number | undefined;
|
|
143
|
+
maxTxsPerBlock?: number | undefined;
|
|
144
|
+
minTxsPerBlock?: number | undefined;
|
|
145
|
+
maxL2BlockGas?: number | undefined;
|
|
146
|
+
publishTxsWithProposals?: boolean | undefined;
|
|
147
|
+
maxDABlockGas?: number | undefined;
|
|
148
|
+
acvmWorkingDirectory?: string | undefined;
|
|
149
|
+
acvmBinaryPath?: string | undefined;
|
|
150
|
+
txPublicSetupAllowList?: ({
|
|
151
|
+
selector?: any;
|
|
152
|
+
address?: any;
|
|
153
|
+
} | {
|
|
154
|
+
address?: any;
|
|
155
|
+
} | {
|
|
156
|
+
selector?: any;
|
|
157
|
+
classId?: any;
|
|
158
|
+
} | {
|
|
159
|
+
classId?: any;
|
|
160
|
+
})[] | undefined;
|
|
161
|
+
maxBlockSizeInBytes?: number | undefined;
|
|
162
|
+
governanceProposerPayload?: any;
|
|
163
|
+
maxL1TxInclusionTimeIntoSlot?: number | undefined;
|
|
164
|
+
enforceTimeTable?: boolean | undefined;
|
|
165
|
+
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
166
|
+
attestationPropagationTime?: number | undefined;
|
|
167
|
+
proverId?: any;
|
|
168
|
+
nodeUrl?: string | undefined;
|
|
169
|
+
}>;
|
|
38
170
|
export declare const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin>;
|
|
39
171
|
export declare function createAztecNodeAdminClient(url: string, versions?: Partial<ComponentsVersions>, fetch?: typeof defaultFetch): AztecNodeAdmin;
|
|
40
172
|
//# sourceMappingURL=aztec-node-admin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec-node-admin.d.ts","sourceRoot":"","sources":["../../src/interfaces/aztec-node-admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"aztec-node-admin.d.ts","sourceRoot":"","sources":["../../src/interfaces/aztec-node-admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAE1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,KAAK,kBAAkB,EAAgC,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,oBAAoB,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE3C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;OAGG;IACH,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD;;;;OAIG;IACH,UAAU,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtE,+CAA+C;IAC/C,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B,gDAAgD;IAChD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,YAAY,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,cAAc,CAOhE,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,OAAO,CAAC,kBAAkB,CAAM,EAC1C,KAAK,sBAAe,GACnB,cAAc,CAMhB"}
|
|
@@ -3,11 +3,12 @@ import { z } from 'zod';
|
|
|
3
3
|
import { getVersioningResponseHandler } from '../versioning/index.js';
|
|
4
4
|
import { SequencerConfigSchema } from './configs.js';
|
|
5
5
|
import { ProverConfigSchema } from './prover-client.js';
|
|
6
|
+
export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConfigSchema).merge(z.object({
|
|
7
|
+
maxTxPoolSize: z.number()
|
|
8
|
+
}));
|
|
6
9
|
export const AztecNodeAdminApiSchema = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})).partial()).returns(z.void()),
|
|
10
|
-
flushTxs: z.function().returns(z.void()),
|
|
10
|
+
getConfig: z.function().returns(AztecNodeAdminConfigSchema),
|
|
11
|
+
setConfig: z.function().args(AztecNodeAdminConfigSchema.partial()).returns(z.void()),
|
|
11
12
|
startSnapshotUpload: z.function().args(z.string()).returns(z.void()),
|
|
12
13
|
rollbackTo: z.function().args(z.number()).returns(z.void()),
|
|
13
14
|
pauseSync: z.function().returns(z.void()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification_key.d.ts","sourceRoot":"","sources":["../../src/vks/verification_key.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification_key.d.ts","sourceRoot":"","sources":["../../src/vks/verification_key.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ULTRA_VK_LENGTH_IN_FIELDS } from '@aztec/constants';
|
|
2
2
|
import { makeTuple } from '@aztec/foundation/array';
|
|
3
3
|
import { times } from '@aztec/foundation/collection';
|
|
4
4
|
import { Fq, Fr } from '@aztec/foundation/fields';
|
|
@@ -122,10 +122,10 @@ export const CIRCUIT_RECURSIVE_INDEX = 3;
|
|
|
122
122
|
return new VerificationKeyAsFields(makeTuple(size, Fr.random, seed), Fr.random());
|
|
123
123
|
}
|
|
124
124
|
static makeFakeHonk(seed = 1) {
|
|
125
|
-
return new VerificationKeyAsFields(makeTuple(
|
|
125
|
+
return new VerificationKeyAsFields(makeTuple(ULTRA_VK_LENGTH_IN_FIELDS, Fr.random, seed), Fr.random());
|
|
126
126
|
}
|
|
127
127
|
static makeFakeRollupHonk(seed = 1) {
|
|
128
|
-
return new VerificationKeyAsFields(makeTuple(
|
|
128
|
+
return new VerificationKeyAsFields(makeTuple(ULTRA_VK_LENGTH_IN_FIELDS, (i)=>new Fr(i), seed), new Fr(seed + 1));
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
131
|
* Builds an 'empty' verification key
|
|
@@ -212,7 +212,7 @@ export class VerificationKeyData {
|
|
|
212
212
|
static makeFakeRollupHonk() {
|
|
213
213
|
return new VerificationKeyData(VerificationKeyAsFields.makeFakeRollupHonk(), VerificationKey.makeRollupFake().toBuffer());
|
|
214
214
|
}
|
|
215
|
-
static makeFake(len =
|
|
215
|
+
static makeFake(len = ULTRA_VK_LENGTH_IN_FIELDS) {
|
|
216
216
|
return new VerificationKeyData(VerificationKeyAsFields.makeFake(len), VerificationKey.makeFake().toBuffer());
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
@@ -7,8 +7,8 @@ export type ViemZkPassportProofParams = {
|
|
|
7
7
|
committedInputs: `0x${string}`;
|
|
8
8
|
committedInputCounts: bigint[];
|
|
9
9
|
validityPeriodInDays: bigint;
|
|
10
|
+
domain: string;
|
|
10
11
|
scope: string;
|
|
11
|
-
subscope: string;
|
|
12
12
|
devMode: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare class ZkPassportProofParams {
|
|
@@ -19,9 +19,9 @@ export declare class ZkPassportProofParams {
|
|
|
19
19
|
committedInputs: Buffer;
|
|
20
20
|
committedInputCounts: bigint[];
|
|
21
21
|
validityPeriodInDays: bigint;
|
|
22
|
+
domain: string;
|
|
22
23
|
scope: string;
|
|
23
|
-
|
|
24
|
-
constructor(devMode: boolean, vkeyHash: Buffer32, proof: Buffer, publicInputs: Fr[], committedInputs: Buffer, committedInputCounts: bigint[], validityPeriodInDays: bigint, scope: string, subscope: string);
|
|
24
|
+
constructor(devMode: boolean, vkeyHash: Buffer32, proof: Buffer, publicInputs: Fr[], committedInputs: Buffer, committedInputCounts: bigint[], validityPeriodInDays: bigint, domain: string, scope: string);
|
|
25
25
|
toBuffer(): Buffer<ArrayBufferLike>;
|
|
26
26
|
static random(): ZkPassportProofParams;
|
|
27
27
|
static fromBuffer(buffer: Buffer): ZkPassportProofParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zkpassport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;IAC9B,eAAe,EAAE,KAAK,MAAM,EAAE,CAAC;IAC/B,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zkpassport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;IAC9B,eAAe,EAAE,KAAK,MAAM,EAAE,CAAC;IAC/B,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAIF,qBAAa,qBAAqB;IAEvB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,MAAM;IACb,YAAY,EAAE,EAAE,EAAE;IAClB,eAAe,EAAE,MAAM;IACvB,oBAAoB,EAAE,MAAM,EAAE;IAC9B,oBAAoB,EAAE,MAAM;IAC5B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;gBARb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,EAAE,EAAE,EAClB,eAAe,EAAE,MAAM,EACvB,oBAAoB,EAAE,MAAM,EAAE,EAC9B,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM;IAGtB,QAAQ;IAkBR,MAAM,CAAC,MAAM;IAqBb,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM;IAehC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAcjD,MAAM,IAAI,yBAAyB;CAapC"}
|
package/dest/zkpassport/index.js
CHANGED
|
@@ -13,9 +13,9 @@ export class ZkPassportProofParams {
|
|
|
13
13
|
committedInputs;
|
|
14
14
|
committedInputCounts;
|
|
15
15
|
validityPeriodInDays;
|
|
16
|
+
domain;
|
|
16
17
|
scope;
|
|
17
|
-
|
|
18
|
-
constructor(devMode, vkeyHash, proof, publicInputs, committedInputs, committedInputCounts, validityPeriodInDays, scope, subscope){
|
|
18
|
+
constructor(devMode, vkeyHash, proof, publicInputs, committedInputs, committedInputCounts, validityPeriodInDays, domain, scope){
|
|
19
19
|
this.devMode = devMode;
|
|
20
20
|
this.vkeyHash = vkeyHash;
|
|
21
21
|
this.proof = proof;
|
|
@@ -23,8 +23,8 @@ export class ZkPassportProofParams {
|
|
|
23
23
|
this.committedInputs = committedInputs;
|
|
24
24
|
this.committedInputCounts = committedInputCounts;
|
|
25
25
|
this.validityPeriodInDays = validityPeriodInDays;
|
|
26
|
+
this.domain = domain;
|
|
26
27
|
this.scope = scope;
|
|
27
|
-
this.subscope = subscope;
|
|
28
28
|
}
|
|
29
29
|
toBuffer() {
|
|
30
30
|
return serializeToBuffer([
|
|
@@ -39,8 +39,8 @@ export class ZkPassportProofParams {
|
|
|
39
39
|
this.committedInputCounts.length,
|
|
40
40
|
this.committedInputCounts,
|
|
41
41
|
this.validityPeriodInDays,
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
42
|
+
this.domain,
|
|
43
|
+
this.scope
|
|
44
44
|
]);
|
|
45
45
|
}
|
|
46
46
|
static random() {
|
|
@@ -63,7 +63,7 @@ export class ZkPassportProofParams {
|
|
|
63
63
|
return new ZkPassportProofParams(reader.readBoolean(), reader.readObject(Buffer32), reader.readBuffer(), reader.readVector(Fr), reader.readBuffer(), reader.readUint256Vector(), reader.readUInt256(), reader.readString(), reader.readString());
|
|
64
64
|
}
|
|
65
65
|
static fromViem(params) {
|
|
66
|
-
return new ZkPassportProofParams(params.devMode, Buffer32.fromString(params.vkeyHash), Buffer.from(withoutHexPrefix(params.proof), 'hex'), params.publicInputs.map((input)=>Fr.fromString(input)), Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'), params.committedInputCounts, params.validityPeriodInDays, params.
|
|
66
|
+
return new ZkPassportProofParams(params.devMode, Buffer32.fromString(params.vkeyHash), Buffer.from(withoutHexPrefix(params.proof), 'hex'), params.publicInputs.map((input)=>Fr.fromString(input)), Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'), params.committedInputCounts, params.validityPeriodInDays, params.domain, params.scope);
|
|
67
67
|
}
|
|
68
68
|
toViem() {
|
|
69
69
|
return {
|
|
@@ -74,8 +74,8 @@ export class ZkPassportProofParams {
|
|
|
74
74
|
committedInputs: `0x${this.committedInputs.toString('hex')}`,
|
|
75
75
|
committedInputCounts: this.committedInputCounts,
|
|
76
76
|
validityPeriodInDays: this.validityPeriodInDays,
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
domain: this.domain,
|
|
78
|
+
scope: this.scope
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250726",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/bb.js": "1.0.0-nightly.
|
|
71
|
-
"@aztec/blob-lib": "1.0.0-nightly.
|
|
72
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
73
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
74
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
75
|
-
"@aztec/noir-noirc_abi": "1.0.0-nightly.
|
|
70
|
+
"@aztec/bb.js": "1.0.0-nightly.20250726",
|
|
71
|
+
"@aztec/blob-lib": "1.0.0-nightly.20250726",
|
|
72
|
+
"@aztec/constants": "1.0.0-nightly.20250726",
|
|
73
|
+
"@aztec/ethereum": "1.0.0-nightly.20250726",
|
|
74
|
+
"@aztec/foundation": "1.0.0-nightly.20250726",
|
|
75
|
+
"@aztec/noir-noirc_abi": "1.0.0-nightly.20250726",
|
|
76
76
|
"@google-cloud/storage": "^7.15.0",
|
|
77
77
|
"axios": "^1.9.0",
|
|
78
78
|
"json-stringify-deterministic": "1.0.12",
|
|
@@ -12,16 +12,15 @@ import { type ProverConfig, ProverConfigSchema } from './prover-client.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export interface AztecNodeAdmin {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @param config - Updated configuration to be merged with the current one.
|
|
15
|
+
* Retrieves the configuration of this node.
|
|
17
16
|
*/
|
|
18
|
-
|
|
17
|
+
getConfig(): Promise<AztecNodeAdminConfig>;
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Updates the configuration of this node.
|
|
21
|
+
* @param config - Updated configuration to be merged with the current one.
|
|
23
22
|
*/
|
|
24
|
-
|
|
23
|
+
setConfig(config: Partial<AztecNodeAdminConfig>): Promise<void>;
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
26
|
* Pauses syncing, creates a backup of archiver and world-state databases, and uploads them. Returns immediately.
|
|
@@ -43,16 +42,15 @@ export interface AztecNodeAdmin {
|
|
|
43
42
|
resumeSync(): Promise<void>;
|
|
44
43
|
}
|
|
45
44
|
|
|
45
|
+
export type AztecNodeAdminConfig = SequencerConfig & ProverConfig & { maxTxPoolSize: number };
|
|
46
|
+
|
|
47
|
+
export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConfigSchema).merge(
|
|
48
|
+
z.object({ maxTxPoolSize: z.number() }),
|
|
49
|
+
);
|
|
50
|
+
|
|
46
51
|
export const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin> = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
.args(
|
|
50
|
-
SequencerConfigSchema.merge(ProverConfigSchema)
|
|
51
|
-
.merge(z.object({ maxTxPoolSize: z.number() }))
|
|
52
|
-
.partial(),
|
|
53
|
-
)
|
|
54
|
-
.returns(z.void()),
|
|
55
|
-
flushTxs: z.function().returns(z.void()),
|
|
52
|
+
getConfig: z.function().returns(AztecNodeAdminConfigSchema),
|
|
53
|
+
setConfig: z.function().args(AztecNodeAdminConfigSchema.partial()).returns(z.void()),
|
|
56
54
|
startSnapshotUpload: z.function().args(z.string()).returns(z.void()),
|
|
57
55
|
rollbackTo: z.function().args(z.number()).returns(z.void()),
|
|
58
56
|
pauseSync: z.function().returns(z.void()),
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS,
|
|
3
|
-
ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS,
|
|
4
|
-
} from '@aztec/constants';
|
|
1
|
+
import { ULTRA_VK_LENGTH_IN_FIELDS } from '@aztec/constants';
|
|
5
2
|
import { makeTuple } from '@aztec/foundation/array';
|
|
6
3
|
import { times } from '@aztec/foundation/collection';
|
|
7
4
|
import { Fq, Fr } from '@aztec/foundation/fields';
|
|
@@ -151,12 +148,12 @@ export class VerificationKeyAsFields {
|
|
|
151
148
|
}
|
|
152
149
|
|
|
153
150
|
static makeFakeHonk(seed = 1): VerificationKeyAsFields {
|
|
154
|
-
return new VerificationKeyAsFields(makeTuple(
|
|
151
|
+
return new VerificationKeyAsFields(makeTuple(ULTRA_VK_LENGTH_IN_FIELDS, Fr.random, seed), Fr.random());
|
|
155
152
|
}
|
|
156
153
|
|
|
157
154
|
static makeFakeRollupHonk(seed = 1): VerificationKeyAsFields {
|
|
158
155
|
return new VerificationKeyAsFields(
|
|
159
|
-
makeTuple(
|
|
156
|
+
makeTuple(ULTRA_VK_LENGTH_IN_FIELDS, i => new Fr(i), seed),
|
|
160
157
|
new Fr(seed + 1),
|
|
161
158
|
);
|
|
162
159
|
}
|
|
@@ -293,7 +290,7 @@ export class VerificationKeyData {
|
|
|
293
290
|
);
|
|
294
291
|
}
|
|
295
292
|
|
|
296
|
-
static makeFake(len =
|
|
293
|
+
static makeFake(len = ULTRA_VK_LENGTH_IN_FIELDS): VerificationKeyData {
|
|
297
294
|
return new VerificationKeyData(VerificationKeyAsFields.makeFake(len), VerificationKey.makeFake().toBuffer());
|
|
298
295
|
}
|
|
299
296
|
|
package/src/zkpassport/index.ts
CHANGED
|
@@ -11,8 +11,8 @@ export type ViemZkPassportProofParams = {
|
|
|
11
11
|
committedInputs: `0x${string}`;
|
|
12
12
|
committedInputCounts: bigint[];
|
|
13
13
|
validityPeriodInDays: bigint;
|
|
14
|
+
domain: string;
|
|
14
15
|
scope: string;
|
|
15
|
-
subscope: string;
|
|
16
16
|
devMode: boolean;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -27,8 +27,8 @@ export class ZkPassportProofParams {
|
|
|
27
27
|
public committedInputs: Buffer,
|
|
28
28
|
public committedInputCounts: bigint[],
|
|
29
29
|
public validityPeriodInDays: bigint,
|
|
30
|
+
public domain: string,
|
|
30
31
|
public scope: string,
|
|
31
|
-
public subscope: string,
|
|
32
32
|
) {}
|
|
33
33
|
|
|
34
34
|
toBuffer() {
|
|
@@ -44,8 +44,8 @@ export class ZkPassportProofParams {
|
|
|
44
44
|
this.committedInputCounts.length,
|
|
45
45
|
this.committedInputCounts,
|
|
46
46
|
this.validityPeriodInDays,
|
|
47
|
+
this.domain,
|
|
47
48
|
this.scope,
|
|
48
|
-
this.subscope,
|
|
49
49
|
]);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -94,8 +94,8 @@ export class ZkPassportProofParams {
|
|
|
94
94
|
Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'),
|
|
95
95
|
params.committedInputCounts,
|
|
96
96
|
params.validityPeriodInDays,
|
|
97
|
+
params.domain,
|
|
97
98
|
params.scope,
|
|
98
|
-
params.subscope,
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -108,8 +108,8 @@ export class ZkPassportProofParams {
|
|
|
108
108
|
committedInputs: `0x${this.committedInputs.toString('hex')}`,
|
|
109
109
|
committedInputCounts: this.committedInputCounts,
|
|
110
110
|
validityPeriodInDays: this.validityPeriodInDays,
|
|
111
|
+
domain: this.domain,
|
|
111
112
|
scope: this.scope,
|
|
112
|
-
subscope: this.subscope,
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
}
|