@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.
Files changed (234) hide show
  1. package/dest/avm/avm.d.ts +6 -0
  2. package/dest/avm/avm.d.ts.map +1 -1
  3. package/dest/avm/avm_circuit_public_inputs.d.ts +6 -1
  4. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  5. package/dest/avm/avm_circuit_public_inputs.js +11 -6
  6. package/dest/avm/avm_proving_request.d.ts +7 -0
  7. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  8. package/dest/block/body.d.ts +4 -1
  9. package/dest/block/body.d.ts.map +1 -1
  10. package/dest/block/body.js +16 -5
  11. package/dest/block/index.d.ts +1 -0
  12. package/dest/block/index.d.ts.map +1 -1
  13. package/dest/block/index.js +1 -0
  14. package/dest/block/l2_block.d.ts +8 -5
  15. package/dest/block/l2_block.d.ts.map +1 -1
  16. package/dest/block/l2_block.js +14 -7
  17. package/dest/block/l2_block_code_to_purge.d.ts +3 -14
  18. package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
  19. package/dest/block/l2_block_code_to_purge.js +23 -13
  20. package/dest/block/l2_block_header.d.ts +100 -0
  21. package/dest/block/l2_block_header.d.ts.map +1 -0
  22. package/dest/block/l2_block_header.js +146 -0
  23. package/dest/block/l2_block_stream/l2_tips_memory_store.js +1 -1
  24. package/dest/block/published_l2_block.d.ts +2 -2
  25. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  26. package/dest/block/test/l2_tips_store_test_suite.js +1 -3
  27. package/dest/interfaces/block-builder.d.ts +2 -2
  28. package/dest/interfaces/block-builder.d.ts.map +1 -1
  29. package/dest/interfaces/epoch-prover.d.ts +26 -9
  30. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  31. package/dest/interfaces/proving-job.d.ts +233 -125
  32. package/dest/interfaces/proving-job.d.ts.map +1 -1
  33. package/dest/interfaces/proving-job.js +120 -102
  34. package/dest/interfaces/pxe.d.ts +192 -90
  35. package/dest/interfaces/pxe.d.ts.map +1 -1
  36. package/dest/interfaces/pxe.js +5 -31
  37. package/dest/interfaces/server_circuit_prover.d.ts +31 -27
  38. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  39. package/dest/interfaces/validator.d.ts +3 -2
  40. package/dest/interfaces/validator.d.ts.map +1 -1
  41. package/dest/kernel/private_circuit_public_inputs.d.ts +4 -4
  42. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  43. package/dest/kernel/private_circuit_public_inputs.js +7 -7
  44. package/dest/kernel/private_context_inputs.d.ts +2 -2
  45. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  46. package/dest/kernel/private_context_inputs.js +4 -4
  47. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +1 -1
  48. package/dest/p2p/consensus_payload.d.ts +7 -6
  49. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  50. package/dest/p2p/consensus_payload.js +7 -6
  51. package/dest/parity/index.d.ts +2 -3
  52. package/dest/parity/index.d.ts.map +1 -1
  53. package/dest/parity/index.js +2 -3
  54. package/dest/parity/{base_parity_inputs.d.ts → parity_base_private_inputs.d.ts} +6 -6
  55. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -0
  56. package/dest/parity/{base_parity_inputs.js → parity_base_private_inputs.js} +5 -5
  57. package/dest/parity/parity_root_private_inputs.d.ts +39 -0
  58. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -0
  59. package/dest/parity/{root_parity_inputs.js → parity_root_private_inputs.js} +12 -13
  60. package/dest/proofs/proof_data.d.ts +4 -3
  61. package/dest/proofs/proof_data.d.ts.map +1 -1
  62. package/dest/proofs/proof_data.js +2 -2
  63. package/dest/proofs/proving_request_type.d.ts +16 -11
  64. package/dest/proofs/proving_request_type.d.ts.map +1 -1
  65. package/dest/proofs/proving_request_type.js +16 -11
  66. package/dest/rollup/base_rollup_hints.d.ts +12 -3
  67. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  68. package/dest/rollup/base_rollup_hints.js +11 -5
  69. package/dest/rollup/block_constant_data.d.ts +20 -6
  70. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  71. package/dest/rollup/block_constant_data.js +15 -7
  72. package/dest/rollup/{block_merge_rollup.d.ts → block_merge_rollup_private_inputs.d.ts} +17 -10
  73. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -0
  74. package/dest/rollup/{block_merge_rollup.js → block_merge_rollup_private_inputs.js} +14 -13
  75. package/dest/rollup/block_rollup_public_inputs.d.ts +124 -0
  76. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -0
  77. package/dest/rollup/block_rollup_public_inputs.js +85 -0
  78. package/dest/rollup/block_root_rollup_private_inputs.d.ts +236 -0
  79. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -0
  80. package/dest/rollup/block_root_rollup_private_inputs.js +257 -0
  81. package/dest/rollup/checkpoint_constant_data.d.ts +54 -0
  82. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -0
  83. package/dest/rollup/checkpoint_constant_data.js +55 -0
  84. package/dest/{tx/proposed_block_header.d.ts → rollup/checkpoint_header.d.ts} +11 -12
  85. package/dest/rollup/checkpoint_header.d.ts.map +1 -0
  86. package/dest/{tx/proposed_block_header.js → rollup/checkpoint_header.js} +9 -9
  87. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +30 -0
  88. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -0
  89. package/dest/rollup/checkpoint_merge_rollup_private_inputs.js +37 -0
  90. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +105 -0
  91. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -0
  92. package/dest/rollup/checkpoint_rollup_public_inputs.js +105 -0
  93. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +123 -0
  94. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -0
  95. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +178 -0
  96. package/dest/rollup/epoch_constant_data.d.ts +19 -2
  97. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  98. package/dest/rollup/epoch_constant_data.js +20 -7
  99. package/dest/rollup/index.d.ts +14 -12
  100. package/dest/rollup/index.d.ts.map +1 -1
  101. package/dest/rollup/index.js +14 -12
  102. package/dest/rollup/{private_base_rollup_inputs.d.ts → private_tx_base_rollup_private_inputs.d.ts} +7 -7
  103. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -0
  104. package/dest/rollup/{private_base_rollup_inputs.js → private_tx_base_rollup_private_inputs.js} +6 -6
  105. package/dest/rollup/{public_base_rollup_inputs.d.ts → public_tx_base_rollup_private_inputs.d.ts} +7 -7
  106. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -0
  107. package/dest/rollup/{public_base_rollup_inputs.js → public_tx_base_rollup_private_inputs.js} +6 -6
  108. package/dest/rollup/root_rollup_private_inputs.d.ts +67 -0
  109. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -0
  110. package/dest/rollup/root_rollup_private_inputs.js +69 -0
  111. package/dest/rollup/root_rollup_public_inputs.d.ts +46 -0
  112. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -0
  113. package/dest/rollup/root_rollup_public_inputs.js +71 -0
  114. package/dest/rollup/{merge_rollup.d.ts → tx_merge_rollup_private_inputs.d.ts} +11 -10
  115. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -0
  116. package/dest/rollup/{merge_rollup.js → tx_merge_rollup_private_inputs.js} +14 -13
  117. package/dest/rollup/{base_or_merge_rollup_public_inputs.d.ts → tx_rollup_public_inputs.d.ts} +12 -12
  118. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -0
  119. package/dest/rollup/{base_or_merge_rollup_public_inputs.js → tx_rollup_public_inputs.js} +14 -14
  120. package/dest/stats/stats.d.ts +1 -1
  121. package/dest/stats/stats.d.ts.map +1 -1
  122. package/dest/tests/factories.d.ts +28 -68
  123. package/dest/tests/factories.d.ts.map +1 -1
  124. package/dest/tests/factories.js +90 -115
  125. package/dest/tests/mocks.d.ts +3 -2
  126. package/dest/tests/mocks.d.ts.map +1 -1
  127. package/dest/tests/mocks.js +3 -3
  128. package/dest/tx/block_header.d.ts +12 -13
  129. package/dest/tx/block_header.d.ts.map +1 -1
  130. package/dest/tx/block_header.js +16 -21
  131. package/dest/tx/global_variables.d.ts.map +1 -1
  132. package/dest/tx/global_variables.js +0 -1
  133. package/dest/tx/index.d.ts +0 -1
  134. package/dest/tx/index.d.ts.map +1 -1
  135. package/dest/tx/index.js +0 -1
  136. package/dest/tx/private_execution_result.d.ts +2 -2
  137. package/dest/tx/private_execution_result.d.ts.map +1 -1
  138. package/dest/tx/private_execution_result.js +3 -3
  139. package/dest/tx/tx_constant_data.d.ts +4 -4
  140. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  141. package/dest/tx/tx_constant_data.js +6 -6
  142. package/dest/tx/tx_effect.d.ts +0 -3
  143. package/dest/tx/tx_effect.d.ts.map +1 -1
  144. package/dest/tx/tx_effect.js +2 -7
  145. package/package.json +8 -8
  146. package/src/avm/avm_circuit_public_inputs.ts +10 -0
  147. package/src/block/body.ts +23 -6
  148. package/src/block/index.ts +1 -0
  149. package/src/block/l2_block.ts +18 -8
  150. package/src/block/l2_block_code_to_purge.ts +30 -31
  151. package/src/block/l2_block_header.ts +232 -0
  152. package/src/block/l2_block_stream/l2_tips_memory_store.ts +1 -1
  153. package/src/block/test/l2_tips_store_test_suite.ts +1 -2
  154. package/src/interfaces/block-builder.ts +2 -6
  155. package/src/interfaces/epoch-prover.ts +35 -11
  156. package/src/interfaces/proving-job.ts +199 -123
  157. package/src/interfaces/pxe.ts +3 -138
  158. package/src/interfaces/server_circuit_prover.ts +83 -52
  159. package/src/interfaces/validator.ts +3 -2
  160. package/src/kernel/private_circuit_public_inputs.ts +5 -5
  161. package/src/kernel/private_context_inputs.ts +2 -2
  162. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +1 -1
  163. package/src/p2p/consensus_payload.ts +8 -7
  164. package/src/parity/index.ts +2 -3
  165. package/src/parity/{base_parity_inputs.ts → parity_base_private_inputs.ts} +6 -6
  166. package/src/parity/{root_parity_inputs.ts → parity_root_private_inputs.ts} +16 -18
  167. package/src/proofs/proof_data.ts +5 -8
  168. package/src/proofs/proving_request_type.ts +14 -8
  169. package/src/rollup/base_rollup_hints.ts +9 -1
  170. package/src/rollup/block_constant_data.ts +13 -3
  171. package/src/rollup/{block_merge_rollup.ts → block_merge_rollup_private_inputs.ts} +15 -11
  172. package/src/rollup/block_rollup_public_inputs.ts +123 -0
  173. package/src/rollup/block_root_rollup_private_inputs.ts +312 -0
  174. package/src/rollup/checkpoint_constant_data.ts +84 -0
  175. package/src/{tx/proposed_block_header.ts → rollup/checkpoint_header.ts} +16 -17
  176. package/src/rollup/checkpoint_merge_rollup_private_inputs.ts +49 -0
  177. package/src/rollup/{block_root_or_block_merge_public_inputs.ts → checkpoint_rollup_public_inputs.ts} +26 -52
  178. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +218 -0
  179. package/src/rollup/epoch_constant_data.ts +32 -8
  180. package/src/rollup/index.ts +14 -12
  181. package/src/rollup/{private_base_rollup_inputs.ts → private_tx_base_rollup_private_inputs.ts} +9 -9
  182. package/src/rollup/{public_base_rollup_inputs.ts → public_tx_base_rollup_private_inputs.ts} +9 -9
  183. package/src/rollup/root_rollup_private_inputs.ts +90 -0
  184. package/src/rollup/{root_rollup.ts → root_rollup_public_inputs.ts} +8 -104
  185. package/src/rollup/{merge_rollup.ts → tx_merge_rollup_private_inputs.ts} +13 -9
  186. package/src/rollup/{base_or_merge_rollup_public_inputs.ts → tx_rollup_public_inputs.ts} +12 -12
  187. package/src/stats/stats.ts +18 -12
  188. package/src/tests/factories.ts +144 -199
  189. package/src/tests/mocks.ts +6 -13
  190. package/src/tx/block_header.ts +17 -32
  191. package/src/tx/global_variables.ts +0 -1
  192. package/src/tx/index.ts +0 -1
  193. package/src/tx/private_execution_result.ts +3 -3
  194. package/src/tx/tx_constant_data.ts +4 -4
  195. package/src/tx/tx_effect.ts +2 -7
  196. package/dest/parity/base_parity_inputs.d.ts.map +0 -1
  197. package/dest/parity/root_parity_input.d.ts +0 -52
  198. package/dest/parity/root_parity_input.d.ts.map +0 -1
  199. package/dest/parity/root_parity_input.js +0 -50
  200. package/dest/parity/root_parity_inputs.d.ts +0 -37
  201. package/dest/parity/root_parity_inputs.d.ts.map +0 -1
  202. package/dest/rollup/base_or_merge_rollup_public_inputs.d.ts.map +0 -1
  203. package/dest/rollup/block_merge_rollup.d.ts.map +0 -1
  204. package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts +0 -134
  205. package/dest/rollup/block_root_or_block_merge_public_inputs.d.ts.map +0 -1
  206. package/dest/rollup/block_root_or_block_merge_public_inputs.js +0 -125
  207. package/dest/rollup/block_root_rollup.d.ts +0 -283
  208. package/dest/rollup/block_root_rollup.d.ts.map +0 -1
  209. package/dest/rollup/block_root_rollup.js +0 -306
  210. package/dest/rollup/empty_block_root_rollup_inputs.d.ts +0 -51
  211. package/dest/rollup/empty_block_root_rollup_inputs.d.ts.map +0 -1
  212. package/dest/rollup/empty_block_root_rollup_inputs.js +0 -65
  213. package/dest/rollup/merge_rollup.d.ts.map +0 -1
  214. package/dest/rollup/padding_block_root_rollup_inputs.d.ts +0 -20
  215. package/dest/rollup/padding_block_root_rollup_inputs.d.ts.map +0 -1
  216. package/dest/rollup/padding_block_root_rollup_inputs.js +0 -39
  217. package/dest/rollup/previous_rollup_block_data.d.ts +0 -47
  218. package/dest/rollup/previous_rollup_block_data.d.ts.map +0 -1
  219. package/dest/rollup/previous_rollup_block_data.js +0 -37
  220. package/dest/rollup/previous_rollup_data.d.ts +0 -47
  221. package/dest/rollup/previous_rollup_data.d.ts.map +0 -1
  222. package/dest/rollup/previous_rollup_data.js +0 -37
  223. package/dest/rollup/private_base_rollup_inputs.d.ts.map +0 -1
  224. package/dest/rollup/public_base_rollup_inputs.d.ts.map +0 -1
  225. package/dest/rollup/root_rollup.d.ts +0 -106
  226. package/dest/rollup/root_rollup.d.ts.map +0 -1
  227. package/dest/rollup/root_rollup.js +0 -147
  228. package/dest/tx/proposed_block_header.d.ts.map +0 -1
  229. package/src/parity/root_parity_input.ts +0 -71
  230. package/src/rollup/block_root_rollup.ts +0 -380
  231. package/src/rollup/empty_block_root_rollup_inputs.ts +0 -80
  232. package/src/rollup/padding_block_root_rollup_inputs.ts +0 -47
  233. package/src/rollup/previous_rollup_block_data.ts +0 -48
  234. package/src/rollup/previous_rollup_data.ts +0 -48
