@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.
@@ -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
- 'ALL_SCOPES',
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
- capsuleStore: this.capsuleStore,
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: 'ALL_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, 'ALL_SCOPES');
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
- capsuleStore: this.capsuleStore,
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: 'ALL_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: AccessScopes) => {
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
- capsuleStore: this.capsuleStore,
540
+ capsuleService: new CapsuleService(this.capsuleStore, scopes),
541
541
  privateEventStore: this.privateEventStore,
542
542
  messageContextService: this.stateMachine.messageContextService,
543
543
  contractSyncService: this.contractSyncService,