@aztec/foundation 0.76.4 → 0.77.0-testnet-ignition.21

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 (459) hide show
  1. package/dest/array/array.d.ts +1 -1
  2. package/dest/array/array.d.ts.map +1 -1
  3. package/dest/array/array.js +19 -26
  4. package/dest/array/index.js +0 -1
  5. package/dest/async-map/index.js +2 -4
  6. package/dest/async-pool/index.js +6 -9
  7. package/dest/bigint-buffer/index.js +6 -13
  8. package/dest/buffer/buffer32.d.ts +1 -1
  9. package/dest/buffer/buffer32.d.ts.map +1 -1
  10. package/dest/buffer/buffer32.js +53 -66
  11. package/dest/buffer/index.js +0 -1
  12. package/dest/collection/array.d.ts +1 -1
  13. package/dest/collection/array.d.ts.map +1 -1
  14. package/dest/collection/array.js +47 -59
  15. package/dest/collection/index.js +0 -1
  16. package/dest/collection/object.js +9 -9
  17. package/dest/committable/committable.js +15 -20
  18. package/dest/committable/index.js +0 -1
  19. package/dest/config/env_var.d.ts +1 -1
  20. package/dest/config/env_var.d.ts.map +1 -1
  21. package/dest/config/env_var.js +1 -2
  22. package/dest/config/index.d.ts +1 -1
  23. package/dest/config/index.d.ts.map +1 -1
  24. package/dest/config/index.js +31 -36
  25. package/dest/crypto/aes128/index.d.ts +34 -0
  26. package/dest/crypto/aes128/index.d.ts.map +1 -0
  27. package/dest/crypto/aes128/index.js +49 -0
  28. package/dest/crypto/ecdsa/index.d.ts +39 -0
  29. package/dest/crypto/ecdsa/index.d.ts.map +1 -0
  30. package/dest/crypto/ecdsa/index.js +88 -0
  31. package/dest/crypto/ecdsa/signature.d.ts +71 -0
  32. package/dest/crypto/ecdsa/signature.d.ts.map +1 -0
  33. package/dest/crypto/ecdsa/signature.js +92 -0
  34. package/dest/crypto/grumpkin/index.d.ts +47 -0
  35. package/dest/crypto/grumpkin/index.d.ts.map +1 -0
  36. package/dest/crypto/grumpkin/index.js +154 -0
  37. package/dest/crypto/index.d.ts +6 -0
  38. package/dest/crypto/index.d.ts.map +1 -1
  39. package/dest/crypto/index.js +6 -1
  40. package/dest/crypto/keccak/index.js +60 -69
  41. package/dest/crypto/keys/index.js +2 -3
  42. package/dest/crypto/pedersen/index.js +0 -1
  43. package/dest/crypto/pedersen/pedersen.elliptic.js +153 -146
  44. package/dest/crypto/pedersen/pedersen.noble.js +140 -142
  45. package/dest/crypto/pedersen/pedersen.wasm.js +17 -16
  46. package/dest/crypto/poseidon/index.js +15 -19
  47. package/dest/crypto/random/index.js +7 -12
  48. package/dest/crypto/random/randomness_singleton.js +12 -12
  49. package/dest/crypto/schnorr/index.d.ts +30 -0
  50. package/dest/crypto/schnorr/index.d.ts.map +1 -0
  51. package/dest/crypto/schnorr/index.js +68 -0
  52. package/dest/crypto/schnorr/signature.d.ts +70 -0
  53. package/dest/crypto/schnorr/signature.d.ts.map +1 -0
  54. package/dest/crypto/schnorr/signature.js +93 -0
  55. package/dest/crypto/secp256k1/index.d.ts +32 -0
  56. package/dest/crypto/secp256k1/index.d.ts.map +1 -0
  57. package/dest/crypto/secp256k1/index.js +116 -0
  58. package/dest/crypto/secp256k1-signer/index.js +0 -1
  59. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts +2 -2
  60. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts.map +1 -1
  61. package/dest/crypto/secp256k1-signer/secp256k1_signer.js +8 -9
  62. package/dest/crypto/secp256k1-signer/utils.js +11 -16
  63. package/dest/crypto/serialize.d.ts +53 -0
  64. package/dest/crypto/serialize.d.ts.map +1 -0
  65. package/dest/crypto/serialize.js +68 -0
  66. package/dest/crypto/sha256/index.js +80 -30
  67. package/dest/crypto/sha512/index.js +2 -4
  68. package/dest/crypto/signature/index.d.ts +19 -0
  69. package/dest/crypto/signature/index.d.ts.map +1 -0
  70. package/dest/crypto/signature/index.js +3 -0
  71. package/dest/crypto/sync/index.js +1 -2
  72. package/dest/crypto/sync/pedersen/index.js +14 -13
  73. package/dest/crypto/sync/poseidon/index.js +10 -14
  74. package/dest/decorators/index.js +0 -1
  75. package/dest/decorators/memoize.js +1 -2
  76. package/dest/error/index.js +6 -19
  77. package/dest/eth-address/index.js +92 -113
  78. package/dest/eth-signature/eth_signature.js +21 -27
  79. package/dest/eth-signature/index.js +0 -1
  80. package/dest/fields/coordinate.d.ts +1 -1
  81. package/dest/fields/coordinate.d.ts.map +1 -1
  82. package/dest/fields/coordinate.js +47 -46
  83. package/dest/fields/fields.d.ts.map +1 -1
  84. package/dest/fields/fields.js +112 -126
  85. package/dest/fields/index.js +0 -1
  86. package/dest/fields/point.js +119 -129
  87. package/dest/fs/index.js +0 -1
  88. package/dest/fs/run_in_dir.d.ts +1 -1
  89. package/dest/fs/run_in_dir.d.ts.map +1 -1
  90. package/dest/fs/run_in_dir.js +16 -7
  91. package/dest/index.d.ts +0 -2
  92. package/dest/index.d.ts.map +1 -1
  93. package/dest/index.js +0 -3
  94. package/dest/iterable/all.js +3 -4
  95. package/dest/iterable/filter.js +10 -11
  96. package/dest/iterable/index.js +0 -1
  97. package/dest/iterable/isAsyncIt.js +1 -3
  98. package/dest/iterable/map.js +10 -11
  99. package/dest/iterable/peek.js +14 -14
  100. package/dest/iterable/sort.js +4 -5
  101. package/dest/iterable/take.js +6 -7
  102. package/dest/iterable/toArray.js +1 -2
  103. package/dest/jest/setup.js +7 -0
  104. package/dest/json-rpc/client/fetch.js +25 -20
  105. package/dest/json-rpc/client/index.js +0 -1
  106. package/dest/json-rpc/client/safe_json_rpc_client.js +20 -9
  107. package/dest/json-rpc/client/undici.d.ts +1 -1
  108. package/dest/json-rpc/client/undici.d.ts.map +1 -1
  109. package/dest/json-rpc/client/undici.js +16 -17
  110. package/dest/json-rpc/convert.d.ts +1 -1
  111. package/dest/json-rpc/convert.d.ts.map +1 -1
  112. package/dest/json-rpc/convert.js +10 -20
  113. package/dest/json-rpc/fixtures/class_a.js +8 -5
  114. package/dest/json-rpc/fixtures/class_b.js +8 -5
  115. package/dest/json-rpc/fixtures/test_state.js +53 -40
  116. package/dest/json-rpc/index.js +0 -1
  117. package/dest/json-rpc/js_utils.js +2 -5
  118. package/dest/json-rpc/server/index.js +0 -1
  119. package/dest/json-rpc/server/safe_json_rpc_server.js +145 -101
  120. package/dest/json-rpc/server/telemetry.js +0 -2
  121. package/dest/json-rpc/test/index.js +0 -1
  122. package/dest/json-rpc/test/integration.d.ts +1 -1
  123. package/dest/json-rpc/test/integration.d.ts.map +1 -1
  124. package/dest/json-rpc/test/integration.js +11 -5
  125. package/dest/log/console.d.ts +1 -1
  126. package/dest/log/console.d.ts.map +1 -1
  127. package/dest/log/console.js +14 -16
  128. package/dest/log/debug.d.ts +1 -1
  129. package/dest/log/debug.d.ts.map +1 -1
  130. package/dest/log/debug.js +9 -18
  131. package/dest/log/gcloud-logger-config.js +17 -15
  132. package/dest/log/index.d.ts +1 -0
  133. package/dest/log/index.d.ts.map +1 -1
  134. package/dest/log/index.js +1 -1
  135. package/dest/log/libp2p_logger.d.ts +7 -0
  136. package/dest/log/libp2p_logger.d.ts.map +1 -0
  137. package/dest/log/libp2p_logger.js +55 -0
  138. package/dest/log/log-filters.js +14 -13
  139. package/dest/log/log-levels.js +10 -2
  140. package/dest/log/log_fn.js +1 -2
  141. package/dest/log/log_history.js +21 -25
  142. package/dest/log/pino-logger.d.ts +8 -4
  143. package/dest/log/pino-logger.d.ts.map +1 -1
  144. package/dest/log/pino-logger.js +92 -74
  145. package/dest/message/index.js +7 -3
  146. package/dest/mutex/index.d.ts +1 -1
  147. package/dest/mutex/index.d.ts.map +1 -1
  148. package/dest/mutex/index.js +34 -32
  149. package/dest/mutex/mutex_database.js +4 -2
  150. package/dest/noir/index.js +0 -1
  151. package/dest/noir/noir_package_config.js +13 -8
  152. package/dest/promise/index.js +0 -1
  153. package/dest/promise/running-promise.d.ts +8 -2
  154. package/dest/promise/running-promise.d.ts.map +1 -1
  155. package/dest/promise/running-promise.js +44 -31
  156. package/dest/promise/utils.js +3 -5
  157. package/dest/queue/base_memory_queue.js +51 -59
  158. package/dest/queue/batch_queue.js +34 -27
  159. package/dest/queue/bounded_serial_queue.js +41 -51
  160. package/dest/queue/fifo_memory_queue.d.ts +1 -1
  161. package/dest/queue/fifo_memory_queue.d.ts.map +1 -1
  162. package/dest/queue/fifo_memory_queue.js +4 -8
  163. package/dest/queue/index.js +0 -1
  164. package/dest/queue/priority_memory_queue.js +3 -4
  165. package/dest/queue/priority_queue.js +5 -5
  166. package/dest/queue/semaphore.js +15 -19
  167. package/dest/queue/serial_queue.js +37 -47
  168. package/dest/retry/index.js +21 -18
  169. package/dest/running-promise/index.js +0 -1
  170. package/dest/schemas/api.d.ts +2 -2
  171. package/dest/schemas/api.d.ts.map +1 -1
  172. package/dest/schemas/api.js +2 -7
  173. package/dest/schemas/index.d.ts +1 -1
  174. package/dest/schemas/index.d.ts.map +1 -1
  175. package/dest/schemas/index.js +1 -2
  176. package/dest/schemas/parse.js +4 -8
  177. package/dest/schemas/schemas.d.ts +1 -16
  178. package/dest/schemas/schemas.d.ts.map +1 -1
  179. package/dest/schemas/schemas.js +28 -56
  180. package/dest/schemas/types.d.ts +1 -1
  181. package/dest/schemas/types.d.ts.map +1 -1
  182. package/dest/schemas/types.js +1 -2
  183. package/dest/schemas/utils.d.ts +1 -1
  184. package/dest/schemas/utils.d.ts.map +1 -1
  185. package/dest/schemas/utils.js +18 -31
  186. package/dest/serialize/buffer_reader.d.ts +1 -1
  187. package/dest/serialize/buffer_reader.d.ts.map +1 -1
  188. package/dest/serialize/buffer_reader.js +164 -188
  189. package/dest/serialize/field_reader.d.ts +1 -1
  190. package/dest/serialize/field_reader.d.ts.map +1 -1
  191. package/dest/serialize/field_reader.js +70 -79
  192. package/dest/serialize/free_funcs.d.ts +1 -1
  193. package/dest/serialize/free_funcs.d.ts.map +1 -1
  194. package/dest/serialize/free_funcs.js +40 -37
  195. package/dest/serialize/index.js +0 -1
  196. package/dest/serialize/serialize.js +72 -83
  197. package/dest/serialize/type_registry.js +10 -14
  198. package/dest/serialize/types.js +4 -5
  199. package/dest/sleep/index.js +25 -29
  200. package/dest/string/index.js +0 -1
  201. package/dest/testing/files/index.js +3 -7
  202. package/dest/testing/index.js +0 -1
  203. package/dest/testing/port_allocator.js +7 -10
  204. package/dest/testing/snapshot_serializer.d.ts +1 -1
  205. package/dest/testing/snapshot_serializer.d.ts.map +1 -1
  206. package/dest/testing/snapshot_serializer.js +14 -9
  207. package/dest/testing/test_data.js +7 -8
  208. package/dest/timer/date.js +9 -7
  209. package/dest/timer/elapsed.js +10 -7
  210. package/dest/timer/index.js +0 -1
  211. package/dest/timer/timeout.js +34 -34
  212. package/dest/timer/timer.js +17 -21
  213. package/dest/transport/browser/index.js +0 -1
  214. package/dest/transport/browser/message_port_socket.d.ts +1 -1
  215. package/dest/transport/browser/message_port_socket.d.ts.map +1 -1
  216. package/dest/transport/browser/message_port_socket.js +26 -30
  217. package/dest/transport/browser/shared_worker_connector.d.ts +1 -1
  218. package/dest/transport/browser/shared_worker_connector.d.ts.map +1 -1
  219. package/dest/transport/browser/shared_worker_connector.js +8 -10
  220. package/dest/transport/browser/shared_worker_listener.d.ts +1 -1
  221. package/dest/transport/browser/shared_worker_listener.d.ts.map +1 -1
  222. package/dest/transport/browser/shared_worker_listener.js +13 -17
  223. package/dest/transport/browser/worker_connector.d.ts +1 -1
  224. package/dest/transport/browser/worker_connector.d.ts.map +1 -1
  225. package/dest/transport/browser/worker_connector.js +12 -12
  226. package/dest/transport/browser/worker_listener.d.ts +1 -1
  227. package/dest/transport/browser/worker_listener.d.ts.map +1 -1
  228. package/dest/transport/browser/worker_listener.js +13 -17
  229. package/dest/transport/dispatch/create_dispatch_fn.js +2 -4
  230. package/dest/transport/dispatch/create_dispatch_proxy.d.ts +2 -2
  231. package/dest/transport/dispatch/create_dispatch_proxy.d.ts.map +1 -1
  232. package/dest/transport/dispatch/create_dispatch_proxy.js +16 -13
  233. package/dest/transport/dispatch/messages.js +4 -3
  234. package/dest/transport/index.js +0 -1
  235. package/dest/transport/interface/connector.d.ts +1 -1
  236. package/dest/transport/interface/connector.d.ts.map +1 -1
  237. package/dest/transport/interface/connector.js +3 -2
  238. package/dest/transport/interface/listener.d.ts +1 -1
  239. package/dest/transport/interface/listener.d.ts.map +1 -1
  240. package/dest/transport/interface/listener.js +4 -2
  241. package/dest/transport/interface/socket.js +7 -2
  242. package/dest/transport/interface/transferable.js +7 -9
  243. package/dest/transport/node/index.js +0 -1
  244. package/dest/transport/node/node_connector.d.ts +2 -2
  245. package/dest/transport/node/node_connector.d.ts.map +1 -1
  246. package/dest/transport/node/node_connector.js +9 -11
  247. package/dest/transport/node/node_connector_socket.d.ts +2 -2
  248. package/dest/transport/node/node_connector_socket.d.ts.map +1 -1
  249. package/dest/transport/node/node_connector_socket.js +21 -25
  250. package/dest/transport/node/node_listener.d.ts +1 -1
  251. package/dest/transport/node/node_listener.d.ts.map +1 -1
  252. package/dest/transport/node/node_listener.js +11 -15
  253. package/dest/transport/node/node_listener_socket.d.ts +2 -2
  254. package/dest/transport/node/node_listener_socket.d.ts.map +1 -1
  255. package/dest/transport/node/node_listener_socket.js +23 -27
  256. package/dest/transport/transport_client.d.ts +1 -1
  257. package/dest/transport/transport_client.d.ts.map +1 -1
  258. package/dest/transport/transport_client.js +47 -46
  259. package/dest/transport/transport_server.d.ts +1 -1
  260. package/dest/transport/transport_server.d.ts.map +1 -1
  261. package/dest/transport/transport_server.js +68 -55
  262. package/dest/trees/hasher.d.ts +39 -0
  263. package/dest/trees/hasher.d.ts.map +1 -0
  264. package/dest/trees/hasher.js +5 -0
  265. package/dest/trees/index.d.ts +8 -56
  266. package/dest/trees/index.d.ts.map +1 -1
  267. package/dest/trees/index.js +8 -1
  268. package/dest/trees/indexed_merkle_tree.d.ts +13 -0
  269. package/dest/trees/indexed_merkle_tree.d.ts.map +1 -0
  270. package/dest/trees/indexed_merkle_tree.js +27 -0
  271. package/dest/trees/indexed_merkle_tree_calculator.d.ts +23 -0
  272. package/dest/trees/indexed_merkle_tree_calculator.d.ts.map +1 -0
  273. package/dest/trees/indexed_merkle_tree_calculator.js +83 -0
  274. package/dest/trees/indexed_tree_leaf.d.ts +57 -0
  275. package/dest/trees/indexed_tree_leaf.d.ts.map +1 -0
  276. package/dest/trees/indexed_tree_leaf.js +5 -0
  277. package/dest/trees/membership_witness.d.ts +62 -0
  278. package/dest/trees/membership_witness.d.ts.map +1 -0
  279. package/dest/trees/membership_witness.js +70 -0
  280. package/dest/trees/merkle_tree.d.ts +18 -0
  281. package/dest/trees/merkle_tree.d.ts.map +1 -0
  282. package/dest/trees/merkle_tree.js +58 -0
  283. package/dest/trees/merkle_tree_calculator.d.ts +16 -0
  284. package/dest/trees/merkle_tree_calculator.d.ts.map +1 -0
  285. package/dest/trees/merkle_tree_calculator.js +61 -0
  286. package/dest/trees/sibling_path.d.ts +132 -0
  287. package/dest/trees/sibling_path.d.ts.map +1 -0
  288. package/dest/trees/sibling_path.js +144 -0
  289. package/dest/trees/unbalanced_merkle_tree.d.ts +1 -1
  290. package/dest/trees/unbalanced_merkle_tree.d.ts.map +1 -1
  291. package/dest/trees/unbalanced_merkle_tree.js +28 -18
  292. package/dest/trees/unbalanced_tree_store.js +43 -29
  293. package/dest/types/index.js +1 -3
  294. package/dest/url/index.js +4 -8
  295. package/dest/validation/index.js +2 -5
  296. package/dest/wasm/empty_wasi_sdk.js +142 -160
  297. package/dest/wasm/index.d.ts +1 -1
  298. package/dest/wasm/index.d.ts.map +1 -1
  299. package/dest/wasm/index.js +0 -1
  300. package/dest/wasm/wasm_module.js +80 -90
  301. package/dest/worker/browser/index.js +0 -1
  302. package/dest/worker/browser/start_web_module.d.ts +1 -1
  303. package/dest/worker/browser/start_web_module.d.ts.map +1 -1
  304. package/dest/worker/browser/start_web_module.js +9 -5
  305. package/dest/worker/browser/web_data_store.d.ts +1 -1
  306. package/dest/worker/browser/web_data_store.d.ts.map +1 -1
  307. package/dest/worker/browser/web_data_store.js +12 -15
  308. package/dest/worker/browser/web_worker.d.ts +1 -1
  309. package/dest/worker/browser/web_worker.d.ts.map +1 -1
  310. package/dest/worker/browser/web_worker.js +6 -5
  311. package/dest/worker/data_store.js +3 -2
  312. package/dest/worker/index.d.ts +1 -1
  313. package/dest/worker/index.d.ts.map +1 -1
  314. package/dest/worker/index.js +0 -1
  315. package/dest/worker/node/index.js +0 -1
  316. package/dest/worker/node/node_data_store.d.ts +1 -1
  317. package/dest/worker/node/node_data_store.d.ts.map +1 -1
  318. package/dest/worker/node/node_data_store.js +4 -5
  319. package/dest/worker/node/node_worker.d.ts +1 -1
  320. package/dest/worker/node/node_worker.d.ts.map +1 -1
  321. package/dest/worker/node/node_worker.js +6 -5
  322. package/dest/worker/node/start_node_module.d.ts +1 -1
  323. package/dest/worker/node/start_node_module.d.ts.map +1 -1
  324. package/dest/worker/node/start_node_module.js +9 -5
  325. package/dest/worker/wasm_worker.d.ts +2 -2
  326. package/dest/worker/wasm_worker.d.ts.map +1 -1
  327. package/dest/worker/wasm_worker.js +3 -2
  328. package/dest/worker/worker_pool.d.ts +1 -1
  329. package/dest/worker/worker_pool.d.ts.map +1 -1
  330. package/dest/worker/worker_pool.js +32 -43
  331. package/package.json +5 -5
  332. package/src/array/array.ts +1 -1
  333. package/src/buffer/buffer32.ts +1 -1
  334. package/src/collection/array.ts +1 -1
  335. package/src/config/env_var.ts +7 -5
  336. package/src/config/index.ts +1 -1
  337. package/src/crypto/aes128/index.ts +59 -0
  338. package/src/crypto/ecdsa/index.ts +70 -0
  339. package/src/crypto/ecdsa/signature.ts +100 -0
  340. package/src/crypto/grumpkin/index.ts +97 -0
  341. package/src/crypto/index.ts +6 -0
  342. package/src/crypto/keys/index.ts +1 -1
  343. package/src/crypto/pedersen/pedersen.wasm.ts +3 -3
  344. package/src/crypto/poseidon/index.ts +5 -5
  345. package/src/crypto/schnorr/index.ts +55 -0
  346. package/src/crypto/schnorr/signature.ts +116 -0
  347. package/src/crypto/secp256k1/index.ts +57 -0
  348. package/src/crypto/secp256k1-signer/secp256k1_signer.ts +2 -2
  349. package/src/crypto/serialize.ts +85 -0
  350. package/src/crypto/signature/index.ts +17 -0
  351. package/src/crypto/sync/index.ts +1 -1
  352. package/src/fields/coordinate.ts +1 -1
  353. package/src/fields/fields.ts +2 -1
  354. package/src/fs/run_in_dir.ts +8 -1
  355. package/src/index.ts +0 -2
  356. package/src/json-rpc/client/undici.ts +1 -1
  357. package/src/json-rpc/convert.ts +1 -1
  358. package/src/json-rpc/server/safe_json_rpc_server.ts +1 -1
  359. package/src/json-rpc/test/integration.ts +1 -1
  360. package/src/log/console.ts +1 -1
  361. package/src/log/debug.ts +1 -1
  362. package/src/log/gcloud-logger-config.ts +1 -1
  363. package/src/log/index.ts +1 -0
  364. package/src/log/libp2p_logger.ts +67 -0
  365. package/src/log/pino-logger.ts +16 -16
  366. package/src/mutex/index.ts +1 -1
  367. package/src/promise/running-promise.ts +24 -5
  368. package/src/queue/fifo_memory_queue.ts +1 -1
  369. package/src/schemas/api.ts +2 -2
  370. package/src/schemas/index.ts +1 -1
  371. package/src/schemas/schemas.ts +2 -26
  372. package/src/schemas/types.ts +1 -1
  373. package/src/schemas/utils.ts +1 -1
  374. package/src/serialize/buffer_reader.ts +1 -1
  375. package/src/serialize/field_reader.ts +1 -1
  376. package/src/serialize/free_funcs.ts +1 -1
  377. package/src/testing/snapshot_serializer.ts +1 -1
  378. package/src/transport/browser/message_port_socket.ts +1 -1
  379. package/src/transport/browser/shared_worker_connector.ts +1 -1
  380. package/src/transport/browser/shared_worker_listener.ts +1 -1
  381. package/src/transport/browser/worker_connector.ts +1 -1
  382. package/src/transport/browser/worker_listener.ts +1 -1
  383. package/src/transport/dispatch/create_dispatch_proxy.ts +2 -2
  384. package/src/transport/interface/connector.ts +1 -1
  385. package/src/transport/interface/listener.ts +1 -1
  386. package/src/transport/node/node_connector.ts +2 -2
  387. package/src/transport/node/node_connector_socket.ts +2 -2
  388. package/src/transport/node/node_listener.ts +1 -1
  389. package/src/transport/node/node_listener_socket.ts +2 -2
  390. package/src/transport/transport_client.ts +2 -2
  391. package/src/transport/transport_server.ts +3 -3
  392. package/src/trees/hasher.ts +39 -0
  393. package/src/trees/index.ts +8 -57
  394. package/src/trees/indexed_merkle_tree.ts +36 -0
  395. package/src/trees/indexed_merkle_tree_calculator.ts +94 -0
  396. package/src/trees/indexed_tree_leaf.ts +56 -0
  397. package/src/trees/membership_witness.ts +99 -0
  398. package/src/trees/merkle_tree.ts +72 -0
  399. package/src/trees/merkle_tree_calculator.ts +67 -0
  400. package/src/trees/sibling_path.ts +183 -0
  401. package/src/trees/unbalanced_merkle_tree.ts +2 -2
  402. package/src/wasm/index.ts +1 -1
  403. package/src/worker/browser/start_web_module.ts +1 -1
  404. package/src/worker/browser/web_data_store.ts +1 -1
  405. package/src/worker/browser/web_worker.ts +1 -1
  406. package/src/worker/index.ts +1 -1
  407. package/src/worker/node/node_data_store.ts +1 -1
  408. package/src/worker/node/node_worker.ts +1 -1
  409. package/src/worker/node/start_node_module.ts +1 -1
  410. package/src/worker/wasm_worker.ts +2 -2
  411. package/src/worker/worker_pool.ts +1 -1
  412. package/dest/abi/abi.d.ts +0 -853
  413. package/dest/abi/abi.d.ts.map +0 -1
  414. package/dest/abi/abi.js +0 -214
  415. package/dest/abi/buffer.d.ts +0 -18
  416. package/dest/abi/buffer.d.ts.map +0 -1
  417. package/dest/abi/buffer.js +0 -34
  418. package/dest/abi/decoder.d.ts +0 -58
  419. package/dest/abi/decoder.d.ts.map +0 -1
  420. package/dest/abi/decoder.js +0 -180
  421. package/dest/abi/encoder.d.ts +0 -16
  422. package/dest/abi/encoder.d.ts.map +0 -1
  423. package/dest/abi/encoder.js +0 -174
  424. package/dest/abi/event_selector.d.ts +0 -52
  425. package/dest/abi/event_selector.d.ts.map +0 -1
  426. package/dest/abi/event_selector.js +0 -76
  427. package/dest/abi/function_selector.d.ts +0 -65
  428. package/dest/abi/function_selector.d.ts.map +0 -1
  429. package/dest/abi/function_selector.js +0 -92
  430. package/dest/abi/index.d.ts +0 -10
  431. package/dest/abi/index.d.ts.map +0 -1
  432. package/dest/abi/index.js +0 -10
  433. package/dest/abi/note_selector.d.ts +0 -42
  434. package/dest/abi/note_selector.d.ts.map +0 -1
  435. package/dest/abi/note_selector.js +0 -63
  436. package/dest/abi/selector.d.ts +0 -42
  437. package/dest/abi/selector.d.ts.map +0 -1
  438. package/dest/abi/selector.js +0 -57
  439. package/dest/abi/u128.d.ts +0 -13
  440. package/dest/abi/u128.d.ts.map +0 -1
  441. package/dest/abi/u128.js +0 -58
  442. package/dest/abi/utils.d.ts +0 -44
  443. package/dest/abi/utils.d.ts.map +0 -1
  444. package/dest/abi/utils.js +0 -72
  445. package/dest/aztec-address/index.d.ts +0 -57
  446. package/dest/aztec-address/index.d.ts.map +0 -1
  447. package/dest/aztec-address/index.js +0 -114
  448. package/src/abi/abi.ts +0 -504
  449. package/src/abi/buffer.ts +0 -36
  450. package/src/abi/decoder.ts +0 -195
  451. package/src/abi/encoder.ts +0 -170
  452. package/src/abi/event_selector.ts +0 -92
  453. package/src/abi/function_selector.ts +0 -124
  454. package/src/abi/index.ts +0 -9
  455. package/src/abi/note_selector.ts +0 -78
  456. package/src/abi/selector.ts +0 -64
  457. package/src/abi/u128.ts +0 -71
  458. package/src/abi/utils.ts +0 -86
  459. package/src/aztec-address/index.ts +0 -146
