@aztec/foundation 0.0.0-test.1 → 0.0.1-commit.017a351

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 (777) hide show
  1. package/dest/array/array.d.ts +6 -9
  2. package/dest/array/array.d.ts.map +1 -1
  3. package/dest/array/array.js +11 -11
  4. package/dest/array/index.d.ts +2 -1
  5. package/dest/array/index.d.ts.map +1 -1
  6. package/dest/array/index.js +1 -0
  7. package/dest/array/sorted_array.d.ts +15 -0
  8. package/dest/array/sorted_array.d.ts.map +1 -0
  9. package/dest/array/sorted_array.js +109 -0
  10. package/dest/async-map/index.d.ts +1 -1
  11. package/dest/async-pool/index.d.ts +1 -1
  12. package/dest/async-pool/index.d.ts.map +1 -1
  13. package/dest/async-pool/index.js +1 -0
  14. package/dest/bigint/index.d.ts +7 -0
  15. package/dest/bigint/index.d.ts.map +1 -0
  16. package/dest/bigint/index.js +15 -0
  17. package/dest/bigint-buffer/index.d.ts +1 -3
  18. package/dest/bigint-buffer/index.d.ts.map +1 -1
  19. package/dest/bigint-buffer/index.js +6 -1
  20. package/dest/branded-types/block_number.d.ts +56 -0
  21. package/dest/branded-types/block_number.d.ts.map +1 -0
  22. package/dest/branded-types/block_number.js +89 -0
  23. package/dest/branded-types/buffer32_hash.d.ts +27 -0
  24. package/dest/branded-types/buffer32_hash.d.ts.map +1 -0
  25. package/dest/branded-types/buffer32_hash.js +12 -0
  26. package/dest/branded-types/checkpoint_number.d.ts +60 -0
  27. package/dest/branded-types/checkpoint_number.d.ts.map +1 -0
  28. package/dest/branded-types/checkpoint_number.js +88 -0
  29. package/dest/branded-types/epoch.d.ts +42 -0
  30. package/dest/branded-types/epoch.d.ts.map +1 -0
  31. package/dest/branded-types/epoch.js +59 -0
  32. package/dest/branded-types/index.d.ts +8 -0
  33. package/dest/branded-types/index.d.ts.map +1 -0
  34. package/dest/branded-types/index.js +6 -0
  35. package/dest/branded-types/index_within_checkpoint.d.ts +42 -0
  36. package/dest/branded-types/index_within_checkpoint.d.ts.map +1 -0
  37. package/dest/branded-types/index_within_checkpoint.js +59 -0
  38. package/dest/branded-types/slot.d.ts +45 -0
  39. package/dest/branded-types/slot.d.ts.map +1 -0
  40. package/dest/branded-types/slot.js +62 -0
  41. package/dest/branded-types/types.d.ts +5 -0
  42. package/dest/branded-types/types.d.ts.map +1 -0
  43. package/dest/branded-types/types.js +1 -0
  44. package/dest/buffer/buffer16.d.ts +82 -0
  45. package/dest/buffer/buffer16.d.ts.map +1 -0
  46. package/dest/buffer/buffer16.js +102 -0
  47. package/dest/buffer/buffer32.d.ts +32 -69
  48. package/dest/buffer/buffer32.d.ts.map +1 -1
  49. package/dest/buffer/buffer32.js +36 -68
  50. package/dest/buffer/index.d.ts +3 -1
  51. package/dest/buffer/index.d.ts.map +1 -1
  52. package/dest/buffer/index.js +2 -0
  53. package/dest/buffer/utils.d.ts +3 -0
  54. package/dest/buffer/utils.d.ts.map +1 -0
  55. package/dest/buffer/utils.js +7 -0
  56. package/dest/collection/array.d.ts +38 -4
  57. package/dest/collection/array.d.ts.map +1 -1
  58. package/dest/collection/array.js +141 -3
  59. package/dest/collection/index.d.ts +3 -1
  60. package/dest/collection/index.d.ts.map +1 -1
  61. package/dest/collection/index.js +2 -0
  62. package/dest/collection/lru_map.d.ts +41 -0
  63. package/dest/collection/lru_map.d.ts.map +1 -0
  64. package/dest/collection/lru_map.js +119 -0
  65. package/dest/collection/lru_set.d.ts +35 -0
  66. package/dest/collection/lru_set.d.ts.map +1 -0
  67. package/dest/collection/lru_set.js +95 -0
  68. package/dest/collection/object.d.ts +17 -1
  69. package/dest/collection/object.d.ts.map +1 -1
  70. package/dest/collection/object.js +25 -0
  71. package/dest/committable/committable.d.ts +1 -1
  72. package/dest/committable/committable.d.ts.map +1 -1
  73. package/dest/committable/committable.js +1 -1
  74. package/dest/committable/index.d.ts +1 -1
  75. package/dest/config/env_var.d.ts +2 -2
  76. package/dest/config/env_var.d.ts.map +1 -1
  77. package/dest/config/index.d.ts +88 -13
  78. package/dest/config/index.d.ts.map +1 -1
  79. package/dest/config/index.js +153 -22
  80. package/dest/config/network_config.d.ts +28 -0
  81. package/dest/config/network_config.d.ts.map +1 -0
  82. package/dest/config/network_config.js +14 -0
  83. package/dest/config/network_name.d.ts +3 -0
  84. package/dest/config/network_name.d.ts.map +1 -0
  85. package/dest/config/network_name.js +19 -0
  86. package/dest/config/parse-env.d.ts +3 -0
  87. package/dest/config/parse-env.d.ts.map +1 -0
  88. package/dest/config/parse-env.js +7 -0
  89. package/dest/config/secret_value.d.ts +28 -0
  90. package/dest/config/secret_value.d.ts.map +1 -0
  91. package/dest/config/secret_value.js +36 -0
  92. package/dest/crypto/aes128/index.d.ts +4 -5
  93. package/dest/crypto/aes128/index.d.ts.map +1 -1
  94. package/dest/crypto/aes128/index.js +30 -8
  95. package/dest/crypto/bls/bn254_keystore.d.ts +129 -0
  96. package/dest/crypto/bls/bn254_keystore.d.ts.map +1 -0
  97. package/dest/crypto/bls/bn254_keystore.js +201 -0
  98. package/dest/crypto/bls/index.d.ts +13 -0
  99. package/dest/crypto/bls/index.d.ts.map +1 -0
  100. package/dest/crypto/bls/index.js +87 -0
  101. package/dest/crypto/bn254/index.d.ts +39 -0
  102. package/dest/crypto/bn254/index.d.ts.map +1 -0
  103. package/dest/crypto/bn254/index.js +56 -0
  104. package/dest/crypto/ecdsa/index.d.ts +3 -3
  105. package/dest/crypto/ecdsa/index.d.ts.map +1 -1
  106. package/dest/crypto/ecdsa/index.js +62 -48
  107. package/dest/crypto/ecdsa/signature.d.ts +3 -5
  108. package/dest/crypto/ecdsa/signature.d.ts.map +1 -1
  109. package/dest/crypto/ecdsa/signature.js +2 -2
  110. package/dest/crypto/grumpkin/index.d.ts +10 -15
  111. package/dest/crypto/grumpkin/index.d.ts.map +1 -1
  112. package/dest/crypto/grumpkin/index.js +61 -55
  113. package/dest/crypto/keccak/index.d.ts +3 -5
  114. package/dest/crypto/keccak/index.d.ts.map +1 -1
  115. package/dest/crypto/keys/index.d.ts +2 -4
  116. package/dest/crypto/keys/index.d.ts.map +1 -1
  117. package/dest/crypto/keys/index.js +8 -5
  118. package/dest/crypto/pedersen/index.d.ts +1 -1
  119. package/dest/crypto/pedersen/pedersen.noble.d.ts +3 -5
  120. package/dest/crypto/pedersen/pedersen.noble.d.ts.map +1 -1
  121. package/dest/crypto/pedersen/pedersen.wasm.d.ts +4 -6
  122. package/dest/crypto/pedersen/pedersen.wasm.d.ts.map +1 -1
  123. package/dest/crypto/pedersen/pedersen.wasm.js +24 -14
  124. package/dest/crypto/poseidon/index.d.ts +2 -5
  125. package/dest/crypto/poseidon/index.d.ts.map +1 -1
  126. package/dest/crypto/poseidon/index.js +41 -28
  127. package/dest/crypto/random/index.d.ts +2 -4
  128. package/dest/crypto/random/index.d.ts.map +1 -1
  129. package/dest/crypto/random/index.js +2 -34
  130. package/dest/crypto/random/randomness_singleton.d.ts +4 -5
  131. package/dest/crypto/random/randomness_singleton.d.ts.map +1 -1
  132. package/dest/crypto/random/randomness_singleton.js +5 -5
  133. package/dest/crypto/schnorr/index.d.ts +10 -8
  134. package/dest/crypto/schnorr/index.d.ts.map +1 -1
  135. package/dest/crypto/schnorr/index.js +34 -42
  136. package/dest/crypto/schnorr/signature.d.ts +13 -35
  137. package/dest/crypto/schnorr/signature.d.ts.map +1 -1
  138. package/dest/crypto/schnorr/signature.js +21 -37
  139. package/dest/crypto/secp256k1/index.d.ts +5 -7
  140. package/dest/crypto/secp256k1/index.d.ts.map +1 -1
  141. package/dest/crypto/secp256k1/index.js +23 -18
  142. package/dest/crypto/secp256k1-signer/index.d.ts +1 -1
  143. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts +1 -1
  144. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts.map +1 -1
  145. package/dest/crypto/secp256k1-signer/utils.d.ts +67 -5
  146. package/dest/crypto/secp256k1-signer/utils.d.ts.map +1 -1
  147. package/dest/crypto/secp256k1-signer/utils.js +118 -6
  148. package/dest/crypto/sha256/index.d.ts +23 -6
  149. package/dest/crypto/sha256/index.d.ts.map +1 -1
  150. package/dest/crypto/sha256/index.js +43 -1
  151. package/dest/crypto/sha512/index.d.ts +3 -5
  152. package/dest/crypto/sha512/index.d.ts.map +1 -1
  153. package/dest/crypto/sha512/index.js +1 -1
  154. package/dest/crypto/signature/index.d.ts +2 -4
  155. package/dest/crypto/signature/index.d.ts.map +1 -1
  156. package/dest/crypto/sync/index.d.ts +1 -1
  157. package/dest/crypto/sync/index.js +1 -1
  158. package/dest/crypto/sync/pedersen/index.d.ts +4 -6
  159. package/dest/crypto/sync/pedersen/index.d.ts.map +1 -1
  160. package/dest/crypto/sync/pedersen/index.js +18 -11
  161. package/dest/crypto/sync/poseidon/index.d.ts +2 -5
  162. package/dest/crypto/sync/poseidon/index.d.ts.map +1 -1
  163. package/dest/crypto/sync/poseidon/index.js +23 -16
  164. package/dest/curves/bls12/field.d.ts +148 -0
  165. package/dest/curves/bls12/field.d.ts.map +1 -0
  166. package/dest/curves/bls12/field.js +357 -0
  167. package/dest/curves/bls12/index.d.ts +3 -0
  168. package/dest/curves/bls12/index.d.ts.map +1 -0
  169. package/dest/curves/bls12/index.js +2 -0
  170. package/dest/curves/bls12/point.d.ts +229 -0
  171. package/dest/curves/bls12/point.d.ts.map +1 -0
  172. package/dest/curves/bls12/point.js +400 -0
  173. package/dest/curves/bn254/field.d.ts +185 -0
  174. package/dest/curves/bn254/field.d.ts.map +1 -0
  175. package/dest/{fields/fields.js → curves/bn254/field.js} +111 -74
  176. package/dest/curves/bn254/index.d.ts +3 -0
  177. package/dest/curves/bn254/index.d.ts.map +1 -0
  178. package/dest/curves/bn254/index.js +2 -0
  179. package/dest/curves/bn254/point.d.ts +54 -0
  180. package/dest/curves/bn254/point.d.ts.map +1 -0
  181. package/dest/curves/bn254/point.js +143 -0
  182. package/dest/curves/grumpkin/index.d.ts +10 -0
  183. package/dest/curves/grumpkin/index.d.ts.map +1 -0
  184. package/dest/curves/grumpkin/index.js +3 -0
  185. package/dest/{fields → curves/grumpkin}/point.d.ts +26 -33
  186. package/dest/curves/grumpkin/point.d.ts.map +1 -0
  187. package/dest/{fields → curves/grumpkin}/point.js +53 -50
  188. package/dest/decorators/index.d.ts +1 -1
  189. package/dest/decorators/memoize.d.ts +1 -1
  190. package/dest/decorators/memoize.d.ts.map +1 -1
  191. package/dest/error/index.d.ts +1 -1
  192. package/dest/eth-address/index.d.ts +19 -10
  193. package/dest/eth-address/index.d.ts.map +1 -1
  194. package/dest/eth-address/index.js +31 -5
  195. package/dest/eth-signature/eth_signature.d.ts +19 -16
  196. package/dest/eth-signature/eth_signature.d.ts.map +1 -1
  197. package/dest/eth-signature/eth_signature.js +37 -18
  198. package/dest/eth-signature/index.d.ts +1 -1
  199. package/dest/fifo/fifo_frame_reader.d.ts +41 -0
  200. package/dest/fifo/fifo_frame_reader.d.ts.map +1 -0
  201. package/dest/fifo/fifo_frame_reader.js +91 -0
  202. package/dest/fifo/index.d.ts +2 -0
  203. package/dest/fifo/index.d.ts.map +1 -0
  204. package/dest/fifo/index.js +1 -0
  205. package/dest/fifo_set/fifo_set.d.ts +15 -0
  206. package/dest/fifo_set/fifo_set.d.ts.map +1 -0
  207. package/dest/fifo_set/fifo_set.js +39 -0
  208. package/dest/fifo_set/index.d.ts +2 -0
  209. package/dest/fifo_set/index.d.ts.map +1 -0
  210. package/dest/fifo_set/index.js +1 -0
  211. package/dest/fs/index.d.ts +2 -1
  212. package/dest/fs/index.d.ts.map +1 -1
  213. package/dest/fs/index.js +1 -0
  214. package/dest/fs/run_in_dir.d.ts +1 -1
  215. package/dest/fs/try_rm_dir.d.ts +3 -0
  216. package/dest/fs/try_rm_dir.d.ts.map +1 -0
  217. package/dest/fs/try_rm_dir.js +16 -0
  218. package/dest/iterable/all.d.ts +1 -1
  219. package/dest/iterable/filter.d.ts +1 -1
  220. package/dest/iterable/filter.js +1 -1
  221. package/dest/iterable/index.d.ts +1 -1
  222. package/dest/iterable/isAsyncIt.d.ts +1 -1
  223. package/dest/iterable/map.d.ts +1 -1
  224. package/dest/iterable/map.js +1 -1
  225. package/dest/iterable/peek.d.ts +1 -1
  226. package/dest/iterable/sort.d.ts +1 -1
  227. package/dest/iterable/take.d.ts +1 -1
  228. package/dest/iterable/toArray.d.ts +1 -1
  229. package/dest/iterator/filter.d.ts +3 -0
  230. package/dest/iterator/filter.d.ts.map +1 -0
  231. package/dest/iterator/filter.js +7 -0
  232. package/dest/iterator/index.d.ts +2 -0
  233. package/dest/iterator/index.d.ts.map +1 -0
  234. package/dest/iterator/index.js +1 -0
  235. package/dest/jest/env.js +48 -0
  236. package/dest/jest/setup.js +28 -1
  237. package/dest/jest/setupAfterEnv.js +3 -0
  238. package/dest/json-rpc/client/fetch.d.ts +3 -3
  239. package/dest/json-rpc/client/fetch.d.ts.map +1 -1
  240. package/dest/json-rpc/client/fetch.js +18 -31
  241. package/dest/json-rpc/client/index.d.ts +1 -1
  242. package/dest/json-rpc/client/safe_json_rpc_client.d.ts +11 -4
  243. package/dest/json-rpc/client/safe_json_rpc_client.d.ts.map +1 -1
  244. package/dest/json-rpc/client/safe_json_rpc_client.js +175 -15
  245. package/dest/json-rpc/client/undici.d.ts +1 -1
  246. package/dest/json-rpc/client/undici.d.ts.map +1 -1
  247. package/dest/json-rpc/client/undici.js +29 -11
  248. package/dest/json-rpc/convert.d.ts +3 -10
  249. package/dest/json-rpc/convert.d.ts.map +1 -1
  250. package/dest/json-rpc/convert.js +1 -9
  251. package/dest/json-rpc/errors.d.ts +4 -0
  252. package/dest/json-rpc/errors.d.ts.map +1 -0
  253. package/dest/json-rpc/errors.js +6 -0
  254. package/dest/json-rpc/fixtures/class_a.d.ts +6 -4
  255. package/dest/json-rpc/fixtures/class_a.d.ts.map +1 -1
  256. package/dest/json-rpc/fixtures/class_b.d.ts +6 -4
  257. package/dest/json-rpc/fixtures/class_b.d.ts.map +1 -1
  258. package/dest/json-rpc/fixtures/test_state.d.ts +4 -8
  259. package/dest/json-rpc/fixtures/test_state.d.ts.map +1 -1
  260. package/dest/json-rpc/fixtures/test_state.js +57 -17
  261. package/dest/json-rpc/index.d.ts +3 -2
  262. package/dest/json-rpc/index.d.ts.map +1 -1
  263. package/dest/json-rpc/index.js +2 -1
  264. package/dest/json-rpc/js_utils.d.ts +1 -1
  265. package/dest/json-rpc/js_utils.d.ts.map +1 -1
  266. package/dest/json-rpc/server/api_key_auth.d.ts +19 -0
  267. package/dest/json-rpc/server/api_key_auth.d.ts.map +1 -0
  268. package/dest/json-rpc/server/api_key_auth.js +57 -0
  269. package/dest/json-rpc/server/index.d.ts +2 -1
  270. package/dest/json-rpc/server/index.d.ts.map +1 -1
  271. package/dest/json-rpc/server/index.js +1 -0
  272. package/dest/json-rpc/server/safe_json_rpc_server.d.ts +29 -25
  273. package/dest/json-rpc/server/safe_json_rpc_server.d.ts.map +1 -1
  274. package/dest/json-rpc/server/safe_json_rpc_server.js +178 -59
  275. package/dest/json-rpc/test/index.d.ts +1 -1
  276. package/dest/json-rpc/test/integration.d.ts +2 -3
  277. package/dest/json-rpc/test/integration.d.ts.map +1 -1
  278. package/dest/log/bigint-utils.d.ts +5 -0
  279. package/dest/log/bigint-utils.d.ts.map +1 -0
  280. package/dest/log/bigint-utils.js +21 -0
  281. package/dest/log/console.d.ts +1 -1
  282. package/dest/log/console.d.ts.map +1 -1
  283. package/dest/log/gcloud-logger-config.d.ts +1 -2
  284. package/dest/log/gcloud-logger-config.d.ts.map +1 -1
  285. package/dest/log/gcloud-logger-config.js +4 -9
  286. package/dest/log/index.d.ts +5 -5
  287. package/dest/log/index.d.ts.map +1 -1
  288. package/dest/log/index.js +4 -4
  289. package/dest/log/libp2p_logger.d.ts +5 -2
  290. package/dest/log/libp2p_logger.d.ts.map +1 -1
  291. package/dest/log/libp2p_logger.js +27 -6
  292. package/dest/log/log-filters.d.ts +17 -4
  293. package/dest/log/log-filters.d.ts.map +1 -1
  294. package/dest/log/log-filters.js +26 -12
  295. package/dest/log/log-levels.d.ts +1 -1
  296. package/dest/log/log_fn.d.ts +2 -2
  297. package/dest/log/log_fn.d.ts.map +1 -1
  298. package/dest/log/noir_debug_log_util.d.ts +14 -0
  299. package/dest/log/noir_debug_log_util.d.ts.map +1 -0
  300. package/dest/log/noir_debug_log_util.js +14 -0
  301. package/dest/log/pino-logger-server.d.ts +9 -0
  302. package/dest/log/pino-logger-server.d.ts.map +1 -0
  303. package/dest/log/pino-logger-server.js +18 -0
  304. package/dest/log/pino-logger.d.ts +40 -11
  305. package/dest/log/pino-logger.d.ts.map +1 -1
  306. package/dest/log/pino-logger.js +165 -31
  307. package/dest/message/index.d.ts +1 -1
  308. package/dest/message/index.d.ts.map +1 -1
  309. package/dest/mutex/index.d.ts +1 -1
  310. package/dest/mutex/index.d.ts.map +1 -1
  311. package/dest/mutex/mutex_database.d.ts +1 -1
  312. package/dest/mutex/mutex_database.d.ts.map +1 -1
  313. package/dest/noir/index.d.ts +1 -1
  314. package/dest/noir/noir_package_config.d.ts +19 -104
  315. package/dest/noir/noir_package_config.d.ts.map +1 -1
  316. package/dest/noir/noir_package_config.js +1 -1
  317. package/dest/number/index.d.ts +3 -0
  318. package/dest/number/index.d.ts.map +1 -0
  319. package/dest/number/index.js +12 -0
  320. package/dest/profiler/index.d.ts +2 -0
  321. package/dest/profiler/index.d.ts.map +1 -0
  322. package/dest/profiler/index.js +1 -0
  323. package/dest/profiler/profiler.d.ts +8 -0
  324. package/dest/profiler/profiler.d.ts.map +1 -0
  325. package/dest/profiler/profiler.js +97 -0
  326. package/dest/promise/index.d.ts +1 -1
  327. package/dest/promise/running-promise.d.ts +2 -2
  328. package/dest/promise/running-promise.d.ts.map +1 -1
  329. package/dest/promise/running-promise.js +2 -2
  330. package/dest/promise/utils.d.ts +1 -1
  331. package/dest/queue/base_memory_queue.d.ts +2 -2
  332. package/dest/queue/base_memory_queue.d.ts.map +1 -1
  333. package/dest/queue/batch_queue.d.ts +2 -2
  334. package/dest/queue/batch_queue.d.ts.map +1 -1
  335. package/dest/queue/batch_queue.js +2 -1
  336. package/dest/queue/bounded_serial_queue.d.ts +1 -1
  337. package/dest/queue/bounded_serial_queue.d.ts.map +1 -1
  338. package/dest/queue/fifo_memory_queue.d.ts +1 -1
  339. package/dest/queue/fifo_memory_queue.d.ts.map +1 -1
  340. package/dest/queue/index.d.ts +1 -1
  341. package/dest/queue/priority_memory_queue.d.ts +1 -1
  342. package/dest/queue/priority_memory_queue.d.ts.map +1 -1
  343. package/dest/queue/priority_queue.d.ts +1 -1
  344. package/dest/queue/priority_queue.d.ts.map +1 -1
  345. package/dest/queue/semaphore.d.ts +5 -1
  346. package/dest/queue/semaphore.d.ts.map +1 -1
  347. package/dest/queue/serial_queue.d.ts +3 -3
  348. package/dest/queue/serial_queue.d.ts.map +1 -1
  349. package/dest/queue/serial_queue.js +7 -5
  350. package/dest/retry/index.d.ts +25 -3
  351. package/dest/retry/index.d.ts.map +1 -1
  352. package/dest/retry/index.js +34 -2
  353. package/dest/running-promise/index.d.ts +1 -1
  354. package/dest/schemas/api.d.ts +12 -10
  355. package/dest/schemas/api.d.ts.map +1 -1
  356. package/dest/schemas/api.js +7 -1
  357. package/dest/schemas/index.d.ts +1 -1
  358. package/dest/schemas/parse.d.ts +4 -4
  359. package/dest/schemas/parse.d.ts.map +1 -1
  360. package/dest/schemas/parse.js +7 -6
  361. package/dest/schemas/schemas.d.ts +30 -29
  362. package/dest/schemas/schemas.d.ts.map +1 -1
  363. package/dest/schemas/schemas.js +29 -11
  364. package/dest/schemas/types.d.ts +32 -2
  365. package/dest/schemas/types.d.ts.map +1 -1
  366. package/dest/schemas/types.js +25 -1
  367. package/dest/schemas/utils.d.ts +10 -16
  368. package/dest/schemas/utils.d.ts.map +1 -1
  369. package/dest/schemas/utils.js +17 -23
  370. package/dest/serialize/buffer_reader.d.ts +41 -6
  371. package/dest/serialize/buffer_reader.d.ts.map +1 -1
  372. package/dest/serialize/buffer_reader.js +70 -6
  373. package/dest/serialize/buffer_sink.d.ts +134 -0
  374. package/dest/serialize/buffer_sink.d.ts.map +1 -0
  375. package/dest/serialize/buffer_sink.js +297 -0
  376. package/dest/serialize/field_reader.d.ts +12 -3
  377. package/dest/serialize/field_reader.d.ts.map +1 -1
  378. package/dest/serialize/field_reader.js +19 -2
  379. package/dest/serialize/free_funcs.d.ts +25 -23
  380. package/dest/serialize/free_funcs.d.ts.map +1 -1
  381. package/dest/serialize/free_funcs.js +22 -28
  382. package/dest/serialize/index.d.ts +2 -1
  383. package/dest/serialize/index.d.ts.map +1 -1
  384. package/dest/serialize/index.js +1 -0
  385. package/dest/serialize/serialize.d.ts +24 -7
  386. package/dest/serialize/serialize.d.ts.map +1 -1
  387. package/dest/serialize/serialize.js +32 -1
  388. package/dest/serialize/type_registry.d.ts +1 -1
  389. package/dest/serialize/type_registry.d.ts.map +1 -1
  390. package/dest/serialize/types.d.ts +1 -1
  391. package/dest/sleep/index.d.ts +4 -1
  392. package/dest/sleep/index.d.ts.map +1 -1
  393. package/dest/sleep/index.js +14 -1
  394. package/dest/string/index.d.ts +8 -3
  395. package/dest/string/index.d.ts.map +1 -1
  396. package/dest/string/index.js +27 -1
  397. package/dest/testing/files/index.d.ts +2 -3
  398. package/dest/testing/files/index.d.ts.map +1 -1
  399. package/dest/testing/files/index.js +3 -3
  400. package/dest/testing/formatting.d.ts +4 -0
  401. package/dest/testing/formatting.d.ts.map +1 -0
  402. package/dest/testing/formatting.js +3 -0
  403. package/dest/testing/index.d.ts +2 -1
  404. package/dest/testing/index.d.ts.map +1 -1
  405. package/dest/testing/index.js +1 -0
  406. package/dest/testing/port_allocator.d.ts +1 -1
  407. package/dest/testing/snapshot_serializer.d.ts +1 -1
  408. package/dest/testing/test_data.d.ts +1 -1
  409. package/dest/timer/date.d.ts +28 -2
  410. package/dest/timer/date.d.ts.map +1 -1
  411. package/dest/timer/date.js +41 -3
  412. package/dest/timer/elapsed.d.ts +1 -1
  413. package/dest/timer/index.d.ts +2 -2
  414. package/dest/timer/index.d.ts.map +1 -1
  415. package/dest/timer/index.js +1 -1
  416. package/dest/timer/timeout.d.ts +21 -6
  417. package/dest/timer/timeout.d.ts.map +1 -1
  418. package/dest/timer/timeout.js +69 -22
  419. package/dest/timer/timer.d.ts +1 -1
  420. package/dest/timer/timer.d.ts.map +1 -1
  421. package/dest/transport/dispatch/create_dispatch_proxy.d.ts +11 -2
  422. package/dest/transport/dispatch/create_dispatch_proxy.d.ts.map +1 -1
  423. package/dest/transport/dispatch/messages.d.ts +1 -1
  424. package/dest/transport/index.d.ts +1 -3
  425. package/dest/transport/index.d.ts.map +1 -1
  426. package/dest/transport/index.js +0 -2
  427. package/dest/transport/interface/connector.d.ts +1 -1
  428. package/dest/transport/interface/connector.d.ts.map +1 -1
  429. package/dest/transport/interface/listener.d.ts +1 -2
  430. package/dest/transport/interface/listener.d.ts.map +1 -1
  431. package/dest/transport/interface/socket.d.ts +1 -1
  432. package/dest/transport/interface/socket.d.ts.map +1 -1
  433. package/dest/transport/interface/transferable.d.ts +1 -1
  434. package/dest/transport/node/index.d.ts +1 -1
  435. package/dest/transport/node/node_connector.d.ts +1 -2
  436. package/dest/transport/node/node_connector.d.ts.map +1 -1
  437. package/dest/transport/node/node_connector_socket.d.ts +1 -2
  438. package/dest/transport/node/node_connector_socket.d.ts.map +1 -1
  439. package/dest/transport/node/node_listener.d.ts +1 -2
  440. package/dest/transport/node/node_listener.d.ts.map +1 -1
  441. package/dest/transport/node/node_listener_socket.d.ts +1 -2
  442. package/dest/transport/node/node_listener_socket.d.ts.map +1 -1
  443. package/dest/transport/transport_client.d.ts +1 -2
  444. package/dest/transport/transport_client.d.ts.map +1 -1
  445. package/dest/transport/transport_client.js +2 -2
  446. package/dest/transport/transport_server.d.ts +1 -10
  447. package/dest/transport/transport_server.d.ts.map +1 -1
  448. package/dest/trees/balanced_merkle_tree_root.d.ts +16 -0
  449. package/dest/trees/balanced_merkle_tree_root.d.ts.map +1 -0
  450. package/dest/trees/balanced_merkle_tree_root.js +50 -0
  451. package/dest/trees/hasher.d.ts +8 -7
  452. package/dest/trees/hasher.d.ts.map +1 -1
  453. package/dest/trees/hasher.js +10 -5
  454. package/dest/trees/index.d.ts +5 -3
  455. package/dest/trees/index.d.ts.map +1 -1
  456. package/dest/trees/index.js +4 -2
  457. package/dest/trees/indexed_merkle_tree.d.ts +1 -3
  458. package/dest/trees/indexed_merkle_tree.d.ts.map +1 -1
  459. package/dest/trees/indexed_merkle_tree.js +1 -1
  460. package/dest/trees/indexed_merkle_tree_calculator.d.ts +2 -4
  461. package/dest/trees/indexed_merkle_tree_calculator.d.ts.map +1 -1
  462. package/dest/trees/indexed_merkle_tree_calculator.js +5 -1
  463. package/dest/trees/indexed_tree_leaf.d.ts +1 -3
  464. package/dest/trees/indexed_tree_leaf.d.ts.map +1 -1
  465. package/dest/trees/membership_witness.d.ts +10 -5
  466. package/dest/trees/membership_witness.d.ts.map +1 -1
  467. package/dest/trees/membership_witness.js +23 -1
  468. package/dest/trees/merkle_tree.d.ts +1 -3
  469. package/dest/trees/merkle_tree.d.ts.map +1 -1
  470. package/dest/trees/merkle_tree_calculator.d.ts +4 -4
  471. package/dest/trees/merkle_tree_calculator.d.ts.map +1 -1
  472. package/dest/trees/merkle_tree_calculator.js +1 -5
  473. package/dest/trees/sibling_path.d.ts +7 -41
  474. package/dest/trees/sibling_path.d.ts.map +1 -1
  475. package/dest/trees/sibling_path.js +11 -9
  476. package/dest/trees/unbalanced_merkle_tree_calculator.d.ts +48 -0
  477. package/dest/trees/unbalanced_merkle_tree_calculator.d.ts.map +1 -0
  478. package/dest/trees/unbalanced_merkle_tree_calculator.js +154 -0
  479. package/dest/trees/unbalanced_merkle_tree_root.d.ts +27 -0
  480. package/dest/trees/unbalanced_merkle_tree_root.d.ts.map +1 -0
  481. package/dest/trees/unbalanced_merkle_tree_root.js +83 -0
  482. package/dest/trees/unbalanced_tree_store.d.ts +6 -1
  483. package/dest/trees/unbalanced_tree_store.d.ts.map +1 -1
  484. package/dest/trees/unbalanced_tree_store.js +55 -1
  485. package/dest/types/index.d.ts +52 -3
  486. package/dest/types/index.d.ts.map +1 -1
  487. package/dest/types/index.js +21 -0
  488. package/dest/url/index.d.ts +1 -1
  489. package/dest/url/index.d.ts.map +1 -1
  490. package/dest/url/index.js +1 -1
  491. package/dest/validation/index.d.ts +1 -1
  492. package/package.json +84 -47
  493. package/src/array/array.ts +13 -16
  494. package/src/array/index.ts +1 -0
  495. package/src/array/sorted_array.ts +138 -0
  496. package/src/async-pool/index.ts +1 -0
  497. package/src/bigint/index.ts +20 -0
  498. package/src/bigint-buffer/index.ts +6 -1
  499. package/src/branded-types/block_number.ts +135 -0
  500. package/src/branded-types/buffer32_hash.ts +38 -0
  501. package/src/branded-types/checkpoint_number.ts +130 -0
  502. package/src/branded-types/epoch.ts +88 -0
  503. package/src/branded-types/index.ts +8 -0
  504. package/src/branded-types/index_within_checkpoint.ts +88 -0
  505. package/src/branded-types/slot.ts +93 -0
  506. package/src/branded-types/types.ts +2 -0
  507. package/src/buffer/buffer16.ts +136 -0
  508. package/src/buffer/buffer32.ts +47 -74
  509. package/src/buffer/index.ts +2 -0
  510. package/src/buffer/utils.ts +8 -0
  511. package/src/collection/array.ts +152 -4
  512. package/src/collection/index.ts +2 -0
  513. package/src/collection/lru_map.ts +143 -0
  514. package/src/collection/lru_set.ts +115 -0
  515. package/src/collection/object.ts +37 -0
  516. package/src/committable/committable.ts +1 -1
  517. package/src/config/env_var.ts +237 -63
  518. package/src/config/index.ts +265 -29
  519. package/src/config/network_config.ts +21 -0
  520. package/src/config/network_name.ts +28 -0
  521. package/src/config/parse-env.ts +4 -0
  522. package/src/config/secret_value.ts +49 -0
  523. package/src/crypto/aes128/index.ts +30 -12
  524. package/src/crypto/bls/bn254_keystore.ts +264 -0
  525. package/src/crypto/bls/index.ts +77 -0
  526. package/src/crypto/bn254/index.ts +64 -0
  527. package/src/crypto/ecdsa/index.ts +41 -23
  528. package/src/crypto/ecdsa/signature.ts +2 -2
  529. package/src/crypto/grumpkin/index.ts +38 -46
  530. package/src/crypto/keys/index.ts +6 -6
  531. package/src/crypto/pedersen/pedersen.wasm.ts +23 -19
  532. package/src/crypto/poseidon/index.ts +43 -37
  533. package/src/crypto/random/index.ts +2 -40
  534. package/src/crypto/random/randomness_singleton.ts +6 -4
  535. package/src/crypto/schnorr/index.ts +29 -24
  536. package/src/crypto/schnorr/signature.ts +18 -47
  537. package/src/crypto/secp256k1/index.ts +15 -11
  538. package/src/crypto/secp256k1-signer/utils.ts +152 -7
  539. package/src/crypto/sha256/index.ts +48 -1
  540. package/src/crypto/sha512/index.ts +1 -1
  541. package/src/crypto/signature/index.ts +1 -1
  542. package/src/crypto/sync/index.ts +1 -1
  543. package/src/crypto/sync/pedersen/index.ts +17 -16
  544. package/src/crypto/sync/poseidon/index.ts +23 -27
  545. package/src/curves/bls12/field.ts +456 -0
  546. package/src/curves/bls12/index.ts +2 -0
  547. package/src/curves/bls12/point.ts +450 -0
  548. package/src/{fields/fields.ts → curves/bn254/field.ts} +117 -91
  549. package/src/curves/bn254/index.ts +2 -0
  550. package/src/curves/bn254/point.ts +170 -0
  551. package/src/curves/grumpkin/index.ts +11 -0
  552. package/src/{fields → curves/grumpkin}/point.ts +47 -47
  553. package/src/eth-address/index.ts +35 -7
  554. package/src/eth-signature/eth_signature.ts +50 -22
  555. package/src/fifo/fifo_frame_reader.ts +113 -0
  556. package/src/fifo/index.ts +1 -0
  557. package/src/fifo_set/fifo_set.ts +52 -0
  558. package/src/fifo_set/index.ts +1 -0
  559. package/src/fs/index.ts +1 -0
  560. package/src/fs/try_rm_dir.ts +15 -0
  561. package/src/iterable/filter.ts +1 -1
  562. package/src/iterable/map.ts +1 -1
  563. package/src/iterator/filter.ts +11 -0
  564. package/src/iterator/index.ts +1 -0
  565. package/src/jest/env.mjs +52 -0
  566. package/src/jest/setup.mjs +31 -1
  567. package/src/jest/setupAfterEnv.mjs +3 -0
  568. package/src/json-rpc/client/fetch.ts +16 -34
  569. package/src/json-rpc/client/safe_json_rpc_client.ts +230 -15
  570. package/src/json-rpc/client/undici.ts +31 -18
  571. package/src/json-rpc/convert.ts +3 -12
  572. package/src/json-rpc/errors.ts +6 -0
  573. package/src/json-rpc/fixtures/class_a.ts +4 -1
  574. package/src/json-rpc/fixtures/class_b.ts +4 -1
  575. package/src/json-rpc/fixtures/test_state.ts +10 -10
  576. package/src/json-rpc/index.ts +2 -1
  577. package/src/json-rpc/server/api_key_auth.ts +63 -0
  578. package/src/json-rpc/server/index.ts +1 -0
  579. package/src/json-rpc/server/safe_json_rpc_server.ts +162 -51
  580. package/src/json-rpc/test/integration.ts +1 -1
  581. package/src/log/bigint-utils.ts +25 -0
  582. package/src/log/console.ts +4 -1
  583. package/src/log/gcloud-logger-config.ts +8 -7
  584. package/src/log/index.ts +4 -4
  585. package/src/log/libp2p_logger.ts +33 -7
  586. package/src/log/log-filters.ts +29 -11
  587. package/src/log/log_fn.ts +1 -1
  588. package/src/log/noir_debug_log_util.ts +21 -0
  589. package/src/log/pino-logger-server.ts +25 -0
  590. package/src/log/pino-logger.ts +193 -40
  591. package/src/message/index.ts +5 -1
  592. package/src/mutex/mutex_database.ts +2 -3
  593. package/src/noir/noir_package_config.ts +32 -20
  594. package/src/number/index.ts +14 -0
  595. package/src/profiler/index.ts +1 -0
  596. package/src/profiler/profiler.ts +125 -0
  597. package/src/promise/running-promise.ts +2 -2
  598. package/src/queue/base_memory_queue.ts +1 -1
  599. package/src/queue/batch_queue.ts +2 -1
  600. package/src/queue/bounded_serial_queue.ts +4 -1
  601. package/src/queue/semaphore.ts +5 -0
  602. package/src/queue/serial_queue.ts +5 -5
  603. package/src/retry/index.ts +58 -5
  604. package/src/schemas/api.ts +25 -25
  605. package/src/schemas/parse.ts +10 -7
  606. package/src/schemas/schemas.ts +45 -16
  607. package/src/schemas/types.ts +34 -1
  608. package/src/schemas/utils.ts +25 -46
  609. package/src/serialize/buffer_reader.ts +96 -12
  610. package/src/serialize/buffer_sink.ts +350 -0
  611. package/src/serialize/field_reader.ts +28 -4
  612. package/src/serialize/free_funcs.ts +26 -32
  613. package/src/serialize/index.ts +1 -0
  614. package/src/serialize/serialize.ts +35 -1
  615. package/src/sleep/index.ts +16 -1
  616. package/src/string/index.ts +36 -1
  617. package/src/testing/files/index.ts +7 -3
  618. package/src/testing/formatting.ts +3 -0
  619. package/src/testing/index.ts +1 -0
  620. package/src/timer/date.ts +61 -3
  621. package/src/timer/index.ts +1 -1
  622. package/src/timer/timeout.ts +85 -19
  623. package/src/transport/dispatch/create_dispatch_proxy.ts +11 -1
  624. package/src/transport/index.ts +0 -2
  625. package/src/transport/interface/connector.ts +0 -1
  626. package/src/transport/interface/listener.ts +2 -3
  627. package/src/transport/interface/socket.ts +2 -3
  628. package/src/transport/transport_client.ts +5 -6
  629. package/src/transport/transport_server.ts +4 -1
  630. package/src/trees/balanced_merkle_tree_root.ts +65 -0
  631. package/src/trees/hasher.ts +16 -4
  632. package/src/trees/index.ts +4 -2
  633. package/src/trees/indexed_merkle_tree.ts +6 -2
  634. package/src/trees/indexed_merkle_tree_calculator.ts +7 -3
  635. package/src/trees/membership_witness.ts +22 -1
  636. package/src/trees/merkle_tree.ts +4 -1
  637. package/src/trees/merkle_tree_calculator.ts +9 -10
  638. package/src/trees/sibling_path.ts +12 -7
  639. package/src/trees/unbalanced_merkle_tree_calculator.ts +176 -0
  640. package/src/trees/unbalanced_merkle_tree_root.ts +112 -0
  641. package/src/trees/unbalanced_tree_store.ts +62 -3
  642. package/src/types/index.ts +82 -4
  643. package/src/url/index.ts +0 -1
  644. package/dest/crypto/index.d.ts +0 -15
  645. package/dest/crypto/index.d.ts.map +0 -1
  646. package/dest/crypto/index.js +0 -14
  647. package/dest/crypto/pedersen/pedersen.elliptic.d.ts +0 -13
  648. package/dest/crypto/pedersen/pedersen.elliptic.d.ts.map +0 -1
  649. package/dest/crypto/pedersen/pedersen.elliptic.js +0 -582
  650. package/dest/crypto/serialize.d.ts +0 -53
  651. package/dest/crypto/serialize.d.ts.map +0 -1
  652. package/dest/crypto/serialize.js +0 -68
  653. package/dest/fields/coordinate.d.ts +0 -68
  654. package/dest/fields/coordinate.d.ts.map +0 -1
  655. package/dest/fields/coordinate.js +0 -96
  656. package/dest/fields/fields.d.ts +0 -176
  657. package/dest/fields/fields.d.ts.map +0 -1
  658. package/dest/fields/index.d.ts +0 -4
  659. package/dest/fields/index.d.ts.map +0 -1
  660. package/dest/fields/index.js +0 -3
  661. package/dest/fields/point.d.ts.map +0 -1
  662. package/dest/index.d.ts +0 -31
  663. package/dest/index.d.ts.map +0 -1
  664. package/dest/index.js +0 -31
  665. package/dest/json-rpc/server/telemetry.d.ts +0 -2
  666. package/dest/json-rpc/server/telemetry.d.ts.map +0 -1
  667. package/dest/json-rpc/server/telemetry.js +0 -0
  668. package/dest/log/debug.d.ts +0 -56
  669. package/dest/log/debug.d.ts.map +0 -1
  670. package/dest/log/debug.js +0 -75
  671. package/dest/log/log_history.d.ts +0 -31
  672. package/dest/log/log_history.d.ts.map +0 -1
  673. package/dest/log/log_history.js +0 -38
  674. package/dest/transport/browser/index.d.ts +0 -5
  675. package/dest/transport/browser/index.d.ts.map +0 -1
  676. package/dest/transport/browser/index.js +0 -4
  677. package/dest/transport/browser/message_port_socket.d.ts +0 -37
  678. package/dest/transport/browser/message_port_socket.d.ts.map +0 -1
  679. package/dest/transport/browser/message_port_socket.js +0 -42
  680. package/dest/transport/browser/shared_worker_connector.d.ts +0 -19
  681. package/dest/transport/browser/shared_worker_connector.d.ts.map +0 -1
  682. package/dest/transport/browser/shared_worker_connector.js +0 -19
  683. package/dest/transport/browser/shared_worker_listener.d.ts +0 -38
  684. package/dest/transport/browser/shared_worker_listener.d.ts.map +0 -1
  685. package/dest/transport/browser/shared_worker_listener.js +0 -33
  686. package/dest/transport/browser/worker_connector.d.ts +0 -26
  687. package/dest/transport/browser/worker_connector.d.ts.map +0 -1
  688. package/dest/transport/browser/worker_connector.js +0 -30
  689. package/dest/transport/browser/worker_listener.d.ts +0 -39
  690. package/dest/transport/browser/worker_listener.d.ts.map +0 -1
  691. package/dest/transport/browser/worker_listener.js +0 -35
  692. package/dest/transport/dispatch/create_dispatch_fn.d.ts +0 -25
  693. package/dest/transport/dispatch/create_dispatch_fn.d.ts.map +0 -1
  694. package/dest/transport/dispatch/create_dispatch_fn.js +0 -17
  695. package/dest/trees/unbalanced_merkle_tree.d.ts +0 -17
  696. package/dest/trees/unbalanced_merkle_tree.d.ts.map +0 -1
  697. package/dest/trees/unbalanced_merkle_tree.js +0 -100
  698. package/dest/wasm/empty_wasi_sdk.d.ts +0 -130
  699. package/dest/wasm/empty_wasi_sdk.d.ts.map +0 -1
  700. package/dest/wasm/empty_wasi_sdk.js +0 -148
  701. package/dest/wasm/index.d.ts +0 -2
  702. package/dest/wasm/index.d.ts.map +0 -1
  703. package/dest/wasm/index.js +0 -1
  704. package/dest/wasm/wasm_module.d.ts +0 -136
  705. package/dest/wasm/wasm_module.d.ts.map +0 -1
  706. package/dest/wasm/wasm_module.js +0 -196
  707. package/dest/worker/browser/index.d.ts +0 -3
  708. package/dest/worker/browser/index.d.ts.map +0 -1
  709. package/dest/worker/browser/index.js +0 -2
  710. package/dest/worker/browser/start_web_module.d.ts +0 -7
  711. package/dest/worker/browser/start_web_module.d.ts.map +0 -1
  712. package/dest/worker/browser/start_web_module.js +0 -27
  713. package/dest/worker/browser/web_data_store.d.ts +0 -24
  714. package/dest/worker/browser/web_data_store.d.ts.map +0 -1
  715. package/dest/worker/browser/web_data_store.js +0 -29
  716. package/dest/worker/browser/web_worker.d.ts +0 -10
  717. package/dest/worker/browser/web_worker.d.ts.map +0 -1
  718. package/dest/worker/browser/web_worker.js +0 -25
  719. package/dest/worker/data_store.d.ts +0 -21
  720. package/dest/worker/data_store.d.ts.map +0 -1
  721. package/dest/worker/data_store.js +0 -3
  722. package/dest/worker/index.d.ts +0 -3
  723. package/dest/worker/index.d.ts.map +0 -1
  724. package/dest/worker/index.js +0 -1
  725. package/dest/worker/node/index.d.ts +0 -3
  726. package/dest/worker/node/index.d.ts.map +0 -1
  727. package/dest/worker/node/index.js +0 -2
  728. package/dest/worker/node/node_data_store.d.ts +0 -13
  729. package/dest/worker/node/node_data_store.d.ts.map +0 -1
  730. package/dest/worker/node/node_data_store.js +0 -20
  731. package/dest/worker/node/node_worker.d.ts +0 -6
  732. package/dest/worker/node/node_worker.d.ts.map +0 -1
  733. package/dest/worker/node/node_worker.js +0 -22
  734. package/dest/worker/node/start_node_module.d.ts +0 -7
  735. package/dest/worker/node/start_node_module.d.ts.map +0 -1
  736. package/dest/worker/node/start_node_module.js +0 -31
  737. package/dest/worker/wasm_worker.d.ts +0 -9
  738. package/dest/worker/wasm_worker.d.ts.map +0 -1
  739. package/dest/worker/wasm_worker.js +0 -3
  740. package/dest/worker/worker_pool.d.ts +0 -40
  741. package/dest/worker/worker_pool.d.ts.map +0 -1
  742. package/dest/worker/worker_pool.js +0 -51
  743. package/src/crypto/index.ts +0 -14
  744. package/src/crypto/pedersen/pedersen.elliptic.ts +0 -584
  745. package/src/crypto/serialize.ts +0 -85
  746. package/src/fields/coordinate.ts +0 -104
  747. package/src/fields/index.ts +0 -3
  748. package/src/index.ts +0 -31
  749. package/src/json-rpc/server/telemetry.ts +0 -0
  750. package/src/log/debug.ts +0 -104
  751. package/src/log/log_history.ts +0 -44
  752. package/src/transport/browser/index.ts +0 -4
  753. package/src/transport/browser/message_port_socket.ts +0 -48
  754. package/src/transport/browser/shared_worker_connector.ts +0 -21
  755. package/src/transport/browser/shared_worker_listener.ts +0 -53
  756. package/src/transport/browser/worker_connector.ts +0 -30
  757. package/src/transport/browser/worker_listener.ts +0 -54
  758. package/src/transport/dispatch/create_dispatch_fn.ts +0 -35
  759. package/src/trees/unbalanced_merkle_tree.ts +0 -103
  760. package/src/wasm/README.md +0 -6
  761. package/src/wasm/empty_wasi_sdk.ts +0 -166
  762. package/src/wasm/fixtures/gcd.wasm +0 -0
  763. package/src/wasm/fixtures/gcd.wat +0 -27
  764. package/src/wasm/index.ts +0 -1
  765. package/src/wasm/wasm_module.ts +0 -260
  766. package/src/worker/browser/index.ts +0 -2
  767. package/src/worker/browser/start_web_module.ts +0 -24
  768. package/src/worker/browser/web_data_store.ts +0 -38
  769. package/src/worker/browser/web_worker.ts +0 -25
  770. package/src/worker/data_store.ts +0 -19
  771. package/src/worker/index.ts +0 -2
  772. package/src/worker/node/index.ts +0 -2
  773. package/src/worker/node/node_data_store.ts +0 -27
  774. package/src/worker/node/node_worker.ts +0 -23
  775. package/src/worker/node/start_node_module.ts +0 -30
  776. package/src/worker/wasm_worker.ts +0 -7
  777. package/src/worker/worker_pool.ts +0 -73
