@aztec/txe 0.0.1-commit.3fd054f6 → 0.0.1-commit.42ee6df9b
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/oracle/txe_oracle_top_level_context.d.ts +1 -1
- package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -1
- package/dest/oracle/txe_oracle_top_level_context.js +8 -7
- package/dest/rpc_translator.d.ts +21 -21
- package/dest/rpc_translator.d.ts.map +1 -1
- package/dest/rpc_translator.js +47 -36
- package/dest/state_machine/archiver.d.ts +1 -1
- package/dest/state_machine/archiver.d.ts.map +1 -1
- package/dest/state_machine/archiver.js +2 -1
- package/dest/state_machine/dummy_p2p_client.d.ts +3 -2
- package/dest/state_machine/dummy_p2p_client.d.ts.map +1 -1
- package/dest/state_machine/dummy_p2p_client.js +5 -2
- package/dest/state_machine/global_variable_builder.d.ts +3 -3
- package/dest/state_machine/global_variable_builder.d.ts.map +1 -1
- package/dest/state_machine/global_variable_builder.js +1 -1
- package/dest/txe_session.d.ts +1 -1
- package/dest/txe_session.d.ts.map +1 -1
- package/dest/txe_session.js +8 -8
- package/package.json +15 -15
- package/src/oracle/txe_oracle_top_level_context.ts +13 -9
- package/src/rpc_translator.ts +58 -32
- package/src/state_machine/archiver.ts +1 -0
- package/src/state_machine/dummy_p2p_client.ts +6 -2
- package/src/state_machine/global_variable_builder.ts +7 -1
- package/src/txe_session.ts +9 -9
package/src/txe_session.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
3
3
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
4
4
|
import { KeyStore } from '@aztec/key-store';
|
|
5
5
|
import { openTmpStore } from '@aztec/kv-store/lmdb-v2';
|
|
6
|
-
import type { AccessScopes } from '@aztec/pxe/client/lazy';
|
|
7
6
|
import {
|
|
8
7
|
AddressStore,
|
|
9
8
|
AnchorBlockStore,
|
|
9
|
+
CapsuleService,
|
|
10
10
|
CapsuleStore,
|
|
11
11
|
ContractStore,
|
|
12
12
|
ContractSyncService,
|
|
@@ -336,7 +336,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
336
336
|
|
|
337
337
|
await new NoteService(this.noteStore, this.stateMachine.node, anchorBlock!, this.currentJobId).syncNoteNullifiers(
|
|
338
338
|
contractAddress,
|
|
339
|
-
|
|
339
|
+
await this.keyStore.getAccounts(),
|
|
340
340
|
);
|
|
341
341
|
const latestBlock = await this.stateMachine.node.getBlockHeader('latest');
|
|
342
342
|
|
|
@@ -372,11 +372,11 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
372
372
|
senderTaggingStore: this.senderTaggingStore,
|
|
373
373
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
374
374
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
375
|
-
|
|
375
|
+
capsuleService: new CapsuleService(this.capsuleStore, await this.keyStore.getAccounts()),
|
|
376
376
|
privateEventStore: this.privateEventStore,
|
|
377
377
|
contractSyncService: this.stateMachine.contractSyncService,
|
|
378
378
|
jobId: this.currentJobId,
|
|
379
|
-
scopes:
|
|
379
|
+
scopes: await this.keyStore.getAccounts(),
|
|
380
380
|
messageContextService: this.stateMachine.messageContextService,
|
|
381
381
|
});
|
|
382
382
|
|
|
@@ -430,7 +430,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
430
430
|
this.stateMachine.node,
|
|
431
431
|
anchorBlockHeader,
|
|
432
432
|
this.currentJobId,
|
|
433
|
-
).syncNoteNullifiers(contractAddress,
|
|
433
|
+
).syncNoteNullifiers(contractAddress, await this.keyStore.getAccounts());
|
|
434
434
|
|
|
435
435
|
this.oracleHandler = new UtilityExecutionOracle({
|
|
436
436
|
contractAddress,
|
|
@@ -444,12 +444,12 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
444
444
|
aztecNode: this.stateMachine.node,
|
|
445
445
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
446
446
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
447
|
-
|
|
447
|
+
capsuleService: new CapsuleService(this.capsuleStore, await this.keyStore.getAccounts()),
|
|
448
448
|
privateEventStore: this.privateEventStore,
|
|
449
449
|
messageContextService: this.stateMachine.messageContextService,
|
|
450
450
|
contractSyncService: this.contractSyncService,
|
|
451
451
|
jobId: this.currentJobId,
|
|
452
|
-
scopes:
|
|
452
|
+
scopes: await this.keyStore.getAccounts(),
|
|
453
453
|
});
|
|
454
454
|
|
|
455
455
|
this.state = { name: 'UTILITY' };
|
|
@@ -518,7 +518,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
private utilityExecutorForContractSync(anchorBlock: any) {
|
|
521
|
-
return async (call: FunctionCall, scopes:
|
|
521
|
+
return async (call: FunctionCall, scopes: AztecAddress[]) => {
|
|
522
522
|
const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(call.to, call.selector);
|
|
523
523
|
if (entryPointArtifact.functionType !== FunctionType.UTILITY) {
|
|
524
524
|
throw new Error(`Cannot run ${entryPointArtifact.functionType} function as utility`);
|
|
@@ -537,7 +537,7 @@ export class TXESession implements TXESessionStateHandler {
|
|
|
537
537
|
aztecNode: this.stateMachine.node,
|
|
538
538
|
recipientTaggingStore: this.recipientTaggingStore,
|
|
539
539
|
senderAddressBookStore: this.senderAddressBookStore,
|
|
540
|
-
|
|
540
|
+
capsuleService: new CapsuleService(this.capsuleStore, scopes),
|
|
541
541
|
privateEventStore: this.privateEventStore,
|
|
542
542
|
messageContextService: this.stateMachine.messageContextService,
|
|
543
543
|
contractSyncService: this.contractSyncService,
|