@aztec/foundation 3.0.0-canary.a9708bd → 3.0.0-devnet.20251212

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 (451) hide show
  1. package/dest/array/array.d.ts +1 -9
  2. package/dest/array/array.d.ts.map +1 -1
  3. package/dest/array/array.js +0 -11
  4. package/dest/array/index.d.ts +1 -1
  5. package/dest/async-map/index.d.ts +1 -1
  6. package/dest/async-pool/index.d.ts +1 -1
  7. package/dest/bigint/index.d.ts +1 -1
  8. package/dest/bigint-buffer/index.d.ts +1 -1
  9. package/dest/branded-types/block_number.d.ts +53 -0
  10. package/dest/branded-types/block_number.d.ts.map +1 -0
  11. package/dest/branded-types/block_number.js +75 -0
  12. package/dest/branded-types/checkpoint_number.d.ts +46 -0
  13. package/dest/branded-types/checkpoint_number.d.ts.map +1 -0
  14. package/dest/branded-types/checkpoint_number.js +68 -0
  15. package/dest/branded-types/epoch.d.ts +42 -0
  16. package/dest/branded-types/epoch.d.ts.map +1 -0
  17. package/dest/branded-types/epoch.js +59 -0
  18. package/dest/branded-types/index.d.ts +6 -0
  19. package/dest/branded-types/index.d.ts.map +1 -0
  20. package/dest/branded-types/index.js +4 -0
  21. package/dest/branded-types/slot.d.ts +42 -0
  22. package/dest/branded-types/slot.d.ts.map +1 -0
  23. package/dest/branded-types/slot.js +59 -0
  24. package/dest/branded-types/types.d.ts +5 -0
  25. package/dest/branded-types/types.d.ts.map +1 -0
  26. package/dest/branded-types/types.js +1 -0
  27. package/dest/buffer/buffer16.d.ts +2 -5
  28. package/dest/buffer/buffer16.d.ts.map +1 -1
  29. package/dest/buffer/buffer16.js +1 -1
  30. package/dest/buffer/buffer32.d.ts +2 -5
  31. package/dest/buffer/buffer32.d.ts.map +1 -1
  32. package/dest/buffer/buffer32.js +1 -1
  33. package/dest/buffer/index.d.ts +1 -1
  34. package/dest/collection/array.d.ts +3 -1
  35. package/dest/collection/array.d.ts.map +1 -1
  36. package/dest/collection/array.js +12 -3
  37. package/dest/collection/index.d.ts +1 -1
  38. package/dest/collection/object.d.ts +5 -1
  39. package/dest/collection/object.d.ts.map +1 -1
  40. package/dest/collection/object.js +6 -0
  41. package/dest/committable/committable.d.ts +1 -1
  42. package/dest/committable/committable.d.ts.map +1 -1
  43. package/dest/committable/index.d.ts +1 -1
  44. package/dest/config/env_var.d.ts +2 -2
  45. package/dest/config/env_var.d.ts.map +1 -1
  46. package/dest/config/index.d.ts +12 -2
  47. package/dest/config/index.d.ts.map +1 -1
  48. package/dest/config/index.js +18 -3
  49. package/dest/config/network_config.d.ts +42 -0
  50. package/dest/config/network_config.d.ts.map +1 -0
  51. package/dest/config/network_config.js +9 -0
  52. package/dest/config/network_name.d.ts +2 -2
  53. package/dest/config/network_name.d.ts.map +1 -1
  54. package/dest/config/network_name.js +10 -2
  55. package/dest/config/secret_value.d.ts +1 -1
  56. package/dest/config/secret_value.d.ts.map +1 -1
  57. package/dest/crypto/aes128/index.d.ts +1 -1
  58. package/dest/crypto/aes128/index.d.ts.map +1 -1
  59. package/dest/crypto/aes128/index.js +19 -6
  60. package/dest/crypto/bls/bn254_keystore.d.ts +296 -0
  61. package/dest/crypto/bls/bn254_keystore.d.ts.map +1 -0
  62. package/dest/crypto/bls/bn254_keystore.js +218 -0
  63. package/dest/crypto/bls/index.d.ts +13 -0
  64. package/dest/crypto/bls/index.d.ts.map +1 -0
  65. package/dest/crypto/bls/index.js +87 -0
  66. package/dest/crypto/bn254/index.d.ts +39 -0
  67. package/dest/crypto/bn254/index.d.ts.map +1 -0
  68. package/dest/crypto/bn254/index.js +56 -0
  69. package/dest/crypto/ecdsa/index.d.ts +1 -1
  70. package/dest/crypto/ecdsa/index.d.ts.map +1 -1
  71. package/dest/crypto/ecdsa/index.js +58 -48
  72. package/dest/crypto/ecdsa/signature.d.ts +2 -11
  73. package/dest/crypto/ecdsa/signature.d.ts.map +1 -1
  74. package/dest/crypto/ecdsa/signature.js +2 -2
  75. package/dest/crypto/grumpkin/index.d.ts +10 -13
  76. package/dest/crypto/grumpkin/index.d.ts.map +1 -1
  77. package/dest/crypto/grumpkin/index.js +61 -55
  78. package/dest/crypto/keccak/index.d.ts +1 -1
  79. package/dest/crypto/keys/index.d.ts +2 -2
  80. package/dest/crypto/keys/index.d.ts.map +1 -1
  81. package/dest/crypto/keys/index.js +8 -5
  82. package/dest/crypto/pedersen/index.d.ts +1 -1
  83. package/dest/crypto/pedersen/pedersen.noble.d.ts +1 -1
  84. package/dest/crypto/pedersen/pedersen.wasm.d.ts +2 -2
  85. package/dest/crypto/pedersen/pedersen.wasm.d.ts.map +1 -1
  86. package/dest/crypto/pedersen/pedersen.wasm.js +24 -14
  87. package/dest/crypto/poseidon/index.d.ts +2 -2
  88. package/dest/crypto/poseidon/index.d.ts.map +1 -1
  89. package/dest/crypto/poseidon/index.js +33 -18
  90. package/dest/crypto/random/index.d.ts +1 -1
  91. package/dest/crypto/random/index.d.ts.map +1 -1
  92. package/dest/crypto/random/randomness_singleton.d.ts +1 -1
  93. package/dest/crypto/random/randomness_singleton.d.ts.map +1 -1
  94. package/dest/crypto/schnorr/index.d.ts +3 -2
  95. package/dest/crypto/schnorr/index.d.ts.map +1 -1
  96. package/dest/crypto/schnorr/index.js +30 -38
  97. package/dest/crypto/schnorr/signature.d.ts +2 -2
  98. package/dest/crypto/schnorr/signature.d.ts.map +1 -1
  99. package/dest/crypto/schnorr/signature.js +2 -2
  100. package/dest/crypto/secp256k1/index.d.ts +1 -1
  101. package/dest/crypto/secp256k1/index.d.ts.map +1 -1
  102. package/dest/crypto/secp256k1/index.js +23 -18
  103. package/dest/crypto/secp256k1-signer/index.d.ts +1 -1
  104. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts +1 -1
  105. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts.map +1 -1
  106. package/dest/crypto/secp256k1-signer/utils.d.ts +49 -3
  107. package/dest/crypto/secp256k1-signer/utils.d.ts.map +1 -1
  108. package/dest/crypto/secp256k1-signer/utils.js +87 -5
  109. package/dest/crypto/serialize.d.ts +1 -1
  110. package/dest/crypto/sha256/index.d.ts +2 -2
  111. package/dest/crypto/sha256/index.d.ts.map +1 -1
  112. package/dest/crypto/sha256/index.js +1 -1
  113. package/dest/crypto/sha512/index.d.ts +3 -3
  114. package/dest/crypto/sha512/index.d.ts.map +1 -1
  115. package/dest/crypto/sha512/index.js +1 -1
  116. package/dest/crypto/signature/index.d.ts +2 -2
  117. package/dest/crypto/signature/index.d.ts.map +1 -1
  118. package/dest/crypto/sync/index.d.ts +1 -1
  119. package/dest/crypto/sync/index.js +1 -1
  120. package/dest/crypto/sync/pedersen/index.d.ts +2 -2
  121. package/dest/crypto/sync/pedersen/index.d.ts.map +1 -1
  122. package/dest/crypto/sync/pedersen/index.js +18 -11
  123. package/dest/crypto/sync/poseidon/index.d.ts +2 -2
  124. package/dest/crypto/sync/poseidon/index.d.ts.map +1 -1
  125. package/dest/crypto/sync/poseidon/index.js +28 -13
  126. package/dest/{fields/bls12_fields.d.ts → curves/bls12/field.d.ts} +3 -3
  127. package/dest/curves/bls12/field.d.ts.map +1 -0
  128. package/dest/{fields/bls12_fields.js → curves/bls12/field.js} +6 -6
  129. package/dest/curves/bls12/index.d.ts +3 -0
  130. package/dest/curves/bls12/index.d.ts.map +1 -0
  131. package/dest/curves/bls12/index.js +2 -0
  132. package/dest/{fields/bls12_point.d.ts → curves/bls12/point.d.ts} +11 -20
  133. package/dest/curves/bls12/point.d.ts.map +1 -0
  134. package/dest/{fields/bls12_point.js → curves/bls12/point.js} +14 -14
  135. package/dest/{fields/fields.d.ts → curves/bn254/field.d.ts} +16 -9
  136. package/dest/curves/bn254/field.d.ts.map +1 -0
  137. package/dest/{fields/fields.js → curves/bn254/field.js} +41 -16
  138. package/dest/curves/bn254/index.d.ts +3 -0
  139. package/dest/curves/bn254/index.d.ts.map +1 -0
  140. package/dest/curves/bn254/index.js +2 -0
  141. package/dest/curves/bn254/point.d.ts +54 -0
  142. package/dest/curves/bn254/point.d.ts.map +1 -0
  143. package/dest/curves/bn254/point.js +143 -0
  144. package/dest/curves/grumpkin/index.d.ts +10 -0
  145. package/dest/curves/grumpkin/index.d.ts.map +1 -0
  146. package/dest/curves/grumpkin/index.js +3 -0
  147. package/dest/{fields → curves/grumpkin}/point.d.ts +13 -13
  148. package/dest/curves/grumpkin/point.d.ts.map +1 -0
  149. package/dest/{fields → curves/grumpkin}/point.js +24 -7
  150. package/dest/decorators/index.d.ts +1 -1
  151. package/dest/decorators/memoize.d.ts +1 -1
  152. package/dest/decorators/memoize.d.ts.map +1 -1
  153. package/dest/error/index.d.ts +4 -4
  154. package/dest/error/index.d.ts.map +1 -1
  155. package/dest/eth-address/index.d.ts +14 -4
  156. package/dest/eth-address/index.d.ts.map +1 -1
  157. package/dest/eth-address/index.js +23 -1
  158. package/dest/eth-signature/eth_signature.d.ts +1 -4
  159. package/dest/eth-signature/eth_signature.d.ts.map +1 -1
  160. package/dest/eth-signature/eth_signature.js +2 -4
  161. package/dest/eth-signature/index.d.ts +1 -1
  162. package/dest/fs/index.d.ts +1 -1
  163. package/dest/fs/run_in_dir.d.ts +1 -1
  164. package/dest/fs/try_rm_dir.d.ts +1 -1
  165. package/dest/iterable/all.d.ts +1 -1
  166. package/dest/iterable/filter.d.ts +1 -1
  167. package/dest/iterable/index.d.ts +1 -1
  168. package/dest/iterable/isAsyncIt.d.ts +1 -1
  169. package/dest/iterable/map.d.ts +1 -1
  170. package/dest/iterable/peek.d.ts +1 -1
  171. package/dest/iterable/sort.d.ts +1 -1
  172. package/dest/iterable/take.d.ts +1 -1
  173. package/dest/iterable/toArray.d.ts +1 -1
  174. package/dest/json-rpc/client/fetch.d.ts +1 -1
  175. package/dest/json-rpc/client/index.d.ts +1 -1
  176. package/dest/json-rpc/client/safe_json_rpc_client.d.ts +1 -1
  177. package/dest/json-rpc/client/safe_json_rpc_client.d.ts.map +1 -1
  178. package/dest/json-rpc/client/safe_json_rpc_client.js +9 -0
  179. package/dest/json-rpc/client/undici.d.ts +1 -1
  180. package/dest/json-rpc/convert.d.ts +1 -1
  181. package/dest/json-rpc/errors.d.ts +1 -1
  182. package/dest/json-rpc/errors.d.ts.map +1 -1
  183. package/dest/json-rpc/fixtures/class_a.d.ts +3 -3
  184. package/dest/json-rpc/fixtures/class_a.d.ts.map +1 -1
  185. package/dest/json-rpc/fixtures/class_b.d.ts +3 -3
  186. package/dest/json-rpc/fixtures/class_b.d.ts.map +1 -1
  187. package/dest/json-rpc/fixtures/test_state.d.ts +1 -1
  188. package/dest/json-rpc/fixtures/test_state.d.ts.map +1 -1
  189. package/dest/json-rpc/index.d.ts +1 -1
  190. package/dest/json-rpc/js_utils.d.ts +1 -1
  191. package/dest/json-rpc/js_utils.d.ts.map +1 -1
  192. package/dest/json-rpc/server/index.d.ts +1 -1
  193. package/dest/json-rpc/server/safe_json_rpc_server.d.ts +1 -1
  194. package/dest/json-rpc/server/safe_json_rpc_server.d.ts.map +1 -1
  195. package/dest/json-rpc/server/telemetry.d.ts +1 -1
  196. package/dest/json-rpc/test/index.d.ts +1 -1
  197. package/dest/json-rpc/test/integration.d.ts +1 -1
  198. package/dest/log/console.d.ts +1 -1
  199. package/dest/log/gcloud-logger-config.d.ts +1 -1
  200. package/dest/log/gcloud-logger-config.d.ts.map +1 -1
  201. package/dest/log/index.d.ts +1 -1
  202. package/dest/log/libp2p_logger.d.ts +1 -1
  203. package/dest/log/log-filters.d.ts +1 -1
  204. package/dest/log/log-levels.d.ts +1 -1
  205. package/dest/log/log_fn.d.ts +2 -2
  206. package/dest/log/log_fn.d.ts.map +1 -1
  207. package/dest/log/noir_debug_log_util.d.ts +1 -1
  208. package/dest/log/pino-logger.d.ts +2 -2
  209. package/dest/log/pino-logger.d.ts.map +1 -1
  210. package/dest/log/pino-logger.js +0 -1
  211. package/dest/message/index.d.ts +1 -1
  212. package/dest/message/index.d.ts.map +1 -1
  213. package/dest/mutex/index.d.ts +1 -1
  214. package/dest/mutex/index.d.ts.map +1 -1
  215. package/dest/mutex/mutex_database.d.ts +1 -1
  216. package/dest/noir/index.d.ts +1 -1
  217. package/dest/noir/noir_package_config.d.ts +9 -9
  218. package/dest/number/index.d.ts +1 -1
  219. package/dest/profiler/index.d.ts +2 -0
  220. package/dest/profiler/index.d.ts.map +1 -0
  221. package/dest/profiler/index.js +1 -0
  222. package/dest/profiler/profiler.d.ts +8 -0
  223. package/dest/profiler/profiler.d.ts.map +1 -0
  224. package/dest/profiler/profiler.js +97 -0
  225. package/dest/promise/index.d.ts +1 -1
  226. package/dest/promise/running-promise.d.ts +1 -1
  227. package/dest/promise/running-promise.d.ts.map +1 -1
  228. package/dest/promise/utils.d.ts +1 -1
  229. package/dest/queue/base_memory_queue.d.ts +1 -1
  230. package/dest/queue/base_memory_queue.d.ts.map +1 -1
  231. package/dest/queue/batch_queue.d.ts +1 -1
  232. package/dest/queue/batch_queue.d.ts.map +1 -1
  233. package/dest/queue/bounded_serial_queue.d.ts +1 -1
  234. package/dest/queue/bounded_serial_queue.d.ts.map +1 -1
  235. package/dest/queue/fifo_memory_queue.d.ts +1 -1
  236. package/dest/queue/fifo_memory_queue.d.ts.map +1 -1
  237. package/dest/queue/index.d.ts +1 -1
  238. package/dest/queue/priority_memory_queue.d.ts +1 -1
  239. package/dest/queue/priority_memory_queue.d.ts.map +1 -1
  240. package/dest/queue/priority_queue.d.ts +1 -1
  241. package/dest/queue/priority_queue.d.ts.map +1 -1
  242. package/dest/queue/semaphore.d.ts +1 -1
  243. package/dest/queue/semaphore.d.ts.map +1 -1
  244. package/dest/queue/serial_queue.d.ts +1 -1
  245. package/dest/queue/serial_queue.d.ts.map +1 -1
  246. package/dest/retry/index.d.ts +1 -1
  247. package/dest/running-promise/index.d.ts +1 -1
  248. package/dest/schemas/api.d.ts +1 -1
  249. package/dest/schemas/index.d.ts +1 -1
  250. package/dest/schemas/parse.d.ts +1 -1
  251. package/dest/schemas/schemas.d.ts +13 -17
  252. package/dest/schemas/schemas.d.ts.map +1 -1
  253. package/dest/schemas/schemas.js +9 -10
  254. package/dest/schemas/types.d.ts +1 -1
  255. package/dest/schemas/utils.d.ts +4 -4
  256. package/dest/schemas/utils.d.ts.map +1 -1
  257. package/dest/schemas/utils.js +15 -5
  258. package/dest/serialize/buffer_reader.d.ts +3 -1
  259. package/dest/serialize/buffer_reader.d.ts.map +1 -1
  260. package/dest/serialize/buffer_reader.js +3 -0
  261. package/dest/serialize/field_reader.d.ts +2 -2
  262. package/dest/serialize/field_reader.d.ts.map +1 -1
  263. package/dest/serialize/field_reader.js +1 -1
  264. package/dest/serialize/free_funcs.d.ts +2 -2
  265. package/dest/serialize/free_funcs.d.ts.map +1 -1
  266. package/dest/serialize/free_funcs.js +1 -1
  267. package/dest/serialize/index.d.ts +1 -1
  268. package/dest/serialize/serialize.d.ts +2 -2
  269. package/dest/serialize/serialize.d.ts.map +1 -1
  270. package/dest/serialize/serialize.js +1 -1
  271. package/dest/serialize/type_registry.d.ts +1 -1
  272. package/dest/serialize/type_registry.d.ts.map +1 -1
  273. package/dest/serialize/types.d.ts +1 -1
  274. package/dest/sleep/index.d.ts +1 -1
  275. package/dest/sleep/index.d.ts.map +1 -1
  276. package/dest/string/index.d.ts +5 -1
  277. package/dest/string/index.d.ts.map +1 -1
  278. package/dest/string/index.js +19 -2
  279. package/dest/testing/files/index.d.ts +2 -1
  280. package/dest/testing/files/index.d.ts.map +1 -1
  281. package/dest/testing/files/index.js +1 -1
  282. package/dest/testing/formatting.d.ts +4 -0
  283. package/dest/testing/formatting.d.ts.map +1 -0
  284. package/dest/testing/formatting.js +3 -0
  285. package/dest/testing/index.d.ts +2 -1
  286. package/dest/testing/index.d.ts.map +1 -1
  287. package/dest/testing/index.js +1 -0
  288. package/dest/testing/port_allocator.d.ts +1 -1
  289. package/dest/testing/snapshot_serializer.d.ts +1 -1
  290. package/dest/testing/test_data.d.ts +1 -1
  291. package/dest/timer/date.d.ts +1 -1
  292. package/dest/timer/date.d.ts.map +1 -1
  293. package/dest/timer/elapsed.d.ts +1 -1
  294. package/dest/timer/index.d.ts +2 -2
  295. package/dest/timer/index.d.ts.map +1 -1
  296. package/dest/timer/index.js +1 -1
  297. package/dest/timer/timeout.d.ts +3 -1
  298. package/dest/timer/timeout.d.ts.map +1 -1
  299. package/dest/timer/timeout.js +9 -0
  300. package/dest/timer/timer.d.ts +1 -1
  301. package/dest/timer/timer.d.ts.map +1 -1
  302. package/dest/transport/dispatch/create_dispatch_fn.d.ts +1 -1
  303. package/dest/transport/dispatch/create_dispatch_fn.d.ts.map +1 -1
  304. package/dest/transport/dispatch/create_dispatch_proxy.d.ts +1 -1
  305. package/dest/transport/dispatch/messages.d.ts +1 -1
  306. package/dest/transport/index.d.ts +1 -1
  307. package/dest/transport/interface/connector.d.ts +1 -1
  308. package/dest/transport/interface/listener.d.ts +1 -1
  309. package/dest/transport/interface/socket.d.ts +1 -1
  310. package/dest/transport/interface/transferable.d.ts +1 -1
  311. package/dest/transport/node/index.d.ts +1 -1
  312. package/dest/transport/node/node_connector.d.ts +1 -1
  313. package/dest/transport/node/node_connector.d.ts.map +1 -1
  314. package/dest/transport/node/node_connector_socket.d.ts +1 -1
  315. package/dest/transport/node/node_connector_socket.d.ts.map +1 -1
  316. package/dest/transport/node/node_listener.d.ts +1 -1
  317. package/dest/transport/node/node_listener.d.ts.map +1 -1
  318. package/dest/transport/node/node_listener_socket.d.ts +1 -1
  319. package/dest/transport/node/node_listener_socket.d.ts.map +1 -1
  320. package/dest/transport/transport_client.d.ts +1 -1
  321. package/dest/transport/transport_client.d.ts.map +1 -1
  322. package/dest/transport/transport_server.d.ts +1 -10
  323. package/dest/transport/transport_server.d.ts.map +1 -1
  324. package/dest/trees/balanced_merkle_tree.d.ts +22 -0
  325. package/dest/trees/balanced_merkle_tree.d.ts.map +1 -0
  326. package/dest/trees/balanced_merkle_tree.js +66 -0
  327. package/dest/trees/hasher.d.ts +1 -1
  328. package/dest/trees/index.d.ts +2 -1
  329. package/dest/trees/index.d.ts.map +1 -1
  330. package/dest/trees/index.js +1 -0
  331. package/dest/trees/indexed_merkle_tree.d.ts +1 -1
  332. package/dest/trees/indexed_merkle_tree.d.ts.map +1 -1
  333. package/dest/trees/indexed_merkle_tree.js +1 -1
  334. package/dest/trees/indexed_merkle_tree_calculator.d.ts +1 -1
  335. package/dest/trees/indexed_merkle_tree_calculator.d.ts.map +1 -1
  336. package/dest/trees/indexed_tree_leaf.d.ts +1 -1
  337. package/dest/trees/membership_witness.d.ts +3 -24
  338. package/dest/trees/membership_witness.d.ts.map +1 -1
  339. package/dest/trees/membership_witness.js +1 -1
  340. package/dest/trees/merkle_tree.d.ts +1 -1
  341. package/dest/trees/merkle_tree.d.ts.map +1 -1
  342. package/dest/trees/merkle_tree_calculator.d.ts +2 -12
  343. package/dest/trees/merkle_tree_calculator.d.ts.map +1 -1
  344. package/dest/trees/merkle_tree_calculator.js +1 -31
  345. package/dest/trees/sibling_path.d.ts +5 -39
  346. package/dest/trees/sibling_path.d.ts.map +1 -1
  347. package/dest/trees/sibling_path.js +2 -2
  348. package/dest/trees/unbalanced_merkle_tree.d.ts +5 -4
  349. package/dest/trees/unbalanced_merkle_tree.d.ts.map +1 -1
  350. package/dest/trees/unbalanced_merkle_tree.js +33 -10
  351. package/dest/trees/unbalanced_merkle_tree_calculator.d.ts +27 -23
  352. package/dest/trees/unbalanced_merkle_tree_calculator.d.ts.map +1 -1
  353. package/dest/trees/unbalanced_merkle_tree_calculator.js +123 -97
  354. package/dest/trees/unbalanced_tree_store.d.ts +2 -1
  355. package/dest/trees/unbalanced_tree_store.d.ts.map +1 -1
  356. package/dest/trees/unbalanced_tree_store.js +6 -0
  357. package/dest/types/index.d.ts +1 -1
  358. package/dest/url/index.d.ts +1 -1
  359. package/dest/validation/index.d.ts +1 -1
  360. package/package.json +31 -8
  361. package/src/array/array.ts +0 -16
  362. package/src/branded-types/block_number.ts +112 -0
  363. package/src/branded-types/checkpoint_number.ts +100 -0
  364. package/src/branded-types/epoch.ts +88 -0
  365. package/src/branded-types/index.ts +6 -0
  366. package/src/branded-types/slot.ts +88 -0
  367. package/src/branded-types/types.ts +2 -0
  368. package/src/buffer/buffer16.ts +2 -2
  369. package/src/buffer/buffer32.ts +2 -2
  370. package/src/collection/array.ts +15 -3
  371. package/src/collection/object.ts +8 -0
  372. package/src/config/env_var.ts +38 -21
  373. package/src/config/index.ts +23 -3
  374. package/src/config/network_config.ts +16 -0
  375. package/src/config/network_name.ts +18 -3
  376. package/src/crypto/aes128/index.ts +19 -10
  377. package/src/crypto/bls/bn254_keystore.ts +287 -0
  378. package/src/crypto/bls/index.ts +77 -0
  379. package/src/crypto/bn254/index.ts +64 -0
  380. package/src/crypto/ecdsa/index.ts +40 -37
  381. package/src/crypto/ecdsa/signature.ts +2 -2
  382. package/src/crypto/grumpkin/index.ts +38 -46
  383. package/src/crypto/keys/index.ts +6 -6
  384. package/src/crypto/pedersen/pedersen.wasm.ts +23 -19
  385. package/src/crypto/poseidon/index.ts +33 -25
  386. package/src/crypto/schnorr/index.ts +22 -18
  387. package/src/crypto/schnorr/signature.ts +2 -2
  388. package/src/crypto/secp256k1/index.ts +15 -11
  389. package/src/crypto/secp256k1-signer/utils.ts +115 -7
  390. package/src/crypto/sha256/index.ts +1 -1
  391. package/src/crypto/sha512/index.ts +1 -1
  392. package/src/crypto/signature/index.ts +1 -1
  393. package/src/crypto/sync/index.ts +1 -1
  394. package/src/crypto/sync/pedersen/index.ts +17 -16
  395. package/src/crypto/sync/poseidon/index.ts +28 -23
  396. package/src/{fields/bls12_fields.ts → curves/bls12/field.ts} +6 -6
  397. package/src/curves/bls12/index.ts +2 -0
  398. package/src/{fields/bls12_point.ts → curves/bls12/point.ts} +14 -14
  399. package/src/{fields/fields.ts → curves/bn254/field.ts} +41 -19
  400. package/src/curves/bn254/index.ts +2 -0
  401. package/src/curves/bn254/point.ts +170 -0
  402. package/src/curves/grumpkin/index.ts +11 -0
  403. package/src/{fields → curves/grumpkin}/point.ts +26 -7
  404. package/src/eth-address/index.ts +28 -3
  405. package/src/eth-signature/eth_signature.ts +2 -4
  406. package/src/json-rpc/client/safe_json_rpc_client.ts +9 -0
  407. package/src/log/log_fn.ts +1 -1
  408. package/src/log/pino-logger.ts +0 -1
  409. package/src/profiler/index.ts +1 -0
  410. package/src/profiler/profiler.ts +125 -0
  411. package/src/schemas/schemas.ts +16 -13
  412. package/src/schemas/utils.ts +21 -8
  413. package/src/serialize/buffer_reader.ts +5 -0
  414. package/src/serialize/field_reader.ts +1 -1
  415. package/src/serialize/free_funcs.ts +1 -1
  416. package/src/serialize/serialize.ts +1 -1
  417. package/src/string/index.ts +24 -1
  418. package/src/testing/files/index.ts +1 -1
  419. package/src/testing/formatting.ts +3 -0
  420. package/src/testing/index.ts +1 -0
  421. package/src/timer/index.ts +1 -1
  422. package/src/timer/timeout.ts +13 -0
  423. package/src/trees/balanced_merkle_tree.ts +84 -0
  424. package/src/trees/index.ts +1 -0
  425. package/src/trees/indexed_merkle_tree.ts +1 -1
  426. package/src/trees/membership_witness.ts +1 -1
  427. package/src/trees/merkle_tree_calculator.ts +1 -34
  428. package/src/trees/sibling_path.ts +2 -2
  429. package/src/trees/unbalanced_merkle_tree.ts +55 -7
  430. package/src/trees/unbalanced_merkle_tree_calculator.ts +134 -93
  431. package/src/trees/unbalanced_tree_store.ts +5 -1
  432. package/dest/crypto/index.d.ts +0 -15
  433. package/dest/crypto/index.d.ts.map +0 -1
  434. package/dest/crypto/index.js +0 -14
  435. package/dest/fields/bls12_fields.d.ts.map +0 -1
  436. package/dest/fields/bls12_point.d.ts.map +0 -1
  437. package/dest/fields/coordinate.d.ts +0 -66
  438. package/dest/fields/coordinate.d.ts.map +0 -1
  439. package/dest/fields/coordinate.js +0 -96
  440. package/dest/fields/fields.d.ts.map +0 -1
  441. package/dest/fields/index.d.ts +0 -6
  442. package/dest/fields/index.d.ts.map +0 -1
  443. package/dest/fields/index.js +0 -5
  444. package/dest/fields/point.d.ts.map +0 -1
  445. package/dest/index.d.ts +0 -29
  446. package/dest/index.d.ts.map +0 -1
  447. package/dest/index.js +0 -29
  448. package/src/crypto/index.ts +0 -14
  449. package/src/fields/coordinate.ts +0 -104
  450. package/src/fields/index.ts +0 -5
  451. package/src/index.ts +0 -29
