@aztec/pxe 0.0.1-commit.43597cc1 → 0.0.1-commit.4ad48494d
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/contract_function_simulator/contract_function_simulator.d.ts +51 -28
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +167 -63
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +2 -2
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +34 -36
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +71 -18
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +29 -12
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +31 -28
- package/dest/contract_sync/contract_sync_service.d.ts +3 -2
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +32 -17
- package/dest/debug/pxe_debug_utils.d.ts +1 -1
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +9 -1
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +9 -1
- package/dest/entrypoints/server/utils.js +9 -1
- package/dest/logs/log_service.d.ts +1 -1
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +4 -9
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +2 -2
- package/dest/pxe.d.ts +56 -22
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +38 -33
- package/dest/storage/note_store/note_store.d.ts +1 -2
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +1 -2
- package/package.json +16 -16
- package/src/contract_function_simulator/contract_function_simulator.ts +312 -119
- package/src/contract_function_simulator/oracle/interfaces.ts +1 -1
- package/src/contract_function_simulator/oracle/oracle.ts +2 -2
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +91 -93
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +67 -25
- package/src/contract_sync/contract_sync_service.ts +41 -25
- package/src/debug/pxe_debug_utils.ts +3 -2
- package/src/entrypoints/client/bundle/utils.ts +9 -1
- package/src/entrypoints/client/lazy/utils.ts +9 -1
- package/src/entrypoints/server/utils.ts +7 -7
- package/src/logs/log_service.ts +4 -13
- package/src/oracle_version.ts +2 -2
- package/src/pxe.ts +99 -70
- package/src/storage/note_store/note_store.ts +1 -2
package/dest/pxe.js
CHANGED
|
@@ -84,11 +84,12 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
84
84
|
* can be contacted.
|
|
85
85
|
*
|
|
86
86
|
* @returns A promise that resolves PXE is ready to be used.
|
|
87
|
-
*/ static async create(node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix) {
|
|
87
|
+
*/ static async create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix }) {
|
|
88
88
|
// Extract bindings from the logger, or use empty bindings if a string suffix is provided.
|
|
89
89
|
const bindings = loggerOrSuffix && typeof loggerOrSuffix !== 'string' ? loggerOrSuffix.getBindings() : undefined;
|
|
90
90
|
const log = !loggerOrSuffix || typeof loggerOrSuffix === 'string' ? createLogger(loggerOrSuffix ? `pxe:service:${loggerOrSuffix}` : `pxe:service`) : loggerOrSuffix;
|
|
91
|
-
const
|
|
91
|
+
const info = await node.getNodeInfo();
|
|
92
|
+
const proverEnabled = config.proverEnabled !== undefined ? config.proverEnabled : info.realProofs;
|
|
92
93
|
const addressStore = new AddressStore(store);
|
|
93
94
|
const privateEventStore = new PrivateEventStore(store);
|
|
94
95
|
const contractStore = new ContractStore(store);
|
|
@@ -117,14 +118,26 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
117
118
|
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#simulateUtility.bind(pxe));
|
|
118
119
|
pxe.jobQueue.start();
|
|
119
120
|
await pxe.#registerProtocolContracts();
|
|
120
|
-
const info = await node.getNodeInfo();
|
|
121
121
|
log.info(`Started PXE connected to chain ${info.l1ChainId} version ${info.rollupVersion}`);
|
|
122
122
|
return pxe;
|
|
123
123
|
}
|
|
124
124
|
// Internal methods
|
|
125
125
|
#getSimulatorForTx(overrides) {
|
|
126
126
|
const proxyContractStore = ProxiedContractStoreFactory.create(this.contractStore, overrides?.contracts);
|
|
127
|
-
return new ContractFunctionSimulator(
|
|
127
|
+
return new ContractFunctionSimulator({
|
|
128
|
+
contractStore: proxyContractStore,
|
|
129
|
+
noteStore: this.noteStore,
|
|
130
|
+
keyStore: this.keyStore,
|
|
131
|
+
addressStore: this.addressStore,
|
|
132
|
+
aztecNode: BenchmarkedNodeFactory.create(this.node),
|
|
133
|
+
senderTaggingStore: this.senderTaggingStore,
|
|
134
|
+
recipientTaggingStore: this.recipientTaggingStore,
|
|
135
|
+
senderAddressBookStore: this.senderAddressBookStore,
|
|
136
|
+
capsuleStore: this.capsuleStore,
|
|
137
|
+
privateEventStore: this.privateEventStore,
|
|
138
|
+
simulator: this.simulator,
|
|
139
|
+
contractSyncService: this.contractSyncService
|
|
140
|
+
});
|
|
128
141
|
}
|
|
129
142
|
#contextualizeError(err, ...context) {
|
|
130
143
|
let contextStr = '';
|
|
@@ -180,10 +193,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
180
193
|
const { origin: contractAddress, functionSelector } = txRequest;
|
|
181
194
|
try {
|
|
182
195
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
183
|
-
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [],
|
|
184
|
-
const result = await contractFunctionSimulator.run(txRequest,
|
|
185
|
-
|
|
186
|
-
|
|
196
|
+
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
|
|
197
|
+
const result = await contractFunctionSimulator.run(txRequest, {
|
|
198
|
+
contractAddress,
|
|
199
|
+
selector: functionSelector,
|
|
200
|
+
anchorBlockHeader,
|
|
201
|
+
scopes,
|
|
202
|
+
jobId
|
|
203
|
+
});
|
|
187
204
|
this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
|
|
188
205
|
return result;
|
|
189
206
|
} catch (err) {
|
|
@@ -434,10 +451,11 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
434
451
|
* (where validators prove the public portion).
|
|
435
452
|
*
|
|
436
453
|
* @param txRequest - An authenticated tx request ready for proving
|
|
454
|
+
* @param scopes - Addresses whose private state and keys are accessible during private execution.
|
|
437
455
|
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
438
456
|
* @throws If contract code not found, or public simulation reverts.
|
|
439
457
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
440
|
-
*/ proveTx(txRequest) {
|
|
458
|
+
*/ proveTx(txRequest, scopes) {
|
|
441
459
|
let privateExecutionResult;
|
|
442
460
|
// We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
|
|
443
461
|
// computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
|
|
@@ -448,7 +466,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
448
466
|
await this.blockStateSynchronizer.sync();
|
|
449
467
|
const syncTime = syncTimer.ms();
|
|
450
468
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
451
|
-
privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest,
|
|
469
|
+
privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
|
|
452
470
|
const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
453
471
|
simulate: false,
|
|
454
472
|
skipFeeEnforcement: false,
|
|
@@ -498,13 +516,10 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
498
516
|
}
|
|
499
517
|
/**
|
|
500
518
|
* Profiles a transaction, reporting gate counts (unless disabled) and returns an execution trace.
|
|
501
|
-
*
|
|
502
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
503
|
-
* @param msgSender - (Optional) The message sender to use for the simulation.
|
|
504
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
519
|
+
* @param txRequest - An authenticated tx request ready for simulation.
|
|
505
520
|
* @returns A trace of the program execution with gate counts.
|
|
506
521
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
507
|
-
*/ profileTx(txRequest, profileMode, skipProofGeneration = true) {
|
|
522
|
+
*/ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes }) {
|
|
508
523
|
// We disable concurrent profiles for consistency with simulateTx.
|
|
509
524
|
return this.#putInJobQueue(async (jobId)=>{
|
|
510
525
|
const totalTimer = new Timer();
|
|
@@ -522,7 +537,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
522
537
|
await this.blockStateSynchronizer.sync();
|
|
523
538
|
const syncTime = syncTimer.ms();
|
|
524
539
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
525
|
-
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest,
|
|
540
|
+
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
|
|
526
541
|
const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
527
542
|
simulate: skipProofGeneration,
|
|
528
543
|
skipFeeEnforcement: false,
|
|
@@ -567,18 +582,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
567
582
|
* In that case, the transaction returned is only potentially ready to be sent to the network for execution.
|
|
568
583
|
*
|
|
569
584
|
*
|
|
570
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
571
|
-
* @param simulatePublic - Whether to simulate the public part of the transaction.
|
|
572
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
573
|
-
* @param skipFeeEnforcement - (Optional) If false, fees are enforced.
|
|
574
|
-
* @param overrides - (Optional) State overrides for the simulation, such as msgSender, contract instances and artifacts.
|
|
575
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
585
|
+
* @param txRequest - An authenticated tx request ready for simulation.
|
|
576
586
|
* @returns A simulated transaction result object that includes public and private return values.
|
|
577
587
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
578
588
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
579
589
|
*
|
|
580
590
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
581
|
-
*/ simulateTx(txRequest, simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, overrides, scopes) {
|
|
591
|
+
*/ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, overrides, scopes }) {
|
|
582
592
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
583
593
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
584
594
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
@@ -613,7 +623,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
613
623
|
let publicInputs;
|
|
614
624
|
let executionSteps = [];
|
|
615
625
|
if (skipKernels) {
|
|
616
|
-
({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel)));
|
|
626
|
+
({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel), this.node));
|
|
617
627
|
} else {
|
|
618
628
|
// Kernel logic, plus proving of all private functions and kernels.
|
|
619
629
|
({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
@@ -678,14 +688,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
678
688
|
});
|
|
679
689
|
}
|
|
680
690
|
/**
|
|
681
|
-
*
|
|
682
|
-
*
|
|
691
|
+
* Simulates the execution of a contract utility function.
|
|
683
692
|
* @param call - The function call containing the function details, arguments, and target contract address.
|
|
684
|
-
|
|
685
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will
|
|
686
|
-
* default to all.
|
|
687
|
-
* @returns The result of the utility function call, structured based on the function ABI.
|
|
688
|
-
*/ simulateUtility(call, authwits, scopes) {
|
|
693
|
+
*/ simulateUtility(call, { authwits, scopes } = {}) {
|
|
689
694
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
690
695
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
691
696
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
@@ -698,7 +703,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
698
703
|
const functionTimer = new Timer();
|
|
699
704
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
700
705
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
701
|
-
await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [],
|
|
706
|
+
await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall, execScopes)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
|
|
702
707
|
const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
|
|
703
708
|
const functionTime = functionTimer.ms();
|
|
704
709
|
const totalTime = totalTimer.ms();
|
|
@@ -748,7 +753,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
748
753
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
749
754
|
anchorBlockNumber = anchorBlockHeader.getBlockNumber();
|
|
750
755
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
751
|
-
await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [],
|
|
756
|
+
await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall, execScopes)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, filter.scopes);
|
|
752
757
|
});
|
|
753
758
|
// anchorBlockNumber is set during the job and fixed to whatever it is after a block sync
|
|
754
759
|
const sanitizedFilter = new PrivateEventFilterValidator(anchorBlockNumber).validate(filter);
|
|
@@ -35,7 +35,6 @@ export declare class NoteStore implements StagedStore {
|
|
|
35
35
|
* @params jobId - the job context to read from.
|
|
36
36
|
* @returns Filtered and deduplicated notes (a note might be present in multiple scopes - we ensure it is only
|
|
37
37
|
* returned once if this is the case)
|
|
38
|
-
* @throws If filtering by an empty scopes array. Scopes have to be set to undefined or to a non-empty array.
|
|
39
38
|
*/
|
|
40
39
|
getNotes(filter: NotesFilter, jobId: string): Promise<NoteDao[]>;
|
|
41
40
|
/**
|
|
@@ -80,4 +79,4 @@ export declare class NoteStore implements StagedStore {
|
|
|
80
79
|
commit(jobId: string): Promise<void>;
|
|
81
80
|
discardStaged(jobId: string): Promise<void>;
|
|
82
81
|
}
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
82
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2Uvbm90ZV9zdG9yZS9ub3RlX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFxQyxNQUFNLGlCQUFpQixDQUFDO0FBQzVGLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxPQUFPLEVBQWMsS0FBSyxXQUFXLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUUzRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQztBQUc1RTs7Ozs7SUFLSTtBQUNKLHFCQUFhLFNBQVUsWUFBVyxXQUFXOztJQUMzQyxRQUFRLENBQUMsU0FBUyxFQUFFLE1BQU0sQ0FBVTtJQStCcEMsWUFBWSxLQUFLLEVBQUUsaUJBQWlCLEVBUW5DO0lBRUQ7Ozs7Ozs7OztPQVNHO0lBQ0ksUUFBUSxDQUFDLEtBQUssRUFBRSxPQUFPLEVBQUUsR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AAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CA6F/D;IAED;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAyChF;IAED;;;;;;;;;;;OAWG;IACU,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMpF;IA6ED;;;;;;;;;OASG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUzC;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1C;CAkCF"}
|
|
@@ -74,10 +74,9 @@ import { StoredNote } from './stored_note.js';
|
|
|
74
74
|
* @params jobId - the job context to read from.
|
|
75
75
|
* @returns Filtered and deduplicated notes (a note might be present in multiple scopes - we ensure it is only
|
|
76
76
|
* returned once if this is the case)
|
|
77
|
-
* @throws If filtering by an empty scopes array. Scopes have to be set to undefined or to a non-empty array.
|
|
78
77
|
*/ getNotes(filter, jobId) {
|
|
79
78
|
if (filter.scopes !== undefined && filter.scopes.length === 0) {
|
|
80
|
-
return Promise.
|
|
79
|
+
return Promise.resolve([]);
|
|
81
80
|
}
|
|
82
81
|
return this.#store.transactionAsync(async ()=>{
|
|
83
82
|
const targetStatus = filter.status ?? NoteStatus.ACTIVE;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.4ad48494d",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"typedocOptions": {
|
|
6
6
|
"entryPoints": [
|
|
@@ -70,19 +70,19 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
74
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
75
|
-
"@aztec/builder": "0.0.1-commit.
|
|
76
|
-
"@aztec/constants": "0.0.1-commit.
|
|
77
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
78
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
79
|
-
"@aztec/key-store": "0.0.1-commit.
|
|
80
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
81
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
82
|
-
"@aztec/noir-types": "0.0.1-commit.
|
|
83
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
84
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
85
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
73
|
+
"@aztec/bb-prover": "0.0.1-commit.4ad48494d",
|
|
74
|
+
"@aztec/bb.js": "0.0.1-commit.4ad48494d",
|
|
75
|
+
"@aztec/builder": "0.0.1-commit.4ad48494d",
|
|
76
|
+
"@aztec/constants": "0.0.1-commit.4ad48494d",
|
|
77
|
+
"@aztec/ethereum": "0.0.1-commit.4ad48494d",
|
|
78
|
+
"@aztec/foundation": "0.0.1-commit.4ad48494d",
|
|
79
|
+
"@aztec/key-store": "0.0.1-commit.4ad48494d",
|
|
80
|
+
"@aztec/kv-store": "0.0.1-commit.4ad48494d",
|
|
81
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.4ad48494d",
|
|
82
|
+
"@aztec/noir-types": "0.0.1-commit.4ad48494d",
|
|
83
|
+
"@aztec/protocol-contracts": "0.0.1-commit.4ad48494d",
|
|
84
|
+
"@aztec/simulator": "0.0.1-commit.4ad48494d",
|
|
85
|
+
"@aztec/stdlib": "0.0.1-commit.4ad48494d",
|
|
86
86
|
"koa": "^2.16.1",
|
|
87
87
|
"koa-router": "^13.1.1",
|
|
88
88
|
"lodash.omit": "^4.5.0",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@aztec/merkle-tree": "0.0.1-commit.
|
|
95
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
94
|
+
"@aztec/merkle-tree": "0.0.1-commit.4ad48494d",
|
|
95
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.4ad48494d",
|
|
96
96
|
"@jest/globals": "^30.0.0",
|
|
97
97
|
"@types/jest": "^30.0.0",
|
|
98
98
|
"@types/lodash.omit": "^4.5.7",
|