@aztec/stdlib 3.0.0-nightly.20250917 → 3.0.0-nightly.20250919
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/avm/avm.d.ts +6 -0
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts +6 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +11 -6
- package/dest/avm/avm_proving_request.d.ts +7 -0
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/block/body.d.ts +4 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +16 -5
- package/dest/block/index.d.ts +1 -0
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -0
- package/dest/block/l2_block.d.ts +8 -5
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +14 -7
- package/dest/block/l2_block_code_to_purge.d.ts +3 -14
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +23 -13
- package/dest/block/l2_block_header.d.ts +100 -0
- package/dest/block/l2_block_header.d.ts.map +1 -0
- package/dest/block/l2_block_header.js +146 -0
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +1 -1
- package/dest/block/published_l2_block.d.ts +2 -2
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +1 -3
- package/dest/interfaces/block-builder.d.ts +2 -2
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/epoch-prover.d.ts +26 -9
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +233 -125
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +120 -102
- package/dest/interfaces/pxe.d.ts +192 -90
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +5 -31
- package/dest/interfaces/server_circuit_prover.d.ts +31 -27
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +3 -2
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +4 -4
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_context_inputs.d.ts +2 -2
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_context_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
- package/dest/p2p/consensus_payload.d.ts +7 -6
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +7 -6
- package/dest/parity/index.d.ts +2 -3
- package/dest/parity/index.d.ts.map +1 -1
- package/dest/parity/index.js +2 -3
- package/dest/parity/{base_parity_inputs.d.ts → parity_base_private_inputs.d.ts} +6 -6
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -0
- package/dest/parity/{base_parity_inputs.js → parity_base_private_inputs.js} +5 -5
- package/dest/parity/parity_root_private_inputs.d.ts +39 -0
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -0
- package/dest/parity/{root_parity_inputs.js → parity_root_private_inputs.js} +12 -13
- package/dest/proofs/proof_data.d.ts +4 -3
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proof_data.js +2 -2
- package/dest/proofs/proving_request_type.d.ts +16 -11
- package/dest/proofs/proving_request_type.d.ts.map +1 -1
- package/dest/proofs/proving_request_type.js +16 -11
- package/dest/rollup/base_rollup_hints.d.ts +12 -3
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +11 -5
- package/dest/rollup/block_constant_data.d.ts +20 -6
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.js +15 -7
- package/dest/rollup/{block_merge_rollup.d.ts → block_merge_rollup_private_inputs.d.ts} +17 -10
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/{block_merge_rollup.js → block_merge_rollup_private_inputs.js} +14 -13
- package/dest/rollup/block_rollup_public_inputs.d.ts +124 -0
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -0
- package/dest/rollup/block_rollup_public_inputs.js +85 -0
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +236 -0
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/block_root_rollup_private_inputs.js +257 -0
- package/dest/rollup/checkpoint_constant_data.d.ts +54 -0
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -0
- package/dest/rollup/checkpoint_constant_data.js +55 -0
- package/dest/{tx/proposed_block_header.d.ts → rollup/checkpoint_header.d.ts} +11 -12
- package/dest/rollup/checkpoint_header.d.ts.map +1 -0
- package/dest/{tx/proposed_block_header.js → rollup/checkpoint_header.js} +9 -9
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +30 -0
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.js +37 -0
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +105 -0
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -0
- package/dest/rollup/checkpoint_rollup_public_inputs.js +105 -0
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +123 -0
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +178 -0
- package/dest/rollup/epoch_constant_data.d.ts +19 -2
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/epoch_constant_data.js +20 -7
- package/dest/rollup/index.d.ts +14 -12
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +14 -12
- package/dest/rollup/{private_base_rollup_inputs.d.ts → private_tx_base_rollup_private_inputs.d.ts} +7 -7
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/{private_base_rollup_inputs.js → private_tx_base_rollup_private_inputs.js} +6 -6
- package/dest/rollup/{public_base_rollup_inputs.d.ts → public_tx_base_rollup_private_inputs.d.ts} +7 -7
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/{public_base_rollup_inputs.js → public_tx_base_rollup_private_inputs.js} +6 -6
- package/dest/rollup/root_rollup_private_inputs.d.ts +67 -0
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/root_rollup_private_inputs.js +69 -0
- package/dest/rollup/root_rollup_public_inputs.d.ts +46 -0
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -0
- package/dest/rollup/root_rollup_public_inputs.js +71 -0
- package/dest/rollup/{merge_rollup.d.ts → tx_merge_rollup_private_inputs.d.ts} +11 -10
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -0
- package/dest/rollup/{merge_rollup.js → tx_merge_rollup_private_inputs.js} +14 -13
- package/dest/rollup/{base_or_merge_rollup_public_inputs.d.ts → tx_rollup_public_inputs.d.ts} +12 -12
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -0
- package/dest/rollup/{base_or_merge_rollup_public_inputs.js → tx_rollup_public_inputs.js} +14 -14
- package/dest/stats/stats.d.ts +1 -1
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +28 -68
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +90 -115
- package/dest/tests/mocks.d.ts +3 -2
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +3 -3
- package/dest/tx/block_header.d.ts +12 -13
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +16 -21
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +0 -1
- package/dest/tx/index.d.ts +0 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -1
- package/dest/tx/private_execution_result.d.ts +2 -2
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +3 -3
- package/dest/tx/tx_constant_data.d.ts +4 -4
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_constant_data.js +6 -6
- package/dest/tx/tx_effect.d.ts +0 -3
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +2 -7
- package/package.json +8 -8
- package/src/avm/avm_circuit_public_inputs.ts +10 -0
- package/src/block/body.ts +23 -6
- package/src/block/index.ts +1 -0
- package/src/block/l2_block.ts +18 -8
- package/src/block/l2_block_code_to_purge.ts +30 -31
- package/src/block/l2_block_header.ts +232 -0
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +1 -1
- package/src/block/test/l2_tips_store_test_suite.ts +1 -2
- package/src/interfaces/block-builder.ts +2 -6
- package/src/interfaces/epoch-prover.ts +35 -11
- package/src/interfaces/proving-job.ts +199 -123
- package/src/interfaces/pxe.ts +3 -138
- package/src/interfaces/server_circuit_prover.ts +83 -52
- package/src/interfaces/validator.ts +3 -2
- package/src/kernel/private_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_context_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
- package/src/p2p/consensus_payload.ts +8 -7
- package/src/parity/index.ts +2 -3
- package/src/parity/{base_parity_inputs.ts → parity_base_private_inputs.ts} +6 -6
- package/src/parity/{root_parity_inputs.ts → parity_root_private_inputs.ts} +16 -18
- package/src/proofs/proof_data.ts +5 -8
- package/src/proofs/proving_request_type.ts +14 -8
- package/src/rollup/base_rollup_hints.ts +9 -1
- package/src/rollup/block_constant_data.ts +13 -3
- package/src/rollup/{block_merge_rollup.ts → block_merge_rollup_private_inputs.ts} +15 -11
- package/src/rollup/block_rollup_public_inputs.ts +123 -0
- package/src/rollup/block_root_rollup_private_inputs.ts +312 -0
- package/src/rollup/checkpoint_constant_data.ts +84 -0
- package/src/{tx/proposed_block_header.ts → rollup/checkpoint_header.ts} +16 -17
- package/src/rollup/checkpoint_merge_rollup_private_inputs.ts +49 -0
- package/src/rollup/{block_root_or_block_merge_public_inputs.ts → checkpoint_rollup_public_inputs.ts} +26 -52
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +218 -0
- package/src/rollup/epoch_constant_data.ts +32 -8
- package/src/rollup/index.ts +14 -12
- package/src/rollup/{private_base_rollup_inputs.ts → private_tx_base_rollup_private_inputs.ts} +9 -9
- package/src/rollup/{public_base_rollup_inputs.ts → public_tx_base_rollup_private_inputs.ts} +9 -9
- package/src/rollup/root_rollup_private_inputs.ts +90 -0
- package/src/rollup/{root_rollup.ts → root_rollup_public_inputs.ts} +8 -104
- package/src/rollup/{merge_rollup.ts → tx_merge_rollup_private_inputs.ts} +13 -9
- package/src/rollup/{base_or_merge_rollup_public_inputs.ts → tx_rollup_public_inputs.ts} +12 -12
- package/src/stats/stats.ts +18 -12
- package/src/tests/factories.ts +144 -199
- package/src/tests/mocks.ts +6 -13
- package/src/tx/block_header.ts +17 -32
- package/src/tx/global_variables.ts +0 -1
- package/src/tx/index.ts +0 -1
- package/src/tx/private_execution_result.ts +3 -3
- package/src/tx/tx_constant_data.ts +4 -4
- package/src/tx/tx_effect.ts +2 -7
- package/dest/parity/base_parity_inputs.d.ts.map +0 -1
- package/dest/parity/root_parity_input.d.ts +0 -52
- package/dest/parity/root_parity_input.d.ts.map +0 -1
- package/dest/parity/root_parity_input.js +0 -50
- package/dest/parity/root_parity_inputs.d.ts +0 -37
- package/dest/parity/root_parity_inputs.d.ts.map +0 -1
- package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +0 -1
- package/dest/rollup/block_merge_rollup.d.ts.map +0 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +0 -134
- package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +0 -1
- package/dest/rollup/block_root_or_block_merge_public_inputs.js +0 -125
- package/dest/rollup/block_root_rollup.d.ts +0 -283
- package/dest/rollup/block_root_rollup.d.ts.map +0 -1
- package/dest/rollup/block_root_rollup.js +0 -306
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts +0 -51
- package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +0 -1
- package/dest/rollup/empty_block_root_rollup_inputs.js +0 -65
- package/dest/rollup/merge_rollup.d.ts.map +0 -1
- package/dest/rollup/padding_block_root_rollup_inputs.d.ts +0 -20
- package/dest/rollup/padding_block_root_rollup_inputs.d.ts.map +0 -1
- package/dest/rollup/padding_block_root_rollup_inputs.js +0 -39
- package/dest/rollup/previous_rollup_block_data.d.ts +0 -47
- package/dest/rollup/previous_rollup_block_data.d.ts.map +0 -1
- package/dest/rollup/previous_rollup_block_data.js +0 -37
- package/dest/rollup/previous_rollup_data.d.ts +0 -47
- package/dest/rollup/previous_rollup_data.d.ts.map +0 -1
- package/dest/rollup/previous_rollup_data.js +0 -37
- package/dest/rollup/private_base_rollup_inputs.d.ts.map +0 -1
- package/dest/rollup/public_base_rollup_inputs.d.ts.map +0 -1
- package/dest/rollup/root_rollup.d.ts +0 -106
- package/dest/rollup/root_rollup.d.ts.map +0 -1
- package/dest/rollup/root_rollup.js +0 -147
- package/dest/tx/proposed_block_header.d.ts.map +0 -1
- package/src/parity/root_parity_input.ts +0 -71
- package/src/rollup/block_root_rollup.ts +0 -380
- package/src/rollup/empty_block_root_rollup_inputs.ts +0 -80
- package/src/rollup/padding_block_root_rollup_inputs.ts +0 -47
- package/src/rollup/previous_rollup_block_data.ts +0 -48
- package/src/rollup/previous_rollup_data.ts +0 -48
|
@@ -3,21 +3,24 @@ import { z } from 'zod';
|
|
|
3
3
|
import { AvmCircuitInputs } from '../avm/avm.js';
|
|
4
4
|
import { AvmProvingRequestSchema } from '../avm/avm_proving_request.js';
|
|
5
5
|
import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
|
|
6
|
-
import {
|
|
6
|
+
import { ParityBasePrivateInputs } from '../parity/parity_base_private_inputs.js';
|
|
7
7
|
import { ParityPublicInputs } from '../parity/parity_public_inputs.js';
|
|
8
|
-
import {
|
|
8
|
+
import { ParityRootPrivateInputs } from '../parity/parity_root_private_inputs.js';
|
|
9
9
|
import { ProvingRequestType } from '../proofs/proving_request_type.js';
|
|
10
10
|
import { RecursiveProof } from '../proofs/recursive_proof.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
11
|
+
import { BlockMergeRollupPrivateInputs } from '../rollup/block_merge_rollup_private_inputs.js';
|
|
12
|
+
import { BlockRollupPublicInputs } from '../rollup/block_rollup_public_inputs.js';
|
|
13
|
+
import { BlockRootEmptyTxFirstRollupPrivateInputs, BlockRootFirstRollupPrivateInputs, BlockRootRollupPrivateInputs, BlockRootSingleTxFirstRollupPrivateInputs, BlockRootSingleTxRollupPrivateInputs } from '../rollup/block_root_rollup_private_inputs.js';
|
|
14
|
+
import { CheckpointMergeRollupPrivateInputs } from '../rollup/checkpoint_merge_rollup_private_inputs.js';
|
|
15
|
+
import { CheckpointRollupPublicInputs } from '../rollup/checkpoint_rollup_public_inputs.js';
|
|
16
|
+
import { CheckpointPaddingRollupPrivateInputs, CheckpointRootRollupPrivateInputs, CheckpointRootSingleBlockRollupPrivateInputs } from '../rollup/checkpoint_root_rollup_private_inputs.js';
|
|
17
|
+
import { PublicTubePrivateInputs } from '../rollup/index.js';
|
|
18
|
+
import { PrivateTxBaseRollupPrivateInputs } from '../rollup/private_tx_base_rollup_private_inputs.js';
|
|
19
|
+
import { PublicTxBaseRollupPrivateInputs } from '../rollup/public_tx_base_rollup_private_inputs.js';
|
|
20
|
+
import { RootRollupPrivateInputs } from '../rollup/root_rollup_private_inputs.js';
|
|
21
|
+
import { RootRollupPublicInputs } from '../rollup/root_rollup_public_inputs.js';
|
|
22
|
+
import { TxMergeRollupPrivateInputs } from '../rollup/tx_merge_rollup_private_inputs.js';
|
|
23
|
+
import { TxRollupPublicInputs } from '../rollup/tx_rollup_public_inputs.js';
|
|
21
24
|
import { VerificationKeyData } from '../vks/verification_key.js';
|
|
22
25
|
function schemaForRecursiveProofAndVerificationKey(proofLength) {
|
|
23
26
|
return z.object({
|
|
@@ -45,90 +48,75 @@ export function makePublicInputsAndRecursiveProof(inputs, proof, verificationKey
|
|
|
45
48
|
verificationKey
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
|
-
export function mapProvingRequestTypeToCircuitName(type) {
|
|
49
|
-
switch(type){
|
|
50
|
-
case ProvingRequestType.PUBLIC_VM:
|
|
51
|
-
return 'avm-circuit';
|
|
52
|
-
case ProvingRequestType.PUBLIC_TUBE:
|
|
53
|
-
return 'public-tube';
|
|
54
|
-
case ProvingRequestType.PRIVATE_BASE_ROLLUP:
|
|
55
|
-
return 'private-base-rollup';
|
|
56
|
-
case ProvingRequestType.PUBLIC_BASE_ROLLUP:
|
|
57
|
-
return 'public-base-rollup';
|
|
58
|
-
case ProvingRequestType.MERGE_ROLLUP:
|
|
59
|
-
return 'merge-rollup';
|
|
60
|
-
case ProvingRequestType.EMPTY_BLOCK_ROOT_ROLLUP:
|
|
61
|
-
return 'empty-block-root-rollup';
|
|
62
|
-
case ProvingRequestType.PADDING_BLOCK_ROOT_ROLLUP:
|
|
63
|
-
return 'padding-block-root-rollup';
|
|
64
|
-
case ProvingRequestType.BLOCK_ROOT_ROLLUP:
|
|
65
|
-
return 'block-root-rollup';
|
|
66
|
-
case ProvingRequestType.SINGLE_TX_BLOCK_ROOT_ROLLUP:
|
|
67
|
-
return 'single-tx-block-root-rollup';
|
|
68
|
-
case ProvingRequestType.BLOCK_MERGE_ROLLUP:
|
|
69
|
-
return 'block-merge-rollup';
|
|
70
|
-
case ProvingRequestType.ROOT_ROLLUP:
|
|
71
|
-
return 'root-rollup';
|
|
72
|
-
case ProvingRequestType.BASE_PARITY:
|
|
73
|
-
return 'base-parity';
|
|
74
|
-
case ProvingRequestType.ROOT_PARITY:
|
|
75
|
-
return 'root-parity';
|
|
76
|
-
default:
|
|
77
|
-
{
|
|
78
|
-
const _exhaustive = type;
|
|
79
|
-
throw new Error(`Cannot find circuit name for proving request type: ${type}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
51
|
export const ProvingJobInputs = z.discriminatedUnion('type', [
|
|
84
52
|
AvmProvingRequestSchema,
|
|
85
53
|
z.object({
|
|
86
|
-
type: z.literal(ProvingRequestType.
|
|
87
|
-
inputs:
|
|
54
|
+
type: z.literal(ProvingRequestType.PARITY_BASE),
|
|
55
|
+
inputs: ParityBasePrivateInputs.schema
|
|
88
56
|
}),
|
|
89
57
|
z.object({
|
|
90
|
-
type: z.literal(ProvingRequestType.
|
|
91
|
-
inputs:
|
|
58
|
+
type: z.literal(ProvingRequestType.PARITY_ROOT),
|
|
59
|
+
inputs: ParityRootPrivateInputs.schema
|
|
92
60
|
}),
|
|
93
61
|
z.object({
|
|
94
62
|
type: z.literal(ProvingRequestType.PUBLIC_TUBE),
|
|
95
63
|
inputs: PublicTubePrivateInputs.schema
|
|
96
64
|
}),
|
|
97
65
|
z.object({
|
|
98
|
-
type: z.literal(ProvingRequestType.
|
|
99
|
-
inputs:
|
|
66
|
+
type: z.literal(ProvingRequestType.PRIVATE_TX_BASE_ROLLUP),
|
|
67
|
+
inputs: PrivateTxBaseRollupPrivateInputs.schema
|
|
100
68
|
}),
|
|
101
69
|
z.object({
|
|
102
|
-
type: z.literal(ProvingRequestType.
|
|
103
|
-
inputs:
|
|
70
|
+
type: z.literal(ProvingRequestType.PUBLIC_TX_BASE_ROLLUP),
|
|
71
|
+
inputs: PublicTxBaseRollupPrivateInputs.schema
|
|
104
72
|
}),
|
|
105
73
|
z.object({
|
|
106
|
-
type: z.literal(ProvingRequestType.
|
|
107
|
-
inputs:
|
|
74
|
+
type: z.literal(ProvingRequestType.TX_MERGE_ROLLUP),
|
|
75
|
+
inputs: TxMergeRollupPrivateInputs.schema
|
|
108
76
|
}),
|
|
109
77
|
z.object({
|
|
110
|
-
type: z.literal(ProvingRequestType.
|
|
111
|
-
inputs:
|
|
78
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP),
|
|
79
|
+
inputs: BlockRootFirstRollupPrivateInputs.schema
|
|
112
80
|
}),
|
|
113
81
|
z.object({
|
|
114
|
-
type: z.literal(ProvingRequestType.
|
|
115
|
-
inputs:
|
|
82
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP),
|
|
83
|
+
inputs: BlockRootSingleTxFirstRollupPrivateInputs.schema
|
|
116
84
|
}),
|
|
117
85
|
z.object({
|
|
118
|
-
type: z.literal(ProvingRequestType.
|
|
119
|
-
inputs:
|
|
86
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP),
|
|
87
|
+
inputs: BlockRootEmptyTxFirstRollupPrivateInputs.schema
|
|
120
88
|
}),
|
|
121
89
|
z.object({
|
|
122
|
-
type: z.literal(ProvingRequestType.
|
|
123
|
-
inputs:
|
|
90
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_ROLLUP),
|
|
91
|
+
inputs: BlockRootRollupPrivateInputs.schema
|
|
92
|
+
}),
|
|
93
|
+
z.object({
|
|
94
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP),
|
|
95
|
+
inputs: BlockRootSingleTxRollupPrivateInputs.schema
|
|
124
96
|
}),
|
|
125
97
|
z.object({
|
|
126
98
|
type: z.literal(ProvingRequestType.BLOCK_MERGE_ROLLUP),
|
|
127
|
-
inputs:
|
|
99
|
+
inputs: BlockMergeRollupPrivateInputs.schema
|
|
100
|
+
}),
|
|
101
|
+
z.object({
|
|
102
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_ROOT_ROLLUP),
|
|
103
|
+
inputs: CheckpointRootRollupPrivateInputs.schema
|
|
104
|
+
}),
|
|
105
|
+
z.object({
|
|
106
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP),
|
|
107
|
+
inputs: CheckpointRootSingleBlockRollupPrivateInputs.schema
|
|
108
|
+
}),
|
|
109
|
+
z.object({
|
|
110
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_PADDING_ROLLUP),
|
|
111
|
+
inputs: CheckpointPaddingRollupPrivateInputs.schema
|
|
112
|
+
}),
|
|
113
|
+
z.object({
|
|
114
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_MERGE_ROLLUP),
|
|
115
|
+
inputs: CheckpointMergeRollupPrivateInputs.schema
|
|
128
116
|
}),
|
|
129
117
|
z.object({
|
|
130
118
|
type: z.literal(ProvingRequestType.ROOT_ROLLUP),
|
|
131
|
-
inputs:
|
|
119
|
+
inputs: RootRollupPrivateInputs.schema
|
|
132
120
|
})
|
|
133
121
|
]);
|
|
134
122
|
export function getProvingJobInputClassFor(type) {
|
|
@@ -137,28 +125,38 @@ export function getProvingJobInputClassFor(type) {
|
|
|
137
125
|
return AvmCircuitInputs;
|
|
138
126
|
case ProvingRequestType.PUBLIC_TUBE:
|
|
139
127
|
return PublicTubePrivateInputs;
|
|
140
|
-
case ProvingRequestType.
|
|
141
|
-
return
|
|
142
|
-
case ProvingRequestType.
|
|
143
|
-
return
|
|
144
|
-
case ProvingRequestType.
|
|
145
|
-
return
|
|
146
|
-
case ProvingRequestType.
|
|
147
|
-
return
|
|
148
|
-
case ProvingRequestType.
|
|
149
|
-
return
|
|
128
|
+
case ProvingRequestType.PRIVATE_TX_BASE_ROLLUP:
|
|
129
|
+
return PrivateTxBaseRollupPrivateInputs;
|
|
130
|
+
case ProvingRequestType.PUBLIC_TX_BASE_ROLLUP:
|
|
131
|
+
return PublicTxBaseRollupPrivateInputs;
|
|
132
|
+
case ProvingRequestType.TX_MERGE_ROLLUP:
|
|
133
|
+
return TxMergeRollupPrivateInputs;
|
|
134
|
+
case ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP:
|
|
135
|
+
return BlockRootFirstRollupPrivateInputs;
|
|
136
|
+
case ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP:
|
|
137
|
+
return BlockRootSingleTxFirstRollupPrivateInputs;
|
|
138
|
+
case ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP:
|
|
139
|
+
return BlockRootEmptyTxFirstRollupPrivateInputs;
|
|
150
140
|
case ProvingRequestType.BLOCK_ROOT_ROLLUP:
|
|
151
|
-
return
|
|
152
|
-
case ProvingRequestType.
|
|
153
|
-
return
|
|
141
|
+
return BlockRootRollupPrivateInputs;
|
|
142
|
+
case ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP:
|
|
143
|
+
return BlockRootSingleTxRollupPrivateInputs;
|
|
154
144
|
case ProvingRequestType.BLOCK_MERGE_ROLLUP:
|
|
155
|
-
return
|
|
145
|
+
return BlockMergeRollupPrivateInputs;
|
|
146
|
+
case ProvingRequestType.CHECKPOINT_ROOT_ROLLUP:
|
|
147
|
+
return CheckpointRootRollupPrivateInputs;
|
|
148
|
+
case ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP:
|
|
149
|
+
return CheckpointRootSingleBlockRollupPrivateInputs;
|
|
150
|
+
case ProvingRequestType.CHECKPOINT_PADDING_ROLLUP:
|
|
151
|
+
return CheckpointPaddingRollupPrivateInputs;
|
|
152
|
+
case ProvingRequestType.CHECKPOINT_MERGE_ROLLUP:
|
|
153
|
+
return CheckpointMergeRollupPrivateInputs;
|
|
156
154
|
case ProvingRequestType.ROOT_ROLLUP:
|
|
157
|
-
return
|
|
158
|
-
case ProvingRequestType.
|
|
159
|
-
return
|
|
160
|
-
case ProvingRequestType.
|
|
161
|
-
return
|
|
155
|
+
return RootRollupPrivateInputs;
|
|
156
|
+
case ProvingRequestType.PARITY_BASE:
|
|
157
|
+
return ParityBasePrivateInputs;
|
|
158
|
+
case ProvingRequestType.PARITY_ROOT:
|
|
159
|
+
return ParityRootPrivateInputs;
|
|
162
160
|
default:
|
|
163
161
|
{
|
|
164
162
|
const _exhaustive = type;
|
|
@@ -176,47 +174,67 @@ export const ProvingJobResult = z.discriminatedUnion('type', [
|
|
|
176
174
|
result: schemaForPublicInputsAndRecursiveProof(PrivateToPublicKernelCircuitPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
177
175
|
}),
|
|
178
176
|
z.object({
|
|
179
|
-
type: z.literal(ProvingRequestType.
|
|
180
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
177
|
+
type: z.literal(ProvingRequestType.PRIVATE_TX_BASE_ROLLUP),
|
|
178
|
+
result: schemaForPublicInputsAndRecursiveProof(TxRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
179
|
+
}),
|
|
180
|
+
z.object({
|
|
181
|
+
type: z.literal(ProvingRequestType.PUBLIC_TX_BASE_ROLLUP),
|
|
182
|
+
result: schemaForPublicInputsAndRecursiveProof(TxRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
181
183
|
}),
|
|
182
184
|
z.object({
|
|
183
|
-
type: z.literal(ProvingRequestType.
|
|
184
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
185
|
+
type: z.literal(ProvingRequestType.TX_MERGE_ROLLUP),
|
|
186
|
+
result: schemaForPublicInputsAndRecursiveProof(TxRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
185
187
|
}),
|
|
186
188
|
z.object({
|
|
187
|
-
type: z.literal(ProvingRequestType.
|
|
188
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
189
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_FIRST_ROLLUP),
|
|
190
|
+
result: schemaForPublicInputsAndRecursiveProof(BlockRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
189
191
|
}),
|
|
190
192
|
z.object({
|
|
191
|
-
type: z.literal(ProvingRequestType.
|
|
192
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
193
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_FIRST_ROLLUP),
|
|
194
|
+
result: schemaForPublicInputsAndRecursiveProof(BlockRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
193
195
|
}),
|
|
194
196
|
z.object({
|
|
195
|
-
type: z.literal(ProvingRequestType.
|
|
196
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
197
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_EMPTY_TX_FIRST_ROLLUP),
|
|
198
|
+
result: schemaForPublicInputsAndRecursiveProof(BlockRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
197
199
|
}),
|
|
198
200
|
z.object({
|
|
199
201
|
type: z.literal(ProvingRequestType.BLOCK_ROOT_ROLLUP),
|
|
200
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
202
|
+
result: schemaForPublicInputsAndRecursiveProof(BlockRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
201
203
|
}),
|
|
202
204
|
z.object({
|
|
203
|
-
type: z.literal(ProvingRequestType.
|
|
204
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
205
|
+
type: z.literal(ProvingRequestType.BLOCK_ROOT_SINGLE_TX_ROLLUP),
|
|
206
|
+
result: schemaForPublicInputsAndRecursiveProof(BlockRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
205
207
|
}),
|
|
206
208
|
z.object({
|
|
207
209
|
type: z.literal(ProvingRequestType.BLOCK_MERGE_ROLLUP),
|
|
208
|
-
result: schemaForPublicInputsAndRecursiveProof(
|
|
210
|
+
result: schemaForPublicInputsAndRecursiveProof(BlockRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
211
|
+
}),
|
|
212
|
+
z.object({
|
|
213
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_ROOT_ROLLUP),
|
|
214
|
+
result: schemaForPublicInputsAndRecursiveProof(CheckpointRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
215
|
+
}),
|
|
216
|
+
z.object({
|
|
217
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_ROOT_SINGLE_BLOCK_ROLLUP),
|
|
218
|
+
result: schemaForPublicInputsAndRecursiveProof(CheckpointRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
219
|
+
}),
|
|
220
|
+
z.object({
|
|
221
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_PADDING_ROLLUP),
|
|
222
|
+
result: schemaForPublicInputsAndRecursiveProof(CheckpointRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
223
|
+
}),
|
|
224
|
+
z.object({
|
|
225
|
+
type: z.literal(ProvingRequestType.CHECKPOINT_MERGE_ROLLUP),
|
|
226
|
+
result: schemaForPublicInputsAndRecursiveProof(CheckpointRollupPublicInputs.schema, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH)
|
|
209
227
|
}),
|
|
210
228
|
z.object({
|
|
211
229
|
type: z.literal(ProvingRequestType.ROOT_ROLLUP),
|
|
212
230
|
result: schemaForPublicInputsAndRecursiveProof(RootRollupPublicInputs.schema, NESTED_RECURSIVE_PROOF_LENGTH)
|
|
213
231
|
}),
|
|
214
232
|
z.object({
|
|
215
|
-
type: z.literal(ProvingRequestType.
|
|
233
|
+
type: z.literal(ProvingRequestType.PARITY_BASE),
|
|
216
234
|
result: schemaForPublicInputsAndRecursiveProof(ParityPublicInputs.schema, RECURSIVE_PROOF_LENGTH)
|
|
217
235
|
}),
|
|
218
236
|
z.object({
|
|
219
|
-
type: z.literal(ProvingRequestType.
|
|
237
|
+
type: z.literal(ProvingRequestType.PARITY_ROOT),
|
|
220
238
|
result: schemaForPublicInputsAndRecursiveProof(ParityPublicInputs.schema, NESTED_RECURSIVE_PROOF_LENGTH)
|
|
221
239
|
})
|
|
222
240
|
]);
|
package/dest/interfaces/pxe.d.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
|
|
2
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import type { ApiSchemaFor } from '@aztec/foundation/schemas';
|
|
4
|
-
import {
|
|
2
|
+
import type { ApiSchemaFor, ZodFor } from '@aztec/foundation/schemas';
|
|
3
|
+
import { z } from 'zod';
|
|
5
4
|
import { type AbiType, type ContractArtifact } from '../abi/abi.js';
|
|
6
5
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
7
6
|
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
8
7
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
9
|
-
import { L2Block } from '../block/l2_block.js';
|
|
10
8
|
import { CompleteAddress, type ContractClassWithId, type ContractInstanceWithAddress, type NodeInfo, type PartialAddress, type ProtocolContractAddresses } from '../contract/index.js';
|
|
11
9
|
import { GasFees } from '../gas/gas_fees.js';
|
|
12
|
-
import { type LogFilter } from '../logs/log_filter.js';
|
|
13
10
|
import { UniqueNote } from '../note/extended_note.js';
|
|
14
11
|
import { type NotesFilter } from '../note/notes_filter.js';
|
|
15
|
-
import {
|
|
12
|
+
import { PrivateExecutionResult, SimulationOverrides, Tx, TxExecutionRequest, TxHash, TxReceipt, TxSimulationResult } from '../tx/index.js';
|
|
16
13
|
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
17
14
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
18
|
-
import { type GetContractClassLogsResponse, type GetPublicLogsResponse } from './get_logs_response.js';
|
|
19
15
|
/**
|
|
20
16
|
* Private eXecution Environment (PXE) runs locally for each user, providing functionality for all the operations
|
|
21
17
|
* needed to interact with the Aztec network, including account management, private data management,
|
|
@@ -23,19 +19,6 @@ import { type GetContractClassLogsResponse, type GetPublicLogsResponse } from '.
|
|
|
23
19
|
* is exposed to dapps for interacting with the network on behalf of the user.
|
|
24
20
|
*/
|
|
25
21
|
export interface PXE {
|
|
26
|
-
/**
|
|
27
|
-
* Returns whether an L1 to L2 message is synced by archiver.
|
|
28
|
-
* @param l1ToL2Message - The L1 to L2 message to check.
|
|
29
|
-
* @returns Whether the message is synced and ready to be included in a block.
|
|
30
|
-
* @deprecated Use `waitForL1ToL2MessageReady` and `isL1ToL2MessageReady` instead.
|
|
31
|
-
*/
|
|
32
|
-
isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
|
|
33
|
-
/**
|
|
34
|
-
* Returns the L2 block number in which this L1 to L2 message becomes available, or undefined if not found.
|
|
35
|
-
* @param l1ToL2Message - The L1 to L2 message to check.
|
|
36
|
-
* @returns The L2 block number or undefined if not synced yet.
|
|
37
|
-
*/
|
|
38
|
-
getL1ToL2MessageBlock(l1ToL2Message: Fr): Promise<number | undefined>;
|
|
39
22
|
/**
|
|
40
23
|
* Registers a user account in PXE given its master encryption private key.
|
|
41
24
|
* Once a new account is registered, the PXE Service will trial-decrypt all published notes on
|
|
@@ -163,52 +146,12 @@ export interface PXE {
|
|
|
163
146
|
* @returns A receipt of the transaction.
|
|
164
147
|
*/
|
|
165
148
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
166
|
-
/**
|
|
167
|
-
* Gets a tx effect.
|
|
168
|
-
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
169
|
-
* @returns The requested tx effect with block info (or undefined if not found).
|
|
170
|
-
*/
|
|
171
|
-
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
172
|
-
/**
|
|
173
|
-
* Gets the storage value at the given contract storage slot.
|
|
174
|
-
*
|
|
175
|
-
* @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
|
|
176
|
-
* Aztec's version of `eth_getStorageAt`.
|
|
177
|
-
*
|
|
178
|
-
* @param contract - Address of the contract to query.
|
|
179
|
-
* @param slot - Slot to query.
|
|
180
|
-
* @returns Storage value at the given contract slot.
|
|
181
|
-
* @throws If the contract is not deployed.
|
|
182
|
-
*/
|
|
183
|
-
getPublicStorageAt(contract: AztecAddress, slot: Fr): Promise<Fr>;
|
|
184
149
|
/**
|
|
185
150
|
* Gets notes registered in this PXE based on the provided filter.
|
|
186
151
|
* @param filter - The filter to apply to the notes.
|
|
187
152
|
* @returns The requested notes.
|
|
188
153
|
*/
|
|
189
154
|
getNotes(filter: NotesFilter): Promise<UniqueNote[]>;
|
|
190
|
-
/**
|
|
191
|
-
* Fetches an L1 to L2 message from the node.
|
|
192
|
-
* @param contractAddress - Address of a contract by which the message was emitted.
|
|
193
|
-
* @param messageHash - Hash of the message.
|
|
194
|
-
* @param secret - Secret used to compute a nullifier.
|
|
195
|
-
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
196
|
-
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
197
|
-
*/
|
|
198
|
-
getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]>;
|
|
199
|
-
/**
|
|
200
|
-
* Gets the membership witness for a message that was emitted at a particular block
|
|
201
|
-
* @param blockNumber - The block number in which to search for the message
|
|
202
|
-
* @param l2Tol1Message - The message to search for
|
|
203
|
-
* @returns The membership witness for the message
|
|
204
|
-
*/
|
|
205
|
-
getL2ToL1MembershipWitness(blockNumber: number, l2Tol1Message: Fr): Promise<[bigint, SiblingPath<number>]>;
|
|
206
|
-
/**
|
|
207
|
-
* Get the given block.
|
|
208
|
-
* @param number - The block number being requested.
|
|
209
|
-
* @returns The blocks requested.
|
|
210
|
-
*/
|
|
211
|
-
getBlock(number: number): Promise<L2Block | undefined>;
|
|
212
155
|
/**
|
|
213
156
|
* Method to fetch the current base fees.
|
|
214
157
|
* @returns The current base fees.
|
|
@@ -227,28 +170,6 @@ export interface PXE {
|
|
|
227
170
|
* @returns The result of the utility function call, structured based on the function ABI.
|
|
228
171
|
*/
|
|
229
172
|
simulateUtility(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], from?: AztecAddress, scopes?: AztecAddress[]): Promise<UtilitySimulationResult>;
|
|
230
|
-
/**
|
|
231
|
-
* Gets public logs based on the provided filter.
|
|
232
|
-
* @param filter - The filter to apply to the logs.
|
|
233
|
-
* @returns The requested logs.
|
|
234
|
-
*/
|
|
235
|
-
getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
|
|
236
|
-
/**
|
|
237
|
-
* Gets contract class logs based on the provided filter.
|
|
238
|
-
* @param filter - The filter to apply to the logs.
|
|
239
|
-
* @returns The requested logs.
|
|
240
|
-
*/
|
|
241
|
-
getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
|
|
242
|
-
/**
|
|
243
|
-
* Fetches the current block number.
|
|
244
|
-
* @returns The block number.
|
|
245
|
-
*/
|
|
246
|
-
getBlockNumber(): Promise<number>;
|
|
247
|
-
/**
|
|
248
|
-
* Fetches the current proven block number.
|
|
249
|
-
* @returns The block number.
|
|
250
|
-
*/
|
|
251
|
-
getProvenBlockNumber(): Promise<number>;
|
|
252
173
|
/**
|
|
253
174
|
* Returns the information about the server's node. Includes current Node version, compatible Noir version,
|
|
254
175
|
* L1 chain identifier, rollup version, and L1 address of the rollup contract.
|
|
@@ -296,20 +217,25 @@ export interface PXE {
|
|
|
296
217
|
* @returns - The deserialized events.
|
|
297
218
|
*/
|
|
298
219
|
getPrivateEvents<T>(contractAddress: AztecAddress, eventMetadata: EventMetadataDefinition, from: number, numBlocks: number, recipients: AztecAddress[]): Promise<T[]>;
|
|
299
|
-
/**
|
|
300
|
-
* Returns the public events given search parameters.
|
|
301
|
-
* @param eventMetadata - Metadata of the event. This should be the class generated from the contract. e.g. Contract.events.Event
|
|
302
|
-
* @param from - The block number to search from.
|
|
303
|
-
* @param limit - The amount of blocks to search.
|
|
304
|
-
* @returns - The deserialized events.
|
|
305
|
-
*/
|
|
306
|
-
getPublicEvents<T>(eventMetadata: EventMetadataDefinition, from: number, limit: number): Promise<T[]>;
|
|
307
220
|
}
|
|
308
221
|
export type EventMetadataDefinition = {
|
|
309
222
|
eventSelector: EventSelector;
|
|
310
223
|
abiType: AbiType;
|
|
311
224
|
fieldNames: string[];
|
|
312
225
|
};
|
|
226
|
+
export declare const EventMetadataDefinitionSchema: z.ZodObject<{
|
|
227
|
+
eventSelector: z.ZodType<EventSelector, any, string>;
|
|
228
|
+
abiType: z.ZodType<AbiType, z.ZodTypeDef, AbiType>;
|
|
229
|
+
fieldNames: z.ZodArray<z.ZodString, "many">;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
eventSelector: EventSelector;
|
|
232
|
+
abiType: AbiType;
|
|
233
|
+
fieldNames: string[];
|
|
234
|
+
}, {
|
|
235
|
+
eventSelector: string;
|
|
236
|
+
abiType: AbiType;
|
|
237
|
+
fieldNames: string[];
|
|
238
|
+
}>;
|
|
313
239
|
/** This is used in getting events via the filter */
|
|
314
240
|
export declare enum EventType {
|
|
315
241
|
Encrypted = "Encrypted",
|
|
@@ -332,5 +258,181 @@ export interface ContractClassMetadata {
|
|
|
332
258
|
isContractClassPubliclyRegistered: boolean;
|
|
333
259
|
artifact?: ContractArtifact | undefined;
|
|
334
260
|
}
|
|
261
|
+
export declare const ContractMetadataSchema: z.ZodObject<{
|
|
262
|
+
contractInstance: z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
263
|
+
version: z.ZodLiteral<1>;
|
|
264
|
+
salt: ZodFor<Fr>;
|
|
265
|
+
deployer: ZodFor<AztecAddress>;
|
|
266
|
+
currentContractClassId: ZodFor<Fr>;
|
|
267
|
+
originalContractClassId: ZodFor<Fr>;
|
|
268
|
+
initializationHash: ZodFor<Fr>;
|
|
269
|
+
publicKeys: z.ZodEffects<z.ZodObject<{
|
|
270
|
+
masterNullifierPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
271
|
+
masterIncomingViewingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
272
|
+
masterOutgoingViewingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
273
|
+
masterTaggingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
274
|
+
}, "strip", z.ZodTypeAny, {
|
|
275
|
+
masterNullifierPublicKey: import("@aztec/foundation/fields").Point;
|
|
276
|
+
masterIncomingViewingPublicKey: import("@aztec/foundation/fields").Point;
|
|
277
|
+
masterOutgoingViewingPublicKey: import("@aztec/foundation/fields").Point;
|
|
278
|
+
masterTaggingPublicKey: import("@aztec/foundation/fields").Point;
|
|
279
|
+
}, {
|
|
280
|
+
masterNullifierPublicKey: string;
|
|
281
|
+
masterIncomingViewingPublicKey: string;
|
|
282
|
+
masterOutgoingViewingPublicKey: string;
|
|
283
|
+
masterTaggingPublicKey: string;
|
|
284
|
+
}>, import("../keys/public_keys.js").PublicKeys, {
|
|
285
|
+
masterNullifierPublicKey: string;
|
|
286
|
+
masterIncomingViewingPublicKey: string;
|
|
287
|
+
masterOutgoingViewingPublicKey: string;
|
|
288
|
+
masterTaggingPublicKey: string;
|
|
289
|
+
}>;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
version: 1;
|
|
292
|
+
salt: Fr;
|
|
293
|
+
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
294
|
+
deployer: AztecAddress;
|
|
295
|
+
currentContractClassId: Fr;
|
|
296
|
+
originalContractClassId: Fr;
|
|
297
|
+
initializationHash: Fr;
|
|
298
|
+
}, {
|
|
299
|
+
version: 1;
|
|
300
|
+
publicKeys: {
|
|
301
|
+
masterNullifierPublicKey: string;
|
|
302
|
+
masterIncomingViewingPublicKey: string;
|
|
303
|
+
masterOutgoingViewingPublicKey: string;
|
|
304
|
+
masterTaggingPublicKey: string;
|
|
305
|
+
};
|
|
306
|
+
salt?: any;
|
|
307
|
+
deployer?: any;
|
|
308
|
+
currentContractClassId?: any;
|
|
309
|
+
originalContractClassId?: any;
|
|
310
|
+
initializationHash?: any;
|
|
311
|
+
}>, z.ZodObject<{
|
|
312
|
+
address: ZodFor<AztecAddress>;
|
|
313
|
+
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
address: AztecAddress;
|
|
315
|
+
}, {
|
|
316
|
+
address?: any;
|
|
317
|
+
}>>, z.ZodUndefined]>;
|
|
318
|
+
isContractInitialized: z.ZodBoolean;
|
|
319
|
+
isContractPublished: z.ZodBoolean;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
isContractInitialized: boolean;
|
|
322
|
+
isContractPublished: boolean;
|
|
323
|
+
contractInstance?: ({
|
|
324
|
+
version: 1;
|
|
325
|
+
salt: Fr;
|
|
326
|
+
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
327
|
+
deployer: AztecAddress;
|
|
328
|
+
currentContractClassId: Fr;
|
|
329
|
+
originalContractClassId: Fr;
|
|
330
|
+
initializationHash: Fr;
|
|
331
|
+
} & {
|
|
332
|
+
address: AztecAddress;
|
|
333
|
+
}) | undefined;
|
|
334
|
+
}, {
|
|
335
|
+
isContractInitialized: boolean;
|
|
336
|
+
isContractPublished: boolean;
|
|
337
|
+
contractInstance?: ({
|
|
338
|
+
version: 1;
|
|
339
|
+
publicKeys: {
|
|
340
|
+
masterNullifierPublicKey: string;
|
|
341
|
+
masterIncomingViewingPublicKey: string;
|
|
342
|
+
masterOutgoingViewingPublicKey: string;
|
|
343
|
+
masterTaggingPublicKey: string;
|
|
344
|
+
};
|
|
345
|
+
salt?: any;
|
|
346
|
+
deployer?: any;
|
|
347
|
+
currentContractClassId?: any;
|
|
348
|
+
originalContractClassId?: any;
|
|
349
|
+
initializationHash?: any;
|
|
350
|
+
} & {
|
|
351
|
+
address?: any;
|
|
352
|
+
}) | undefined;
|
|
353
|
+
}>;
|
|
354
|
+
export declare const ContractClassMetadataSchema: z.ZodObject<{
|
|
355
|
+
contractClass: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
356
|
+
version: z.ZodLiteral<1>;
|
|
357
|
+
artifactHash: z.ZodType<Fr, any, string>;
|
|
358
|
+
privateFunctions: z.ZodArray<z.ZodObject<{
|
|
359
|
+
selector: ZodFor<import("../abi/function_selector.js").FunctionSelector>;
|
|
360
|
+
vkHash: z.ZodType<Fr, any, string>;
|
|
361
|
+
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
363
|
+
vkHash: Fr;
|
|
364
|
+
}, {
|
|
365
|
+
vkHash: string;
|
|
366
|
+
selector?: any;
|
|
367
|
+
}>, "many">;
|
|
368
|
+
packedBytecode: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer<ArrayBuffer>, string>, z.ZodEffects<z.ZodObject<{
|
|
369
|
+
type: z.ZodLiteral<"Buffer">;
|
|
370
|
+
data: z.ZodArray<z.ZodNumber, "many">;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
type: "Buffer";
|
|
373
|
+
data: number[];
|
|
374
|
+
}, {
|
|
375
|
+
type: "Buffer";
|
|
376
|
+
data: number[];
|
|
377
|
+
}>, Buffer<ArrayBuffer>, {
|
|
378
|
+
type: "Buffer";
|
|
379
|
+
data: number[];
|
|
380
|
+
}>]>;
|
|
381
|
+
}, {
|
|
382
|
+
id: z.ZodType<Fr, any, string>;
|
|
383
|
+
}>, "strip", z.ZodTypeAny, {
|
|
384
|
+
version: 1;
|
|
385
|
+
id: Fr;
|
|
386
|
+
artifactHash: Fr;
|
|
387
|
+
packedBytecode: Buffer<ArrayBuffer>;
|
|
388
|
+
privateFunctions: {
|
|
389
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
390
|
+
vkHash: Fr;
|
|
391
|
+
}[];
|
|
392
|
+
}, {
|
|
393
|
+
version: 1;
|
|
394
|
+
id: string;
|
|
395
|
+
artifactHash: string;
|
|
396
|
+
packedBytecode: string | {
|
|
397
|
+
type: "Buffer";
|
|
398
|
+
data: number[];
|
|
399
|
+
};
|
|
400
|
+
privateFunctions: {
|
|
401
|
+
vkHash: string;
|
|
402
|
+
selector?: any;
|
|
403
|
+
}[];
|
|
404
|
+
}>, z.ZodUndefined]>;
|
|
405
|
+
isContractClassPubliclyRegistered: z.ZodBoolean;
|
|
406
|
+
artifact: z.ZodUnion<[ZodFor<ContractArtifact>, z.ZodUndefined]>;
|
|
407
|
+
}, "strip", z.ZodTypeAny, {
|
|
408
|
+
isContractClassPubliclyRegistered: boolean;
|
|
409
|
+
artifact?: ContractArtifact | undefined;
|
|
410
|
+
contractClass?: {
|
|
411
|
+
version: 1;
|
|
412
|
+
id: Fr;
|
|
413
|
+
artifactHash: Fr;
|
|
414
|
+
packedBytecode: Buffer<ArrayBuffer>;
|
|
415
|
+
privateFunctions: {
|
|
416
|
+
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
417
|
+
vkHash: Fr;
|
|
418
|
+
}[];
|
|
419
|
+
} | undefined;
|
|
420
|
+
}, {
|
|
421
|
+
isContractClassPubliclyRegistered: boolean;
|
|
422
|
+
artifact?: any;
|
|
423
|
+
contractClass?: {
|
|
424
|
+
version: 1;
|
|
425
|
+
id: string;
|
|
426
|
+
artifactHash: string;
|
|
427
|
+
packedBytecode: string | {
|
|
428
|
+
type: "Buffer";
|
|
429
|
+
data: number[];
|
|
430
|
+
};
|
|
431
|
+
privateFunctions: {
|
|
432
|
+
vkHash: string;
|
|
433
|
+
selector?: any;
|
|
434
|
+
}[];
|
|
435
|
+
} | undefined;
|
|
436
|
+
}>;
|
|
335
437
|
export declare const PXESchema: ApiSchemaFor<PXE>;
|
|
336
438
|
//# sourceMappingURL=pxe.d.ts.map
|