@@ -10,9 +10,7 @@ import { inspect } from 'util';
10
10
  import { z } from 'zod';
11
11
 
12
12
  import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
13
- import { ContentCommitment } from './content_commitment.js';
14
13
  import { GlobalVariables } from './global_variables.js';
15
- import { ProposedBlockHeader } from './proposed_block_header.js';
16
14
  import { StateReference } from './state_reference.js';
17
15
 
18
16
  /** A header of an L2 block. */
@@ -20,10 +18,13 @@ export class BlockHeader {
20
18
  constructor(
21
19
  /** Snapshot of archive before the block is applied. */
22
20
  public lastArchive: AppendOnlyTreeSnapshot,
23
- /** Hash of the body of an L2 block. */
24
- public contentCommitment: ContentCommitment,
25
21
  /** State reference. */
26
22
  public state: StateReference,
23
+ /**
24
+ * Hash of the sponge blob after the tx effects of this block has been applied.
25
+ * May contain tx effects from the previous blocks in the same checkpoint.
26
+ */
27
+ public spongeBlobHash: Fr,
27
28
  /** Global variables of an L2 block. */
28
29
  public globalVariables: GlobalVariables,
29
30
  /** Total fees in the block, computed by the root rollup circuit */
@@ -36,8 +37,8 @@ export class BlockHeader {
36
37
  return z
37
38
  .object({
38
39
  lastArchive: AppendOnlyTreeSnapshot.schema,
39
- contentCommitment: ContentCommitment.schema,
40
40
  state: StateReference.schema,
41
+ spongeBlobHash: schemas.Fr,
41
42
  globalVariables: GlobalVariables.schema,
42
43
  totalFees: schemas.Fr,
43
44
  totalManaUsed: schemas.Fr,
@@ -46,11 +47,10 @@ export class BlockHeader {
46
47
  }
47
48
 
48
49
  static getFields(fields: FieldsOf<BlockHeader>) {
49
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
50
50
  return [
51
51
  fields.lastArchive,
52
- fields.contentCommitment,
53
52
  fields.state,
53
+ fields.spongeBlobHash,
54
54
  fields.globalVariables,
55
55
  fields.totalFees,
56
56
  fields.totalManaUsed,
@@ -72,8 +72,8 @@ export class BlockHeader {
72
72
  getSize() {
73
73
  return (
74
74
  this.lastArchive.getSize() +
75
- this.contentCommitment.getSize() +
76
75
  this.state.getSize() +
76
+ this.spongeBlobHash.size +
77
77
  this.globalVariables.getSize() +
78
78
  this.totalFees.size +
79
79
  this.totalManaUsed.size
@@ -101,8 +101,8 @@ export class BlockHeader {
101
101
 
102
102
  return new BlockHeader(
103
103
  reader.readObject(AppendOnlyTreeSnapshot),
104
- reader.readObject(ContentCommitment),
105
104
  reader.readObject(StateReference),
105
+ reader.readObject(Fr),
106
106
  reader.readObject(GlobalVariables),
107
107
  reader.readObject(Fr),
108
108
  reader.readObject(Fr),
@@ -114,8 +114,8 @@ export class BlockHeader {
114
114
 
115
115
  return new BlockHeader(
116
116
  AppendOnlyTreeSnapshot.fromFields(reader),
117
- ContentCommitment.fromFields(reader),
118
117
  StateReference.fromFields(reader),
118
+ reader.readField(),
119
119
  GlobalVariables.fromFields(reader),
120
120
  reader.readField(),
121
121
  reader.readField(),
@@ -125,8 +125,8 @@ export class BlockHeader {
125
125
  static empty(fields: Partial<FieldsOf<BlockHeader>> = {}): BlockHeader {
126
126
  return BlockHeader.from({
127
127
  lastArchive: AppendOnlyTreeSnapshot.empty(),
128
- contentCommitment: ContentCommitment.empty(),
129
128
  state: StateReference.empty(),
129
+ spongeBlobHash: Fr.ZERO,
130
130
  globalVariables: GlobalVariables.empty(),
131
131
  totalFees: Fr.ZERO,
132
132
  totalManaUsed: Fr.ZERO,
@@ -137,8 +137,8 @@ export class BlockHeader {
137
137
  isEmpty(): boolean {
138
138
  return (
139
139
  this.lastArchive.isEmpty() &&
140
- this.contentCommitment.isEmpty() &&
141
140
  this.state.isEmpty() &&
141
+ this.spongeBlobHash.isZero() &&
142
142
  this.globalVariables.isEmpty() &&
143
143
  this.totalFees.isZero() &&
144
144
  this.totalManaUsed.isZero()
@@ -161,24 +161,11 @@ export class BlockHeader {
161
161
  return poseidon2HashWithSeparator(this.toFields(), GeneratorIndex.BLOCK_HASH);
162
162
  }
163
163
 
164
- toPropose(): ProposedBlockHeader {
165
- return new ProposedBlockHeader(
166
- this.lastArchive.root,
167
- this.contentCommitment,
168
- this.globalVariables.slotNumber,
169
- this.globalVariables.timestamp,
170
- this.globalVariables.coinbase,
171
- this.globalVariables.feeRecipient,
172
- this.globalVariables.gasFees,
173
- this.totalManaUsed,
174
- );
175
- }
176
-
177
164
  toInspect() {
178
165
  return {
179
166
  lastArchive: this.lastArchive.root.toString(),
180
- contentCommitment: this.contentCommitment.toInspect(),
181
167
  state: this.state.toInspect(),
168
+ spongeBlobHash: this.spongeBlobHash.toBigInt(),
182
169
  globalVariables: this.globalVariables.toInspect(),
183
170
  totalFees: this.totalFees.toBigInt(),
184
171
  totalManaUsed: this.totalManaUsed.toBigInt(),
@@ -188,13 +175,11 @@ export class BlockHeader {
188
175
  [inspect.custom]() {
189
176
  return `Header {
190
177
  lastArchive: ${inspect(this.lastArchive)},
191
- contentCommitment.blobsHash: ${inspect(this.contentCommitment.blobsHash)},
192
- contentCommitment.inHash: ${inspect(this.contentCommitment.inHash)},
193
- contentCommitment.outHash: ${inspect(this.contentCommitment.outHash)},
194
178
  state.l1ToL2MessageTree: ${inspect(this.state.l1ToL2MessageTree)},
195
179
  state.noteHashTree: ${inspect(this.state.partial.noteHashTree)},
196
180
  state.nullifierTree: ${inspect(this.state.partial.nullifierTree)},
197
181
  state.publicDataTree: ${inspect(this.state.partial.publicDataTree)},
182
+ spongeBlobHash: ${this.spongeBlobHash},
198
183
  globalVariables: ${inspect(this.globalVariables)},
199
184
  totalFees: ${this.totalFees},
200
185
  totalManaUsed: ${this.totalManaUsed},
@@ -203,12 +188,12 @@ export class BlockHeader {
203
188
 
204
189
  public equals(other: this): boolean {
205
190
  return (
206
- this.contentCommitment.equals(other.contentCommitment) &&
191
+ this.lastArchive.equals(other.lastArchive) &&
207
192
  this.state.equals(other.state) &&
193
+ this.spongeBlobHash.equals(other.spongeBlobHash) &&
208
194
  this.globalVariables.equals(other.globalVariables) &&
209
195
  this.totalFees.equals(other.totalFees) &&
210
- this.totalManaUsed.equals(other.totalManaUsed) &&
211
- this.lastArchive.equals(other.lastArchive)
196
+ this.totalManaUsed.equals(other.totalManaUsed)
212
197
  );
213
198
  }
214
199
  }
@@ -109,7 +109,6 @@ export class GlobalVariables {
109
109
  }
110
110
 
111
111
  static getFields(fields: FieldsOf<GlobalVariables>) {
112
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
113
112
  return [
114
113
  fields.chainId,
115
114
  fields.version,
package/src/tx/index.ts CHANGED
@@ -10,7 +10,6 @@ export * from './tx_constant_data.js';
10
10
  export * from './tx_context.js';
11
11
  export * from './tx_request.js';
12
12
  export * from './private_execution_result.js';
13
- export * from './proposed_block_header.js';
14
13
  export * from './public_call_request_with_calldata.js';
15
14
  export * from './tx_hash.js';
16
15
  export * from './tx_receipt.js';
@@ -103,10 +103,10 @@ export class PrivateExecutionResult {
103
103
  }
104
104
 
105
105
  /**
106
- * The block number that this execution was simulated with.
106
+ * The anchor block number that this execution was simulated with.
107
107
  */
108
- getSimulationBlockNumber(): UInt32 {
109
- return this.entrypoint.publicInputs.historicalHeader.globalVariables.blockNumber;
108
+ getSimulationAnchorBlockNumber(): UInt32 {
109
+ return this.entrypoint.publicInputs.anchorBlockHeader.globalVariables.blockNumber;
110
110
  }
111
111
  }
112
112
 
@@ -12,12 +12,12 @@ import { TxContext } from './tx_context.js';
12
12
  export class TxConstantData {
13
13
  constructor(
14
14
  /** Header of a block whose state is used during execution (not the block the transaction is included in). */
15
- public historicalHeader: BlockHeader,
15
+ public anchorBlockHeader: BlockHeader,
16
16
  /**
17
17
  * Context of the transaction.
18
18
  *
19
19
  * Note: `chainId` and `version` in txContext are not redundant to the values in
20
- * self.historical_header.global_variables because they can be different in case of a protocol upgrade. In such
20
+ * self.anchor_block_header.global_variables because they can be different in case of a protocol upgrade. In such
21
21
  * a situation we could be using header from a block before the upgrade took place but be using the updated
22
22
  * protocol to execute and prove the transaction.
23
23
  */
@@ -37,7 +37,7 @@ export class TxConstantData {
37
37
  }
38
38
 
39
39
  static getFields(fields: FieldsOf<TxConstantData>) {
40
- return [fields.historicalHeader, fields.txContext, fields.vkTreeRoot, fields.protocolContractTreeRoot] as const;
40
+ return [fields.anchorBlockHeader, fields.txContext, fields.vkTreeRoot, fields.protocolContractTreeRoot] as const;
41
41
  }
42
42
 
43
43
  static fromFields(fields: Fr[] | FieldReader): TxConstantData {
@@ -80,7 +80,7 @@ export class TxConstantData {
80
80
 
81
81
  getSize() {
82
82
  return (
83
- this.historicalHeader.getSize() +
83
+ this.anchorBlockHeader.getSize() +
84
84
  this.txContext.getSize() +
85
85
  this.vkTreeRoot.size +
86
86
  this.protocolContractTreeRoot.size
@@ -1,3 +1,4 @@
1
+ import { TX_EFFECT_PREFIX_BYTE_LENGTH, TX_START_PREFIX_BYTES_LENGTH } from '@aztec/blob-lib/encoding';
1
2
  import {
2
3
  CONTRACT_CLASS_LOGS_PREFIX,
3
4
  L2_L1_MSGS_PREFIX,
@@ -14,6 +15,7 @@ import {
14
15
  PUBLIC_LOGS_PREFIX,
15
16
  REVERT_CODE_PREFIX,
16
17
  TX_FEE_PREFIX,
18
+ TX_START_PREFIX,
17
19
  } from '@aztec/constants';
18
20
  import { type FieldsOf, makeTuple, makeTupleAsync } from '@aztec/foundation/array';
19
21
  import { toBufferBE } from '@aztec/foundation/bigint-buffer';
@@ -38,13 +40,6 @@ import { PrivateLog } from '../logs/private_log.js';
38
40
  import { PublicLog } from '../logs/public_log.js';
39
41
  import { TxHash } from './tx_hash.js';
40
42
 
41
- // This will appear as 0x74785f7374617274 in logs
42
- export const TX_START_PREFIX = 8392562855083340404n;
43
- // These are helper constants to decode tx effects from blob encoded fields
44
- export const TX_START_PREFIX_BYTES_LENGTH = TX_START_PREFIX.toString(16).length / 2;
45
- // 7 bytes for: | 0 | txlen[0] | txlen[1] | 0 | REVERT_CODE_PREFIX | 0 | revertCode |
46
- export const TX_EFFECT_PREFIX_BYTE_LENGTH = TX_START_PREFIX_BYTES_LENGTH + 7;
47
-
48
43
  export class TxEffect {
49
44
  constructor(
50
45
  /**
@@ -1 +0,0 @@
1
- {"version":3,"file":"base_parity_inputs.d.ts","sourceRoot":"","sources":["../../src/parity/base_parity_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mCAAmC,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACtG,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAqB,MAAM,6BAA6B,CAAC;AAG1F,qBAAa,gBAAgB;IAEzB,6DAA6D;aAC7C,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,wBAAwB,CAAC;IAChE,0BAA0B;aACV,UAAU,EAAE,EAAE;;IAH9B,6DAA6D;IAC7C,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,wBAAwB,CAAC;IAChE,0BAA0B;IACV,UAAU,EAAE,EAAE;WAGlB,SAAS,CACrB,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,mCAAmC,CAAC,EAC5D,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,EAAE,GACb,gBAAgB;IAOnB,yCAAyC;IACzC,QAAQ;IAIR,6CAA6C;IAC7C,QAAQ;IAIR;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAK/C;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,8DAA8D;IAC9D,MAAM;IAIN,6CAA6C;IAC7C,MAAM,KAAK,MAAM,yDAEhB;CACF"}
@@ -1,52 +0,0 @@
1
- import { VK_TREE_HEIGHT } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
3
- import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
4
- import type { FieldsOf } from '@aztec/foundation/types';
5
- import { RecursiveProof } from '../proofs/recursive_proof.js';
6
- import { VerificationKeyAsFields } from '../vks/verification_key.js';
7
- import { ParityPublicInputs } from './parity_public_inputs.js';
8
- export declare class RootParityInput<PROOF_LENGTH extends number> {
9
- /** The proof of the execution of the parity circuit. */
10
- readonly proof: RecursiveProof<PROOF_LENGTH>;
11
- /** The circuit's verification key */
12
- readonly verificationKey: VerificationKeyAsFields;
13
- /** The vk path in the vk tree*/
14
- readonly vkPath: Tuple<Fr, typeof VK_TREE_HEIGHT>;
15
- /** The public inputs of the parity circuit. */
16
- readonly publicInputs: ParityPublicInputs;
17
- constructor(
18
- /** The proof of the execution of the parity circuit. */
19
- proof: RecursiveProof<PROOF_LENGTH>,
20
- /** The circuit's verification key */
21
- verificationKey: VerificationKeyAsFields,
22
- /** The vk path in the vk tree*/
23
- vkPath: Tuple<Fr, typeof VK_TREE_HEIGHT>,
24
- /** The public inputs of the parity circuit. */
25
- publicInputs: ParityPublicInputs);
26
- toBuffer(): Buffer<ArrayBufferLike>;
27
- toString(): `0x${string}`;
28
- static from<PROOF_LENGTH extends number>(fields: FieldsOf<RootParityInput<PROOF_LENGTH>>): RootParityInput<PROOF_LENGTH>;
29
- static getFields<PROOF_LENGTH extends number>(fields: FieldsOf<RootParityInput<PROOF_LENGTH>>): readonly [RecursiveProof<PROOF_LENGTH>, VerificationKeyAsFields, [Fr, Fr, Fr, Fr, Fr, Fr], ParityPublicInputs];
30
- static fromBuffer<PROOF_LENGTH extends number>(buffer: Buffer | BufferReader, expectedSize?: PROOF_LENGTH): RootParityInput<PROOF_LENGTH>;
31
- static fromString<PROOF_LENGTH extends number>(str: string, expectedSize?: PROOF_LENGTH): RootParityInput<PROOF_LENGTH>;
32
- /** Returns a hex representation for JSON serialization. */
33
- toJSON(): Buffer<ArrayBufferLike>;
34
- /** Creates an instance from a hex string with expected size. */
35
- static schemaFor<N extends number>(expectedSize?: N): import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, Buffer<ArrayBuffer>, string>, import("zod").ZodEffects<import("zod").ZodObject<{
36
- type: import("zod").ZodLiteral<"Buffer">;
37
- data: import("zod").ZodArray<import("zod").ZodNumber, "many">;
38
- }, "strip", import("zod").ZodTypeAny, {
39
- type: "Buffer";
40
- data: number[];
41
- }, {
42
- type: "Buffer";
43
- data: number[];
44
- }>, Buffer<ArrayBuffer>, {
45
- type: "Buffer";
46
- data: number[];
47
- }>]>, RootParityInput<N>, string | {
48
- type: "Buffer";
49
- data: number[];
50
- }>;
51
- }
52
- //# sourceMappingURL=root_parity_input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root_parity_input.d.ts","sourceRoot":"","sources":["../../src/parity/root_parity_input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAqB,MAAM,6BAA6B,CAAC;AAE1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,qBAAa,eAA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Fr } from '@aztec/foundation/fields';
3
- import { schemas } from '@aztec/foundation/schemas';
4
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
- import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
6
- import { RecursiveProof } from '../proofs/recursive_proof.js';
7
- import { VerificationKeyAsFields } from '../vks/verification_key.js';
8
- import { ParityPublicInputs } from './parity_public_inputs.js';
9
- export class RootParityInput {
10
- proof;
11
- verificationKey;
12
- vkPath;
13
- publicInputs;
14
- constructor(/** The proof of the execution of the parity circuit. */ proof, /** The circuit's verification key */ verificationKey, /** The vk path in the vk tree*/ vkPath, /** The public inputs of the parity circuit. */ publicInputs){
15
- this.proof = proof;
16
- this.verificationKey = verificationKey;
17
- this.vkPath = vkPath;
18
- this.publicInputs = publicInputs;
19
- }
20
- toBuffer() {
21
- return serializeToBuffer(...RootParityInput.getFields(this));
22
- }
23
- toString() {
24
- return bufferToHex(this.toBuffer());
25
- }
26
- static from(fields) {
27
- return new RootParityInput(...RootParityInput.getFields(fields));
28
- }
29
- static getFields(fields) {
30
- return [
31
- fields.proof,
32
- fields.verificationKey,
33
- fields.vkPath,
34
- fields.publicInputs
35
- ];
36
- }
37
- static fromBuffer(buffer, expectedSize) {
38
- const reader = BufferReader.asReader(buffer);
39
- return new RootParityInput(RecursiveProof.fromBuffer(reader, expectedSize), reader.readObject(VerificationKeyAsFields), reader.readArray(VK_TREE_HEIGHT, Fr), reader.readObject(ParityPublicInputs));
40
- }
41
- static fromString(str, expectedSize) {
42
- return RootParityInput.fromBuffer(hexToBuffer(str), expectedSize);
43
- }
44
- /** Returns a hex representation for JSON serialization. */ toJSON() {
45
- return this.toBuffer();
46
- }
47
- /** Creates an instance from a hex string with expected size. */ static schemaFor(expectedSize) {
48
- return schemas.Buffer.transform((buf)=>RootParityInput.fromBuffer(buf, expectedSize));
49
- }
50
- }
@@ -1,37 +0,0 @@
1
- import { NUM_BASE_PARITY_PER_ROOT_PARITY, RECURSIVE_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
3
- import { RootParityInput } from './root_parity_input.js';
4
- export declare class RootParityInputs {
5
- /** Public inputs of children and their proofs. */
6
- readonly children: Tuple<RootParityInput<typeof RECURSIVE_PROOF_LENGTH>, typeof NUM_BASE_PARITY_PER_ROOT_PARITY>;
7
- constructor(
8
- /** Public inputs of children and their proofs. */
9
- children: Tuple<RootParityInput<typeof RECURSIVE_PROOF_LENGTH>, typeof NUM_BASE_PARITY_PER_ROOT_PARITY>);
10
- /**
11
- * Serializes the inputs to a buffer.
12
- * @returns The inputs serialized to a buffer.
13
- */
14
- toBuffer(): Buffer<ArrayBufferLike>;
15
- /**
16
- * Serializes the inputs to a hex string.
17
- * @returns The instance serialized to a hex string.
18
- */
19
- toString(): `0x${string}`;
20
- /**
21
- * Deserializes the inputs from a buffer.
22
- * @param buffer - The buffer to deserialize from.
23
- * @returns A new RootParityInputs instance.
24
- */
25
- static fromBuffer(buffer: Buffer | BufferReader): RootParityInputs;
26
- /**
27
- * Deserializes the inputs from a hex string.
28
- * @param str - A hex string to deserialize from.
29
- * @returns A new RootParityInputs instance.
30
- */
31
- static fromString(str: string): RootParityInputs;
32
- /** Returns a buffer representation for JSON serialization. */
33
- toJSON(): Buffer<ArrayBufferLike>;
34
- /** Creates an instance from a hex string. */
35
- static get schema(): import("zod").ZodType<RootParityInputs, any, string>;
36
- }
37
- //# sourceMappingURL=root_parity_inputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root_parity_inputs.d.ts","sourceRoot":"","sources":["../../src/parity/root_parity_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAqB,MAAM,6BAA6B,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,qBAAa,gBAAgB;IAEzB,kDAAkD;aAClC,QAAQ,EAAE,KAAK,CAC7B,eAAe,CAAC,OAAO,sBAAsB,CAAC,EAC9C,OAAO,+BAA+B,CACvC;;IAJD,kDAAkD;IAClC,QAAQ,EAAE,KAAK,CAC7B,eAAe,CAAC,OAAO,sBAAsB,CAAC,EAC9C,OAAO,+BAA+B,CACvC;IAGH;;;OAGG;IACH,QAAQ;IAIR;;;OAGG;IACH,QAAQ;IAIR;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAU/C;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,8DAA8D;IAC9D,MAAM;IAIN,6CAA6C;IAC7C,MAAM,KAAK,MAAM,yDAEhB;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base_or_merge_rollup_public_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/base_or_merge_rollup_public_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAG9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,6BAA6B;IAEtC;;OAEG;IACI,MAAM,EAAE,MAAM;IACrB;;OAEG;IACI,SAAS,EAAE,iBAAiB;IACnC;;OAEG;IACI,KAAK,EAAE,qBAAqB;IACnC;;OAEG;IACI,GAAG,EAAE,qBAAqB;IACjC;;OAEG;IACI,eAAe,EAAE,UAAU;IAClC;;OAEG;IACI,aAAa,EAAE,UAAU;IAChC;;;OAGG;IACI,OAAO,EAAE,EAAE;IAClB;;OAEG;IACI,eAAe,EAAE,EAAE;IAC1B;;OAEG;IACI,mBAAmB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AAU,CAAC,GAAG,EAAE,MAAM;IAI7B,2DAA2D;IAC3D,MAAM;IAIN,6CAA6C;IAC7C,MAAM,KAAK,MAAM,+DAEhB;CACF"}
@@ -1,134 +0,0 @@
1
- import { BlockBlobPublicInputs } from '@aztec/blob-lib';
2
- import { AZTEC_MAX_EPOCH_DURATION } from '@aztec/constants';
3
- import { EthAddress } from '@aztec/foundation/eth-address';
4
- import { Fr } from '@aztec/foundation/fields';
5
- import { BufferReader, type Tuple } from '@aztec/foundation/serialize';
6
- import type { FieldsOf } from '@aztec/foundation/types';
7
- import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
8
- import { GlobalVariables } from '../tx/global_variables.js';
9
- import { EpochConstantData } from './epoch_constant_data.js';
10
- /**
11
- * Output of the block root and block merge rollup circuits.
12
- */
13
- export declare class BlockRootOrBlockMergePublicInputs {
14
- /**
15
- * Constants for the entire epoch.
16
- */
17
- constants: EpochConstantData;
18
- /**
19
- * Archive tree immediately before this block range.
20
- */
21
- previousArchive: AppendOnlyTreeSnapshot;
22
- /**
23
- * Archive tree after adding this block range.
24
- */
25
- newArchive: AppendOnlyTreeSnapshot;
26
- /**
27
- * Global variables for the first block in the range.
28
- */
29
- startGlobalVariables: GlobalVariables;
30
- /**
31
- * Global variables for the last block in the range.
32
- */
33
- endGlobalVariables: GlobalVariables;
34
- /**
35
- * SHA256 hash of L2 to L1 messages. Used to make public inputs constant-sized (to then be opened onchain).
36
- * Note: Truncated to 31 bytes to fit in Fr.
37
- */
38
- outHash: Fr;
39
- /**
40
- * The hashes of the proposed block headers of the constituent blocks.
41
- */
42
- proposedBlockHeaderHashes: Tuple<Fr, typeof AZTEC_MAX_EPOCH_DURATION>;
43
- /**
44
- * The summed `transaction_fee`s and recipients of the constituent blocks.
45
- */
46
- fees: Tuple<FeeRecipient, typeof AZTEC_MAX_EPOCH_DURATION>;
47
- /**
48
- * Public inputs required to verify a batch of blobs.
49
- */
50
- blobPublicInputs: BlockBlobPublicInputs;
51
- constructor(
52
- /**
53
- * Constants for the entire epoch.
54
- */
55
- constants: EpochConstantData,
56
- /**
57
- * Archive tree immediately before this block range.
58
- */
59
- previousArchive: AppendOnlyTreeSnapshot,
60
- /**
61
- * Archive tree after adding this block range.
62
- */
63
- newArchive: AppendOnlyTreeSnapshot,
64
- /**
65
- * Global variables for the first block in the range.
66
- */
67
- startGlobalVariables: GlobalVariables,
68
- /**
69
- * Global variables for the last block in the range.
70
- */
71
- endGlobalVariables: GlobalVariables,
72
- /**
73
- * SHA256 hash of L2 to L1 messages. Used to make public inputs constant-sized (to then be opened onchain).
74
- * Note: Truncated to 31 bytes to fit in Fr.
75
- */
76
- outHash: Fr,
77
- /**
78
- * The hashes of the proposed block headers of the constituent blocks.
79
- */
80
- proposedBlockHeaderHashes: Tuple<Fr, typeof AZTEC_MAX_EPOCH_DURATION>,
81
- /**
82
- * The summed `transaction_fee`s and recipients of the constituent blocks.
83
- */
84
- fees: Tuple<FeeRecipient, typeof AZTEC_MAX_EPOCH_DURATION>,
85
- /**
86
- * Public inputs required to verify a batch of blobs.
87
- */
88
- blobPublicInputs: BlockBlobPublicInputs);
89
- /**
90
- * Deserializes from a buffer or reader.
91
- * @param buffer - Buffer or reader to read from.
92
- * @returns The deserialized public inputs.
93
- */
94
- static fromBuffer(buffer: Buffer | BufferReader): BlockRootOrBlockMergePublicInputs;
95
- /**
96
- * Serialize this as a buffer.
97
- * @returns The buffer.
98
- */
99
- toBuffer(): Buffer<ArrayBufferLike>;
100
- /**
101
- * Serialize this as a hex string.
102
- * @returns - The hex string.
103
- */
104
- toString(): `0x${string}`;
105
- /**
106
- * Deserializes from a hex string.
107
- * @param str - A hex string to deserialize from.
108
- * @returns A new BaseOrMergeRollupPublicInputs instance.
109
- */
110
- static fromString(str: string): BlockRootOrBlockMergePublicInputs;
111
- /** Returns a buffer representation for JSON serialization. */
112
- toJSON(): Buffer<ArrayBufferLike>;
113
- /** Creates an instance from a hex string. */
114
- static get schema(): import("zod").ZodType<BlockRootOrBlockMergePublicInputs, any, string>;
115
- }
116
- export declare class FeeRecipient {
117
- recipient: EthAddress;
118
- value: Fr;
119
- constructor(recipient: EthAddress, value: Fr);
120
- static fromBuffer(buffer: Buffer | BufferReader): FeeRecipient;
121
- toBuffer(): Buffer<ArrayBufferLike>;
122
- static getFields(fields: FieldsOf<FeeRecipient>): readonly [EthAddress, Fr];
123
- toFields(): Fr[];
124
- isEmpty(): boolean;
125
- toFriendlyJSON(): {
126
- recipient?: undefined;
127
- value?: undefined;
128
- } | {
129
- recipient: `0x${string}`;
130
- value: `0x${string}`;
131
- };
132
- static random(): FeeRecipient;
133
- }
134
- //# sourceMappingURL=block_root_or_block_merge_public_inputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block_root_or_block_merge_public_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/block_root_or_block_merge_public_inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,KAAK,KAAK,EAAwC,MAAM,6BAA6B,CAAC;AAE7G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,iCAAiC;IAE1C;;OAEG;IACI,SAAS,EAAE,iBAAiB;IACnC;;OAEG;IACI,eAAe,EAAE,sBAAsB;IAC9C;;OAEG;IACI,UAAU,EAAE,sBAAsB;IACzC;;OAEG;IAC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