@@ -1,37 +1,52 @@
1
- import { type Bufferable, serializeToBuffer } from '@aztec/foundation/serialize';
2
- import type { AsyncHasher } from '@aztec/foundation/trees';
3
- import { SiblingPath } from '@aztec/foundation/trees';
4
-
5
- import { sha256Trunc } from '../crypto/index.js';
1
+ import { shaMerkleHash } from './balanced_merkle_tree.js';
2
+ import type { Hasher } from './hasher.js';
3
+ import { SiblingPath } from './sibling_path.js';
4
+ import { type TreeNodeLocation, UnbalancedTreeStore } from './unbalanced_tree_store.js';
5
+
6
+ export function computeCompressedUnbalancedMerkleTreeRoot(
7
+ leaves: Buffer[],
8
+ valueToCompress = Buffer.alloc(32),
9
+ emptyRoot = Buffer.alloc(32),
10
+ hasher?: Hasher['hash'],
11
+ ): Buffer {
12
+ const calculator = UnbalancedMerkleTreeCalculator.create(leaves, valueToCompress, emptyRoot, hasher);
13
+ return calculator.getRoot();
14
+ }
6
15
 
7
- const indexToKeyHash = (level: number, index: bigint) => `${level}:${index}`;
16
+ interface TreeNode {
17
+ value: Buffer;
18
+ leafIndex?: number;
19
+ }
8
20
 
