@aztec/foundation 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2

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 (554) hide show
  1. package/dest/abi/abi.js +157 -93
  2. package/dest/abi/buffer.js +9 -9
  3. package/dest/abi/decoder.js +89 -86
  4. package/dest/abi/encoder.js +91 -87
  5. package/dest/abi/event_selector.js +25 -33
  6. package/dest/abi/function_selector.js +28 -33
  7. package/dest/abi/index.js +0 -1
  8. package/dest/abi/note_selector.js +15 -21
  9. package/dest/abi/selector.js +22 -29
  10. package/dest/abi/u128.js +11 -5
  11. package/dest/abi/utils.js +9 -20
  12. package/dest/array/array.js +19 -26
  13. package/dest/array/index.js +0 -1
  14. package/dest/async-map/index.js +2 -4
  15. package/dest/async-pool/index.js +6 -9
  16. package/dest/aztec-address/index.js +14 -19
  17. package/dest/bigint-buffer/index.js +6 -13
  18. package/dest/buffer/buffer32.js +53 -66
  19. package/dest/buffer/index.js +0 -1
  20. package/dest/collection/array.js +47 -59
  21. package/dest/collection/index.js +0 -1
  22. package/dest/collection/object.js +9 -9
  23. package/dest/committable/committable.js +15 -20
  24. package/dest/committable/index.js +0 -1
  25. package/dest/config/env_var.js +1 -2
  26. package/dest/config/index.js +31 -36
  27. package/dest/crypto/index.js +0 -1
  28. package/dest/crypto/keccak/index.js +60 -69
  29. package/dest/crypto/keys/index.js +1 -2
  30. package/dest/crypto/pedersen/index.js +0 -1
  31. package/dest/crypto/pedersen/pedersen.elliptic.js +153 -146
  32. package/dest/crypto/pedersen/pedersen.noble.js +140 -142
  33. package/dest/crypto/pedersen/pedersen.wasm.js +14 -13
  34. package/dest/crypto/poseidon/index.js +10 -14
  35. package/dest/crypto/random/index.js +7 -12
  36. package/dest/crypto/random/randomness_singleton.js +12 -12
  37. package/dest/crypto/secp256k1-signer/index.js +0 -1
  38. package/dest/crypto/secp256k1-signer/secp256k1_signer.js +8 -9
  39. package/dest/crypto/secp256k1-signer/utils.js +11 -16
  40. package/dest/crypto/sha256/index.js +80 -30
  41. package/dest/crypto/sha512/index.js +2 -4
  42. package/dest/crypto/sync/index.js +0 -1
  43. package/dest/crypto/sync/pedersen/index.js +14 -13
  44. package/dest/crypto/sync/poseidon/index.js +10 -14
  45. package/dest/decorators/index.js +0 -1
  46. package/dest/decorators/memoize.js +1 -2
  47. package/dest/error/index.js +6 -19
  48. package/dest/eth-address/index.js +92 -113
  49. package/dest/eth-signature/eth_signature.js +21 -27
  50. package/dest/eth-signature/index.js +0 -1
  51. package/dest/fields/coordinate.js +47 -46
  52. package/dest/fields/fields.js +112 -127
  53. package/dest/fields/index.js +0 -1
  54. package/dest/fields/point.js +119 -129
  55. package/dest/fs/index.js +0 -1
  56. package/dest/fs/run_in_dir.js +6 -6
  57. package/dest/index.js +0 -2
  58. package/dest/iterable/all.js +3 -4
  59. package/dest/iterable/filter.js +10 -11
  60. package/dest/iterable/index.js +0 -1
  61. package/dest/iterable/isAsyncIt.js +1 -3
  62. package/dest/iterable/map.js +10 -11
  63. package/dest/iterable/peek.js +14 -14
  64. package/dest/iterable/sort.js +4 -5
  65. package/dest/iterable/take.js +6 -7
  66. package/dest/iterable/toArray.js +1 -2
  67. package/dest/jest/setup.js +7 -0
  68. package/dest/json-rpc/client/fetch.js +21 -19
  69. package/dest/json-rpc/client/index.js +0 -1
  70. package/dest/json-rpc/client/safe_json_rpc_client.js +16 -8
  71. package/dest/json-rpc/convert.js +10 -20
  72. package/dest/json-rpc/fixtures/class_a.js +8 -5
  73. package/dest/json-rpc/fixtures/class_b.js +8 -5
  74. package/dest/json-rpc/fixtures/test_state.js +53 -40
  75. package/dest/json-rpc/index.js +0 -1
  76. package/dest/json-rpc/js_utils.js +2 -5
  77. package/dest/json-rpc/server/index.js +0 -1
  78. package/dest/json-rpc/server/safe_json_rpc_server.js +145 -101
  79. package/dest/json-rpc/server/telemetry.js +0 -2
  80. package/dest/json-rpc/test/index.js +0 -1
  81. package/dest/json-rpc/test/integration.js +8 -3
  82. package/dest/log/console.js +14 -16
  83. package/dest/log/debug.js +9 -18
  84. package/dest/log/gcloud-logger-config.js +17 -15
  85. package/dest/log/index.js +0 -1
  86. package/dest/log/log-filters.js +13 -11
  87. package/dest/log/log-levels.js +10 -2
  88. package/dest/log/log_fn.js +1 -2
  89. package/dest/log/log_history.js +21 -25
  90. package/dest/log/pino-logger.js +82 -64
  91. package/dest/message/index.js +7 -3
  92. package/dest/mutex/index.js +34 -32
  93. package/dest/mutex/mutex_database.js +4 -2
  94. package/dest/noir/index.js +0 -1
  95. package/dest/noir/noir_package_config.js +13 -8
  96. package/dest/promise/index.js +0 -1
  97. package/dest/promise/running-promise.js +28 -28
  98. package/dest/promise/utils.js +3 -5
  99. package/dest/queue/base_memory_queue.js +51 -59
  100. package/dest/queue/bounded_serial_queue.js +41 -51
  101. package/dest/queue/fifo_memory_queue.js +4 -8
  102. package/dest/queue/index.js +0 -1
  103. package/dest/queue/priority_memory_queue.js +3 -4
  104. package/dest/queue/priority_queue.js +5 -5
  105. package/dest/queue/semaphore.js +15 -19
  106. package/dest/queue/serial_queue.js +37 -47
  107. package/dest/retry/index.js +21 -18
  108. package/dest/running-promise/index.js +0 -1
  109. package/dest/schemas/api.js +2 -7
  110. package/dest/schemas/index.js +0 -1
  111. package/dest/schemas/parse.js +4 -8
  112. package/dest/schemas/schemas.js +33 -48
  113. package/dest/schemas/types.js +1 -2
  114. package/dest/schemas/utils.js +18 -31
  115. package/dest/serialize/buffer_reader.js +164 -188
  116. package/dest/serialize/field_reader.js +70 -79
  117. package/dest/serialize/free_funcs.js +40 -37
  118. package/dest/serialize/index.js +0 -1
  119. package/dest/serialize/serialize.js +72 -83
  120. package/dest/serialize/type_registry.js +10 -14
  121. package/dest/serialize/types.js +4 -5
  122. package/dest/sleep/index.js +25 -29
  123. package/dest/string/index.js +0 -1
  124. package/dest/testing/files/index.js +5 -8
  125. package/dest/testing/index.js +0 -1
  126. package/dest/testing/port_allocator.js +7 -10
  127. package/dest/testing/snapshot_serializer.js +14 -9
  128. package/dest/testing/test_data.js +7 -8
  129. package/dest/timer/date.js +9 -7
  130. package/dest/timer/elapsed.js +10 -7
  131. package/dest/timer/index.js +0 -1
  132. package/dest/timer/timeout.js +34 -34
  133. package/dest/timer/timer.js +17 -21
  134. package/dest/transport/browser/index.js +0 -1
  135. package/dest/transport/browser/message_port_socket.js +26 -30
  136. package/dest/transport/browser/shared_worker_connector.js +8 -10
  137. package/dest/transport/browser/shared_worker_listener.js +13 -17
  138. package/dest/transport/browser/worker_connector.js +12 -12
  139. package/dest/transport/browser/worker_listener.js +13 -17
  140. package/dest/transport/dispatch/create_dispatch_fn.js +2 -4
  141. package/dest/transport/dispatch/create_dispatch_proxy.js +16 -13
  142. package/dest/transport/dispatch/messages.js +4 -3
  143. package/dest/transport/index.js +0 -1
  144. package/dest/transport/interface/connector.js +3 -2
  145. package/dest/transport/interface/listener.js +4 -2
  146. package/dest/transport/interface/socket.js +7 -2
  147. package/dest/transport/interface/transferable.js +7 -9
  148. package/dest/transport/node/index.js +0 -1
  149. package/dest/transport/node/node_connector.js +9 -11
  150. package/dest/transport/node/node_connector_socket.js +21 -25
  151. package/dest/transport/node/node_listener.js +11 -15
  152. package/dest/transport/node/node_listener_socket.js +23 -27
  153. package/dest/transport/transport_client.js +47 -46
  154. package/dest/transport/transport_server.js +68 -55
  155. package/dest/trees/index.js +0 -1
  156. package/dest/trees/unbalanced_merkle_tree.js +26 -16
  157. package/dest/trees/unbalanced_tree_store.js +43 -29
  158. package/dest/types/index.js +1 -3
  159. package/dest/url/index.js +4 -8
  160. package/dest/validation/index.js +2 -5
  161. package/dest/wasm/empty_wasi_sdk.js +142 -160
  162. package/dest/wasm/index.js +0 -1
  163. package/dest/wasm/wasm_module.js +80 -90
  164. package/dest/worker/browser/index.js +0 -1
  165. package/dest/worker/browser/start_web_module.js +9 -5
  166. package/dest/worker/browser/web_data_store.js +12 -15
  167. package/dest/worker/browser/web_worker.js +6 -5
  168. package/dest/worker/data_store.js +3 -2
  169. package/dest/worker/index.js +0 -1
  170. package/dest/worker/node/index.js +0 -1
  171. package/dest/worker/node/node_data_store.js +4 -5
  172. package/dest/worker/node/node_worker.js +6 -5
  173. package/dest/worker/node/start_node_module.js +9 -5
  174. package/dest/worker/wasm_worker.js +3 -2
  175. package/dest/worker/worker_pool.js +32 -43
  176. package/package.json +3 -4
  177. package/src/fields/fields.ts +2 -2
  178. package/src/index.ts +0 -1
  179. package/src/queue/serial_queue.ts +1 -1
  180. package/src/testing/files/index.ts +2 -1
  181. package/src/wasm/index.ts +1 -1
  182. package/src/worker/index.ts +1 -1
  183. package/dest/abi/abi.d.ts +0 -853
  184. package/dest/abi/abi.d.ts.map +0 -1
  185. package/dest/abi/buffer.d.ts +0 -18
  186. package/dest/abi/buffer.d.ts.map +0 -1
  187. package/dest/abi/decoder.d.ts +0 -58
  188. package/dest/abi/decoder.d.ts.map +0 -1
  189. package/dest/abi/encoder.d.ts +0 -16
  190. package/dest/abi/encoder.d.ts.map +0 -1
  191. package/dest/abi/event_selector.d.ts +0 -52
  192. package/dest/abi/event_selector.d.ts.map +0 -1
  193. package/dest/abi/function_selector.d.ts +0 -65
  194. package/dest/abi/function_selector.d.ts.map +0 -1
  195. package/dest/abi/index.d.ts +0 -10
  196. package/dest/abi/index.d.ts.map +0 -1
  197. package/dest/abi/note_selector.d.ts +0 -42
  198. package/dest/abi/note_selector.d.ts.map +0 -1
  199. package/dest/abi/selector.d.ts +0 -42
  200. package/dest/abi/selector.d.ts.map +0 -1
  201. package/dest/abi/u128.d.ts +0 -13
  202. package/dest/abi/u128.d.ts.map +0 -1
  203. package/dest/abi/utils.d.ts +0 -44
  204. package/dest/abi/utils.d.ts.map +0 -1
  205. package/dest/array/array.d.ts +0 -71
  206. package/dest/array/array.d.ts.map +0 -1
  207. package/dest/array/index.d.ts +0 -2
  208. package/dest/array/index.d.ts.map +0 -1
  209. package/dest/async-map/index.d.ts +0 -13
  210. package/dest/async-map/index.d.ts.map +0 -1
  211. package/dest/async-pool/index.d.ts +0 -3
  212. package/dest/async-pool/index.d.ts.map +0 -1
  213. package/dest/aztec-address/index.d.ts +0 -57
  214. package/dest/aztec-address/index.d.ts.map +0 -1
  215. package/dest/bigint-buffer/index.d.ts +0 -42
  216. package/dest/bigint-buffer/index.d.ts.map +0 -1
  217. package/dest/blob/blob.d.ts +0 -154
  218. package/dest/blob/blob.d.ts.map +0 -1
  219. package/dest/blob/blob.js +0 -264
  220. package/dest/blob/encoding.d.ts +0 -53
  221. package/dest/blob/encoding.d.ts.map +0 -1
  222. package/dest/blob/encoding.js +0 -87
  223. package/dest/blob/errors.d.ts +0 -4
  224. package/dest/blob/errors.d.ts.map +0 -1
  225. package/dest/blob/errors.js +0 -7
  226. package/dest/blob/index.d.ts +0 -6
  227. package/dest/blob/index.d.ts.map +0 -1
  228. package/dest/blob/index.js +0 -22
  229. package/dest/blob/interface.d.ts +0 -10
  230. package/dest/blob/interface.d.ts.map +0 -1
  231. package/dest/blob/interface.js +0 -2
  232. package/dest/blob/mocks.d.ts +0 -20
  233. package/dest/blob/mocks.d.ts.map +0 -1
  234. package/dest/blob/mocks.js +0 -42
  235. package/dest/buffer/buffer32.d.ts +0 -91
  236. package/dest/buffer/buffer32.d.ts.map +0 -1
  237. package/dest/buffer/index.d.ts +0 -2
  238. package/dest/buffer/index.d.ts.map +0 -1
  239. package/dest/collection/array.d.ts +0 -101
  240. package/dest/collection/array.d.ts.map +0 -1
  241. package/dest/collection/index.d.ts +0 -3
  242. package/dest/collection/index.d.ts.map +0 -1
  243. package/dest/collection/object.d.ts +0 -14
  244. package/dest/collection/object.d.ts.map +0 -1
  245. package/dest/committable/committable.d.ts +0 -28
  246. package/dest/committable/committable.d.ts.map +0 -1
  247. package/dest/committable/index.d.ts +0 -2
  248. package/dest/committable/index.d.ts.map +0 -1
  249. package/dest/config/env_var.d.ts +0 -2
  250. package/dest/config/env_var.d.ts.map +0 -1
  251. package/dest/config/index.d.ts +0 -66
  252. package/dest/config/index.d.ts.map +0 -1
  253. package/dest/crypto/index.d.ts +0 -9
  254. package/dest/crypto/index.d.ts.map +0 -1
  255. package/dest/crypto/keccak/index.d.ts +0 -28
  256. package/dest/crypto/keccak/index.d.ts.map +0 -1
  257. package/dest/crypto/keys/index.d.ts +0 -5
  258. package/dest/crypto/keys/index.d.ts.map +0 -1
  259. package/dest/crypto/pedersen/index.d.ts +0 -2
  260. package/dest/crypto/pedersen/index.d.ts.map +0 -1
  261. package/dest/crypto/pedersen/pedersen.elliptic.d.ts +0 -13
  262. package/dest/crypto/pedersen/pedersen.elliptic.d.ts.map +0 -1
  263. package/dest/crypto/pedersen/pedersen.noble.d.ts +0 -11
  264. package/dest/crypto/pedersen/pedersen.noble.d.ts.map +0 -1
  265. package/dest/crypto/pedersen/pedersen.wasm.d.ts +0 -21
  266. package/dest/crypto/pedersen/pedersen.wasm.d.ts.map +0 -1
  267. package/dest/crypto/poseidon/index.d.ts +0 -26
  268. package/dest/crypto/poseidon/index.d.ts.map +0 -1
  269. package/dest/crypto/random/index.d.ts +0 -25
  270. package/dest/crypto/random/index.d.ts.map +0 -1
  271. package/dest/crypto/random/randomness_singleton.d.ts +0 -25
  272. package/dest/crypto/random/randomness_singleton.d.ts.map +0 -1
  273. package/dest/crypto/secp256k1-signer/index.d.ts +0 -3
  274. package/dest/crypto/secp256k1-signer/index.d.ts.map +0 -1
  275. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts +0 -24
  276. package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts.map +0 -1
  277. package/dest/crypto/secp256k1-signer/utils.d.ts +0 -40
  278. package/dest/crypto/secp256k1-signer/utils.d.ts.map +0 -1
  279. package/dest/crypto/sha256/index.d.ts +0 -20
  280. package/dest/crypto/sha256/index.d.ts.map +0 -1
  281. package/dest/crypto/sha512/index.d.ts +0 -11
  282. package/dest/crypto/sha512/index.d.ts.map +0 -1
  283. package/dest/crypto/sync/index.d.ts +0 -3
  284. package/dest/crypto/sync/index.d.ts.map +0 -1
  285. package/dest/crypto/sync/pedersen/index.d.ts +0 -21
  286. package/dest/crypto/sync/pedersen/index.d.ts.map +0 -1
  287. package/dest/crypto/sync/poseidon/index.d.ts +0 -26
  288. package/dest/crypto/sync/poseidon/index.d.ts.map +0 -1
  289. package/dest/decorators/index.d.ts +0 -2
  290. package/dest/decorators/index.d.ts.map +0 -1
  291. package/dest/decorators/memoize.d.ts +0 -2
  292. package/dest/decorators/memoize.d.ts.map +0 -1
  293. package/dest/error/index.d.ts +0 -21
  294. package/dest/error/index.d.ts.map +0 -1
  295. package/dest/eth-address/index.d.ts +0 -134
  296. package/dest/eth-address/index.d.ts.map +0 -1
  297. package/dest/eth-signature/eth_signature.d.ts +0 -62
  298. package/dest/eth-signature/eth_signature.d.ts.map +0 -1
  299. package/dest/eth-signature/index.d.ts +0 -2
  300. package/dest/eth-signature/index.d.ts.map +0 -1
  301. package/dest/fields/coordinate.d.ts +0 -68
  302. package/dest/fields/coordinate.d.ts.map +0 -1
  303. package/dest/fields/fields.d.ts +0 -176
  304. package/dest/fields/fields.d.ts.map +0 -1
  305. package/dest/fields/index.d.ts +0 -4
  306. package/dest/fields/index.d.ts.map +0 -1
  307. package/dest/fields/point.d.ts +0 -175
  308. package/dest/fields/point.d.ts.map +0 -1
  309. package/dest/fs/index.d.ts +0 -2
  310. package/dest/fs/index.d.ts.map +0 -1
  311. package/dest/fs/run_in_dir.d.ts +0 -2
  312. package/dest/fs/run_in_dir.d.ts.map +0 -1
  313. package/dest/index.d.ts +0 -34
  314. package/dest/index.d.ts.map +0 -1
  315. package/dest/iterable/all.d.ts +0 -9
  316. package/dest/iterable/all.d.ts.map +0 -1
  317. package/dest/iterable/filter.d.ts +0 -10
  318. package/dest/iterable/filter.d.ts.map +0 -1
  319. package/dest/iterable/index.d.ts +0 -8
  320. package/dest/iterable/index.d.ts.map +0 -1
  321. package/dest/iterable/isAsyncIt.d.ts +0 -7
  322. package/dest/iterable/isAsyncIt.d.ts.map +0 -1
  323. package/dest/iterable/map.d.ts +0 -12
  324. package/dest/iterable/map.d.ts.map +0 -1
  325. package/dest/iterable/peek.d.ts +0 -19
  326. package/dest/iterable/peek.d.ts.map +0 -1
  327. package/dest/iterable/sort.d.ts +0 -14
  328. package/dest/iterable/sort.d.ts.map +0 -1
  329. package/dest/iterable/take.d.ts +0 -10
  330. package/dest/iterable/take.d.ts.map +0 -1
  331. package/dest/iterable/toArray.d.ts +0 -2
  332. package/dest/iterable/toArray.d.ts.map +0 -1
  333. package/dest/json-rpc/client/fetch.d.ts +0 -21
  334. package/dest/json-rpc/client/fetch.d.ts.map +0 -1
  335. package/dest/json-rpc/client/index.d.ts +0 -3
  336. package/dest/json-rpc/client/index.d.ts.map +0 -1
  337. package/dest/json-rpc/client/safe_json_rpc_client.d.ts +0 -13
  338. package/dest/json-rpc/client/safe_json_rpc_client.d.ts.map +0 -1
  339. package/dest/json-rpc/convert.d.ts +0 -20
  340. package/dest/json-rpc/convert.d.ts.map +0 -1
  341. package/dest/json-rpc/fixtures/class_a.d.ts +0 -11
  342. package/dest/json-rpc/fixtures/class_a.d.ts.map +0 -1
  343. package/dest/json-rpc/fixtures/class_b.d.ts +0 -11
  344. package/dest/json-rpc/fixtures/class_b.d.ts.map +0 -1
  345. package/dest/json-rpc/fixtures/test_state.d.ts +0 -89
  346. package/dest/json-rpc/fixtures/test_state.d.ts.map +0 -1
  347. package/dest/json-rpc/index.d.ts +0 -2
  348. package/dest/json-rpc/index.d.ts.map +0 -1
  349. package/dest/json-rpc/js_utils.d.ts +0 -13
  350. package/dest/json-rpc/js_utils.d.ts.map +0 -1
  351. package/dest/json-rpc/server/index.d.ts +0 -2
  352. package/dest/json-rpc/server/index.d.ts.map +0 -1
  353. package/dest/json-rpc/server/safe_json_rpc_server.d.ts +0 -140
  354. package/dest/json-rpc/server/safe_json_rpc_server.d.ts.map +0 -1
  355. package/dest/json-rpc/server/telemetry.d.ts +0 -2
  356. package/dest/json-rpc/server/telemetry.d.ts.map +0 -1
  357. package/dest/json-rpc/test/index.d.ts +0 -2
  358. package/dest/json-rpc/test/index.d.ts.map +0 -1
  359. package/dest/json-rpc/test/integration.d.ts +0 -13
  360. package/dest/json-rpc/test/integration.d.ts.map +0 -1
  361. package/dest/log/console.d.ts +0 -11
  362. package/dest/log/console.d.ts.map +0 -1
  363. package/dest/log/debug.d.ts +0 -56
  364. package/dest/log/debug.d.ts.map +0 -1
  365. package/dest/log/gcloud-logger-config.d.ts +0 -14
  366. package/dest/log/gcloud-logger-config.d.ts.map +0 -1
  367. package/dest/log/index.d.ts +0 -6
  368. package/dest/log/index.d.ts.map +0 -1
  369. package/dest/log/log-filters.d.ts +0 -7
  370. package/dest/log/log-filters.d.ts.map +0 -1
  371. package/dest/log/log-levels.d.ts +0 -3
  372. package/dest/log/log-levels.d.ts.map +0 -1
  373. package/dest/log/log_fn.d.ts +0 -7
  374. package/dest/log/log_fn.d.ts.map +0 -1
  375. package/dest/log/log_history.d.ts +0 -31
  376. package/dest/log/log_history.d.ts.map +0 -1
  377. package/dest/log/pino-logger.d.ts +0 -53
  378. package/dest/log/pino-logger.d.ts.map +0 -1
  379. package/dest/message/index.d.ts +0 -32
  380. package/dest/message/index.d.ts.map +0 -1
  381. package/dest/mutex/index.d.ts +0 -53
  382. package/dest/mutex/index.d.ts.map +0 -1
  383. package/dest/mutex/mutex_database.d.ts +0 -10
  384. package/dest/mutex/mutex_database.d.ts.map +0 -1
  385. package/dest/noir/index.d.ts +0 -2
  386. package/dest/noir/index.d.ts.map +0 -1
  387. package/dest/noir/noir_package_config.d.ts +0 -129
  388. package/dest/noir/noir_package_config.d.ts.map +0 -1
  389. package/dest/promise/index.d.ts +0 -3
  390. package/dest/promise/index.d.ts.map +0 -1
  391. package/dest/promise/running-promise.d.ts +0 -41
  392. package/dest/promise/running-promise.d.ts.map +0 -1
  393. package/dest/promise/utils.d.ts +0 -12
  394. package/dest/promise/utils.d.ts.map +0 -1
  395. package/dest/queue/base_memory_queue.d.ts +0 -65
  396. package/dest/queue/base_memory_queue.d.ts.map +0 -1
  397. package/dest/queue/bounded_serial_queue.d.ts +0 -56
  398. package/dest/queue/bounded_serial_queue.d.ts.map +0 -1
  399. package/dest/queue/fifo_memory_queue.d.ts +0 -21
  400. package/dest/queue/fifo_memory_queue.d.ts.map +0 -1
  401. package/dest/queue/index.d.ts +0 -6
  402. package/dest/queue/index.d.ts.map +0 -1
  403. package/dest/queue/priority_memory_queue.d.ts +0 -13
  404. package/dest/queue/priority_memory_queue.d.ts.map +0 -1
  405. package/dest/queue/priority_queue.d.ts +0 -14
  406. package/dest/queue/priority_queue.d.ts.map +0 -1
  407. package/dest/queue/semaphore.d.ts +0 -23
  408. package/dest/queue/semaphore.d.ts.map +0 -1
  409. package/dest/queue/serial_queue.d.ts +0 -49
  410. package/dest/queue/serial_queue.d.ts.map +0 -1
  411. package/dest/retry/index.d.ts +0 -44
  412. package/dest/retry/index.d.ts.map +0 -1
  413. package/dest/running-promise/index.d.ts +0 -2
  414. package/dest/running-promise/index.d.ts.map +0 -1
  415. package/dest/schemas/api.d.ts +0 -21
  416. package/dest/schemas/api.d.ts.map +0 -1
  417. package/dest/schemas/index.d.ts +0 -6
  418. package/dest/schemas/index.d.ts.map +0 -1
  419. package/dest/schemas/parse.d.ts +0 -9
  420. package/dest/schemas/parse.d.ts.map +0 -1
  421. package/dest/schemas/schemas.d.ts +0 -60
  422. package/dest/schemas/schemas.d.ts.map +0 -1
  423. package/dest/schemas/types.d.ts +0 -3
  424. package/dest/schemas/types.d.ts.map +0 -1
  425. package/dest/schemas/utils.d.ts +0 -53
  426. package/dest/schemas/utils.d.ts.map +0 -1
  427. package/dest/serialize/buffer_reader.d.ts +0 -239
  428. package/dest/serialize/buffer_reader.d.ts.map +0 -1
  429. package/dest/serialize/field_reader.d.ts +0 -112
  430. package/dest/serialize/field_reader.d.ts.map +0 -1
  431. package/dest/serialize/free_funcs.d.ts +0 -105
  432. package/dest/serialize/free_funcs.d.ts.map +0 -1
  433. package/dest/serialize/index.d.ts +0 -7
  434. package/dest/serialize/index.d.ts.map +0 -1
  435. package/dest/serialize/serialize.d.ts +0 -182
  436. package/dest/serialize/serialize.d.ts.map +0 -1
  437. package/dest/serialize/type_registry.d.ts +0 -23
  438. package/dest/serialize/type_registry.d.ts.map +0 -1
  439. package/dest/serialize/types.d.ts +0 -33
  440. package/dest/serialize/types.d.ts.map +0 -1
  441. package/dest/sleep/index.d.ts +0 -51
  442. package/dest/sleep/index.d.ts.map +0 -1
  443. package/dest/string/index.d.ts +0 -11
  444. package/dest/string/index.d.ts.map +0 -1
  445. package/dest/testing/files/index.d.ts +0 -19
  446. package/dest/testing/files/index.d.ts.map +0 -1
  447. package/dest/testing/index.d.ts +0 -4
  448. package/dest/testing/index.d.ts.map +0 -1
  449. package/dest/testing/port_allocator.d.ts +0 -10
  450. package/dest/testing/port_allocator.d.ts.map +0 -1
  451. package/dest/testing/snapshot_serializer.d.ts +0 -5
  452. package/dest/testing/snapshot_serializer.d.ts.map +0 -1
  453. package/dest/testing/test_data.d.ts +0 -7
  454. package/dest/testing/test_data.d.ts.map +0 -1
  455. package/dest/timer/date.d.ts +0 -13
  456. package/dest/timer/date.d.ts.map +0 -1
  457. package/dest/timer/elapsed.d.ts +0 -13
  458. package/dest/timer/elapsed.d.ts.map +0 -1
  459. package/dest/timer/index.d.ts +0 -5
  460. package/dest/timer/index.d.ts.map +0 -1
  461. package/dest/timer/timeout.d.ts +0 -41
  462. package/dest/timer/timeout.d.ts.map +0 -1
  463. package/dest/timer/timer.d.ts +0 -37
  464. package/dest/timer/timer.d.ts.map +0 -1
  465. package/dest/transport/browser/index.d.ts +0 -5
  466. package/dest/transport/browser/index.d.ts.map +0 -1
  467. package/dest/transport/browser/message_port_socket.d.ts +0 -37
  468. package/dest/transport/browser/message_port_socket.d.ts.map +0 -1
  469. package/dest/transport/browser/shared_worker_connector.d.ts +0 -19
  470. package/dest/transport/browser/shared_worker_connector.d.ts.map +0 -1
  471. package/dest/transport/browser/shared_worker_listener.d.ts +0 -38
  472. package/dest/transport/browser/shared_worker_listener.d.ts.map +0 -1
  473. package/dest/transport/browser/worker_connector.d.ts +0 -26
  474. package/dest/transport/browser/worker_connector.d.ts.map +0 -1
  475. package/dest/transport/browser/worker_listener.d.ts +0 -39
  476. package/dest/transport/browser/worker_listener.d.ts.map +0 -1
  477. package/dest/transport/dispatch/create_dispatch_fn.d.ts +0 -25
  478. package/dest/transport/dispatch/create_dispatch_fn.d.ts.map +0 -1
  479. package/dest/transport/dispatch/create_dispatch_proxy.d.ts +0 -102
  480. package/dest/transport/dispatch/create_dispatch_proxy.d.ts.map +0 -1
  481. package/dest/transport/dispatch/messages.d.ts +0 -52
  482. package/dest/transport/dispatch/messages.d.ts.map +0 -1
  483. package/dest/transport/index.d.ts +0 -12
  484. package/dest/transport/index.d.ts.map +0 -1
  485. package/dest/transport/interface/connector.d.ts +0 -8
  486. package/dest/transport/interface/connector.d.ts.map +0 -1
  487. package/dest/transport/interface/listener.d.ts +0 -13
  488. package/dest/transport/interface/listener.d.ts.map +0 -1
  489. package/dest/transport/interface/socket.d.ts +0 -13
  490. package/dest/transport/interface/socket.d.ts.map +0 -1
  491. package/dest/transport/interface/transferable.d.ts +0 -68
  492. package/dest/transport/interface/transferable.d.ts.map +0 -1
  493. package/dest/transport/node/index.d.ts +0 -3
  494. package/dest/transport/node/index.d.ts.map +0 -1
  495. package/dest/transport/node/node_connector.d.ts +0 -28
  496. package/dest/transport/node/node_connector.d.ts.map +0 -1
  497. package/dest/transport/node/node_connector_socket.d.ts +0 -42
  498. package/dest/transport/node/node_connector_socket.d.ts.map +0 -1
  499. package/dest/transport/node/node_listener.d.ts +0 -26
  500. package/dest/transport/node/node_listener.d.ts.map +0 -1
  501. package/dest/transport/node/node_listener_socket.d.ts +0 -37
  502. package/dest/transport/node/node_listener_socket.d.ts.map +0 -1
  503. package/dest/transport/transport_client.d.ts +0 -61
  504. package/dest/transport/transport_client.d.ts.map +0 -1
  505. package/dest/transport/transport_server.d.ts +0 -56
  506. package/dest/transport/transport_server.d.ts.map +0 -1
  507. package/dest/trees/index.d.ts +0 -59
  508. package/dest/trees/index.d.ts.map +0 -1
  509. package/dest/trees/unbalanced_merkle_tree.d.ts +0 -17
  510. package/dest/trees/unbalanced_merkle_tree.d.ts.map +0 -1
  511. package/dest/trees/unbalanced_tree_store.d.ts +0 -19
  512. package/dest/trees/unbalanced_tree_store.d.ts.map +0 -1
  513. package/dest/types/index.d.ts +0 -19
  514. package/dest/types/index.d.ts.map +0 -1
  515. package/dest/url/index.d.ts +0 -9
  516. package/dest/url/index.d.ts.map +0 -1
  517. package/dest/validation/index.d.ts +0 -9
  518. package/dest/validation/index.d.ts.map +0 -1
  519. package/dest/wasm/empty_wasi_sdk.d.ts +0 -130
  520. package/dest/wasm/empty_wasi_sdk.d.ts.map +0 -1
  521. package/dest/wasm/index.d.ts +0 -2
  522. package/dest/wasm/index.d.ts.map +0 -1
  523. package/dest/wasm/wasm_module.d.ts +0 -136
  524. package/dest/wasm/wasm_module.d.ts.map +0 -1
  525. package/dest/worker/browser/index.d.ts +0 -3
  526. package/dest/worker/browser/index.d.ts.map +0 -1
  527. package/dest/worker/browser/start_web_module.d.ts +0 -7
  528. package/dest/worker/browser/start_web_module.d.ts.map +0 -1
  529. package/dest/worker/browser/web_data_store.d.ts +0 -24
  530. package/dest/worker/browser/web_data_store.d.ts.map +0 -1
  531. package/dest/worker/browser/web_worker.d.ts +0 -10
  532. package/dest/worker/browser/web_worker.d.ts.map +0 -1
  533. package/dest/worker/data_store.d.ts +0 -21
  534. package/dest/worker/data_store.d.ts.map +0 -1
  535. package/dest/worker/index.d.ts +0 -3
  536. package/dest/worker/index.d.ts.map +0 -1
  537. package/dest/worker/node/index.d.ts +0 -3
  538. package/dest/worker/node/index.d.ts.map +0 -1
  539. package/dest/worker/node/node_data_store.d.ts +0 -13
  540. package/dest/worker/node/node_data_store.d.ts.map +0 -1
  541. package/dest/worker/node/node_worker.d.ts +0 -6
  542. package/dest/worker/node/node_worker.d.ts.map +0 -1
  543. package/dest/worker/node/start_node_module.d.ts +0 -7
  544. package/dest/worker/node/start_node_module.d.ts.map +0 -1
  545. package/dest/worker/wasm_worker.d.ts +0 -9
  546. package/dest/worker/wasm_worker.d.ts.map +0 -1
  547. package/dest/worker/worker_pool.d.ts +0 -40
  548. package/dest/worker/worker_pool.d.ts.map +0 -1
  549. package/src/blob/blob.ts +0 -311
  550. package/src/blob/encoding.ts +0 -98
  551. package/src/blob/errors.ts +0 -6
  552. package/src/blob/index.ts +0 -22
  553. package/src/blob/interface.ts +0 -11
  554. package/src/blob/mocks.ts +0 -48
