@aztec/stdlib 3.0.0-nightly.20250924 → 3.0.0-nightly.20250925
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/pxe.d.ts +5 -179
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +2 -59
- package/package.json +8 -8
- package/src/interfaces/pxe.ts +8 -80
package/dest/interfaces/pxe.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { ApiSchemaFor, ZodFor } from '@aztec/foundation/schemas';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { type AbiType, type ContractArtifact } from '../abi/abi.js';
|
|
5
4
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
@@ -7,7 +6,7 @@ import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
|
7
6
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
8
7
|
import { CompleteAddress, type ContractClassWithId, type ContractInstanceWithAddress, type PartialAddress, type ProtocolContractAddresses } from '../contract/index.js';
|
|
9
8
|
import { UniqueNote } from '../note/extended_note.js';
|
|
10
|
-
import {
|
|
9
|
+
import type { NotesFilter } from '../note/notes_filter.js';
|
|
11
10
|
import { SimulationOverrides, TxExecutionRequest, TxSimulationResult } from '../tx/index.js';
|
|
12
11
|
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
13
12
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
@@ -188,6 +187,10 @@ export interface PXE {
|
|
|
188
187
|
* @returns - The deserialized events.
|
|
189
188
|
*/
|
|
190
189
|
getPrivateEvents<T>(contractAddress: AztecAddress, eventMetadata: EventMetadataDefinition, from: number, numBlocks: number, recipients: AztecAddress[]): Promise<T[]>;
|
|
190
|
+
/**
|
|
191
|
+
* Stops the PXE's job queue.
|
|
192
|
+
*/
|
|
193
|
+
stop(): Promise<void>;
|
|
191
194
|
}
|
|
192
195
|
export type EventMetadataDefinition = {
|
|
193
196
|
eventSelector: EventSelector;
|
|
@@ -229,181 +232,4 @@ export interface ContractClassMetadata {
|
|
|
229
232
|
isContractClassPubliclyRegistered: boolean;
|
|
230
233
|
artifact?: ContractArtifact | undefined;
|
|
231
234
|
}
|
|
232
|
-
export declare const ContractMetadataSchema: z.ZodObject<{
|
|
233
|
-
contractInstance: z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
234
|
-
version: z.ZodLiteral<1>;
|
|
235
|
-
salt: ZodFor<Fr>;
|
|
236
|
-
deployer: ZodFor<AztecAddress>;
|
|
237
|
-
currentContractClassId: ZodFor<Fr>;
|
|
238
|
-
originalContractClassId: ZodFor<Fr>;
|
|
239
|
-
initializationHash: ZodFor<Fr>;
|
|
240
|
-
publicKeys: z.ZodEffects<z.ZodObject<{
|
|
241
|
-
masterNullifierPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
242
|
-
masterIncomingViewingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
243
|
-
masterOutgoingViewingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
244
|
-
masterTaggingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
245
|
-
}, "strip", z.ZodTypeAny, {
|
|
246
|
-
masterNullifierPublicKey: import("@aztec/foundation/fields").Point;
|
|
247
|
-
masterIncomingViewingPublicKey: import("@aztec/foundation/fields").Point;
|
|
248
|
-
masterOutgoingViewingPublicKey: import("@aztec/foundation/fields").Point;
|
|
249
|
-
masterTaggingPublicKey: import("@aztec/foundation/fields").Point;
|
|
250
|
-
}, {
|
|
251
|
-
masterNullifierPublicKey: string;
|
|
252
|
-
masterIncomingViewingPublicKey: string;
|
|
253
|
-
masterOutgoingViewingPublicKey: string;
|
|
254
|
-
masterTaggingPublicKey: string;
|
|
255
|
-
}>, import("../keys/public_keys.js").PublicKeys, {
|
|
256
|
-
masterNullifierPublicKey: string;
|
|
257
|
-
masterIncomingViewingPublicKey: string;
|
|
258
|
-
masterOutgoingViewingPublicKey: string;
|
|
259
|
-
masterTaggingPublicKey: string;
|
|
260
|
-
}>;
|
|
261
|
-
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
version: 1;
|
|
263
|
-
salt: Fr;
|
|
264
|
-
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
265
|
-
deployer: AztecAddress;
|
|
266
|
-
currentContractClassId: Fr;
|
|
267
|
-
originalContractClassId: Fr;
|
|
268
|
-
initializationHash: Fr;
|
|
269
|
-
}, {
|
|
270
|
-
version: 1;
|
|
271
|
-
publicKeys: {
|
|
272
|
-
masterNullifierPublicKey: string;
|
|
273
|
-
masterIncomingViewingPublicKey: string;
|
|
274
|
-
masterOutgoingViewingPublicKey: string;
|
|
275
|
-
masterTaggingPublicKey: string;
|
|
276
|
-
};
|
|
277
|
-
salt?: any;
|
|
278
|
-
deployer?: any;
|
|
279
|
-
currentContractClassId?: any;
|
|
280
|
-
originalContractClassId?: any;
|
|
281
|
-
initializationHash?: any;
|
|
282
|
-
}>, z.ZodObject<{
|
|
283
|
-
address: ZodFor<AztecAddress>;
|
|
284
|
-
}, "strip", z.ZodTypeAny, {
|
|
285
|
-
address: AztecAddress;
|
|
286
|
-
}, {
|
|
287
|
-
address?: any;
|
|
288
|
-
}>>, z.ZodUndefined]>;
|
|
289
|
-
isContractInitialized: z.ZodBoolean;
|
|
290
|
-
isContractPublished: z.ZodBoolean;
|
|
291
|
-
}, "strip", z.ZodTypeAny, {
|
|
292
|
-
isContractInitialized: boolean;
|
|
293
|
-
isContractPublished: boolean;
|
|
294
|
-
contractInstance?: ({
|
|
295
|
-
version: 1;
|
|
296
|
-
salt: Fr;
|
|
297
|
-
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
298
|
-
deployer: AztecAddress;
|
|
299
|
-
currentContractClassId: Fr;
|
|
300
|
-
originalContractClassId: Fr;
|
|
301
|
-
initializationHash: Fr;
|
|
302
|
-
} & {
|
|
303
|
-
address: AztecAddress;
|
|
304
|
-
}) | undefined;
|
|
305
|
-
}, {
|
|
306
|
-
isContractInitialized: boolean;
|
|
307
|
-
isContractPublished: boolean;
|
|
308
|
-
contractInstance?: ({
|
|
309
|
-
version: 1;
|
|
310
|
-
publicKeys: {
|
|
311
|
-
masterNullifierPublicKey: string;
|
|
312
|
-
masterIncomingViewingPublicKey: string;
|
|
313
|
-
masterOutgoingViewingPublicKey: string;
|
|
314
|
-
masterTaggingPublicKey: string;
|
|
315
|
-
};
|
|
316
|
-
salt?: any;
|
|
317
|
-
deployer?: any;
|
|
318
|
-
currentContractClassId?: any;
|
|
319
|
-
originalContractClassId?: any;
|
|
320
|
-
initializationHash?: any;
|
|
321
|
-
} & {
|
|
322
|
-
address?: any;
|
|
323
|
-
}) | undefined;
|
|
324
|
-
}>;
|
|
325
|
-
export declare const ContractClassMetadataSchema: z.ZodObject<{
|
|
326
|
-
contractClass: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
327
|
-
version: z.ZodLiteral<1>;
|
|
328
|
-
artifactHash: z.ZodType<Fr, any, string>;
|
|
329
|
-
privateFunctions: z.ZodArray<z.ZodObject<{
|
|
330
|
-
selector: ZodFor<import("../abi/function_selector.js").FunctionSelector>;
|
|
331
|
-
vkHash: z.ZodType<Fr, any, string>;
|
|
332
|
-
}, "strip", z.ZodTypeAny, {
|
|
333
|
-
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
334
|
-
vkHash: Fr;
|
|
335
|
-
}, {
|
|
336
|
-
vkHash: string;
|
|
337
|
-
selector?: any;
|
|
338
|
-
}>, "many">;
|
|
339
|
-
packedBytecode: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer<ArrayBuffer>, string>, z.ZodEffects<z.ZodObject<{
|
|
340
|
-
type: z.ZodLiteral<"Buffer">;
|
|
341
|
-
data: z.ZodArray<z.ZodNumber, "many">;
|
|
342
|
-
}, "strip", z.ZodTypeAny, {
|
|
343
|
-
type: "Buffer";
|
|
344
|
-
data: number[];
|
|
345
|
-
}, {
|
|
346
|
-
type: "Buffer";
|
|
347
|
-
data: number[];
|
|
348
|
-
}>, Buffer<ArrayBuffer>, {
|
|
349
|
-
type: "Buffer";
|
|
350
|
-
data: number[];
|
|
351
|
-
}>]>;
|
|
352
|
-
}, {
|
|
353
|
-
id: z.ZodType<Fr, any, string>;
|
|
354
|
-
}>, "strip", z.ZodTypeAny, {
|
|
355
|
-
version: 1;
|
|
356
|
-
id: Fr;
|
|
357
|
-
artifactHash: Fr;
|
|
358
|
-
packedBytecode: Buffer<ArrayBuffer>;
|
|
359
|
-
privateFunctions: {
|
|
360
|
-
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
361
|
-
vkHash: Fr;
|
|
362
|
-
}[];
|
|
363
|
-
}, {
|
|
364
|
-
version: 1;
|
|
365
|
-
id: string;
|
|
366
|
-
artifactHash: string;
|
|
367
|
-
packedBytecode: string | {
|
|
368
|
-
type: "Buffer";
|
|
369
|
-
data: number[];
|
|
370
|
-
};
|
|
371
|
-
privateFunctions: {
|
|
372
|
-
vkHash: string;
|
|
373
|
-
selector?: any;
|
|
374
|
-
}[];
|
|
375
|
-
}>, z.ZodUndefined]>;
|
|
376
|
-
isContractClassPubliclyRegistered: z.ZodBoolean;
|
|
377
|
-
artifact: z.ZodUnion<[ZodFor<ContractArtifact>, z.ZodUndefined]>;
|
|
378
|
-
}, "strip", z.ZodTypeAny, {
|
|
379
|
-
isContractClassPubliclyRegistered: boolean;
|
|
380
|
-
artifact?: ContractArtifact | undefined;
|
|
381
|
-
contractClass?: {
|
|
382
|
-
version: 1;
|
|
383
|
-
id: Fr;
|
|
384
|
-
artifactHash: Fr;
|
|
385
|
-
packedBytecode: Buffer<ArrayBuffer>;
|
|
386
|
-
privateFunctions: {
|
|
387
|
-
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
388
|
-
vkHash: Fr;
|
|
389
|
-
}[];
|
|
390
|
-
} | undefined;
|
|
391
|
-
}, {
|
|
392
|
-
isContractClassPubliclyRegistered: boolean;
|
|
393
|
-
artifact?: any;
|
|
394
|
-
contractClass?: {
|
|
395
|
-
version: 1;
|
|
396
|
-
id: string;
|
|
397
|
-
artifactHash: string;
|
|
398
|
-
packedBytecode: string | {
|
|
399
|
-
type: "Buffer";
|
|
400
|
-
data: number[];
|
|
401
|
-
};
|
|
402
|
-
privateFunctions: {
|
|
403
|
-
vkHash: string;
|
|
404
|
-
selector?: any;
|
|
405
|
-
}[];
|
|
406
|
-
} | undefined;
|
|
407
|
-
}>;
|
|
408
|
-
export declare const PXESchema: ApiSchemaFor<PXE>;
|
|
409
235
|
//# sourceMappingURL=pxe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../../src/interfaces/pxe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../../src/interfaces/pxe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM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EAChB,eAAe,EAAE,YAAY,EAC7B,aAAa,EAAE,uBAAuB,EACtC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,YAAY,EAAE,GACzB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAEhB;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAGD,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,oDAAoD;AACpD,oBAAY,SAAS;IACnB,SAAS,cAAc;IACvB,WAAW,gBAAgB;CAC5B;AAED,wDAAwD;AACxD,MAAM,WAAW,OAAO;IACtB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,yBAAyB,EAAE,yBAAyB,CAAC;CACtD;AAED,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAC3D,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD,iCAAiC,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACzC"}
|
package/dest/interfaces/pxe.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AbiTypeSchema
|
|
3
|
-
import {
|
|
4
|
-
import { CompleteAddress, ContractClassWithIdSchema, ContractInstanceWithAddressSchema, ProtocolContractAddressesSchema } from '../contract/index.js';
|
|
5
|
-
import { UniqueNote } from '../note/extended_note.js';
|
|
6
|
-
import { NotesFilterSchema } from '../note/notes_filter.js';
|
|
7
|
-
import { AbiDecodedSchema, optional, schemas } from '../schemas/schemas.js';
|
|
8
|
-
import { SimulationOverrides, TxExecutionRequest, TxSimulationResult } from '../tx/index.js';
|
|
9
|
-
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
10
|
-
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
2
|
+
import { AbiTypeSchema } from '../abi/abi.js';
|
|
3
|
+
import { schemas } from '../schemas/schemas.js';
|
|
11
4
|
export const EventMetadataDefinitionSchema = z.object({
|
|
12
5
|
eventSelector: schemas.EventSelector,
|
|
13
6
|
abiType: AbiTypeSchema,
|
|
@@ -18,53 +11,3 @@ export const EventMetadataDefinitionSchema = z.object({
|
|
|
18
11
|
EventType["Unencrypted"] = "Unencrypted";
|
|
19
12
|
return EventType;
|
|
20
13
|
}({});
|
|
21
|
-
export const ContractMetadataSchema = z.object({
|
|
22
|
-
contractInstance: z.union([
|
|
23
|
-
ContractInstanceWithAddressSchema,
|
|
24
|
-
z.undefined()
|
|
25
|
-
]),
|
|
26
|
-
isContractInitialized: z.boolean(),
|
|
27
|
-
isContractPublished: z.boolean()
|
|
28
|
-
});
|
|
29
|
-
export const ContractClassMetadataSchema = z.object({
|
|
30
|
-
contractClass: z.union([
|
|
31
|
-
ContractClassWithIdSchema,
|
|
32
|
-
z.undefined()
|
|
33
|
-
]),
|
|
34
|
-
isContractClassPubliclyRegistered: z.boolean(),
|
|
35
|
-
artifact: z.union([
|
|
36
|
-
ContractArtifactSchema,
|
|
37
|
-
z.undefined()
|
|
38
|
-
])
|
|
39
|
-
});
|
|
40
|
-
const PXEInfoSchema = z.object({
|
|
41
|
-
pxeVersion: z.string(),
|
|
42
|
-
protocolContractAddresses: ProtocolContractAddressesSchema
|
|
43
|
-
});
|
|
44
|
-
export const PXESchema = {
|
|
45
|
-
registerAccount: z.function().args(schemas.Fr, schemas.Fr).returns(CompleteAddress.schema),
|
|
46
|
-
getRegisteredAccounts: z.function().returns(z.array(CompleteAddress.schema)),
|
|
47
|
-
registerSender: z.function().args(schemas.AztecAddress).returns(schemas.AztecAddress),
|
|
48
|
-
getSenders: z.function().returns(z.array(schemas.AztecAddress)),
|
|
49
|
-
removeSender: z.function().args(schemas.AztecAddress).returns(z.void()),
|
|
50
|
-
registerContractClass: z.function().args(ContractArtifactSchema).returns(z.void()),
|
|
51
|
-
registerContract: z.function().args(z.object({
|
|
52
|
-
instance: ContractInstanceWithAddressSchema,
|
|
53
|
-
artifact: z.optional(ContractArtifactSchema)
|
|
54
|
-
})).returns(z.void()),
|
|
55
|
-
updateContract: z.function().args(schemas.AztecAddress, ContractArtifactSchema).returns(z.void()),
|
|
56
|
-
getContracts: z.function().returns(z.array(schemas.AztecAddress)),
|
|
57
|
-
proveTx: z.function().args(TxExecutionRequest.schema).returns(TxProvingResult.schema),
|
|
58
|
-
profileTx: z.function().args(TxExecutionRequest.schema, z.union([
|
|
59
|
-
z.literal('gates'),
|
|
60
|
-
z.literal('full'),
|
|
61
|
-
z.literal('execution-steps')
|
|
62
|
-
]), optional(z.boolean()), optional(schemas.AztecAddress)).returns(TxProfileResult.schema),
|
|
63
|
-
simulateTx: z.function().args(TxExecutionRequest.schema, z.boolean(), optional(z.boolean()), optional(z.boolean()), optional(SimulationOverrides.schema), optional(z.array(schemas.AztecAddress))).returns(TxSimulationResult.schema),
|
|
64
|
-
getNotes: z.function().args(NotesFilterSchema).returns(z.array(UniqueNote.schema)),
|
|
65
|
-
simulateUtility: z.function().args(z.string(), z.array(z.any()), schemas.AztecAddress, optional(z.array(AuthWitness.schema)), optional(schemas.AztecAddress), optional(z.array(schemas.AztecAddress))).returns(UtilitySimulationResult.schema),
|
|
66
|
-
getPXEInfo: z.function().returns(PXEInfoSchema),
|
|
67
|
-
getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
|
|
68
|
-
getContractClassMetadata: z.function().args(schemas.Fr, optional(z.boolean())).returns(ContractClassMetadataSchema),
|
|
69
|
-
getPrivateEvents: z.function().args(schemas.AztecAddress, EventMetadataDefinitionSchema, z.number(), z.number(), z.array(schemas.AztecAddress)).returns(z.array(AbiDecodedSchema))
|
|
70
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20250925",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/bb.js": "3.0.0-nightly.
|
|
73
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
74
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
75
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
76
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
77
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
78
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
72
|
+
"@aztec/bb.js": "3.0.0-nightly.20250925",
|
|
73
|
+
"@aztec/blob-lib": "3.0.0-nightly.20250925",
|
|
74
|
+
"@aztec/constants": "3.0.0-nightly.20250925",
|
|
75
|
+
"@aztec/ethereum": "3.0.0-nightly.20250925",
|
|
76
|
+
"@aztec/foundation": "3.0.0-nightly.20250925",
|
|
77
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20250925",
|
|
78
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20250925",
|
|
79
79
|
"@google-cloud/storage": "^7.15.0",
|
|
80
80
|
"axios": "^1.9.0",
|
|
81
81
|
"json-stringify-deterministic": "1.0.12",
|
package/src/interfaces/pxe.ts
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { ApiSchemaFor, ZodFor } from '@aztec/foundation/schemas';
|
|
3
2
|
|
|
4
3
|
import { z } from 'zod';
|
|
5
4
|
|
|
6
|
-
import { type AbiType, AbiTypeSchema, type ContractArtifact
|
|
5
|
+
import { type AbiType, AbiTypeSchema, type ContractArtifact } from '../abi/abi.js';
|
|
7
6
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
8
7
|
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
9
8
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
10
9
|
import {
|
|
11
10
|
CompleteAddress,
|
|
12
11
|
type ContractClassWithId,
|
|
13
|
-
ContractClassWithIdSchema,
|
|
14
12
|
type ContractInstanceWithAddress,
|
|
15
|
-
ContractInstanceWithAddressSchema,
|
|
16
13
|
type PartialAddress,
|
|
17
14
|
type ProtocolContractAddresses,
|
|
18
|
-
ProtocolContractAddressesSchema,
|
|
19
15
|
} from '../contract/index.js';
|
|
20
16
|
import { UniqueNote } from '../note/extended_note.js';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
17
|
+
import type { NotesFilter } from '../note/notes_filter.js';
|
|
18
|
+
import { schemas } from '../schemas/schemas.js';
|
|
23
19
|
import { SimulationOverrides, TxExecutionRequest, TxSimulationResult } from '../tx/index.js';
|
|
24
20
|
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
25
21
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
@@ -241,6 +237,11 @@ export interface PXE {
|
|
|
241
237
|
numBlocks: number,
|
|
242
238
|
recipients: AztecAddress[],
|
|
243
239
|
): Promise<T[]>;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Stops the PXE's job queue.
|
|
243
|
+
*/
|
|
244
|
+
stop(): Promise<void>;
|
|
244
245
|
}
|
|
245
246
|
// docs:end:pxe-interface
|
|
246
247
|
|
|
@@ -281,76 +282,3 @@ export interface ContractClassMetadata {
|
|
|
281
282
|
isContractClassPubliclyRegistered: boolean;
|
|
282
283
|
artifact?: ContractArtifact | undefined;
|
|
283
284
|
}
|
|
284
|
-
|
|
285
|
-
export const ContractMetadataSchema = z.object({
|
|
286
|
-
contractInstance: z.union([ContractInstanceWithAddressSchema, z.undefined()]),
|
|
287
|
-
isContractInitialized: z.boolean(),
|
|
288
|
-
isContractPublished: z.boolean(),
|
|
289
|
-
}) satisfies ZodFor<ContractMetadata>;
|
|
290
|
-
|
|
291
|
-
export const ContractClassMetadataSchema = z.object({
|
|
292
|
-
contractClass: z.union([ContractClassWithIdSchema, z.undefined()]),
|
|
293
|
-
isContractClassPubliclyRegistered: z.boolean(),
|
|
294
|
-
artifact: z.union([ContractArtifactSchema, z.undefined()]),
|
|
295
|
-
}) satisfies ZodFor<ContractClassMetadata>;
|
|
296
|
-
|
|
297
|
-
const PXEInfoSchema = z.object({
|
|
298
|
-
pxeVersion: z.string(),
|
|
299
|
-
protocolContractAddresses: ProtocolContractAddressesSchema,
|
|
300
|
-
}) satisfies ZodFor<PXEInfo>;
|
|
301
|
-
|
|
302
|
-
export const PXESchema: ApiSchemaFor<PXE> = {
|
|
303
|
-
registerAccount: z.function().args(schemas.Fr, schemas.Fr).returns(CompleteAddress.schema),
|
|
304
|
-
getRegisteredAccounts: z.function().returns(z.array(CompleteAddress.schema)),
|
|
305
|
-
registerSender: z.function().args(schemas.AztecAddress).returns(schemas.AztecAddress),
|
|
306
|
-
getSenders: z.function().returns(z.array(schemas.AztecAddress)),
|
|
307
|
-
removeSender: z.function().args(schemas.AztecAddress).returns(z.void()),
|
|
308
|
-
registerContractClass: z.function().args(ContractArtifactSchema).returns(z.void()),
|
|
309
|
-
registerContract: z
|
|
310
|
-
.function()
|
|
311
|
-
.args(z.object({ instance: ContractInstanceWithAddressSchema, artifact: z.optional(ContractArtifactSchema) }))
|
|
312
|
-
.returns(z.void()),
|
|
313
|
-
updateContract: z.function().args(schemas.AztecAddress, ContractArtifactSchema).returns(z.void()),
|
|
314
|
-
getContracts: z.function().returns(z.array(schemas.AztecAddress)),
|
|
315
|
-
proveTx: z.function().args(TxExecutionRequest.schema).returns(TxProvingResult.schema),
|
|
316
|
-
profileTx: z
|
|
317
|
-
.function()
|
|
318
|
-
.args(
|
|
319
|
-
TxExecutionRequest.schema,
|
|
320
|
-
z.union([z.literal('gates'), z.literal('full'), z.literal('execution-steps')]),
|
|
321
|
-
optional(z.boolean()),
|
|
322
|
-
optional(schemas.AztecAddress),
|
|
323
|
-
)
|
|
324
|
-
.returns(TxProfileResult.schema),
|
|
325
|
-
simulateTx: z
|
|
326
|
-
.function()
|
|
327
|
-
.args(
|
|
328
|
-
TxExecutionRequest.schema,
|
|
329
|
-
z.boolean(),
|
|
330
|
-
optional(z.boolean()),
|
|
331
|
-
optional(z.boolean()),
|
|
332
|
-
optional(SimulationOverrides.schema),
|
|
333
|
-
optional(z.array(schemas.AztecAddress)),
|
|
334
|
-
)
|
|
335
|
-
.returns(TxSimulationResult.schema),
|
|
336
|
-
getNotes: z.function().args(NotesFilterSchema).returns(z.array(UniqueNote.schema)),
|
|
337
|
-
|
|
338
|
-
simulateUtility: z
|
|
339
|
-
.function()
|
|
340
|
-
.args(
|
|
341
|
-
z.string(),
|
|
342
|
-
z.array(z.any()),
|
|
343
|
-
schemas.AztecAddress,
|
|
344
|
-
optional(z.array(AuthWitness.schema)),
|
|
345
|
-
optional(schemas.AztecAddress),
|
|
346
|
-
optional(z.array(schemas.AztecAddress)),
|
|
347
|
-
)
|
|
348
|
-
.returns(UtilitySimulationResult.schema),
|
|
349
|
-
getPXEInfo: z.function().returns(PXEInfoSchema),
|
|
350
|
-
getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
|
|
351
|
-
getContractClassMetadata: z.function().args(schemas.Fr, optional(z.boolean())).returns(ContractClassMetadataSchema),
|
|
352
|
-
getPrivateEvents: z
|
|
353
|
-
.function()
|
|
354
|
-
.args(schemas.AztecAddress, EventMetadataDefinitionSchema, z.number(), z.number(), z.array(schemas.AztecAddress))
|
|
355
|
-
.returns(z.array(AbiDecodedSchema)),
|
|
356
|
-
};
|