9
21
  /**
10
22
  * An ephemeral unbalanced Merkle tree implementation.
11
23
  * Follows the rollup implementation which greedily hashes pairs of nodes up the tree.
12
24
  * Remaining rightmost nodes are shifted up until they can be paired.
25
+ * The values that match the `valueToCompress` are skipped and the sibling of the compressed leaf are shifted up until
26
+ * they can be paired.
13
27
  * If there is only one leaf, the root is the leaf.
14
28
  */
15
29
  export class UnbalancedMerkleTreeCalculator {
16
- // This map stores index and depth -> value
17
- private cache: { [key: string]: Buffer } = {};
18
- // This map stores value -> index and depth, since we have variable depth
19
- private valueCache: { [key: string]: string } = {};
20
- protected size: bigint = 0n;
21
-
22
- root: Buffer = Buffer.alloc(32);
30
+ private store: UnbalancedTreeStore<TreeNode>;
31
+ private leafLocations: TreeNodeLocation[] = [];
23
32
 
24
33
  public constructor(
25
- private maxDepth: number,
26
- private hasher: AsyncHasher['hash'],
27
- ) {}
34
+ private readonly leaves: Buffer[],
35
+ private readonly valueToCompress: Buffer,
36
+ private readonly emptyRoot: Buffer,
37
+ private readonly hasher: Hasher['hash'],
38
+ ) {
39
+ this.store = new UnbalancedTreeStore(leaves.length);
40
+ this.buildTree();
41
+ }
28
42
 
