@aztec/txe 0.0.1-commit.0b941701 → 0.0.1-commit.1bea0213

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.
@@ -4,7 +4,7 @@ import { BlockNumber } from '@aztec/foundation/branded-types';
4
4
  import { packAsHintedNote } from '@aztec/pxe/simulator';
5
5
  import { EventSelector, FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
6
6
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
7
- import { L2BlockHash } from '@aztec/stdlib/block';
7
+ import { BlockHash } from '@aztec/stdlib/block';
8
8
  import { addressFromSingle, arrayOfArraysToBoundedVecOfArrays, arrayToBoundedVec, bufferToU8Array, fromArray, fromSingle, fromUintArray, fromUintBoundedVec, toArray, toForeignCallResult, toSingle } from './util/encoding.js';
9
9
  const MAX_EVENT_LEN = 12; // This is MAX_MESSAGE_CONTENT_LEN - PRIVATE_EVENT_RESERVED_FIELDS
10
10
  const MAX_PRIVATE_EVENTS_PER_TXE_QUERY = 5;
@@ -217,7 +217,7 @@ export class RPCTranslator {
217
217
  return toForeignCallResult([]);
218
218
  }
219
219
  async utilityStorageRead(foreignBlockHash, foreignContractAddress, foreignStartStorageSlot, foreignNumberOfElements) {
220
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
220
+ const blockHash = BlockHash.fromString(foreignBlockHash);
221
221
  const contractAddress = addressFromSingle(foreignContractAddress);
222
222
  const startStorageSlot = fromSingle(foreignStartStorageSlot);
223
223
  const numberOfElements = fromSingle(foreignNumberOfElements).toNumber();
@@ -227,7 +227,7 @@ export class RPCTranslator {
227
227
  ]);
228
228
  }