@@ -0,0 +1,143 @@
1
+ import { BN254_G1_GENERATOR, BN254_G2_GENERATOR, BarretenbergSync } from '@aztec/bb.js';
2
+ import { Fq } from './field.js';
3
+ /**
4
+ * BN254 G1 point using foundation field classes.
5
+ * Represents a point on the BN254 elliptic curve in affine coordinates.
6
+ */ export class Bn254G1Point {
7
+ x;
8
+ y;
9
+ constructor(x, y){
10
+ this.x = x;
11
+ this.y = y;
12
+ }
13
+ toBbApiPoint() {
14
+ return {
15
+ x: this.x.toBuffer(),
16
+ y: this.y.toBuffer()
17
+ };
18
+ }
19
+ static fromBbApiPoint(point) {
20
+ return new Bn254G1Point(Fq.fromBuffer(Buffer.from(point.x)), Fq.fromBuffer(Buffer.from(point.y)));
21
+ }
22
+ async isOnCurve() {
23
+ await BarretenbergSync.initSingleton();
24
+ const api = BarretenbergSync.getSingleton();
25
+ const apiPoint = this.toBbApiPoint();
26
+ const response = api.bn254G1IsOnCurve({
27
+ point: apiPoint
28
+ });
29
+ return response.isOnCurve;
30
+ }
31
+ /**
32
+ * Get the generator point for BN254 G1, or perform scalar multiplication.
33
+ * When called without arguments, returns the base generator point.
34
+ * When called with a scalar, returns scalar * generator (useful for public key derivation).
35
+ */ static async generator(scalar) {
36
+ if (!scalar) {
37
+ return new Bn254G1Point(Fq.fromBuffer(Buffer.from(BN254_G1_GENERATOR.x)), Fq.fromBuffer(Buffer.from(BN254_G1_GENERATOR.y)));
38
+ }
39
+ await BarretenbergSync.initSingleton();
40
+ const api = BarretenbergSync.getSingleton();
41
+ const response = api.bn254G1Mul({
42
+ point: BN254_G1_GENERATOR,
43
+ scalar: scalar.toBuffer()
44
+ });
45
+ return Bn254G1Point.fromBbApiPoint(response.point);
46
+ }
47
+ /**
48
+ * Decompress a BN254 G1 point from compressed form (32 bytes).
49
+ * The compressed format encodes the x-coordinate and the sign bit of the y-coordinate
50
+ * in the most significant bit.
51
+ */ static async fromCompressed(compressed) {
52
+ if (compressed.length !== 32) {
53
+ throw new Error('Invalid compressed point length');
54
+ }
55
+ await BarretenbergSync.initSingleton();
56
+ const api = BarretenbergSync.getSingleton();
57
+ const response = api.bn254G1FromCompressed({
58
+ compressed: new Uint8Array(compressed)
59
+ });
60
+ return Bn254G1Point.fromBbApiPoint(response.point);
61
+ }
62
+ /**
63
+ * Compress this BN254 G1 point to 32 bytes.
64
+ * The compressed format encodes the x-coordinate and the sign bit of the y-coordinate
65
+ * in the most significant bit (bit 255).
66
+ */ compress() {
67
+ const xBytes = this.x.toBuffer();
68
+ // Get the least significant bit of y to determine the sign
69
+ const yLsb = this.y.toBigInt() & 1n;
70
+ // If y is odd, set the most significant bit (bit 255) of the output
71
+ if (yLsb === 1n) {
72
+ xBytes[0] |= 0x80;
73
+ }
74
+ return xBytes;
75
+ }
76
+ equals(other) {
77
+ return this.x.equals(other.x) && this.y.equals(other.y);
78
+ }
79
+ toString() {
80
+ return `Bn254G1Point(x: ${this.x.toString()}, y: ${this.y.toString()})`;
81
+ }
82
+ }
83
+ /**
84
+ * BN254 G2 point using foundation field classes.
85
+ * Represents a point on the BN254 G2 curve (twist curve) in affine coordinates.
86
+ * G2 points use extension field coordinates (Fq2).
87
+ */ export class Bn254G2Point {
88
+ x;
89
+ y;
90
+ constructor(x, y){
91
+ this.x = x;
92
+ this.y = y;
93
+ }
94
+ toBbApiPoint() {
95
+ return {
96
+ x: [
97
+ this.x[0].toBuffer(),
98
+ this.x[1].toBuffer()
99
+ ],
100
+ y: [
101
+ this.y[0].toBuffer(),
102
+ this.y[1].toBuffer()
103
+ ]
104
+ };
105
+ }
106
+ static fromBbApiPoint(point) {
107
+ return new Bn254G2Point([
108
+ Fq.fromBuffer(Buffer.from(point.x[0])),
109
+ Fq.fromBuffer(Buffer.from(point.x[1]))
110
+ ], [
111
+ Fq.fromBuffer(Buffer.from(point.y[0])),
112
+ Fq.fromBuffer(Buffer.from(point.y[1]))
113
+ ]);
114
+ }
115
+ /**
116
+ * Get the generator point for BN254 G2, or perform scalar multiplication.
117
+ * When called without arguments, returns the base generator point.
118
+ * When called with a scalar, returns scalar * generator.
119
+ */ static async generator(scalar) {
120
+ if (!scalar) {
121
+ return new Bn254G2Point([
122
+ Fq.fromBuffer(Buffer.from(BN254_G2_GENERATOR.x[0])),
123
+ Fq.fromBuffer(Buffer.from(BN254_G2_GENERATOR.x[1]))
124
+ ], [
125
+ Fq.fromBuffer(Buffer.from(BN254_G2_GENERATOR.y[0])),
126
+ Fq.fromBuffer(Buffer.from(BN254_G2_GENERATOR.y[1]))
127
+ ]);
128
+ }
129
+ await BarretenbergSync.initSingleton();
130
+ const api = BarretenbergSync.getSingleton();
131
+ const response = api.bn254G2Mul({
132
+ point: BN254_G2_GENERATOR,
133
+ scalar: scalar.toBuffer()
134
+ });
135
+ return Bn254G2Point.fromBbApiPoint(response.point);
136
+ }
137
+ equals(other) {
138
+ return this.x[0].equals(other.x[0]) && this.x[1].equals(other.x[1]) && this.y[0].equals(other.y[0]) && this.y[1].equals(other.y[1]);
139
+ }
140
+ toString() {
141
+ return `Bn254G2Point(x: (${this.x[0].toString()}, ${this.x[1].toString()}), y: (${this.y[0].toString()}, ${this.y[1].toString()}))`;
142
+ }
143
+ }
@@ -0,0 +1,10 @@
1
+ import { Fq } from '../bn254/field.js';
2
+ export * from './point.js';
3
+ /**
4
+ * GrumpkinScalar is an Fq.
5
+ * @remarks Called GrumpkinScalar because it is used to represent elements in Grumpkin's scalar field as defined in
6
+ * the Aztec Protocol Specs.
7
+ */
8
+ export type GrumpkinScalar = Fq;
9
+ export declare const GrumpkinScalar: typeof Fq;
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jdXJ2ZXMvZ3J1bXBraW4vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRXZDLGNBQWMsWUFBWSxDQUFDO0FBRTNCOzs7O0dBSUc7QUFDSCxNQUFNLE1BQU0sY0FBYyxHQUFHLEVBQUUsQ0FBQztBQUNoQyxlQUFPLE1BQU0sY0FBYyxXQUFLLENBQUMifQ==
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/curves/grumpkin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,cAAc,YAAY,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,EAAE,CAAC;AAChC,eAAO,MAAM,cAAc,WAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fq } from '../bn254/field.js';
2
+ export * from './point.js';
3
+ export const GrumpkinScalar = Fq;
@@ -1,7 +1,5 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { BufferReader, FieldReader } from '../serialize/index.js';
4
- import { Fr } from './fields.js';
1
+ import { BufferReader, FieldReader } from '../../serialize/index.js';
2
+ import { Fr } from '../bn254/field.js';
5
3
  /**
6
4
  * Represents a Point on an elliptic curve with x and y coordinates.
7
5
  * The Point class provides methods for creating instances from different input types,
@@ -17,15 +15,13 @@ export declare class Point {
17
15
  * The point's y coordinate
18
16
  */
