@aztec/txe 0.0.1-fake-ceab37513c → 0.0.6-commit.a2d1860fe9

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.
Files changed (98) hide show
  1. package/dest/bin/index.d.ts +1 -1
  2. package/dest/bin/index.js +1 -1
  3. package/dest/constants.d.ts +3 -0
  4. package/dest/constants.d.ts.map +1 -0
  5. package/dest/constants.js +2 -0
  6. package/dest/index.d.ts +1 -1
  7. package/dest/index.d.ts.map +1 -1
  8. package/dest/index.js +90 -54
  9. package/dest/oracle/interfaces.d.ts +57 -0
  10. package/dest/oracle/interfaces.d.ts.map +1 -0
  11. package/dest/oracle/interfaces.js +3 -0
  12. package/dest/oracle/txe_oracle_public_context.d.ts +14 -14
  13. package/dest/oracle/txe_oracle_public_context.d.ts.map +1 -1
  14. package/dest/oracle/txe_oracle_public_context.js +36 -40
  15. package/dest/oracle/txe_oracle_top_level_context.d.ts +65 -0
  16. package/dest/oracle/txe_oracle_top_level_context.d.ts.map +1 -0
  17. package/dest/oracle/txe_oracle_top_level_context.js +530 -0
  18. package/dest/rpc_translator.d.ts +252 -0
  19. package/dest/rpc_translator.d.ts.map +1 -0
  20. package/dest/{txe_service/txe_service.js → rpc_translator.js} +258 -156
  21. package/dest/state_machine/archiver.d.ts +21 -51
  22. package/dest/state_machine/archiver.d.ts.map +1 -1
  23. package/dest/state_machine/archiver.js +63 -94
  24. package/dest/state_machine/dummy_p2p_client.d.ts +20 -13
  25. package/dest/state_machine/dummy_p2p_client.d.ts.map +1 -1
  26. package/dest/state_machine/dummy_p2p_client.js +41 -21
  27. package/dest/state_machine/global_variable_builder.d.ts +6 -17
  28. package/dest/state_machine/global_variable_builder.d.ts.map +1 -1
  29. package/dest/state_machine/global_variable_builder.js +16 -23
  30. package/dest/state_machine/index.d.ts +7 -7
  31. package/dest/state_machine/index.d.ts.map +1 -1
  32. package/dest/state_machine/index.js +42 -24
  33. package/dest/state_machine/mock_epoch_cache.d.ts +14 -10
  34. package/dest/state_machine/mock_epoch_cache.d.ts.map +1 -1
  35. package/dest/state_machine/mock_epoch_cache.js +21 -13
  36. package/dest/state_machine/synchronizer.d.ts +3 -2
  37. package/dest/state_machine/synchronizer.d.ts.map +1 -1
  38. package/dest/state_machine/synchronizer.js +5 -4
  39. package/dest/txe_session.d.ts +44 -48
  40. package/dest/txe_session.d.ts.map +1 -1
  41. package/dest/txe_session.js +314 -98
  42. package/dest/util/encoding.d.ts +616 -17
  43. package/dest/util/encoding.d.ts.map +1 -1
  44. package/dest/util/encoding.js +1 -1
  45. package/dest/util/expected_failure_error.d.ts +1 -1
  46. package/dest/util/expected_failure_error.d.ts.map +1 -1
  47. package/dest/util/txe_account_store.d.ts +10 -0
  48. package/dest/util/txe_account_store.d.ts.map +1 -0
  49. package/dest/util/{txe_account_data_provider.js → txe_account_store.js} +1 -1
  50. package/dest/util/txe_public_contract_data_source.d.ts +9 -8
  51. package/dest/util/txe_public_contract_data_source.d.ts.map +1 -1
  52. package/dest/util/txe_public_contract_data_source.js +15 -30
  53. package/dest/utils/block_creation.d.ts +28 -0
  54. package/dest/utils/block_creation.d.ts.map +1 -0
  55. package/dest/utils/block_creation.js +58 -0
  56. package/dest/utils/tx_effect_creation.d.ts +5 -0
  57. package/dest/utils/tx_effect_creation.d.ts.map +1 -0
  58. package/dest/utils/tx_effect_creation.js +13 -0
  59. package/package.json +18 -17
  60. package/src/bin/index.ts +1 -1
  61. package/src/constants.ts +3 -0
  62. package/src/index.ts +102 -68
  63. package/src/oracle/interfaces.ts +86 -0
  64. package/src/oracle/txe_oracle_public_context.ts +40 -80
  65. package/src/oracle/txe_oracle_top_level_context.ts +756 -0
  66. package/src/{txe_service/txe_service.ts → rpc_translator.ts} +323 -161
  67. package/src/state_machine/archiver.ts +63 -117
  68. package/src/state_machine/dummy_p2p_client.ts +58 -28
  69. package/src/state_machine/global_variable_builder.ts +25 -42
  70. package/src/state_machine/index.ts +65 -24
  71. package/src/state_machine/mock_epoch_cache.ts +25 -20
  72. package/src/state_machine/synchronizer.ts +6 -5
  73. package/src/txe_session.ts +441 -121
  74. package/src/util/encoding.ts +1 -1
  75. package/src/util/{txe_account_data_provider.ts → txe_account_store.ts} +1 -1
  76. package/src/util/txe_public_contract_data_source.ts +23 -46
  77. package/src/utils/block_creation.ts +97 -0
  78. package/src/utils/tx_effect_creation.ts +30 -0
  79. package/dest/oracle/txe_oracle.d.ts +0 -124
  80. package/dest/oracle/txe_oracle.d.ts.map +0 -1
  81. package/dest/oracle/txe_oracle.js +0 -770
  82. package/dest/oracle/txe_typed_oracle.d.ts +0 -42
  83. package/dest/oracle/txe_typed_oracle.d.ts.map +0 -1
  84. package/dest/oracle/txe_typed_oracle.js +0 -83
  85. package/dest/txe_constants.d.ts +0 -2
  86. package/dest/txe_constants.d.ts.map +0 -1
  87. package/dest/txe_constants.js +0 -7
  88. package/dest/txe_service/txe_service.d.ts +0 -231
  89. package/dest/txe_service/txe_service.d.ts.map +0 -1
  90. package/dest/util/txe_account_data_provider.d.ts +0 -10
  91. package/dest/util/txe_account_data_provider.d.ts.map +0 -1
  92. package/dest/util/txe_contract_data_provider.d.ts +0 -11
  93. package/dest/util/txe_contract_data_provider.d.ts.map +0 -1
  94. package/dest/util/txe_contract_data_provider.js +0 -22
  95. package/src/oracle/txe_oracle.ts +0 -1287
  96. package/src/oracle/txe_typed_oracle.ts +0 -142
  97. package/src/txe_constants.ts +0 -9
  98. package/src/util/txe_contract_data_provider.ts +0 -35
