@aztec/pxe 0.77.0-testnet-ignition.28 → 0.77.0-testnet-ignition.29
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/bin/index.d.ts +3 -0
- package/dest/bin/index.d.ts.map +1 -0
- package/dest/config/index.d.ts +47 -0
- package/dest/config/index.d.ts.map +1 -0
- package/dest/config/package_info.d.ts +5 -0
- package/dest/config/package_info.d.ts.map +1 -0
- package/dest/contract_data_provider/contract_data_provider.d.ts +104 -0
- package/dest/contract_data_provider/contract_data_provider.d.ts.map +1 -0
- package/dest/contract_data_provider/index.d.ts +3 -0
- package/dest/contract_data_provider/index.d.ts.map +1 -0
- package/dest/contract_data_provider/private_functions_tree.d.ts +66 -0
- package/dest/contract_data_provider/private_functions_tree.d.ts.map +1 -0
- package/dest/database/index.d.ts +3 -0
- package/dest/database/index.d.ts.map +1 -0
- package/dest/database/interfaces/contract_artifact_db.d.ts +20 -0
- package/dest/database/interfaces/contract_artifact_db.d.ts.map +1 -0
- package/dest/database/interfaces/contract_instance_db.d.ts +20 -0
- package/dest/database/interfaces/contract_instance_db.d.ts.map +1 -0
- package/dest/database/interfaces/index.d.ts +4 -0
- package/dest/database/interfaces/index.d.ts.map +1 -0
- package/dest/database/interfaces/pxe_database.d.ts +211 -0
- package/dest/database/interfaces/pxe_database.d.ts.map +1 -0
- package/dest/database/interfaces/pxe_database_test_suite.d.ts +7 -0
- package/dest/database/interfaces/pxe_database_test_suite.d.ts.map +1 -0
- package/dest/database/kv_pxe_database.d.ts +57 -0
- package/dest/database/kv_pxe_database.d.ts.map +1 -0
- package/dest/database/note_dao.d.ts +106 -0
- package/dest/database/note_dao.d.ts.map +1 -0
- package/dest/index.d.ts +9 -0
- package/dest/index.d.ts.map +1 -0
- package/dest/kernel_oracle/index.d.ts +44 -0
- package/dest/kernel_oracle/index.d.ts.map +1 -0
- package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts +28 -0
- package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -0
- package/dest/kernel_prover/hints/index.d.ts +2 -0
- package/dest/kernel_prover/hints/index.d.ts.map +1 -0
- package/dest/kernel_prover/index.d.ts +3 -0
- package/dest/kernel_prover/index.d.ts.map +1 -0
- package/dest/kernel_prover/kernel_prover.d.ts +38 -0
- package/dest/kernel_prover/kernel_prover.d.ts.map +1 -0
- package/dest/kernel_prover/proving_data_oracle.d.ts +73 -0
- package/dest/kernel_prover/proving_data_oracle.d.ts.map +1 -0
- package/dest/note_decryption_utils/add_public_values_to_payload.d.ts +11 -0
- package/dest/note_decryption_utils/add_public_values_to_payload.d.ts.map +1 -0
- package/dest/pxe_data_provider/index.d.ts +151 -0
- package/dest/pxe_data_provider/index.d.ts.map +1 -0
- package/dest/pxe_data_provider/tagging_utils.d.ts +17 -0
- package/dest/pxe_data_provider/tagging_utils.d.ts.map +1 -0
- package/dest/pxe_http/index.d.ts +2 -0
- package/dest/pxe_http/index.d.ts.map +1 -0
- package/dest/pxe_http/pxe_http_server.d.ts +16 -0
- package/dest/pxe_http/pxe_http_server.d.ts.map +1 -0
- package/dest/pxe_service/error_enriching.d.ts +12 -0
- package/dest/pxe_service/error_enriching.d.ts.map +1 -0
- package/dest/pxe_service/index.d.ts +3 -0
- package/dest/pxe_service/index.d.ts.map +1 -0
- package/dest/pxe_service/pxe_service.d.ts +107 -0
- package/dest/pxe_service/pxe_service.d.ts.map +1 -0
- package/dest/pxe_service/test/pxe_test_suite.d.ts +3 -0
- package/dest/pxe_service/test/pxe_test_suite.d.ts.map +1 -0
- package/dest/synchronizer/index.d.ts +2 -0
- package/dest/synchronizer/index.d.ts.map +1 -0
- package/dest/synchronizer/synchronizer.d.ts +33 -0
- package/dest/synchronizer/synchronizer.d.ts.map +1 -0
- package/dest/utils/create_pxe_service.d.ts +16 -0
- package/dest/utils/create_pxe_service.d.ts.map +1 -0
- package/package.json +15 -15
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
5
|
+
import type { NoteData } from '@aztec/simulator/client';
|
|
6
|
+
import { NoteSelector } from '@aztec/stdlib/abi';
|
|
7
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
+
import type { PublicKey } from '@aztec/stdlib/keys';
|
|
9
|
+
import { Note } from '@aztec/stdlib/note';
|
|
10
|
+
import { TxHash } from '@aztec/stdlib/tx';
|
|
11
|
+
/**
|
|
12
|
+
* A Note Data Access Object, representing a note that was committed to the note hash tree, holding all of the
|
|
13
|
+
* information required to use it during execution and manage its state.
|
|
14
|
+
*/
|
|
15
|
+
export declare class NoteDao implements NoteData {
|
|
16
|
+
/** The packed content of the note, as will be returned in the getNotes oracle. */
|
|
17
|
+
note: Note;
|
|
18
|
+
/** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */
|
|
19
|
+
contractAddress: AztecAddress;
|
|
20
|
+
/**
|
|
21
|
+
* The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
|
|
22
|
+
* since contracts typically make queries based on it.
|
|
23
|
+
* */
|
|
24
|
+
storageSlot: Fr;
|
|
25
|
+
/** The kernel-provided nonce of the note, required to compute the uniqueNoteHash. */
|
|
26
|
+
nonce: Fr;
|
|
27
|
+
/**
|
|
28
|
+
* The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
|
|
29
|
+
* be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
|
|
30
|
+
*/
|
|
31
|
+
noteHash: Fr;
|
|
32
|
+
/**
|
|
33
|
+
* The nullifier of the note, siloed by contract address.
|
|
34
|
+
* Note: Might be set as 0 if the note was added to PXE as nullified.
|
|
35
|
+
*/
|
|
36
|
+
siloedNullifier: Fr;
|
|
37
|
+
/** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
|
|
38
|
+
* when searching for txEffects.
|
|
39
|
+
*/
|
|
40
|
+
txHash: TxHash;
|
|
41
|
+
/** The L2 block number in which the tx with this note was included. Used for note management while processing
|
|
42
|
+
* reorgs.*/
|
|
43
|
+
l2BlockNumber: number;
|
|
44
|
+
/** The L2 block hash in which the tx with this note was included. Used for note management while processing
|
|
45
|
+
* reorgs.*/
|
|
46
|
+
l2BlockHash: string;
|
|
47
|
+
/** The index of the leaf in the global note hash tree the note is stored at */
|
|
48
|
+
index: bigint;
|
|
49
|
+
/** The public key with which the note log was encrypted during delivery. */
|
|
50
|
+
addressPoint: PublicKey;
|
|
51
|
+
/** The note type identifier for the contract.
|
|
52
|
+
* TODO(#12013): remove
|
|
53
|
+
*/
|
|
54
|
+
noteTypeId: NoteSelector;
|
|
55
|
+
constructor(
|
|
56
|
+
/** The packed content of the note, as will be returned in the getNotes oracle. */
|
|
57
|
+
note: Note,
|
|
58
|
+
/** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */
|
|
59
|
+
contractAddress: AztecAddress,
|
|
60
|
+
/**
|
|
61
|
+
* The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
|
|
62
|
+
* since contracts typically make queries based on it.
|
|
63
|
+
* */
|
|
64
|
+
storageSlot: Fr,
|
|
65
|
+
/** The kernel-provided nonce of the note, required to compute the uniqueNoteHash. */
|
|
66
|
+
nonce: Fr,
|
|
67
|
+
/**
|
|
68
|
+
* The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
|
|
69
|
+
* be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
|
|
70
|
+
*/
|
|
71
|
+
noteHash: Fr,
|
|
72
|
+
/**
|
|
73
|
+
* The nullifier of the note, siloed by contract address.
|
|
74
|
+
* Note: Might be set as 0 if the note was added to PXE as nullified.
|
|
75
|
+
*/
|
|
76
|
+
siloedNullifier: Fr,
|
|
77
|
+
/** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
|
|
78
|
+
* when searching for txEffects.
|
|
79
|
+
*/
|
|
80
|
+
txHash: TxHash,
|
|
81
|
+
/** The L2 block number in which the tx with this note was included. Used for note management while processing
|
|
82
|
+
* reorgs.*/
|
|
83
|
+
l2BlockNumber: number,
|
|
84
|
+
/** The L2 block hash in which the tx with this note was included. Used for note management while processing
|
|
85
|
+
* reorgs.*/
|
|
86
|
+
l2BlockHash: string,
|
|
87
|
+
/** The index of the leaf in the global note hash tree the note is stored at */
|
|
88
|
+
index: bigint,
|
|
89
|
+
/** The public key with which the note log was encrypted during delivery. */
|
|
90
|
+
addressPoint: PublicKey,
|
|
91
|
+
/** The note type identifier for the contract.
|
|
92
|
+
* TODO(#12013): remove
|
|
93
|
+
*/
|
|
94
|
+
noteTypeId: NoteSelector);
|
|
95
|
+
toBuffer(): Buffer;
|
|
96
|
+
static fromBuffer(buffer: Buffer | BufferReader): NoteDao;
|
|
97
|
+
toString(): string;
|
|
98
|
+
static fromString(str: string): NoteDao;
|
|
99
|
+
/**
|
|
100
|
+
* Returns the size in bytes of the Note Dao.
|
|
101
|
+
* @returns - Its size in bytes.
|
|
102
|
+
*/
|
|
103
|
+
getSize(): number;
|
|
104
|
+
static random({ note, contractAddress, storageSlot, nonce, noteHash, siloedNullifier, txHash, l2BlockNumber, l2BlockHash, index, addressPoint, noteTypeId, }?: Partial<NoteDao>): Promise<NoteDao>;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=note_dao.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note_dao.d.ts","sourceRoot":"","sources":["../../src/database/note_dao.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,EAAE,EAAS,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YA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IAiBlB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAgC/C,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAK7B;;;OAGG;IACI,OAAO;WAMD,MAAM,CAAC,EAClB,IAAoB,EACpB,eAA2B,EAC3B,WAAyB,EACzB,KAAmB,EACnB,QAAsB,EACtB,eAA6B,EAC7B,MAAwB,EACxB,aAAgD,EAChD,WAAoC,EACpC,KAA8B,EAC9B,YAAwB,EACxB,UAAkC,GACnC,GAAE,OAAO,CAAC,OAAO,CAAM;CAgBzB"}
|
package/dest/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './pxe_service/index.js';
|
|
2
|
+
export { pxeTestSuite } from './pxe_service/test/pxe_test_suite.js';
|
|
3
|
+
export * from './pxe_http/index.js';
|
|
4
|
+
export * from './config/index.js';
|
|
5
|
+
export * from './utils/create_pxe_service.js';
|
|
6
|
+
export * from './database/index.js';
|
|
7
|
+
export { PXEDataProvider } from './pxe_data_provider/index.js';
|
|
8
|
+
export * from './contract_data_provider/index.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAE9C,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
+
import type { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields';
|
|
3
|
+
import { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
|
+
import type { KeyStore } from '@aztec/key-store';
|
|
5
|
+
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
+
import type { L2BlockNumber } from '@aztec/stdlib/block';
|
|
8
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
9
|
+
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
10
|
+
import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
|
|
11
|
+
import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
|
|
12
|
+
import type { ContractDataProvider } from '../contract_data_provider/index.js';
|
|
13
|
+
import type { ProvingDataOracle } from './../kernel_prover/proving_data_oracle.js';
|
|
14
|
+
/**
|
|
15
|
+
* A data oracle that provides information needed for simulating a transaction.
|
|
16
|
+
*/
|
|
17
|
+
export declare class KernelOracle implements ProvingDataOracle {
|
|
18
|
+
private contractDataProvider;
|
|
19
|
+
private keyStore;
|
|
20
|
+
private node;
|
|
21
|
+
private blockNumber;
|
|
22
|
+
private log;
|
|
23
|
+
constructor(contractDataProvider: ContractDataProvider, keyStore: KeyStore, node: AztecNode, blockNumber?: L2BlockNumber, log?: import("@aztec/foundation/log").Logger);
|
|
24
|
+
getContractAddressPreimage(address: AztecAddress): Promise<{
|
|
25
|
+
version: 1;
|
|
26
|
+
salt: Fr;
|
|
27
|
+
deployer: AztecAddress;
|
|
28
|
+
currentContractClassId: Fr;
|
|
29
|
+
originalContractClassId: Fr;
|
|
30
|
+
initializationHash: Fr;
|
|
31
|
+
publicKeys: import("@aztec/aztec.js").PublicKeys;
|
|
32
|
+
saltedInitializationHash: Fr;
|
|
33
|
+
}>;
|
|
34
|
+
getContractClassIdPreimage(contractClassId: Fr): Promise<import("@aztec/stdlib/contract").ContractClassIdPreimage>;
|
|
35
|
+
getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<5>>;
|
|
36
|
+
getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<6>>;
|
|
37
|
+
getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
38
|
+
getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
39
|
+
getNoteHashTreeRoot(): Promise<Fr>;
|
|
40
|
+
getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
|
|
41
|
+
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
42
|
+
getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kernel_oracle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAA2C,MAAM,kBAAkB,CAAC;AACvG,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAA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, type PrivateKernelSimulateOutput } from '@aztec/stdlib/kernel';
|
|
2
|
+
import { type PrivateCallExecutionResult } from '@aztec/stdlib/tx';
|
|
3
|
+
import type { ProvingDataOracle } from '../proving_data_oracle.js';
|
|
4
|
+
export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
5
|
+
private previousKernelOutput;
|
|
6
|
+
private executionStack;
|
|
7
|
+
private noteHashNullifierCounterMap;
|
|
8
|
+
private validationRequestsSplitCounter;
|
|
9
|
+
private previousKernel;
|
|
10
|
+
private nextIteration?;
|
|
11
|
+
private noteHashResetStates;
|
|
12
|
+
private nullifierResetStates;
|
|
13
|
+
private numTransientData?;
|
|
14
|
+
private transientDataIndexHints;
|
|
15
|
+
private requestedDimensions;
|
|
16
|
+
constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>, validationRequestsSplitCounter: number);
|
|
17
|
+
needsReset(): boolean;
|
|
18
|
+
build(oracle: ProvingDataOracle, noteHashLeafIndexMap: Map<bigint, bigint>): Promise<PrivateKernelResetCircuitPrivateInputs>;
|
|
19
|
+
private reduceReadRequestStates;
|
|
20
|
+
private needsResetNoteHashReadRequests;
|
|
21
|
+
private needsResetNullifierReadRequests;
|
|
22
|
+
private needsResetNullifierKeys;
|
|
23
|
+
private needsResetTransientData;
|
|
24
|
+
private needsSiloNoteHashes;
|
|
25
|
+
private needsSiloNullifiers;
|
|
26
|
+
private needsSiloPrivateLogs;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=build_private_kernel_reset_private_inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/kernel_prover/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAGL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAk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":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kernel_prover/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
2
|
+
import { type PrivateKernelSimulateOutput, type PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
3
|
+
import { type PrivateExecutionResult, TxRequest } from '@aztec/stdlib/tx';
|
|
4
|
+
import type { ProvingDataOracle } from './proving_data_oracle.js';
|
|
5
|
+
export type ProvingConfig = {
|
|
6
|
+
simulate: boolean;
|
|
7
|
+
skipFeeEnforcement: boolean;
|
|
8
|
+
profile: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The KernelProver class is responsible for generating kernel proofs.
|
|
12
|
+
* It takes a transaction request, its signature, and the simulation result as inputs, and outputs a proof
|
|
13
|
+
* along with output notes. The class interacts with a ProvingDataOracle to fetch membership witnesses and
|
|
14
|
+
* constructs private call data based on the execution results.
|
|
15
|
+
*/
|
|
16
|
+
export declare class KernelProver {
|
|
17
|
+
private oracle;
|
|
18
|
+
private proofCreator;
|
|
19
|
+
private fakeProofs;
|
|
20
|
+
private log;
|
|
21
|
+
constructor(oracle: ProvingDataOracle, proofCreator: PrivateKernelProver, fakeProofs?: boolean);
|
|
22
|
+
/**
|
|
23
|
+
* Generate a proof for a given transaction request and execution result.
|
|
24
|
+
* The function iterates through the nested executions in the execution result, creates private call data,
|
|
25
|
+
* and generates a proof using the provided ProofCreator instance. It also maintains an index of new notes
|
|
26
|
+
* created during the execution and returns them as a part of the KernelProverOutput.
|
|
27
|
+
*
|
|
28
|
+
* @param txRequest - The authenticated transaction request object.
|
|
29
|
+
* @param executionResult - The execution result object containing nested executions and preimages.
|
|
30
|
+
* @param profile - Set true to profile the gate count for each circuit
|
|
31
|
+
* @returns A Promise that resolves to a KernelProverOutput object containing proof, public inputs, and output notes.
|
|
32
|
+
* TODO(#7368) this should be refactored to not recreate the ACIR bytecode now that it operates on a program stack
|
|
33
|
+
*/
|
|
34
|
+
prove(txRequest: TxRequest, executionResult: PrivateExecutionResult, { simulate, skipFeeEnforcement, profile }?: ProvingConfig): Promise<PrivateKernelSimulateOutput<PrivateKernelTailCircuitPublicInputs>>;
|
|
35
|
+
private createPrivateCallData;
|
|
36
|
+
private isPrivateOnly;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=kernel_prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kernel_prover.d.ts","sourceRoot":"","sources":["../../src/kernel_prover/kernel_prover.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAML,KAAK,2BAA2B,EAEhC,KAAK,oCAAoC,EAG1C,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAMV,MAAM,kBAAkB,CAAC;AAO1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AA8ClE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,YAAY;IAIrB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IALpB,OAAO,CAAC,GAAG,CAAqC;gBAGtC,MAAM,EAAE,iBAAiB,EACzB,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ;IAG5B;;;;;;;;;;;OAWG;IACG,KAAK,CACT,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAE,aAI1C,GACA,OAAO,CAAC,2BAA2B,CAAC,oCAAoC,CAAC,CAAC;YAkN/D,qBAAqB;IAiDnC,OAAO,CAAC,aAAa;CAYtB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { FUNCTION_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT, VK_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
+
import type { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields';
|
|
3
|
+
import type { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
|
+
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
5
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
+
import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
|
|
7
|
+
import type { PublicKeys } from '@aztec/stdlib/keys';
|
|
8
|
+
import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
|
|
9
|
+
import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
|
|
10
|
+
/**
|
|
11
|
+
* Provides functionality to fetch membership witnesses for verification keys,
|
|
12
|
+
* contract addresses, and function selectors in their respective merkle trees.
|
|
13
|
+
*/
|
|
14
|
+
export interface ProvingDataOracle {
|
|
15
|
+
/** Retrieves the preimage of a contract address from the registered contract instances db. */
|
|
16
|
+
getContractAddressPreimage(address: AztecAddress): Promise<{
|
|
17
|
+
saltedInitializationHash: Fr;
|
|
18
|
+
publicKeys: PublicKeys;
|
|
19
|
+
currentContractClassId: Fr;
|
|
20
|
+
originalContractClassId: Fr;
|
|
21
|
+
}>;
|
|
22
|
+
/** Retrieves the preimage of a contract class id from the contract classes db. */
|
|
23
|
+
getContractClassIdPreimage(contractClassId: Fr): Promise<{
|
|
24
|
+
artifactHash: Fr;
|
|
25
|
+
publicBytecodeCommitment: Fr;
|
|
26
|
+
privateFunctionsRoot: Fr;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Retrieve the function membership witness for the given contract class and function selector.
|
|
30
|
+
* The function membership witness represents a proof that the function belongs to the specified contract.
|
|
31
|
+
* Throws an error if the contract address or function selector is unknown.
|
|
32
|
+
*
|
|
33
|
+
* @param contractClassId - The id of the class.
|
|
34
|
+
* @param selector - The function selector.
|
|
35
|
+
* @returns A promise that resolves with the MembershipWitness instance for the specified contract's function.
|
|
36
|
+
*/
|
|
37
|
+
getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<typeof FUNCTION_TREE_HEIGHT>>;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve the membership witness corresponding to a verification key.
|
|
40
|
+
* This function currently returns a random membership witness of the specified height,
|
|
41
|
+
* which is a placeholder implementation until a concrete membership witness calculation
|
|
42
|
+
* is implemented.
|
|
43
|
+
*
|
|
44
|
+
* @param vk - The VerificationKey for which the membership witness is needed.
|
|
45
|
+
* @returns A Promise that resolves to the MembershipWitness instance.
|
|
46
|
+
*/
|
|
47
|
+
getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<typeof VK_TREE_HEIGHT>>;
|
|
48
|
+
/**
|
|
49
|
+
* Get the note membership witness for a note in the note hash tree at the given leaf index.
|
|
50
|
+
*
|
|
51
|
+
* @param leafIndex - The leaf index of the note in the note hash tree.
|
|
52
|
+
* @returns the MembershipWitness for the note.
|
|
53
|
+
*/
|
|
54
|
+
getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
|
|
55
|
+
getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Get the root of the note hash tree.
|
|
58
|
+
*
|
|
59
|
+
* @returns the root of the note hash tree.
|
|
60
|
+
*/
|
|
61
|
+
getNoteHashTreeRoot(): Promise<Fr>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves the sk_m corresponding to the pk_m.
|
|
64
|
+
* @throws If the provided public key is not associated with any of the registered accounts.
|
|
65
|
+
* @param pkM - The master public key to get secret key for.
|
|
66
|
+
* @returns A Promise that resolves to sk_m.
|
|
67
|
+
* @dev Used when feeding the sk_m to the kernel circuit for keys verification.
|
|
68
|
+
*/
|
|
69
|
+
getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
|
|
70
|
+
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
|
|
71
|
+
getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=proving_data_oracle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proving_data_oracle.d.ts","sourceRoot":"","sources":["../../src/kernel_prover/proving_data_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,8FAA8F;IAC9F,0BAA0B,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC;QACzD,wBAAwB,EAAE,EAAE,CAAC;QAC7B,UAAU,EAAE,UAAU,CAAC;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|
+
import type { PxeDatabase } from '../database/interfaces/pxe_database.js';
|
|
4
|
+
/**
|
|
5
|
+
* Merges privately and publicly delivered note values.
|
|
6
|
+
* @param db - PXE database used to fetch contract instance and artifact.
|
|
7
|
+
* @param payload - Payload corresponding to the note.
|
|
8
|
+
* @returns Note payload with public fields added.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getOrderedNoteItems(db: PxeDatabase, { contractAddress, noteTypeId, privateNoteValues, publicNoteValues }: L1NotePayload): Promise<Note>;
|
|
11
|
+
//# sourceMappingURL=add_public_values_to_payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add_public_values_to_payload.d.ts","sourceRoot":"","sources":["../../src/note_decryption_utils/add_public_values_to_payload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAE1E;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,WAAW,EACf,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,aAAa,GAClF,OAAO,CAAC,IAAI,CAAC,CAgDf"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import type { KeyStore } from '@aztec/key-store';
|
|
4
|
+
import { AcirSimulator, type ExecutionDataProvider, type SimulationProvider } from '@aztec/simulator/client';
|
|
5
|
+
import { MessageLoadOracleInputs } from '@aztec/simulator/client';
|
|
6
|
+
import { type FunctionArtifact, FunctionSelector } from '@aztec/stdlib/abi';
|
|
7
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
|
+
import type { L2Block } from '@aztec/stdlib/block';
|
|
9
|
+
import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
|
|
10
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
11
|
+
import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
|
|
12
|
+
import { IndexedTaggingSecret, LogWithTxData, TxScopedL2Log } from '@aztec/stdlib/logs';
|
|
13
|
+
import { Note, type NoteStatus } from '@aztec/stdlib/note';
|
|
14
|
+
import { MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
|
|
15
|
+
import type { BlockHeader } from '@aztec/stdlib/tx';
|
|
16
|
+
import { TxHash } from '@aztec/stdlib/tx';
|
|
17
|
+
import { ContractDataProvider } from '../contract_data_provider/index.js';
|
|
18
|
+
import type { PxeDatabase } from '../database/index.js';
|
|
19
|
+
import { NoteDao } from '../database/note_dao.js';
|
|
20
|
+
/**
|
|
21
|
+
* A data layer that provides and stores information needed for simulating/proving a transaction.
|
|
22
|
+
*/
|
|
23
|
+
export declare class PXEDataProvider implements ExecutionDataProvider {
|
|
24
|
+
#private;
|
|
25
|
+
private db;
|
|
26
|
+
private keyStore;
|
|
27
|
+
private aztecNode;
|
|
28
|
+
private simulationProvider;
|
|
29
|
+
private contractDataProvider;
|
|
30
|
+
private log;
|
|
31
|
+
constructor(db: PxeDatabase, keyStore: KeyStore, aztecNode: AztecNode, simulationProvider: SimulationProvider, contractDataProvider: ContractDataProvider, log?: import("@aztec/foundation/log").Logger);
|
|
32
|
+
getKeyValidationRequest(pkMHash: Fr, contractAddress: AztecAddress): Promise<KeyValidationRequest>;
|
|
33
|
+
getCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
|
|
34
|
+
getContractInstance(address: AztecAddress): Promise<ContractInstance>;
|
|
35
|
+
getAuthWitness(messageHash: Fr): Promise<Fr[]>;
|
|
36
|
+
getNotes(contractAddress: AztecAddress, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]): Promise<{
|
|
37
|
+
contractAddress: AztecAddress;
|
|
38
|
+
storageSlot: Fr;
|
|
39
|
+
nonce: Fr;
|
|
40
|
+
note: Note;
|
|
41
|
+
noteHash: Fr;
|
|
42
|
+
siloedNullifier: Fr;
|
|
43
|
+
index: bigint;
|
|
44
|
+
}[]>;
|
|
45
|
+
getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifact>;
|
|
46
|
+
getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
|
|
47
|
+
/**
|
|
48
|
+
* Fetches a message from the db, given its key.
|
|
49
|
+
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
50
|
+
* @param messageHash - Hash of the message.
|
|
51
|
+
* @param secret - Secret used to compute a nullifier.
|
|
52
|
+
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
53
|
+
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
54
|
+
*/
|
|
55
|
+
getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
|
|
56
|
+
getL1ToL2LeafValue(_leafIndex: bigint): Promise<Fr | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Gets the index of a commitment in the note hash tree.
|
|
59
|
+
* @param commitment - The commitment.
|
|
60
|
+
* @returns - The index of the commitment. Undefined if it does not exist in the tree.
|
|
61
|
+
*/
|
|
62
|
+
getCommitmentIndex(commitment: Fr): Promise<bigint | undefined>;
|
|
63
|
+
getCommitmentValue(_leafIndex: bigint): Promise<Fr | undefined>;
|
|
64
|
+
getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
|
|
65
|
+
getMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
|
|
66
|
+
getNullifierMembershipWitnessAtLatestBlock(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
67
|
+
getNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
68
|
+
getLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
|
|
69
|
+
getBlock(blockNumber: number): Promise<L2Block | undefined>;
|
|
70
|
+
getPublicDataTreeWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
|
|
71
|
+
getPublicStorageAt(blockNumber: number, contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieve the databases view of the Block Header object.
|
|
74
|
+
* This structure is fed into the circuits simulator and is used to prove against certain historical roots.
|
|
75
|
+
*
|
|
76
|
+
* @returns A Promise that resolves to a BlockHeader object.
|
|
77
|
+
*/
|
|
78
|
+
getBlockHeader(): Promise<BlockHeader>;
|
|
79
|
+
/**
|
|
80
|
+
* Fetches the current block number.
|
|
81
|
+
* @returns The block number.
|
|
82
|
+
*/
|
|
83
|
+
getBlockNumber(): Promise<number>;
|
|
84
|
+
/**
|
|
85
|
+
* Fetches the current chain id.
|
|
86
|
+
* @returns The chain id.
|
|
87
|
+
*/
|
|
88
|
+
getChainId(): Promise<number>;
|
|
89
|
+
/**
|
|
90
|
+
* Fetches the current version.
|
|
91
|
+
* @returns The version.
|
|
92
|
+
*/
|
|
93
|
+
getVersion(): Promise<number>;
|
|
94
|
+
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* Returns the full contents of your address book.
|
|
97
|
+
* This is used when calculating tags for incoming notes by deriving the shared secret, the contract-siloed tagging secret, and
|
|
98
|
+
* finally the index specified tag. We will then query the node with this tag for each address in the address book.
|
|
99
|
+
* @returns The full list of the users contact addresses.
|
|
100
|
+
*/
|
|
101
|
+
getSenders(): Promise<AztecAddress[]>;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
104
|
+
* Includes the next index to be used used for tagging with this secret.
|
|
105
|
+
* @param contractAddress - The contract address to silo the secret for
|
|
106
|
+
* @param sender - The address sending the note
|
|
107
|
+
* @param recipient - The address receiving the note
|
|
108
|
+
* @returns An indexed tagging secret that can be used to tag notes.
|
|
109
|
+
*/
|
|
110
|
+
getIndexedTaggingSecretAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<IndexedTaggingSecret>;
|
|
111
|
+
/**
|
|
112
|
+
* Increments the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
|
|
113
|
+
* @param contractAddress - The contract address to silo the secret for
|
|
114
|
+
* @param sender - The address sending the note
|
|
115
|
+
* @param recipient - The address receiving the note
|
|
116
|
+
*/
|
|
117
|
+
incrementAppTaggingSecretIndexAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Updates the local index of the shared tagging secret of a sender / recipient pair
|
|
120
|
+
* if a log with a larger index is found from the node.
|
|
121
|
+
* @param contractAddress - The address of the contract that the logs are tagged for
|
|
122
|
+
* @param sender - The address of the sender, we must know the sender's ivsk_m.
|
|
123
|
+
* @param recipient - The address of the recipient.
|
|
124
|
+
*/
|
|
125
|
+
syncTaggedLogsAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Synchronizes the logs tagged with scoped addresses and all the senders in the address book.
|
|
128
|
+
* Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs
|
|
129
|
+
* to sync.
|
|
130
|
+
* @param contractAddress - The address of the contract that the logs are tagged for
|
|
131
|
+
* @param recipient - The address of the recipient
|
|
132
|
+
* @returns A list of encrypted logs tagged with the recipient's address
|
|
133
|
+
*/
|
|
134
|
+
syncTaggedLogs(contractAddress: AztecAddress, maxBlockNumber: number, scopes?: AztecAddress[]): Promise<Map<string, TxScopedL2Log[]>>;
|
|
135
|
+
/**
|
|
136
|
+
* Processes the tagged logs returned by syncTaggedLogs by decrypting them and storing them in the database.
|
|
137
|
+
* @param logs - The logs to process.
|
|
138
|
+
* @param recipient - The recipient of the logs.
|
|
139
|
+
*/
|
|
140
|
+
processTaggedLogs(logs: TxScopedL2Log[], recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
|
|
141
|
+
deliverNote(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: Fr, recipient: AztecAddress): Promise<void>;
|
|
142
|
+
getLogByTag(tag: Fr): Promise<LogWithTxData | null>;
|
|
143
|
+
removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
|
|
144
|
+
produceNoteDao(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: Fr, recipient: AztecAddress): Promise<NoteDao>;
|
|
145
|
+
callProcessLog(contractAddress: AztecAddress, logPlaintext: Fr[], txHash: TxHash, noteHashes: Fr[], firstNullifier: Fr, recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
|
|
146
|
+
storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
|
|
147
|
+
loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
|
|
148
|
+
deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
|
|
149
|
+
copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pxe_data_provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAI9B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAA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,CAAC;IA4Cb,cAAc,CAClB,eAAe,EAAE,YAAY,EAC7B,YAAY,EAAE,EAAE,EAAE,EAClB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,EAAE,EAAE,EAChB,cAAc,EAAE,EAAE,EAClB,SAAS,EAAE,YAAY,EACvB,SAAS,CAAC,EAAE,aAAa;IAqC3B,YAAY,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAInF,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC;IAI1E,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrE,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { IndexedTaggingSecret } from '@aztec/stdlib/logs';
|
|
3
|
+
export declare const WINDOW_HALF_SIZE = 10;
|
|
4
|
+
export declare function getIndexedTaggingSecretsForTheWindow(secretsAndWindows: {
|
|
5
|
+
appTaggingSecret: Fr;
|
|
6
|
+
leftMostIndex: number;
|
|
7
|
+
rightMostIndex: number;
|
|
8
|
+
}[]): IndexedTaggingSecret[];
|
|
9
|
+
/**
|
|
10
|
+
* Creates a map from app tagging secret to initial index.
|
|
11
|
+
* @param indexedTaggingSecrets - The indexed tagging secrets to get the initial indexes from.
|
|
12
|
+
* @returns The map from app tagging secret to initial index.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getInitialIndexesMap(indexedTaggingSecrets: IndexedTaggingSecret[]): {
|
|
15
|
+
[k: string]: number;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=tagging_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagging_utils.d.ts","sourceRoot":"","sources":["../../src/pxe_data_provider/tagging_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAG1D,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,wBAAgB,oCAAoC,CAClD,iBAAiB,EAAE;IAAE,gBAAgB,EAAE,EAAE,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,EAAE,GAC3F,oBAAoB,EAAE,CAQxB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAQ3G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pxe_http/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import { type PXE } from '@aztec/stdlib/interfaces/client';
|
|
3
|
+
import http from 'http';
|
|
4
|
+
/**
|
|
5
|
+
* Wraps an instance of Private eXecution Environment (PXE) implementation to a JSON RPC HTTP interface.
|
|
6
|
+
* @returns A new instance of the HTTP server.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createPXERpcServer(pxeService: PXE): import("@aztec/foundation/json-rpc/server").SafeJsonRpcServer;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an http server that forwards calls to the PXE and starts it on the given port.
|
|
11
|
+
* @param pxeService - PXE that answers queries to the created HTTP server.
|
|
12
|
+
* @param port - Port to listen in.
|
|
13
|
+
* @returns A running http server.
|
|
14
|
+
*/
|
|
15
|
+
export declare function startPXEHttpServer(pxeService: PXE, port: string | number): http.Server;
|
|
16
|
+
//# sourceMappingURL=pxe_http_server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pxe_http_server.d.ts","sourceRoot":"","sources":["../../src/pxe_http/pxe_http_server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,GAAG,EAAa,MAAM,iCAAiC,CAAC;AAEtE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,GAAG,iEAEjD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,MAAM,CAStF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
+
import { type SimulationError } from '@aztec/stdlib/errors';
|
|
3
|
+
import { ContractDataProvider } from '../contract_data_provider/index.js';
|
|
4
|
+
import type { PxeDatabase } from '../database/interfaces/pxe_database.js';
|
|
5
|
+
/**
|
|
6
|
+
* Adds contract and function names to a simulation error, if they
|
|
7
|
+
* can be found in the PXE database
|
|
8
|
+
* @param err - The error to enrich.
|
|
9
|
+
*/
|
|
10
|
+
export declare function enrichSimulationError(err: SimulationError, db: PxeDatabase, logger: Logger): Promise<void>;
|
|
11
|
+
export declare function enrichPublicSimulationError(err: SimulationError, contractDataProvider: ContractDataProvider, db: PxeDatabase, logger: Logger): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=error_enriching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error_enriching.d.ts","sourceRoot":"","sources":["../../src/pxe_service/error_enriching.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD,OAAO,EAAE,KAAK,eAAe,EAA6B,MAAM,sBAAsB,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAE1E;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAwChG;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,eAAe,EACpB,oBAAoB,EAAE,oBAAoB,EAC1C,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,MAAM,iBAyCf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pxe_service/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC"}
|