29
43
  static create(
30
- height: number,
31
- hasher = (left: Buffer, right: Buffer) =>
32
- Promise.resolve(sha256Trunc(Buffer.concat([left, right])) as Buffer<ArrayBuffer>),
44
+ leaves: Buffer[],
45
+ valueToCompress = Buffer.alloc(0),
46
+ emptyRoot = Buffer.alloc(32),
47
+ hasher = shaMerkleHash,
33
48
  ) {
34
- return new UnbalancedMerkleTreeCalculator(height, hasher);
49
+ return new UnbalancedMerkleTreeCalculator(leaves, valueToCompress, emptyRoot, hasher);
35
50
  }
36
51
 
37
52
  /**
@@ -39,108 +54,134 @@ export class UnbalancedMerkleTreeCalculator {
39
54
  * @returns The root of the tree.
40
55
  */
41
56
  public getRoot(): Buffer {
42
- return this.root;
57
+ return this.store.getRoot()!.value;
43
58
  }
44
59
 
45
60
  /**
46
- * Returns a sibling path for the element at the given index.
61
+ * Returns a sibling path for the element.
47
62
  * @param value - The value of the element.
48
63
  * @returns A sibling path for the element.
49
64
  * Note: The sibling path is an array of sibling hashes, with the lowest hash (leaf hash) first, and the highest hash last.
50
65
  */