@@ -2,7 +2,7 @@ import type { AztecAsyncKVStore, AztecAsyncMap } from '@aztec/kv-store';
2
2
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
3
  import { CompleteAddress } from '@aztec/stdlib/contract';
4
4
 
5
- export class TXEAccountDataProvider {
5
+ export class TXEAccountStore {
6
6
  #accounts: AztecAsyncMap<string, Buffer>;
7
7
 
8
8
  constructor(store: AztecAsyncKVStore) {
@@ -1,66 +1,43 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { type ContractArtifact, FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
1
+ import { BlockNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import type { ContractStore } from '@aztec/pxe/server';
4
+ import { type ContractArtifact, FunctionSelector } from '@aztec/stdlib/abi';
3
5
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import {
5
- type ContractClassPublic,
6
- type ContractDataSource,
7
- type ContractInstanceWithAddress,
8
- computePrivateFunctionsRoot,
9
- computePublicBytecodeCommitment,
10
- getContractClassPrivateFunctionFromArtifact,
11
- } from '@aztec/stdlib/contract';
12
-
13
- import type { TXE } from '../oracle/txe_oracle.js';
6
+ import type { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress } from '@aztec/stdlib/contract';
14
7
 
15
8
  export class TXEPublicContractDataSource implements ContractDataSource {
16
- #privateFunctionsRoot: Map<string, Buffer> = new Map();
17
- constructor(private txeOracle: TXE) {}
9
+ constructor(
10
+ private blockNumber: BlockNumber,
11
+ private contractStore: ContractStore,
12
+ ) {}
18
13
 
19
- getBlockNumber(): Promise<number> {
20
- return this.txeOracle.utilityGetBlockNumber();
14
+ getBlockNumber(): Promise<BlockNumber> {
15
+ return Promise.resolve(this.blockNumber);
21
16
  }
22
17
 
23
18
  async getContractClass(id: Fr): Promise<ContractClassPublic | undefined> {
24
- const contractClass = await this.txeOracle.getContractDataProvider().getContractClass(id);
19
+ const contractClass = await this.contractStore.getContractClassWithPreimage(id);
25
20
  if (!contractClass) {
26
21
  return;
27
22
  }
28
- const artifact = await this.txeOracle.getContractDataProvider().getContractArtifact(id);
29
- if (!artifact) {
30
- return;
31
- }
32
-
33
- let privateFunctionsRoot;
34
- if (!this.#privateFunctionsRoot.has(id.toString())) {
35
- const privateFunctions = await Promise.all(
36
- artifact.functions
37
- .filter(fn => fn.functionType === FunctionType.PRIVATE)
38
- .map(fn => getContractClassPrivateFunctionFromArtifact(fn)),
39
- );
40
- privateFunctionsRoot = await computePrivateFunctionsRoot(privateFunctions);
41
- this.#privateFunctionsRoot.set(id.toString(), privateFunctionsRoot.toBuffer());
42
- } else {
43
- privateFunctionsRoot = Fr.fromBuffer(this.#privateFunctionsRoot.get(id.toString())!);
44
- }
45
-
46
23
  return {
47
- id,
48
- artifactHash: contractClass!.artifactHash,
49
- packedBytecode: contractClass!.packedBytecode,
50
- privateFunctionsRoot,
51
- version: contractClass!.version,
24
+ id: contractClass.id,
25
+ artifactHash: contractClass.artifactHash,
26
+ packedBytecode: contractClass.packedBytecode,
27
+ privateFunctionsRoot: contractClass.privateFunctionsRoot,
28
+ version: contractClass.version,
52
29
  privateFunctions: [],
53
30
  utilityFunctions: [],
54
31
  };
55
32
  }
56
33
 
57
34
  async getBytecodeCommitment(id: Fr): Promise<Fr | undefined> {
58
- const contractClass = await this.txeOracle.getContractDataProvider().getContractClass(id);
59
- return contractClass && computePublicBytecodeCommitment(contractClass.packedBytecode);
35
+ const contractClass = await this.contractStore.getContractClassWithPreimage(id);
36
+ return contractClass?.publicBytecodeCommitment;
60
37
  }
61
38
 
62
39
  async getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined> {
63
- const instance = await this.txeOracle.getContractDataProvider().getContractInstance(address);
40
+ const instance = await this.contractStore.getContractInstance(address);
64
41
  return instance && { ...instance, address };
65
42
  }
66
43
 
@@ -69,12 +46,12 @@ export class TXEPublicContractDataSource implements ContractDataSource {
69
46
  }
70
47
 
71
48
  async getContractArtifact(address: AztecAddress): Promise<ContractArtifact | undefined> {
72
- const instance = await this.txeOracle.getContractDataProvider().getContractInstance(address);
73
- return instance && this.txeOracle.getContractDataProvider().getContractArtifact(instance.currentContractClassId);
49
+ const instance = await this.contractStore.getContractInstance(address);
50
+ return instance && this.contractStore.getContractArtifact(instance.currentContractClassId);
74
51
  }
75
52
 
76
53
  async getDebugFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined> {
77
- return await this.txeOracle.getContractDataProvider().getDebugFunctionName(address, selector);
54
+ return await this.contractStore.getDebugFunctionName(address, selector);
78
55
  }
79
56
 
80
57
  registerContractFunctionSignatures(_signatures: []): Promise<void> {
@@ -0,0 +1,97 @@
1
+ import {
2
+ MAX_NOTE_HASHES_PER_TX,
3
+ MAX_NULLIFIERS_PER_TX,
4
+ NULLIFIER_SUBTREE_HEIGHT,
5
+ NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP,
6
+ } from '@aztec/constants';
7
+ import { BlockNumber, CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
8
+ import { padArrayEnd } from '@aztec/foundation/collection';
9
+ import { Fr } from '@aztec/foundation/curves/bn254';
10
+ import { Body, L2Block } from '@aztec/stdlib/block';
11
+ import { AppendOnlyTreeSnapshot, MerkleTreeId, type MerkleTreeWriteOperations } from '@aztec/stdlib/trees';
12
+ import { BlockHeader, GlobalVariables, TxEffect } from '@aztec/stdlib/tx';
13
+
14
+ /**
15
+ * Returns a transaction request hash that is valid for transactions that are the only ones in a block.
16
+ * @param blockNumber The number for the block in which there is a single transaction.
17
+ * @returns The transaction request hash.
18
+ */
19
+ export function getSingleTxBlockRequestHash(blockNumber: BlockNumber): Fr {
20
+ return new Fr(blockNumber + 9999); // Why does this need to be a high number? Why do small numbered nullifiers already exist?
21
+ }
22
+
23
+ export async function insertTxEffectIntoWorldTrees(
24
+ txEffect: TxEffect,
25
+ worldTrees: MerkleTreeWriteOperations,
26
+ ): Promise<void> {
27
+ await worldTrees.appendLeaves(
28
+ MerkleTreeId.NOTE_HASH_TREE,
29
+ padArrayEnd(txEffect.noteHashes, Fr.ZERO, MAX_NOTE_HASHES_PER_TX),
30
+ );
31
+
32
+ await worldTrees.batchInsert(
33
+ MerkleTreeId.NULLIFIER_TREE,
34
+ padArrayEnd(txEffect.nullifiers, Fr.ZERO, MAX_NULLIFIERS_PER_TX).map(nullifier => nullifier.toBuffer()),
35
+ NULLIFIER_SUBTREE_HEIGHT,
36
+ );
37
+
38
+ await worldTrees.appendLeaves(
39
+ MerkleTreeId.L1_TO_L2_MESSAGE_TREE,
40
+ padArrayEnd<Fr, number>(txEffect.l2ToL1Msgs, Fr.ZERO, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP),
41
+ );
42
+
43
+ // We do not need to add public data writes because we apply them as we go.
44
+ }
45
+
46
+ export async function makeTXEBlockHeader(
47
+ worldTrees: MerkleTreeWriteOperations,
48
+ globalVariables: GlobalVariables,
49
+ ): Promise<BlockHeader> {
50
+ const stateReference = await worldTrees.getStateReference();
51
+ const archiveInfo = await worldTrees.getTreeInfo(MerkleTreeId.ARCHIVE);
52
+
53
+ return BlockHeader.from({
54
+ lastArchive: new AppendOnlyTreeSnapshot(new Fr(archiveInfo.root), Number(archiveInfo.size)),
55
+ spongeBlobHash: Fr.ZERO,
56
+ state: stateReference,
57
+ globalVariables,
58
+ totalFees: Fr.ZERO,
59
+ totalManaUsed: Fr.ZERO,
60
+ });
61
+ }
62
+
63
+ /**
64
+ * Creates an L2Block with proper archive chaining.
65
+ * This function:
66
+ * 1. Gets the current archive state as lastArchive for the header
67
+ * 2. Creates the block header
68
+ * 3. Updates the archive tree with the header hash
69
+ * 4. Gets the new archive state for the block's archive
70
+ *
71
+ * @param worldTrees - The world trees to read/write from
72
+ * @param globalVariables - Global variables for the block
73
+ * @param txEffects - Transaction effects to include in the block
74
+ * @returns The created L2Block with proper archive chaining
75
+ */
76
+ export async function makeTXEBlock(
77
+ worldTrees: MerkleTreeWriteOperations,
78
+ globalVariables: GlobalVariables,
79
+ txEffects: TxEffect[],
80
+ ): Promise<L2Block> {
81
+ const header = await makeTXEBlockHeader(worldTrees, globalVariables);
82
+
83
+ // Update the archive tree with this block's header hash
84
+ await worldTrees.updateArchive(header);
85
+
86
+ // Get the new archive state after updating
87
+ const newArchiveInfo = await worldTrees.getTreeInfo(MerkleTreeId.ARCHIVE);
88
+ const newArchive = new AppendOnlyTreeSnapshot(new Fr(newArchiveInfo.root), Number(newArchiveInfo.size));
89
+
90
+ // L2Block requires checkpointNumber and indexWithinCheckpoint.
91
+ // TXE uses 1-block-per-checkpoint for testing simplicity, so we can use block number as checkpoint number.
92
+ // This uses the deprecated fromBlockNumber method intentionally for the TXE testing environment.
93
+ const checkpointNumber = CheckpointNumber.fromBlockNumber(globalVariables.blockNumber);
94
+ const indexWithinCheckpoint = IndexWithinCheckpoint(0);
95
+
96
+ return new L2Block(newArchive, header, new Body(txEffects), checkpointNumber, indexWithinCheckpoint);
97
+ }
@@ -0,0 +1,30 @@
1
+ import { BlockNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import type { ExecutionNoteCache } from '@aztec/pxe/simulator';
4
+ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash } from '@aztec/stdlib/hash';
5
+ import { TxEffect, TxHash } from '@aztec/stdlib/tx';
6
+
7
+ export async function makeTxEffect(noteCache: ExecutionNoteCache, txBlockNumber: BlockNumber): Promise<TxEffect> {
8
+ const txEffect = TxEffect.empty();
9
+
10
+ noteCache.finish();
11
+
12
+ const nonceGenerator = noteCache.getNonceGenerator();
13
+ txEffect.noteHashes = await Promise.all(
14
+ noteCache
15
+ .getAllNotes()
16
+ .map(async (pendingNote, i) =>
17
+ computeUniqueNoteHash(
18
+ await computeNoteHashNonce(nonceGenerator, i),
19
+ await siloNoteHash(pendingNote.note.contractAddress, pendingNote.noteHashForConsumption),
20
+ ),
21
+ ),
22
+ );
23
+
24
+ // Nullifiers are already siloed
25
+ txEffect.nullifiers = noteCache.getAllNullifiers();
26
+
27
+ txEffect.txHash = new TxHash(new Fr(txBlockNumber));
28
+
29
+ return txEffect;
30
+ }
@@ -1,124 +0,0 @@
1
- import { type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
- import { Fr, Point } from '@aztec/foundation/fields';
3
- import { KeyStore } from '@aztec/key-store';
4
- import { AddressDataProvider, CapsuleDataProvider, NoteDataProvider, PrivateEventDataProvider, TaggingDataProvider } from '@aztec/pxe/server';
5
- import { ExecutionNoteCache, MessageLoadOracleInputs, type NoteData } from '@aztec/pxe/simulator';
6
- import { type ContractArtifact, type FunctionAbi, FunctionSelector, type NoteSelector } from '@aztec/stdlib/abi';
7
- import { AztecAddress } from '@aztec/stdlib/aztec-address';
8
- import { type ContractInstance, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
9
- import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
10
- import { type KeyValidationRequest, PrivateContextInputs } from '@aztec/stdlib/kernel';
11
- import { ContractClassLog, IndexedTaggingSecret } from '@aztec/stdlib/logs';
12
- import type { NoteStatus } from '@aztec/stdlib/note';
13
- import { MerkleTreeId, NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
14
- import { BlockHeader, TxHash } from '@aztec/stdlib/tx';
15
- import type { UInt64 } from '@aztec/stdlib/types';
16
- import { TXEStateMachine } from '../state_machine/index.js';
17
- import { TXEAccountDataProvider } from '../util/txe_account_data_provider.js';
18
- import { TXEContractDataProvider } from '../util/txe_contract_data_provider.js';
19
- import { TXETypedOracle } from './txe_typed_oracle.js';
20
- export declare class TXE extends TXETypedOracle {
21
- private keyStore;
22
- private contractDataProvider;
23
- private noteDataProvider;
24
- private capsuleDataProvider;
25
- private taggingDataProvider;
26
- private addressDataProvider;
27
- private privateEventDataProvider;
28
- private accountDataProvider;
29
- private contractAddress;
30
- baseFork: MerkleTreeWriteOperations;
31
- private stateMachine;
32
- private logger;
33
- private blockNumber;
34
- private timestamp;
35
- private sideEffectCounter;
36
- private msgSender;
37
- private functionSelector;
38
- private pxeOracleInterface;
39
- private privateLogs;
40
- private committedBlocks;
41
- private ROLLUP_VERSION;
42
- private CHAIN_ID;
43
- private node;
44
- private simulator;
45
- noteCache: ExecutionNoteCache;
46
- private authwits;
47
- private senderForTags?;
48
- private executionCache;
49
- constructor(keyStore: KeyStore, contractDataProvider: TXEContractDataProvider, noteDataProvider: NoteDataProvider, capsuleDataProvider: CapsuleDataProvider, taggingDataProvider: TaggingDataProvider, addressDataProvider: AddressDataProvider, privateEventDataProvider: PrivateEventDataProvider, accountDataProvider: TXEAccountDataProvider, contractAddress: AztecAddress, baseFork: MerkleTreeWriteOperations, stateMachine: TXEStateMachine);
50
- utilityGetChainId(): Promise<Fr>;
51
- utilityGetVersion(): Promise<Fr>;
52
- getMsgSender(): AztecAddress;
53
- txeSetContractAddress(contractAddress: AztecAddress): void;
54
- setBlockNumber(blockNumber: number): void;
55
- txeAdvanceBlocksBy(blocks: number): Promise<void>;
56
- txeAdvanceTimestampBy(duration: UInt64): void;
57
- txeDeploy(artifact: ContractArtifact, instance: ContractInstanceWithAddress, secret: Fr): Promise<void>;
58
- txeAddAccount(artifact: ContractArtifact, instance: ContractInstanceWithAddress, secret: Fr): Promise<import("@aztec/aztec.js").CompleteAddress>;
59
- txeCreateAccount(secret: Fr): Promise<import("@aztec/aztec.js").CompleteAddress>;
60
- getContractDataProvider(): TXEContractDataProvider;
61
- getKeyStore(): KeyStore;
62
- getAccountDataProvider(): TXEAccountDataProvider;
63
- getAddressDataProvider(): AddressDataProvider;
64
- addContractInstance(contractInstance: ContractInstanceWithAddress): Promise<void>;
65
- addContractArtifact(contractClassId: Fr, artifact: ContractArtifact): Promise<void>;
66
- txeGetPrivateContextInputs(blockNumber?: number, sideEffectsCounter?: number, isStaticCall?: boolean): Promise<PrivateContextInputs>;
67
- txeAddAuthWitness(address: AztecAddress, messageHash: Fr): Promise<void>;
68
- checkNullifiersNotInTree(contractAddress: AztecAddress, nullifiers: Fr[]): Promise<void>;
69
- utilityAssertCompatibleOracleVersion(version: number): void;
70
- utilityGetBlockNumber(): Promise<number>;
71
- utilityGetTimestamp(): Promise<bigint>;
72
- txeGetLastBlockTimestamp(): Promise<bigint>;
73
- utilityGetContractAddress(): Promise<AztecAddress>;
74
- utilityGetRandomField(): Fr;
75
- privateStoreInExecutionCache(values: Fr[], hash: Fr): void;
76
- privateLoadFromExecutionCache(hash: Fr): Promise<Fr[]>;
77
- utilityGetKeyValidationRequest(pkMHash: Fr): Promise<KeyValidationRequest>;
78
- utilityGetContractInstance(address: AztecAddress): Promise<ContractInstance>;
79
- utilityGetMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[] | undefined>;
80
- utilityGetNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
81
- utilityGetPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
82
- utilityGetLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
83
- utilityGetBlockHeader(blockNumber: number): Promise<BlockHeader | undefined>;
84
- utilityGetCompleteAddress(account: AztecAddress): Promise<import("@aztec/aztec.js").CompleteAddress>;
85
- utilityGetAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
86
- utilityGetNotes(storageSlot: Fr, numSelects: number, selectByIndexes: number[], selectByOffsets: number[], selectByLengths: number[], selectValues: Fr[], selectComparators: number[], sortByIndexes: number[], sortByOffsets: number[], sortByLengths: number[], sortOrder: number[], limit: number, offset: number, status: NoteStatus): Promise<NoteData[]>;
87
- privateNotifyCreatedNote(storageSlot: Fr, _noteTypeId: NoteSelector, noteItems: Fr[], noteHash: Fr, counter: number): void;
88
- privateNotifyNullifiedNote(innerNullifier: Fr, noteHash: Fr, counter: number): Promise<void>;
89
- privateNotifyCreatedNullifier(innerNullifier: Fr): Promise<void>;
90
- utilityCheckNullifierExists(innerNullifier: Fr): Promise<boolean>;
91
- getL1ToL2MembershipWitness(_contractAddress: AztecAddress, _messageHash: Fr, _secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
92
- utilityStorageRead(contractAddress: AztecAddress, startStorageSlot: Fr, blockNumber: number, numberOfElements: number): Promise<Fr[]>;
93
- commitState(): Promise<void>;
94
- getTxRequestHash(): Fr;
95
- notifyCreatedContractClassLog(_log: ContractClassLog, _counter: number): Fr;
96
- simulateUtilityFunction(targetContractAddress: AztecAddress, functionSelector: FunctionSelector, argsHash: Fr): Promise<Fr>;
97
- getInitialWitness(abi: FunctionAbi, argsHash: Fr, sideEffectCounter: number, isStaticCall: boolean): Promise<Map<number, string>>;
98
- getDebugFunctionName(address: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
99
- utilityDebugLog(message: string, fields: Fr[]): void;
100
- privateIncrementAppTaggingSecretIndexAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<void>;
101
- utilityGetIndexedTaggingSecretAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<IndexedTaggingSecret>;
102
- utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
103
- utilityValidateEnqueuedNotesAndEvents(contractAddress: AztecAddress, noteValidationRequestsArrayBaseSlot: Fr, eventValidationRequestsArrayBaseSlot: Fr): Promise<void>;
104
- utilityBulkRetrieveLogs(contractAddress: AztecAddress, logRetrievalRequestsArrayBaseSlot: Fr, logRetrievalResponsesArrayBaseSlot: Fr): Promise<void>;
105
- utilityStoreCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
106
- utilityLoadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
107
- utilityDeleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
108
- utilityCopyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
109
- utilityAes128Decrypt(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer>;
110
- utilityGetSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
111
- privateGetSenderForTags(): Promise<AztecAddress | undefined>;
112
- privateSetSenderForTags(senderForTags: AztecAddress): Promise<void>;
113
- txePrivateCallNewFlow(from: AztecAddress, targetContractAddress: AztecAddress | undefined, functionSelector: FunctionSelector | undefined, args: Fr[], argsHash?: Fr, isStaticCall?: boolean): Promise<{
114
- endSideEffectCounter: Fr;
115
- returnsHash: Fr;
116
- txHash: TxHash;
117
- }>;
118
- txePublicCallNewFlow(from: AztecAddress, targetContractAddress: AztecAddress, calldata: Fr[], isStaticCall: boolean): Promise<{
119
- returnsHash: Fr;
120
- txHash: TxHash;
121
- }>;
122
- private getBlockTimestamp;
123
- }
124
- //# sourceMappingURL=txe_oracle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"txe_oracle.d.ts","sourceRoot":"","sources":["../../src/oracle/txe_oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,wBAAwB,EAM9B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAGhB,wBAAwB,EACxB,mBAAmB,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAElB,uBAAuB,EACvB,KAAK,QAAQ,EAOd,MAAM,sBAAsB,CAAC;AAW9B,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,gBAAgB,EAEhB,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,2BAA2B,EAAyB,MAAM,wBAAwB,CAAC;AAWxH,OAAO,KAAK,EAA4B,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC3G,OAAO,EACL,KAAK,oBAAoB,EAEzB,oBAAoB,EAIrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAc,MAAM,oBAAoB,CAAC;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD,OAAO,EAEL,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