19
17
  readonly y: Fr;
20
- /**
21
- * Whether the point is at infinity
22
- */
23
- readonly isInfinite: boolean;
24
- static ZERO: Point;
18
+ static INFINITY: Point;
25
19
  static SIZE_IN_BYTES: number;
26
20
  static COMPRESSED_SIZE_IN_BYTES: number;
27
21
  /** Used to differentiate this class from AztecAddress */
28
22
  readonly kind = "point";
23
+ /** Whether the point is at infinity */
24
+ readonly isInfinite: boolean;
29
25
  constructor(
30
26
  /**
31
27
  * The point's x coordinate
@@ -34,15 +30,20 @@ export declare class Point {
34
30
  /**
35
31
  * The point's y coordinate
36
32
  */
37
- y: Fr,
33
+ y: Fr);
34
+ toJSON(): `0x${string}`;
35
+ static get schema(): import("zod").ZodType<Point, string, import("zod/v4/core").$ZodTypeInternals<Point, string>>;
38
36
  /**
39
- * Whether the point is at infinity
37
+ * Creates a Point from a plain object without Zod validation.
38
+ * This method is optimized for performance and skips validation, making it suitable
39
+ * for deserializing trusted data (e.g., from C++ via MessagePack).
40
+ * Handles buffers, existing instances, or objects with x, y, and isInfinite fields.
41
+ * @param obj - Plain object, buffer, or Point instance
42
+ * @returns A Point instance
40
43
  */
