@aztec/stdlib 3.0.0-nightly.20251110 → 3.0.0-nightly.20251112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dest/abi/abi.d.ts +3 -18
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/avm/avm.d.ts +1088 -909
  4. package/dest/avm/avm.d.ts.map +1 -1
  5. package/dest/avm/avm.js +26 -49
  6. package/dest/avm/avm_accumulated_data.d.ts +6 -6
  7. package/dest/avm/avm_circuit_public_inputs.d.ts +27 -27
  8. package/dest/avm/avm_proving_request.d.ts +473 -350
  9. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  10. package/dest/avm/public_data_write.d.ts +2 -2
  11. package/dest/aztec-address/index.d.ts.map +1 -1
  12. package/dest/aztec-address/index.js +8 -2
  13. package/dest/block/l2_block.d.ts +1 -1
  14. package/dest/block/l2_block_info.d.ts +3 -3
  15. package/dest/block/proposal/attestations_and_signers.d.ts +1 -1
  16. package/dest/block/proposal/committee_attestation.d.ts +1 -1
  17. package/dest/block/published_l2_block.d.ts +2 -2
  18. package/dest/block/validate_block_result.d.ts +12 -12
  19. package/dest/contract/contract_deployment_data.d.ts +2 -2
  20. package/dest/contract/interfaces/contract_class.d.ts +38 -119
  21. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  22. package/dest/contract/interfaces/contract_instance.d.ts +200 -32
  23. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  24. package/dest/database-version/version_manager.d.ts +1 -1
  25. package/dest/file-store/http.d.ts.map +1 -1
  26. package/dest/file-store/http.js +8 -3
  27. package/dest/file-store/s3.d.ts.map +1 -1
  28. package/dest/file-store/s3.js +3 -7
  29. package/dest/interfaces/aztec-node-admin.d.ts +5 -5
  30. package/dest/interfaces/proving-job.d.ts +479 -356
  31. package/dest/interfaces/proving-job.d.ts.map +1 -1
  32. package/dest/interfaces/slasher.d.ts +3 -3
  33. package/dest/interfaces/validator.d.ts +4 -4
  34. package/dest/kernel/private_kernel_prover_output.d.ts +6 -6
  35. package/dest/kernel/private_to_avm_accumulated_data.d.ts +4 -4
  36. package/dest/kernel/public_call_request.d.ts +1 -1
  37. package/dest/keys/public_keys.d.ts +84 -12
  38. package/dest/keys/public_keys.d.ts.map +1 -1
  39. package/dest/logs/contract_class_log.d.ts +2 -2
  40. package/dest/logs/directional_app_tagging_secret.d.ts +1 -1
  41. package/dest/logs/pre_tag.d.ts +1 -1
  42. package/dest/logs/private_log.d.ts +1 -1
  43. package/dest/logs/tx_scoped_l2_log.d.ts +1 -1
  44. package/dest/messaging/l2_to_l1_message.d.ts +8 -8
  45. package/dest/note/note.d.ts +1 -16
  46. package/dest/note/note.d.ts.map +1 -1
  47. package/dest/p2p/consensus_payload.d.ts +5 -5
  48. package/dest/p2p/gossipable.d.ts +1 -1
  49. package/dest/p2p/gossipable.d.ts.map +1 -1
  50. package/dest/p2p/gossipable.js +1 -1
  51. package/dest/proofs/recursive_proof.d.ts +1 -16
  52. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  53. package/dest/schemas/schemas.d.ts +2 -13
  54. package/dest/schemas/schemas.d.ts.map +1 -1
  55. package/dest/schemas/schemas.js +2 -0
  56. package/dest/snapshots/types.d.ts +2 -2
  57. package/dest/tests/factories.d.ts +4 -1
  58. package/dest/tests/factories.d.ts.map +1 -1
  59. package/dest/tests/factories.js +14 -2
  60. package/dest/trees/append_only_tree_snapshot.d.ts +1 -1
  61. package/dest/trees/nullifier_leaf.d.ts +4 -4
  62. package/dest/trees/nullifier_membership_witness.d.ts +5 -29
  63. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  64. package/dest/trees/public_data_leaf.d.ts +7 -7
  65. package/dest/trees/public_data_witness.d.ts +6 -30
  66. package/dest/trees/public_data_witness.d.ts.map +1 -1
  67. package/dest/tx/content_commitment.d.ts +3 -3
  68. package/dest/tx/partial_state_reference.d.ts +3 -3
  69. package/dest/tx/private_execution_result.d.ts +3 -24
  70. package/dest/tx/private_execution_result.d.ts.map +1 -1
  71. package/dest/tx/simulated_tx.d.ts +148 -28
  72. package/dest/tx/simulated_tx.d.ts.map +1 -1
  73. package/dest/tx/state_reference.d.ts +4 -4
  74. package/dest/tx/tree_snapshots.d.ts +4 -4
  75. package/dest/tx/tx.d.ts.map +1 -1
  76. package/dest/tx/tx.js +2 -2
  77. package/dest/tx/tx_context.d.ts +2 -2
  78. package/dest/validators/schemas.d.ts +3 -3
  79. package/package.json +8 -8
  80. package/src/avm/avm.ts +23 -40
  81. package/src/aztec-address/index.ts +8 -2
  82. package/src/file-store/http.ts +6 -3
  83. package/src/file-store/s3.ts +3 -7
  84. package/src/p2p/gossipable.ts +1 -1
  85. package/src/schemas/schemas.ts +3 -0
  86. package/src/tests/factories.ts +45 -0
  87. package/src/tx/tx.ts +2 -3