229
229
  async utilityGetPublicDataWitness(foreignBlockHash, foreignLeafSlot) {
230
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
230
+ const blockHash = BlockHash.fromString(foreignBlockHash);
231
231
  const leafSlot = fromSingle(foreignLeafSlot);
232
232
  const witness = await this.handlerAsUtility().utilityGetPublicDataWitness(blockHash, leafSlot);
233
233
  if (!witness) {
@@ -337,7 +337,7 @@ export class RPCTranslator {
337
337
  throw new Error('Contract calls are forbidden inside a `TestEnvironment::private_context`, use `private_call` instead');
338
338
  }
339
339
  async utilityGetNullifierMembershipWitness(foreignBlockHash, foreignNullifier) {
340
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
340
+ const blockHash = BlockHash.fromString(foreignBlockHash);
341
341
  const nullifier = fromSingle(foreignNullifier);
342
342
  const witness = await this.handlerAsUtility().utilityGetNullifierMembershipWitness(blockHash, nullifier);
343
343
  if (!witness) {
@@ -384,7 +384,7 @@ export class RPCTranslator {
384
384
  return toForeignCallResult(header.toFields().map(toSingle));
385
385
  }
386
386
  async utilityGetNoteHashMembershipWitness(foreignBlockHash, foreignLeafValue) {
387
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
387
+ const blockHash = BlockHash.fromString(foreignBlockHash);
388
388
  const leafValue = fromSingle(foreignLeafValue);
389
389
  const witness = await this.handlerAsUtility().utilityGetNoteHashMembershipWitness(blockHash, leafValue);
390
390
  if (!witness) {
@@ -393,7 +393,7 @@ export class RPCTranslator {
393
393
  return toForeignCallResult(witness.toNoirRepresentation());
394
394
  }
395
395
  async utilityGetArchiveMembershipWitness(foreignBlockHash, foreignLeafValue) {
396
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
396
+ const blockHash = BlockHash.fromString(foreignBlockHash);
397
397
  const leafValue = fromSingle(foreignLeafValue);
398
398
  const witness = await this.handlerAsUtility().utilityGetArchiveMembershipWitness(blockHash, leafValue);
399
399
  if (!witness) {
@@ -402,7 +402,7 @@ export class RPCTranslator {
402
402
  return toForeignCallResult(witness.toNoirRepresentation());
403
403
  }
404
404
  async utilityGetLowNullifierMembershipWitness(foreignBlockHash, foreignNullifier) {
405
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
405
+ const blockHash = BlockHash.fromString(foreignBlockHash);
406
406
  const nullifier = fromSingle(foreignNullifier);
407
407
  const witness = await this.handlerAsUtility().utilityGetLowNullifierMembershipWitness(blockHash, nullifier);
408
408
  if (!witness) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/txe",
3
- "version": "0.0.1-commit.0b941701",
3
+ "version": "0.0.1-commit.1bea0213",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "bin": "./dest/bin/index.js",
@@ -61,20 +61,20 @@
61
61
  ]
62
62
  },
63
63
  "dependencies": {
64
- "@aztec/accounts": "0.0.1-commit.0b941701",
65
- "@aztec/archiver": "0.0.1-commit.0b941701",
66
- "@aztec/aztec-node": "0.0.1-commit.0b941701",
67
- "@aztec/aztec.js": "0.0.1-commit.0b941701",
68
- "@aztec/bb-prover": "0.0.1-commit.0b941701",
69
- "@aztec/constants": "0.0.1-commit.0b941701",
70
- "@aztec/foundation": "0.0.1-commit.0b941701",
71
- "@aztec/key-store": "0.0.1-commit.0b941701",
72
- "@aztec/kv-store": "0.0.1-commit.0b941701",
73
- "@aztec/protocol-contracts": "0.0.1-commit.0b941701",
74
- "@aztec/pxe": "0.0.1-commit.0b941701",
75
- "@aztec/simulator": "0.0.1-commit.0b941701",
76
- "@aztec/stdlib": "0.0.1-commit.0b941701",
77
- "@aztec/world-state": "0.0.1-commit.0b941701",
64
+ "@aztec/accounts": "0.0.1-commit.1bea0213",
65
+ "@aztec/archiver": "0.0.1-commit.1bea0213",
66
+ "@aztec/aztec-node": "0.0.1-commit.1bea0213",
67
+ "@aztec/aztec.js": "0.0.1-commit.1bea0213",
68
+ "@aztec/bb-prover": "0.0.1-commit.1bea0213",
69
+ "@aztec/constants": "0.0.1-commit.1bea0213",
70
+ "@aztec/foundation": "0.0.1-commit.1bea0213",
71
+ "@aztec/key-store": "0.0.1-commit.1bea0213",
72
+ "@aztec/kv-store": "0.0.1-commit.1bea0213",
73
+ "@aztec/protocol-contracts": "0.0.1-commit.1bea0213",
74
+ "@aztec/pxe": "0.0.1-commit.1bea0213",
75
+ "@aztec/simulator": "0.0.1-commit.1bea0213",
76
+ "@aztec/stdlib": "0.0.1-commit.1bea0213",
77
+ "@aztec/world-state": "0.0.1-commit.1bea0213",
78
78
  "zod": "^3.23.8"
79
79
  },
80
80
  "devDependencies": {
@@ -10,7 +10,7 @@ import {
10
10
  } from '@aztec/pxe/simulator';
11
11
  import { type ContractArtifact, EventSelector, FunctionSelector, NoteSelector } from '@aztec/stdlib/abi';
12
12
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
13
- import { L2BlockHash } from '@aztec/stdlib/block';
13
+ import { BlockHash } from '@aztec/stdlib/block';
14
14
 
15
15
  import type { IAvmExecutionOracle, ITxeExecutionOracle } from './oracle/interfaces.js';
16
16
  import type { TXESessionStateHandler } from './txe_session.js';
@@ -351,7 +351,7 @@ export class RPCTranslator {
351
351
  foreignStartStorageSlot: ForeignCallSingle,
352
352
  foreignNumberOfElements: ForeignCallSingle,
353
353
  ) {
354
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
354
+ const blockHash = BlockHash.fromString(foreignBlockHash);
355
355
  const contractAddress = addressFromSingle(foreignContractAddress);
356
356
  const startStorageSlot = fromSingle(foreignStartStorageSlot);
357
357
  const numberOfElements = fromSingle(foreignNumberOfElements).toNumber();
@@ -367,7 +367,7 @@ export class RPCTranslator {
367
367
  }
368
368
 
369
369
  async utilityGetPublicDataWitness(foreignBlockHash: ForeignCallSingle, foreignLeafSlot: ForeignCallSingle) {
370
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
370
+ const blockHash = BlockHash.fromString(foreignBlockHash);
371
371
  const leafSlot = fromSingle(foreignLeafSlot);
372
372
 
373
373
  const witness = await this.handlerAsUtility().utilityGetPublicDataWitness(blockHash, leafSlot);
@@ -574,7 +574,7 @@ export class RPCTranslator {
574
574
  }
575
575
 
576
576
  async utilityGetNullifierMembershipWitness(foreignBlockHash: ForeignCallSingle, foreignNullifier: ForeignCallSingle) {
577
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
577
+ const blockHash = BlockHash.fromString(foreignBlockHash);
578
578
  const nullifier = fromSingle(foreignNullifier);
579
579
 
580
580
  const witness = await this.handlerAsUtility().utilityGetNullifierMembershipWitness(blockHash, nullifier);
@@ -642,7 +642,7 @@ export class RPCTranslator {
642
642
  }
643
643
 
644
644
  async utilityGetNoteHashMembershipWitness(foreignBlockHash: ForeignCallSingle, foreignLeafValue: ForeignCallSingle) {
645
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
645
+ const blockHash = BlockHash.fromString(foreignBlockHash);
646
646
  const leafValue = fromSingle(foreignLeafValue);
647
647
 
648
648
  const witness = await this.handlerAsUtility().utilityGetNoteHashMembershipWitness(blockHash, leafValue);
@@ -654,7 +654,7 @@ export class RPCTranslator {
654
654
  }
655
655
 
656
656
  async utilityGetArchiveMembershipWitness(foreignBlockHash: ForeignCallSingle, foreignLeafValue: ForeignCallSingle) {
657
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
657
+ const blockHash = BlockHash.fromString(foreignBlockHash);
658
658
  const leafValue = fromSingle(foreignLeafValue);
659
659
 
660
660
  const witness = await this.handlerAsUtility().utilityGetArchiveMembershipWitness(blockHash, leafValue);
@@ -669,7 +669,7 @@ export class RPCTranslator {
669
669
  foreignBlockHash: ForeignCallSingle,
670
670
  foreignNullifier: ForeignCallSingle,
671
671
  ) {
672
- const blockHash = L2BlockHash.fromString(foreignBlockHash);
672
+ const blockHash = BlockHash.fromString(foreignBlockHash);
673
673
  const nullifier = fromSingle(foreignNullifier);
674
674
 
675
675
  const witness = await this.handlerAsUtility().utilityGetLowNullifierMembershipWitness(blockHash, nullifier);