51
- public getSiblingPath<N extends number>(value: Bufferable): Promise<SiblingPath<N>> {
52
- if (this.size === 1n) {
53
- return Promise.resolve(new SiblingPath<N>(0 as N, []));
66
+ public getSiblingPath<N extends number>(value: Buffer): SiblingPath<N> {
67
+ const leafIndex = this.leaves.findIndex(leaf => leaf.equals(value));
68
+ if (leafIndex === -1) {
69
+ throw Error(`Leaf value ${value.toString('hex')} not found in tree.`);
54
70
  }
55
71
 
56
- const path: Buffer[] = [];
57
- const [depth, _index] = this.valueCache[serializeToBuffer(value).toString('hex')].split(':');
58
- let level = parseInt(depth, 10);
59
- let index = BigInt(_index);
60
- while (level > 0) {
61
- const isRight = index & 0x01n;
62
- const key = indexToKeyHash(level, isRight ? index - 1n : index + 1n);
63
- const sibling = this.cache[key];
64
- path.push(sibling);
65
- level -= 1;
66
- index >>= 1n;
67
- }
68
- return Promise.resolve(new SiblingPath<N>(parseInt(depth, 10) as N, path));
72
+ return this.getSiblingPathByLeafIndex(leafIndex);
69
73
  }
70
74
 
71
75
  /**
72
- * Appends the given leaves to the tree.
73
- * @param leaves - The leaves to append.
74
- * @returns Empty promise.
76
+ * Returns a sibling path for the leaf at the given index.
77
+ * @param leafIndex - The index of the leaf.
78
+ * @returns A sibling path for the leaf.
75
79
  */
76
- public async appendLeaves(leaves: Buffer[]): Promise<void> {
77
- if (this.size != BigInt(0)) {
78
- throw Error(`Can't re-append to an unbalanced tree. Current has ${this.size} leaves.`);
80
+ public getSiblingPathByLeafIndex<N extends number>(leafIndex: number): SiblingPath<N> {
81
+ if (leafIndex >= this.leaves.length) {
82
+ throw Error(`Leaf index ${leafIndex} out of bounds. Tree has ${this.leaves.length} leaves.`);
79
83
  }
80
- if (leaves.length === 0) {
81
- throw Error(`Can't append 0 leaves to an unbalanced tree.`);
84
+
85
+ const leaf = this.leaves[leafIndex];
86
+ if (leaf.equals(this.valueToCompress)) {
87
+ throw Error(`Leaf at index ${leafIndex} has been compressed.`);
82
88
  }
83
89
 
84
- if (leaves.length === 1) {
85
- this.root = leaves[0];
86
- } else {
87
- this.root = await this.batchInsert(leaves);
90
+ const path: Buffer[] = [];
91
+ let location = this.leafLocations[leafIndex];
92
+ while (location.level > 0) {
93
+ const sibling = this.store.getSibling(location)!;
94
+ path.push(sibling.value);
95
+ location = this.store.getParentLocation(location);
88
96
  }
89
97
 
90
- this.size = BigInt(leaves.length);
98
+ return new SiblingPath<N>(path.length as N, path);
99
+ }
91
100
 
92
- return Promise.resolve();
101
+ public getLeafLocation(leafIndex: number) {
102
+ return this.leafLocations[leafIndex];
93
103
  }
94
104
 
95
105
  /**
96
- * Calculates root while adding leaves and nodes to the cache.
97
- * @param leaves - The leaves to append.
98
- * @returns Resulting root of the tree.
106
+ * Adds leaves and nodes to the store. Updates the leafLocations.
107
+ * @param leaves - The leaves of the tree.
99
108
  */
100
- private async batchInsert(_leaves: Buffer[]): Promise<Buffer> {
101
- // If we have an even number of leaves, hash them all in pairs
102
- // Otherwise, store the final leaf to be shifted up to the next odd sized level
103
- let [layerWidth, nodeToShift] =
104
- _leaves.length & 1
105
- ? [_leaves.length - 1, serializeToBuffer(_leaves[_leaves.length - 1])]
106
- : [_leaves.length, Buffer.alloc(0)];
107
- // Allocate this layer's leaves and init the next layer up
108
- let thisLayer = _leaves.slice(0, layerWidth).map(l => serializeToBuffer(l));
109
- let nextLayer = [];
110
- // Store the bottom level leaves
111
- thisLayer.forEach((leaf, i) => this.storeNode(leaf, this.maxDepth, BigInt(i)));
112
- for (let i = 0; i < this.maxDepth; i++) {
113
- for (let j = 0; j < layerWidth; j += 2) {
114
- // Store the hash of each pair one layer up
115
- nextLayer[j / 2] = await this.hasher(serializeToBuffer(thisLayer[j]), serializeToBuffer(thisLayer[j + 1]));
116
- this.storeNode(nextLayer[j / 2], this.maxDepth - i - 1, BigInt(j >> 1));
117
- }
118
- layerWidth /= 2;
119
- if (layerWidth & 1) {
120
- if (nodeToShift.length) {
121
- // If the next layer has odd length, and we have a node that needs to be shifted up, add it here
122
- nextLayer.push(serializeToBuffer(nodeToShift));
123
- this.storeNode(nodeToShift, this.maxDepth - i - 1, BigInt((layerWidth * 2) >> 1));
124
- layerWidth += 1;
125
- nodeToShift = Buffer.alloc(0);
109
+ private buildTree() {
110
+ this.leafLocations = this.leaves.map((value, i) => this.store.setLeaf(i, { value, leafIndex: i }));
111
+
112
+ // Start with the leaves that are not compressed.
113
+ let toProcess = this.leafLocations.filter((_, i) => !this.leaves[i].equals(this.valueToCompress));
114
+ if (!toProcess.length) {
115
+ // All leaves are compressed. Set empty root to the root.
116
+ this.store.setNode({ level: 0, index: 0 }, { value: this.emptyRoot });
117
+ return;
118
+ }
119
+
120
+ const level = toProcess[0].level;
121
+ for (let i = level; i > 0; i--) {
122
+ const toProcessNext = [];
123
+ for (const location of toProcess) {
124
+ if (location.level !== i) {
125
+ toProcessNext.push(location);
126
+ continue;
127
+ }
128
+
129
+ const parentLocation = this.store.getParentLocation(location);
130
+ if (this.store.getNode(parentLocation)) {
131
+ // Parent has been updated by its (left) sibling.
132
+ continue;
133
+ }
134
+
135
+ const sibling = this.store.getSibling(location);
136
+ // If sibling is undefined, all its children are compressed.
137
+ const shouldShiftUp = !sibling || sibling.value.equals(this.valueToCompress);
138
+ if (shouldShiftUp) {
139
+ // The node becomes the parent if the sibling is a compressed leaf.
140
+ this.shiftNodeUp(location, parentLocation);
126
141
  } else {
127
- // If we don't have a node waiting to be shifted, store the next layer's final node to be shifted
128
- layerWidth -= 1;
129
- nodeToShift = nextLayer[layerWidth];
142
+ // Hash the value with the (right) sibling and update the parent node.
143
+ const node = this.store.getNode(location)!;
144
+ const parentValue = this.hasher(node.value, sibling.value);
145
+ this.store.setNode(parentLocation, { value: parentValue });
130
146
  }
147
+
148
+ // Add the parent location to be processed next.
149
+ toProcessNext.push(parentLocation);
131
150
  }
132
- // reset the layers
133
- thisLayer = nextLayer;
134
- nextLayer = [];
151
+
152
+ toProcess = toProcessNext;
135
153
  }
154
+ }
136
155
 
137
- // return the root
138
- return thisLayer[0];
156
+ private shiftNodeUp(from: TreeNodeLocation, to: TreeNodeLocation) {
157
+ // Collect all nodes that need to shift.
158
+ const nodesToShift = this.collectNodesToShift(from, to);
159
+ // Move all nodes to their new locations.
160
+ for (const { node, newLocation } of nodesToShift) {
161
+ this.store.setNode(newLocation, node);
162
+ if (node.leafIndex !== undefined) {
163
+ this.leafLocations[node.leafIndex] = newLocation;
164
+ }
165
+ }
139
166
  }
140
167
 
141
- private storeNode(value: Buffer, depth: number, index: bigint) {
142
- const key = indexToKeyHash(depth, index);
143
- this.cache[key] = value;
144
- this.valueCache[value.toString('hex')] = key;
168
+ private collectNodesToShift(from: TreeNodeLocation, to: TreeNodeLocation) {
169
+ const node = this.store.getNode(from);
170
+ if (!node) {
171
+ return [];
172
+ }
173
+
174
+ let result = [{ node, newLocation: to }];
175
+
176
+ // If not a leaf, collect its children.
177
+ if (node.leafIndex === undefined) {
178
+ const [leftChild, rightChild] = this.store.getChildLocations(from);
179
+ const [leftChildNew, rightChildNew] = this.store.getChildLocations(to);
180
+ result = result
181
+ .concat(this.collectNodesToShift(leftChild, leftChildNew))
182
+ .concat(this.collectNodesToShift(rightChild, rightChildNew));
183
+ }
184
+
185
+ return result;
145
186
  }
146
187
  }
@@ -68,7 +68,7 @@ export class UnbalancedTreeStore<T> {
68
68
  return [left, right];
69
69
  }
70
70
 
71
- getLeaf(leafIndex: number) {
71
+ getLeaf(leafIndex: number): T | undefined {
72
72
  const { level, indexAtLevel } = findLeafLevelAndIndex(this.#numLeaves, leafIndex);
73
73
  const location = {
74
74
  level,
@@ -81,6 +81,10 @@ export class UnbalancedTreeStore<T> {
81
81
  return this.#nodeMapping.get(this.#getKey(location))?.value;
82
82
  }
83
83
 
84
+ getRoot(): T | undefined {
85
+ return this.getNode({ level: 0, index: 0 });
86
+ }
87
+
84
88
  getParent(location: TreeNodeLocation): T | undefined {
85
89
  const parentLocation = this.getParentLocation(location);
86
90
  return this.getNode(parentLocation);
@@ -1,15 +0,0 @@
1
- export * from './keccak/index.js';
2
- export * from './random/index.js';
3
- export * from './sha256/index.js';
4
- export * from './sha512/index.js';
5
- export * from './pedersen/index.js';
6
- export * from './poseidon/index.js';
7
- export * from './secp256k1-signer/index.js';
8
- export * from './keys/index.js';
9
- export * from './aes128/index.js';
10
- export * from './grumpkin/index.js';
11
- export * from './ecdsa/index.js';
12
- export * from './secp256k1/index.js';
13
- export * from './schnorr/index.js';
14
- export * from './signature/index.js';
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/crypto/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
@@ -1,14 +0,0 @@
1
- export * from './keccak/index.js';
2
- export * from './random/index.js';
3
- export * from './sha256/index.js';
4
- export * from './sha512/index.js';
5
- export * from './pedersen/index.js';
6
- export * from './poseidon/index.js';
7
- export * from './secp256k1-signer/index.js';
8
- export * from './keys/index.js';
9
- export * from './aes128/index.js';
10
- export * from './grumpkin/index.js';
11
- export * from './ecdsa/index.js';
12
- export * from './secp256k1/index.js';
13
- export * from './schnorr/index.js';
14
- export * from './signature/index.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"bls12_fields.d.ts","sourceRoot":"","sources":["../../src/fields/bls12_fields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAK/B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAcjC;;GAEG;AACH,8BAAsB,UAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAS;IAE1B,SAAS,aAAa,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAmBrD,SAAS,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;IACpC,SA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AO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU;CAQtD;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO;CAIpC"}
@@ -1,66 +0,0 @@
1
- import type { Tuple } from '../serialize/types.js';
2
- import { Fr } from './fields.js';
3
- /**
4
- * Class to wrap a single point coordinate.
5
- * This class handles the complexities of representing point coordinates as 32 byte buffers as well as fields.
6
- * The coordinate value is split across 2 fields to ensure that the max size of a field is not breached.
7
- * This is achieved by placing the most significant byte of the lower field into the least significant byte of the higher field.
8
- * Calls to 'toBuffer' or 'toBigInt' undo this change and simply return the original 32 byte value.
9
- * Calls to 'toFieldsBuffer' will return a 64 bytes buffer containing the serialized fields.
10
- */
11
- export declare class Coordinate {
12
- /**
13
- * The fields of the coordinate value. Least significant limb at index 0.
14
- */
15
- fields: Tuple<Fr, 2>;
16
- static ZERO: Coordinate;
17
- constructor(
18
- /**
19
- * The fields of the coordinate value. Least significant limb at index 0.
20
- */
21
- fields: Tuple<Fr, 2>);
22
- /**
23
- * Converts the coordinate data into a tuple of fields
24
- * @returns A tuple of the coordinate fields
25
- */
26
- toFields(): Tuple<Fr, 2>;
27
- /**
28
- * Generates a random coordinate value
29
- * @returns The random coordinate
30
- */
31
- static random(): Coordinate;
32
- /**
33
- * serializes the object to buffer of 2 fields.
34
- * @returns A buffer serialization of the object.
35
- */
36
- toFieldsBuffer(): Buffer;
37
- /**
38
- * serializes the coordinate to a single 32 byte buffer.
39
- * @returns A buffer serialization of the object.
40
- */
41
- toBuffer(): Buffer;
42
- /**
43
- * Returns true if this coordinate is equal to the one provided
44
- * @param other - The coordinate against which to compare
45
- * @returns True if the coordinates are the same, false otherwise
46
- */
47
- equals(other: Coordinate): boolean;
48
- /**
49
- * Returns the coordinate's value as a bigint
50
- * @returns The coordinate value as a bigint
51
- */
52
- toBigInt(): bigint;
53
- /**
54
- * Creates a coordinate object from a 32 byte coordinate value
55
- * @param coordinate - A buffer containing the 32 byte coordinate value
56
- * @returns The new coordinate object
57
- */
58
- static fromBuffer(coordinate: Buffer): Coordinate;
59
- /**
60
- * Creates a coordinate object from a field
61
- * @param coordinate - The field containing the coordinate
62
- * @returns The new coordinate object
63
- */
64
- static fromField(coordinate: Fr): Coordinate;
65
- }
66
- //# sourceMappingURL=coordinate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coordinate.d.ts","sourceRoot":"","sources":["../../src/fields/coordinate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,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,96 +0,0 @@
1
- import { toBigIntBE } from '../bigint-buffer/index.js';
2
- import { Fr } from './fields.js';
3
- /**
4
- * Class to wrap a single point coordinate.
5
- * This class handles the complexities of representing point coordinates as 32 byte buffers as well as fields.
6
- * The coordinate value is split across 2 fields to ensure that the max size of a field is not breached.
7
- * This is achieved by placing the most significant byte of the lower field into the least significant byte of the higher field.
8
- * Calls to 'toBuffer' or 'toBigInt' undo this change and simply return the original 32 byte value.
9
- * Calls to 'toFieldsBuffer' will return a 64 bytes buffer containing the serialized fields.
10
- */ export class Coordinate {
11
- fields;
12
- static ZERO = new Coordinate([
13
- Fr.ZERO,
14
- Fr.ZERO
15
- ]);
16
- constructor(/**
17
- * The fields of the coordinate value. Least significant limb at index 0.
18
- */ fields){
19
- this.fields = fields;
20
- }
21
- /**
22
- * Converts the coordinate data into a tuple of fields
23
- * @returns A tuple of the coordinate fields
24
- */ toFields() {
25
- return this.fields;
26
- }
27
- /**
28
- * Generates a random coordinate value
29
- * @returns The random coordinate
30
- */ static random() {
31
- return this.fromField(Fr.random());
32
- }
33
- /**
34
- * serializes the object to buffer of 2 fields.
35
- * @returns A buffer serialization of the object.
36
- */ toFieldsBuffer() {
37
- return Buffer.concat([
38
- this.fields[0].toBuffer(),
39
- this.fields[1].toBuffer()
40
- ]);
41
- }
42
- /**
43
- * serializes the coordinate to a single 32 byte buffer.
44
- * @returns A buffer serialization of the object.
45
- */ toBuffer() {
46
- const buf0 = this.fields[0].toBuffer();
47
- const buf1 = this.fields[1].toBuffer();
48
- buf0[0] = buf1[31];
49
- return buf0;
50
- }
51
- /**
52
- * Returns true if this coordinate is equal to the one provided
53
- * @param other - The coordinate against which to compare
54
- * @returns True if the coordinates are the same, false otherwise
55
- */ equals(other) {
56
- return this.toBigInt() === other.toBigInt();
57
- }
58
- /**
59
- * Returns the coordinate's value as a bigint
60
- * @returns The coordinate value as a bigint
61
- */ toBigInt() {
62
- return toBigIntBE(this.toBuffer());
63
- }
64
- /**
65
- * Creates a coordinate object from a 32 byte coordinate value
66
- * @param coordinate - A buffer containing the 32 byte coordinate value
67
- * @returns The new coordinate object
68
- */ static fromBuffer(coordinate) {
69
- if (coordinate.length != 32) {
70
- throw new Error(`Invalid size of coordinate buffer`);
71
- }
72
- const buf0 = Buffer.alloc(32);
73
- coordinate.copy(buf0, 0, 0, 32);
74
- const buf1 = Buffer.alloc(32);
75
- buf1[31] = buf0[0];
76
- buf0[0] = 0;
77
- return new Coordinate([
78
- Fr.fromBuffer(buf0),
79
- Fr.fromBuffer(buf1)
80
- ]);
81
- }
82
- /**
83
- * Creates a coordinate object from a field
84
- * @param coordinate - The field containing the coordinate
85
- * @returns The new coordinate object
86
- */ static fromField(coordinate) {
87
- const buf0 = coordinate.toBuffer();
88
- const buf1 = Buffer.alloc(32);
89
- buf1[31] = buf0[0];
90
- buf0[0] = 0;
91
- return new Coordinate([
92
- Fr.fromBuffer(buf0),
93
- Fr.fromBuffer(buf1)
94
- ]);
95
- }
96
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/fields/fields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAK/B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAO7D;;GAEG;AACH,KAAK,YAAY,CAAC,CAAC,SAAS,SAAS,IAAI;IACvC,KAAK,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;GAKG;AACH,uBAAe,SAAS;IACtB,MAAM,CAAC,aAAa,SAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAS;IAE1B;;;SAGK;IACL,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,iCAAiC;IACjC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,SAAS,aAAa,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM;IAwB3E,SAAS,CAAC,QAAQ,CAAC,OAAO,IAAI,MAAM;IAEpC;;OAEG;IACH,QAAQ,IAAI,MAAM;IAO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,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE;IAIzC,GAAG,CAAC,GAAG,EAAE,EAAE;IAIX,MAAM;IAIN,QAAQ;IAOR,MAAM,KAAK,MAAM,2CAEhB;CACF;AAgCD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC;AAChC,eAAO,MAAM,cAAc,WAAK,CAAC;AAEjC,6GAA6G;AAC7G,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,SAAS,SAAS,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,IAC3G,OAAO,MAAM,YACtB"}
@@ -1,6 +0,0 @@
1
- export * from './fields.js';
2
- export * from './point.js';
3
- export * from './coordinate.js';
4
- export * from './bls12_fields.js';
5
- export * from './bls12_point.js';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './fields.js';
2
- export * from './point.js';
3
- export * from './coordinate.js';
4
- export * from './bls12_fields.js';
5
- export * from './bls12_point.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../src/fields/point.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAqB,MAAM,uBAAuB,CAAC;AAErF,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC;;;;;GAKG;AACH,qBAAa,KAAK;IASd;;OAEG;aACa,CAAC,EAAE,EAAE;IACrB;;OAEG;aACa,CAAC,EAAE,EA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IJ;;;OAGG;IACH,IAAW,GAAG,YAEb;IAED,YAAY;CAYb;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,CAAC,EAAE,EAAE;CAIlB"}
package/dest/index.d.ts DELETED
@@ -1,29 +0,0 @@
1
- export * as asyncMap from './async-map/index.js';
2
- export * as bigintBuffer from './bigint-buffer/index.js';
3
- export * as collection from './collection/index.js';
4
- export * as committable from './committable/index.js';
5
- export * as crypto from './crypto/index.js';
6
- export * as errors from './error/index.js';
7
- export * as ethAddress from './eth-address/index.js';
8
- export * as fields from './fields/index.js';
9
- export * as fifo from './queue/index.js';
10
- export * as fs from './fs/index.js';
11
- export * as jsonRpc from './json-rpc/index.js';
12
- export * as jsonRpcClient from './json-rpc/client/index.js';
13
- export * as jsonRpcServer from './json-rpc/server/index.js';
14
- export * as log from './log/index.js';
15
- export * as mutex from './mutex/index.js';
16
- export * as retry from './retry/index.js';
17
- export * as runningPromise from './running-promise/index.js';
18
- export * as serialize from './serialize/index.js';
19
- export * as sleep from './sleep/index.js';
20
- export * as timer from './timer/index.js';
21
- export * as transport from './transport/index.js';
22
- export * as trees from './trees/index.js';
23
- export * as types from './types/index.js';
24
- export * as url from './url/index.js';
25
- export * as testing from './testing/index.js';
26
- export * as config from './config/index.js';
27
- export * as buffer from './buffer/index.js';
28
- export * as ethSignature from './eth-signature/index.js';
29
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC"}
package/dest/index.js DELETED
@@ -1,29 +0,0 @@
1
- // Reexport all folders at the root for packages targeting CommonJS
2
- export * as asyncMap from './async-map/index.js';
3
- export * as bigintBuffer from './bigint-buffer/index.js';
4
- export * as collection from './collection/index.js';
5
- export * as committable from './committable/index.js';
6
- export * as crypto from './crypto/index.js';
7
- export * as errors from './error/index.js';
8
- export * as ethAddress from './eth-address/index.js';
9
- export * as fields from './fields/index.js';
10
- export * as fifo from './queue/index.js';
11
- export * as fs from './fs/index.js';
12
- export * as jsonRpc from './json-rpc/index.js';
13
- export * as jsonRpcClient from './json-rpc/client/index.js';
14
- export * as jsonRpcServer from './json-rpc/server/index.js';
15
- export * as log from './log/index.js';
16
- export * as mutex from './mutex/index.js';
17
- export * as retry from './retry/index.js';
18
- export * as runningPromise from './running-promise/index.js';
19
- export * as serialize from './serialize/index.js';
20
- export * as sleep from './sleep/index.js';
21
- export * as timer from './timer/index.js';
22
- export * as transport from './transport/index.js';
23
- export * as trees from './trees/index.js';
24
- export * as types from './types/index.js';
25
- export * as url from './url/index.js';
26
- export * as testing from './testing/index.js';
27
- export * as config from './config/index.js';
28
- export * as buffer from './buffer/index.js';
29
- export * as ethSignature from './eth-signature/index.js';
@@ -1,14 +0,0 @@
1
- export * from './keccak/index.js';
2
- export * from './random/index.js';
3
- export * from './sha256/index.js';
4
- export * from './sha512/index.js';
5
- export * from './pedersen/index.js';
6
- export * from './poseidon/index.js';
7
- export * from './secp256k1-signer/index.js';
8
- export * from './keys/index.js';
9
- export * from './aes128/index.js';
10
- export * from './grumpkin/index.js';
11
- export * from './ecdsa/index.js';
12
- export * from './secp256k1/index.js';
13
- export * from './schnorr/index.js';
14
- export * from './signature/index.js';