@@ -1,26 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Fr } from '../../fields/fields.js';
4
- import { type Fieldable } from '../../serialize/serialize.js';
5
- /**
6
- * Create a poseidon hash (field) from an array of input fields.
7
- * @param input - The input fields to hash.
8
- * @returns The poseidon hash.
9
- */
10
- export declare function poseidon2Hash(input: Fieldable[]): Promise<Fr>;
11
- /**
12
- * Create a poseidon hash (field) from an array of input fields and a domain separator.
13
- * @param input - The input fields to hash.
14
- * @param separator - The domain separator.
15
- * @returns The poseidon hash.
16
- */
17
- export declare function poseidon2HashWithSeparator(input: Fieldable[], separator: number): Promise<Fr>;
18
- export declare function poseidon2HashAccumulate(input: Fieldable[]): Promise<Fr>;
19
- /**
20
- * Runs a Poseidon2 permutation.
21
- * @param input the input state. Expected to be of size 4.
22
- * @returns the output state, size 4.
23
- */
24
- export declare function poseidon2Permutation(input: Fieldable[]): Promise<Fr[]>;
25
- export declare function poseidon2HashBytes(input: Buffer): Promise<Fr>;
26
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/poseidon/index.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,8BAA8B,CAAC;AAEjF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAOnE;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,CASnG;AAED,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAK7E;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,EAAE,EAAE,CAAC,CAS5E;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,CAiBnE"}
@@ -1,25 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- export declare const randomBytes: (len: number) => Buffer;
4
- /**
5
- * Generate a random integer less than max.
6
- * @param max - The maximum value.
7
- * @returns A random integer.
8
- *
9
- * TODO(#3949): This is insecure as it's modulo biased. Nuke or safeguard before mainnet.
10
- */
11
- export declare const randomInt: (max: number) => number;
12
- /**
13
- * Generate a random bigint less than max.
14
- * @param max - The maximum value.
15
- * @returns A random bigint.
16
- *
17
- * TODO(#3949): This is insecure as it's modulo biased. Nuke or safeguard before mainnet.
18
- */
19
- export declare const randomBigInt: (max: bigint) => bigint;
20
- /**
21
- * Generate a random boolean value.
22
- * @returns A random boolean value.
23
- */
24
- export declare const randomBoolean: () => boolean;
25
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/random/index.ts"],"names":[],"mappings":";;AAmBA,eAAO,MAAM,WAAW,QAAS,MAAM,WA8BtC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,WAIpC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,WAIvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,eAGzB,CAAC"}
@@ -1,25 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /**
4
- * A number generator which is used as a source of randomness in the system. If the SEED env variable is set, the
5
- * generator will be deterministic and will always produce the same sequence of numbers. Otherwise a true randomness
6
- * sourced by crypto library will be used.
7
- * @remarks This class was implemented so that tests can be run deterministically.
8
- *
9
- * TODO(#3949): This is not safe enough for production and should be made safer or removed before mainnet.
10
- */
11
- export declare class RandomnessSingleton {
12
- private readonly seed?;
13
- private readonly log;
14
- private static instance;
15
- private counter;
16
- private constructor();
17
- static getInstance(): RandomnessSingleton;
18
- /**
19
- * Indicates whether the generator is deterministic (was seeded) or not.
20
- * @returns Whether the generator is deterministic.
21
- */
22
- isDeterministic(): boolean;
23
- getBytes(length: number): Buffer;
24
- }
25
- //# sourceMappingURL=randomness_singleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"randomness_singleton.d.ts","sourceRoot":"","sources":["../../../src/crypto/random/randomness_singleton.ts"],"names":[],"mappings":";;AAEA;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAM5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG;IANtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAsB;IAE7C,OAAO,CAAC,OAAO,CAAK;IAEpB,OAAO;WAYO,WAAW,IAAI,mBAAmB;IAShD;;;OAGG;IACI,eAAe,IAAI,OAAO;IAI1B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAiBxC"}
@@ -1,3 +0,0 @@
1
- export * from './secp256k1_signer.js';
2
- export * from './utils.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/secp256k1-signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
@@ -1,24 +0,0 @@
1
- import { Buffer32 } from '@aztec/foundation/buffer';
2
- import { type EthAddress } from '@aztec/foundation/eth-address';
3
- import { type Signature } from '@aztec/foundation/eth-signature';
4
- /**
5
- * Secp256k1Signer
6
- *
7
- * A class for signing messages using a secp256k1 private key.
8
- * - This is a slim drop in replacement for an Ethereum signer, so it can be used in the same way.
9
- * - See `utils.ts` for functions that enable recovering addresses and public keys from signatures.
10
- */
11
- export declare class Secp256k1Signer {
12
- private privateKey;
13
- readonly address: EthAddress;
14
- constructor(privateKey: Buffer32);
15
- sign(message: Buffer32): Signature;
16
- /**
17
- * Sign a message using the same method as eth_sign
18
- * @param message - The message to sign.
19
- * @returns The signature.
20
- */
21
- signMessage(message: Buffer32): Signature;
22
- static random(): Secp256k1Signer;
23
- }
24
- //# sourceMappingURL=secp256k1_signer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secp256k1_signer.d.ts","sourceRoot":"","sources":["../../../src/crypto/secp256k1-signer/secp256k1_signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAIjE;;;;;;GAMG;AACH,qBAAa,eAAe;IAGd,OAAO,CAAC,UAAU;IAF9B,SAAgB,OAAO,EAAE,UAAU,CAAC;gBAEhB,UAAU,EAAE,QAAQ;IAIxC,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS;IAIlC;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS;IAKzC,MAAM,CAAC,MAAM,IAAI,eAAe;CAGjC"}
@@ -1,40 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Buffer32 } from '../../buffer/buffer32.js';
4
- import { EthAddress } from '../../eth-address/index.js';
5
- import { Signature } from '../../eth-signature/eth_signature.js';
6
- export declare function makeEthSignDigest(message: Buffer32): Buffer32;
7
- /**
8
- * Converts a private key to a public key.
9
- * @param privateKey - The private key to convert.
10
- * @returns The public key.
11
- */
12
- export declare function publicKeyFromPrivateKey(privateKey: Buffer): Buffer;
13
- /**
14
- * Converts a private key to an address.
15
- * @param privateKey - The private key to convert.
16
- * @returns The address.
17
- */
18
- export declare function addressFromPrivateKey(privateKey: Buffer): EthAddress;
19
- /**
20
- * Recovers an address from a hash and a signature.
21
- * @param hash - The hash to recover the address from.
22
- * @param signature - The signature to recover the address from.
23
- * @returns The address.
24
- */
25
- export declare function recoverAddress(hash: Buffer32, signature: Signature): EthAddress;
26
- /**
27
- * Signs a message using ecdsa over the secp256k1 curve.
28
- * @param message - The message to sign.
29
- * @param privateKey - The private key to sign the message with.
30
- * @returns The signature.
31
- */
32
- export declare function signMessage(message: Buffer32, privateKey: Buffer): Signature;
33
- /**
34
- * Recovers a public key from a hash and a signature.
35
- * @param hash - The hash to recover the public key from.
36
- * @param signature - The signature to recover the public key from.
37
- * @returns The public key.
38
- */
39
- export declare function recoverPublicKey(hash: Buffer32, signature: Signature): Buffer;
40
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/crypto/secp256k1-signer/utils.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAMjE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAG7D;AAYD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAGpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAG,UAAU,CAG/E;AAqBD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAGhE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAO7E"}
@@ -1,20 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Fr } from '../../fields/fields.js';
4
- import { type Bufferable } from '../../serialize/serialize.js';
5
- export declare function sha256(data: Buffer): Buffer;
6
- export declare function sha256Trunc(data: Buffer): Buffer;
7
- export declare function sha256ToField(data: Bufferable[]): Fr;
8
- /**
9
- * The "SHA256 Compression" operation (component operation of SHA256 "Hash").
10
- * WARNING: modifies `state` in place (and also returns it)
11
- *
12
- * This algorithm is extracted from the hash.js package
13
- * and modified to take in an initial state to operate on.
14
- *
15
- * @param state - The initial state to operate on (modified in-place). 8 u32s.
16
- * @param inputs - The inputs to compress into the state. 16 u32s.
17
- * @returns The modified state. 8 u32s.
18
- */
19
- export declare function sha256Compression(state: Uint32Array, inputs: Uint32Array): Uint32Array;
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/sha256/index.ts"],"names":[],"mappings":";;AAGA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAE5C,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,8BAA8B,CAAC;AAElF,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,UAElC;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAEvC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,MAG/C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,CAyEtF"}
@@ -1,11 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type Bufferable } from '../../serialize/serialize.js';
4
- export declare const sha512: (data: Buffer) => Buffer;
5
- /**
6
- * @dev We don't truncate in this function (unlike in sha256ToField) because this function is used in situations where
7
- * we don't care only about collision resistance but we need the output to be uniformly distributed as well. This is
8
- * because we use it as a pseudo-random function.
9
- */
10
- export declare const sha512ToGrumpkinScalar: (data: Bufferable[]) => import("../../fields/fields.js").Fq;
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/sha512/index.ts"],"names":[],"mappings":";;AAGA,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,8BAA8B,CAAC;AAElF,eAAO,MAAM,MAAM,SAAU,MAAM,WAAqD,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,SAAU,UAAU,EAAE,wCAGxD,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './poseidon/index.js';
2
- export * from './pedersen/index.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/sync/index.ts"],"names":[],"mappings":"AAEA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
@@ -1,21 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Fr } from '../../../fields/fields.js';
4
- import { type Fieldable } from '../../../serialize/serialize.js';
5
- /**
6
- * Create a pedersen commitment (point) from an array of input fields.
7
- * Left pads any inputs less than 32 bytes.
8
- */
9
- export declare function pedersenCommit(input: Buffer[], offset?: number): Buffer[];
10
- /**
11
- * Create a pedersen hash (field) from an array of input fields.
12
- * @param input - The input fieldables to hash.
13
- * @param index - The separator index to use for the hash.
14
- * @returns The pedersen hash.
15
- */
16
- export declare function pedersenHash(input: Fieldable[], index?: number): Fr;
17
- /**
18
- * Create a pedersen hash from an arbitrary length buffer.
19
- */
20
- export declare function pedersenHashBuffer(input: Buffer, index?: number): Buffer;
21
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/crypto/sync/pedersen/index.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,iCAAiC,CAAC;AAEpF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,SAAI,YAYzD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,SAAI,GAAG,EAAE,CAO9D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,UAG1D"}
@@ -1,26 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Fr } from '../../../fields/fields.js';
4
- import { type Fieldable } from '../../../serialize/serialize.js';
5
- /**
6
- * Create a poseidon hash (field) from an array of input fields.
7
- * @param input - The input fields to hash.
8
- * @returns The poseidon hash.
9
- */
10
- export declare function poseidon2Hash(input: Fieldable[]): Fr;
11
- /**
12
- * Create a poseidon hash (field) from an array of input fields and a domain separator.
13
- * @param input - The input fields to hash.
14
- * @param separator - The domain separator.
15
- * @returns The poseidon hash.
16
- */
17
- export declare function poseidon2HashWithSeparator(input: Fieldable[], separator: number): Fr;
18
- export declare function poseidon2HashAccumulate(input: Fieldable[]): Fr;
19
- /**
20
- * Runs a Poseidon2 permutation.
21
- * @param input the input state. Expected to be of size 4.
22
- * @returns the output state, size 4.
23
- */
24
- export declare function poseidon2Permutation(input: Fieldable[]): Fr[];
25
- export declare function poseidon2HashBytes(input: Buffer): Fr;
26
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/crypto/sync/poseidon/index.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,iCAAiC,CAAC;AAEpF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAMpD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,EAAE,CAQpF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAM9D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,CAU7D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAgBpD"}
@@ -1,2 +0,0 @@
1
- export * from './memoize.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function memoize<This extends object, Result>(fn: () => Result, context: ClassMethodDecoratorContext): (this: This) => Result;
2
- //# sourceMappingURL=memoize.d.ts.map
@@ -1 +0,0 @@
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,21 +0,0 @@
1
- /**
2
- * Represents an error thrown when an operation is interrupted unexpectedly.
3
- * This custom error class extends the built-in Error class in JavaScript and
4
- * can be used to handle cases where a process or task is terminated before completion.
5
- */
6
- export declare class InterruptError extends Error {
7
- readonly name = "InterruptError";
8
- }
9
- /**
10
- * An error thrown when an action times out.
11
- */
12
- export declare class TimeoutError extends Error {
13
- readonly name = "TimeoutError";
14
- }
15
- /**
16
- * Represents an error thrown when an operation is aborted.
17
- */
18
- export declare class AbortError extends Error {
19
- readonly name = "AbortError";
20
- }
21
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,SAAyB,IAAI,oBAAoB;CAClD;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,SAAyB,IAAI,kBAAkB;CAChD;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,SAAyB,IAAI,gBAAgB;CAC9C"}
@@ -1,134 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
- import { inspect } from 'util';
5
- import { Fr } from '../fields/index.js';
6
- import { BufferReader, FieldReader } from '../serialize/index.js';
7
- /**
8
- * Represents an Ethereum address as a 20-byte buffer and provides various utility methods
9
- * for converting between different representations, generating random addresses, validating
10
- * checksums, and comparing addresses. EthAddress can be instantiated using a buffer or string,
11
- * and can be serialized/deserialized from a buffer or BufferReader.
12
- */
13
- export declare class EthAddress {
14
- private buffer;
15
- /** The size of an Ethereum address in bytes. */
16
- static SIZE_IN_BYTES: number;
17
- /** Represents a zero Ethereum address with 20 bytes filled with zeros. */
18
- static ZERO: EthAddress;
19
- constructor(buffer: Buffer);
20
- /**
21
- * Creates an EthAddress instance from a valid Ethereum address string.
22
- * The input 'address' can be either in checksum format or lowercase, and it can be prefixed with '0x'.
23
- * Throws an error if the input is not a valid Ethereum address.
24
- *
25
- * @param address - The string representing the Ethereum address.
26
- * @returns An EthAddress instance.
27
- */
28
- static fromString(address: string): EthAddress;
29
- /**
30
- * Create a random EthAddress instance with 20 random bytes.
31
- * This method generates a new Ethereum address with a randomly generated set of 20 bytes.
32
- * It is useful for generating test addresses or unique identifiers.
33
- *
34
- * @returns A randomly generated EthAddress instance.
35
- */
36
- static random(): EthAddress;
37
- /**
38
- * Determines if the given string represents a valid Ethereum address.
39
- * A valid address should meet the following criteria:
40
- * 1. Contains exactly 40 hex characters (excluding an optional '0x' prefix).
41
- * 2. Is either all lowercase, all uppercase, or has a valid checksum based on EIP-55.
42
- *
43
- * @param address - The string to be checked for validity as an Ethereum address.
44
- * @returns True if the input string represents a valid Ethereum address, false otherwise.
45
- */
46
- static isAddress(address: string): boolean;
47
- /**
48
- * Checks if the EthAddress instance represents a zero address.
49
- * A zero address consists of 20 bytes filled with zeros and is considered an invalid address.
50
- *
51
- * @returns A boolean indicating whether the EthAddress instance is a zero address or not.
52
- */
53
- isZero(): boolean;
54
- /**
55
- * Checks if the given Ethereum address has a valid checksum.
56
- * The input 'address' should be prefixed with '0x' or not, and have exactly 40 hex characters.
57
- * Returns true if the address has a valid checksum, false otherwise.
58
- *
59
- * @param address - The hex-encoded string representing the Ethereum address.
60
- * @returns A boolean value indicating whether the address has a valid checksum.
61
- */
62
- static checkAddressChecksum(address: string): boolean;
63
- /**
64
- * Converts an Ethereum address to its checksum format.
65
- * The input 'address' should be prefixed with '0x' or not, and have exactly 40 hex characters.
66
- * The checksum format is created by capitalizing certain characters in the hex string
67
- * based on the hash of the lowercase address.
68
- * Throws an error if the input address is invalid.
69
- *
70
- * @param address - The Ethereum address as a hex-encoded string.
71
- * @returns The Ethereum address in its checksum format.
72
- */
73
- static toChecksumAddress(address: string): string;
74
- /**
75
- * Checks whether the given EthAddress instance is equal to the current instance.
76
- * Equality is determined by comparing the underlying byte buffers of both instances.
77
- *
78
- * @param rhs - The EthAddress instance to compare with the current instance.
79
- * @returns A boolean value indicating whether the two instances are equal (true) or not (false).
80
- */
81
- equals(rhs: EthAddress): boolean;
82
- /**
83
- * Converts the Ethereum address to a hex-encoded string.
84
- * The resulting string is prefixed with '0x' and has exactly 40 hex characters.
85
- * This method can be used to represent the EthAddress instance in the widely used hexadecimal format.
86
- *
87
- * @returns A hex-encoded string representation of the Ethereum address.
88
- */
89
- toString(): `0x${string}`;
90
- [inspect.custom](): string;
91
- /**
92
- * Returns the Ethereum address as a checksummed string.
93
- * The output string will have characters in the correct upper or lowercase form, according to EIP-55.
94
- * This provides a way to verify if an address is typed correctly, by checking the character casing.
95
- *
96
- * @returns A checksummed Ethereum address string.
97
- */
98
- toChecksumString(): string;
99
- /**
100
- * Returns a 20-byte buffer representation of the Ethereum address.
101
- * @returns A 20-byte Buffer containing the Ethereum address.
102
- */
103
- toBuffer(): Buffer;
104
- /**
105
- * Returns a 32-byte buffer representation of the Ethereum address, with the original 20-byte address
106
- * occupying the last 20 bytes and the first 12 bytes being zero-filled.
107
- * This format is commonly used in smart contracts when handling addresses as 32-byte values.
108
- *
109
- * @returns A 32-byte Buffer containing the padded Ethereum address.
110
- */
111
- toBuffer32(): Buffer;
112
- /**
113
- * Returns a new field with the same contents as this EthAddress.
114
- *
115
- * @returns An Fr instance.
116
- */
117
- toField(): Fr;
118
- /**
119
- * Converts a field to a eth address.
120
- * @param fr - The field to convert.
121
- * @returns The eth address.
122
- */
123
- static fromField(fr: Fr): EthAddress;
124
- static fromFields(fields: Fr[] | FieldReader): EthAddress;
125
- /**
126
- * Deserializes from a buffer or reader, corresponding to a write in cpp.
127
- * @param buffer - Buffer to read from.
128
- * @returns The EthAddress.
129
- */
130
- static fromBuffer(buffer: Buffer | BufferReader): EthAddress;
131
- toJSON(): `0x${string}`;
132
- static get schema(): import("zod").ZodType<EthAddress, any, string>;
133
- }
134
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eth-address/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAI/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIlE;;;;;GAKG;AACH,qBAAa,UAAU;IAMT,OAAO,CAAC,MAAM;IAL1B,gDAAgD;IAChD,OAAc,aAAa,SAAM;IACjC,0EAA0E;IAC1E,OAAc,IAAI,aAA0D;gBAExD,MAAM,EAAE,MAAM;IAMlC;;;;;;;OAOG;WACW,UAAU,CAAC,OAAO,EAAE,MAAM;IAOxC;;;;;;OAMG;WACW,MAAM;IAIpB;;;;;;;;OAQG;WACW,SAAS,CAAC,OAAO,EAAE,MAAM;IAYvC;;;;;OAKG;IACI,MAAM;IAIb;;;;;;;OAOG;WACW,oBAAoB,CAAC,OAAO,EAAE,MAAM;IAgBlD;;;;;;;;;OASG;WACW,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAoB/C;;;;;;OAMG;IACI,MAAM,CAAC,GAAG,EAAE,UAAU;IAI7B;;;;;;OAMG;IACI,QAAQ;IAIf,CAAC,OAAO,CAAC,MAAM,CAAC;IAIhB;;;;;;OAMG;IACI,gBAAgB;IAIvB;;;OAGG;IACI,QAAQ;IAIf;;;;;;OAMG;IACI,UAAU;IAMjB;;;;OAIG;IACI,OAAO;IAId;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,GAAG,UAAU;IAIpC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IAK5C;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU;IAK5D,MAAM;IAIN,MAAM,KAAK,MAAM,mDAEhB;CACF"}
@@ -1,62 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { Buffer32 } from '@aztec/foundation/buffer';
4
- import { BufferReader } from '@aztec/foundation/serialize';
5
- import { z } from 'zod';
6
- /**Viem Signature
7
- *
8
- * A version of the Signature class that uses `0x${string}` values for r and s rather than
9
- * Buffer32s
10
- */
11
- export type ViemSignature = {
12
- r: `0x${string}`;
13
- s: `0x${string}`;
14
- v: number;
15
- isEmpty: boolean;
16
- };
17
- /**
18
- * Signature
19
- *
20
- * Contains a signature split into it's primary components (r,s,v)
21
- */
22
- export declare class Signature {
23
- /** The r value of the signature */
24
- readonly r: Buffer32;
25
- /** The s value of the signature */
26
- readonly s: Buffer32;
27
- /** The v value of the signature */
28
- readonly v: number;
29
- /** Does this struct store an empty signature */
30
- readonly isEmpty: boolean;
31
- private size;
32
- constructor(
33
- /** The r value of the signature */
34
- r: Buffer32,
35
- /** The s value of the signature */
36
- s: Buffer32,
37
- /** The v value of the signature */
38
- v: number,
39
- /** Does this struct store an empty signature */
40
- isEmpty?: boolean);
41
- static fromBuffer(buf: Buffer | BufferReader): Signature;
42
- static isValidString(sig: `0x${string}`): boolean;
43
- /**
44
- * A seperate method exists for this as when signing locally with viem, as when
45
- * parsing from viem, we can expect the v value to be a u8, rather than our
46
- * default serialization of u32
47
- */
48
- static fromString(sig: `0x${string}`): Signature;
49
- static random(): Signature;
50
- static empty(): Signature;
51
- equals(other: Signature): boolean;
52
- toBuffer(): Buffer;
53
- getSize(): number;
54
- toString(): `0x${string}`;
55
- /**
56
- * Return the signature with `0x${string}` encodings for r and s
57
- */
58
- toViemSignature(): ViemSignature;
59
- toJSON(): `0x${string}`;
60
- static get schema(): z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, Signature, string>;
61
- }
62
- //# sourceMappingURL=eth_signature.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eth_signature.d.ts","sourceRoot":"","sources":["../../src/eth-signature/eth_signature.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,SAAS;IAKlB,mCAAmC;aACnB,CAAC,EAAE,QAAQ;IAC3B,mCAAmC;aACnB,CAAC,EAAE,QAAQ;IAC3B,mCAAmC;aACnB,CAAC,EAAE,MAAM;IACzB,gDAAgD;aAChC,OAAO,EAAE,OAAO;IAVlC,OAAO,CAAC,IAAI,CAAqB;;IAG/B,mCAAmC;IACnB,CAAC,EAAE,QAAQ;IAC3B,mCAAmC;IACnB,CAAC,EAAE,QAAQ;IAC3B,mCAAmC;IACnB,CAAC,EAAE,MAAM;IACzB,gDAAgD;IAChC,OAAO,GAAE,OAAe;IAG1C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAYxD,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,OAAO;IAIjD;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,SAAS;IAYhD,MAAM,CAAC,MAAM,IAAI,SAAS;IAI1B,MAAM,CAAC,KAAK,IAAI,SAAS;IAIzB,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAIjC,QAAQ,IAAI,MAAM;IAMlB,OAAO,IAAI,MAAM;IAUjB,QAAQ,IAAI,KAAK,MAAM,EAAE;IAIzB;;OAEG;IACH,eAAe,IAAI,aAAa;IAShC,MAAM;IAIN,MAAM,KAAK,MAAM,2HAMhB;CACF"}
@@ -1,2 +0,0 @@
1
- export * from './eth_signature.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eth-signature/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,68 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import { type Tuple } from '../serialize/types.js';
4
- import { Fr } from './fields.js';
5
- /**
6
- * Class to wrap a single point coordinate.
7
- * This class handles the complexities of representing point coordinates as 32 byte buffers as well as fields.
8
- * The coordinate value is split across 2 fields to ensure that the max size of a field is not breached.
9
- * This is achieved by placing the most significant byte of the lower field into the least significant byte of the higher field.
10
- * Calls to 'toBuffer' or 'toBigInt' undo this change and simply return the original 32 byte value.
11
- * Calls to 'toFieldsBuffer' will return a 64 bytes buffer containing the serialized fields.
12
- */
13
- export declare class Coordinate {
14
- /**
15
- * The fields of the coordinate value. Least significant limb at index 0.
16
- */
17
- fields: Tuple<Fr, 2>;
18
- static ZERO: Coordinate;
19
- constructor(
20
- /**
21
- * The fields of the coordinate value. Least significant limb at index 0.
22
- */
23
- fields: Tuple<Fr, 2>);
24
- /**
25
- * Converts the coordinate data into a tuple of fields
26
- * @returns A tuple of the coordinate fields
27
- */
28
- toFields(): Tuple<Fr, 2>;
29
- /**
30
- * Generates a random coordinate value
31
- * @returns The random coordinate
32
- */
33
- static random(): Coordinate;
34
- /**
35
- * serializes the object to buffer of 2 fields.
36
- * @returns A buffer serialization of the object.
37
- */
38
- toFieldsBuffer(): Buffer;
39
- /**
40
- * serializes the coordinate to a single 32 byte buffer.
41
- * @returns A buffer serialization of the object.
42
- */
43
- toBuffer(): Buffer;
44
- /**
45
- * Returns true if this coordinate is equal to the one provided
46
- * @param other - The coordinate against which to compare
47
- * @returns True if the coordinates are the same, false otherwise
48
- */
49
- equals(other: Coordinate): boolean;
50
- /**
51
- * Returns the coordinate's value as a bigint
52
- * @returns The coordinate value as a bigint
53
- */
54
- toBigInt(): bigint;
55
- /**
56
- * Creates a coordinate object from a 32 byte coordinate value
57
- * @param coordinate - A buffer containing the 32 byte coordinate value
58
- * @returns The new coordinate object
59
- */
60
- static fromBuffer(coordinate: Buffer): Coordinate;
61
- /**
62
- * Creates a coordinate object from a field
63
- * @param coordinate - The field containing the coordinate
64
- * @returns The new coordinate object
65
- */
66
- static fromField(coordinate: Fr): Coordinate;
67
- }
68
- //# 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,EAAE,KAAK,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC;;;;;;;GAOG;AACH,qBAAa,UAAU;IAInB;;OAEG;IACI,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAN7B,MAAM,CAAC,IAAI,aAAsC;;IAG/C;;OAEG;IACI,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAG7B;;;OAGG;IACH,QAAQ,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAIxB;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,UAAU;IAI3B;;;OAGG;IACH,cAAc,IAAI,MAAM;IAIxB;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAOlB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;IAIlC;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM;IAYpC;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE;CAOhC"}