41
- isInfinite: boolean);
42
- toJSON(): `0x${string}`;
43
- static get schema(): import("zod").ZodType<Point, any, string>;
44
+ static fromPlainObject(obj: any): Point;
44
45
  /**
45
- * Generate a random Point instance.
46
+ * Generate a random Point instance that is on the curve.
46
47
  *
47
48
  * @returns A randomly generated Point instance.
48
49
  */
@@ -89,7 +90,8 @@ export declare class Point {
89
90
  */
90
91
  static fromXAndSign(x: Fr, sign: boolean): Promise<Point>;
91
92
  /**
92
- * @returns
93
+ * @param x - The x coordinate of the point
94
+ * @returns y^2 such that y^2 = x^3 - 17
93
95
  */
94
96
  static YFromX(x: Fr): Promise<Fr | null>;
95
97
  /**
@@ -105,24 +107,18 @@ export declare class Point {
105
107
  toBigInts(): {
106
108
  x: bigint;
107
109
  y: bigint;
108
- isInfinite: bigint;
109
110
  };
110
111
  /**
111
112
  * Converts the Point instance to a Buffer representation of the coordinates.
112
113
  * @returns A Buffer representation of the Point instance.
113
- * @dev Note that toBuffer does not include the isInfinite flag and other serialization methods do (e.g. toFields).
114
- * This is because currently when we work with point as bytes we don't want to populate the extra bytes for
115
- * isInfinite flag because:
116
- * 1. Our Grumpkin BB API currently does not handle point at infinity,
117
- * 2. we use toBuffer when serializing notes and events and there we only work with public keys and point at infinity
118
- * is not considered a valid public key and the extra byte would raise DA cost.
114
+ * @dev Note that toBuffer does not include the isInfinite flag. The point at infinity is serialized as (0, 0).
119
115
  */
120
- toBuffer(): Buffer;
116
+ toBuffer(): Buffer<ArrayBufferLike>;
121
117
  /**
122
118
  * Converts the Point instance to a compressed Buffer representation of the coordinates.
123
119
  * @returns A Buffer representation of the Point instance
124
120
  */
125
- toCompressedBuffer(): Buffer;
121
+ toCompressedBuffer(): Buffer<ArrayBufferLike>;
126
122
  /**
127
123
  * Convert the Point instance to a hexadecimal string representation.
128
124
  * The output string is prefixed with '0x' and consists of exactly 128 hex characters,
@@ -143,13 +139,11 @@ export declare class Point {
143
139
  toNoirStruct(): {
144
140
  x: Fr;
145
141
  y: Fr;
146
- is_infinite: boolean;
147
142
  };
148
143
  toWrappedNoirStruct(): {
149
144
  inner: {
150
145
  x: Fr;
151
146
  y: Fr;
152
- is_infinite: boolean;
153
147
  };
154
148
  };
155
149
  /**
@@ -161,15 +155,14 @@ export declare class Point {
161
155
  */
162
156
  equals(rhs: Point): boolean;
163
157
  isZero(): boolean;
164
- hash(): Promise<Fr>;
165
158
  /**
166
- * Check if this is point at infinity.
167
- * Check this is consistent with how bb is encoding the point at infinity
159
+ * @param x - The x coordinate of the point
160
+ * @param y - The y coordinate of the point
161
+ * @returns Whether the point exists on Grumpkin
168
162
  */
169
- get inf(): boolean;
170
- isOnGrumpkin(): boolean;
163
+ isOnCurve(): boolean;
171
164
  }