@@ -26,25 +26,97 @@ export declare class SimulationOverrides {
26
26
  originalContractClassId: ZodFor<import("@aztec/foundation/schemas").Fr>;
27
27
  initializationHash: ZodFor<import("@aztec/foundation/schemas").Fr>;
28
28
  publicKeys: z.ZodEffects<z.ZodObject<{
29
- masterNullifierPublicKey: z.ZodType<import("@aztec/foundation/schemas").Point, any, string>;
30
- masterIncomingViewingPublicKey: z.ZodType<import("@aztec/foundation/schemas").Point, any, string>;
31
- masterOutgoingViewingPublicKey: z.ZodType<import("@aztec/foundation/schemas").Point, any, string>;
32
- masterTaggingPublicKey: z.ZodType<import("@aztec/foundation/schemas").Point, any, string>;
29
+ masterNullifierPublicKey: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Point, any, string>, z.ZodEffects<z.ZodObject<{
30
+ x: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
31
+ y: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ x: import("@aztec/foundation/schemas").Fr;
34
+ y: import("@aztec/foundation/schemas").Fr;
35
+ }, {
36
+ x: string;
37
+ y: string;
38
+ }>, import("@aztec/foundation/schemas").Point, {
39
+ x: string;
40
+ y: string;
41
+ }>]>;
42
+ masterIncomingViewingPublicKey: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Point, any, string>, z.ZodEffects<z.ZodObject<{
43
+ x: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
44
+ y: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ x: import("@aztec/foundation/schemas").Fr;
47
+ y: import("@aztec/foundation/schemas").Fr;
48
+ }, {
49
+ x: string;
50
+ y: string;
51
+ }>, import("@aztec/foundation/schemas").Point, {
52
+ x: string;
53
+ y: string;
54
+ }>]>;
55
+ masterOutgoingViewingPublicKey: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Point, any, string>, z.ZodEffects<z.ZodObject<{
56
+ x: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
57
+ y: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ x: import("@aztec/foundation/schemas").Fr;
60
+ y: import("@aztec/foundation/schemas").Fr;
61
+ }, {
62
+ x: string;
63
+ y: string;
64
+ }>, import("@aztec/foundation/schemas").Point, {
65
+ x: string;
66
+ y: string;
67
+ }>]>;
68
+ masterTaggingPublicKey: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Point, any, string>, z.ZodEffects<z.ZodObject<{
69
+ x: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
70
+ y: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ x: import("@aztec/foundation/schemas").Fr;
73
+ y: import("@aztec/foundation/schemas").Fr;
74
+ }, {
75
+ x: string;
76
+ y: string;
77
+ }>, import("@aztec/foundation/schemas").Point, {
78
+ x: string;
79
+ y: string;
80
+ }>]>;
33
81
  }, "strip", z.ZodTypeAny, {
34
82
  masterNullifierPublicKey: import("@aztec/foundation/schemas").Point;
35
83
  masterIncomingViewingPublicKey: import("@aztec/foundation/schemas").Point;
36
84
  masterOutgoingViewingPublicKey: import("@aztec/foundation/schemas").Point;
37
85
  masterTaggingPublicKey: import("@aztec/foundation/schemas").Point;
38
86
  }, {
39
- masterNullifierPublicKey: string;
40
- masterIncomingViewingPublicKey: string;
41
- masterOutgoingViewingPublicKey: string;
42
- masterTaggingPublicKey: string;
87
+ masterNullifierPublicKey: string | {
88
+ x: string;
89
+ y: string;
90
+ };
91
+ masterIncomingViewingPublicKey: string | {
92
+ x: string;
93
+ y: string;
94
+ };
95
+ masterOutgoingViewingPublicKey: string | {
96
+ x: string;
97
+ y: string;
98
+ };
99
+ masterTaggingPublicKey: string | {
100
+ x: string;
101
+ y: string;
102
+ };
43
103
  }>, import("../keys/public_keys.js").PublicKeys, {
44
- masterNullifierPublicKey: string;
45
- masterIncomingViewingPublicKey: string;
46
- masterOutgoingViewingPublicKey: string;
47
- masterTaggingPublicKey: string;
104
+ masterNullifierPublicKey: string | {
105
+ x: string;
106
+ y: string;
107
+ };
108
+ masterIncomingViewingPublicKey: string | {
109
+ x: string;
110
+ y: string;
111
+ };
112
+ masterOutgoingViewingPublicKey: string | {
113
+ x: string;
114
+ y: string;
115
+ };
116
+ masterTaggingPublicKey: string | {
117
+ x: string;
118
+ y: string;
119
+ };
48
120
  }>;
