@aztec/stdlib 5.0.0-nightly.20260504 → 5.0.0-nightly.20260512
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/abi/abi.d.ts +18 -1
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +25 -10
- package/dest/abi/contract_artifact.d.ts +1 -1
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +14 -7
- package/dest/avm/avm.d.ts +4 -4
- package/dest/avm/avm_circuit_public_inputs.d.ts +1 -1
- package/dest/avm/avm_proving_request.d.ts +2 -2
- package/dest/aztec-address/index.d.ts +3 -1
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +2 -0
- package/dest/block/block_data.d.ts +1 -290
- package/dest/block/block_data.d.ts.map +1 -1
- package/dest/block/block_data.js +0 -14
- package/dest/block/block_parameter.d.ts +31 -25
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +31 -14
- package/dest/block/in_block.d.ts +4 -4
- package/dest/block/index.d.ts +1 -2
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +0 -1
- package/dest/block/l2_block_info.d.ts +1 -1
- package/dest/block/l2_block_source.d.ts +66 -117
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +29 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +2 -2
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +36 -15
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +3 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +4 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_store_base.js +9 -4
- package/dest/block/test/l2_tips_store_test_suite.js +1 -1
- package/dest/checkpoint/checkpoint_data.d.ts +2 -2
- package/dest/hash/hash.d.ts +1 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +2 -2
- package/dest/interfaces/archiver.d.ts +2 -2
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +8 -27
- package/dest/interfaces/aztec-node.d.ts +7 -5
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +3 -4
- package/dest/interfaces/block_response.d.ts +1 -1
- package/dest/interfaces/chain_tips.d.ts +5 -5
- package/dest/interfaces/checkpoint_parameter.d.ts +5 -5
- package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
- package/dest/interfaces/checkpoint_parameter.js +5 -5
- package/dest/interfaces/checkpoint_response.d.ts +2 -2
- package/dest/interfaces/client.d.ts +2 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/client.js +1 -0
- package/dest/interfaces/get_logs_response.d.ts +1 -1
- package/dest/interfaces/p2p.d.ts +8 -5
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -1
- package/dest/interfaces/proving-job.d.ts +2 -2
- package/dest/interfaces/public_storage_override.d.ts +30 -0
- package/dest/interfaces/public_storage_override.d.ts.map +1 -0
- package/dest/interfaces/public_storage_override.js +7 -0
- package/dest/logs/extended_public_log.d.ts +1 -1
- package/dest/logs/log_id.d.ts +1 -1
- package/dest/logs/tx_scoped_l2_log.d.ts +1 -1
- package/dest/noir/index.d.ts +3 -1
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +12 -3
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +14 -1
- package/dest/p2p/checkpoint_attestation.d.ts +8 -4
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +9 -3
- package/dest/p2p/checkpoint_proposal.d.ts +16 -3
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +17 -2
- package/dest/p2p/consensus_payload.d.ts +6 -1
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +7 -0
- package/dest/tests/mocks.d.ts +2 -5
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +3 -24
- package/dest/tx/global_variables.d.ts +1 -1
- package/dest/tx/in_tx.d.ts +1 -1
- package/dest/tx/indexed_tx_effect.d.ts +1 -1
- package/dest/tx/proven_tx.d.ts +3 -1
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +6 -0
- package/dest/tx/simulated_tx.d.ts +35 -1142
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +12 -10
- package/dest/update-checker/dev_version.d.ts +3 -0
- package/dest/update-checker/dev_version.d.ts.map +1 -0
- package/dest/update-checker/dev_version.js +1 -0
- package/dest/update-checker/index.d.ts +2 -1
- package/dest/update-checker/index.d.ts.map +1 -1
- package/dest/update-checker/index.js +1 -0
- package/dest/update-checker/package_version.d.ts +6 -3
- package/dest/update-checker/package_version.d.ts.map +1 -1
- package/dest/update-checker/package_version.js +8 -19
- package/dest/world-state/genesis_data.d.ts +3 -1
- package/dest/world-state/genesis_data.d.ts.map +1 -1
- package/dest/world-state/genesis_data.js +3 -0
- package/package.json +10 -9
- package/src/abi/abi.ts +47 -14
- package/src/abi/contract_artifact.ts +11 -6
- package/src/aztec-address/index.ts +4 -0
- package/src/block/block_data.ts +0 -17
- package/src/block/block_parameter.ts +47 -12
- package/src/block/index.ts +0 -1
- package/src/block/l2_block_source.ts +73 -127
- package/src/block/l2_block_stream/l2_block_stream.ts +34 -26
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -0
- package/src/block/l2_block_stream/l2_tips_store_base.ts +7 -4
- package/src/block/test/l2_tips_store_test_suite.ts +1 -1
- package/src/hash/hash.ts +2 -2
- package/src/interfaces/archiver.ts +8 -33
- package/src/interfaces/aztec-node.ts +15 -5
- package/src/interfaces/checkpoint_parameter.ts +3 -3
- package/src/interfaces/client.ts +1 -0
- package/src/interfaces/p2p.ts +14 -5
- package/src/interfaces/public_storage_override.ts +26 -0
- package/src/noir/index.ts +2 -0
- package/src/p2p/block_proposal.ts +17 -2
- package/src/p2p/checkpoint_attestation.ts +11 -6
- package/src/p2p/checkpoint_proposal.ts +21 -3
- package/src/p2p/consensus_payload.ts +9 -0
- package/src/tests/mocks.ts +3 -31
- package/src/tx/proven_tx.ts +6 -0
- package/src/tx/simulated_tx.ts +18 -21
- package/src/update-checker/dev_version.ts +2 -0
- package/src/update-checker/index.ts +1 -0
- package/src/update-checker/package_version.ts +10 -23
- package/src/world-state/genesis_data.ts +12 -0
- package/dest/block/checkpointed_l2_block.d.ts +0 -150
- package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
- package/dest/block/checkpointed_l2_block.js +0 -46
- package/src/block/checkpointed_l2_block.ts +0 -70
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { CheckpointNumber, IndexWithinCheckpoint } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { L1PublishedData } from '../checkpoint/published_checkpoint.js';
|
|
4
3
|
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
5
4
|
import { BlockHeader } from '../tx/block_header.js';
|
|
6
5
|
import { BlockHash } from './block_hash.js';
|
|
7
|
-
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
8
6
|
/** L2Block metadata. Equivalent to L2Block but without block body containing tx data. */
|
|
9
7
|
export type BlockData = {
|
|
10
8
|
header: BlockHeader;
|
|
@@ -51,291 +49,4 @@ export declare const BlockDataSchema: z.ZodObject<{
|
|
|
51
49
|
checkpointNumber: string | number | bigint;
|
|
52
50
|
indexWithinCheckpoint: string | number | bigint;
|
|
53
51
|
}>;
|
|
54
|
-
|
|
55
|
-
data: z.ZodObject<{
|
|
56
|
-
header: import("@aztec/foundation/schemas").ZodFor<BlockHeader>;
|
|
57
|
-
archive: z.ZodEffects<z.ZodObject<{
|
|
58
|
-
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
59
|
-
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
root: import("@aztec/foundation/schemas").Fr;
|
|
62
|
-
nextAvailableLeafIndex: number;
|
|
63
|
-
}, {
|
|
64
|
-
root: string;
|
|
65
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
66
|
-
}>, AppendOnlyTreeSnapshot, {
|
|
67
|
-
root: string;
|
|
68
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
69
|
-
}>;
|
|
70
|
-
blockHash: import("@aztec/foundation/schemas").ZodFor<BlockHash>;
|
|
71
|
-
checkpointNumber: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, CheckpointNumber, string | number | bigint>;
|
|
72
|
-
indexWithinCheckpoint: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, IndexWithinCheckpoint, string | number | bigint>;
|
|
73
|
-
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
header: BlockHeader;
|
|
75
|
-
archive: AppendOnlyTreeSnapshot;
|
|
76
|
-
blockHash: BlockHash;
|
|
77
|
-
checkpointNumber: number & {
|
|
78
|
-
_branding: "CheckpointNumber";
|
|
79
|
-
};
|
|
80
|
-
indexWithinCheckpoint: number & {
|
|
81
|
-
_branding: "IndexWithinCheckpoint";
|
|
82
|
-
};
|
|
83
|
-
}, {
|
|
84
|
-
header?: any;
|
|
85
|
-
archive: {
|
|
86
|
-
root: string;
|
|
87
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
88
|
-
};
|
|
89
|
-
blockHash?: any;
|
|
90
|
-
checkpointNumber: string | number | bigint;
|
|
91
|
-
indexWithinCheckpoint: string | number | bigint;
|
|
92
|
-
}>;
|
|
93
|
-
checkpoint: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
94
|
-
checkpointNumber: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, CheckpointNumber, string | number | bigint>;
|
|
95
|
-
header: import("@aztec/foundation/schemas").ZodFor<import("../rollup/checkpoint_header.js").CheckpointHeader>;
|
|
96
|
-
archive: z.ZodEffects<z.ZodObject<{
|
|
97
|
-
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
98
|
-
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
root: import("@aztec/foundation/schemas").Fr;
|
|
101
|
-
nextAvailableLeafIndex: number;
|
|
102
|
-
}, {
|
|
103
|
-
root: string;
|
|
104
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
105
|
-
}>, AppendOnlyTreeSnapshot, {
|
|
106
|
-
root: string;
|
|
107
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
108
|
-
}>;
|
|
109
|
-
checkpointOutHash: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
110
|
-
startBlock: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/branded-types").BlockNumber, string | number | bigint>;
|
|
111
|
-
blockCount: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
112
|
-
feeAssetPriceModifier: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
113
|
-
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
114
|
-
address: z.ZodType<import("@aztec/foundation/eth-address").EthAddress, any, string>;
|
|
115
|
-
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./proposal/committee_attestation.js").Signature, string>;
|
|
116
|
-
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
address: import("@aztec/foundation/eth-address").EthAddress;
|
|
118
|
-
signature: import("./proposal/committee_attestation.js").Signature;
|
|
119
|
-
}, {
|
|
120
|
-
address: string;
|
|
121
|
-
signature: string;
|
|
122
|
-
}>, CommitteeAttestation, {
|
|
123
|
-
address: string;
|
|
124
|
-
signature: string;
|
|
125
|
-
}>, "many">;
|
|
126
|
-
l1: z.ZodEffects<z.ZodObject<{
|
|
127
|
-
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
128
|
-
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
129
|
-
blockHash: z.ZodString;
|
|
130
|
-
}, "strip", z.ZodTypeAny, {
|
|
131
|
-
blockNumber: bigint;
|
|
132
|
-
timestamp: bigint;
|
|
133
|
-
blockHash: string;
|
|
134
|
-
}, {
|
|
135
|
-
blockNumber: string | number | bigint;
|
|
136
|
-
timestamp: string | number | bigint;
|
|
137
|
-
blockHash: string;
|
|
138
|
-
}>, L1PublishedData, {
|
|
139
|
-
blockNumber: string | number | bigint;
|
|
140
|
-
timestamp: string | number | bigint;
|
|
141
|
-
blockHash: string;
|
|
142
|
-
}>;
|
|
143
|
-
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
checkpointNumber: number & {
|
|
145
|
-
_branding: "CheckpointNumber";
|
|
146
|
-
};
|
|
147
|
-
header: import("../rollup/checkpoint_header.js").CheckpointHeader;
|
|
148
|
-
archive: AppendOnlyTreeSnapshot;
|
|
149
|
-
checkpointOutHash: import("@aztec/foundation/schemas").Fr;
|
|
150
|
-
startBlock: number & {
|
|
151
|
-
_branding: "BlockNumber";
|
|
152
|
-
};
|
|
153
|
-
blockCount: number;
|
|
154
|
-
feeAssetPriceModifier: bigint;
|
|
155
|
-
attestations: CommitteeAttestation[];
|
|
156
|
-
l1: L1PublishedData;
|
|
157
|
-
}, {
|
|
158
|
-
checkpointNumber: string | number | bigint;
|
|
159
|
-
header?: any;
|
|
160
|
-
archive: {
|
|
161
|
-
root: string;
|
|
162
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
163
|
-
};
|
|
164
|
-
checkpointOutHash: string;
|
|
165
|
-
startBlock: string | number | bigint;
|
|
166
|
-
blockCount: string | number | bigint;
|
|
167
|
-
feeAssetPriceModifier: string | number | bigint;
|
|
168
|
-
attestations: {
|
|
169
|
-
address: string;
|
|
170
|
-
signature: string;
|
|
171
|
-
}[];
|
|
172
|
-
l1: {
|
|
173
|
-
blockNumber: string | number | bigint;
|
|
174
|
-
timestamp: string | number | bigint;
|
|
175
|
-
blockHash: string;
|
|
176
|
-
};
|
|
177
|
-
}>, import("../checkpoint/checkpoint_data.js").CheckpointData, {
|
|
178
|
-
checkpointNumber: string | number | bigint;
|
|
179
|
-
header?: any;
|
|
180
|
-
archive: {
|
|
181
|
-
root: string;
|
|
182
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
183
|
-
};
|
|
184
|
-
checkpointOutHash: string;
|
|
185
|
-
startBlock: string | number | bigint;
|
|
186
|
-
blockCount: string | number | bigint;
|
|
187
|
-
feeAssetPriceModifier: string | number | bigint;
|
|
188
|
-
attestations: {
|
|
189
|
-
address: string;
|
|
190
|
-
signature: string;
|
|
191
|
-
}[];
|
|
192
|
-
l1: {
|
|
193
|
-
blockNumber: string | number | bigint;
|
|
194
|
-
timestamp: string | number | bigint;
|
|
195
|
-
blockHash: string;
|
|
196
|
-
};
|
|
197
|
-
}>>;
|
|
198
|
-
l1: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
199
|
-
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
200
|
-
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
201
|
-
blockHash: z.ZodString;
|
|
202
|
-
}, "strip", z.ZodTypeAny, {
|
|
203
|
-
blockNumber: bigint;
|
|
204
|
-
timestamp: bigint;
|
|
205
|
-
blockHash: string;
|
|
206
|
-
}, {
|
|
207
|
-
blockNumber: string | number | bigint;
|
|
208
|
-
timestamp: string | number | bigint;
|
|
209
|
-
blockHash: string;
|
|
210
|
-
}>, L1PublishedData, {
|
|
211
|
-
blockNumber: string | number | bigint;
|
|
212
|
-
timestamp: string | number | bigint;
|
|
213
|
-
blockHash: string;
|
|
214
|
-
}>>;
|
|
215
|
-
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
216
|
-
address: z.ZodType<import("@aztec/foundation/eth-address").EthAddress, any, string>;
|
|
217
|
-
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./proposal/committee_attestation.js").Signature, string>;
|
|
218
|
-
}, "strip", z.ZodTypeAny, {
|
|
219
|
-
address: import("@aztec/foundation/eth-address").EthAddress;
|
|
220
|
-
signature: import("./proposal/committee_attestation.js").Signature;
|
|
221
|
-
}, {
|
|
222
|
-
address: string;
|
|
223
|
-
signature: string;
|
|
224
|
-
}>, CommitteeAttestation, {
|
|
225
|
-
address: string;
|
|
226
|
-
signature: string;
|
|
227
|
-
}>, "many">;
|
|
228
|
-
}, "strip", z.ZodTypeAny, {
|
|
229
|
-
data: {
|
|
230
|
-
header: BlockHeader;
|
|
231
|
-
archive: AppendOnlyTreeSnapshot;
|
|
232
|
-
blockHash: BlockHash;
|
|
233
|
-
checkpointNumber: number & {
|
|
234
|
-
_branding: "CheckpointNumber";
|
|
235
|
-
};
|
|
236
|
-
indexWithinCheckpoint: number & {
|
|
237
|
-
_branding: "IndexWithinCheckpoint";
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
checkpoint?: import("../checkpoint/checkpoint_data.js").CheckpointData | undefined;
|
|
241
|
-
l1?: L1PublishedData | undefined;
|
|
242
|
-
attestations: CommitteeAttestation[];
|
|
243
|
-
}, {
|
|
244
|
-
data: {
|
|
245
|
-
header?: any;
|
|
246
|
-
archive: {
|
|
247
|
-
root: string;
|
|
248
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
249
|
-
};
|
|
250
|
-
blockHash?: any;
|
|
251
|
-
checkpointNumber: string | number | bigint;
|
|
252
|
-
indexWithinCheckpoint: string | number | bigint;
|
|
253
|
-
};
|
|
254
|
-
checkpoint?: {
|
|
255
|
-
checkpointNumber: string | number | bigint;
|
|
256
|
-
header?: any;
|
|
257
|
-
archive: {
|
|
258
|
-
root: string;
|
|
259
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
260
|
-
};
|
|
261
|
-
checkpointOutHash: string;
|
|
262
|
-
startBlock: string | number | bigint;
|
|
263
|
-
blockCount: string | number | bigint;
|
|
264
|
-
feeAssetPriceModifier: string | number | bigint;
|
|
265
|
-
attestations: {
|
|
266
|
-
address: string;
|
|
267
|
-
signature: string;
|
|
268
|
-
}[];
|
|
269
|
-
l1: {
|
|
270
|
-
blockNumber: string | number | bigint;
|
|
271
|
-
timestamp: string | number | bigint;
|
|
272
|
-
blockHash: string;
|
|
273
|
-
};
|
|
274
|
-
} | undefined;
|
|
275
|
-
l1?: {
|
|
276
|
-
blockNumber: string | number | bigint;
|
|
277
|
-
timestamp: string | number | bigint;
|
|
278
|
-
blockHash: string;
|
|
279
|
-
} | undefined;
|
|
280
|
-
attestations: {
|
|
281
|
-
address: string;
|
|
282
|
-
signature: string;
|
|
283
|
-
}[];
|
|
284
|
-
}>, {
|
|
285
|
-
data: {
|
|
286
|
-
header: BlockHeader;
|
|
287
|
-
archive: AppendOnlyTreeSnapshot;
|
|
288
|
-
blockHash: BlockHash;
|
|
289
|
-
checkpointNumber: number & {
|
|
290
|
-
_branding: "CheckpointNumber";
|
|
291
|
-
};
|
|
292
|
-
indexWithinCheckpoint: number & {
|
|
293
|
-
_branding: "IndexWithinCheckpoint";
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
checkpoint: import("../checkpoint/checkpoint_data.js").CheckpointData | undefined;
|
|
297
|
-
l1: L1PublishedData | undefined;
|
|
298
|
-
attestations: CommitteeAttestation[];
|
|
299
|
-
}, {
|
|
300
|
-
data: {
|
|
301
|
-
header?: any;
|
|
302
|
-
archive: {
|
|
303
|
-
root: string;
|
|
304
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
305
|
-
};
|
|
306
|
-
blockHash?: any;
|
|
307
|
-
checkpointNumber: string | number | bigint;
|
|
308
|
-
indexWithinCheckpoint: string | number | bigint;
|
|
309
|
-
};
|
|
310
|
-
checkpoint?: {
|
|
311
|
-
checkpointNumber: string | number | bigint;
|
|
312
|
-
header?: any;
|
|
313
|
-
archive: {
|
|
314
|
-
root: string;
|
|
315
|
-
nextAvailableLeafIndex: string | number | bigint;
|
|
316
|
-
};
|
|
317
|
-
checkpointOutHash: string;
|
|
318
|
-
startBlock: string | number | bigint;
|
|
319
|
-
blockCount: string | number | bigint;
|
|
320
|
-
feeAssetPriceModifier: string | number | bigint;
|
|
321
|
-
attestations: {
|
|
322
|
-
address: string;
|
|
323
|
-
signature: string;
|
|
324
|
-
}[];
|
|
325
|
-
l1: {
|
|
326
|
-
blockNumber: string | number | bigint;
|
|
327
|
-
timestamp: string | number | bigint;
|
|
328
|
-
blockHash: string;
|
|
329
|
-
};
|
|
330
|
-
} | undefined;
|
|
331
|
-
l1?: {
|
|
332
|
-
blockNumber: string | number | bigint;
|
|
333
|
-
timestamp: string | number | bigint;
|
|
334
|
-
blockHash: string;
|
|
335
|
-
} | undefined;
|
|
336
|
-
attestations: {
|
|
337
|
-
address: string;
|
|
338
|
-
signature: string;
|
|
339
|
-
}[];
|
|
340
|
-
}>;
|
|
341
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfZGF0YS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Jsb2NrL2Jsb2NrX2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUUvRixPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBR3hCLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUN4RSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUMvRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDcEQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzVDLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBRTNFLHlGQUF5RjtBQUN6RixNQUFNLE1BQU0sU0FBUyxHQUFHO0lBQ3RCLE1BQU0sRUFBRSxXQUFXLENBQUM7SUFDcEIsT0FBTyxFQUFFLHNCQUFzQixDQUFDO0lBQ2hDLFNBQVMsRUFBRSxTQUFTLENBQUM7SUFDckIsZ0JBQWdCLEVBQUUsZ0JBQWdCLENBQUM7SUFDbkMscUJBQXFCLEVBQUUscUJBQXFCLENBQUM7Q0FDOUMsQ0FBQztBQUVGLGVBQU8sTUFBTSxlQUFlOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBTTFCLENBQUM7QUFFSCxlQUFPLE1BQU0sb0NBQW9DOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBWTVDLENBQUMifQ==
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfZGF0YS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Jsb2NrL2Jsb2NrX2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUUvRixPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBRXhCLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNwRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFNUMseUZBQXlGO0FBQ3pGLE1BQU0sTUFBTSxTQUFTLEdBQUc7SUFDdEIsTUFBTSxFQUFFLFdBQVcsQ0FBQztJQUNwQixPQUFPLEVBQUUsc0JBQXNCLENBQUM7SUFDaEMsU0FBUyxFQUFFLFNBQVMsQ0FBQztJQUNyQixnQkFBZ0IsRUFBRSxnQkFBZ0IsQ0FBQztJQUNuQyxxQkFBcUIsRUFBRSxxQkFBcUIsQ0FBQztDQUM5QyxDQUFDO0FBRUYsZUFBTyxNQUFNLGVBQWU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7RUFNMUIsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_data.d.ts","sourceRoot":"","sources":["../../src/block/block_data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"block_data.d.ts","sourceRoot":"","sources":["../../src/block/block_data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,yFAAyF;AACzF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,sBAAsB,CAAC;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,qBAAqB,EAAE,qBAAqB,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM1B,CAAC"}
|
package/dest/block/block_data.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { CheckpointNumberSchema, IndexWithinCheckpointSchema } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { CheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
|
|
4
|
-
import { L1PublishedData } from '../checkpoint/published_checkpoint.js';
|
|
5
3
|
import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
6
4
|
import { BlockHeader } from '../tx/block_header.js';
|
|
7
5
|
import { BlockHash } from './block_hash.js';
|
|
8
|
-
import { CommitteeAttestation } from './proposal/committee_attestation.js';
|
|
9
6
|
export const BlockDataSchema = z.object({
|
|
10
7
|
header: BlockHeader.schema,
|
|
11
8
|
archive: AppendOnlyTreeSnapshot.schema,
|
|
@@ -13,14 +10,3 @@ export const BlockDataSchema = z.object({
|
|
|
13
10
|
checkpointNumber: CheckpointNumberSchema,
|
|
14
11
|
indexWithinCheckpoint: IndexWithinCheckpointSchema
|
|
15
12
|
});
|
|
16
|
-
export const BlockDataWithCheckpointContextSchema = z.object({
|
|
17
|
-
data: BlockDataSchema,
|
|
18
|
-
checkpoint: CheckpointDataSchema.optional(),
|
|
19
|
-
l1: L1PublishedData.schema.optional(),
|
|
20
|
-
attestations: z.array(CommitteeAttestation.schema)
|
|
21
|
-
}).transform((obj)=>({
|
|
22
|
-
data: obj.data,
|
|
23
|
-
checkpoint: obj.checkpoint,
|
|
24
|
-
l1: obj.l1,
|
|
25
|
-
attestations: obj.attestations
|
|
26
|
-
}));
|
|
@@ -1,33 +1,39 @@
|
|
|
1
|
+
import { type BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import { BlockHash } from './block_hash.js';
|
|
5
|
+
export declare const BlockTag: readonly ["latest", "proposed", "checkpointed", "proven", "finalized"];
|
|
6
|
+
/**
|
|
7
|
+
* Tag identifying a block by its position in the chain rather than by an absolute identifier.
|
|
8
|
+
* - `latest` / `proposed`: Latest L2 block proposed (not necessarily checkpointed/proven yet).
|
|
9
|
+
* - `checkpointed`: Latest L2 block whose enclosing checkpoint has been published on L1.
|
|
10
|
+
* - `proven`: Latest L2 block whose enclosing checkpoint has been proven on L1.
|
|
11
|
+
* - `finalized`: Latest L2 block whose proving L1 transaction has reached L1 finality.
|
|
12
|
+
*/
|
|
13
|
+
export type BlockTag = (typeof BlockTag)[number];
|
|
14
|
+
export declare const BlockTagWithoutLatestSchema: z.ZodUnion<[z.ZodLiteral<"proposed">, z.ZodLiteral<"checkpointed">, z.ZodLiteral<"proven">, z.ZodLiteral<"finalized">]>;
|
|
15
|
+
export declare const BlockTagSchema: z.ZodType<BlockTag>;
|
|
16
|
+
/**
|
|
17
|
+
* Object-only form of {@link BlockParameter}. Used as the building block for {@link BlockQuery}.
|
|
18
|
+
*/
|
|
19
|
+
export type NormalizedBlockParameter = {
|
|
20
|
+
number: BlockNumber;
|
|
21
|
+
} | {
|
|
22
|
+
hash: BlockHash;
|
|
23
|
+
} | {
|
|
24
|
+
archive: Fr;
|
|
25
|
+
} | {
|
|
26
|
+
tag: Exclude<BlockTag, 'latest'>;
|
|
27
|
+
};
|
|
28
|
+
export declare const NormalizedBlockParameterSchema: z.ZodType<NormalizedBlockParameter, z.ZodTypeDef, unknown>;
|
|
3
29
|
/**
|
|
4
30
|
* Selector for a block in RPC calls.
|
|
5
31
|
*
|
|
6
32
|
* Accepts a block number, a {@link BlockHash}, a chain-tip name (e.g. `'proven'`, `'checkpointed'`),
|
|
7
|
-
* `'latest'` (alias for `'proposed'`), or
|
|
8
|
-
*
|
|
33
|
+
* `'latest'` (alias for `'proposed'`), or any of the {@link NormalizedBlockParameter} object variants
|
|
34
|
+
* (`{ number }`, `{ hash }`, `{ archive }`, `{ tag }`).
|
|
9
35
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
number: number & {
|
|
14
|
-
_branding: "BlockNumber";
|
|
15
|
-
};
|
|
16
|
-
}, {
|
|
17
|
-
number: string | number | bigint;
|
|
18
|
-
}>, z.ZodObject<{
|
|
19
|
-
hash: import("@aztec/foundation/schemas").ZodFor<BlockHash>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
hash: BlockHash;
|
|
22
|
-
}, {
|
|
23
|
-
hash?: any;
|
|
24
|
-
}>, z.ZodObject<{
|
|
25
|
-
archive: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
archive: import("@aztec/foundation/schemas").Fr;
|
|
28
|
-
}, {
|
|
29
|
-
archive: string;
|
|
30
|
-
}>]>;
|
|
31
|
-
export type BlockParameter = z.infer<typeof BlockParameterSchema>;
|
|
36
|
+
export type BlockParameter = NormalizedBlockParameter | BlockNumber | BlockHash | BlockTag;
|
|
37
|
+
export declare const BlockParameterSchema: z.ZodType<BlockParameter, z.ZodTypeDef, unknown>;
|
|
32
38
|
export declare function inspectBlockParameter(param: BlockParameter): string;
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2tfcGFyYW1ldGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYmxvY2svYmxvY2tfcGFyYW1ldGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLFdBQVcsRUFBcUIsTUFBTSxpQ0FBaUMsQ0FBQztBQUN0RixPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUl6RCxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBRXhCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUU1QyxlQUFPLE1BQU0sUUFBUSx3RUFBeUUsQ0FBQztBQUUvRjs7Ozs7O0dBTUc7QUFDSCxNQUFNLE1BQU0sUUFBUSxHQUFHLENBQUMsT0FBTyxRQUFRLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUVqRCxlQUFPLE1BQU0sMkJBQTJCLHlIQUt0QyxDQUFDO0FBRUgsZUFBTyxNQUFNLGNBQWMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBK0QsQ0FBQztBQUUvRzs7R0FFRztBQUNILE1BQU0sTUFBTSx3QkFBd0IsR0FDaEM7SUFBRSxNQUFNLEVBQUUsV0FBVyxDQUFBO0NBQUUsR0FDdkI7SUFBRSxJQUFJLEVBQUUsU0FBUyxDQUFBO0NBQUUsR0FDbkI7SUFBRSxPQUFPLEVBQUUsRUFBRSxDQUFBO0NBQUUsR0FDZjtJQUFFLEdBQUcsRUFBRSxPQUFPLENBQUMsUUFBUSxFQUFFLFFBQVEsQ0FBQyxDQUFBO0NBQUUsQ0FBQztBQUV6QyxlQUFPLE1BQU0sOEJBQThCLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyx3QkFBd0IsRUFBRSxDQUFDLENBQUMsVUFBVSxFQUFFLE9BQU8sQ0FLcEcsQ0FBQztBQUVIOzs7Ozs7R0FNRztBQUNILE1BQU0sTUFBTSxjQUFjLEdBQUcsd0JBQXdCLEdBQUcsV0FBVyxHQUFHLFNBQVMsR0FBRyxRQUFRLENBQUM7QUFFM0YsZUFBTyxNQUFNLG9CQUFvQixFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsY0FBYyxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUUsT0FBTyxDQUtoRixDQUFDO0FBRUgsd0JBQWdCLHFCQUFxQixDQUFDLEtBQUssRUFBRSxjQUFjLFVBZ0IxRCJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_parameter.d.ts","sourceRoot":"","sources":["../../src/block/block_parameter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_parameter.d.ts","sourceRoot":"","sources":["../../src/block/block_parameter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,iCAAiC,CAAC;AACtF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,QAAQ,wEAAyE,CAAC;AAE/F;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,eAAO,MAAM,2BAA2B,yHAKtC,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAA+D,CAAC;AAE/G;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,OAAO,EAAE,EAAE,CAAA;CAAE,GACf;IAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;CAAE,CAAC;AAEzC,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAKpG,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3F,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAKhF,CAAC;AAEH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,UAgB1D"}
|
|
@@ -2,28 +2,43 @@ import { BlockNumberSchema } from '@aztec/foundation/branded-types';
|
|
|
2
2
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
3
3
|
import { schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { ChainTipSchema } from '../interfaces/chain_tips.js';
|
|
6
5
|
import { BlockHash } from './block_hash.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
export const BlockTag = [
|
|
7
|
+
'latest',
|
|
8
|
+
'proposed',
|
|
9
|
+
'checkpointed',
|
|
10
|
+
'proven',
|
|
11
|
+
'finalized'
|
|
12
|
+
];
|
|
13
|
+
export const BlockTagWithoutLatestSchema = z.union([
|
|
14
|
+
z.literal('proposed'),
|
|
15
|
+
z.literal('checkpointed'),
|
|
16
|
+
z.literal('proven'),
|
|
17
|
+
z.literal('finalized')
|
|
18
|
+
]);
|
|
19
|
+
export const BlockTagSchema = z.union([
|
|
17
20
|
z.literal('latest'),
|
|
21
|
+
BlockTagWithoutLatestSchema
|
|
22
|
+
]);
|
|
23
|
+
export const NormalizedBlockParameterSchema = z.union([
|
|
18
24
|
z.object({
|
|
19
25
|
number: BlockNumberSchema
|
|
20
|
-
}),
|
|
26
|
+
}).strict(),
|
|
21
27
|
z.object({
|
|
22
28
|
hash: BlockHash.schema
|
|
23
|
-
}),
|
|
29
|
+
}).strict(),
|
|
24
30
|
z.object({
|
|
25
31
|
archive: schemas.Fr
|
|
26
|
-
})
|
|
32
|
+
}).strict(),
|
|
33
|
+
z.object({
|
|
34
|
+
tag: BlockTagWithoutLatestSchema
|
|
35
|
+
}).strict()
|
|
36
|
+
]);
|
|
37
|
+
export const BlockParameterSchema = z.union([
|
|
38
|
+
NormalizedBlockParameterSchema,
|
|
39
|
+
BlockHash.schema,
|
|
40
|
+
BlockTagSchema,
|
|
41
|
+
BlockNumberSchema
|
|
27
42
|
]);
|
|
28
43
|
export function inspectBlockParameter(param) {
|
|
29
44
|
if (typeof param === 'number') {
|
|
@@ -36,6 +51,8 @@ export function inspectBlockParameter(param) {
|
|
|
36
51
|
return `hash=${param.hash.toString()}`;
|
|
37
52
|
} else if ('archive' in param) {
|
|
38
53
|
return `archive=${param.archive.toString()}`;
|
|
54
|
+
} else if ('tag' in param) {
|
|
55
|
+
return `tag=${param.tag}`;
|
|
39
56
|
} else {
|
|
40
57
|
return jsonStringify(param);
|
|
41
58
|
}
|
package/dest/block/in_block.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare function randomInBlock(): InBlock;
|
|
|
13
13
|
export declare function randomDataInBlock<T>(data: T): DataInBlock<T>;
|
|
14
14
|
export declare function wrapDataInBlock<T>(data: T, block: L2Block): Promise<DataInBlock<T>>;
|
|
15
15
|
export declare function inBlockSchema(): z.ZodObject<{
|
|
16
|
-
l2BlockNumber: z.ZodEffects<z.
|
|
16
|
+
l2BlockNumber: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodBigInt, number, bigint>, z.ZodEffects<z.ZodString, number, string>]>, BlockNumber, string | number | bigint>;
|
|
17
17
|
l2BlockHash: import("@aztec/foundation/schemas").ZodFor<BlockHash>;
|
|
18
18
|
}, "strip", ZodTypeAny, {
|
|
19
19
|
l2BlockNumber: number & {
|
|
@@ -25,17 +25,17 @@ export declare function inBlockSchema(): z.ZodObject<{
|
|
|
25
25
|
l2BlockHash?: any;
|
|
26
26
|
}>;
|
|
27
27
|
export declare function dataInBlockSchemaFor<T extends ZodTypeAny>(schema: T): z.ZodObject<{
|
|
28
|
-
l2BlockNumber: z.ZodEffects<z.
|
|
28
|
+
l2BlockNumber: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodBigInt, number, bigint>, z.ZodEffects<z.ZodString, number, string>]>, BlockNumber, string | number | bigint>;
|
|
29
29
|
l2BlockHash: import("@aztec/foundation/schemas").ZodFor<BlockHash>;
|
|
30
30
|
} & {
|
|
31
31
|
data: T;
|
|
32
32
|
}, "strip", ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
33
|
-
l2BlockNumber: z.ZodEffects<z.
|
|
33
|
+
l2BlockNumber: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodBigInt, number, bigint>, z.ZodEffects<z.ZodString, number, string>]>, BlockNumber, string | number | bigint>;
|
|
34
34
|
l2BlockHash: import("@aztec/foundation/schemas").ZodFor<BlockHash>;
|
|
35
35
|
} & {
|
|
36
36
|
data: T;
|
|
37
37
|
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
38
|
-
l2BlockNumber: z.ZodEffects<z.
|
|
38
|
+
l2BlockNumber: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodBigInt, number, bigint>, z.ZodEffects<z.ZodString, number, string>]>, BlockNumber, string | number | bigint>;
|
|
39
39
|
l2BlockHash: import("@aztec/foundation/schemas").ZodFor<BlockHash>;
|
|
40
40
|
} & {
|
|
41
41
|
data: T;
|
package/dest/block/index.d.ts
CHANGED
|
@@ -6,9 +6,8 @@ export * from './body.js';
|
|
|
6
6
|
export * from './block_parameter.js';
|
|
7
7
|
export * from './l2_block_source.js';
|
|
8
8
|
export * from './block_hash.js';
|
|
9
|
-
export * from './checkpointed_l2_block.js';
|
|
10
9
|
export * from './proposal/index.js';
|
|
11
10
|
export * from './validate_block_result.js';
|
|
12
11
|
export * from './l2_block_info.js';
|
|
13
12
|
export * from './attestation_info.js';
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ibG9jay9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyx1QkFBdUIsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/block/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/block/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
package/dest/block/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export * from './body.js';
|
|
|
6
6
|
export * from './block_parameter.js';
|
|
7
7
|
export * from './l2_block_source.js';
|
|
8
8
|
export * from './block_hash.js';
|
|
9
|
-
export * from './checkpointed_l2_block.js';
|
|
10
9
|
export * from './proposal/index.js';
|
|
11
10
|
export * from './validate_block_result.js';
|
|
12
11
|
export * from './l2_block_info.js';
|
|
@@ -17,7 +17,7 @@ export declare const BlockInfoSchema: z.ZodObject<{
|
|
|
17
17
|
blockHash: z.ZodOptional<import("@aztec/foundation/schemas").ZodFor<BlockHash>>;
|
|
18
18
|
archive: z.ZodType<Fr, any, string>;
|
|
19
19
|
lastArchive: z.ZodType<Fr, any, string>;
|
|
20
|
-
blockNumber: z.ZodEffects<z.
|
|
20
|
+
blockNumber: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodBigInt, number, bigint>, z.ZodEffects<z.ZodString, number, string>]>, BlockNumber, string | number | bigint>;
|
|
21
21
|
slotNumber: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, SlotNumber, string | number | bigint>;
|
|
22
22
|
txCount: z.ZodNumber;
|
|
23
23
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|