@@ -4,34 +4,35 @@ import { serializeToFields } from '../../../serialize/serialize.js';
4
4
  /**
5
5
  * Create a pedersen commitment (point) from an array of input fields.
6
6
  * Left pads any inputs less than 32 bytes.
7
- */
8
- export function pedersenCommit(input, offset = 0) {
9
- if (!input.every(i => i.length <= 32)) {
7
+ */ export function pedersenCommit(input, offset = 0) {
8
+ if (!input.every((i)=>i.length <= 32)) {
10
9
  throw new Error('All Pedersen Commit input buffers must be <= 32 bytes.');
11
10
  }
12
- input = input.map(i => (i.length < 32 ? Buffer.concat([Buffer.alloc(32 - i.length, 0), i]) : i));
13
- const point = BarretenbergSync.getSingleton().pedersenCommit(input.map(i => new FrBarretenberg(i)), offset);
11
+ input = input.map((i)=>i.length < 32 ? Buffer.concat([
12
+ Buffer.alloc(32 - i.length, 0),
13
+ i
14
+ ]) : i);
15
+ const point = BarretenbergSync.getSingleton().pedersenCommit(input.map((i)=>new FrBarretenberg(i)), offset);
14
16
  // toBuffer returns Uint8Arrays (browser/worker-boundary friendly).
15
17
  // TODO: rename toTypedArray()?
16
- return [Buffer.from(point.x.toBuffer()), Buffer.from(point.y.toBuffer())];
18
+ return [
19
+ Buffer.from(point.x.toBuffer()),
20
+ Buffer.from(point.y.toBuffer())
21
+ ];
17
22
  }
18
23
  /**
19
24
  * Create a pedersen hash (field) from an array of input fields.
20
25
  * @param input - The input fieldables to hash.
21
26
  * @param index - The separator index to use for the hash.
22
27
  * @returns The pedersen hash.
23
- */
24
- export function pedersenHash(input, index = 0) {
28
+ */ export function pedersenHash(input, index = 0) {
25
29
  const inputFields = serializeToFields(input);
26
- const hash = BarretenbergSync.getSingleton().pedersenHash(inputFields.map(i => new FrBarretenberg(i.toBuffer())), // TODO(#4189): remove this stupid conversion
27
- index);
30
+ const hash = BarretenbergSync.getSingleton().pedersenHash(inputFields.map((i)=>new FrBarretenberg(i.toBuffer())), index);
28
31
  return Fr.fromBuffer(Buffer.from(hash.toBuffer()));
29
32
  }
30
33
  /**
31
34
  * Create a pedersen hash from an arbitrary length buffer.
32
- */
33
- export function pedersenHashBuffer(input, index = 0) {
35
+ */ export function pedersenHashBuffer(input, index = 0) {
34
36
  const result = BarretenbergSync.getSingleton().pedersenHashBuffer(input, index);
35
37
  return Buffer.from(result.toBuffer());
36
38
  }
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY3J5cHRvL3N5bmMvcGVkZXJzZW4vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGd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';
5
5
  * Create a poseidon hash (field) from an array of input fields.
6
6
  * @param input - The input fields to hash.
7
7
  * @returns The poseidon hash.
8
- */
9
- export function poseidon2Hash(input) {
8
+ */ export function poseidon2Hash(input) {
10
9
  const inputFields = serializeToFields(input);
11
- const hash = BarretenbergSync.getSingleton().poseidon2Hash(inputFields.map(i => new FrBarretenberg(i.toBuffer())));
10
+ const hash = BarretenbergSync.getSingleton().poseidon2Hash(inputFields.map((i)=>new FrBarretenberg(i.toBuffer())));
12
11
  return Fr.fromBuffer(Buffer.from(hash.toBuffer()));
13
12
  }
14
13
  /**
@@ -16,42 +15,39 @@ export function poseidon2Hash(input) {
16
15
  * @param input - The input fields to hash.
17
16
  * @param separator - The domain separator.
18
17
  * @returns The poseidon hash.
19
- */
20
- export function poseidon2HashWithSeparator(input, separator) {
18
+ */ export function poseidon2HashWithSeparator(input, separator) {
21
19
  const inputFields = serializeToFields(input);
22
20
  inputFields.unshift(new Fr(separator));
23
- const hash = BarretenbergSync.getSingleton().poseidon2Hash(inputFields.map(i => new FrBarretenberg(i.toBuffer())));
21
+ const hash = BarretenbergSync.getSingleton().poseidon2Hash(inputFields.map((i)=>new FrBarretenberg(i.toBuffer())));
24
22
  return Fr.fromBuffer(Buffer.from(hash.toBuffer()));
25
23
  }
26
24
  export function poseidon2HashAccumulate(input) {
27
25
  const inputFields = serializeToFields(input);
28
- const result = BarretenbergSync.getSingleton().poseidon2HashAccumulate(inputFields.map(i => new FrBarretenberg(i.toBuffer())));
26
+ const result = BarretenbergSync.getSingleton().poseidon2HashAccumulate(inputFields.map((i)=>new FrBarretenberg(i.toBuffer())));
29
27
  return Fr.fromBuffer(Buffer.from(result.toBuffer()));
30
28
  }
31
29
  /**
32
30
  * Runs a Poseidon2 permutation.
33
31
  * @param input the input state. Expected to be of size 4.
34
32
  * @returns the output state, size 4.
35
- */
36
- export function poseidon2Permutation(input) {
33
+ */ export function poseidon2Permutation(input) {
37
34
  const inputFields = serializeToFields(input);
38
35
  // We'd like this assertion but it's not possible to use it in the browser.
39
36
  // assert(input.length === 4, 'Input state must be of size 4');
40
- const res = BarretenbergSync.getSingleton().poseidon2Permutation(inputFields.map(i => new FrBarretenberg(i.toBuffer())));
37
+ const res = BarretenbergSync.getSingleton().poseidon2Permutation(inputFields.map((i)=>new FrBarretenberg(i.toBuffer())));
41
38
  // We'd like this assertion but it's not possible to use it in the browser.
42
39
  // assert(res.length === 4, 'Output state must be of size 4');
43
- return res.map(o => Fr.fromBuffer(Buffer.from(o.toBuffer())));
40
+ return res.map((o)=>Fr.fromBuffer(Buffer.from(o.toBuffer())));
44
41
  }
45
42
  export function poseidon2HashBytes(input) {
46
43
  const inputFields = [];
47
- for (let i = 0; i < input.length; i += 31) {
44
+ for(let i = 0; i < input.length; i += 31){
48
45
  const fieldBytes = Buffer.alloc(32, 0);
49
46
  input.slice(i, i + 31).copy(fieldBytes);
50
47
  // Noir builds the bytes as little-endian, so we need to reverse them.
51
48
  fieldBytes.reverse();
52
49
  inputFields.push(Fr.fromBuffer(fieldBytes));
53
50
  }
54
- const res = BarretenbergSync.getSingleton().poseidon2Hash(inputFields.map(i => new FrBarretenberg(i.toBuffer())));
51
+ const res = BarretenbergSync.getSingleton().poseidon2Hash(inputFields.map((i)=>new FrBarretenberg(i.toBuffer())));
55
52
  return Fr.fromBuffer(Buffer.from(res.toBuffer()));
56
53
  }
57
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY3J5cHRvL3N5bmMvcG9zZWlkb24vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGdCQUFnQixFQUFFLEVBQUUsSUFBSSxjQUFjLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFFdEUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLDJCQUEyQixDQUFD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ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVjb3JhdG9ycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQyJ9
@@ -1,5 +1,5 @@
1
1
  export function memoize(fn, context) {
2
- return function () {
2
+ return function() {
3
3
  const key = `__${String(context.name)}_value`;
4
4
  const thisWithKey = this;
5
5
  if (!(key in this)) {
@@ -9,4 +9,3 @@ export function memoize(fn, context) {
9
9
  return thisWithKey[key];
10
10
  };
11
11
  }
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVtb2l6ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWNvcmF0b3JzL21lbW9pemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLE9BQU8sQ0FBOEIsRUFBZ0IsRUFBRSxPQUFvQztJQUN6RyxPQUFPO1FBQ0wsTUFBTSxHQUFHLEdBQUcsS0FBSyxNQUFNLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUM7UUFDOUMsTUFBTSxXQUFXLEdBQUcsSUFBaUMsQ0FBQztRQUN0RCxJQUFJLENBQUMsQ0FBQyxHQUFHLElBQUksSUFBSSxDQUFDLEVBQUUsQ0FBQztZQUNuQixNQUFNLE1BQU0sR0FBRyxFQUFFLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1lBQzdCLFdBQVcsQ0FBQyxHQUFHLENBQUMsR0FBRyxNQUFNLENBQUM7UUFDNUIsQ0FBQztRQUNELE9BQU8sV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBQzFCLENBQUMsQ0FBQztBQUNKLENBQUMifQ==
@@ -2,29 +2,16 @@
2
2
  * Represents an error thrown when an operation is interrupted unexpectedly.
3
3
  * This custom error class extends the built-in Error class in JavaScript and
4
4
  * can be used to handle cases where a process or task is terminated before completion.
5
- */
6
- export class InterruptError extends Error {
7
- constructor() {
8
- super(...arguments);
9
- this.name = 'InterruptError';
10
- }
5
+ */ export class InterruptError extends Error {
6
+ name = 'InterruptError';
11
7
  }
12
8
  /**
13
9
  * An error thrown when an action times out.
14
- */
15
- export class TimeoutError extends Error {
16
- constructor() {
17
- super(...arguments);
18
- this.name = 'TimeoutError';
19
- }
10
+ */ export class TimeoutError extends Error {
11
+ name = 'TimeoutError';
20
12
  }
21
13
  /**
22
14
  * Represents an error thrown when an operation is aborted.
23
- */
24
- export class AbortError extends Error {
25
- constructor() {
26
- super(...arguments);
27
- this.name = 'AbortError';
28
- }
15
+ */ export class AbortError extends Error {
16
+ name = 'AbortError';
29
17
  }
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXJyb3IvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7R0FJRztBQUNILE1BQU0sT0FBTyxjQUFlLFNBQVEsS0FBSztJQUF6Qzs7UUFDMkIsU0FBSSxHQUFHLGdCQUFnQixDQUFDO0lBQ25ELENBQUM7Q0FBQTtBQUVEOztHQUVHO0FBQ0gsTUFBTSxPQUFPLFlBQWEsU0FBUSxLQUFLO0lBQXZDOztRQUMyQixTQUFJLEdBQUcsY0FBYyxDQUFDO0lBQ2pELENBQUM7Q0FBQTtBQUVEOztHQUVHO0FBQ0gsTUFBTSxPQUFPLFVBQVcsU0FBUSxLQUFLO0lBQXJDOztRQUMyQixTQUFJLEdBQUcsWUFBWSxDQUFDO0lBQy9DLENBQUM7Q0FBQSJ9
@@ -11,183 +11,168 @@ import { bufferToHex } from '../string/index.js';
11
11
  * for converting between different representations, generating random addresses, validating
12
12
  * checksums, and comparing addresses. EthAddress can be instantiated using a buffer or string,
13
13
  * and can be serialized/deserialized from a buffer or BufferReader.
14
- */
15
- export class EthAddress {
16
- constructor(buffer) {
14
+ */ export class EthAddress {
15
+ buffer;
16
+ /** The size of an Ethereum address in bytes. */ static SIZE_IN_BYTES = 20;
17
+ /** Represents a zero Ethereum address with 20 bytes filled with zeros. */ static ZERO = new EthAddress(Buffer.alloc(EthAddress.SIZE_IN_BYTES));
18
+ constructor(buffer){
17
19
  this.buffer = buffer;
18
20
  if (buffer.length !== EthAddress.SIZE_IN_BYTES) {
19
21
  throw new Error(`Expect buffer size to be ${EthAddress.SIZE_IN_BYTES}. Got ${buffer.length}.`);
20
22
  }
21
23
  }
22
24
  /**
23
- * Creates an EthAddress instance from a valid Ethereum address string.
24
- * The input 'address' can be either in checksum format or lowercase, and it can be prefixed with '0x'.
25
- * Throws an error if the input is not a valid Ethereum address.
26
- *
27
- * @param address - The string representing the Ethereum address.
28
- * @returns An EthAddress instance.
29
- */
30
- static fromString(address) {
25
+ * Creates an EthAddress instance from a valid Ethereum address string.
26
+ * The input 'address' can be either in checksum format or lowercase, and it can be prefixed with '0x'.
27
+ * Throws an error if the input is not a valid Ethereum address.
28
+ *
29
+ * @param address - The string representing the Ethereum address.
30
+ * @returns An EthAddress instance.
31
+ */ static fromString(address) {
31
32
  if (!EthAddress.isAddress(address)) {
32
33
  throw new Error(`Invalid address string: ${address}`);
33
34
  }
34
35
  return new EthAddress(Buffer.from(address.replace(/^0x/i, ''), 'hex'));
35
36
  }
36
37
  /**
37
- * Create a random EthAddress instance with 20 random bytes.
38
- * This method generates a new Ethereum address with a randomly generated set of 20 bytes.
39
- * It is useful for generating test addresses or unique identifiers.
40
- *
41
- * @returns A randomly generated EthAddress instance.
42
- */
43
- static random() {
38
+ * Create a random EthAddress instance with 20 random bytes.
39
+ * This method generates a new Ethereum address with a randomly generated set of 20 bytes.
40
+ * It is useful for generating test addresses or unique identifiers.
41
+ *
42
+ * @returns A randomly generated EthAddress instance.
43
+ */ static random() {
44
44
  return new EthAddress(randomBytes(20));
45
45
  }
46
46
  /**
47
- * Determines if the given string represents a valid Ethereum address.
48
- * A valid address should meet the following criteria:
49
- * 1. Contains exactly 40 hex characters (excluding an optional '0x' prefix).
50
- * 2. Is either all lowercase, all uppercase, or has a valid checksum based on EIP-55.
51
- *
52
- * @param address - The string to be checked for validity as an Ethereum address.
53
- * @returns True if the input string represents a valid Ethereum address, false otherwise.
54
- */
55
- static isAddress(address) {
47
+ * Determines if the given string represents a valid Ethereum address.
48
+ * A valid address should meet the following criteria:
49
+ * 1. Contains exactly 40 hex characters (excluding an optional '0x' prefix).
50
+ * 2. Is either all lowercase, all uppercase, or has a valid checksum based on EIP-55.
51
+ *
52
+ * @param address - The string to be checked for validity as an Ethereum address.
53
+ * @returns True if the input string represents a valid Ethereum address, false otherwise.
54
+ */ static isAddress(address) {
56
55
  if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) {
57
56
  // Does not have the basic requirements of an address.
58
57
  return false;
59
- }
60
- else if (/^(0x|0X)?[0-9a-f]{40}$/.test(address) || /^(0x|0X)?[0-9A-F]{40}$/.test(address)) {
58
+ } else if (/^(0x|0X)?[0-9a-f]{40}$/.test(address) || /^(0x|0X)?[0-9A-F]{40}$/.test(address)) {
61
59
  // It's ALL lowercase or ALL uppercase.
62
60
  return true;
63
- }
64
- else {
61
+ } else {
65
62
  return EthAddress.checkAddressChecksum(address);
66
63
  }
67
64
  }
68
65
  /**
69
- * Checks if the EthAddress instance represents a zero address.
70
- * A zero address consists of 20 bytes filled with zeros and is considered an invalid address.
71
- *
72
- * @returns A boolean indicating whether the EthAddress instance is a zero address or not.
73
- */
74
- isZero() {
66
+ * Checks if the EthAddress instance represents a zero address.
67
+ * A zero address consists of 20 bytes filled with zeros and is considered an invalid address.
68
+ *
69
+ * @returns A boolean indicating whether the EthAddress instance is a zero address or not.
70
+ */ isZero() {
75
71
  return this.equals(EthAddress.ZERO);
76
72
  }
77
73
  /**
78
- * Checks if the given Ethereum address has a valid checksum.
79
- * The input 'address' should be prefixed with '0x' or not, and have exactly 40 hex characters.
80
- * Returns true if the address has a valid checksum, false otherwise.
81
- *
82
- * @param address - The hex-encoded string representing the Ethereum address.
83
- * @returns A boolean value indicating whether the address has a valid checksum.
84
- */
85
- static checkAddressChecksum(address) {
74
+ * Checks if the given Ethereum address has a valid checksum.
75
+ * The input 'address' should be prefixed with '0x' or not, and have exactly 40 hex characters.
76
+ * Returns true if the address has a valid checksum, false otherwise.
77
+ *
78
+ * @param address - The hex-encoded string representing the Ethereum address.
79
+ * @returns A boolean value indicating whether the address has a valid checksum.
80
+ */ static checkAddressChecksum(address) {
86
81
  address = address.replace(/^0x/i, '');
87
82
  const addressHash = keccak256String(address.toLowerCase());
88
- for (let i = 0; i < 40; i++) {
83
+ for(let i = 0; i < 40; i++){
89
84
  // The nth letter should be uppercase if the nth digit of casemap is 1.
90
- if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) ||
91
- (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) {
85
+ if (parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i] || parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i]) {
92
86
  return false;
93
87
  }
94
88
  }
95
89
  return true;
96
90
  }
97
91
  /**
98
- * Converts an Ethereum address to its checksum format.
99
- * The input 'address' should be prefixed with '0x' or not, and have exactly 40 hex characters.
100
- * The checksum format is created by capitalizing certain characters in the hex string
101
- * based on the hash of the lowercase address.
102
- * Throws an error if the input address is invalid.
103
- *
104
- * @param address - The Ethereum address as a hex-encoded string.
105
- * @returns The Ethereum address in its checksum format.
106
- */
107
- static toChecksumAddress(address) {
92
+ * Converts an Ethereum address to its checksum format.
93
+ * The input 'address' should be prefixed with '0x' or not, and have exactly 40 hex characters.
94
+ * The checksum format is created by capitalizing certain characters in the hex string
95
+ * based on the hash of the lowercase address.
96
+ * Throws an error if the input address is invalid.
97
+ *
98
+ * @param address - The Ethereum address as a hex-encoded string.
99
+ * @returns The Ethereum address in its checksum format.
100
+ */ static toChecksumAddress(address) {
108
101
  if (!EthAddress.isAddress(address)) {
109
102
  throw new Error('Invalid address string.');
110
103
  }
111
104
  address = address.toLowerCase().replace(/^0x/i, '');
112
105
  const addressHash = keccak256String(address);
113
106
  let checksumAddress = '0x';
114
- for (let i = 0; i < address.length; i++) {
107
+ for(let i = 0; i < address.length; i++){
115
108
  // If ith character is 9 to f then make it uppercase.
116
109
  if (parseInt(addressHash[i], 16) > 7) {
117
110
  checksumAddress += address[i].toUpperCase();
118
- }
119
- else {
111
+ } else {
120
112
  checksumAddress += address[i];
121
113
  }
122
114
  }
123
115
  return checksumAddress;
124
116
  }
125
117
  /**
126
- * Checks whether the given EthAddress instance is equal to the current instance.
127
- * Equality is determined by comparing the underlying byte buffers of both instances.
128
- *
129
- * @param rhs - The EthAddress instance to compare with the current instance.
130
- * @returns A boolean value indicating whether the two instances are equal (true) or not (false).
131
- */
132
- equals(rhs) {
118
+ * Checks whether the given EthAddress instance is equal to the current instance.
119
+ * Equality is determined by comparing the underlying byte buffers of both instances.
120
+ *
121
+ * @param rhs - The EthAddress instance to compare with the current instance.
122
+ * @returns A boolean value indicating whether the two instances are equal (true) or not (false).
123
+ */ equals(rhs) {
133
124
  return this.buffer.equals(rhs.buffer);
134
125
  }
135
126
  /**
136
- * Converts the Ethereum address to a hex-encoded string.
137
- * The resulting string is prefixed with '0x' and has exactly 40 hex characters.
138
- * This method can be used to represent the EthAddress instance in the widely used hexadecimal format.
139
- *
140
- * @returns A hex-encoded string representation of the Ethereum address.
141
- */
142
- toString() {
127
+ * Converts the Ethereum address to a hex-encoded string.
128
+ * The resulting string is prefixed with '0x' and has exactly 40 hex characters.
129
+ * This method can be used to represent the EthAddress instance in the widely used hexadecimal format.
130
+ *
131
+ * @returns A hex-encoded string representation of the Ethereum address.
132
+ */ toString() {
143
133
  return bufferToHex(this.buffer);
144
134
  }
145
135
  [inspect.custom]() {
146
136
  return `EthAddress<${this.toString()}>`;
147
137
  }
148
138
  /**
149
- * Returns the Ethereum address as a checksummed string.
150
- * The output string will have characters in the correct upper or lowercase form, according to EIP-55.
151
- * This provides a way to verify if an address is typed correctly, by checking the character casing.
152
- *
153
- * @returns A checksummed Ethereum address string.
154
- */
155
- toChecksumString() {
139
+ * Returns the Ethereum address as a checksummed string.
140
+ * The output string will have characters in the correct upper or lowercase form, according to EIP-55.
141
+ * This provides a way to verify if an address is typed correctly, by checking the character casing.
142
+ *
143
+ * @returns A checksummed Ethereum address string.
144
+ */ toChecksumString() {
156
145
  return EthAddress.toChecksumAddress(this.buffer.toString('hex'));
157
146
  }
158
147
  /**
159
- * Returns a 20-byte buffer representation of the Ethereum address.
160
- * @returns A 20-byte Buffer containing the Ethereum address.
161
- */
162
- toBuffer() {
148
+ * Returns a 20-byte buffer representation of the Ethereum address.
149
+ * @returns A 20-byte Buffer containing the Ethereum address.
150
+ */ toBuffer() {
163
151
  return this.buffer;
164
152
  }
165
153
  /**
166
- * Returns a 32-byte buffer representation of the Ethereum address, with the original 20-byte address
167
- * occupying the last 20 bytes and the first 12 bytes being zero-filled.
168
- * This format is commonly used in smart contracts when handling addresses as 32-byte values.
169
- *
170
- * @returns A 32-byte Buffer containing the padded Ethereum address.
171
- */
172
- toBuffer32() {
154
+ * Returns a 32-byte buffer representation of the Ethereum address, with the original 20-byte address
155
+ * occupying the last 20 bytes and the first 12 bytes being zero-filled.
156
+ * This format is commonly used in smart contracts when handling addresses as 32-byte values.
157
+ *
158
+ * @returns A 32-byte Buffer containing the padded Ethereum address.
159
+ */ toBuffer32() {
173
160
  const buffer = Buffer.alloc(32);
174
161
  this.buffer.copy(buffer, 12);
175
162
  return buffer;
176
163
  }
177
164
  /**
178
- * Returns a new field with the same contents as this EthAddress.
179
- *
180
- * @returns An Fr instance.
181
- */
182
- toField() {
165
+ * Returns a new field with the same contents as this EthAddress.
166
+ *
167
+ * @returns An Fr instance.
168
+ */ toField() {
183
169
  return Fr.fromBuffer(this.toBuffer32());
184
170
  }
185
171
  /**
186
- * Converts a field to a eth address.
187
- * @param fr - The field to convert.
188
- * @returns The eth address.
189
- */
190
- static fromField(fr) {
172
+ * Converts a field to a eth address.
173
+ * @param fr - The field to convert.
174
+ * @returns The eth address.
175
+ */ static fromField(fr) {
191
176
  return new EthAddress(fr.toBuffer().slice(-EthAddress.SIZE_IN_BYTES));
192
177
  }
193
178
  static fromFields(fields) {
@@ -195,11 +180,10 @@ export class EthAddress {
195
180
  return EthAddress.fromField(reader.readField());
196
181
  }
197
182
  /**
198
- * Deserializes from a buffer or reader, corresponding to a write in cpp.
199
- * @param buffer - Buffer to read from.
200
- * @returns The EthAddress.
201
- */
202
- static fromBuffer(buffer) {
183
+ * Deserializes from a buffer or reader, corresponding to a write in cpp.
184
+ * @param buffer - Buffer to read from.
185
+ * @returns The EthAddress.
186
+ */ static fromBuffer(buffer) {
203
187
  const reader = BufferReader.asReader(buffer);
204
188
  return new EthAddress(reader.readBytes(EthAddress.SIZE_IN_BYTES));
205
189
  }
@@ -210,10 +194,5 @@ export class EthAddress {
210
194
  return hexSchemaFor(EthAddress, EthAddress.isAddress);
211
195
  }
212
196
  }
213
- /** The size of an Ethereum address in bytes. */
214
- EthAddress.SIZE_IN_BYTES = 20;
215
- /** Represents a zero Ethereum address with 20 bytes filled with zeros. */
216
- EthAddress.ZERO = new EthAddress(Buffer.alloc(EthAddress.SIZE_IN_BYTES));
217
197
  // For deserializing JSON.
218
198
  TypeRegistry.register('EthAddress', EthAddress);
219
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXRoLWFkZHJlc3MvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ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ELE1BQU07UUFDSixPQUFPLElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQztJQUN6QixDQUFDO0lBRUQsTUFBTSxLQUFLLE1BQU07UUFDZixPQUFPLFlBQVksQ0FBQyxVQUFVLEVBQUUsVUFBVSxDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQ3hELENBQUM7O0FBM05ELGdEQUFnRDtBQUNsQyx3QkFBYSxHQUFHLEVBQUUsQ0FBQztBQUNqQywwRUFBMEU7QUFDNUQsZUFBSSxHQUFHLElBQUksVUFBVSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7QUEyTjlFLDBCQUEwQjtBQUMxQixZQUFZLENBQUMsUUFBUSxDQUFDLFlBQVksRUFBRSxVQUFVLENBQUMsQ0FBQyJ9
@@ -6,17 +6,14 @@ import { hasHexPrefix, hexToBuffer } from '../string/index.js';
6
6
  * Signature
7
7
  *
8
8
  * Contains a signature split into it's primary components (r,s,v)
9
- */
10
- export class Signature {
11
- constructor(
12
- /** The r value of the signature */
13
- r,
14
- /** The s value of the signature */
15
- s,
16
- /** The v value of the signature */
17
- v,
18
- /** Does this struct store an empty signature */
19
- isEmpty = false) {
9
+ */ export class Signature {
10
+ r;
11
+ s;
12
+ v;
13
+ isEmpty;
14
+ // Cached values
15
+ size;
16
+ constructor(/** The r value of the signature */ r, /** The s value of the signature */ s, /** The v value of the signature */ v, /** Does this struct store an empty signature */ isEmpty = false){
20
17
  this.r = r;
21
18
  this.s = s;
22
19
  this.v = v;
@@ -34,11 +31,10 @@ export class Signature {
34
31
  return /^0x[0-9a-f]{129,}$/i.test(sig);
35
32
  }
36
33
  /**
37
- * A seperate method exists for this as when signing locally with viem, as when
38
- * parsing from viem, we can expect the v value to be a u8, rather than our
39
- * default serialization of u32
40
- */
41
- static fromString(sig) {
34
+ * A seperate method exists for this as when signing locally with viem, as when
35
+ * parsing from viem, we can expect the v value to be a u8, rather than our
36
+ * default serialization of u32
37
+ */ static fromString(sig) {
42
38
  const buf = hexToBuffer(sig);
43
39
  const reader = BufferReader.asReader(buf);
44
40
  const r = reader.readObject(Buffer32);
@@ -57,7 +53,11 @@ export class Signature {
57
53
  return this.r.equals(other.r) && this.s.equals(other.s) && this.v === other.v && this.isEmpty === other.isEmpty;
58
54
  }
59
55
  toBuffer() {
60
- const buffer = serializeToBuffer([this.r, this.s, this.v]);
56
+ const buffer = serializeToBuffer([
57
+ this.r,
58
+ this.s,
59
+ this.v
60
+ ]);
61
61
  this.size = buffer.length;
62
62
  return buffer;
63
63
  }
@@ -73,25 +73,19 @@ export class Signature {
73
73
  return `0x${this.r.buffer.toString('hex')}${this.s.buffer.toString('hex')}${this.v.toString(16)}`;
74
74
  }
75
75
  /**
76
- * Return the signature with `0x${string}` encodings for r and s
77
- */
78
- toViemSignature() {
76
+ * Return the signature with `0x${string}` encodings for r and s
77
+ */ toViemSignature() {
79
78
  return {
80
79
  r: this.r.toString(),
81
80
  s: this.s.toString(),
82
81
  v: this.v,
83
- isEmpty: this.isEmpty,
82
+ isEmpty: this.isEmpty
84
83
  };
85
84
  }
86
85
  toJSON() {
87
86
  return this.toString();
88
87
  }
89
88
  static get schema() {
90
- return z
91
- .string()
92
- .refine(hasHexPrefix, 'No hex prefix')
93
- .refine(Signature.isValidString, 'Not a valid Ethereum signature')
94
- .transform(Signature.fromString);
89
+ return z.string().refine(hasHexPrefix, 'No hex prefix').refine(Signature.isValidString, 'Not a valid Ethereum signature').transform(Signature.fromString);
95
90
  }
96
91
  }
97
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXRoX3NpZ25hdHVyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldGgtc2lnbmF0dXJlL2V0aF9zaWduYXR1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQV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dHVyZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDIn0=
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
- import { type Tuple } from '../serialize/types.js';
3
+ import type { Tuple } from '../serialize/types.js';
4
4
  import { Fr } from './fields.js';
5
5
  /**
6
6
  * Class to wrap a single point coordinate.
@@ -1 +1 @@
1
- {"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../src/fields/coordinate.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC;;;;;;;GAOG;AACH,qBAAa,UAAU;IAInB;;OAEG;IACI,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAN7B,MAAM,CAAC,IAAI,aAAsC;;IAG/C;;OAEG;IACI,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAG7B;;;OAGG;IACH,QAAQ,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAIxB;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,UAAU;IAI3B;;;OAGG;IACH,cAAc,IAAI,MAAM;IAIxB;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAOlB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;IAIlC;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM;IAYpC;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE;CAOhC"}
1
+ {"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../src/fields/coordinate.ts"],"names":[],"mappings":";;AACA,OAAO,KAAK,EAA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