172
165
  export declare class NotOnCurveError extends Error {
173
166
  constructor(x: Fr);
174
167
  }
175
- //# sourceMappingURL=point.d.ts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AAE,EAAE,EAAE,GAAG,WAAW,SAI3C;IAED;;;;;;;;OAQG;IACH,OAAa,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,kBAc7C;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,CAOvC;IAED;;;;OAIG;IACH,UAAU,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAE1B;IAED;;;OAGG;IACH,SAAS;;;MAKR;IAED;;;;OAIG;IACH,QAAQ,4BAMP;IAED;;;OAGG;IACH,kBAAkB,4BAWjB;IAED;;;;;;OAMG;IACH,QAAQ,kBAEP;IAED;;;;;;;OAOG;IACH,aAAa,WAGZ;IAED,YAAY;;;MAEX;IAGD,mBAAmB;;;;;MAElB;IAED;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,EAAE,KAAK,WAEhB;IAED,MAAM,YAEL;IAED;;;;OAIG;IACH,SAAS,YAUR;CACF;AAED,qBAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,CAAC,EAAE,EAAE,EAGhB;CACF"}
@@ -1,10 +1,9 @@
1
- import { toBigIntBE } from '../bigint-buffer/index.js';
2
- import { poseidon2Hash } from '../crypto/poseidon/index.js';
3
- import { randomBoolean } from '../crypto/random/index.js';
4
- import { hexSchemaFor } from '../schemas/utils.js';
5
- import { BufferReader, FieldReader, serializeToBuffer } from '../serialize/index.js';
6
- import { bufferToHex, hexToBuffer } from '../string/index.js';
7
- import { Fr } from './fields.js';
1
+ import { toBigIntBE } from '../../bigint-buffer/index.js';
2
+ import { randomBoolean } from '../../crypto/random/index.js';
3
+ import { hexSchemaFor } from '../../schemas/utils.js';
4
+ import { BufferReader, FieldReader, serializeToBuffer } from '../../serialize/index.js';
5
+ import { bufferToHex, hexToBuffer } from '../../string/index.js';
6
+ import { Fr } from '../bn254/field.js';
8
7
  /**
9
8
  * Represents a Point on an elliptic curve with x and y coordinates.
10
9
  * The Point class provides methods for creating instances from different input types,
@@ -13,32 +12,48 @@ import { Fr } from './fields.js';
13
12
  */ export class Point {
14
13
  x;
15
14
  y;
16
- isInfinite;
17
- static ZERO = new Point(Fr.ZERO, Fr.ZERO, false);
15
+ static INFINITY = new Point(Fr.ZERO, Fr.ZERO);
18
16
  static SIZE_IN_BYTES = Fr.SIZE_IN_BYTES * 2;
19
17
  static COMPRESSED_SIZE_IN_BYTES = Fr.SIZE_IN_BYTES;
20
18
  /** Used to differentiate this class from AztecAddress */ kind;
19
+ /** Whether the point is at infinity */ isInfinite;
21
20
  constructor(/**
22
21
  * The point's x coordinate
23
22
  */ x, /**
24
23
  * The point's y coordinate
25
- */ y, /**
26
- * Whether the point is at infinity
27
- */ isInfinite){
24
+ */ y){
28
25
  this.x = x;
29
26
  this.y = y;
30
- this.isInfinite = isInfinite;
31
27
  this.kind = 'point';
32
- // TODO(#7386): check if on curve
28
+ // TODO(#7386): check if on curve
29
+ // NOTE: now there is no isInfinite in the struct, empty == inf, so an empty class would pass an on-curve check. This may be fine depending on the usage.
30
+ this.isInfinite = x.isZero() && y.isZero();
33
31
  }
34
32
  toJSON() {
35
33
  return this.toString();
36
34
  }
37
35
  static get schema() {
36
+ // Serialization from hex string.
38
37
  return hexSchemaFor(Point);
39
38
  }
40
39
  /**
41
- * Generate a random Point instance.
40
+ * Creates a Point from a plain object without Zod validation.
41
+ * This method is optimized for performance and skips validation, making it suitable
42
+ * for deserializing trusted data (e.g., from C++ via MessagePack).
43
+ * Handles buffers, existing instances, or objects with x, y, and isInfinite fields.
44
+ * @param obj - Plain object, buffer, or Point instance
45
+ * @returns A Point instance
46
+ */ static fromPlainObject(obj) {
47
+ if (obj instanceof Point) {
48
+ return obj;
49
+ }
50
+ if (obj instanceof Buffer || Buffer.isBuffer(obj)) {
51
+ return Point.fromBuffer(obj);
52
+ }
53
+ return new this(Fr.fromPlainObject(obj.x), Fr.fromPlainObject(obj.y));
54
+ }
55
+ /**
56
+ * Generate a random Point instance that is on the curve.
42
57
  *
43
58
  * @returns A randomly generated Point instance.
44
59
  */ static async random() {
@@ -61,7 +76,7 @@ import { Fr } from './fields.js';
61
76
  * @returns A Point instance.
62
77
  */ static fromBuffer(buffer) {
63
78
  const reader = BufferReader.asReader(buffer);
64
- return new this(Fr.fromBuffer(reader), Fr.fromBuffer(reader), false);
79
+ return new this(Fr.fromBuffer(reader), Fr.fromBuffer(reader));
65
80
  }
66
81
  /**
67
82
  * Create a Point instance from a compressed buffer.
@@ -92,13 +107,16 @@ import { Fr } from './fields.js';
92
107
  */ toFields() {
93
108
  return [
94
109
  this.x,
95
- this.y,
96
- new Fr(this.isInfinite)
110
+ this.y
97
111
  ];
98
112
  }
99
113
  static fromFields(fields) {
100
114
  const reader = FieldReader.asReader(fields);
101
- return new this(reader.readField(), reader.readField(), reader.readBoolean());
115
+ const [x, y] = [
116
+ reader.readField(),
117
+ reader.readField()
118
+ ];
119
+ return new this(x, y);
102
120
  }
103
121
  /**
104
122
  * Uses the x coordinate and isPositive flag (+/-) to reconstruct the point.
@@ -118,10 +136,11 @@ import { Fr } from './fields.js';
118
136
  // Choose the positive or negative root based on isPositive
119
137
  const finalY = sign ? new Fr(yPositiveBigInt) : new Fr(yNegativeBigInt);
120
138
  // Create and return the new Point
121
- return new this(x, finalY, false);
139
+ return new this(x, finalY);
122
140
  }
123
141
  /**
124
- * @returns
142
+ * @param x - The x coordinate of the point
143
+ * @returns y^2 such that y^2 = x^3 - 17
125
144
  */ static YFromX(x) {
126
145
  // Calculate y^2 = x^3 - 17 (i.e. the Grumpkin curve equation)
127
146
  const ySquared = x.square().mul(x).sub(new Fr(17));
@@ -145,23 +164,14 @@ import { Fr } from './fields.js';
145
164
  */ toBigInts() {
146
165
  return {
147
166
  x: this.x.toBigInt(),
148
- y: this.y.toBigInt(),
149
- isInfinite: this.isInfinite ? 1n : 0n
167
+ y: this.y.toBigInt()
150
168
  };
151
169
  }
152
170
  /**
153
171
  * Converts the Point instance to a Buffer representation of the coordinates.
154
172
  * @returns A Buffer representation of the Point instance.
155
- * @dev Note that toBuffer does not include the isInfinite flag and other serialization methods do (e.g. toFields).
156
- * This is because currently when we work with point as bytes we don't want to populate the extra bytes for
157
- * isInfinite flag because:
158
- * 1. Our Grumpkin BB API currently does not handle point at infinity,
159
- * 2. we use toBuffer when serializing notes and events and there we only work with public keys and point at infinity
160
- * is not considered a valid public key and the extra byte would raise DA cost.
173
+ * @dev Note that toBuffer does not include the isInfinite flag. The point at infinity is serialized as (0, 0).
161
174
  */ toBuffer() {
162
- if (this.isInfinite) {
163
- throw new Error('Cannot serialize infinite point without isInfinite flag');
164
- }
165
175
  const buf = serializeToBuffer([
166
176
  this.x,
167
177
  this.y
@@ -207,18 +217,17 @@ import { Fr } from './fields.js';
207
217
  return `${str.slice(0, 10)}...${str.slice(-4)}`;
208
218
  }
209
219
  toNoirStruct() {
210
- /* eslint-disable camelcase */ return {
220
+ return {
211
221
  x: this.x,
212
- y: this.y,
213
- is_infinite: this.isInfinite
222
+ y: this.y
214
223
  };
215
- /* eslint-enable camelcase */ }
216
- // Used for IvpkM, OvpkM, NpkM and TpkM. TODO(#8124): Consider removing this method.
224
+ }
225
+ // Used for IvpkM. TODO(#8124): Consider removing this method.
217
226
  toWrappedNoirStruct() {
218
- /* eslint-disable camelcase */ return {
227
+ return {
219
228
  inner: this.toNoirStruct()
220
229
  };
221
- /* eslint-enable camelcase */ }
230
+ }
222
231
  /**
223
232
  * Check if two Point instances are equal by comparing their buffer values.
224
233
  * Returns true if the buffer values are the same, and false otherwise.
@@ -231,18 +240,12 @@ import { Fr } from './fields.js';
231
240
  isZero() {
232
241
  return this.x.isZero() && this.y.isZero();
233
242
  }
234
- hash() {
235
- return poseidon2Hash(this.toFields());
236
- }
237
243
  /**
238
- * Check if this is point at infinity.
239
- * Check this is consistent with how bb is encoding the point at infinity
240
- */ get inf() {
241
- return this.isInfinite;
242
- }
243
- isOnGrumpkin() {
244
- // TODO: Check this against how bb handles curve check and infinity point check
245
- if (this.inf) {
244
+ * @param x - The x coordinate of the point
245
+ * @param y - The y coordinate of the point
246
+ * @returns Whether the point exists on Grumpkin
247
+ */ isOnCurve() {
248
+ if (this.isInfinite) {
246
249
  return true;
247
250
  }
248
251
  // The Grumpkin equation is y^2 = x^3 - 17. We could use `YFromX` and then compare to `this.y`, but this would
@@ -1,2 +1,2 @@
1
1
  export * from './memoize.js';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWNvcmF0b3JzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDIn0=
@@ -1,2 +1,2 @@
1
1
  export declare function memoize<This extends object, Result>(fn: () => Result, context: ClassMethodDecoratorContext): (this: This) => Result;
2
- //# sourceMappingURL=memoize.d.ts.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVtb2l6ZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlY29yYXRvcnMvbWVtb2l6ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx3QkFBZ0IsT0FBTyxDQUFDLElBQUksU0FBUyxNQUFNLEVBQUUsTUFBTSxFQUFFLEVBQUUsRUFBRSxNQUFNLE1BQU0sRUFBRSxPQUFPLEVBQUUsMkJBQTJCLDBCQVUxRyJ9
@@ -1 +1 @@
1
- {"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["../../src/decorators/memoize.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,SAAS,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,MAAM,EAAE,OAAO,EAAE,2BAA2B,UAClF,IAAI,YAS5B"}
1
+ {"version":3,"file":"memoize.d.ts","sourceRoot":"","sources":["../../src/decorators/memoize.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,SAAS,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,MAAM,EAAE,OAAO,EAAE,2BAA2B,0BAU1G"}
@@ -18,4 +18,4 @@ export declare class TimeoutError extends Error {
18
18
  export declare class AbortError extends Error {
19
19
  readonly name = "AbortError";
20
20
  }
21
- //# sourceMappingURL=index.d.ts.map
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lcnJvci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7OztHQUlHO0FBQ0gscUJBQWEsY0FBZSxTQUFRLEtBQUs7SUFDdkMsU0FBeUIsSUFBSSxvQkFBb0I7Q0FDbEQ7QUFFRDs7R0FFRztBQUNILHFCQUFhLFlBQWEsU0FBUSxLQUFLO0lBQ3JDLFNBQXlCLElBQUksa0JBQWtCO0NBQ2hEO0FBRUQ7O0dBRUc7QUFDSCxxQkFBYSxVQUFXLFNBQVEsS0FBSztJQUNuQyxTQUF5QixJQUFJLGdCQUFnQjtDQUM5QyJ9
@@ -1,8 +1,5 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
1
  import { inspect } from 'util';
5
- import { Fr } from '../fields/index.js';
2
+ import { Fr } from '../curves/bn254/index.js';
6
3
  import { BufferReader, FieldReader } from '../serialize/index.js';
7
4
  /**
8
5
  * Represents an Ethereum address as a 20-byte buffer and provides various utility methods
@@ -26,6 +23,15 @@ export declare class EthAddress {
26
23
  * @returns An EthAddress instance.
27
24
  */
28
25
  static fromString(address: string): EthAddress;
26
+ /**
27
+ * Creates an EthAddress from a plain object without Zod validation.
28
+ * This method is optimized for performance and skips validation, making it suitable
29
+ * for deserializing trusted data (e.g., from C++ via MessagePack).
30
+ * Handles buffers (20 or 32 bytes), strings, or existing instances.
31
+ * @param obj - Plain object, buffer, string, or EthAddress instance
32
+ * @returns An EthAddress instance
33
+ */
34
+ static fromPlainObject(obj: any): EthAddress;
29
35
  /**
30
36
  * Create a random EthAddress instance with 20 random bytes.
31
37
  * This method generates a new Ethereum address with a randomly generated set of 20 bytes.
@@ -70,7 +76,7 @@ export declare class EthAddress {
70
76
  * @param address - The Ethereum address as a hex-encoded string.
71
77
  * @returns The Ethereum address in its checksum format.
72
78
  */
73
- static toChecksumAddress(address: string): string;
79
+ static toChecksumAddress(address: string): `0x${string}`;
74
80
  /**
75
81
  * Checks whether the given EthAddress instance is equal to the current instance.
76
82
  * Equality is determined by comparing the underlying byte buffers of both instances.
@@ -95,12 +101,12 @@ export declare class EthAddress {
95
101
  *
96
102
  * @returns A checksummed Ethereum address string.
97
103
  */
98
- toChecksumString(): string;
104
+ toChecksumString(): `0x${string}`;
99
105
  /**
100
106
  * Returns a 20-byte buffer representation of the Ethereum address.
101
107
  * @returns A 20-byte Buffer containing the Ethereum address.
102
108
  */
103
- toBuffer(): Buffer;
109
+ toBuffer(): Buffer<ArrayBufferLike>;
104
110
  /**
105
111
  * Returns a 32-byte buffer representation of the Ethereum address, with the original 20-byte address
106
112
  * occupying the last 20 bytes and the first 12 bytes being zero-filled.
@@ -108,7 +114,7 @@ export declare class EthAddress {
108
114
  *
109
115
  * @returns A 32-byte Buffer containing the padded Ethereum address.
110
116
  */
111
- toBuffer32(): Buffer;
117
+ toBuffer32(): Buffer<ArrayBuffer>;
112
118
  /**
113
119
  * Returns a new field with the same contents as this EthAddress.
114
120
  *
@@ -128,7 +134,10 @@ export declare class EthAddress {
128
134
  * @returns The EthAddress.
129
135
  */
130
136
  static fromBuffer(buffer: Buffer | BufferReader): EthAddress;
137
+ /** Converts a number into an address. Useful for testing. */
138
+ static fromNumber(num: bigint | number): EthAddress;
131
139
  toJSON(): `0x${string}`;
132
- static get schema(): import("zod").ZodType<EthAddress, any, string>;
140
+ static get schema(): import("zod").ZodType<EthAddress, string, import("zod/v4/core").$ZodTypeInternals<EthAddress, string>>;
141
+ static areEqual(a: EthAddress | string, b: EthAddress | string): boolean;
133
142
  }
134
- //# sourceMappingURL=index.d.ts.map
143
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ldGgtYWRkcmVzcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBSS9CLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUU5QyxPQUFPLEVBQUUsWUFBWSxFQUFFLFdBQVcsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBR2xFOzs7OztHQUtHO0FBQ0gscUJBQWEsVUFBVTtJQU1ULE9BQU8sQ0FBQyxNQUFNO0lBTDFCLGdEQUFnRDtJQUNoRCxPQUFjLGFBQWEsU0FBTTtJQUNqQywwRUFBMEU7SUFDMUUsT0FBYyxJQUFJLGFBQTBEO0lBRTVFLFlBQW9CLE1BQU0sRUFBRSxNQUFNLEVBSWpDO0lBRUQ7Ozs7Ozs7T0FPRztJQUNILE9BQWMsVUFBVSxDQUFDLE9BQU8sRUFBRSxNQUFNLGNBS3ZDO0lBRUQ7Ozs7Ozs7T0FPRztJQUNILE9BQWMsZUFBZSxDQUFDLEdBQUcsRUFBRSxHQUFHLEdBQUcsVUFBVSxDQVFsRDtJQUVEOzs7Ozs7T0FNRztJQUNILE9BQWMsTUFBTSxlQUVuQjtJQUVEOzs7Ozs7OztPQVFHO0lBQ0gsT0FBYyxTQUFT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