49
121
  }, "strip", z.ZodTypeAny, {
50
122
  version: 1;
@@ -57,10 +129,22 @@ export declare class SimulationOverrides {
57
129
  }, {
58
130
  version: 1;
59
131
  publicKeys: {
60
- masterNullifierPublicKey: string;
61
- masterIncomingViewingPublicKey: string;
62
- masterOutgoingViewingPublicKey: string;
63
- masterTaggingPublicKey: string;
132
+ masterNullifierPublicKey: string | {
133
+ x: string;
134
+ y: string;
135
+ };
136
+ masterIncomingViewingPublicKey: string | {
137
+ x: string;
138
+ y: string;
139
+ };
140
+ masterOutgoingViewingPublicKey: string | {
141
+ x: string;
142
+ y: string;
143
+ };
144
+ masterTaggingPublicKey: string | {
145
+ x: string;
146
+ y: string;
147
+ };
64
148
  };
65
149
  salt?: any;
66
150
  deployer?: any;
@@ -92,10 +176,22 @@ export declare class SimulationOverrides {
92
176
  instance: {
93
177
  version: 1;
94
178
  publicKeys: {
95
- masterNullifierPublicKey: string;
96
- masterIncomingViewingPublicKey: string;
97
- masterOutgoingViewingPublicKey: string;
98
- masterTaggingPublicKey: string;
179
+ masterNullifierPublicKey: string | {
180
+ x: string;
181
+ y: string;
182
+ };
183
+ masterIncomingViewingPublicKey: string | {
184
+ x: string;
185
+ y: string;
186
+ };
187
+ masterOutgoingViewingPublicKey: string | {
188
+ x: string;
189
+ y: string;
190
+ };
191
+ masterTaggingPublicKey: string | {
192
+ x: string;
193
+ y: string;
194
+ };
99
195
  };
100
196
  salt?: any;
101
197
  deployer?: any;
@@ -127,10 +223,22 @@ export declare class SimulationOverrides {
127
223
  instance: {
128
224
  version: 1;
129
225
  publicKeys: {
130
- masterNullifierPublicKey: string;
131
- masterIncomingViewingPublicKey: string;
132
- masterOutgoingViewingPublicKey: string;
133
- masterTaggingPublicKey: string;
226
+ masterNullifierPublicKey: string | {
227
+ x: string;
228
+ y: string;
229
+ };
230
+ masterIncomingViewingPublicKey: string | {
231
+ x: string;
232
+ y: string;
233
+ };
234
+ masterOutgoingViewingPublicKey: string | {
235
+ x: string;
236
+ y: string;
237
+ };
238
+ masterTaggingPublicKey: string | {
239
+ x: string;
240
+ y: string;
241
+ };
134
242
  };
135
243
  salt?: any;
136
244
  deployer?: any;
@@ -147,10 +255,22 @@ export declare class SimulationOverrides {
147
255
  instance: {
148
256
  version: 1;
149
257
  publicKeys: {
150
- masterNullifierPublicKey: string;
151
- masterIncomingViewingPublicKey: string;
152
- masterOutgoingViewingPublicKey: string;
153
- masterTaggingPublicKey: string;
258
+ masterNullifierPublicKey: string | {
259
+ x: string;
260
+ y: string;
261
+ };
262
+ masterIncomingViewingPublicKey: string | {
263
+ x: string;
264
+ y: string;
265
+ };
266
+ masterOutgoingViewingPublicKey: string | {
267
+ x: string;
268
+ y: string;
269
+ };
270
+ masterTaggingPublicKey: string | {
271
+ x: string;
272
+ y: string;
273
+ };
154
274
  };
155
275
  salt?: any;
156
276
  deployer?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"simulated_tx.d.ts","sourceRoot":"","sources":["../../src/tx/simulated_tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,eAAe,CAAC;AAC9E,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAE9G,OAAO,EAEL,sBAAsB,EAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAO7B,MAAM,MAAM,iBAAiB,GAAG,MAAM,CACpC,MAAM,EACN;IAAE,QAAQ,EAAE,2BAA2B,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAahB;CACF;AAED,qBAAa,uBAAuB;IAEzB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;gBADlD,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC;IAG3D,sBAAsB;IAIhB,aAAa,IAAI,OAAO,CAAC,EAAE,CAAC;CAUnC;AAED,qBAAa,kBAAkB;IAEpB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;IAClD,YAAY,CAAC,EAAE,sBAAsB;IACrC,KAAK,CAAC,EAAE,eAAe;gBAHvB,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC,EAClD,YAAY,CAAC,EAAE,sBAAsB,YAAA,EACrC,KAAK,CAAC,EAAE,eAAe,YAAA;IAGhC,IAAI,OAAO,IAAI,OAAO,CASrB;IAED,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAS9C;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IASjE,MAAM,CAAC,0CAA0C,CAC/C,uBAAuB,EAAE,uBAAuB,EAChD,YAAY,CAAC,EAAE,sBAAsB,EACrC,KAAK,CAAC,EAAE,eAAe;WAUZ,MAAM;IAQnB,sBAAsB;IAItB,aAAa,IAAI,OAAO,CAAC,EAAE,CAAC;IAI5B,qBAAqB;CAGtB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,sBAAsB,GAAG,yBAAyB,CAWhH"}
@@ -20,7 +20,7 @@ export declare class StateReference {
20
20
  partial: PartialStateReference);
21
21
  static get schema(): z.ZodEffects<z.ZodObject<{
22
22
  l1ToL2MessageTree: z.ZodEffects<z.ZodObject<{
23
- root: z.ZodType<Fr, any, string>;
23
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
24
24
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
25
25
  }, "strip", z.ZodTypeAny, {
26
26
  root: Fr;
@@ -34,7 +34,7 @@ export declare class StateReference {
34
34
  }>;
35
35
  partial: z.ZodEffects<z.ZodObject<{
36
36
  noteHashTree: z.ZodEffects<z.ZodObject<{
37
- root: z.ZodType<Fr, any, string>;
37
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
38
38
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
39
39
  }, "strip", z.ZodTypeAny, {
40
40
  root: Fr;
@@ -47,7 +47,7 @@ export declare class StateReference {
47
47
  nextAvailableLeafIndex: string | number | bigint;
48
48
  }>;
49
49
  nullifierTree: z.ZodEffects<z.ZodObject<{
50
- root: z.ZodType<Fr, any, string>;
50
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
51
51
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
52
52
  }, "strip", z.ZodTypeAny, {
53
53
  root: Fr;
@@ -60,7 +60,7 @@ export declare class StateReference {
60
60
  nextAvailableLeafIndex: string | number | bigint;
61
61
  }>;
62
62
  publicDataTree: z.ZodEffects<z.ZodObject<{
63
- root: z.ZodType<Fr, any, string>;
63
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
64
64
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  root: Fr;
@@ -14,7 +14,7 @@ export declare class TreeSnapshots {
14
14
  constructor(l1ToL2MessageTree: AppendOnlyTreeSnapshot, noteHashTree: AppendOnlyTreeSnapshot, nullifierTree: AppendOnlyTreeSnapshot, publicDataTree: AppendOnlyTreeSnapshot);
15
15
  static get schema(): z.ZodEffects<z.ZodObject<{
16
16
  l1ToL2MessageTree: z.ZodEffects<z.ZodObject<{
17
- root: z.ZodType<Fr, any, string>;
17
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
18
18
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  root: Fr;
@@ -27,7 +27,7 @@ export declare class TreeSnapshots {
27
27
  nextAvailableLeafIndex: string | number | bigint;
28
28
  }>;
29
29
  noteHashTree: z.ZodEffects<z.ZodObject<{
30
- root: z.ZodType<Fr, any, string>;
30
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
31
31
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  root: Fr;
@@ -40,7 +40,7 @@ export declare class TreeSnapshots {
40
40
  nextAvailableLeafIndex: string | number | bigint;
41
41
  }>;
42
42
  nullifierTree: z.ZodEffects<z.ZodObject<{
43
- root: z.ZodType<Fr, any, string>;
43
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
44
44
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  root: Fr;
@@ -53,7 +53,7 @@ export declare class TreeSnapshots {
53
53
  nextAvailableLeafIndex: string | number | bigint;
54
54
  }>;
55
55
  publicDataTree: z.ZodEffects<z.ZodObject<{
56
- root: z.ZodType<Fr, any, string>;
56
+ root: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
57
57
  nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  root: Fr;
@@ -1 +1 @@
1
- {"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../src/tx/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAyD,MAAM,6BAA6B,CAAC;AAClH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,MAAM,E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H,MAAM,CAAC,MAAM,CAAC,IAAI,GAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAO,GAAG,EAAE;IAUjF,oGAAoG;IACvF,aAAa;CAW3B;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,KAAK,CAAC,EAAE,CAAC;IACpC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,OAAO;IAUlD,QAAQ,IAAI,MAAM;CAG1B"}
package/dest/tx/tx.js CHANGED
@@ -231,12 +231,12 @@ import { TxHash } from './tx_hash.js';
231
231
  * Helper class to handle Serialization and Deserialization of Txs array.
232
232
  */ export class TxArray extends Array {
233
233
  static fromBuffer(buffer) {
234
+ const reader = BufferReader.asReader(buffer);
234
235
  try {
235
- const reader = BufferReader.asReader(buffer);
236
236
  const txs = reader.readVector(Tx);
237
237
  return new TxArray(...txs);
238
238
  } catch {
239
- return new TxArray();
239
+ throw new Error('Failed to deserialize TxArray from buffer');
240
240
  }
241
241
  }
242
242
  toBuffer() {
@@ -19,8 +19,8 @@ export declare class TxContext {
19
19
  /** Gas limits for this transaction. */
20
20
  gasSettings: GasSettings);
21
21
  static get schema(): z.ZodEffects<z.ZodObject<{
22
- chainId: z.ZodType<Fr, any, string>;
23
- version: z.ZodType<Fr, any, string>;
22
+ chainId: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
23
+ version: z.ZodUnion<[z.ZodType<Fr, any, string>, z.ZodType<never, any, string>]>;
24
24
  gasSettings: z.ZodEffects<z.ZodObject<{
25
25
  gasLimits: z.ZodEffects<z.ZodObject<{
26
26
  daGas: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
@@ -31,7 +31,7 @@ export declare const ValidatorStatusHistorySchemaMap: z.ZodRecord<z.ZodString, z
31
31
  slot: string | number | bigint;
32
32
  }>, "many">, "many">>;
33
33
  export declare const ValidatorStatsSchema: z.ZodObject<{
34
- address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
34
+ address: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, z.ZodEffects<z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>, import("@aztec/foundation/schemas").EthAddress, string>]>;
35
35
  lastProposal: z.ZodOptional<z.ZodObject<{
36
36
  timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
37
37
  slot: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
@@ -162,7 +162,7 @@ export declare const ValidatorStatsSchema: z.ZodObject<{
162
162
  }>;
163
163
  export declare const ValidatorsStatsSchema: z.ZodObject<{
164
164
  stats: z.ZodRecord<z.ZodString, z.ZodObject<{
165
- address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
165
+ address: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, z.ZodEffects<z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>, import("@aztec/foundation/schemas").EthAddress, string>]>;
166
166
  lastProposal: z.ZodOptional<z.ZodObject<{
167
167
  timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
168
168
  slot: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
@@ -365,7 +365,7 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
365
365
  }>;
366
366
  export declare const SingleValidatorStatsSchema: z.ZodObject<{
367
367
  validator: z.ZodObject<{
368
- address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
368
+ address: z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, z.ZodEffects<z.ZodUnion<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<never, any, string>]>, import("@aztec/foundation/schemas").EthAddress, string>]>;
369
369
  lastProposal: z.ZodOptional<z.ZodObject<{
370
370
  timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
371
371
  slot: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/stdlib",
3
- "version": "3.0.0-nightly.20251110",
3
+ "version": "3.0.0-nightly.20251112",
4
4
  "type": "module",
5
5
  "inherits": [
6
6
  "../package.common.json",
@@ -72,13 +72,13 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "@aws-sdk/client-s3": "^3.892.0",
75
- "@aztec/bb.js": "3.0.0-nightly.20251110",
76
- "@aztec/blob-lib": "3.0.0-nightly.20251110",
77
- "@aztec/constants": "3.0.0-nightly.20251110",
78
- "@aztec/ethereum": "3.0.0-nightly.20251110",
79
- "@aztec/foundation": "3.0.0-nightly.20251110",
80
- "@aztec/l1-artifacts": "3.0.0-nightly.20251110",
81
- "@aztec/noir-noirc_abi": "3.0.0-nightly.20251110",
75
+ "@aztec/bb.js": "3.0.0-nightly.20251112",
76
+ "@aztec/blob-lib": "3.0.0-nightly.20251112",
77
+ "@aztec/constants": "3.0.0-nightly.20251112",
78
+ "@aztec/ethereum": "3.0.0-nightly.20251112",
79
+ "@aztec/foundation": "3.0.0-nightly.20251112",
80
+ "@aztec/l1-artifacts": "3.0.0-nightly.20251112",
81
+ "@aztec/noir-noirc_abi": "3.0.0-nightly.20251112",
82
82
  "@google-cloud/storage": "^7.15.0",
83
83
  "axios": "^1.12.0",
84
84
  "json-stringify-deterministic": "1.0.12",
package/src/avm/avm.ts CHANGED
@@ -5,16 +5,16 @@ import { z } from 'zod';
5
5
 
6
6
  import { AztecAddress } from '../aztec-address/index.js';
7
7
  import { AllContractDeploymentData, ContractDeploymentData } from '../contract/index.js';
8
- import type { SimulationError } from '../errors/simulation_error.js';
8
+ import { SimulationError } from '../errors/simulation_error.js';
9
9
  import { computeEffectiveGasFees } from '../fees/transaction_fee.js';
10
10
  import { Gas } from '../gas/gas.js';
11
11
  import { GasFees } from '../gas/gas_fees.js';
12
12
  import { GasSettings } from '../gas/gas_settings.js';
13
13
  import type { GasUsed } from '../gas/gas_used.js';
14
14
  import { PublicKeys } from '../keys/public_keys.js';
15
- import type { DebugLog } from '../logs/debug_log.js';
15
+ import { DebugLog } from '../logs/debug_log.js';
16
16
  import { ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
17
- import { schemas } from '../schemas/schemas.js';
17
+ import { NullishToUndefined, type ZodFor, schemas } from '../schemas/schemas.js';
18
18
  import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
19
19
  import { MerkleTreeId } from '../trees/merkle_tree_id.js';
20
20
  import { NullifierLeafPreimage } from '../trees/nullifier_leaf.js';
@@ -574,6 +574,9 @@ export class AvmExecutionHints {
574
574
  public readonly contractClasses: AvmContractClassHint[] = [],
575
575
  public readonly bytecodeCommitments: AvmBytecodeCommitmentHint[] = [],
576
576
  public readonly debugFunctionNames: AvmDebugFunctionNameHint[] = [],
577
+ public readonly contractDBCreateCheckpointHints: AvmContractDBCreateCheckpointHint[] = [],
578
+ public readonly contractDBCommitCheckpointHints: AvmContractDBCommitCheckpointHint[] = [],
579
+ public readonly contractDBRevertCheckpointHints: AvmContractDBRevertCheckpointHint[] = [],
577
580
  // Merkle DB hints.
578
581
  public startingTreeRoots: TreeSnapshots = TreeSnapshots.empty(),
579
582
  public readonly getSiblingPathHints: AvmGetSiblingPathHint[] = [],
@@ -587,9 +590,6 @@ export class AvmExecutionHints {
587
590
  public readonly createCheckpointHints: AvmCreateCheckpointHint[] = [],
588
591
  public readonly commitCheckpointHints: AvmCommitCheckpointHint[] = [],
589
592
  public readonly revertCheckpointHints: AvmRevertCheckpointHint[] = [],
590
- public readonly contractDBCreateCheckpointHints: AvmContractDBCreateCheckpointHint[] = [],
591
- public readonly contractDBCommitCheckpointHints: AvmContractDBCommitCheckpointHint[] = [],
592
- public readonly contractDBRevertCheckpointHints: AvmContractDBRevertCheckpointHint[] = [],
593
593
  ) {}
594
594
 
595
595
  static empty() {
@@ -606,6 +606,9 @@ export class AvmExecutionHints {
606
606
  contractClasses: AvmContractClassHint.schema.array(),
607
607
  bytecodeCommitments: AvmBytecodeCommitmentHint.schema.array(),
608
608
  debugFunctionNames: AvmDebugFunctionNameHint.schema.array(),
609
+ contractDBCreateCheckpointHints: AvmContractDBCreateCheckpointHint.schema.array(),
610
+ contractDBCommitCheckpointHints: AvmContractDBCommitCheckpointHint.schema.array(),
611
+ contractDBRevertCheckpointHints: AvmContractDBRevertCheckpointHint.schema.array(),
609
612
  startingTreeRoots: TreeSnapshots.schema,
610
613
  getSiblingPathHints: AvmGetSiblingPathHint.schema.array(),
611
614
  getPreviousValueIndexHints: AvmGetPreviousValueIndexHint.schema.array(),
@@ -618,9 +621,6 @@ export class AvmExecutionHints {
618
621
  createCheckpointHints: AvmCreateCheckpointHint.schema.array(),
619
622
  commitCheckpointHints: AvmCommitCheckpointHint.schema.array(),
620
623
  revertCheckpointHints: AvmRevertCheckpointHint.schema.array(),
621
- contractDBCreateCheckpointHints: AvmContractDBCreateCheckpointHint.schema.array(),
622
- contractDBCommitCheckpointHints: AvmContractDBCommitCheckpointHint.schema.array(),
623
- contractDBRevertCheckpointHints: AvmContractDBRevertCheckpointHint.schema.array(),
624
624
  })
625
625
  .transform(
626
626
  ({
@@ -631,6 +631,9 @@ export class AvmExecutionHints {
631
631
  contractClasses,
632
632
  bytecodeCommitments,
633
633
  debugFunctionNames,
634
+ contractDBCreateCheckpointHints,
635
+ contractDBCommitCheckpointHints,
636
+ contractDBRevertCheckpointHints,
634
637
  startingTreeRoots,
635
638
  getSiblingPathHints,
636
639
  getPreviousValueIndexHints,
@@ -643,9 +646,6 @@ export class AvmExecutionHints {
643
646
  createCheckpointHints,
644
647
  commitCheckpointHints,
645
648
  revertCheckpointHints,
646
- contractDBCreateCheckpointHints,
647
- contractDBCommitCheckpointHints,
648
- contractDBRevertCheckpointHints,
649
649
  }) =>
650
650
  new AvmExecutionHints(
651
651
  globalVariables,
@@ -655,6 +655,9 @@ export class AvmExecutionHints {
655
655
  contractClasses,
656
656
  bytecodeCommitments,
657
657
  debugFunctionNames,
658
+ contractDBCreateCheckpointHints,
659
+ contractDBCommitCheckpointHints,
660
+ contractDBRevertCheckpointHints,
658
661
  startingTreeRoots,
659
662
  getSiblingPathHints,
660
663
  getPreviousValueIndexHints,
@@ -667,9 +670,6 @@ export class AvmExecutionHints {
667
670
  createCheckpointHints,
668
671
  commitCheckpointHints,
669
672
  revertCheckpointHints,
670
- contractDBCreateCheckpointHints,
671
- contractDBCommitCheckpointHints,
672
- contractDBRevertCheckpointHints,
673
673
  ),
674
674
  );
675
675
  }
@@ -746,48 +746,31 @@ export class PublicTxResult {
746
746
  );
747
747
  }
748
748
 
749
- /*
750
749
  static get schema(): ZodFor<PublicTxResult> {
751
750
  return z
752
751
  .object({
753
752
  gasUsed: schemas.GasUsed,
754
753
  revertCode: RevertCode.schema,
755
- revertReason: SimulationError.schema.optional(),
756
- appLogicReturnValue: Fr.schema.array().optional(),
757
- logs: DebugLog.schema.array(),
758
- hints: AvmExecutionHints.schema.optional(),
754
+ revertReason: NullishToUndefined(SimulationError.schema),
755
+ // TODO(fcarreiro): Use actual Phases type schema.
756
+ processedPhases: NullishToUndefined(z.any().array()),
757
+ logs: NullishToUndefined(DebugLog.schema.array()),
758
+ // For the proving request.
759
759
  publicInputs: AvmCircuitPublicInputs.schema,
760
+ hints: NullishToUndefined(AvmExecutionHints.schema),
760
761
  })
761
762
  .transform(
762
- ({ gasUsed, revertCode, revertReason, appLogicReturnValue, logs, hints, publicInputs }) =>
763
+ ({ gasUsed, revertCode, revertReason, processedPhases, logs, hints, publicInputs }) =>
763
764
  new PublicTxResult(
764
765
  gasUsed,
765
766
  revertCode as RevertCode,
766
767
  revertReason,
767
- appLogicReturnValue,
768
+ processedPhases,
768
769
  logs,
769
770
  hints,
770
771
  publicInputs,
771
772
  ),
772
773
  );
773
- }*/
774
-
775
- // TODO(fcarreiro): complete this.
776
- static get partialSchema() {
777
- return z.object({
778
- gasUsed: schemas.GasUsed,
779
- revertCode: RevertCode.schema,
780
- });
781
- }
782
- static fromJSON(json: any) {
783
- // console.log('json', json);
784
- // console.log('PI.globalVariables.gasFees', json.publicInputs.globalVariables.gasFees);
785
- const r = PublicTxResult.partialSchema.parse(json);
786
- // console.log('after parse', r);
787
- return r as {
788
- gasUsed: GasUsed;
789
- revertCode: RevertCode;
790
- };
791
774
  }
792
775
  }
793
776
 
@@ -1,10 +1,11 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
2
2
  import { Fr, Point, fromBuffer } from '@aztec/foundation/fields';
3
- import { type ZodFor, hexSchemaFor } from '@aztec/foundation/schemas';
3
+ import { type ZodFor, bufferSchemaFor, hexSchemaFor } from '@aztec/foundation/schemas';
4
4
  import { type BufferReader, FieldReader, TypeRegistry } from '@aztec/foundation/serialize';
5
5
  import { hexToBuffer } from '@aztec/foundation/string';
6
6
 
7
7
  import { inspect } from 'util';
8
+ import { z } from 'zod';
8
9
 
9
10
  /** Branding to ensure fields are not interchangeable types. */
10
11
  export interface AztecAddress {
@@ -137,7 +138,12 @@ export class AztecAddress {
137
138
  }
138
139
 
139
140
  static get schema(): ZodFor<AztecAddress> {
140
- return hexSchemaFor(AztecAddress, AztecAddress.isAddress);
141
+ return z.union([
142
+ // Serialization from hex string.
143
+ hexSchemaFor(AztecAddress, AztecAddress.isAddress),
144
+ // Serialization from buffer.
145
+ bufferSchemaFor(AztecAddress, buf => buf.length === 32),
146
+ ]);
141
147
  }
142
148
  }
143
149
 
@@ -6,7 +6,7 @@ import { createWriteStream } from 'fs';
6
6
  import { mkdir } from 'fs/promises';
7
7
  import { dirname } from 'path';
8
8
  import { Readable } from 'stream';
9
- import { finished } from 'stream/promises';
9
+ import { pipeline } from 'stream/promises';
10
10
 
11
11
  import type { ReadOnlyFileStore } from './interface.js';
12
12
 
@@ -43,11 +43,14 @@ export class HttpFileStore implements ReadOnlyFileStore {
43
43
  public async download(pathOrUrl: string, destPath: string): Promise<void> {
44
44
  const url = this.getUrl(pathOrUrl);
45
45
  try {
46
+ this.log.debug(`Downloading file from ${url} to ${destPath}`);
46
47
  const response = await this.fetch<Readable>({ url, method: 'GET', responseType: 'stream' });
48
+ this.log.debug(`Response ${response.status} (${response.statusText}) from ${url}, writing to ${destPath}`);
47
49
  await mkdir(dirname(destPath), { recursive: true });
48
- await finished(response.data.pipe(createWriteStream(destPath)));
50
+ await pipeline(response.data, createWriteStream(destPath));
51
+ this.log.debug(`Download of ${url} to ${destPath} complete`);
49
52
  } catch (error) {
50
- throw new Error(`Error fetching file from ${url}: ${error instanceof Error ? error.message : String(error)}`);
53
+ throw new Error(`Error fetching file from ${url}`, { cause: error });
51
54
  }
52
55
  }
53
56
 
@@ -12,7 +12,7 @@ import { mkdir, mkdtemp, stat, unlink } from 'fs/promises';
12
12
  import { tmpdir } from 'os';
13
13
  import { basename, dirname, join } from 'path';
14
14
  import { Readable } from 'stream';
15
- import { finished } from 'stream/promises';
15
+ import { pipeline } from 'stream/promises';
16
16
  import { createGzip } from 'zlib';
17
17
 
18
18
  import type { FileStore, FileStoreSaveOptions } from './interface.js';
@@ -88,11 +88,8 @@ export class S3FileStore implements FileStore {
88
88
  // Pre-gzip to a temp file so we know the exact length for R2/S3 headers
89
89
  const tmpDir = await mkdtemp(join(tmpdir(), 's3-upload-'));
90
90
  const gzPath = join(tmpDir, `${basename(srcPath)}.gz`);
91
- const source = createReadStream(srcPath);
92
- const gz = createGzip();
93
- const out = createWriteStream(gzPath);
94
91
  try {
95
- await finished(source.pipe(gz).pipe(out));
92
+ await pipeline(createReadStream(srcPath), createGzip(), createWriteStream(gzPath));
96
93
  const st = await stat(gzPath);
97
94
  contentLength = st.size;
98
95
  bodyPath = gzPath;
@@ -144,8 +141,7 @@ export class S3FileStore implements FileStore {
144
141
  const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
145
142
  const out: GetObjectCommandOutput = await this.s3.send(new GetObjectCommand({ Bucket: bucket, Key: key }));
146
143
  await mkdir(dirname(destPath), { recursive: true });
147
- const write = createWriteStream(destPath);
148
- await finished((out.Body as Readable).pipe(write));
144
+ await pipeline(out.Body as Readable, createWriteStream(destPath));
149
145
  }
150
146
 
151
147
  public async exists(pathOrUrlStr: string): Promise<boolean> {