From 08a17f2b28351ff717772b3e2ba6baa930f7ce6a Mon Sep 17 00:00:00 2001 From: spypsy Date: Tue, 28 Mar 2023 17:56:53 +0100 Subject: [PATCH] Modularize Aztec TX (#95) * modularize aztec tx + remove .yalc folder * add to aztec-node tsconfig files * use aztec-rpc export in aztec.js * fix import in sequencer| * fix import in sequencer again * update retryUntil in foundation to return result --- README.md | 1 + bootstrap.sh | 1 + build_manifest.json | 7 + yarn-project/.yalc/@aztec/wasm/.eslintrc.cjs | 6 - yarn-project/.yalc/@aztec/wasm/.tsbuildinfo | 1 - yarn-project/.yalc/@aztec/wasm/README.md | 6 - .../.yalc/@aztec/wasm/dest/index.d.ts | 8 - .../.yalc/@aztec/wasm/dest/index.d.ts.map | 1 - yarn-project/.yalc/@aztec/wasm/dest/index.js | 8 - .../.yalc/@aztec/wasm/dest/memory_fifo.d.ts | 46 --- .../@aztec/wasm/dest/memory_fifo.d.ts.map | 1 - .../.yalc/@aztec/wasm/dest/memory_fifo.js | 101 ----- .../wasm/dest/transport/browser/index.d.ts | 5 - .../dest/transport/browser/index.d.ts.map | 1 - .../wasm/dest/transport/browser/index.js | 5 - .../browser/message_port_socket.d.ts | 28 -- .../browser/message_port_socket.d.ts.map | 1 - .../transport/browser/message_port_socket.js | 37 -- .../browser/shared_worker_connector.d.ts | 19 - .../browser/shared_worker_connector.d.ts.map | 1 - .../browser/shared_worker_connector.js | 21 - .../browser/shared_worker_listener.d.ts | 38 -- .../browser/shared_worker_listener.d.ts.map | 1 - .../browser/shared_worker_listener.js | 39 -- .../transport/browser/worker_connector.d.ts | 18 - .../browser/worker_connector.d.ts.map | 1 - .../transport/browser/worker_connector.js | 22 -- .../transport/browser/worker_listener.d.ts | 38 -- .../browser/worker_listener.d.ts.map | 1 - .../dest/transport/browser/worker_listener.js | 39 -- .../dispatch/create_dispatch_fn.d.ts | 21 - .../dispatch/create_dispatch_fn.d.ts.map | 1 - .../transport/dispatch/create_dispatch_fn.js | 11 - .../dispatch/create_dispatch_proxy.d.ts | 50 --- .../dispatch/create_dispatch_proxy.d.ts.map | 1 - .../dispatch/create_dispatch_proxy.js | 38 -- .../dest/transport/dispatch/messages.d.ts | 45 --- .../dest/transport/dispatch/messages.d.ts.map | 1 - .../wasm/dest/transport/dispatch/messages.js | 8 - .../@aztec/wasm/dest/transport/index.d.ts | 12 - .../@aztec/wasm/dest/transport/index.d.ts.map | 1 - .../.yalc/@aztec/wasm/dest/transport/index.js | 12 - .../dest/transport/interface/connector.d.ts | 8 - .../transport/interface/connector.d.ts.map | 1 - .../dest/transport/interface/connector.js | 2 - .../dest/transport/interface/listener.d.ts | 13 - .../transport/interface/listener.d.ts.map | 1 - .../wasm/dest/transport/interface/listener.js | 2 - .../wasm/dest/transport/interface/socket.d.ts | 13 - .../dest/transport/interface/socket.d.ts.map | 1 - .../wasm/dest/transport/interface/socket.js | 2 - .../transport/interface/transferable.d.ts | 60 --- .../transport/interface/transferable.d.ts.map | 1 - .../dest/transport/interface/transferable.js | 35 -- .../wasm/dest/transport/node/index.d.ts | 3 - .../wasm/dest/transport/node/index.d.ts.map | 1 - .../@aztec/wasm/dest/transport/node/index.js | 3 - .../dest/transport/node/node_connector.d.ts | 17 - .../transport/node/node_connector.d.ts.map | 1 - .../dest/transport/node/node_connector.js | 17 - .../transport/node/node_connector_socket.d.ts | 27 -- .../node/node_connector_socket.d.ts.map | 1 - .../transport/node/node_connector_socket.js | 33 -- .../dest/transport/node/node_listener.d.ts | 18 - .../transport/node/node_listener.d.ts.map | 1 - .../wasm/dest/transport/node/node_listener.js | 22 -- .../transport/node/node_listener_socket.d.ts | 27 -- .../node/node_listener_socket.d.ts.map | 1 - .../transport/node/node_listener_socket.js | 34 -- .../wasm/dest/transport/transport_client.d.ts | 44 --- .../dest/transport/transport_client.d.ts.map | 1 - .../wasm/dest/transport/transport_client.js | 80 ---- .../wasm/dest/transport/transport_server.d.ts | 44 --- .../dest/transport/transport_server.d.ts.map | 1 - .../wasm/dest/transport/transport_server.js | 89 ----- .../wasm/dest/wasm/async_call_state.d.ts | 74 ---- .../wasm/dest/wasm/async_call_state.d.ts.map | 1 - .../@aztec/wasm/dest/wasm/async_call_state.js | 111 ------ .../@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts | 26 -- .../wasm/dest/wasm/empty_wasi_sdk.d.ts.map | 1 - .../@aztec/wasm/dest/wasm/empty_wasi_sdk.js | 63 --- .../.yalc/@aztec/wasm/dest/wasm/index.d.ts | 3 - .../@aztec/wasm/dest/wasm/index.d.ts.map | 1 - .../.yalc/@aztec/wasm/dest/wasm/index.js | 3 - .../@aztec/wasm/dest/wasm/wasm_module.d.ts | 110 ------ .../wasm/dest/wasm/wasm_module.d.ts.map | 1 - .../@aztec/wasm/dest/wasm/wasm_module.js | 206 ---------- .../wasm/dest/worker/browser/index.d.ts | 3 - .../wasm/dest/worker/browser/index.d.ts.map | 1 - .../@aztec/wasm/dest/worker/browser/index.js | 3 - .../dest/worker/browser/start_web_module.d.ts | 7 - .../worker/browser/start_web_module.d.ts.map | 1 - .../dest/worker/browser/start_web_module.js | 22 -- .../dest/worker/browser/web_data_store.d.ts | 23 -- .../worker/browser/web_data_store.d.ts.map | 1 - .../dest/worker/browser/web_data_store.js | 32 -- .../wasm/dest/worker/browser/web_worker.d.ts | 10 - .../dest/worker/browser/web_worker.d.ts.map | 1 - .../wasm/dest/worker/browser/web_worker.js | 23 -- .../@aztec/wasm/dest/worker/data_store.d.ts | 9 - .../wasm/dest/worker/data_store.d.ts.map | 1 - .../@aztec/wasm/dest/worker/data_store.js | 2 - .../.yalc/@aztec/wasm/dest/worker/index.d.ts | 3 - .../@aztec/wasm/dest/worker/index.d.ts.map | 1 - .../.yalc/@aztec/wasm/dest/worker/index.js | 2 - .../@aztec/wasm/dest/worker/node/index.d.ts | 3 - .../wasm/dest/worker/node/index.d.ts.map | 1 - .../@aztec/wasm/dest/worker/node/index.js | 3 - .../dest/worker/node/node_data_store.d.ts | 22 -- .../dest/worker/node/node_data_store.d.ts.map | 1 - .../wasm/dest/worker/node/node_data_store.js | 31 -- .../wasm/dest/worker/node/node_worker.d.ts | 6 - .../dest/worker/node/node_worker.d.ts.map | 1 - .../wasm/dest/worker/node/node_worker.js | 21 - .../dest/worker/node/start_node_module.d.ts | 7 - .../worker/node/start_node_module.d.ts.map | 1 - .../dest/worker/node/start_node_module.js | 26 -- .../@aztec/wasm/dest/worker/wasm_worker.d.ts | 9 - .../wasm/dest/worker/wasm_worker.d.ts.map | 1 - .../@aztec/wasm/dest/worker/wasm_worker.js | 2 - .../@aztec/wasm/dest/worker/worker_pool.d.ts | 40 -- .../wasm/dest/worker/worker_pool.d.ts.map | 1 - .../@aztec/wasm/dest/worker/worker_pool.js | 70 ---- .../wasm/node_modules/@aztec/foundation | 1 - yarn-project/.yalc/@aztec/wasm/src/index.ts | 7 - .../.yalc/@aztec/wasm/src/memory_fifo.ts | 104 ----- .../.yalc/@aztec/wasm/src/test/gcd.wasm | Bin 76 -> 0 bytes .../.yalc/@aztec/wasm/src/test/gcd.wat | 27 -- .../wasm/src/transport/browser/index.ts | 4 - .../transport/browser/message_port_socket.ts | 39 -- .../browser/shared_worker_connector.ts | 21 - .../browser/shared_worker_listener.ts | 52 --- .../src/transport/browser/worker_connector.ts | 22 -- .../src/transport/browser/worker_listener.ts | 52 --- .../transport/dispatch/create_dispatch_fn.ts | 24 -- .../dispatch/create_dispatch_proxy.ts | 88 ----- .../wasm/src/transport/dispatch/messages.ts | 51 --- .../.yalc/@aztec/wasm/src/transport/index.ts | 11 - .../wasm/src/transport/interface/connector.ts | 8 - .../wasm/src/transport/interface/listener.ts | 14 - .../wasm/src/transport/interface/socket.ts | 12 - .../src/transport/interface/transferable.ts | 92 ----- .../@aztec/wasm/src/transport/node/index.ts | 2 - .../wasm/src/transport/node/node_connector.ts | 18 - .../transport/node/node_connector_socket.ts | 36 -- .../wasm/src/transport/node/node_listener.ts | 25 -- .../transport/node/node_listener_socket.ts | 37 -- .../wasm/src/transport/transport_client.ts | 114 ------ .../wasm/src/transport/transport_server.ts | 96 ----- .../@aztec/wasm/src/wasm/async_call_state.ts | 136 ------- .../@aztec/wasm/src/wasm/empty_wasi_sdk.ts | 63 --- .../.yalc/@aztec/wasm/src/wasm/index.ts | 2 - .../@aztec/wasm/src/wasm/wasm_module.test.ts | 27 -- .../.yalc/@aztec/wasm/src/wasm/wasm_module.ts | 226 ----------- .../@aztec/wasm/src/worker/browser/index.ts | 2 - .../src/worker/browser/start_web_module.ts | 23 -- .../wasm/src/worker/browser/web_data_store.ts | 37 -- .../wasm/src/worker/browser/web_worker.ts | 24 -- .../@aztec/wasm/src/worker/data_store.ts | 7 - .../.yalc/@aztec/wasm/src/worker/index.ts | 2 - .../@aztec/wasm/src/worker/node/index.ts | 2 - .../wasm/src/worker/node/node_data_store.ts | 36 -- .../wasm/src/worker/node/node_worker.ts | 22 -- .../wasm/src/worker/node/start_node_module.ts | 28 -- .../@aztec/wasm/src/worker/wasm_worker.ts | 7 - .../@aztec/wasm/src/worker/worker_pool.ts | 87 ---- .../.yalc/@aztec/wasm/tsconfig.dest.json | 4 - yarn-project/.yalc/@aztec/wasm/tsconfig.json | 9 - yarn-project/.yalc/@aztec/wasm/yalc.sig | 1 - yarn-project/aztec-node/package.json | 1 + .../aztec-node/src/aztec-node/aztec-node.ts | 3 +- .../src/aztec-node/aztec_node.test.ts | 2 +- .../aztec-node/src/aztec-node/fixtures.ts | 2 +- yarn-project/aztec-node/tsconfig.dest.json | 10 +- yarn-project/aztec-node/tsconfig.json | 10 +- yarn-project/aztec-rpc/package.json | 2 +- .../src/account_state/account_state.ts | 3 +- .../src/aztec_rpc_client/aztec_rpc_client.ts | 4 +- .../src/aztec_rpc_server/aztec_rpc_server.ts | 4 +- .../aztec-rpc/src/database/database.ts | 3 +- .../aztec-rpc/src/database/memory_db.ts | 3 +- yarn-project/aztec-rpc/src/database/tx_dao.ts | 3 +- yarn-project/aztec-rpc/src/index.ts | 2 +- .../src/synchroniser/synchroniser.ts | 2 +- yarn-project/aztec-rpc/src/tx/index.ts | 1 - yarn-project/aztec-rpc/src/tx/tx_receipt.ts | 2 +- yarn-project/aztec-rpc/tsconfig.dest.json | 9 +- yarn-project/aztec-rpc/tsconfig.json | 8 +- yarn-project/aztec.js/package.json | 3 +- yarn-project/aztec.js/src/contract/sent_tx.ts | 4 +- .../contract_deployer.test.ts | 1 + yarn-project/aztec.js/src/foundation.ts | 63 --- yarn-project/aztec.js/tsconfig.dest.json | 7 +- yarn-project/aztec.js/tsconfig.json | 6 +- yarn-project/circuits.js/package.json | 3 +- .../circuits.js/src/wasm/circuits_wasm.ts | 2 +- yarn-project/foundation/src/retry/index.ts | 7 +- yarn-project/p2p/package.json | 2 +- yarn-project/p2p/src/client/index.ts | 1 - yarn-project/p2p/src/client/mocks.ts | 2 +- yarn-project/p2p/src/client/p2p_client.ts | 3 +- .../p2p/src/tx_pool/memory_tx_pool.ts | 3 +- yarn-project/p2p/src/tx_pool/tx_pool.ts | 2 +- yarn-project/p2p/tsconfig.dest.json | 4 +- yarn-project/p2p/tsconfig.json | 4 +- yarn-project/package.json | 4 +- yarn-project/sequencer-client/package.json | 1 + yarn-project/sequencer-client/src/deps/tx.ts | 2 +- .../src/sequencer/block_builder.ts | 2 +- .../circuit_powered_block_builder.ts | 2 +- .../sequencer-client/src/sequencer/index.ts | 3 +- .../sequencer-client/tsconfig.dest.json | 1 + yarn-project/sequencer-client/tsconfig.json | 1 + yarn-project/tx/.eslintrc.cjs | 1 + .../{.yalc/@aztec/wasm => tx}/Dockerfile | 10 +- yarn-project/tx/README.md | 1 + .../{.yalc/@aztec/wasm => tx}/package.json | 32 +- yarn-project/tx/src/index.ts | 2 + yarn-project/{p2p/src/client => tx/src}/tx.ts | 0 .../{aztec-rpc/src/tx => tx/src}/tx_hash.ts | 0 yarn-project/tx/tsconfig.dest.json | 7 + yarn-project/tx/tsconfig.json | 14 + yarn-project/typedoc.json | 3 +- yarn-project/yarn-project-base/Dockerfile | 13 +- yarn-project/yarn.lock | 371 +++++++++--------- 225 files changed, 345 insertions(+), 4316 deletions(-) delete mode 100644 yarn-project/.yalc/@aztec/wasm/.eslintrc.cjs delete mode 100644 yarn-project/.yalc/@aztec/wasm/.tsbuildinfo delete mode 100644 yarn-project/.yalc/@aztec/wasm/README.md delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.js delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts.map delete mode 100644 yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.js delete mode 120000 yarn-project/.yalc/@aztec/wasm/node_modules/@aztec/foundation delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/memory_fifo.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/test/gcd.wasm delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/test/gcd.wat delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/browser/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/browser/message_port_socket.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_connector.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_listener.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_connector.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_listener.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_fn.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_proxy.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/messages.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/interface/connector.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/interface/listener.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/interface/socket.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/interface/transferable.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/node/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector_socket.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener_socket.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/transport_client.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/transport/transport_server.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/wasm/async_call_state.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/wasm/empty_wasi_sdk.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/wasm/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.test.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/browser/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/browser/start_web_module.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_data_store.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_worker.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/data_store.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/node/index.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/node/node_data_store.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/node/node_worker.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/node/start_node_module.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/wasm_worker.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/src/worker/worker_pool.ts delete mode 100644 yarn-project/.yalc/@aztec/wasm/tsconfig.dest.json delete mode 100644 yarn-project/.yalc/@aztec/wasm/tsconfig.json delete mode 100644 yarn-project/.yalc/@aztec/wasm/yalc.sig delete mode 100644 yarn-project/aztec.js/src/foundation.ts create mode 100644 yarn-project/tx/.eslintrc.cjs rename yarn-project/{.yalc/@aztec/wasm => tx}/Dockerfile (60%) create mode 100644 yarn-project/tx/README.md rename yarn-project/{.yalc/@aztec/wasm => tx}/package.json (54%) create mode 100644 yarn-project/tx/src/index.ts rename yarn-project/{p2p/src/client => tx/src}/tx.ts (100%) rename yarn-project/{aztec-rpc/src/tx => tx/src}/tx_hash.ts (100%) create mode 100644 yarn-project/tx/tsconfig.dest.json create mode 100644 yarn-project/tx/tsconfig.json diff --git a/README.md b/README.md index d80caab6ab1..c46589b10e5 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,4 @@ The Aztec 3 system consists of the following sub projects. - `prover-client` - `aztec-node` - `sequencer-client` +- `tx` diff --git a/bootstrap.sh b/bootstrap.sh index b3bfd4b5f56..a59713e7386 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -50,6 +50,7 @@ PROJECTS=( "yarn-project/archiver:yarn build" "yarn-project/world-state:yarn build" "yarn-project/p2p:yarn build" + "yarn-project/tx:yarn build" "yarn-project/sequencer-client:yarn build" "yarn-project/aztec-node:yarn build" "yarn-project/key-store:yarn build" diff --git a/build_manifest.json b/build_manifest.json index 1f1f9ad36cc..e0fb9579ac2 100644 --- a/build_manifest.json +++ b/build_manifest.json @@ -170,6 +170,13 @@ "l2-block" ] }, + "tx": { + "buildDir": "yarn-project", + "projectDir": "yarn-project/tx", + "dockerfile": "tx/Dockerfile", + "rebuildPatterns": ["^yarn-project/tx/"], + "dependencies": ["circuits.js", "l2-block"] + }, "world-state": { "buildDir": "yarn-project", "projectDir": "yarn-project/world-state", diff --git a/yarn-project/.yalc/@aztec/wasm/.eslintrc.cjs b/yarn-project/.yalc/@aztec/wasm/.eslintrc.cjs deleted file mode 100644 index 9cf806b1500..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/.eslintrc.cjs +++ /dev/null @@ -1,6 +0,0 @@ -require('@rushstack/eslint-patch/modern-module-resolution'); - -module.exports = { - extends: ['@aztec/eslint-config'], - parserOptions: { tsconfigRootDir: __dirname }, -}; diff --git a/yarn-project/.yalc/@aztec/wasm/.tsbuildinfo b/yarn-project/.yalc/@aztec/wasm/.tsbuildinfo deleted file mode 100644 index eb474691c49..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/tslib/tslib.d.ts","../log/dest/index.d.ts","../node_modules/buffer/index.d.ts","./src/memory_fifo.ts","./src/wasm/empty_wasi_sdk.ts","./src/wasm/wasm_module.ts","./src/transport/dispatch/create_dispatch_fn.ts","./src/transport/dispatch/messages.ts","./src/transport/interface/socket.ts","./src/transport/interface/connector.ts","./src/transport/transport_client.ts","./src/transport/interface/transferable.ts","./src/transport/dispatch/create_dispatch_proxy.ts","./src/transport/interface/listener.ts","./src/transport/transport_server.ts","./src/transport/browser/message_port_socket.ts","./src/transport/browser/worker_connector.ts","./src/transport/browser/worker_listener.ts","./src/transport/browser/shared_worker_connector.ts","./src/transport/browser/shared_worker_listener.ts","./src/transport/browser/index.ts","./src/transport/node/node_connector_socket.ts","./src/transport/node/node_connector.ts","./src/transport/node/node_listener_socket.ts","./src/transport/node/node_listener.ts","./src/transport/node/index.ts","./src/transport/index.ts","./src/worker/wasm_worker.ts","./src/worker/browser/web_worker.ts","./src/worker/data_store.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/abstract-leveldown/index.d.ts","../node_modules/@types/level-errors/index.d.ts","../node_modules/@types/levelup/index.d.ts","../node_modules/@types/memdown/index.d.ts","./src/worker/browser/web_data_store.ts","./src/worker/browser/index.ts","./src/worker/node/node_worker.ts","../node_modules/@types/leveldown/index.d.ts","./src/worker/node/node_data_store.ts","./src/worker/node/index.ts","./src/worker/worker_pool.ts","./src/worker/index.ts","./src/wasm/async_call_state.ts","./src/wasm/index.ts","./src/index.ts","./src/worker/browser/start_web_module.ts","./src/worker/node/start_node_module.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/bn.js/index.d.ts","../node_modules/@types/detect-node/index.d.ts","../node_modules/@types/elliptic/index.d.ts","../node_modules/@types/graceful-fs/index.d.ts","../node_modules/@types/hdkey/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/istanbul-lib-report/index.d.ts","../node_modules/@types/istanbul-reports/index.d.ts","../node_modules/@jest/expect-utils/build/index.d.ts","../node_modules/chalk/index.d.ts","../node_modules/@sinclair/typebox/typebox.d.ts","../node_modules/@jest/schemas/build/index.d.ts","../node_modules/jest-diff/node_modules/pretty-format/build/index.d.ts","../node_modules/jest-diff/build/index.d.ts","../node_modules/expect/node_modules/jest-matcher-utils/build/index.d.ts","../node_modules/expect/build/index.d.ts","../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../node_modules/@types/jest/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/prettier/index.d.ts","../node_modules/@types/semver/classes/semver.d.ts","../node_modules/@types/semver/functions/parse.d.ts","../node_modules/@types/semver/functions/valid.d.ts","../node_modules/@types/semver/functions/clean.d.ts","../node_modules/@types/semver/functions/inc.d.ts","../node_modules/@types/semver/functions/diff.d.ts","../node_modules/@types/semver/functions/major.d.ts","../node_modules/@types/semver/functions/minor.d.ts","../node_modules/@types/semver/functions/patch.d.ts","../node_modules/@types/semver/functions/prerelease.d.ts","../node_modules/@types/semver/functions/compare.d.ts","../node_modules/@types/semver/functions/rcompare.d.ts","../node_modules/@types/semver/functions/compare-loose.d.ts","../node_modules/@types/semver/functions/compare-build.d.ts","../node_modules/@types/semver/functions/sort.d.ts","../node_modules/@types/semver/functions/rsort.d.ts","../node_modules/@types/semver/functions/gt.d.ts","../node_modules/@types/semver/functions/lt.d.ts","../node_modules/@types/semver/functions/eq.d.ts","../node_modules/@types/semver/functions/neq.d.ts","../node_modules/@types/semver/functions/gte.d.ts","../node_modules/@types/semver/functions/lte.d.ts","../node_modules/@types/semver/functions/cmp.d.ts","../node_modules/@types/semver/functions/coerce.d.ts","../node_modules/@types/semver/classes/comparator.d.ts","../node_modules/@types/semver/classes/range.d.ts","../node_modules/@types/semver/functions/satisfies.d.ts","../node_modules/@types/semver/ranges/max-satisfying.d.ts","../node_modules/@types/semver/ranges/min-satisfying.d.ts","../node_modules/@types/semver/ranges/to-comparators.d.ts","../node_modules/@types/semver/ranges/min-version.d.ts","../node_modules/@types/semver/ranges/valid.d.ts","../node_modules/@types/semver/ranges/outside.d.ts","../node_modules/@types/semver/ranges/gtr.d.ts","../node_modules/@types/semver/ranges/ltr.d.ts","../node_modules/@types/semver/ranges/intersects.d.ts","../node_modules/@types/semver/ranges/simplify.d.ts","../node_modules/@types/semver/ranges/subset.d.ts","../node_modules/@types/semver/internals/identifiers.d.ts","../node_modules/@types/semver/index.d.ts","../node_modules/@types/stack-utils/index.d.ts","../node_modules/@types/uuid/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","impliedFormat":1},{"version":"7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","impliedFormat":1},{"version":"8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","impliedFormat":1},{"version":"5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","impliedFormat":1},{"version":"4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","impliedFormat":1},{"version":"1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","impliedFormat":1},{"version":"746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","impliedFormat":1},{"version":"d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","impliedFormat":1},{"version":"aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c","impliedFormat":1},{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true,"impliedFormat":1},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true,"impliedFormat":1},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true,"impliedFormat":1},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true,"impliedFormat":1},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true,"impliedFormat":1},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true,"impliedFormat":1},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true,"impliedFormat":1},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true,"impliedFormat":1},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980","impliedFormat":1},{"version":"39605640330a122a0bf7d90ecf13d9012991adb2fa4a63d04843c94394f0f96d","impliedFormat":99},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"7501fd9b2fc1fb3bc6abe499573b81db98d2954dc25df9a421973c5faaab4941","signature":"51eeac533c6eb5567faa2e43ac43d9fe25bd39581165f2f11af315bcac8efa14","impliedFormat":99},{"version":"7a73c72029575d1234a8be8d77defdac2b05e27c917543806e1697c77dbddcb4","signature":"ad9ea8a35fadce7abfe86228c0ff466dd7fe45a0aa6634b696d426d2c40e3f58","impliedFormat":99},{"version":"9f82f7dce7a1311fa6a023919337ae0cad6faefe122ca4503ae33d2e22420bc0","signature":"1ed4fa517b6642f6697e26befa2619494bca4243f77f7b8e9b1c897965d136aa","impliedFormat":99},{"version":"f7b2cc01d2477492f72e74e50997d4078a36d0c1ed9dcc18296c2741ae428de4","signature":"52ee7b65db088422f752fa8a03abd082b6e81ccd3555629a4d2996c75a3ea784","impliedFormat":99},{"version":"f841813d6e9df0f9e0180f69b4963964544886b9b59c5d75a0a4b3de45efdceb","signature":"a36a302ce150fc6aba361bf2c3f4c4f3ea6ad1a39c4a1b876df3191774974a41","impliedFormat":99},{"version":"c35f64730d5ddb935dba2b79506f5c8a851b2c40646637c7070a4033972bd73a","signature":"0700ea2ece0b6e7609f86bc93d1d4713fd3f53be3ed4d3384baddd9daff050aa","impliedFormat":99},{"version":"4017cfb925dd1318b932861fe1789154f6063bbbf4608bf47d2acc07e3887625","signature":"8b070b73bb6b42225b7c3b6625bda6664954cc3712229b18958a8943b340ae55","impliedFormat":99},{"version":"aa9efc0c0f844b992299237fc548c0d87a010e33d680ec3ef8dbfd1c7fdd4b39","signature":"5615bcac5653c419404afd7a69d3a2ea065d6d8d73d76f645dc72775da1bce2a","impliedFormat":99},{"version":"f72d2ef8589cbc9ef38bc0a1ce8e8226886673553f135c2ec7bab480a51a1b14","signature":"0949e43a56894d36a28c69ef7226bb234ea74de6bb8db9c88ccf270be3b15b52","impliedFormat":99},{"version":"12ff3a65e83059a171d45b077f870c9847c4ddffc7cb0afe9cb3d3086ec26ed9","signature":"96d6443ed4046f8418464504489b9f770f7a438b3bc7bf460fb86471d117e9a4","impliedFormat":99},{"version":"29488db8cc9b41928088c0a874a9740bee7c05b3aee6e02d8b1136aacbb3ea57","signature":"b4117081407f355734a73e4f2051edeafff14541bacaa61b2b5b74de3a6d9f91","impliedFormat":99},{"version":"cc898ec7bce7af4fb56cfc04a7bb2efd3d2b7d98ac92b74b2b4e67e7ddbf7cc2","signature":"617438c8ffeebd4b427114557e1a41f99cd439d9757e1daf742e1ce4e866e050","impliedFormat":99},{"version":"7f14dc4040d79c8027bba900d0009a387480c8fbcaef946540e7d55cb25d477d","signature":"02349a2b4e4df02eeb877449a91fa899932d9e2a7b8ef30b47cd5820af6ab06e","impliedFormat":99},{"version":"4cbe58c97ab6d95e9d3b88062a9a09fc9c4dc9173d416c2c03d3c60de633afc8","signature":"66d2b4311e142ded625c47020aba04457dc1827b2abe4a0bf5e4282b61927b41","impliedFormat":99},{"version":"4aa8cf2c03a4bef578adb195fa0048172418ddc37ef1a43521b74e659a901b3c","signature":"508df7438e5b78be306e1383ab15dbb7119fb2ca4cb13cd9cf26e0b2489afb65","impliedFormat":99},{"version":"6263b4a797ae57e4fa8f9f034db454d13b00e5f497f33d63ae48f391b3965bb2","signature":"ce5c319de9485f5bcdefb59099b3e4f23bf0f27fc8e3bbe7282f862a9f860b49","impliedFormat":99},{"version":"8ffaac172d85e0da751e89c9115923b322afd5db8b8971b7e39a5f449e0f2d72","signature":"847f3e5260297cd02349d4fdf0ade2a89e11767d04441dd7e909bd44cb7e359f","impliedFormat":99},{"version":"04f0e5540074077b5194e4e50f045b07ea1c0d4ba639f2a90c25d415be93d62a","impliedFormat":99},{"version":"05c0a6903b06e02a54a65557ce552a38890e1eae2d4924fdc63f5d8c7d48a51f","signature":"ddbb7587357abb10688237ca0e2115ff0b141bc5addf52063ba8e05c7904c183","impliedFormat":99},{"version":"8df9a1e93f38ef9e5a02ac6d69550714fa74c0aa2b2417d1e0c935270bbb2845","signature":"c23f869061db4adee9e58bfe744589b000cb97989e1c658315b86fc61aa7cb24","impliedFormat":99},{"version":"d7945a051dd621e39b53921bbf255a067fcdcdd1d2e57749dca4de8e66115251","signature":"4d806524986070b7c9f6019a46f045e083570cd6eaa6b7bb7da0d438e1ea9d9b","impliedFormat":99},{"version":"bc3158925d8f0417aea29d03f80f8bf7fc01a75f1d8c93239ee794b4b2a40fa7","signature":"0a3f05296d25399d19f2dbf65a8537022f4e8ec42258892a801664d02b66e169","impliedFormat":99},{"version":"c2a3209fd29ed0b0daa24d258b108f7b4e4ba2656a99e529ceedd4a044b2edb8","impliedFormat":99},{"version":"a0bd6bccba91b399e4e98bb50ef2064f2dd1e5566151911526368667fb27f151","impliedFormat":99},{"version":"1b38d11a73ef55b188c688ce14f14c1805409afc8052822a32fbaa5154af78fa","signature":"4e89973a43a5c0e304e3b4adacfd647525168d6128ed218841f085610b36123b","impliedFormat":99},{"version":"2fd1ade8c0b26af4e165a0ba11d3e2f0a8d5d15f001611bf63772cb15b70ebde","signature":"052cdf9abce5e9252a42c5af82cb4591f03ecb83ebbb521fb74b31e2acd0ad79","impliedFormat":99},{"version":"eb29076a307e2750601d2eaf733b7b9b17c69d0156d47a2ba14cebf1ed66b0ce","signature":"76b1d15c83a9fd9909fd81e32024727743ae506de24a1bebc60719ad93cce0db","impliedFormat":99},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"54ba7456adb777a685250cd144115ea51379784012ba1311255b715c6bdcff2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f","impliedFormat":1},{"version":"e193e634a99c9c1d71f1c6e4e1567a4a73584328d21ea02dd5cddbaad6693f61","affectsGlobalScope":true,"impliedFormat":1},{"version":"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"5450889a3b688f9da80e7c96963b2cfebc6097e8e95790a23a48558b61e6aea7","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","impliedFormat":1},{"version":"f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true,"impliedFormat":1},{"version":"80473bd0dd90ca1e166514c2dfead9d5803f9c51418864ca35abbeec6e6847e1","impliedFormat":1},{"version":"1c84b46267610a34028edfd0d035509341751262bac1062857f3c8df7aff7153","impliedFormat":1},{"version":"5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","impliedFormat":1},{"version":"04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","impliedFormat":1},{"version":"7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320","impliedFormat":1},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true,"impliedFormat":1},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true,"impliedFormat":1},{"version":"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","impliedFormat":1},{"version":"ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8d555f3d607ecaa18d55de6995ea8f206342ecc93305919eac945c7c78c78c6","impliedFormat":1},{"version":"409b21f3d0c198cc4866b941cd9303809a13230e2b9b3c1508fe61348a8b43ed","impliedFormat":1},{"version":"49afdedca00d22b171678e3cf9c47b7e0c1846fd4905a01d68f0145eb90add94","impliedFormat":1},{"version":"7a1b0fbc4287cb7513c0a10d9b53f5acc32d3ced53b2d786711901d483c4dbb4","impliedFormat":1},{"version":"8408c66a83053c21d93e73c1f6773647ccdb60fb9468f99341e389f3bfa35ad7","impliedFormat":1},{"version":"51108a0b63dc5dd793d26c1b185df7cfa1d1bf1a6e4ad9ce6f9d7ca8eb65b4ed","signature":"8a0ab25856a3fcd2c10da218932bb157fcab3ae61294c3506200f28f5d19b9c1","impliedFormat":99},{"version":"bff5e7e514980487864d34f69b6eda6f93506aff6dd9ced75f9a172ded1a71b4","impliedFormat":99},{"version":"f87022015c1924d3d60ae66c192366518af8617f7243af5af17d46a1d4d09764","signature":"9e6e67d4df1a320ac0ec7e2b58e98b332c2b4a7b2d88e1fe7463634a81f219e0","impliedFormat":99},{"version":"2c425702763ca7d738b2f0080be64d366a0818106a73c2595ed3ea51967f18c8","impliedFormat":1},{"version":"91f4e4de96699e0a21d50885d00d1dce8695f78788e3bdf40d33a299896be442","signature":"955a24e28310e9b71695b601e309957702e2da09e67f5bc5359bfae4a603e9b6","impliedFormat":99},{"version":"ac030f3c41a1797c673137478c675da6542c0676341c85f68b93fcecaaeb4778","impliedFormat":99},{"version":"afde802c7508bfa466977ea232329057a307f777c8499ee651b7abf65d65c503","signature":"de24ca8d9277f1e78c0a904ab762dca156aa55b6ae6fb2bb27c39c9193ca9b93","impliedFormat":99},{"version":"0679dbdd43d4fae7b84baf09c5299ef7fca6effba02e711fb3bcabfe4b3719ca","impliedFormat":99},{"version":"c0c2b6bb02ec7f862cb53fe5455c4333387396423b5d5e8dd2ce1a2ef294fc90","signature":"15b413ec98335b7ec0d6068d0b10ae7d4cf794b8c93cb923bed2364ff85d372c","impliedFormat":99},{"version":"1893a547b8fbe550e167f6e8c9ae7c93bda50a72121c83aac21902fd333c2274","impliedFormat":99},{"version":"d1b4b30ab8fc253dd8606c0742c2ac08d2963b98b3bbfeabc98aabb0a5775799","impliedFormat":99},{"version":"dc9806a1a14bc9f601a6e16f016ccb22b045e84d3d3ccaf49c4e05fb49b30fb7","signature":"c9b16149b0bcedd5843245a14a41729109ec43f7b9ca8dad7660d6247766c290","impliedFormat":99},{"version":"46a360e67861a830045b0a33cdb99708cb41fbe00a58def5c08716f1816701b0","signature":"e2818909ec58404f3a37a96893be135599bda8581f76ed311370fa4c4b3220a2","impliedFormat":99},{"version":"3078727fed04c123165efdb42deeac5dceaa42ac62216ca13cb809dc7e13415f","impliedFormat":1},{"version":"cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","impliedFormat":1},{"version":"b4f76b34637d79cefad486127115fed843762c69512d7101b7096e1293699679","impliedFormat":1},{"version":"93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","impliedFormat":1},{"version":"dae3d1adc67ac3dbd1cd471889301339ec439837b5df565982345be20c8fca9a","impliedFormat":1},{"version":"b6ddf3a46ccfa4441d8be84d2e9bf3087573c48804196faedbd4a25b60631beb","impliedFormat":1},{"version":"01f7828047b5c6703d3c601473618b448f5506a88fcac852638b0715c3abf4eb","impliedFormat":1},{"version":"3896464bb7e25fceebbd9c8a0b443caaa9b68ec323f46191c36b84293c852a19","impliedFormat":1},{"version":"b8a427b9fe88504a6fb092e21adfe272d144394a2ced7f9e4adc3de7efa6e216","impliedFormat":1},{"version":"bf88ef4208a770ca39a844b182b3695df536326ea566893fdc5b8418702a331e","impliedFormat":1},{"version":"53acffbcae83dbdd20b2eeaf06a459da0f26a74e99e76fd28325b48e9e9de0d0","impliedFormat":1},{"version":"8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","impliedFormat":1},{"version":"7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","impliedFormat":1},{"version":"f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","impliedFormat":1},{"version":"6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"db25694be959314fd1e868d72e567746db1db9e2001fae545d12d2a8c1bba1b8","impliedFormat":1},{"version":"43883cf3635bb1846cbdc6c363787b76227677388c74f7313e3f0edb380840fa","impliedFormat":1},{"version":"2d47012580f859dae201d2eef898a416bdae719dffc087dfd06aefe3de2f9c8d","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"2cec1a31729b9b01e9294c33fc9425d336eff067282809761ad2e74425d6d2a5","impliedFormat":1},{"version":"2d47012580f859dae201d2eef898a416bdae719dffc087dfd06aefe3de2f9c8d","impliedFormat":1},{"version":"e10991edf67a29051eda3bf649ccc653ae1dc55b5363fa0f559f802b2017aa02","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","impliedFormat":1},{"version":"bc88e4049153bc4dddb4503ed7e624eb141edfa9064b3659d6c86e900fe9e621","impliedFormat":1},{"version":"2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","impliedFormat":1},{"version":"2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","impliedFormat":1},{"version":"42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","impliedFormat":1},{"version":"d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","impliedFormat":1},{"version":"77c1d91a129ba60b8c405f9f539e42df834afb174fe0785f89d92a2c7c16b77a","impliedFormat":1},{"version":"7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","impliedFormat":1},{"version":"906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","impliedFormat":1},{"version":"5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","impliedFormat":1},{"version":"c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","impliedFormat":1},{"version":"e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","impliedFormat":1},{"version":"e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","impliedFormat":1},{"version":"9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","impliedFormat":1},{"version":"0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","impliedFormat":1},{"version":"71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","impliedFormat":1},{"version":"c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","impliedFormat":1},{"version":"2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","impliedFormat":1},{"version":"479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","impliedFormat":1},{"version":"ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","impliedFormat":1},{"version":"f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","impliedFormat":1},{"version":"86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","impliedFormat":1},{"version":"2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","impliedFormat":1},{"version":"a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","impliedFormat":1},{"version":"b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","impliedFormat":1},{"version":"61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","impliedFormat":1},{"version":"6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","impliedFormat":1},{"version":"c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","impliedFormat":1},{"version":"38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","impliedFormat":1},{"version":"d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","impliedFormat":1},{"version":"3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","impliedFormat":1},{"version":"b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","impliedFormat":1},{"version":"f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","impliedFormat":1},{"version":"843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","impliedFormat":1},{"version":"f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","impliedFormat":1},{"version":"6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","impliedFormat":1},{"version":"e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","impliedFormat":1},{"version":"a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","impliedFormat":1},{"version":"a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","impliedFormat":1},{"version":"da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"6aee496bf0ecfbf6731aa8cca32f4b6e92cdc0a444911a7d88410408a45ecc5d","impliedFormat":1},{"version":"b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","impliedFormat":1},{"version":"12fe557e4c2d5ce9e11362f69a8d7c05d0588de4ae415afe8c5106da5c2772aa","impliedFormat":1},{"version":"70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","impliedFormat":1},{"version":"ae84439d1ae42b30ced3df38c4285f35b805be40dfc95b0647d0e59c70b11f97","impliedFormat":1}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"esModuleInterop":true,"importHelpers":true,"inlineSourceMap":true,"module":199,"outDir":"./dest","rootDir":"./src","strict":true,"target":7,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[132],[132,157],[132,173],[132,157,158,159,160,161],[132,157,159],[132,139],[132,163],[103,132,139],[132,168],[132,169],[132,175,178],[132,174],[132,139,140],[102,132,139,140,141],[132,140],[86,132],[89,132],[90,95,123,132],[91,102,103,110,120,131,132],[91,92,102,110,132],[93,132],[94,95,103,111,132],[95,120,128,132],[96,98,102,110,132],[97,132],[98,99,132],[102,132],[100,102,132],[102,103,104,120,131,132],[102,103,104,117,120,123,132],[132,136],[98,105,110,120,131,132],[102,103,105,106,110,120,128,131,132],[105,107,120,128,131,132],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138],[102,108,132],[109,131,132],[98,102,110,120,132],[111,132],[112,132],[89,113,132],[114,130,132,136],[115,132],[116,132],[102,117,118,132],[117,119,132,134],[90,102,120,121,122,123,132],[90,120,122,132],[120,121,132],[123,132],[124,132],[102,126,127,132],[126,127,132],[95,110,120,128,132],[129,132],[110,130,132],[90,105,116,131,132],[95,132],[120,132,133],[132,134],[132,135],[90,95,102,104,113,120,131,132,134,136],[120,132,137],[132,183,222],[132,183,207,222],[132,222],[132,183],[132,183,208,222],[132,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221],[132,208,222],[132,225],[132,171,177],[132,172,176],[132,175],[56,67,82,132,145,149,151,153],[56,132],[56,72,73,74,75,132],[56,64,132],[56,65,71,132],[56,69,71,102,132],[56,62,66,67,102,132],[56,62,63,64,65,66,67,68,69,70,76,81,132],[56,64,102,132],[56,78,80,132],[56,65,77,132,136],[56,64,132,136],[56,69,79,102,132,136],[56,57,63,64,65,102,132],[56,63,64,67,69,132],[56,61,132],[56,57,132],[56,61,132,152],[56,57,59,60,90,95,132],[56,84,132,144],[56,61,82,132],[56,85,132,142,143],[56,61,82,83,132],[56,83,132,150],[56,132,146,148],[56,85,132,142,143,147],[56,61,82,83,132,136],[56,61,82,132,136],[56,57,83,132],[64],[65,71],[69,102],[62,66,67],[64,102],[65,77,136],[64,136],[65,102],[69],[61],[57],[57,90],[85],[83],[61,82]],"referencedMap":[[57,1],[159,2],[157,1],[171,1],[174,3],[173,1],[140,1],[162,4],[158,2],[160,5],[161,2],[163,6],[164,1],[165,7],[166,8],[167,6],[168,1],[169,9],[170,10],[180,11],[179,12],[181,1],[141,1],[147,13],[142,14],[143,15],[86,16],[87,16],[89,17],[90,18],[91,19],[92,20],[93,21],[94,22],[95,23],[96,24],[97,25],[98,26],[99,26],[101,27],[100,28],[102,27],[103,29],[104,30],[88,31],[138,1],[105,32],[106,33],[107,34],[139,35],[108,36],[109,37],[110,38],[111,39],[112,40],[113,41],[114,42],[115,43],[116,44],[117,45],[118,45],[119,46],[120,47],[122,48],[121,49],[123,50],[124,51],[125,1],[126,52],[127,53],[128,54],[129,55],[130,56],[131,57],[132,58],[133,59],[134,60],[135,61],[136,62],[137,63],[182,1],[207,64],[208,65],[183,66],[186,66],[205,64],[206,64],[196,64],[195,67],[193,64],[188,64],[201,64],[199,64],[203,64],[187,64],[200,64],[204,64],[189,64],[190,64],[202,64],[184,64],[191,64],[192,64],[194,64],[198,64],[209,68],[197,64],[185,64],[222,69],[221,1],[216,68],[218,70],[217,68],[210,68],[211,68],[213,68],[215,68],[219,70],[220,70],[212,70],[214,70],[223,1],[224,1],[225,1],[226,71],[58,1],[172,1],[178,72],[177,73],[176,74],[175,12],[56,1],[11,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[53,1],[54,1],[1,1],[10,1],[55,1],[154,75],[59,76],[76,77],[71,78],[74,79],[75,80],[72,79],[73,80],[62,76],[68,81],[63,76],[82,82],[65,78],[69,83],[64,76],[67,76],[81,84],[78,85],[77,86],[80,87],[79,86],[66,88],[70,89],[152,90],[60,91],[153,92],[61,93],[145,94],[155,95],[144,96],[84,97],[85,76],[151,98],[149,99],[148,100],[146,101],[156,102],[83,95],[150,103]],"exportedModulesMap":[[57,1],[159,2],[157,1],[171,1],[174,3],[173,1],[140,1],[162,4],[158,2],[160,5],[161,2],[163,6],[164,1],[165,7],[166,8],[167,6],[168,1],[169,9],[170,10],[180,11],[179,12],[181,1],[141,1],[147,13],[142,14],[143,15],[86,16],[87,16],[89,17],[90,18],[91,19],[92,20],[93,21],[94,22],[95,23],[96,24],[97,25],[98,26],[99,26],[101,27],[100,28],[102,27],[103,29],[104,30],[88,31],[138,1],[105,32],[106,33],[107,34],[139,35],[108,36],[109,37],[110,38],[111,39],[112,40],[113,41],[114,42],[115,43],[116,44],[117,45],[118,45],[119,46],[120,47],[122,48],[121,49],[123,50],[124,51],[125,1],[126,52],[127,53],[128,54],[129,55],[130,56],[131,57],[132,58],[133,59],[134,60],[135,61],[136,62],[137,63],[182,1],[207,64],[208,65],[183,66],[186,66],[205,64],[206,64],[196,64],[195,67],[193,64],[188,64],[201,64],[199,64],[203,64],[187,64],[200,64],[204,64],[189,64],[190,64],[202,64],[184,64],[191,64],[192,64],[194,64],[198,64],[209,68],[197,64],[185,64],[222,69],[221,1],[216,68],[218,70],[217,68],[210,68],[211,68],[213,68],[215,68],[219,70],[220,70],[212,70],[214,70],[223,1],[224,1],[225,1],[226,71],[58,1],[172,1],[178,72],[177,73],[176,74],[175,12],[56,1],[11,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[8,1],[48,1],[45,1],[46,1],[47,1],[49,1],[9,1],[50,1],[51,1],[52,1],[53,1],[54,1],[1,1],[10,1],[55,1],[154,75],[76,77],[71,104],[74,105],[75,106],[72,105],[73,106],[68,107],[82,82],[65,104],[69,108],[81,84],[78,109],[77,110],[80,106],[79,110],[66,111],[70,112],[152,113],[60,114],[153,92],[61,115],[145,94],[155,113],[144,116],[84,117],[151,98],[149,99],[148,116],[146,117],[156,113],[83,118],[150,117]],"semanticDiagnosticsPerFile":[57,159,157,171,174,173,140,162,158,160,161,163,164,165,166,167,168,169,170,180,179,181,141,147,142,143,86,87,89,90,91,92,93,94,95,96,97,98,99,101,100,102,103,104,88,138,105,106,107,139,108,109,110,111,112,113,114,115,116,117,118,119,120,122,121,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,182,207,208,183,186,205,206,196,195,193,188,201,199,203,187,200,204,189,190,202,184,191,192,194,198,209,197,185,222,221,216,218,217,210,211,213,215,219,220,212,214,223,224,225,226,58,172,178,177,176,175,56,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,154,59,76,71,74,75,72,73,62,68,63,82,65,69,64,67,81,78,77,80,79,66,70,152,60,153,61,145,155,144,84,85,151,149,148,146,156,83,150],"latestChangedDtsFile":"./dest/worker/node/start_node_module.d.ts"},"version":"4.9.5"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/README.md b/yarn-project/.yalc/@aztec/wasm/README.md deleted file mode 100644 index b15e7756288..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# wasm - -Functionality to: - -1. Call WebAssembly functions -2. Create asynchronous workers that host webassembly. diff --git a/yarn-project/.yalc/@aztec/wasm/dest/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/index.d.ts deleted file mode 100644 index a363b56ac21..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { WebDataStore } from './worker/browser/index.js'; -export { NodeDataStore } from './worker/node/index.js'; -export { WasmWorker, WorkerPool } from './worker/index.js'; -export { WasmModule } from './wasm/index.js'; -export { AsyncCallState, AsyncFnState } from './wasm/index.js'; -export { DispatchMsg, WorkerListener, TransportServer, NodeListener } from './transport/index.js'; -export { Transfer, isTransferDescriptor } from './transport/interface/transferable.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/index.d.ts.map deleted file mode 100644 index a6a4ba63857..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/index.js b/yarn-project/.yalc/@aztec/wasm/dest/index.js deleted file mode 100644 index 6f596b65715..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export { WebDataStore } from './worker/browser/index.js'; -export { NodeDataStore } from './worker/node/index.js'; -export { WorkerPool } from './worker/index.js'; -export { WasmModule } from './wasm/index.js'; -export { AsyncCallState } from './wasm/index.js'; -export { WorkerListener, TransportServer, NodeListener } from './transport/index.js'; -export { Transfer, isTransferDescriptor } from './transport/interface/transferable.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN2RCxPQUFPLEVBQWMsVUFBVSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDM0QsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxjQUFjLEVBQWdCLE1BQU0saUJBQWlCLENBQUM7QUFDL0QsT0FBTyxFQUFlLGNBQWMsRUFBRSxlQUFlLEVBQUUsWUFBWSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbEcsT0FBTyxFQUFFLFFBQVEsRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHVDQUF1QyxDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts deleted file mode 100644 index de592d842b4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * A simple fifo queue. It can grow unbounded. It can have multiple producers and consumers. - * Putting an item onto the queue always succeeds, unless either end() or cancel() has been called in which case - * the item being pushed is simply discarded. - */ -export declare class MemoryFifo { - private waiting; - private items; - private flushing; - /** - * Length of queue. - * @returns integer. - */ - length(): number; - /** - * Returns next item within the queue, or blocks until and item has been put into the queue. - * If given a timeout, the promise will reject if no item is received after `timeout` seconds. - * If the queue is flushing, `null` is returned. - * @param timeout - In seconds. - * @returns Promise of result. - */ - get(timeout?: number): Promise; - /** - * Put an item onto back of the queue. - * @param item - The item to enqueue. - */ - put(item: T): void; - /** - * Once ended, no further items are added to queue. Consumers will consume remaining items within the queue. - * The queue is not reusable after calling `end()`. - * Any consumers waiting for an item receive null. - */ - end(): void; - /** - * Once cancelled, all items are discarded from the queue, and no further items are added to the queue. - * The queue is not reusable after calling `cancel()`. - * Any consumers waiting for an item receive null. - */ - cancel(): void; - /** - * Helper method that can be used to continously consume and process items on the queue. - * @param handler - The item handler function. - */ - process(handler: (item: T) => Promise): Promise; -} -//# sourceMappingURL=memory_fifo.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts.map deleted file mode 100644 index 9bb1710ce16..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"memory_fifo.d.ts","sourceRoot":"","sources":["../src/memory_fifo.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,qBAAa,UAAU,CAAC,CAAC;IACvB,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;OAGG;IACI,MAAM;IAIb;;;;;;OAMG;IACI,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAyB/C;;;OAGG;IACI,GAAG,CAAC,IAAI,EAAE,CAAC;IAUlB;;;;OAIG;IACI,GAAG;IAKV;;;;OAIG;IACI,MAAM;IAMb;;;OAGG;IACU,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;CAazD"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.js b/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.js deleted file mode 100644 index f742e3a773c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/memory_fifo.js +++ /dev/null @@ -1,101 +0,0 @@ -// TODO should come from a dependency -/** - * A simple fifo queue. It can grow unbounded. It can have multiple producers and consumers. - * Putting an item onto the queue always succeeds, unless either end() or cancel() has been called in which case - * the item being pushed is simply discarded. - */ -export class MemoryFifo { - constructor() { - this.waiting = []; - this.items = []; - this.flushing = false; - } - /** - * Length of queue. - * @returns integer. - */ - length() { - return this.items.length; - } - /** - * Returns next item within the queue, or blocks until and item has been put into the queue. - * If given a timeout, the promise will reject if no item is received after `timeout` seconds. - * If the queue is flushing, `null` is returned. - * @param timeout - In seconds. - * @returns Promise of result. - */ - get(timeout) { - if (this.items.length) { - return Promise.resolve(this.items.shift()); - } - if (this.items.length === 0 && this.flushing) { - return Promise.resolve(null); - } - return new Promise((resolve, reject) => { - this.waiting.push(resolve); - if (timeout) { - setTimeout(() => { - const index = this.waiting.findIndex(r => r === resolve); - if (index > -1) { - this.waiting.splice(index, 1); - const err = new Error('Timeout getting item from queue.'); - reject(err); - } - }, timeout * 1000); - } - }); - } - /** - * Put an item onto back of the queue. - * @param item - The item to enqueue. - */ - put(item) { - if (this.flushing) { - return; - } - else if (this.waiting.length) { - this.waiting.shift()(item); - } - else { - this.items.push(item); - } - } - /** - * Once ended, no further items are added to queue. Consumers will consume remaining items within the queue. - * The queue is not reusable after calling `end()`. - * Any consumers waiting for an item receive null. - */ - end() { - this.flushing = true; - this.waiting.forEach(resolve => resolve(null)); - } - /** - * Once cancelled, all items are discarded from the queue, and no further items are added to the queue. - * The queue is not reusable after calling `cancel()`. - * Any consumers waiting for an item receive null. - */ - cancel() { - this.flushing = true; - this.items = []; - this.waiting.forEach(resolve => resolve(null)); - } - /** - * Helper method that can be used to continously consume and process items on the queue. - * @param handler - The item handler function. - */ - async process(handler) { - try { - while (true) { - const item = await this.get(); - if (item === null) { - break; - } - await handler(item); - } - } - catch (err) { - console.error('Queue handler exception:', err); - } - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVtb3J5X2ZpZm8uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbWVtb3J5X2ZpZm8udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEscUNBQXFDO0FBQ3JDOzs7O0dBSUc7QUFDSCxNQUFNLE9BQU8sVUFBVTtJQUF2QjtRQUNVLFlBQU8sR0FBaUMsRUFBRSxDQUFDO1FBQzNDLFVBQUssR0FBUSxFQUFFLENBQUM7UUFDaEIsYUFBUSxHQUFHLEtBQUssQ0FBQztJQThGM0IsQ0FBQztJQTVGQzs7O09BR0c7SUFDSSxNQUFNO1FBQ1gsT0FBTyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQztJQUMzQixDQUFDO0lBRUQ7Ozs7OztPQU1HO0lBQ0ksR0FBRyxDQUFDLE9BQWdCO1FBQ3pCLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUU7WUFDckIsT0FBTyxPQUFPLENBQUMsT0FBT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QUFHLENBQUMsQ0FBQztTQUNoRDtJQUNILENBQUM7Q0FDRiJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts deleted file mode 100644 index 9432a480ed8..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './worker_connector.js'; -export * from './worker_listener.js'; -export * from './shared_worker_connector.js'; -export * from './shared_worker_listener.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts.map deleted file mode 100644 index 381d5165ffc..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.js deleted file mode 100644 index d0103503cb4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from './worker_connector.js'; -export * from './worker_listener.js'; -export * from './shared_worker_connector.js'; -export * from './shared_worker_listener.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L2Jyb3dzZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyw2QkFBNkIsQ0FBQyJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts deleted file mode 100644 index 65fcce26e3e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Socket } from '../interface/socket.js'; -/** - * An implementation of a TransportSocket using MessagePorts. - */ -export declare class MessagePortSocket implements Socket { - private port; - /** - * Create a MessagePortSocket. - * @param port - MessagePort object to wrap. - */ - constructor(port: MessagePort); - /** - * Send a message over our message port. - * @param msg - The message. - * @param transfer - Objects to transfer ownership of. - */ - send(msg: any, transfer?: Transferable[]): Promise; - /** - * Add a message handler. - * @param cb - The handler. - */ - registerHandler(cb: (msg: any) => any): void; - /** - * Close this message port. - */ - close(): void; -} -//# sourceMappingURL=message_port_socket.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts.map deleted file mode 100644 index 077d4623f51..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"message_port_socket.d.ts","sourceRoot":"","sources":["../../../src/transport/browser/message_port_socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;GAEG;AACH,qBAAa,iBAAkB,YAAW,MAAM;IAKlC,OAAO,CAAC,IAAI;IAJxB;;;OAGG;gBACiB,IAAI,EAAE,WAAW;IAErC;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,GAAE,YAAY,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5D;;;OAGG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI;IAI5C;;OAEG;IACH,KAAK;CAKN"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.js deleted file mode 100644 index 03387a31f8c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/message_port_socket.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * An implementation of a TransportSocket using MessagePorts. - */ -export class MessagePortSocket { - /** - * Create a MessagePortSocket. - * @param port - MessagePort object to wrap. - */ - constructor(port) { - this.port = port; - } - /** - * Send a message over our message port. - * @param msg - The message. - * @param transfer - Objects to transfer ownership of. - */ - send(msg, transfer = []) { - this.port.postMessage(msg, transfer); - return Promise.resolve(); - } - /** - * Add a message handler. - * @param cb - The handler. - */ - registerHandler(cb) { - this.port.onmessage = event => cb(event.data); - } - /** - * Close this message port. - */ - close() { - void this.send(undefined); - this.port.onmessage = null; - this.port.close(); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZV9wb3J0X3NvY2tldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc3BvcnQvYnJvd3Nlci9tZXNzYWdlX3BvcnRfc29ja2V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBOztHQUVHO0FBQ0gsTUFBTSxPQUFPLGlCQUFpQjtJQUM1Qjs7O09BR0c7SUFDSCxZQUFvQixJQUFpQjtRQUFqQixTQUFJLEdBQUosSUFBSSxDQUFhO0lBQUcsQ0FBQztJQUV6Qzs7OztPQUlHO0lBQ0gsSUFBSSxDQUFDLEdBQVEsRUFBRSxXQUEyQixFQUFFO1FBQzFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsQ0FBQztRQUNyQyxPQUFPLE9BQU8sQ0FBQyxPQUFPLEVBQUUsQ0FBQztJQUMzQixDQUFDO0lBRUQ7OztPQUdHO0lBQ0gsZUFBZSxDQUFDLEVBQXFCO1FBQ25DLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNoRCxDQUFDO0lBRUQ7O09BRUc7SUFDSCxLQUFLO1FBQ0gsS0FBSyxJQUFJLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQzFCLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQztRQUMzQixJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3BCLENBQUM7Q0FDRiJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts deleted file mode 100644 index 032f9df12b3..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Connector } from '../interface/connector.js'; -import { MessagePortSocket } from './message_port_socket.js'; -/** - * Connector implementation which wraps a SharedWorker. - */ -export declare class SharedWorkerConnector implements Connector { - private worker; - /** - * Create a SharedWorkerConnector. - * @param worker - A shared worker. - */ - constructor(worker: SharedWorker); - /** - * Create a Socket implementation with our mesage port. - * @returns The socket. - */ - createSocket(): Promise; -} -//# sourceMappingURL=shared_worker_connector.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts.map deleted file mode 100644 index b745dd62aed..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shared_worker_connector.d.ts","sourceRoot":"","sources":["../../../src/transport/browser/shared_worker_connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,qBAAsB,YAAW,SAAS;IAKzC,OAAO,CAAC,MAAM;IAJ1B;;;OAGG;gBACiB,MAAM,EAAE,YAAY;IAExC;;;OAGG;IACH,YAAY;CAGb"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.js deleted file mode 100644 index fa8778b40a9..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_connector.js +++ /dev/null @@ -1,21 +0,0 @@ -import { MessagePortSocket } from './message_port_socket.js'; -/** - * Connector implementation which wraps a SharedWorker. - */ -export class SharedWorkerConnector { - /** - * Create a SharedWorkerConnector. - * @param worker - A shared worker. - */ - constructor(worker) { - this.worker = worker; - } - /** - * Create a Socket implementation with our mesage port. - * @returns The socket. - */ - createSocket() { - return Promise.resolve(new MessagePortSocket(this.worker.port)); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkX3dvcmtlcl9jb25uZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L2Jyb3dzZXIvc2hhcmVkX3dvcmtlcl9jb25uZWN0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFN0Q7O0dBRUc7QUFDSCxNQUFNLE9BQU8scUJBQXFCO0lBQ2hDOzs7T0FHRztJQUNILFlBQW9CLE1BQW9CO1FBQXBCLFdBQU0sR0FBTixNQUFNLENBQWM7SUFBRyxDQUFDO0lBRTVDOzs7T0FHRztJQUNILFlBQVk7UUFDVixPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDbEUsQ0FBQztDQUNGIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts deleted file mode 100644 index e6e93d9b214..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/// -import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; -/** - * See https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope. - */ -declare interface SharedWorkerGlobalScope { - /** - * Fired on shared workers when a new client connects. - */ - onconnect: any; -} -/** - * Listens for connections to a shared worker. - */ -export declare class SharedWorkerListener extends EventEmitter implements Listener { - private worker; - /** - * - * @param worker - */ - constructor(worker: SharedWorkerGlobalScope); - /** - * - */ - open(): void; - /** - * - */ - close(): void; - /** - * - * @param event - */ - private handleMessageEvent; -} -export {}; -//# sourceMappingURL=shared_worker_listener.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts.map deleted file mode 100644 index 72ac8c251e3..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shared_worker_listener.d.ts","sourceRoot":"","sources":["../../../src/transport/browser/shared_worker_listener.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD;;GAEG;AACH,OAAO,WAAW,uBAAuB;IACvC;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,YAAa,YAAW,QAAQ;IAK5D,OAAO,CAAC,MAAM;IAJ1B;;;OAGG;gBACiB,MAAM,EAAE,uBAAuB;IAInD;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,KAAK;IAIL;;;OAGG;IACH,OAAO,CAAC,kBAAkB,CAMxB;CACH"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.js deleted file mode 100644 index e0cec42374b..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/shared_worker_listener.js +++ /dev/null @@ -1,39 +0,0 @@ -import EventEmitter from 'events'; -import { MessagePortSocket } from './message_port_socket.js'; -/** - * Listens for connections to a shared worker. - */ -export class SharedWorkerListener extends EventEmitter { - /** - * - * @param worker - */ - constructor(worker) { - super(); - this.worker = worker; - /** - * - * @param event - */ - this.handleMessageEvent = (event) => { - const [port] = event.ports; - if (!port) { - return; - } - this.emit('new_socket', new MessagePortSocket(port)); - }; - } - /** - * - */ - open() { - this.worker.onconnect = this.handleMessageEvent; - } - /** - * - */ - close() { - this.worker.onconnect = () => { }; - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkX3dvcmtlcl9saXN0ZW5lci5qcy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b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts deleted file mode 100644 index a7eba90c1ac..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Connector } from '../interface/connector.js'; -import { MessagePortSocket } from './message_port_socket.js'; -/** - * - */ -export declare class WorkerConnector implements Connector { - private worker; - /** - * - * @param worker - */ - constructor(worker: Worker); - /** - * - */ - createSocket(): Promise; -} -//# sourceMappingURL=worker_connector.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts.map deleted file mode 100644 index a0af81a8776..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"worker_connector.d.ts","sourceRoot":"","sources":["../../../src/transport/browser/worker_connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;GAEG;AACH,qBAAa,eAAgB,YAAW,SAAS;IAKnC,OAAO,CAAC,MAAM;IAJ1B;;;OAGG;gBACiB,MAAM,EAAE,MAAM;IAElC;;OAEG;IACH,YAAY;CAKb"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.js deleted file mode 100644 index 4faae6403cf..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_connector.js +++ /dev/null @@ -1,22 +0,0 @@ -import { MessagePortSocket } from './message_port_socket.js'; -/** - * - */ -export class WorkerConnector { - /** - * - * @param worker - */ - constructor(worker) { - this.worker = worker; - } - /** - * - */ - createSocket() { - const channel = new MessageChannel(); - this.worker.postMessage('', [channel.port2]); - return Promise.resolve(new MessagePortSocket(channel.port1)); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX2Nvbm5lY3Rvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc3BvcnQvYnJvd3Nlci93b3JrZXJfY29ubmVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTdEOztHQUVHO0FBQ0gsTUFBTSxPQUFPLGVBQWU7SUFDMUI7OztPQUdHO0lBQ0gsWUFBb0IsTUFBYztRQUFkLFdBQU0sR0FBTixNQUFNLENBQVE7SUFBRyxDQUFDO0lBRXRDOztPQUVHO0lBQ0gsWUFBWTtRQUNWLE1BQU0sT0FBTyxHQUFHLElBQUksY0FBYyxFQUFFLENBQUM7UUFDckMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7UUFDN0MsT0FBTyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksaUJBQWlCLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7SUFDL0QsQ0FBQztDQUNGIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts deleted file mode 100644 index 135a82ed2c4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/// -import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; -/** - * - */ -declare interface DedicatedWorkerGlobalScope { - /** - * - */ - onmessage: any; -} -/** - * - */ -export declare class WorkerListener extends EventEmitter implements Listener { - private worker; - /** - * - * @param worker - */ - constructor(worker: DedicatedWorkerGlobalScope); - /** - * - */ - open(): void; - /** - * - */ - close(): void; - /** - * - * @param event - */ - private handleMessageEvent; -} -export {}; -//# sourceMappingURL=worker_listener.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts.map deleted file mode 100644 index 778536fc69b..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"worker_listener.d.ts","sourceRoot":"","sources":["../../../src/transport/browser/worker_listener.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD;;GAEG;AACH,OAAO,WAAW,0BAA0B;IAC1C;;OAEG;IACH,SAAS,EAAE,GAAG,CAAC;CAChB;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAa,YAAW,QAAQ;IAKtD,OAAO,CAAC,MAAM;IAJ1B;;;OAGG;gBACiB,MAAM,EAAE,0BAA0B;IAItD;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,KAAK;IAIL;;;OAGG;IACH,OAAO,CAAC,kBAAkB,CAMxB;CACH"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.js deleted file mode 100644 index 75430d08d97..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/browser/worker_listener.js +++ /dev/null @@ -1,39 +0,0 @@ -import EventEmitter from 'events'; -import { MessagePortSocket } from './message_port_socket.js'; -/** - * - */ -export class WorkerListener extends EventEmitter { - /** - * - * @param worker - */ - constructor(worker) { - super(); - this.worker = worker; - /** - * - * @param event - */ - this.handleMessageEvent = (event) => { - const [port] = event.ports; - if (!port) { - return; - } - this.emit('new_socket', new MessagePortSocket(port)); - }; - } - /** - * - */ - open() { - this.worker.onmessage = this.handleMessageEvent; - } - /** - * - */ - close() { - this.worker.onmessage = () => { }; - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX2xpc3RlbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9icm93c2VyL3dvcmtlcl9saXN0ZW5lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLFlBQVksTUFBTSxRQUFRLENBQUM7QUFFbEMsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFZN0Q7O0dBRUc7QUFDSCxNQUFNLE9BQU8sY0FBZSxTQUFRLFlBQVk7SUFDOUM7OztPQUdHO0lBQ0gsWUFBb0IsTUFBa0M7UUFDcEQsS0FBSyxFQUFFLENBQUM7UUFEVSxXQUFNLEdBQU4sTUFBTSxDQUE0QjtRQWtCdEQ7OztXQUdHO1FBQ0ssdUJBQWtCLEdBQUcsQ0FBQyxLQUFtQixFQUFFLEVBQUU7WUFDbkQsTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUM7WUFDM0IsSUFBSSxDQUFDLElBQUksRUFBRTtnQkFDVCxPQUFPO2FBQ1I7WUFDRCxJQUFJLENBQUMsSUFBSSxDQUFDLFlBQVksRUFBRSxJQUFJLGlCQUFpQixDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDdkQsQ0FBQyxDQUFDO0lBMUJGLENBQUM7SUFFRDs7T0FFRztJQUNILElBQUk7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUMsa0JBQWtCLENBQUM7SUFDbEQsQ0FBQztJQUVEOztPQUVHO0lBQ0gsS0FBSztRQUNILElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxHQUFHLEdBQUcsRUFBRSxHQUFFLENBQUMsQ0FBQztJQUNuQyxDQUFDO0NBYUYifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts deleted file mode 100644 index fdb3921facf..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * - */ -export interface DispatchMsg { - /** - * - */ - fn: string; - /** - * - */ - args: any[]; -} -/** - * - */ -export declare function createDispatchFn(targetFn: () => any, debug?: { - (...data: any[]): void; - (message?: any, ...optionalParams: any[]): void; -}): ({ fn, args }: DispatchMsg) => Promise; -//# sourceMappingURL=create_dispatch_fn.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts.map deleted file mode 100644 index a8e465a9c16..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create_dispatch_fn.d.ts","sourceRoot":"","sources":["../../../src/transport/dispatch/create_dispatch_fn.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,EAAE,KAAK;;;CAAgB,kBAC7C,WAAW,kBAKxC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.js deleted file mode 100644 index 09b635703d4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_fn.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * - */ -export function createDispatchFn(targetFn, debug = console.error) { - return async ({ fn, args }) => { - const target = targetFn(); - debug(`dispatching to ${target}: ${fn}`, args); - return await target[fn](...args); - }; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX2Rpc3BhdGNoX2ZuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9kaXNwYXRjaC9jcmVhdGVfZGlzcGF0Y2hfZm4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBY0E7O0dBRUc7QUFDSCxNQUFNLFVBQVUsZ0JBQWdCLENBQUMsUUFBbUIsRUFBRSxLQUFLLEdBQUcsT0FBTyxDQUFDLEtBQUs7SUFDekUsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLEVBQUUsSUFBSSxFQUFlLEVBQUUsRUFBRTtRQUN6QyxNQUFNLE1BQU0sR0FBRyxRQUFRLEVBQUUsQ0FBQztRQUMxQixLQUFLLENBQUMsa0JBQWtCLE1BQU0sS0FBSyxFQUFFLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQztRQUMvQyxPQUFPLE1BQU0sTUFBTSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7SUFDbkMsQ0FBQyxDQUFDO0FBQ0osQ0FBQyJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts deleted file mode 100644 index 27edab62dc3..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { DispatchMsg } from './create_dispatch_fn.js'; -import { TransportClient } from '../transport_client.js'; -import { TransferDescriptor } from '../interface/transferable.js'; -type FilterOutAttributes = { - [Key in keyof Base]: Base[Key] extends (...args: any) => any ? Base[Key] : never; -}; -type PromisifyFunction any> = (...args: Parameters) => Promise>; -type Promisify any; -}> = { - [Key in keyof Base]: ReturnType extends Promise ? Base[Key] : PromisifyFunction; -}; -/** - * Unpack transfer types - */ -type TransferTypes = { - [Index in keyof Tuple]: Tuple[Index] | (Tuple[Index] extends Transferable ? TransferDescriptor : never); -}; -/** - * Annoying: https://github.com/microsoft/TypeScript/issues/29919 - * There's a bug that means we can't map over the tuple or function parameter types to make them transferrable, if - * we use the Parameters builtin, and then try to map. - * So instead we inline the Parameters builtin and apply the TransferTypes to the parameters within the inline. - * Once the above is fixed we could in theory just do: - * - * type MakeFunctionTransferrable any> = ( - * ...args: TransferTypes> - * ) => ReturnType;. - */ -type MakeFunctionTransferrable any> = (...args: TFunction extends (...args: infer P) => any ? TransferTypes

: never) => ReturnType; -type Transferrable any; -}> = { - [Key in keyof Base]: MakeFunctionTransferrable; -}; -export type Proxify = Promisify>>; -export declare function createDispatchProxyFromFn(class_: { - new (...args: any[]): T; -}, requestFn: (fn: string) => (...args: any[]) => Promise): Proxify; -/** - * Create a proxy object of our class T that uses transportClient - * @param class_ - Our class T. - * @param transportClient - The transport infrastructure. - * @returns A proxy over T. - */ -export declare function createDispatchProxy(class_: { - new (...args: any[]): T; -}, transportClient: TransportClient): Proxify; -export {}; -//# sourceMappingURL=create_dispatch_proxy.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts.map deleted file mode 100644 index 8e5e12339be..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create_dispatch_proxy.d.ts","sourceRoot":"","sources":["../../../src/transport/dispatch/create_dispatch_proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAwB,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAExF,KAAK,mBAAmB,CAAC,IAAI,IAAI;KAC9B,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK;CACjF,CAAC;AAEF,KAAK,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7G,KAAK,SAAS,CAAC,IAAI,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAA;CAAE,IAAI;KACrE,GAAG,IAAI,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;CAC3G,CAAC;AAEF;;GAEG;AACH,KAAK,aAAa,CAAC,KAAK,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,IAAI;KAChD,KAAK,IAAI,MAAM,KAAK,GAAG,KAA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,CAAC,CAAC,CAqBZ"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.js deleted file mode 100644 index 49833dfc748..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/create_dispatch_proxy.js +++ /dev/null @@ -1,38 +0,0 @@ -import { EventEmitter } from 'events'; -import { isTransferDescriptor } from '../interface/transferable.js'; -export function createDispatchProxyFromFn(class_, requestFn) { - const proxy = class_.prototype instanceof EventEmitter ? new EventEmitter() : {}; - for (const fn of Object.getOwnPropertyNames(class_.prototype)) { - if (fn === 'constructor') { - continue; - } - proxy[fn] = requestFn(fn); - } - return proxy; -} -/** - * Create a proxy object of our class T that uses transportClient - * @param class_ - Our class T. - * @param transportClient - The transport infrastructure. - * @returns A proxy over T. - */ -export function createDispatchProxy(class_, transportClient) { - // Create a proxy of class_ that passes along methods over our transportClient - const proxy = createDispatchProxyFromFn(class_, (fn) => (...args) => { - // Pass our proxied function name and arguments over our transport client - const transfer = args.reduce((acc, a) => (isTransferDescriptor(a) ? [...acc, ...a.transferables] : acc), []); - args = args.map(a => (isTransferDescriptor(a) ? a.send : a)); - return transportClient.request({ fn, args }, transfer); - }); - if (proxy instanceof EventEmitter) { - // Handle proxied 'emit' calls if our proxy object is an EventEmitter - transportClient.on('event_msg', ({ fn, args }) => { - if (fn === 'emit') { - const [eventName, ...restArgs] = args; - proxy.emit(eventName, ...restArgs); - } - }); - } - return proxy; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX2Rpc3BhdGNoX3Byb3h5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9kaXNwYXRjaC9jcmVhdGVfZGlzcGF0Y2hfcHJveHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5nc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0FBQyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsRUFDMUUsRUFBb0IsQ0FDckIsQ0FBQztRQUNGLElBQUksR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUM3RCxPQUFPLGVBQWUsQ0FBQyxPQUFPLENBQUMsRUFBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLEVBQUUsUUFBUSxDQUFDLENBQUM7SUFDekQsQ0FBQyxDQUFDLENBQUM7SUFDSCxJQUFJLEtBQUssWUFBWSxZQUFZLEVBQUU7UUFDakMscUVBQXFFO1FBQ3JFLGVBQWUsQ0FBQyxFQUFFLENBQUMsV0FBVyxFQUFFLENBQUMsRUFBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLEVBQUUsRUFBRTtZQUMvQyxJQUFJLEVBQUUsS0FBSyxNQUFNLEVBQUU7Z0JBQ2pCLE1BQU0sQ0FBQyxTQUFTLEVBQUUsR0FBRyxRQUFRLENBQUMsR0FBRyxJQUFJLENBQUM7Z0JBQ3RDLEtBQUssQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLEdBQUcsUUFBUSxDQUFDLENBQUM7YUFDcEM7UUFDSCxDQUFDLENBQUMsQ0FBQztLQUNKO0lBQ0QsT0FBTyxLQUFLLENBQUM7QUFDZixDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts deleted file mode 100644 index c8e36c087a4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Represents a transport bus request. - */ -export interface RequestMessage { - /** - * The message ID. - */ - msgId: number; - /** - * The data. - */ - payload: Payload; -} -/** - * Represents a transport bus response. - */ -export interface ResponseMessage { - /** - * The message ID. - */ - msgId: number; - /** - * The data. - */ - payload?: Payload; - /** - * The error, if any. - */ - error?: string; -} -/** - * A message stemming from an event. - */ -export interface EventMessage { - /** - * The event data. - */ - payload: Payload; -} -/** - * Is this an event message? - * @returns If the msgId was blank. - */ -export declare function isEventMessage(msg: ResponseMessage | EventMessage): msg is EventMessage; -//# sourceMappingURL=messages.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts.map deleted file mode 100644 index 115e820679b..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/transport/dispatch/messages.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,OAAO;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO;IACtC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,OAAO;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EACpC,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,GACpD,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAE9B"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.js deleted file mode 100644 index b5d76595237..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/dispatch/messages.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Is this an event message? - * @returns If the msgId was blank. - */ -export function isEventMessage(msg) { - return msg.msgId === undefined; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L2Rpc3BhdGNoL21lc3NhZ2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBDQTs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsY0FBYyxDQUM1QixHQUFxRDtJQUVyRCxPQUFRLEdBQWdDLENBQUMsS0FBSyxLQUFLLFNBQVMsQ0FBQztBQUMvRCxDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts deleted file mode 100644 index 0989a811a39..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './dispatch/create_dispatch_fn.js'; -export * from './dispatch/create_dispatch_proxy.js'; -export * from './dispatch/messages.js'; -export * from './interface/connector.js'; -export * from './interface/listener.js'; -export * from './interface/socket.js'; -export * from './interface/transferable.js'; -export * from './transport_client.js'; -export * from './transport_server.js'; -export * from './browser/index.js'; -export * from './node/index.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts.map deleted file mode 100644 index d5bded64e1d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/index.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/index.js deleted file mode 100644 index 70b1b56c44c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/index.js +++ /dev/null @@ -1,12 +0,0 @@ -export * from './dispatch/create_dispatch_fn.js'; -export * from './dispatch/create_dispatch_proxy.js'; -export * from './dispatch/messages.js'; -export * from './interface/connector.js'; -export * from './interface/listener.js'; -export * from './interface/socket.js'; -export * from './interface/transferable.js'; -export * from './transport_client.js'; -export * from './transport_server.js'; -export * from './browser/index.js'; -export * from './node/index.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHJhbnNwb3J0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsa0NBQWtDLENBQUM7QUFDakQsY0FBYyxxQ0FBcUMsQ0FBQztBQUNwRCxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxpQkFBaUIsQ0FBQyJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts deleted file mode 100644 index 828e9aab7b2..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Socket } from './socket.js'; -/** - * Opens a socket with corresponding TransportListener. - */ -export interface Connector { - createSocket(): Promise; -} -//# sourceMappingURL=connector.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts.map deleted file mode 100644 index 62006c17ceb..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../src/transport/interface/connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACjC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.js deleted file mode 100644 index 7d5ac106da9..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/connector.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29ubmVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9pbnRlcmZhY2UvY29ubmVjdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts deleted file mode 100644 index 4d0baa43572..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -import EventEmitter from 'events'; -import { Socket } from './socket.js'; -/** - * Once opened, an implementation of a TransportListener will emit `new_socket` events as new clients connect. - * Possible implementations could include MessageChannels or WebSockets. - */ -export interface Listener extends EventEmitter { - open(): void; - close(): void; - on(name: 'new_socket', cb: (client: Socket) => void): this; -} -//# sourceMappingURL=listener.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts.map deleted file mode 100644 index a326bd6b210..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/transport/interface/listener.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,IAAI,IAAI,IAAI,CAAC;IAEb,KAAK,IAAI,IAAI,CAAC;IAEd,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;CAC5D"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.js deleted file mode 100644 index 196998386cb..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/listener.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlzdGVuZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L2ludGVyZmFjZS9saXN0ZW5lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts deleted file mode 100644 index 39e6a4e4a6a..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Represents one end of a socket connection. - * A message sent via `send` will be handled by the corresponding Socket's handler function at the other end. - * Implementations could use e.g. MessagePorts for communication between browser workers, - * or WebSockets for communication between processes. - * If `registerHandler` callback receives `undefined` that signals the other end closed. - */ -export interface Socket { - send(msg: any, transfer?: Transferable[]): Promise; - registerHandler(cb: (msg: any) => any): void; - close(): void; -} -//# sourceMappingURL=socket.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts.map deleted file mode 100644 index a7714e3a539..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../../../src/transport/interface/socket.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI,CAAC;IAC7C,KAAK,IAAI,IAAI,CAAC;CACf"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.js deleted file mode 100644 index 5a28a6f054d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/socket.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ja2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9pbnRlcmZhY2Uvc29ja2V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts deleted file mode 100644 index f8ef5f290e3..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -declare const $transferable: unique symbol; -/** - * A descriptor representing a payload with transferable components. - * These components will have ownership transfered when published on an event bus. - */ -export interface TransferDescriptor { - /** - * Marked as transferable. - */ - [$transferable]: true; - /** - * The payload with the transferable objects. - */ - send: T; - /** - * The objects to transfer. - */ - transferables: Transferable[]; -} -/** - * - */ -export declare function isTransferDescriptor(thing: any): thing is TransferDescriptor; -/** - * Mark a transferable object as such, so it will no be serialized and - * deserialized on messaging with the main thread, but to transfer - * ownership of it to the receiving thread. - * - * Only works with array buffers, message ports and few more special - * types of objects, but it's much faster than serializing and - * deserializing them. - * - * Note: - * The transferable object cannot be accessed by this thread again - * unless the receiving thread transfers it back again! - * - * @param transferable - Array buffer, message port or similar. - * @see https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast - */ -export declare function Transfer(transferable: Transferable): TransferDescriptor; -/** - * Mark transferable objects within an arbitrary object or array as - * being a transferable object. They will then not be serialized - * and deserialized on messaging with the main thread, but ownership - * of them will be tranferred to the receiving thread. - * - * Only array buffers, message ports and few more special types of - * objects can be transferred, but it's much faster than serializing and - * deserializing them. - * - * Note: - * The transferable object cannot be accessed by this thread again - * unless the receiving thread transfers it back again! - * - * @param transferable - Array buffer, message port or similar. - * @see https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast - */ -export declare function Transfer(payload: T, transferables: Transferable[]): TransferDescriptor; -export {}; -//# sourceMappingURL=transferable.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts.map deleted file mode 100644 index 5126c83a736..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transferable.d.ts","sourceRoot":"","sources":["../../../src/transport/interface/transferable.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,eAAgC,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,GAAG;IACzC;;OAEG;IACH,CAAC,aAAa,CAAC,EAAE,IAAI,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IACR;;OAEG;IACH,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B;AAWD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,kBAAkB,CAE5E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.js deleted file mode 100644 index e815bbc8331..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/interface/transferable.js +++ /dev/null @@ -1,35 +0,0 @@ -const $transferable = Symbol('thread.transferable'); -/** - * - */ -function isTransferable(thing) { - if (!thing || typeof thing !== 'object') - return false; - // Don't check too thoroughly, since the list of transferable things in JS might grow over time - return true; -} -/** - * - */ -export function isTransferDescriptor(thing) { - return thing && typeof thing === 'object' && thing[$transferable]; -} -/** - * Create a transfer descriptor, marking these as transferable. - * @param payload - The payload. - * @param transferables - The transferable objects. - * @returns The descriptor. - */ -export function Transfer(payload, transferables) { - if (!transferables) { - if (!isTransferable(payload)) - throw Error(); - transferables = [payload]; - } - return { - [$transferable]: true, - send: payload, - transferables, - }; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9pbnRlcmZhY2UvdHJhbnNmZXJhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sYUFBYSxHQUFHLE1BQU0sQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDO0FBcUJwRDs7R0FFRztBQUNILFNBQVMsY0FBYyxDQUFDLEtBQVU7SUFDaEMsSUFBSSxDQUFDLEtBQUssSUFBSSxPQUFPLEtBQUssS0FBSyxRQUFRO1FBQUUsT0FBTyxLQUFLLENBQUM7SUFDdEQsK0ZBQStGO0lBQy9GLE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQztBQUVEOztHQUVHO0FBQ0gsTUFBTSxVQUFVLG9CQUFvQixDQUFDLEtBQVU7SUFDN0MsT0FBTyxLQUFLLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxJQUFJLEtBQUssQ0FBQyxhQUFhLENBQUMsQ0FBQztBQUNwRSxDQUFDO0FBdUNEOzs7OztHQUtHO0FBQ0gsTUFBTSxVQUFVLFFBQVEsQ0FBSSxPQUFVLEVBQUUsYUFBOEI7SUFDcEUsSUFBSSxDQUFDLGFBQWEsRUFBRTtRQUNsQixJQUFJLENBQUMsY0FBYyxDQUFDLE9BQU8sQ0FBQztZQUFFLE1BQU0sS0FBSyxFQUFFLENBQUM7UUFDNUMsYUFBYSxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7S0FDM0I7SUFFRCxPQUFPO1FBQ0wsQ0FBQyxhQUFhLENBQUMsRUFBRSxJQUFJO1FBQ3JCLElBQUksRUFBRSxPQUFPO1FBQ2IsYUFBYTtLQUNkLENBQUM7QUFDSixDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts deleted file mode 100644 index a39c08a0d40..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './node_connector.js'; -export * from './node_listener.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts.map deleted file mode 100644 index 1ea4d29d0e8..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.js deleted file mode 100644 index 07a86060aae..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './node_connector.js'; -export * from './node_listener.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L25vZGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLG9CQUFvQixDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts deleted file mode 100644 index b1d8890543c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { Worker } from 'worker_threads'; -import { Connector } from '../interface/connector.js'; -import { NodeConnectorSocket } from './node_connector_socket.js'; -/** - * Creates sockets backed by a Node worker. - */ -export declare class NodeConnector implements Connector { - private worker; - constructor(worker: Worker); - /** - * Creates a socket backed by a node worker. - * @returns The socket. - */ - createSocket(): Promise; -} -//# sourceMappingURL=node_connector.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts.map deleted file mode 100644 index 57ef4337f76..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node_connector.d.ts","sourceRoot":"","sources":["../../../src/transport/node/node_connector.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;GAEG;AACH,qBAAa,aAAc,YAAW,SAAS;IACjC,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAElC;;;OAGG;IACH,YAAY;CAGb"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.js deleted file mode 100644 index 2525dc38092..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector.js +++ /dev/null @@ -1,17 +0,0 @@ -import { NodeConnectorSocket } from './node_connector_socket.js'; -/** - * Creates sockets backed by a Node worker. - */ -export class NodeConnector { - constructor(worker) { - this.worker = worker; - } - /** - * Creates a socket backed by a node worker. - * @returns The socket. - */ - createSocket() { - return Promise.resolve(new NodeConnectorSocket(this.worker)); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9jb25uZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L25vZGUvbm9kZV9jb25uZWN0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFakU7O0dBRUc7QUFDSCxNQUFNLE9BQU8sYUFBYTtJQUN4QixZQUFvQixNQUFjO1FBQWQsV0FBTSxHQUFOLE1BQU0sQ0FBUTtJQUFHLENBQUM7SUFFdEM7OztPQUdHO0lBQ0gsWUFBWTtRQUNWLE9BQU8sT0FBTyxDQUFDLE9BQU8sQ0FBQyxJQUFJLG1CQUFtQixDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO0lBQy9ELENBQUM7Q0FDRiJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts deleted file mode 100644 index a87192030c2..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// -import { Worker } from 'worker_threads'; -import { Socket } from '../interface/socket.js'; -/** - * A socket implementation using a Node worker. - */ -export declare class NodeConnectorSocket implements Socket { - private worker; - constructor(worker: Worker); - /** - * Send a message. - * @param msg - The message. - * @param transfer - Objects to transfer ownership of. - * @returns A void promise. - */ - send(msg: any, transfer?: Transferable[]): Promise; - /** - * Register a message handler. - * @param cb - The handler function. - */ - registerHandler(cb: (msg: any) => any): void; - /** - * Remove all listeners from our worker. - */ - close(): void; -} -//# sourceMappingURL=node_connector_socket.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts.map deleted file mode 100644 index a7bbda3ff57..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node_connector_socket.d.ts","sourceRoot":"","sources":["../../../src/transport/node/node_connector_socket.ts"],"names":[],"mappings":";AAAA,OAAO,EAAoB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;GAEG;AACH,qBAAa,mBAAoB,YAAW,MAAM;IACpC,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAElC;;;;;OAKG;IACH,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,GAAE,YAAY,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5D;;;OAGG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI;IAI5C;;OAEG;IACH,KAAK;CAIN"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.js deleted file mode 100644 index 25eb2f34e28..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_connector_socket.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * A socket implementation using a Node worker. - */ -export class NodeConnectorSocket { - constructor(worker) { - this.worker = worker; - } - /** - * Send a message. - * @param msg - The message. - * @param transfer - Objects to transfer ownership of. - * @returns A void promise. - */ - send(msg, transfer = []) { - this.worker.postMessage(msg, transfer); - return Promise.resolve(); - } - /** - * Register a message handler. - * @param cb - The handler function. - */ - registerHandler(cb) { - this.worker.on('message', cb); - } - /** - * Remove all listeners from our worker. - */ - close() { - void this.send(undefined); - this.worker.removeAllListeners(); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9jb25uZWN0b3Jfc29ja2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3RyYW5zcG9ydC9ub2RlL25vZGVfY29ubmVjdG9yX3NvY2tldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQTs7R0FFRztBQUNILE1BQU0sT0FBTyxtQkFBbUI7SUFDOUIsWUFBb0IsTUFBYztRQUFkLFdBQU0sR0FBTixNQUFNLENBQVE7SUFBRyxDQUFDO0lBRXRDOzs7OztPQUtHO0lBQ0gsSUFBSSxDQUFDLEdBQVEsRUFBRSxXQUEyQixFQUFFO1FBQzFDLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLEdBQUcsRUFBRSxRQUE4QixDQUFDLENBQUM7UUFDN0QsT0FBTyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDM0IsQ0FBQztJQUVEOzs7T0FHRztJQUNILGVBQWUsQ0FBQyxFQUFxQjtRQUNuQyxJQUFJLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxTQUFTLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFDaEMsQ0FBQztJQUVEOztPQUVHO0lBQ0gsS0FBSztRQUNILEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUMxQixJQUFJLENBQUMsTUFBTSxDQUFDLGtCQUFrQixFQUFFLENBQUM7SUFDbkMsQ0FBQztDQUNGIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts deleted file mode 100644 index e9bf26a20ce..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/// -import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; -/** - * A socket listener that works with Node. - */ -export declare class NodeListener extends EventEmitter implements Listener { - constructor(); - /** - * Open the listener. - */ - open(): void; - /** - * Close the listener. - */ - close(): void; -} -//# sourceMappingURL=node_listener.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts.map deleted file mode 100644 index e15acee10b1..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node_listener.d.ts","sourceRoot":"","sources":["../../../src/transport/node/node_listener.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGpD;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAa,YAAW,QAAQ;;IAKhE;;OAEG;IACH,IAAI;IAIJ;;OAEG;IACH,KAAK;CACN"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.js deleted file mode 100644 index 318369699af..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener.js +++ /dev/null @@ -1,22 +0,0 @@ -import { parentPort } from 'worker_threads'; -import EventEmitter from 'events'; -import { NodeListenerSocket } from './node_listener_socket.js'; -/** - * A socket listener that works with Node. - */ -export class NodeListener extends EventEmitter { - constructor() { - super(); - } - /** - * Open the listener. - */ - open() { - this.emit('new_socket', new NodeListenerSocket(parentPort)); - } - /** - * Close the listener. - */ - close() { } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9saXN0ZW5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc3BvcnQvbm9kZS9ub2RlX2xpc3RlbmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM1QyxPQUFPLFlBQVksTUFBTSxRQUFRLENBQUM7QUFFbEMsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFL0Q7O0dBRUc7QUFDSCxNQUFNLE9BQU8sWUFBYSxTQUFRLFlBQVk7SUFDNUM7UUFDRSxLQUFLLEVBQUUsQ0FBQztJQUNWLENBQUM7SUFFRDs7T0FFRztJQUNILElBQUk7UUFDRixJQUFJLENBQUMsSUFBSSxDQUFDLFlBQVksRUFBRSxJQUFJLGtCQUFrQixDQUFDLFVBQWlCLENBQUMsQ0FBQyxDQUFDO0lBQ3JFLENBQUM7SUFFRDs7T0FFRztJQUNILEtBQUssS0FBSSxDQUFDO0NBQ1gifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts deleted file mode 100644 index ee114126deb..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// -import { MessagePort } from 'worker_threads'; -import { Socket } from '../interface/socket.js'; -/** - * An implementation of a TransportSocket using MessagePorts. - */ -export declare class NodeListenerSocket implements Socket { - private port; - constructor(port: MessagePort); - /** - * Send a message over this port. - * @param msg - The message. - * @param transfer - Transferable objects. - * @returns A void promise. - */ - send(msg: any, transfer?: Transferable[]): Promise; - /** - * Add a handler to this port. - * @param cb - The handler function. - */ - registerHandler(cb: (msg: any) => any): void; - /** - * Close this socket. - */ - close(): void; -} -//# sourceMappingURL=node_listener_socket.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts.map deleted file mode 100644 index 31986e0cd02..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node_listener_socket.d.ts","sourceRoot":"","sources":["../../../src/transport/node/node_listener_socket.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;;GAEG;AACH,qBAAa,kBAAmB,YAAW,MAAM;IACnC,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,WAAW;IAErC;;;;;OAKG;IACH,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,GAAE,YAAY,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5D;;;OAGG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,GAAG,IAAI;IAI5C;;OAEG;IACH,KAAK;CAKN"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.js deleted file mode 100644 index 483c51bc0ff..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/node/node_listener_socket.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * An implementation of a TransportSocket using MessagePorts. - */ -export class NodeListenerSocket { - constructor(port) { - this.port = port; - } - /** - * Send a message over this port. - * @param msg - The message. - * @param transfer - Transferable objects. - * @returns A void promise. - */ - send(msg, transfer = []) { - this.port.postMessage(msg, transfer); - return Promise.resolve(); - } - /** - * Add a handler to this port. - * @param cb - The handler function. - */ - registerHandler(cb) { - this.port.on('message', cb); - } - /** - * Close this socket. - */ - close() { - void this.send(undefined); - this.port.removeAllListeners(); - this.port.close(); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9saXN0ZW5lcl9zb2NrZXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdHJhbnNwb3J0L25vZGUvbm9kZV9saXN0ZW5lcl9zb2NrZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0E7O0dBRUc7QUFDSCxNQUFNLE9BQU8sa0JBQWtCO0lBQzdCLFlBQW9CLElBQWlCO1FBQWpCLFNBQUksR0FBSixJQUFJLENBQWE7SUFBRyxDQUFDO0lBRXpDOzs7OztPQUtHO0lBQ0gsSUFBSSxDQUFDLEdBQVEsRUFBRSxXQUEyQixFQUFFO1FBQzFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLEdBQUcsRUFBRSxRQUE4QixDQUFDLENBQUM7UUFDM0QsT0FBTyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDM0IsQ0FBQztJQUVEOzs7T0FHRztJQUNILGVBQWUsQ0FBQyxFQUFxQjtRQUNuQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxTQUFTLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFDOUIsQ0FBQztJQUVEOztPQUVHO0lBQ0gsS0FBSztRQUNILEtBQUssSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUMxQixJQUFJLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFLENBQUM7UUFDL0IsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUNwQixDQUFDO0NBQ0YifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts deleted file mode 100644 index a70ae9fea5e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/// -import EventEmitter from 'events'; -import { Connector } from './interface/connector.js'; -/** - * Augments the TransportClient class with more precise EventEmitter types. - */ -export interface TransportClient extends EventEmitter { - on(name: 'event_msg', handler: (payload: Payload) => void): this; - emit(name: 'event_msg', payload: Payload): boolean; -} -/** - * A TransportClient provides a request/response and event api to a corresponding TransportServer. - * If `broadcast` is called on TransportServer, TransportClients will emit an `event_msg`. - * The `request` method will block until a response is returned from the TransportServer's dispatch function. - * Request multiplexing is supported. - */ -export declare class TransportClient extends EventEmitter { - private transportConnect; - private msgId; - private pendingRequests; - private socket?; - constructor(transportConnect: Connector); - /** - * Create and register our socket using our Connector. - */ - open(): Promise; - /** - * Close this and stop listening for messages. - */ - close(): void; - /** - * Queue a request. - * @param payload - The request payload. - * @param transfer - Objects to transfer ownership of. - * @returns A promise of the query result. - */ - request(payload: Payload, transfer?: Transferable[]): Promise; - /** - * Handle an incoming socket message. - * @param msg - The message. - */ - private handleSocketMessage; -} -//# sourceMappingURL=transport_client.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts.map deleted file mode 100644 index 9d6db62d26d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport_client.d.ts","sourceRoot":"","sources":["../../src/transport/transport_client.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAiBrD;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,OAAO,CAAE,SAAQ,YAAY;IAC5D,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;IACjE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC;CACpD;AAED;;;;;GAKG;AACH,qBAAa,eAAe,CAAC,OAAO,CAAE,SAAQ,YAAY;IAK5C,OAAO,CAAC,gBAAgB;IAJpC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEJ,gBAAgB,EAAE,SAAS;IAI/C;;OAEG;IACG,IAAI;IAKV;;OAEG;IACH,KAAK;IAML;;;;;OAKG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE;IAanD;;;OAGG;IACH,OAAO,CAAC,mBAAmB;CAsB5B"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.js deleted file mode 100644 index fa875f15109..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_client.js +++ /dev/null @@ -1,80 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; -import EventEmitter from "events"; -import { isEventMessage } from "./dispatch/messages.js"; -const debug = createDebugLogger("aztec:transport_client"); -/** - * A TransportClient provides a request/response and event api to a corresponding TransportServer. - * If `broadcast` is called on TransportServer, TransportClients will emit an `event_msg`. - * The `request` method will block until a response is returned from the TransportServer's dispatch function. - * Request multiplexing is supported. - */ -export class TransportClient extends EventEmitter { - constructor(transportConnect) { - super(); - this.transportConnect = transportConnect; - this.msgId = 0; - this.pendingRequests = []; - } - /** - * Create and register our socket using our Connector. - */ - async open() { - this.socket = await this.transportConnect.createSocket(); - this.socket.registerHandler((msg) => this.handleSocketMessage(msg)); - } - /** - * Close this and stop listening for messages. - */ - close() { - this.socket?.close(); - this.socket = undefined; - this.removeAllListeners(); - } - /** - * Queue a request. - * @param payload - The request payload. - * @param transfer - Objects to transfer ownership of. - * @returns A promise of the query result. - */ - request(payload, transfer) { - if (!this.socket) { - throw new Error("Socket not open."); - } - const msgId = this.msgId++; - const msg = { msgId, payload }; - debug(`->`, msg); - return new Promise((resolve, reject) => { - this.pendingRequests.push({ resolve, reject, msgId }); - this.socket.send(msg, transfer).catch(reject); - }); - } - /** - * Handle an incoming socket message. - * @param msg - The message. - */ - handleSocketMessage(msg) { - if (msg === undefined) { - // The remote socket closed. - this.close(); - return; - } - debug(`<-`, msg); - if (isEventMessage(msg)) { - this.emit("event_msg", msg.payload); - return; - } - const reqIndex = this.pendingRequests.findIndex( - (r) => r.msgId === msg.msgId - ); - if (reqIndex === -1) { - return; - } - const [pending] = this.pendingRequests.splice(reqIndex, 1); - if (msg.error) { - pending.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Y0FBYyxDQUFDLEdBQUcsQ0FBQyxFQUFFO1lBQ3ZCLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztZQUNwQyxPQUFPO1NBQ1I7UUFDRCxNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsZUFBZSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLEtBQUssR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzVFLElBQUksUUFBUSxLQUFLLENBQUMsQ0FBQyxFQUFFO1lBQ25CLE9BQU87U0FDUjtRQUNELE1BQU0sQ0FBQyxPQUFPLENBQUMsR0FBRyxJQUFJLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFDLENBQUM7UUFDM0QsSUFBSSxHQUFHLENBQUMsS0FBSyxFQUFFO1lBQ2IsT0FBTyxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztTQUN0QzthQUFNO1lBQ0wsT0FBTyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7U0FDOUI7SUFDSCxDQUFDO0NBQ0YifQ== diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts deleted file mode 100644 index 109e9210f8b..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Listener } from './interface/listener.js'; -/** - * Keeps track of clients, providing a broadcast, and request/response api with multiplexing. - */ -export declare class TransportServer { - private listener; - private msgHandlerFn; - private sockets; - constructor(listener: Listener, msgHandlerFn: (msg: Payload) => Promise); - /** - * Start accepting new connections. - */ - start(): void; - /** - * Stops accepting new connections. It doesn't close existing sockets. - * It's expected the clients will gracefully complete by closing their end, sending an `undefined` message. - */ - stop(): void; - /** - * Broadcast a message. - * @param msg - The message. - */ - broadcast(msg: Payload): Promise; - /** - * New socket registration. - * @param socket - The socket to register. - */ - private handleNewSocket; - /** - * Detect the 'transferables' argument to our socket from our message - * handler return type. - * @param data - The return object. - * @returns - The data and the. - */ - private getPayloadAndTransfers; - /** - * Handles a socket message from a listener. - * @param socket - The socket. - * @param requestMessage - The message to handle. - * @returns The socket response. - */ - private handleSocketMessage; -} -//# sourceMappingURL=transport_server.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts.map deleted file mode 100644 index 103804f9808..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transport_server.d.ts","sourceRoot":"","sources":["../../src/transport/transport_server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD;;GAEG;AACH,qBAAa,eAAe,CAAC,OAAO;IAGtB,OAAO,CAAC,QAAQ;IAAY,OAAO,CAAC,YAAY;IAF5D,OAAO,CAAC,OAAO,CAAgB;gBAEX,QAAQ,EAAE,QAAQ,EAAU,YAAY,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,GAAG,CAAC;IAE5F;;OAEG;IACH,KAAK;IAKL;;;OAGG;IACH,IAAI;IAIJ;;;OAGG;IACG,SAAS,CAAC,GAAG,EAAE,OAAO;IAI5B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAcvB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAe9B;;;;;OAKG;YACW,mBAAmB;CAalC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.js b/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.js deleted file mode 100644 index b1865345fc4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/transport/transport_server.js +++ /dev/null @@ -1,89 +0,0 @@ -import { isTransferDescriptor } from './interface/transferable.js'; -/** - * Keeps track of clients, providing a broadcast, and request/response api with multiplexing. - */ -export class TransportServer { - constructor(listener, msgHandlerFn) { - this.listener = listener; - this.msgHandlerFn = msgHandlerFn; - this.sockets = []; - } - /** - * Start accepting new connections. - */ - start() { - this.listener.on('new_socket', client => this.handleNewSocket(client)); - this.listener.open(); - } - /** - * Stops accepting new connections. It doesn't close existing sockets. - * It's expected the clients will gracefully complete by closing their end, sending an `undefined` message. - */ - stop() { - this.listener.close(); - } - /** - * Broadcast a message. - * @param msg - The message. - */ - async broadcast(msg) { - await Promise.all(this.sockets.map(s => s.send({ payload: msg }))); - } - /** - * New socket registration. - * @param socket - The socket to register. - */ - handleNewSocket(socket) { - socket.registerHandler(async (msg) => { - if (msg === undefined) { - // Client socket has closed. Remove it from the list of sockets. Call close on it for any cleanup. - const socketIndex = this.sockets.findIndex(s => s === socket); - const [closingSocket] = this.sockets.splice(socketIndex, 1); - closingSocket.close(); - return; - } - return await this.handleSocketMessage(socket, msg); - }); - this.sockets.push(socket); - } - /** - * Detect the 'transferables' argument to our socket from our message - * handler return type. - * @param data - The return object. - * @returns - The data and the. - */ - getPayloadAndTransfers(data) { - if (isTransferDescriptor(data)) { - // We treat PayloadWithTransfers specially so that we're able to - // attach transferables while keeping a simple return-type based usage - return [data.send, data.transferables]; - } - if (data instanceof Uint8Array) { - // We may want to devise a better solution to this. We maybe given a view over a non cloneable/transferrable - // ArrayBuffer (such as a view over wasm memory). In this case we want to take a copy, and then transfer it. - const respPayload = data instanceof Uint8Array && ArrayBuffer.isView(data) ? new Uint8Array(data) : data; - const transferables = data instanceof Uint8Array ? [respPayload.buffer] : []; - return [respPayload, transferables]; - } - return [data, []]; - } - /** - * Handles a socket message from a listener. - * @param socket - The socket. - * @param requestMessage - The message to handle. - * @returns The socket response. - */ - async handleSocketMessage(socket, { msgId, payload }) { - try { - const data = await this.msgHandlerFn(payload); - const [respPayload, transferables] = this.getPayloadAndTransfers(data); - const rep = { msgId, payload: respPayload }; - await socket.send(rep, transferables); - } - catch (err) { - const rep = { msgId, error: err.stack }; - await socket.send(rep); - } - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNwb3J0X3NlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmFuc3BvcnQvdHJhbnNwb3J0X3NlcnZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVuRTs7R0FFRztBQUNILE1BQU0sT0FBTyxlQUFlO0lBRzFCLFlBQW9CLFFBQWtCLEVBQVUsWUFBNEM7UUFBeEUsYUFBUSxHQUFSLFFBQVEsQ0FBVTtRQUFVLGlCQUFZLEdBQVosWUFBWSxDQUFnQztRQUZwRixZQUFPLEdBQWEsRUFBRSxDQUFDO0lBRWdFLENBQUM7SUFFaEc7O09BRUc7SUFDSCxLQUFLO1FBQ0gsSUFBSSxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsWUFBWSxFQUFFLE1BQU0sQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1FBQ3ZFLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDdkIsQ0FBQztJQUVEOzs7T0FHRztJQUNILElBQUk7UUFDRixJQUFJLENBQUMsUUFBUSxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQ3hCLENBQUM7SUFFRDs7O09BR0c7SUFDSCxLQUFLLENBQUMsU0FBUyxDQUFDLEdBQVk7UUFDMUIsTUFBT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ZDO1FBQUMsT0FBTyxHQUFRLEVBQUU7WUFDakIsTUFBTSxHQUFHLEdBQTZCLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxHQUFHLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDbEUsTUFBTSxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO1NBQ3hCO0lBQ0gsQ0FBQztDQUNGIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts deleted file mode 100644 index e466ea48760..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { WasmModule } from "./wasm_module.js"; -/** - * The state of an asynchronous WASM function. - */ -export interface AsyncFnState { - /** - * Is this a contination? - */ - continuation: boolean; - /** - * A result, if one exists. - */ - result?: any; -} -/** - * To enable asynchronous callbacks from wasm to js, we leverage asyncify. - * Https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html. - * - * This class holds state and logic specific to handling async calls from wasm to js. - * A single instance of this class is instantiated as part of BarretenbergWasm. - * It allocates some memory for the asyncify stack data and initialises it. - * - * To make an async call into the wasm, just call `call` the same as in BarretenbergWasm, only it returns a promise. - * - * To make an async import that will be called from the wasm, wrap a function with the signature: - * my_func(state: AsyncFnState, ...args) - * with a call to `wrapImportFn`. - * The arguments are whatever the original call arguments were. The addition of AsyncFnState as the first argument - * allows for the detection of wether the function is continuing after the the async call has completed. - * If `state.continuation` is false, the function should start its async operation and return the promise. - * If `state.continuation` is true, the function can get the result from `state.result` perform any finalisation, - * and return an (optional) value to the wasm. - */ -export declare class AsyncCallState { - private ASYNCIFY_DATA_SIZE; - private asyncifyDataAddr; - private asyncPromise?; - private wasm; - private state?; - private callExport; - /** - * Initialize the call hooks with a WasmModule. - * @param wasm - The module. - */ - init(wasm: WasmModule): void; - /** - * Log a message. - * @param args - The message arguments. - */ - private debug; - /** - * Free the data associated with async call states. - */ - destroy(): void; - /** - * We call the wasm function, that will in turn call back into js via callImport and set this.asyncPromise and - * enable the instrumented "record stack unwinding" code path. - * Once the stack has unwound out of the wasm call, we enter into a loop of resolving the promise set in the call - * to callImport, and calling back into the wasm to rewind the stack and continue execution. - * @param name - The function name. - * @param args - The function args. - * @returns The function result. - */ - call(name: string, ...args: any): Promise; - /** - * Wrap a WASM import function. - * @param fn - The function. - * @returns A wrapped version with asyncify calls. - */ - wrapImportFn( - fn: (state: AsyncFnState, ...args: any[]) => any - ): (...args: any[]) => any; -} -//# sourceMappingURL=async_call_state.d.ts.map diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts.map deleted file mode 100644 index ae4697ced4c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async_call_state.d.ts","sourceRoot":"","sources":["../../src/wasm/async_call_state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,gBAAgB,CAAU;IAClC,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,KAAK,CAAC,CAAe;IAC7B,OAAO,CAAC,UAAU,CAA8B;IAEhD;;;OAGG;IACI,IAAI,CAAC,IAAI,EAAE,UAAU;IAY5B;;;OAGG;IACH,OAAO,CAAC,KAAK;IAIb;;OAEG;IACI,OAAO;IAKd;;;;;;;;OAQG;IACU,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG;IA2B5C;;;;OAIG;IACI,YAAY,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,aACjD,GAAG,EAAE;CAkBzB"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.js b/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.js deleted file mode 100644 index b24bb8432f6..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/async_call_state.js +++ /dev/null @@ -1,111 +0,0 @@ -/** - * To enable asynchronous callbacks from wasm to js, we leverage asyncify. - * Https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html. - * - * This class holds state and logic specific to handling async calls from wasm to js. - * A single instance of this class is instantiated as part of BarretenbergWasm. - * It allocates some memory for the asyncify stack data and initialises it. - * - * To make an async call into the wasm, just call `call` the same as in BarretenbergWasm, only it returns a promise. - * - * To make an async import that will be called from the wasm, wrap a function with the signature: - * my_func(state: AsyncFnState, ...args) - * with a call to `wrapImportFn`. - * The arguments are whatever the original call arguments were. The addition of AsyncFnState as the first argument - * allows for the detection of wether the function is continuing after the the async call has completed. - * If `state.continuation` is false, the function should start its async operation and return the promise. - * If `state.continuation` is true, the function can get the result from `state.result` perform any finalisation, - * and return an (optional) value to the wasm. - */ -export class AsyncCallState { - constructor() { - this.ASYNCIFY_DATA_SIZE = 16 * 1024; - } - /** - * Initialize the call hooks with a WasmModule. - * @param wasm - The module. - */ - init(wasm) { - this.wasm = wasm; - this.callExport = (name, ...args) => wasm.call(name, ...args); - // Allocate memory for asyncify stack data. - this.asyncifyDataAddr = this.callExport('bbmalloc', this.ASYNCIFY_DATA_SIZE); - // TODO: is this view construction problematic like in WasmModule? - const view = new Uint32Array(wasm.getRawMemory().buffer); - // First two integers of asyncify data, are the start and end of the stack region. - view[this.asyncifyDataAddr >> 2] = this.asyncifyDataAddr + 8; - view[(this.asyncifyDataAddr + 4) >> 2] = this.asyncifyDataAddr + this.ASYNCIFY_DATA_SIZE; - } - /** - * Log a message. - * @param args - The message arguments. - */ - debug(...args) { - this.wasm.getLogger()(...args); - } - /** - * Free the data associated with async call states. - */ - destroy() { - // Free call stack data. - this.callExport('bbfree', this.asyncifyDataAddr); - } - /** - * We call the wasm function, that will in turn call back into js via callImport and set this.asyncPromise and - * enable the instrumented "record stack unwinding" code path. - * Once the stack has unwound out of the wasm call, we enter into a loop of resolving the promise set in the call - * to callImport, and calling back into the wasm to rewind the stack and continue execution. - * @param name - The function name. - * @param args - The function args. - * @returns The function result. - */ - async call(name, ...args) { - if (this.state) { - throw new Error(`Can only handle one async call at a time: ${name}(${args})`); - } - this.state = { continuation: false }; - let result = this.callExport(name, ...args); - while (this.asyncPromise) { - // Disable the instrumented "record stack unwinding" code path. - this.callExport('asyncify_stop_unwind'); - this.debug('stack unwound.'); - // Wait for the async work to complete. - this.state.result = await this.asyncPromise; - this.state.continuation = true; - this.debug('result set starting rewind.'); - // Enable "stack rewinding" code path. - this.callExport('asyncify_start_rewind', this.asyncifyDataAddr); - // Call function again to rebuild the stack, and continue where we left off. - result = this.callExport(name, ...args); - } - // Cleanup - this.state = undefined; - return result; - } - /** - * Wrap a WASM import function. - * @param fn - The function. - * @returns A wrapped version with asyncify calls. - */ - wrapImportFn(fn) { - return (...args) => { - if (!this.asyncPromise) { - // We are in the normal code path. Start the async fetch of data. - this.asyncPromise = fn(this.state, ...args); - // Enable "record stack unwinding" code path and return. - this.callExport('asyncify_start_unwind', this.asyncifyDataAddr); - } - else { - // We are in the stack rewind code path, called once the promise is resolved. - // Save the result data back to the wasm, disable stack rewind code paths, and return. - this.callExport('asyncify_stop_rewind'); - const result = fn(this.state, ...args); - // Cleanup. - this.asyncPromise = undefined; - this.state = { continuation: false }; - return result; - } - }; - } -} -//# sourceMappingURL=data:application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RyxTQUFTLENBQUM7Z0JBQzlCLElBQUksQ0FBQyxLQUFLLEdBQUcsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLENBQUM7Z0JBQ3JDLE9BQU8sTUFBTSxDQUFDO2FBQ2Y7UUFDSCxDQUFDLENBQUM7SUFDSixDQUFDO0NBQ0YifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts deleted file mode 100644 index 8409a7022b6..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Dummy implementation of a necessary part of the wasi api: - * https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md - * We don't use these functions, but the environment expects them. - * TODO find a way to update off of wasi 12. - */ -export declare const getEmptyWasiSdk: ( - debug?: import("@aztec/foundation").DebugLogger -) => { - clock_time_get(): void; - environ_get(): void; - environ_sizes_get(): void; - fd_close(): void; - fd_read(): void; - fd_write(): void; - fd_seek(): void; - fd_fdstat_get(): void; - fd_fdstat_set_flags(): void; - fd_prestat_get(): number; - fd_prestat_dir_name(): number; - path_open(): void; - path_filestat_get(): void; - proc_exit(): number; - random_get(): number; -}; -//# sourceMappingURL=empty_wasi_sdk.d.ts.map diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts.map deleted file mode 100644 index 961a206c39f..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"empty_wasi_sdk.d.ts","sourceRoot":"","sources":["../../src/wasm/empty_wasi_sdk.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAGH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;CAkD1B,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.js b/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.js deleted file mode 100644 index 27f7a6436d2..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/empty_wasi_sdk.js +++ /dev/null @@ -1,63 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; -/** - * Dummy implementation of a necessary part of the wasi api: - * https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md - * We don't use these functions, but the environment expects them. - * TODO find a way to update off of wasi 12. - */ -/* eslint-disable camelcase */ -/* eslint-disable jsdoc/require-jsdoc */ -export const getEmptyWasiSdk = ( - debug = createDebugLogger("wasm:empty_wasi_sdk") -) => ({ - clock_time_get() { - debug("clock_time_get"); - }, - environ_get() { - debug("environ_get"); - }, - environ_sizes_get() { - debug("environ_sizes_get"); - }, - fd_close() { - debug("fd_close"); - }, - fd_read() { - debug("fd_read"); - }, - fd_write() { - debug("fd_write"); - }, - fd_seek() { - debug("fd_seek"); - }, - fd_fdstat_get() { - debug("fd_fdstat_get"); - }, - fd_fdstat_set_flags() { - debug("fd_fdstat_set_flags"); - }, - fd_prestat_get() { - debug("fd_prestat_get"); - return 8; - }, - fd_prestat_dir_name() { - debug("fd_prestat_dir_name"); - return 28; - }, - path_open() { - debug("path_open"); - }, - path_filestat_get() { - debug("path_filestat_get"); - }, - proc_exit() { - debug("proc_exit"); - return 52; - }, - random_get() { - debug("random_get"); - return 1; - }, -}); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1wdHlfd2FzaV9zZGsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd2FzbS9lbXB0eV93YXNpX3Nkay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUF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BQVcsQ0FBQyxDQUFDO0lBQ3JCLENBQUM7SUFDRCxpQkFBaUI7UUFDZixLQUFLLENBQUMsbUJBQW1CLENBQUMsQ0FBQztJQUM3QixDQUFDO0lBQ0QsU0FBUztRQUNQLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUNuQixPQUFPLEVBQUUsQ0FBQztJQUNaLENBQUM7SUFDRCxVQUFVO1FBQ1IsS0FBSyxDQUFDLFlBQVksQ0FBQyxDQUFDO1FBQ3BCLE9BQU8sQ0FBQyxDQUFDO0lBQ1gsQ0FBQztDQUNGLENBQUMsQ0FBQyJ9 diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts deleted file mode 100644 index 1247c354830..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { AsyncCallState, AsyncFnState } from './async_call_state.js'; -export { WasmModule } from './wasm_module.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts.map deleted file mode 100644 index e4a88cedea0..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wasm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.js b/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.js deleted file mode 100644 index 8c9ce830550..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { AsyncCallState } from './async_call_state.js'; -export { WasmModule } from './wasm_module.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd2FzbS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFnQixNQUFNLHVCQUF1QixDQUFDO0FBQ3JFLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQyJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts deleted file mode 100644 index f46e4ec6577..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -/// -import { Buffer } from "buffer"; -/** - * WasmModule: - * Helper over a webassembly module. - * Assumes a few quirks. - * 1) the module expects wasi_snapshot_preview1 with the methods from getEmptyWasiSdk - * 2) of which the webassembly - * we instantiate only uses random_get (update this if more WASI sdk methods are needed). - */ -export declare class WasmModule { - private module; - private importFn; - private memory; - private heap; - private instance?; - private mutexQ; - private debug; - /** - * Create a wasm module. Should be followed by await init();. - * @param module - The module as a WebAssembly.Module or a Buffer. - * @param importFn - Imports expected by the WASM. - * @param loggerName - Optional, for debug logging. - */ - constructor( - module: WebAssembly.Module | Buffer, - importFn: (module: WasmModule) => any, - loggerName?: string - ); - /** - * Return the wasm source. - * @returns The source. - */ - getModule(): WebAssembly.Module | Buffer; - /** - * Initialize this wasm module. - * @param wasmImportEnv - Linked to a module called "env". Functions implementations referenced from e.g. C++. - * @param initial - 20 pages by default. 20*2**16 \> 1mb stack size plus other overheads. - * @param maximum - 8192 maximum by default. 512mb. - */ - init(initial?: number, maximum?: number): Promise; - /** - * The methods or objects exported by the WASM module. - * @returns An indexable object. - */ - exports(): any; - /** - * Get the current logger. - * @returns Logging function. - */ - getLogger(): any; - /** - * Add a logger. - * @param logger - Function to call when logging. - */ - addLogger(logger: any): void; - /** - * Calls into the WebAssembly. - * @param name - The method name. - * @param args - The arguments to the method. - * @returns The numeric method result. - */ - call(name: string, ...args: any): number; - /** - * Get the memory used by the WASM module. - * @returns A WebAssembly memory object. - */ - getRawMemory(): WebAssembly.Memory; - /** - * Get the memory used by the WASM module, as a byte array. - * @returns A Uint8Array view of the WASM module memory. - */ - getMemory(): Uint8Array; - /** - * The memory size in bytes. - * @returns Number of bytes. - */ - memSize(): number; - /** - * Get a slice of memory between two addresses. - * @param start - The start address. - * @param end - The end address. - * @returns A Uint8Array view of memory. - */ - getMemorySlice(start: number, end: number): Uint8Array; - /** - * Write data into the heap. - * @param offset - The address to write data at. - * @param arr - The data to write. - */ - writeMemory(offset: number, arr: Uint8Array): void; - /** - * Read WASM memory as a JS string. - * @param addr - The memory address. - * @returns A JS string. - */ - getMemoryAsString(addr: number): string; - /** - * When calling the wasm, sometimes a caller will require exclusive access over a series of calls. - * E.g. When a result is written to address 0, one cannot have another caller writing to the same address via - * writeMemory before the result is read via sliceMemory. - * Acquire() gets a single token from a fifo. The caller must call release() to add the token back. - */ - acquire(): Promise; - /** - * Release the mutex, letting another promise call acquire(). - */ - release(): void; -} -//# sourceMappingURL=wasm_module.d.ts.map diff --git a/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts.map deleted file mode 100644 index 2b5649b9d51..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wasm_module.d.ts","sourceRoot":"","sources":["../../src/wasm/wasm_module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,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n-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.js deleted file mode 100644 index 852044bfd4d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/wasm/wasm_module.js +++ /dev/null @@ -1,206 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; -import { Buffer } from "buffer"; -import { MemoryFifo } from "../memory_fifo.js"; -import { getEmptyWasiSdk } from "./empty_wasi_sdk.js"; -import { randomBytes } from "crypto"; -/** - * WasmModule: - * Helper over a webassembly module. - * Assumes a few quirks. - * 1) the module expects wasi_snapshot_preview1 with the methods from getEmptyWasiSdk - * 2) of which the webassembly - * we instantiate only uses random_get (update this if more WASI sdk methods are needed). - */ -export class WasmModule { - /** - * Create a wasm module. Should be followed by await init();. - * @param module - The module as a WebAssembly.Module or a Buffer. - * @param importFn - Imports expected by the WASM. - * @param loggerName - Optional, for debug logging. - */ - constructor(module, importFn, loggerName = "wasm") { - this.module = module; - this.importFn = importFn; - this.mutexQ = new MemoryFifo(); - this.debug = createDebugLogger(loggerName); - this.mutexQ.put(true); - } - /** - * Return the wasm source. - * @returns The source. - */ - getModule() { - return this.module; - } - /** - * Initialize this wasm module. - * @param wasmImportEnv - Linked to a module called "env". Functions implementations referenced from e.g. C++. - * @param initial - 20 pages by default. 20*2**16 \> 1mb stack size plus other overheads. - * @param maximum - 8192 maximum by default. 512mb. - */ - async init(initial = 20, maximum = 8192) { - this.debug( - `initial mem: ${initial} pages, ${ - (initial * 2 ** 16) / (1024 * 1024) - }mb. max mem: ${maximum} pages, ${(maximum * 2 ** 16) / (1024 * 1024)}mb` - ); - this.memory = new WebAssembly.Memory({ initial, maximum }); - // Create a view over the memory buffer. - // We do this once here, as webkit *seems* bugged out and actually shows this as new memory, - // thus displaying double. It's only worse if we create views on demand. I haven't established yet if - // the bug is also exasperating the termination on mobile due to "excessive memory usage". It could be - // that the OS is actually getting an incorrect reading in the same way the memory profiler does... - // The view will have to be recreated if the memory is grown. See getMemory(). - this.heap = new Uint8Array(this.memory.buffer); - // We support the wasi 12 SDK, but only implement random_get - /* eslint-disable camelcase */ - const importObj = { - wasi_snapshot_preview1: { - ...getEmptyWasiSdk(this.debug), - random_get: (arr, length) => { - arr = arr >>> 0; - const heap = this.getMemory(); - const randomData = randomBytes(length); - for (let i = arr; i < arr + length; ++i) { - heap[i] = randomData[i - arr]; - } - }, - }, - env: this.importFn(this), - }; - if (this.module instanceof WebAssembly.Module) { - this.instance = await WebAssembly.instantiate(this.module, importObj); - } else { - const { instance } = await WebAssembly.instantiate( - this.module, - importObj - ); - this.instance = instance; - } - } - /** - * The methods or objects exported by the WASM module. - * @returns An indexable object. - */ - exports() { - if (!this.instance) { - throw new Error("WasmModule: not initialized!"); - } - return this.instance.exports; - } - /** - * Get the current logger. - * @returns Logging function. - */ - getLogger() { - return this.debug; - } - /** - * Add a logger. - * @param logger - Function to call when logging. - */ - addLogger(logger) { - const oldDebug = this.debug; - this.debug = (...args) => { - logger(...args); - oldDebug(...args); - }; - } - /** - * Calls into the WebAssembly. - * @param name - The method name. - * @param args - The arguments to the method. - * @returns The numeric method result. - */ - call(name, ...args) { - if (!this.exports()[name]) { - throw new Error(`WASM function ${name} not found.`); - } - try { - // When returning values from the WASM, use >>> operator to convert - // signed representation to unsigned representation. - return this.exports()[name](...args) >>> 0; - } catch (err) { - const message = `WASM function ${name} aborted, error: ${err}`; - this.debug(message); - this.debug(err.stack); - throw new Error(message); - } - } - /** - * Get the memory used by the WASM module. - * @returns A WebAssembly memory object. - */ - getRawMemory() { - return this.memory; - } - /** - * Get the memory used by the WASM module, as a byte array. - * @returns A Uint8Array view of the WASM module memory. - */ - getMemory() { - // If the memory is grown, our view over it will be lost. Recreate the view. - if (this.heap.length === 0) { - this.heap = new Uint8Array(this.memory.buffer); - } - return this.heap; - } - /** - * The memory size in bytes. - * @returns Number of bytes. - */ - memSize() { - return this.getMemory().length; - } - /** - * Get a slice of memory between two addresses. - * @param start - The start address. - * @param end - The end address. - * @returns A Uint8Array view of memory. - */ - getMemorySlice(start, end) { - return this.getMemory().slice(start, end); - } - /** - * Write data into the heap. - * @param offset - The address to write data at. - * @param arr - The data to write. - */ - writeMemory(offset, arr) { - const mem = this.getMemory(); - for (let i = 0; i < arr.length; i++) { - mem[i + offset] = arr[i]; - } - } - /** - * Read WASM memory as a JS string. - * @param addr - The memory address. - * @returns A JS string. - */ - getMemoryAsString(addr) { - addr = addr >>> 0; - const m = this.getMemory(); - let i = addr; - for (; m[i] !== 0; ++i); - return Buffer.from(m.slice(addr, i)).toString("ascii"); - } - /** - * When calling the wasm, sometimes a caller will require exclusive access over a series of calls. - * E.g. When a result is written to address 0, one cannot have another caller writing to the same address via - * writeMemory before the result is read via sliceMemory. - * Acquire() gets a single token from a fifo. The caller must call release() to add the token back. - */ - async acquire() { - await this.mutexQ.get(); - } - /** - * Release the mutex, letting another promise call acquire(). - */ - release() { - if (this.mutexQ.length() !== 0) { - throw new Error("Release called but not acquired."); - } - this.mutexQ.put(true); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FzbV9tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd2FzbS93YXNtX21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQWUsTUFBTSxZQUFZLENBQUM7QUFDNUQsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUNoQyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDL0MsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3RELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxRQUFRLENBQUM7QUFFckM7Ozs7Ozs7R0FPRztBQUNILE1BQU0sT0FBTyxVQUFVO0lBT3JCOzs7OztPQUtHO0lBQ0gsWUFDVSx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n-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts deleted file mode 100644 index 5d25ae688b9..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './web_worker.js'; -export * from './web_data_store.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts.map deleted file mode 100644 index c27488b261d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/worker/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.js deleted file mode 100644 index 769c36e8a11..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './web_worker.js'; -export * from './web_data_store.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvd29ya2VyL2Jyb3dzZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLHFCQUFxQixDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts deleted file mode 100644 index 64305a49267..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { WasmModule } from '../../wasm/wasm_module.js'; -/** - * Start the transport server corresponding to this module. - * @param module - The WasmModule to host. - */ -export declare function startWebModule(module: WasmModule): void; -//# sourceMappingURL=start_web_module.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts.map deleted file mode 100644 index 236d51eb892..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"start_web_module.d.ts","sourceRoot":"","sources":["../../../src/worker/browser/start_web_module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,QAehD"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.js deleted file mode 100644 index 107b51c3517..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/start_web_module.js +++ /dev/null @@ -1,22 +0,0 @@ -import { TransportServer, WorkerListener } from '../../transport/index.js'; -/** - * Start the transport server corresponding to this module. - * @param module - The WasmModule to host. - */ -export function startWebModule(module) { - const dispatch = async ({ fn, args }) => { - if (fn === '__destroyWorker__') { - transportServer.stop(); - return; - } - if (!module[fn]) { - throw new Error(`dispatch error, function not found: ${fn}`); - } - return await module[fn](...args); - }; - const transportListener = new WorkerListener(self); - const transportServer = new TransportServer(transportListener, dispatch); - module.addLogger((...args) => transportServer.broadcast({ fn: 'emit', args: ['log', ...args] })); - transportServer.start(); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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BQyxLQUFLLEVBQUUsR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUN4RyxlQUFlLENBQUMsS0FBSyxFQUFFLENBQUM7QUFDMUIsQ0FBQyJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts deleted file mode 100644 index 9b5ab4853d9..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { DataStore } from '../data_store.js'; -/** - * Cache for data used by wasm module. - * Stores in a LevelUp database. - */ -export declare class WebDataStore implements DataStore { - private db; - constructor(); - /** - * Lookup a key. - * @param key - Key to lookup. - * @returns The buffer. - */ - get(key: string): Promise; - /** - * Alter a key. - * @param key - Key to alter. - * @param value - Buffer to store. - */ - set(key: string, value: Buffer): Promise; -} -//# sourceMappingURL=web_data_store.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts.map deleted file mode 100644 index b786d902360..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"web_data_store.d.ts","sourceRoot":"","sources":["../../../src/worker/browser/web_data_store.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;GAGG;AACH,qBAAa,YAAa,YAAW,SAAS;IAC5C,OAAO,CAAC,EAAE,CAAU;;IAUpB;;;;OAIG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAInD;;;;OAIG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrD"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.js deleted file mode 100644 index 49f7cd14172..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_data_store.js +++ /dev/null @@ -1,32 +0,0 @@ -import levelup from 'levelup'; -import memdown from 'memdown'; -/** - * Cache for data used by wasm module. - * Stores in a LevelUp database. - */ -export class WebDataStore { - constructor() { - // TODO: The whole point of this is to reduce memory load in the browser. - // Replace with leveljs so the data is stored in indexeddb and not in memory. - // Hack: Cast as any to work around package "broken" with node16 resolution - // See https://github.com/microsoft/TypeScript/issues/49160 - this.db = levelup(memdown()); - } - /** - * Lookup a key. - * @param key - Key to lookup. - * @returns The buffer. - */ - async get(key) { - return await this.db.get(key).catch(() => { }); - } - /** - * Alter a key. - * @param key - Key to alter. - * @param value - Buffer to store. - */ - async set(key, value) { - await this.db.put(key, value); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2ViX2RhdGFfc3RvcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvd29ya2VyL2Jyb3dzZXIvd2ViX2RhdGFfc3RvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxPQUFvQixNQUFNLFNBQVMsQ0FBQztBQUMzQyxPQUFPLE9BQU8sTUFBTSxTQUFTLENBQUM7QUFFOUI7OztHQUdHO0FBQ0gsTUFBTSxPQUFPLFlBQVk7SUFHdkI7UUFDRSx5RUFBeUU7UUFDekUsNkVBQTZFO1FBQzdFLDJFQUEyRTtRQUMzRSwyREFBMkQ7UUFDM0QsSUFBSSxDQUFDLEVBQUUsR0FBRyxPQUFPLENBQUUsT0FBZSxFQUFFLENBQUMsQ0FBQztJQUN4QyxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNILEtBQUssQ0FBQyxHQUFHLENBQUMsR0FBVztRQUNuQixPQUFPLE1BQU0sSUFBSSxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsS0FBSyxDQUFDLEdBQUcsRUFBRSxHQUFFLENBQUMsQ0FBQyxDQUFDO0lBQ2hELENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsS0FBSyxDQUFDLEdBQUcsQ0FBQyxHQUFXLEVBQUUsS0FBYTtRQUNsQyxNQUFNLElBQUksQ0FBQyxFQUFFLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQztJQUNoQyxDQUFDO0NBQ0YifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts deleted file mode 100644 index 45cdef0a245..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { WasmWorker } from '../wasm_worker.js'; -/** - * Instantiate a web worker. - * @param url - The URL. - * @param initialMem - Initial memory pages. - * @param maxMem - Maximum memory pages. - * @returns The worker. - */ -export declare function createWebWorker(url: string, initialMem?: number, maxMem?: number): Promise; -//# sourceMappingURL=web_worker.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts.map deleted file mode 100644 index 2756cc7c5df..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"web_worker.d.ts","sourceRoot":"","sources":["../../../src/worker/browser/web_worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAY5G"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.js deleted file mode 100644 index 71a0e1b145f..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/browser/web_worker.js +++ /dev/null @@ -1,23 +0,0 @@ -import { WasmModule } from '../../wasm/wasm_module.js'; -import { createDispatchProxy, TransportClient, WorkerConnector } from '../../transport/index.js'; -/** - * Instantiate a web worker. - * @param url - The URL. - * @param initialMem - Initial memory pages. - * @param maxMem - Maximum memory pages. - * @returns The worker. - */ -export async function createWebWorker(url, initialMem, maxMem) { - const worker = new Worker(url); - const transportConnect = new WorkerConnector(worker); - const transportClient = new TransportClient(transportConnect); - await transportClient.open(); - const remoteModule = createDispatchProxy(WasmModule, transportClient); - remoteModule.destroyWorker = async () => { - await transportClient.request({ fn: '__destroyWorker__', args: [] }); - transportClient.close(); - }; - await remoteModule.init(initialMem, maxMem); - return remoteModule; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2ViX3dvcmtlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy93b3JrZXIvYnJvd3Nlci93ZWJfd29ya2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUN2RCxPQUFPLEVBQUUsbUJBQW1CLEVBQWUsZUFBZSxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRzlHOzs7Ozs7R0FNRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsZUFBZSxDQUFDLEdBQVcsRUFBRSxVQUFtQixFQUFFLE1BQWU7SUFDckYsTUFBTSxNQUFNLEdBQUcsSUFBSSxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDL0IsTUFBTSxnQkFBZ0IsR0FBRyxJQUFJLGVBQWUsQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUNyRCxNQUFNLGVBQWUsR0FBRyxJQUFJLGVBQWUsQ0FBYyxnQkFBZ0IsQ0FBQyxDQUFDO0lBQzNFLE1BQU0sZUFBZSxDQUFDLElBQUksRUFBRSxDQUFDO0lBQzdCLE1BQU0sWUFBWSxHQUFHLG1CQUFtQixDQUFDLFVBQVUsRUFBRSxlQUFlLENBQWUsQ0FBQztJQUNwRixZQUFZLENBQUMsYUFBYSxHQUFHLEtBQUssSUFBSSxFQUFFO1FBQ3RDLE1BQU0sZUFBZSxDQUFDLE9BQU8sQ0FBQyxFQUFFLEVBQUUsRUFBRSxtQkFBbUIsRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFLENBQUMsQ0FBQztRQUNyRSxlQUFlLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDMUIsQ0FBQyxDQUFDO0lBQ0YsTUFBTSxZQUFZLENBQUMsSUFBSSxDQUFDLFVBQVUsRUFBRSxNQUFNLENBQUMsQ0FBQztJQUM1QyxPQUFPLFlBQVksQ0FBQztBQUN0QixDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts deleted file mode 100644 index 0c9bd408c2d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -/** - * Simple read/write interface for wasm modules. - */ -export interface DataStore { - get(key: string): Promise; - set(key: string, value: Buffer): Promise; -} -//# sourceMappingURL=data_store.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts.map deleted file mode 100644 index 4b0f53fd9d9..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"data_store.d.ts","sourceRoot":"","sources":["../../src/worker/data_store.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.js deleted file mode 100644 index fd170823f17..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/data_store.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YV9zdG9yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy93b3JrZXIvZGF0YV9zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts deleted file mode 100644 index 07a37541295..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { WorkerPool } from './worker_pool.js'; -export { WasmWorker } from './wasm_worker.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts.map deleted file mode 100644 index 0960823e41d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/worker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/index.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/index.js deleted file mode 100644 index c36435a7a31..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { WorkerPool } from './worker_pool.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd29ya2VyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQyJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts deleted file mode 100644 index be9811545d5..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './node_worker.js'; -export * from './node_data_store.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts.map deleted file mode 100644 index a406ecf876d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/worker/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.js deleted file mode 100644 index cf7a0819450..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './node_worker.js'; -export * from './node_data_store.js'; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvd29ya2VyL25vZGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLHNCQUFzQixDQUFDIn0= \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts deleted file mode 100644 index 5908d6599bb..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { DataStore } from '../data_store.js'; -/** - * Cache for data used by wasm module. - */ -export declare class NodeDataStore implements DataStore { - private db; - constructor(path?: string); - /** - * Get a value from our DB. - * @param key - The key to look up. - * @returns The value. - */ - get(key: string): Promise; - /** - * Set a value in our DB. - * @param key - The key to update. - * @param value - The value to set. - */ - set(key: string, value: Buffer): Promise; -} -//# sourceMappingURL=node_data_store.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts.map deleted file mode 100644 index 496c69d5094..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node_data_store.d.ts","sourceRoot":"","sources":["../../../src/worker/node/node_data_store.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C;;GAEG;AACH,qBAAa,aAAc,YAAW,SAAS;IAC7C,OAAO,CAAC,EAAE,CAAU;gBAGR,IAAI,CAAC,EAAE,MAAM;IAMzB;;;;OAIG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAInD;;;;OAIG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrD"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.js deleted file mode 100644 index 57be391030a..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_data_store.js +++ /dev/null @@ -1,31 +0,0 @@ -import levelup from 'levelup'; -import leveldown from 'leveldown'; -import memdown from 'memdown'; -/** - * Cache for data used by wasm module. - */ -export class NodeDataStore { - // eslint-disable-next-line - constructor(path) { - // Hack: Cast as any to work around packages "broken" with node16 resolution - // See https://github.com/microsoft/TypeScript/issues/49160 - this.db = levelup(path ? leveldown(path) : memdown()); - } - /** - * Get a value from our DB. - * @param key - The key to look up. - * @returns The value. - */ - async get(key) { - return await this.db.get(key).catch(() => { }); - } - /** - * Set a value in our DB. - * @param key - The key to update. - * @param value - The value to set. - */ - async set(key, value) { - await this.db.put(key, value); - } -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9kYXRhX3N0b3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3dvcmtlci9ub2RlL25vZGVfZGF0YV9zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLE9BQW9CLE1BQU0sU0FBUyxDQUFDO0FBQzNDLE9BQU8sU0FBUyxNQUFNLFdBQVcsQ0FBQztBQUNsQyxPQUFPLE9BQU8sTUFBTSxTQUFTLENBQUM7QUFFOUI7O0dBRUc7QUFDSCxNQUFNLE9BQU8sYUFBYTtJQUd4QiwyQkFBMkI7SUFDM0IsWUFBWSxJQUFhO1FBQ3ZCLDRFQUE0RTtRQUM1RSwyREFBMkQ7UUFDM0QsSUFBSSxDQUFDLEVBQUUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBRSxTQUFpQixDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBRSxPQUFlLEVBQUUsQ0FBQyxDQUFDO0lBQzFFLENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsS0FBSyxDQUFDLEdBQUcsQ0FBQyxHQUFXO1FBQ25CLE9BQU8sTUFBTSxJQUFJLENBQUMsRUFBRSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxFQUFFLEdBQUUsQ0FBQyxDQUFDLENBQUM7SUFDaEQsQ0FBQztJQUVEOzs7O09BSUc7SUFDSCxLQUFLLENBQUMsR0FBRyxDQUFDLEdBQVcsRUFBRSxLQUFhO1FBQ2xDLE1BQU0sSUFBSSxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBQ2hDLENBQUM7Q0FDRiJ9 \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts deleted file mode 100644 index 5da7e01049d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { WasmWorker } from '../wasm_worker.js'; -/** - * - */ -export declare function createNodeWorker(filepath: string, initialMem?: number, maxMem?: number): Promise; -//# sourceMappingURL=node_worker.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts.map deleted file mode 100644 index 26908ec619c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node_worker.d.ts","sourceRoot":"","sources":["../../../src/worker/node/node_worker.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAYlH"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.js deleted file mode 100644 index 155e31ba16b..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/node_worker.js +++ /dev/null @@ -1,21 +0,0 @@ -import { Worker } from 'worker_threads'; -import { createDispatchProxy, TransportClient } from '../../transport/index.js'; -import { NodeConnector } from '../../transport/index.js'; -import { WasmModule } from '../../wasm/wasm_module.js'; -/** - * - */ -export async function createNodeWorker(filepath, initialMem, maxMem) { - const worker = new Worker(filepath); - const transportConnect = new NodeConnector(worker); - const transportClient = new TransportClient(transportConnect); - await transportClient.open(); - const remoteModule = createDispatchProxy(WasmModule, transportClient); - remoteModule.destroyWorker = async () => { - await transportClient.request({ fn: '__destroyWorker__', args: [] }); - transportClient.close(); -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FQUFFLEVBQUUsQ0FBQyxDQUFDO1FBQ3JFLGVBQWUsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUMxQixDQUFDLENBQUM7SUFDRixNQUFNLFlBQVksQ0FBQyxJQUFJLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQzVDLE9BQU8sWUFBWSxDQUFDO0FBQ3RCLENBQUMifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts deleted file mode 100644 index c118c248f46..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { WasmModule } from '../../wasm/wasm_module.js'; -/** - * Start the transport server corresponding to this module. - * @param module - The WasmModule to host. - */ -export declare function startNodeModule(module: WasmModule): void; -//# sourceMappingURL=start_node_module.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts.map deleted file mode 100644 index f006976f41e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"start_node_module.d.ts","sourceRoot":"","sources":["../../../src/worker/node/start_node_module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAMvD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,QAejD"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.js deleted file mode 100644 index 8d4aee385db..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/node/start_node_module.js +++ /dev/null @@ -1,26 +0,0 @@ -import { parentPort } from 'worker_threads'; -import { NodeListener, TransportServer } from '../../transport/index.js'; -if (!parentPort) { - throw new Error('InvalidWorker'); -} -/** - * Start the transport server corresponding to this module. - * @param module - The WasmModule to host. - */ -export function startNodeModule(module) { - const dispatch = async ({ fn, args }) => { - if (fn === '__destroyWorker__') { - transportServer.stop(); - return; - } - if (!module[fn]) { - throw new Error(`dispatch error, function not found: ${fn}`); - } - return await module[fn](...args); - }; - const transportListener = new NodeListener(); - const transportServer = new TransportServer(transportListener, dispatch); - module.addLogger((...args) => transportServer.broadcast({ fn: 'emit', args: ['log', ...args] })); - transportServer.start(); -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhcnRfbm9kZV9tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvd29ya2VyL25vZGUvc3RhcnRfbm9kZV9tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzVDLE9BQU8sRUFBRSxZQUFZLEVBQWUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFHdEYsSUFBSSxDQUFDLFVBQVUsRUFBRTtJQUNmLE1BQU0sSUFBSSxLQUFLLENBQUMsZUFBZSxDQUFDLENBQUM7Q0FDbEM7QUFFRDs7O0dBR0c7QUFDSCxNQUFNLFVBQVUsZUFBZSxDQUFDLE1BQWtCO0lBQ2hELE1BQU0sUUFBUSxHQUFHLEtBQUssRUFBRSxFQUFFLEVBQUUsRUFBRSxJQUFJLEVBQWUsRUFBRSxFQUFFO1FBQ25ELElBQUksRUFBRSxLQUFLLG1CQUFtQixFQUFFO1lBQzlCLGVBQWUsQ0FBQyxJQUFJLEVBQUUsQ0FBQztZQUN2QixPQUFPO1NBQ1I7UUFDRCxJQUFJLENBQUUsTUFBYyxDQUFDLEVBQUUsQ0FBQyxFQUFFO1lBQ3hCLE1BQU0sSUFBSSxLQUFLLENBQUMsdUNBQXVDLEVBQUUsRUFBRSxDQUFDLENBQUM7U0FDOUQ7UUFDRCxPQUFPLE1BQU8sTUFBYyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7SUFDNUMsQ0FBQyxDQUFDO0lBQ0YsTUFBTSxpQkFBaUIsR0FBRyxJQUFJLFlBQVksRUFBRSxDQUFDO0lBQzdDLE1BQU0sZUFBZSxHQUFHLElBQUksZUFBZSxDQUFjLGlCQUFpQixFQUFFLFFBQVEsQ0FBQyxDQUFDO0lBQ3RGLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQyxHQUFHLElBQVcsRUFBRSxFQUFFLENBQUMsZUFBZSxDQUFDLFNBQVMsQ0FBQyxFQUFFLEVBQUUsRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLENBQUMsS0FBSyxFQUFFLEdBQUcsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFDeEcsZUFBZSxDQUFDLEtBQUssRUFBRSxDQUFDO0FBQzFCLENBQUMifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts deleted file mode 100644 index 5796d84ec9e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Proxify } from '../transport/index.js'; -import { WasmModule } from '../wasm/wasm_module.js'; -/** - * Represents either a WASM web worker, or node.js worker. - */ -export type WasmWorker = Proxify & { - destroyWorker(): void; -}; -//# sourceMappingURL=wasm_worker.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts.map deleted file mode 100644 index 111acb92bbc..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wasm_worker.d.ts","sourceRoot":"","sources":["../../src/worker/wasm_worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG;IAAE,aAAa,IAAI,IAAI,CAAA;CAAE,CAAC"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.js deleted file mode 100644 index a886d8ce72e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/wasm_worker.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FzbV93b3JrZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd29ya2VyL3dhc21fd29ya2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts b/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts deleted file mode 100644 index 62f2d879877..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { WasmWorker } from './wasm_worker.js'; -/** - * Type of a worker factory. - * Used to customize WorkerPool worker construction. - */ -export type CreateWorker = (name: string, minMem: number, maxMem: number) => WasmWorker; -/** - * Allocates a pool of WasmWorker's. - * Worker 0 is allocated MAX_PAGES memory pages. This is because worker 0 will need to hold the proving key - * (i.e. Has state), whereas the others are pure compute (they hold a little crs state). - */ -export declare class WorkerPool { - /** - * The maximum number of memory pages to be used by the webassembly. - */ - static MAX_PAGES: number; - /** - * The workers in the pool. - */ - private workers; - /** - * Create an instance and initialize the workers. - * @param createWorker - Worker factory. - * @param poolSize - Pool size. - * @returns An initialized WorkerPool. - */ - static new(createWorker: CreateWorker, poolSize: number): Promise; - /** - * Initialize the workers. - * @param createWorker - Worker factory(). - * @param poolSize - Pool size. - * @param maxMem - Max memory pages. - */ - init(createWorker: CreateWorker, poolSize: number, maxMem?: number): Promise; - /** - * Tell all workers in the pool to stop processing. - */ - destroy(): Promise; -} -//# sourceMappingURL=worker_pool.d.ts.map \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts.map b/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts.map deleted file mode 100644 index 118733d8c5c..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"worker_pool.d.ts","sourceRoot":"","sources":["../../src/worker/worker_pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,UAAU,CAAC;AACxF;;;;GAIG;AACH,qBAAa,UAAU;IAYrB;;OAEG;IACH,OAAc,SAAS,SAAQ;IAC/B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAoB;IAEnC;;;;;OAKG;WACU,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM;IAM7D;;;;;OAKG;IACU,IAAI,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAuB;IAY7F;;OAEG;IACU,OAAO;CAGrB"} \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.js b/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.js deleted file mode 100644 index e98199d3de2..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/dest/worker/worker_pool.js +++ /dev/null @@ -1,70 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; -const debug = createDebugLogger("bb:worker_pool"); -/** - * Allocates a pool of WasmWorker's. - * Worker 0 is allocated MAX_PAGES memory pages. This is because worker 0 will need to hold the proving key - * (i.e. Has state), whereas the others are pure compute (they hold a little crs state). - */ -export class WorkerPool { - constructor() { - /** - * The workers in the pool. - */ - this.workers = []; - } - /** - * Create an instance and initialize the workers. - * @param createWorker - Worker factory. - * @param poolSize - Pool size. - * @returns An initialized WorkerPool. - */ - static async new(createWorker, poolSize) { - const pool = new WorkerPool(); - await pool.init(createWorker, poolSize); - return pool; - } - /** - * Initialize the workers. - * @param createWorker - Worker factory(). - * @param poolSize - Pool size. - * @param maxMem - Max memory pages. - */ - async init(createWorker, poolSize, maxMem = WorkerPool.MAX_PAGES) { - debug(`creating ${poolSize} workers...`); - const start = new Date().getTime(); - this.workers = await Promise.all( - Array(poolSize) - .fill(0) - .map((_, i) => - createWorker( - `${i}`, - i === 0 ? Math.min(WorkerPool.MAX_PAGES, maxMem) : 768, - maxMem - ) - ) - ); - debug(`created workers: ${new Date().getTime() - start}ms`); - } - /** - * Tell all workers in the pool to stop processing. - */ - async destroy() { - await Promise.all(this.workers.map((w) => w.destroyWorker())); - } -} -// TODO(AD): Revisit what this means in aztec 3 context -// -- -// Introduction of low mem prover work (polynomial cache) may actually increase mem usage when the backing store isn't -// enabled. We were seeing intermittent failings related to memory in production for some users when limiting to -// 6660 (416MB). It would be nice to understand why this is (the non determinism and/or the increased mem usage). -// For now, increasing mem usage to 512MB. This maybe preferable to backing out the low mem work, but -// ironically may break the chance of us using it in mobile. -// We *could* enable the low memory backing store, but this needs a little bit of work to actually -// read/write from indexeddb, performance testing, and actual further memory load testing. -// At this point it's hard to know what our memory savings would be relative to just fully reverting the LMP. -// public static MAX_PAGES = 6660; -/** - * The maximum number of memory pages to be used by the webassembly. - */ -WorkerPool.MAX_PAGES = 8192; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX3Bvb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd29ya2VyL3dvcmtlcl9wb29sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUcvQyxNQUFNLEtBQUssR0FBRyxpQkFBaUIsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO0FBT2xEOzs7O0dBSUc7QUFDSCxNQUFNLE9BQU8sVUFBVTtJQUF2QjtRQWdCRTs7V0FFRztRQUNLLFlBQU8sR0FBaUIsRUFBRSxDQUFDO0lBc0NyQyxDQUFDO0lBcENDOzs7OztPQUtHO0lBQ0gsTUFBTSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsWUFBMEIsRUFBRSxRQUFnQjtRQUMzRCxNQUFNLElBQUksR0FBRyxJQUFJLFVBQVUsRUFBRSxDQUFDO1FBQzlCLE1BQU0sSUFBSSxDQUFDLElBQUksQ0FBQyxZQUFZLEVBQUUsUUFBUSxDQUFDLENBQUM7UUFDeEMsT0FBTyxJQUFJLENBQUM7SUFDZCxDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSSxLQUFLLENBQUMsSUFBSSxDQUFDLFlBQTBCLEVBQUUsUUFBZ0IsRUFBRSxNQUFNLEdBQUcsVUFBVSxDQUFDLFNBQVM7UUFDM0YsS0FBSyxDQUFDLFlBQVksUUFBUSxhQUFhLENBQUMsQ0FBQztRQUN6QyxNQUFNLEtBQUssR0FBRyxJQUFJLElBQUksRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ25DLEl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deleted file mode 120000 index 2e254596421..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/node_modules/@aztec/foundation +++ /dev/null @@ -1 +0,0 @@ -../../../foundation \ No newline at end of file diff --git a/yarn-project/.yalc/@aztec/wasm/src/index.ts b/yarn-project/.yalc/@aztec/wasm/src/index.ts deleted file mode 100644 index 7b34a6e732f..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { WebDataStore } from './worker/browser/index.js'; -export { NodeDataStore } from './worker/node/index.js'; -export { WasmWorker, WorkerPool } from './worker/index.js'; -export { WasmModule } from './wasm/index.js'; -export { AsyncCallState, AsyncFnState } from './wasm/index.js'; -export { DispatchMsg, WorkerListener, TransportServer, NodeListener } from './transport/index.js'; -export { Transfer, isTransferDescriptor } from './transport/interface/transferable.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/memory_fifo.ts b/yarn-project/.yalc/@aztec/wasm/src/memory_fifo.ts deleted file mode 100644 index 03dc63d93ee..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/memory_fifo.ts +++ /dev/null @@ -1,104 +0,0 @@ -// TODO should come from a dependency -/** - * A simple fifo queue. It can grow unbounded. It can have multiple producers and consumers. - * Putting an item onto the queue always succeeds, unless either end() or cancel() has been called in which case - * the item being pushed is simply discarded. - */ -export class MemoryFifo { - private waiting: ((item: T | null) => void)[] = []; - private items: T[] = []; - private flushing = false; - - /** - * Length of queue. - * @returns integer. - */ - public length() { - return this.items.length; - } - - /** - * Returns next item within the queue, or blocks until and item has been put into the queue. - * If given a timeout, the promise will reject if no item is received after `timeout` seconds. - * If the queue is flushing, `null` is returned. - * @param timeout - In seconds. - * @returns Promise of result. - */ - public get(timeout?: number): Promise { - if (this.items.length) { - return Promise.resolve(this.items.shift()!); - } - - if (this.items.length === 0 && this.flushing) { - return Promise.resolve(null); - } - - return new Promise((resolve, reject) => { - this.waiting.push(resolve); - - if (timeout) { - setTimeout(() => { - const index = this.waiting.findIndex(r => r === resolve); - if (index > -1) { - this.waiting.splice(index, 1); - const err = new Error('Timeout getting item from queue.'); - reject(err); - } - }, timeout * 1000); - } - }); - } - - /** - * Put an item onto back of the queue. - * @param item - The item to enqueue. - */ - public put(item: T) { - if (this.flushing) { - return; - } else if (this.waiting.length) { - this.waiting.shift()!(item); - } else { - this.items.push(item); - } - } - - /** - * Once ended, no further items are added to queue. Consumers will consume remaining items within the queue. - * The queue is not reusable after calling `end()`. - * Any consumers waiting for an item receive null. - */ - public end() { - this.flushing = true; - this.waiting.forEach(resolve => resolve(null)); - } - - /** - * Once cancelled, all items are discarded from the queue, and no further items are added to the queue. - * The queue is not reusable after calling `cancel()`. - * Any consumers waiting for an item receive null. - */ - public cancel() { - this.flushing = true; - this.items = []; - this.waiting.forEach(resolve => resolve(null)); - } - - /** - * Helper method that can be used to continously consume and process items on the queue. - * @param handler - The item handler function. - */ - public async process(handler: (item: T) => Promise) { - try { - while (true) { - const item = await this.get(); - if (item === null) { - break; - } - await handler(item); - } - } catch (err) { - console.error('Queue handler exception:', err); - } - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/test/gcd.wasm b/yarn-project/.yalc/@aztec/wasm/src/test/gcd.wasm deleted file mode 100644 index 19a859c306c3acf6de25eef3ea26711d05e783bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 76 zcmWN@!3lsc5Cp*8&Evo`JzRW>MWmF7f-ga^fNNdnHQ3*q0B9V_WEK%-EZ1=Y)5eud Xb@f0+uxX~39t { - this.port.postMessage(msg, transfer); - return Promise.resolve(); - } - - /** - * Add a message handler. - * @param cb - The handler. - */ - registerHandler(cb: (msg: any) => any): void { - this.port.onmessage = event => cb(event.data); - } - - /** - * Close this message port. - */ - close() { - void this.send(undefined); - this.port.onmessage = null; - this.port.close(); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_connector.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_connector.ts deleted file mode 100644 index d6167961760..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_connector.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Connector } from '../interface/connector.js'; -import { MessagePortSocket } from './message_port_socket.js'; - -/** - * Connector implementation which wraps a SharedWorker. - */ -export class SharedWorkerConnector implements Connector { - /** - * Create a SharedWorkerConnector. - * @param worker - A shared worker. - */ - constructor(private worker: SharedWorker) {} - - /** - * Create a Socket implementation with our mesage port. - * @returns The socket. - */ - createSocket() { - return Promise.resolve(new MessagePortSocket(this.worker.port)); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_listener.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_listener.ts deleted file mode 100644 index cafd280e6e6..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/shared_worker_listener.ts +++ /dev/null @@ -1,52 +0,0 @@ -import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; -import { MessagePortSocket } from './message_port_socket.js'; - -/** - * See https://developer.mozilla.org/en-US/docs/Web/API/SharedWorkerGlobalScope. - */ -declare interface SharedWorkerGlobalScope { - /** - * Fired on shared workers when a new client connects. - */ - onconnect: any; -} - -/** - * Listens for connections to a shared worker. - */ -export class SharedWorkerListener extends EventEmitter implements Listener { - /** - * - * @param worker - */ - constructor(private worker: SharedWorkerGlobalScope) { - super(); - } - - /** - * - */ - open() { - this.worker.onconnect = this.handleMessageEvent; - } - - /** - * - */ - close() { - this.worker.onconnect = () => {}; - } - - /** - * - * @param event - */ - private handleMessageEvent = (event: MessageEvent) => { - const [port] = event.ports; - if (!port) { - return; - } - this.emit('new_socket', new MessagePortSocket(port)); - }; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_connector.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_connector.ts deleted file mode 100644 index fbfc7efd22e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_connector.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Connector } from '../interface/connector.js'; -import { MessagePortSocket } from './message_port_socket.js'; - -/** - * - */ -export class WorkerConnector implements Connector { - /** - * - * @param worker - */ - constructor(private worker: Worker) {} - - /** - * - */ - createSocket() { - const channel = new MessageChannel(); - this.worker.postMessage('', [channel.port2]); - return Promise.resolve(new MessagePortSocket(channel.port1)); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_listener.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_listener.ts deleted file mode 100644 index 201b3a68573..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/browser/worker_listener.ts +++ /dev/null @@ -1,52 +0,0 @@ -import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; -import { MessagePortSocket } from './message_port_socket.js'; - -/** - * - */ -declare interface DedicatedWorkerGlobalScope { - /** - * - */ - onmessage: any; -} - -/** - * - */ -export class WorkerListener extends EventEmitter implements Listener { - /** - * - * @param worker - */ - constructor(private worker: DedicatedWorkerGlobalScope) { - super(); - } - - /** - * - */ - open() { - this.worker.onmessage = this.handleMessageEvent; - } - - /** - * - */ - close() { - this.worker.onmessage = () => {}; - } - - /** - * - * @param event - */ - private handleMessageEvent = (event: MessageEvent) => { - const [port] = event.ports; - if (!port) { - return; - } - this.emit('new_socket', new MessagePortSocket(port)); - }; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_fn.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_fn.ts deleted file mode 100644 index 6e23e25a25f..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_fn.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * - */ -export interface DispatchMsg { - /** - * - */ - fn: string; - /** - * - */ - args: any[]; -} - -/** - * - */ -export function createDispatchFn(targetFn: () => any, debug = console.error) { - return async ({ fn, args }: DispatchMsg) => { - const target = targetFn(); - debug(`dispatching to ${target}: ${fn}`, args); - return await target[fn](...args); - }; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_proxy.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_proxy.ts deleted file mode 100644 index e9538448d3d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/create_dispatch_proxy.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { DispatchMsg } from './create_dispatch_fn.js'; -import { TransportClient } from '../transport_client.js'; -import { EventEmitter } from 'events'; -import { isTransferDescriptor, TransferDescriptor } from '../interface/transferable.js'; - -type FilterOutAttributes = { - [Key in keyof Base]: Base[Key] extends (...args: any) => any ? Base[Key] : never; -}; - -type PromisifyFunction any> = (...args: Parameters) => Promise>; - -type Promisify any }> = { - [Key in keyof Base]: ReturnType extends Promise ? Base[Key] : PromisifyFunction; -}; - -/** - * Unpack transfer types - */ -type TransferTypes = { - [Index in keyof Tuple]: Tuple[Index] | (Tuple[Index] extends Transferable ? TransferDescriptor : never); -}; - -/** - * Annoying: https://github.com/microsoft/TypeScript/issues/29919 - * There's a bug that means we can't map over the tuple or function parameter types to make them transferrable, if - * we use the Parameters builtin, and then try to map. - * So instead we inline the Parameters builtin and apply the TransferTypes to the parameters within the inline. - * Once the above is fixed we could in theory just do: - * - * type MakeFunctionTransferrable any> = ( - * ...args: TransferTypes> - * ) => ReturnType;. - */ -type MakeFunctionTransferrable any> = ( - ...args: TFunction extends (...args: infer P) => any ? TransferTypes

: never -) => ReturnType; - -type Transferrable any }> = { - [Key in keyof Base]: MakeFunctionTransferrable; -}; - -export type Proxify = Promisify>>; - -export function createDispatchProxyFromFn( - class_: { new (...args: any[]): T }, - requestFn: (fn: string) => (...args: any[]) => Promise, -): Proxify { - const proxy: any = class_.prototype instanceof EventEmitter ? new EventEmitter() : {}; - for (const fn of Object.getOwnPropertyNames(class_.prototype)) { - if (fn === 'constructor') { - continue; - } - proxy[fn] = requestFn(fn); - } - return proxy; -} - -/** - * Create a proxy object of our class T that uses transportClient - * @param class_ - Our class T. - * @param transportClient - The transport infrastructure. - * @returns A proxy over T. - */ -export function createDispatchProxy( - class_: { new (...args: any[]): T }, - transportClient: TransportClient, -): Proxify { - // Create a proxy of class_ that passes along methods over our transportClient - const proxy = createDispatchProxyFromFn(class_, (fn: string) => (...args: any[]) => { - // Pass our proxied function name and arguments over our transport client - const transfer: Transferable[] = args.reduce( - (acc, a) => (isTransferDescriptor(a) ? [...acc, ...a.transferables] : acc), - [] as Transferable[], - ); - args = args.map(a => (isTransferDescriptor(a) ? a.send : a)); - return transportClient.request({ fn, args }, transfer); - }); - if (proxy instanceof EventEmitter) { - // Handle proxied 'emit' calls if our proxy object is an EventEmitter - transportClient.on('event_msg', ({ fn, args }) => { - if (fn === 'emit') { - const [eventName, ...restArgs] = args; - proxy.emit(eventName, ...restArgs); - } - }); - } - return proxy; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/messages.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/messages.ts deleted file mode 100644 index 49704dbde84..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/dispatch/messages.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Represents a transport bus request. - */ -export interface RequestMessage { - /** - * The message ID. - */ - msgId: number; - /** - * The data. - */ - payload: Payload; -} - -/** - * Represents a transport bus response. - */ -export interface ResponseMessage { - /** - * The message ID. - */ - msgId: number; - /** - * The data. - */ - payload?: Payload; - /** - * The error, if any. - */ - error?: string; -} - -/** - * A message stemming from an event. - */ -export interface EventMessage { - /** - * The event data. - */ - payload: Payload; -} - -/** - * Is this an event message? - * @returns If the msgId was blank. - */ -export function isEventMessage( - msg: ResponseMessage | EventMessage, -): msg is EventMessage { - return (msg as ResponseMessage).msgId === undefined; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/index.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/index.ts deleted file mode 100644 index 1ea1f8c30cf..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from './dispatch/create_dispatch_fn.js'; -export * from './dispatch/create_dispatch_proxy.js'; -export * from './dispatch/messages.js'; -export * from './interface/connector.js'; -export * from './interface/listener.js'; -export * from './interface/socket.js'; -export * from './interface/transferable.js'; -export * from './transport_client.js'; -export * from './transport_server.js'; -export * from './browser/index.js'; -export * from './node/index.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/connector.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/interface/connector.ts deleted file mode 100644 index 9d72f6574f7..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/connector.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Socket } from './socket.js'; - -/** - * Opens a socket with corresponding TransportListener. - */ -export interface Connector { - createSocket(): Promise; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/listener.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/interface/listener.ts deleted file mode 100644 index b6e533570a7..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/listener.ts +++ /dev/null @@ -1,14 +0,0 @@ -import EventEmitter from 'events'; -import { Socket } from './socket.js'; - -/** - * Once opened, an implementation of a TransportListener will emit `new_socket` events as new clients connect. - * Possible implementations could include MessageChannels or WebSockets. - */ -export interface Listener extends EventEmitter { - open(): void; - - close(): void; - - on(name: 'new_socket', cb: (client: Socket) => void): this; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/socket.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/interface/socket.ts deleted file mode 100644 index 6da7ca436ed..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/socket.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Represents one end of a socket connection. - * A message sent via `send` will be handled by the corresponding Socket's handler function at the other end. - * Implementations could use e.g. MessagePorts for communication between browser workers, - * or WebSockets for communication between processes. - * If `registerHandler` callback receives `undefined` that signals the other end closed. - */ -export interface Socket { - send(msg: any, transfer?: Transferable[]): Promise; - registerHandler(cb: (msg: any) => any): void; - close(): void; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/transferable.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/interface/transferable.ts deleted file mode 100644 index 3ce8c59b320..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/interface/transferable.ts +++ /dev/null @@ -1,92 +0,0 @@ -const $transferable = Symbol('thread.transferable'); - -/** - * A descriptor representing a payload with transferable components. - * These components will have ownership transfered when published on an event bus. - */ -export interface TransferDescriptor { - /** - * Marked as transferable. - */ - [$transferable]: true; - /** - * The payload with the transferable objects. - */ - send: T; - /** - * The objects to transfer. - */ - transferables: Transferable[]; -} - -/** - * - */ -function isTransferable(thing: any): thing is Transferable { - if (!thing || typeof thing !== 'object') return false; - // Don't check too thoroughly, since the list of transferable things in JS might grow over time - return true; -} - -/** - * - */ -export function isTransferDescriptor(thing: any): thing is TransferDescriptor { - return thing && typeof thing === 'object' && thing[$transferable]; -} - -/** - * Mark a transferable object as such, so it will no be serialized and - * deserialized on messaging with the main thread, but to transfer - * ownership of it to the receiving thread. - * - * Only works with array buffers, message ports and few more special - * types of objects, but it's much faster than serializing and - * deserializing them. - * - * Note: - * The transferable object cannot be accessed by this thread again - * unless the receiving thread transfers it back again! - * - * @param transferable - Array buffer, message port or similar. - * @see https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast - */ -export function Transfer(transferable: Transferable): TransferDescriptor; - -/** - * Mark transferable objects within an arbitrary object or array as - * being a transferable object. They will then not be serialized - * and deserialized on messaging with the main thread, but ownership - * of them will be tranferred to the receiving thread. - * - * Only array buffers, message ports and few more special types of - * objects can be transferred, but it's much faster than serializing and - * deserializing them. - * - * Note: - * The transferable object cannot be accessed by this thread again - * unless the receiving thread transfers it back again! - * - * @param transferable - Array buffer, message port or similar. - * @see https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast - */ -export function Transfer(payload: T, transferables: Transferable[]): TransferDescriptor; - -/** - * Create a transfer descriptor, marking these as transferable. - * @param payload - The payload. - * @param transferables - The transferable objects. - * @returns The descriptor. - */ -export function Transfer(payload: T, transferables?: Transferable[]): TransferDescriptor { - if (!transferables) { - if (!isTransferable(payload)) throw Error(); - transferables = [payload]; - } - - return { - [$transferable]: true, - send: payload, - transferables, - }; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/node/index.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/node/index.ts deleted file mode 100644 index cf87befc85e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/node/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './node_connector.js'; -export * from './node_listener.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector.ts deleted file mode 100644 index bf74c2a5d72..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Worker } from 'worker_threads'; -import { Connector } from '../interface/connector.js'; -import { NodeConnectorSocket } from './node_connector_socket.js'; - -/** - * Creates sockets backed by a Node worker. - */ -export class NodeConnector implements Connector { - constructor(private worker: Worker) {} - - /** - * Creates a socket backed by a node worker. - * @returns The socket. - */ - createSocket() { - return Promise.resolve(new NodeConnectorSocket(this.worker)); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector_socket.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector_socket.ts deleted file mode 100644 index 39b1b2e04b4..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_connector_socket.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { TransferListItem, Worker } from 'worker_threads'; -import { Socket } from '../interface/socket.js'; - -/** - * A socket implementation using a Node worker. - */ -export class NodeConnectorSocket implements Socket { - constructor(private worker: Worker) {} - - /** - * Send a message. - * @param msg - The message. - * @param transfer - Objects to transfer ownership of. - * @returns A void promise. - */ - send(msg: any, transfer: Transferable[] = []): Promise { - this.worker.postMessage(msg, transfer as TransferListItem[]); - return Promise.resolve(); - } - - /** - * Register a message handler. - * @param cb - The handler function. - */ - registerHandler(cb: (msg: any) => any): void { - this.worker.on('message', cb); - } - - /** - * Remove all listeners from our worker. - */ - close() { - void this.send(undefined); - this.worker.removeAllListeners(); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener.ts deleted file mode 100644 index 92c753410fb..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { parentPort } from 'worker_threads'; -import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; -import { NodeListenerSocket } from './node_listener_socket.js'; - -/** - * A socket listener that works with Node. - */ -export class NodeListener extends EventEmitter implements Listener { - constructor() { - super(); - } - - /** - * Open the listener. - */ - open() { - this.emit('new_socket', new NodeListenerSocket(parentPort as any)); - } - - /** - * Close the listener. - */ - close() {} -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener_socket.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener_socket.ts deleted file mode 100644 index d492d45c602..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/node/node_listener_socket.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { MessagePort, TransferListItem } from 'worker_threads'; -import { Socket } from '../interface/socket.js'; - -/** - * An implementation of a TransportSocket using MessagePorts. - */ -export class NodeListenerSocket implements Socket { - constructor(private port: MessagePort) {} - - /** - * Send a message over this port. - * @param msg - The message. - * @param transfer - Transferable objects. - * @returns A void promise. - */ - send(msg: any, transfer: Transferable[] = []): Promise { - this.port.postMessage(msg, transfer as TransferListItem[]); - return Promise.resolve(); - } - - /** - * Add a handler to this port. - * @param cb - The handler function. - */ - registerHandler(cb: (msg: any) => any): void { - this.port.on('message', cb); - } - - /** - * Close this socket. - */ - close() { - void this.send(undefined); - this.port.removeAllListeners(); - this.port.close(); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/transport_client.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/transport_client.ts deleted file mode 100644 index 9140f199a7d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/transport_client.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; -import EventEmitter from "events"; -import { - EventMessage, - isEventMessage, - ResponseMessage, -} from "./dispatch/messages.js"; -import { Connector } from "./interface/connector.js"; -import { Socket } from "./interface/socket.js"; - -const debug = createDebugLogger("aztec:transport_client"); - -/** - * A pending request. - */ -interface PendingRequest { - /** - * The message ID. - */ - msgId: number; - resolve(data: any): void; - reject(error: Error): void; -} - -/** - * Augments the TransportClient class with more precise EventEmitter types. - */ -export interface TransportClient extends EventEmitter { - on(name: "event_msg", handler: (payload: Payload) => void): this; - emit(name: "event_msg", payload: Payload): boolean; -} - -/** - * A TransportClient provides a request/response and event api to a corresponding TransportServer. - * If `broadcast` is called on TransportServer, TransportClients will emit an `event_msg`. - * The `request` method will block until a response is returned from the TransportServer's dispatch function. - * Request multiplexing is supported. - */ -export class TransportClient extends EventEmitter { - private msgId = 0; - private pendingRequests: PendingRequest[] = []; - private socket?: Socket; - - constructor(private transportConnect: Connector) { - super(); - } - - /** - * Create and register our socket using our Connector. - */ - async open() { - this.socket = await this.transportConnect.createSocket(); - this.socket.registerHandler((msg) => this.handleSocketMessage(msg)); - } - - /** - * Close this and stop listening for messages. - */ - close() { - this.socket?.close(); - this.socket = undefined; - this.removeAllListeners(); - } - - /** - * Queue a request. - * @param payload - The request payload. - * @param transfer - Objects to transfer ownership of. - * @returns A promise of the query result. - */ - request(payload: Payload, transfer?: Transferable[]) { - if (!this.socket) { - throw new Error("Socket not open."); - } - const msgId = this.msgId++; - const msg = { msgId, payload }; - debug(`->`, msg); - return new Promise((resolve, reject) => { - this.pendingRequests.push({ resolve, reject, msgId }); - this.socket!.send(msg, transfer).catch(reject); - }); - } - - /** - * Handle an incoming socket message. - * @param msg - The message. - */ - private handleSocketMessage( - msg: ResponseMessage | EventMessage | undefined - ) { - if (msg === undefined) { - // The remote socket closed. - this.close(); - return; - } - debug(`<-`, msg); - if (isEventMessage(msg)) { - this.emit("event_msg", msg.payload); - return; - } - const reqIndex = this.pendingRequests.findIndex( - (r) => r.msgId === msg.msgId - ); - if (reqIndex === -1) { - return; - } - const [pending] = this.pendingRequests.splice(reqIndex, 1); - if (msg.error) { - pending.reject(new Error(msg.error)); - } else { - pending.resolve(msg.payload); - } - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/transport/transport_server.ts b/yarn-project/.yalc/@aztec/wasm/src/transport/transport_server.ts deleted file mode 100644 index 0cb5aecf7e2..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/transport/transport_server.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { RequestMessage, ResponseMessage } from './dispatch/messages.js'; -import { Listener } from './interface/listener.js'; -import { Socket } from './interface/socket.js'; -import { isTransferDescriptor } from './interface/transferable.js'; - -/** - * Keeps track of clients, providing a broadcast, and request/response api with multiplexing. - */ -export class TransportServer { - private sockets: Socket[] = []; - - constructor(private listener: Listener, private msgHandlerFn: (msg: Payload) => Promise) {} - - /** - * Start accepting new connections. - */ - start() { - this.listener.on('new_socket', client => this.handleNewSocket(client)); - this.listener.open(); - } - - /** - * Stops accepting new connections. It doesn't close existing sockets. - * It's expected the clients will gracefully complete by closing their end, sending an `undefined` message. - */ - stop() { - this.listener.close(); - } - - /** - * Broadcast a message. - * @param msg - The message. - */ - async broadcast(msg: Payload) { - await Promise.all(this.sockets.map(s => s.send({ payload: msg }))); - } - - /** - * New socket registration. - * @param socket - The socket to register. - */ - private handleNewSocket(socket: Socket) { - socket.registerHandler(async msg => { - if (msg === undefined) { - // Client socket has closed. Remove it from the list of sockets. Call close on it for any cleanup. - const socketIndex = this.sockets.findIndex(s => s === socket); - const [closingSocket] = this.sockets.splice(socketIndex, 1); - closingSocket.close(); - return; - } - return await this.handleSocketMessage(socket, msg); - }); - this.sockets.push(socket); - } - - /** - * Detect the 'transferables' argument to our socket from our message - * handler return type. - * @param data - The return object. - * @returns - The data and the. - */ - private getPayloadAndTransfers(data: any): [any, Transferable[]] { - if (isTransferDescriptor(data)) { - // We treat PayloadWithTransfers specially so that we're able to - // attach transferables while keeping a simple return-type based usage - return [data.send, data.transferables]; - } - if (data instanceof Uint8Array) { - // We may want to devise a better solution to this. We maybe given a view over a non cloneable/transferrable - // ArrayBuffer (such as a view over wasm memory). In this case we want to take a copy, and then transfer it. - const respPayload = data instanceof Uint8Array && ArrayBuffer.isView(data) ? new Uint8Array(data) : data; - const transferables = data instanceof Uint8Array ? [respPayload.buffer] : []; - return [respPayload, transferables]; - } - return [data, []]; - } - /** - * Handles a socket message from a listener. - * @param socket - The socket. - * @param requestMessage - The message to handle. - * @returns The socket response. - */ - private async handleSocketMessage(socket: Socket, { msgId, payload }: RequestMessage) { - try { - const data = await this.msgHandlerFn(payload); - - const [respPayload, transferables] = this.getPayloadAndTransfers(data); - const rep: ResponseMessage = { msgId, payload: respPayload }; - - await socket.send(rep, transferables); - } catch (err: any) { - const rep: ResponseMessage = { msgId, error: err.stack }; - await socket.send(rep); - } - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/wasm/async_call_state.ts b/yarn-project/.yalc/@aztec/wasm/src/wasm/async_call_state.ts deleted file mode 100644 index 17554f4889d..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/wasm/async_call_state.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { WasmModule } from './wasm_module.js'; - -/** - * The state of an asynchronous WASM function. - */ -export interface AsyncFnState { - /** - * Is this a contination? - */ - continuation: boolean; - /** - * A result, if one exists. - */ - result?: any; -} - -/** - * To enable asynchronous callbacks from wasm to js, we leverage asyncify. - * Https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html. - * - * This class holds state and logic specific to handling async calls from wasm to js. - * A single instance of this class is instantiated as part of BarretenbergWasm. - * It allocates some memory for the asyncify stack data and initialises it. - * - * To make an async call into the wasm, just call `call` the same as in BarretenbergWasm, only it returns a promise. - * - * To make an async import that will be called from the wasm, wrap a function with the signature: - * my_func(state: AsyncFnState, ...args) - * with a call to `wrapImportFn`. - * The arguments are whatever the original call arguments were. The addition of AsyncFnState as the first argument - * allows for the detection of wether the function is continuing after the the async call has completed. - * If `state.continuation` is false, the function should start its async operation and return the promise. - * If `state.continuation` is true, the function can get the result from `state.result` perform any finalisation, - * and return an (optional) value to the wasm. - */ -export class AsyncCallState { - private ASYNCIFY_DATA_SIZE = 16 * 1024; - private asyncifyDataAddr!: number; - private asyncPromise?: Promise; - private wasm!: WasmModule; - private state?: AsyncFnState; - private callExport!: (...args: any[]) => number; - - /** - * Initialize the call hooks with a WasmModule. - * @param wasm - The module. - */ - public init(wasm: WasmModule) { - this.wasm = wasm; - this.callExport = (name: string, ...args: any[]) => wasm.call(name, ...args); - // Allocate memory for asyncify stack data. - this.asyncifyDataAddr = this.callExport('bbmalloc', this.ASYNCIFY_DATA_SIZE); - // TODO: is this view construction problematic like in WasmModule? - const view = new Uint32Array(wasm.getRawMemory().buffer); - // First two integers of asyncify data, are the start and end of the stack region. - view[this.asyncifyDataAddr >> 2] = this.asyncifyDataAddr + 8; - view[(this.asyncifyDataAddr + 4) >> 2] = this.asyncifyDataAddr + this.ASYNCIFY_DATA_SIZE; - } - - /** - * Log a message. - * @param args - The message arguments. - */ - private debug(...args: any[]) { - this.wasm.getLogger()(...args); - } - - /** - * Free the data associated with async call states. - */ - public destroy() { - // Free call stack data. - this.callExport('bbfree', this.asyncifyDataAddr); - } - - /** - * We call the wasm function, that will in turn call back into js via callImport and set this.asyncPromise and - * enable the instrumented "record stack unwinding" code path. - * Once the stack has unwound out of the wasm call, we enter into a loop of resolving the promise set in the call - * to callImport, and calling back into the wasm to rewind the stack and continue execution. - * @param name - The function name. - * @param args - The function args. - * @returns The function result. - */ - public async call(name: string, ...args: any) { - if (this.state) { - throw new Error(`Can only handle one async call at a time: ${name}(${args})`); - } - this.state = { continuation: false }; - let result = this.callExport(name, ...args); - - while (this.asyncPromise) { - // Disable the instrumented "record stack unwinding" code path. - this.callExport('asyncify_stop_unwind'); - this.debug('stack unwound.'); - // Wait for the async work to complete. - this.state.result = await this.asyncPromise; - this.state.continuation = true; - this.debug('result set starting rewind.'); - // Enable "stack rewinding" code path. - this.callExport('asyncify_start_rewind', this.asyncifyDataAddr); - // Call function again to rebuild the stack, and continue where we left off. - result = this.callExport(name, ...args); - } - - // Cleanup - this.state = undefined; - - return result; - } - - /** - * Wrap a WASM import function. - * @param fn - The function. - * @returns A wrapped version with asyncify calls. - */ - public wrapImportFn(fn: (state: AsyncFnState, ...args: any[]) => any) { - return (...args: any[]) => { - if (!this.asyncPromise) { - // We are in the normal code path. Start the async fetch of data. - this.asyncPromise = fn(this.state!, ...args); - // Enable "record stack unwinding" code path and return. - this.callExport('asyncify_start_unwind', this.asyncifyDataAddr); - } else { - // We are in the stack rewind code path, called once the promise is resolved. - // Save the result data back to the wasm, disable stack rewind code paths, and return. - this.callExport('asyncify_stop_rewind'); - const result = fn(this.state!, ...args); - // Cleanup. - this.asyncPromise = undefined; - this.state = { continuation: false }; - return result; - } - }; - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/wasm/empty_wasi_sdk.ts b/yarn-project/.yalc/@aztec/wasm/src/wasm/empty_wasi_sdk.ts deleted file mode 100644 index 36ccfd3e0ec..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/wasm/empty_wasi_sdk.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; - -/** - * Dummy implementation of a necessary part of the wasi api: - * https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md - * We don't use these functions, but the environment expects them. - * TODO find a way to update off of wasi 12. - */ -/* eslint-disable camelcase */ -/* eslint-disable jsdoc/require-jsdoc */ -export const getEmptyWasiSdk = ( - debug = createDebugLogger("wasm:empty_wasi_sdk") -) => ({ - clock_time_get() { - debug("clock_time_get"); - }, - environ_get() { - debug("environ_get"); - }, - environ_sizes_get() { - debug("environ_sizes_get"); - }, - fd_close() { - debug("fd_close"); - }, - fd_read() { - debug("fd_read"); - }, - fd_write() { - debug("fd_write"); - }, - fd_seek() { - debug("fd_seek"); - }, - fd_fdstat_get() { - debug("fd_fdstat_get"); - }, - fd_fdstat_set_flags() { - debug("fd_fdstat_set_flags"); - }, - fd_prestat_get() { - debug("fd_prestat_get"); - return 8; - }, - fd_prestat_dir_name() { - debug("fd_prestat_dir_name"); - return 28; - }, - path_open() { - debug("path_open"); - }, - path_filestat_get() { - debug("path_filestat_get"); - }, - proc_exit() { - debug("proc_exit"); - return 52; - }, - random_get() { - debug("random_get"); - return 1; - }, -}); diff --git a/yarn-project/.yalc/@aztec/wasm/src/wasm/index.ts b/yarn-project/.yalc/@aztec/wasm/src/wasm/index.ts deleted file mode 100644 index 2fb5a8b9afe..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/wasm/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { AsyncCallState, AsyncFnState } from './async_call_state.js'; -export { WasmModule } from './wasm_module.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.test.ts b/yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.test.ts deleted file mode 100644 index 63c73a88c81..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { WasmModule } from './wasm_module.js'; -import { fileURLToPath } from 'url'; -import { readFile } from 'fs/promises'; -import { dirname } from 'path'; - -/** - * Fetch a simple WASM. - */ -async function fetchCode() { - const __dirname = dirname(fileURLToPath(import.meta.url)); - return await readFile(`${__dirname}/../test/gcd.wasm`); -} - -describe('barretenberg wasm', () => { - let wasm!: WasmModule; - - beforeAll(async () => { - wasm = new WasmModule(await fetchCode(), () => ({ - /*no imports*/ - })); - await wasm.init(); - }); - - it('should call gcd with correct result', () => { - expect(wasm.call('gcd', 12312, 12123)).toBe(27); - }); -}); diff --git a/yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.ts b/yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.ts deleted file mode 100644 index 890ed1d5b89..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/wasm/wasm_module.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { createDebugLogger, DebugLogger } from "@aztec/foundation"; -import { Buffer } from "buffer"; -import { MemoryFifo } from "../memory_fifo.js"; -import { getEmptyWasiSdk } from "./empty_wasi_sdk.js"; -import { randomBytes } from "crypto"; - -/** - * WasmModule: - * Helper over a webassembly module. - * Assumes a few quirks. - * 1) the module expects wasi_snapshot_preview1 with the methods from getEmptyWasiSdk - * 2) of which the webassembly - * we instantiate only uses random_get (update this if more WASI sdk methods are needed). - */ -export class WasmModule { - private memory!: WebAssembly.Memory; - private heap!: Uint8Array; - private instance?: WebAssembly.Instance; - private mutexQ = new MemoryFifo(); - private debug: DebugLogger; - - /** - * Create a wasm module. Should be followed by await init();. - * @param module - The module as a WebAssembly.Module or a Buffer. - * @param importFn - Imports expected by the WASM. - * @param loggerName - Optional, for debug logging. - */ - constructor( - private module: WebAssembly.Module | Buffer, - private importFn: (module: WasmModule) => any, - loggerName = "wasm" - ) { - this.debug = createDebugLogger(loggerName); - this.mutexQ.put(true); - } - - /** - * Return the wasm source. - * @returns The source. - */ - public getModule(): WebAssembly.Module | Buffer { - return this.module; - } - /** - * Initialize this wasm module. - * @param wasmImportEnv - Linked to a module called "env". Functions implementations referenced from e.g. C++. - * @param initial - 20 pages by default. 20*2**16 \> 1mb stack size plus other overheads. - * @param maximum - 8192 maximum by default. 512mb. - */ - public async init(initial = 20, maximum = 8192) { - this.debug( - `initial mem: ${initial} pages, ${ - (initial * 2 ** 16) / (1024 * 1024) - }mb. max mem: ${maximum} pages, ${(maximum * 2 ** 16) / (1024 * 1024)}mb` - ); - this.memory = new WebAssembly.Memory({ initial, maximum }); - // Create a view over the memory buffer. - // We do this once here, as webkit *seems* bugged out and actually shows this as new memory, - // thus displaying double. It's only worse if we create views on demand. I haven't established yet if - // the bug is also exasperating the termination on mobile due to "excessive memory usage". It could be - // that the OS is actually getting an incorrect reading in the same way the memory profiler does... - // The view will have to be recreated if the memory is grown. See getMemory(). - this.heap = new Uint8Array(this.memory.buffer); - - // We support the wasi 12 SDK, but only implement random_get - /* eslint-disable camelcase */ - const importObj = { - wasi_snapshot_preview1: { - ...getEmptyWasiSdk(this.debug), - random_get: (arr: number, length: number) => { - arr = arr >>> 0; - const heap = this.getMemory(); - const randomData = randomBytes(length); - for (let i = arr; i < arr + length; ++i) { - heap[i] = randomData[i - arr]; - } - }, - }, - env: this.importFn(this), - }; - - if (this.module instanceof WebAssembly.Module) { - this.instance = await WebAssembly.instantiate(this.module, importObj); - } else { - const { instance } = await WebAssembly.instantiate( - this.module, - importObj - ); - this.instance = instance; - } - } - - /** - * The methods or objects exported by the WASM module. - * @returns An indexable object. - */ - public exports(): any { - if (!this.instance) { - throw new Error("WasmModule: not initialized!"); - } - return this.instance.exports; - } - - /** - * Get the current logger. - * @returns Logging function. - */ - public getLogger() { - return this.debug; - } - - /** - * Add a logger. - * @param logger - Function to call when logging. - */ - public addLogger(logger: DebugLogger) { - const oldDebug = this.debug; - this.debug = (...args: any[]) => { - logger(...args); - oldDebug(...args); - }; - } - - /** - * Calls into the WebAssembly. - * @param name - The method name. - * @param args - The arguments to the method. - * @returns The numeric method result. - */ - public call(name: string, ...args: any): number { - if (!this.exports()[name]) { - throw new Error(`WASM function ${name} not found.`); - } - try { - // When returning values from the WASM, use >>> operator to convert - // signed representation to unsigned representation. - return this.exports()[name](...args) >>> 0; - } catch (err: any) { - const message = `WASM function ${name} aborted, error: ${err}`; - this.debug(message); - this.debug(err.stack); - throw new Error(message); - } - } - /** - * Get the memory used by the WASM module. - * @returns A WebAssembly memory object. - */ - public getRawMemory(): WebAssembly.Memory { - return this.memory; - } - /** - * Get the memory used by the WASM module, as a byte array. - * @returns A Uint8Array view of the WASM module memory. - */ - public getMemory(): Uint8Array { - // If the memory is grown, our view over it will be lost. Recreate the view. - if (this.heap.length === 0) { - this.heap = new Uint8Array(this.memory.buffer); - } - return this.heap; - } - - /** - * The memory size in bytes. - * @returns Number of bytes. - */ - public memSize(): number { - return this.getMemory().length; - } - - /** - * Get a slice of memory between two addresses. - * @param start - The start address. - * @param end - The end address. - * @returns A Uint8Array view of memory. - */ - public getMemorySlice(start: number, end: number) { - return this.getMemory().slice(start, end); - } - - /** - * Write data into the heap. - * @param offset - The address to write data at. - * @param arr - The data to write. - */ - public writeMemory(offset: number, arr: Uint8Array) { - const mem = this.getMemory(); - for (let i = 0; i < arr.length; i++) { - mem[i + offset] = arr[i]; - } - } - - /** - * Read WASM memory as a JS string. - * @param addr - The memory address. - * @returns A JS string. - */ - public getMemoryAsString(addr: number) { - addr = addr >>> 0; - const m = this.getMemory(); - let i = addr; - for (; m[i] !== 0; ++i); - return Buffer.from(m.slice(addr, i)).toString("ascii"); - } - - /** - * When calling the wasm, sometimes a caller will require exclusive access over a series of calls. - * E.g. When a result is written to address 0, one cannot have another caller writing to the same address via - * writeMemory before the result is read via sliceMemory. - * Acquire() gets a single token from a fifo. The caller must call release() to add the token back. - */ - public async acquire() { - await this.mutexQ.get(); - } - - /** - * Release the mutex, letting another promise call acquire(). - */ - public release() { - if (this.mutexQ.length() !== 0) { - throw new Error("Release called but not acquired."); - } - this.mutexQ.put(true); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/index.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/browser/index.ts deleted file mode 100644 index ae6a02c0771..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './web_worker.js'; -export * from './web_data_store.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/start_web_module.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/browser/start_web_module.ts deleted file mode 100644 index e6b05bbd365..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/start_web_module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { DispatchMsg, TransportServer, WorkerListener } from '../../transport/index.js'; -import { WasmModule } from '../../wasm/wasm_module.js'; - -/** - * Start the transport server corresponding to this module. - * @param module - The WasmModule to host. - */ -export function startWebModule(module: WasmModule) { - const dispatch = async ({ fn, args }: DispatchMsg) => { - if (fn === '__destroyWorker__') { - transportServer.stop(); - return; - } - if (!(module as any)[fn]) { - throw new Error(`dispatch error, function not found: ${fn}`); - } - return await (module as any)[fn](...args); - }; - const transportListener = new WorkerListener(self); - const transportServer = new TransportServer(transportListener, dispatch); - module.addLogger((...args: any[]) => transportServer.broadcast({ fn: 'emit', args: ['log', ...args] })); - transportServer.start(); -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_data_store.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_data_store.ts deleted file mode 100644 index 79f9c6a60eb..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_data_store.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { DataStore } from '../data_store.js'; -import levelup, { LevelUp } from 'levelup'; -import memdown from 'memdown'; - -/** - * Cache for data used by wasm module. - * Stores in a LevelUp database. - */ -export class WebDataStore implements DataStore { - private db: LevelUp; - - constructor() { - // TODO: The whole point of this is to reduce memory load in the browser. - // Replace with leveljs so the data is stored in indexeddb and not in memory. - // Hack: Cast as any to work around package "broken" with node16 resolution - // See https://github.com/microsoft/TypeScript/issues/49160 - this.db = levelup((memdown as any)()); - } - - /** - * Lookup a key. - * @param key - Key to lookup. - * @returns The buffer. - */ - async get(key: string): Promise { - return await this.db.get(key).catch(() => {}); - } - - /** - * Alter a key. - * @param key - Key to alter. - * @param value - Buffer to store. - */ - async set(key: string, value: Buffer): Promise { - await this.db.put(key, value); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_worker.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_worker.ts deleted file mode 100644 index 2f62882d4d8..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/browser/web_worker.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { WasmModule } from '../../wasm/wasm_module.js'; -import { createDispatchProxy, DispatchMsg, TransportClient, WorkerConnector } from '../../transport/index.js'; -import { WasmWorker } from '../wasm_worker.js'; - -/** - * Instantiate a web worker. - * @param url - The URL. - * @param initialMem - Initial memory pages. - * @param maxMem - Maximum memory pages. - * @returns The worker. - */ -export async function createWebWorker(url: string, initialMem?: number, maxMem?: number): Promise { - const worker = new Worker(url); - const transportConnect = new WorkerConnector(worker); - const transportClient = new TransportClient(transportConnect); - await transportClient.open(); - const remoteModule = createDispatchProxy(WasmModule, transportClient) as WasmWorker; - remoteModule.destroyWorker = async () => { - await transportClient.request({ fn: '__destroyWorker__', args: [] }); - transportClient.close(); - }; - await remoteModule.init(initialMem, maxMem); - return remoteModule; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/data_store.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/data_store.ts deleted file mode 100644 index 4390b2775ee..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/data_store.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Simple read/write interface for wasm modules. - */ -export interface DataStore { - get(key: string): Promise; - set(key: string, value: Buffer): Promise; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/index.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/index.ts deleted file mode 100644 index de4da352751..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { WorkerPool } from './worker_pool.js'; -export { WasmWorker } from './wasm_worker.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/node/index.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/node/index.ts deleted file mode 100644 index 6ac2cfb6ba3..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/node/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './node_worker.js'; -export * from './node_data_store.js'; diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/node/node_data_store.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/node/node_data_store.ts deleted file mode 100644 index d3835350c30..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/node/node_data_store.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { DataStore } from '../data_store.js'; -import levelup, { LevelUp } from 'levelup'; -import leveldown from 'leveldown'; -import memdown from 'memdown'; - -/** - * Cache for data used by wasm module. - */ -export class NodeDataStore implements DataStore { - private db: LevelUp; - - // eslint-disable-next-line - constructor(path?: string) { - // Hack: Cast as any to work around packages "broken" with node16 resolution - // See https://github.com/microsoft/TypeScript/issues/49160 - this.db = levelup(path ? (leveldown as any)(path) : (memdown as any)()); - } - - /** - * Get a value from our DB. - * @param key - The key to look up. - * @returns The value. - */ - async get(key: string): Promise { - return await this.db.get(key).catch(() => {}); - } - - /** - * Set a value in our DB. - * @param key - The key to update. - * @param value - The value to set. - */ - async set(key: string, value: Buffer): Promise { - await this.db.put(key, value); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/node/node_worker.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/node/node_worker.ts deleted file mode 100644 index a11f379196a..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/node/node_worker.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Worker } from 'worker_threads'; -import { createDispatchProxy, DispatchMsg, TransportClient } from '../../transport/index.js'; -import { NodeConnector } from '../../transport/index.js'; -import { WasmModule } from '../../wasm/wasm_module.js'; -import { WasmWorker } from '../wasm_worker.js'; - -/** - * - */ -export async function createNodeWorker(filepath: string, initialMem?: number, maxMem?: number): Promise { - const worker = new Worker(filepath); - const transportConnect = new NodeConnector(worker); - const transportClient = new TransportClient(transportConnect); - await transportClient.open(); - const remoteModule = createDispatchProxy(WasmModule, transportClient) as WasmWorker; - remoteModule.destroyWorker = async () => { - await transportClient.request({ fn: '__destroyWorker__', args: [] }); - transportClient.close(); - }; - await remoteModule.init(initialMem, maxMem); - return remoteModule; -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/node/start_node_module.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/node/start_node_module.ts deleted file mode 100644 index ca0c1c9fd9e..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/node/start_node_module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { parentPort } from 'worker_threads'; -import { NodeListener, DispatchMsg, TransportServer } from '../../transport/index.js'; -import { WasmModule } from '../../wasm/wasm_module.js'; - -if (!parentPort) { - throw new Error('InvalidWorker'); -} - -/** - * Start the transport server corresponding to this module. - * @param module - The WasmModule to host. - */ -export function startNodeModule(module: WasmModule) { - const dispatch = async ({ fn, args }: DispatchMsg) => { - if (fn === '__destroyWorker__') { - transportServer.stop(); - return; - } - if (!(module as any)[fn]) { - throw new Error(`dispatch error, function not found: ${fn}`); - } - return await (module as any)[fn](...args); - }; - const transportListener = new NodeListener(); - const transportServer = new TransportServer(transportListener, dispatch); - module.addLogger((...args: any[]) => transportServer.broadcast({ fn: 'emit', args: ['log', ...args] })); - transportServer.start(); -} diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/wasm_worker.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/wasm_worker.ts deleted file mode 100644 index a9dcb4a7ad2..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/wasm_worker.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Proxify } from '../transport/index.js'; -import { WasmModule } from '../wasm/wasm_module.js'; - -/** - * Represents either a WASM web worker, or node.js worker. - */ -export type WasmWorker = Proxify & { destroyWorker(): void }; diff --git a/yarn-project/.yalc/@aztec/wasm/src/worker/worker_pool.ts b/yarn-project/.yalc/@aztec/wasm/src/worker/worker_pool.ts deleted file mode 100644 index 04d2a2eba60..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/src/worker/worker_pool.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { createDebugLogger } from "@aztec/foundation"; -import { WasmWorker } from "./wasm_worker.js"; - -const debug = createDebugLogger("bb:worker_pool"); - -/** - * Type of a worker factory. - * Used to customize WorkerPool worker construction. - */ -export type CreateWorker = ( - name: string, - minMem: number, - maxMem: number -) => WasmWorker; -/** - * Allocates a pool of WasmWorker's. - * Worker 0 is allocated MAX_PAGES memory pages. This is because worker 0 will need to hold the proving key - * (i.e. Has state), whereas the others are pure compute (they hold a little crs state). - */ -export class WorkerPool { - // TODO(AD): Revisit what this means in aztec 3 context - // -- - // Introduction of low mem prover work (polynomial cache) may actually increase mem usage when the backing store isn't - // enabled. We were seeing intermittent failings related to memory in production for some users when limiting to - // 6660 (416MB). It would be nice to understand why this is (the non determinism and/or the increased mem usage). - // For now, increasing mem usage to 512MB. This maybe preferable to backing out the low mem work, but - // ironically may break the chance of us using it in mobile. - // We *could* enable the low memory backing store, but this needs a little bit of work to actually - // read/write from indexeddb, performance testing, and actual further memory load testing. - // At this point it's hard to know what our memory savings would be relative to just fully reverting the LMP. - // public static MAX_PAGES = 6660; - /** - * The maximum number of memory pages to be used by the webassembly. - */ - public static MAX_PAGES = 8192; - /** - * The workers in the pool. - */ - private workers: WasmWorker[] = []; - - /** - * Create an instance and initialize the workers. - * @param createWorker - Worker factory. - * @param poolSize - Pool size. - * @returns An initialized WorkerPool. - */ - static async new(createWorker: CreateWorker, poolSize: number) { - const pool = new WorkerPool(); - await pool.init(createWorker, poolSize); - return pool; - } - - /** - * Initialize the workers. - * @param createWorker - Worker factory(). - * @param poolSize - Pool size. - * @param maxMem - Max memory pages. - */ - public async init( - createWorker: CreateWorker, - poolSize: number, - maxMem = WorkerPool.MAX_PAGES - ) { - debug(`creating ${poolSize} workers...`); - const start = new Date().getTime(); - this.workers = await Promise.all( - Array(poolSize) - .fill(0) - .map((_, i) => - createWorker( - `${i}`, - i === 0 ? Math.min(WorkerPool.MAX_PAGES, maxMem) : 768, - maxMem - ) - ) - ); - - debug(`created workers: ${new Date().getTime() - start}ms`); - } - - /** - * Tell all workers in the pool to stop processing. - */ - public async destroy() { - await Promise.all(this.workers.map((w) => w.destroyWorker())); - } -} diff --git a/yarn-project/.yalc/@aztec/wasm/tsconfig.dest.json b/yarn-project/.yalc/@aztec/wasm/tsconfig.dest.json deleted file mode 100644 index 965aaa1c433..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/tsconfig.dest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/.yalc/@aztec/wasm/tsconfig.json b/yarn-project/.yalc/@aztec/wasm/tsconfig.json deleted file mode 100644 index f67ddec9fd6..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "..", - "compilerOptions": { - "outDir": "dest", - "rootDir": "src", - "tsBuildInfoFile": ".tsbuildinfo" - }, - "include": ["src"] -} diff --git a/yarn-project/.yalc/@aztec/wasm/yalc.sig b/yarn-project/.yalc/@aztec/wasm/yalc.sig deleted file mode 100644 index 924c15826a5..00000000000 --- a/yarn-project/.yalc/@aztec/wasm/yalc.sig +++ /dev/null @@ -1 +0,0 @@ -49e137843b2fae07ab3c4df8d2229740 \ No newline at end of file diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 5337b382793..90a27186b7c 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -39,6 +39,7 @@ "@aztec/l1-contracts": "workspace:^", "@aztec/p2p": "workspace:^", "@aztec/sequencer-client": "workspace:^", + "@aztec/tx": "workspace:^", "@aztec/world-state": "workspace:^", "tslib": "^2.4.0" }, diff --git a/yarn-project/aztec-node/src/aztec-node/aztec-node.ts b/yarn-project/aztec-node/src/aztec-node/aztec-node.ts index 413bd92b2ec..2b88d8fb971 100644 --- a/yarn-project/aztec-node/src/aztec-node/aztec-node.ts +++ b/yarn-project/aztec-node/src/aztec-node/aztec-node.ts @@ -1,7 +1,8 @@ import { default as levelup } from 'levelup'; import { default as memdown } from 'memdown'; import { L2BlockSource, Archiver } from '@aztec/archiver'; -import { P2P, P2PClient, Tx } from '@aztec/p2p'; +import { P2P, P2PClient } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; import { MerkleTrees, WorldStateSynchroniser, ServerWorldStateSynchroniser, MerkleTreeId } from '@aztec/world-state'; import { SequencerClient } from '@aztec/sequencer-client'; import { AztecNodeConfig } from './config.js'; diff --git a/yarn-project/aztec-node/src/aztec-node/aztec_node.test.ts b/yarn-project/aztec-node/src/aztec-node/aztec_node.test.ts index 5da0b374f83..ccf224a286f 100644 --- a/yarn-project/aztec-node/src/aztec-node/aztec_node.test.ts +++ b/yarn-project/aztec-node/src/aztec-node/aztec_node.test.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/ethereum.js/eth_address'; import { EthereumRpc } from '@aztec/ethereum.js/eth_rpc'; import { WalletProvider } from '@aztec/ethereum.js/provider'; -import { Tx } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; import { AztecNodeConfig } from './config.js'; import { AztecNode } from '../index.js'; import { createProvider, createTx, deployRollupContract, deployYeeterContract } from './fixtures.js'; diff --git a/yarn-project/aztec-node/src/aztec-node/fixtures.ts b/yarn-project/aztec-node/src/aztec-node/fixtures.ts index 5c1825e9b04..77ad85fa068 100644 --- a/yarn-project/aztec-node/src/aztec-node/fixtures.ts +++ b/yarn-project/aztec-node/src/aztec-node/fixtures.ts @@ -27,7 +27,7 @@ import { EthereumRpc } from '@aztec/ethereum.js/eth_rpc'; import { WalletProvider } from '@aztec/ethereum.js/provider'; import { AztecAddress, randomBytes } from '@aztec/foundation'; import { Rollup, Yeeter } from '@aztec/l1-contracts'; -import { Tx } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; // REFACTOR: Move deployment logic to l1-contracts package, and refactor it out of other integration tests (archiver, sequencer) export const deployRollupContract = async (provider: WalletProvider, ethRpc: EthereumRpc) => { diff --git a/yarn-project/aztec-node/tsconfig.dest.json b/yarn-project/aztec-node/tsconfig.dest.json index 512ed2646c1..e8332baf132 100644 --- a/yarn-project/aztec-node/tsconfig.dest.json +++ b/yarn-project/aztec-node/tsconfig.dest.json @@ -21,7 +21,13 @@ }, { "path": "../sequencer-client/tsconfig.dest.json" + }, + { + "path": "../tx/tsconfig.dest.json" } ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} + "exclude": [ + "**/*.test.*", + "**/fixtures/*" + ] +} \ No newline at end of file diff --git a/yarn-project/aztec-node/tsconfig.json b/yarn-project/aztec-node/tsconfig.json index a9095b7ad35..576c35070ab 100644 --- a/yarn-project/aztec-node/tsconfig.json +++ b/yarn-project/aztec-node/tsconfig.json @@ -26,7 +26,13 @@ }, { "path": "../sequencer-client/tsconfig.dest.json" + }, + { + "path": "../tx/tsconfig.dest.json" } ], - "include": ["src", "test"] -} + "include": [ + "src", + "test" + ] +} \ No newline at end of file diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index d359e6d3730..5fc627acee0 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -33,7 +33,7 @@ "@aztec/aztec-node": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/kernel-prover": "workspace:^", - "@aztec/p2p": "workspace:^", + "@aztec/tx": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" }, diff --git a/yarn-project/aztec-rpc/src/account_state/account_state.ts b/yarn-project/aztec-rpc/src/account_state/account_state.ts index 8e5e97e27f9..ade77279b98 100644 --- a/yarn-project/aztec-rpc/src/account_state/account_state.ts +++ b/yarn-project/aztec-rpc/src/account_state/account_state.ts @@ -1,6 +1,7 @@ +import { TxHash } from '@aztec/tx'; + import { AztecAddress } from '../circuits.js'; import { Database } from '../database/index.js'; -import { TxHash } from '../tx/index.js'; export class AccountState { constructor(public readonly publicKey: AztecAddress, private db: Database) {} diff --git a/yarn-project/aztec-rpc/src/aztec_rpc_client/aztec_rpc_client.ts b/yarn-project/aztec-rpc/src/aztec_rpc_client/aztec_rpc_client.ts index 2298494e2fa..74a776d54ae 100644 --- a/yarn-project/aztec-rpc/src/aztec_rpc_client/aztec_rpc_client.ts +++ b/yarn-project/aztec-rpc/src/aztec_rpc_client/aztec_rpc_client.ts @@ -1,7 +1,7 @@ -import { Tx } from '@aztec/p2p'; +import { Tx, TxHash } from '@aztec/tx'; import { AztecAddress, EthAddress, Fr, Signature, TxRequest } from '../circuits.js'; import { ContractAbi } from '../noir.js'; -import { TxHash, TxReceipt } from '../tx/index.js'; +import { TxReceipt } from '../tx/index.js'; export interface AztecRPCClient { addAccount(): Promise; diff --git a/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts b/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts index 6738a5f1722..d98b30e6237 100644 --- a/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts +++ b/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts @@ -2,7 +2,8 @@ import { AcirSimulator } from '@aztec/acir-simulator'; import { AztecNode } from '@aztec/aztec-node'; import { UInt8Vector } from '@aztec/circuits.js'; import { KernelProver } from '@aztec/kernel-prover'; -import { Tx } from '@aztec/p2p'; +import { Tx, TxHash } from '@aztec/tx'; + import { generateFunctionSelector } from '../abi_coder/index.js'; import { AztecRPCClient } from '../aztec_rpc_client/index.js'; import { @@ -20,7 +21,6 @@ import { ContractDao, ContractDataSource } from '../contract_data_source/index.j import { KeyStore } from '../key_store/index.js'; import { ContractAbi } from '../noir.js'; import { Synchroniser } from '../synchroniser/index.js'; -import { TxHash } from '../tx/index.js'; export class AztecRPCServer implements AztecRPCClient { constructor( diff --git a/yarn-project/aztec-rpc/src/database/database.ts b/yarn-project/aztec-rpc/src/database/database.ts index 3e74a51a55f..9f3ba7888c1 100644 --- a/yarn-project/aztec-rpc/src/database/database.ts +++ b/yarn-project/aztec-rpc/src/database/database.ts @@ -1,5 +1,6 @@ +import { TxHash } from '@aztec/tx'; + import { ContractDataSource } from '../contract_data_source/index.js'; -import { TxHash } from '../tx/index.js'; import { TxDao } from './tx_dao.js'; export interface Database extends ContractDataSource { diff --git a/yarn-project/aztec-rpc/src/database/memory_db.ts b/yarn-project/aztec-rpc/src/database/memory_db.ts index cc2215964d0..8663ea0f106 100644 --- a/yarn-project/aztec-rpc/src/database/memory_db.ts +++ b/yarn-project/aztec-rpc/src/database/memory_db.ts @@ -1,5 +1,6 @@ +import { TxHash } from '@aztec/tx'; + import { MemoryContractDataSource } from '../contract_data_source/index.js'; -import { TxHash } from '../tx/index.js'; import { Database } from './database.js'; import { TxDao } from './tx_dao.js'; diff --git a/yarn-project/aztec-rpc/src/database/tx_dao.ts b/yarn-project/aztec-rpc/src/database/tx_dao.ts index 30d0b77b562..0445468428f 100644 --- a/yarn-project/aztec-rpc/src/database/tx_dao.ts +++ b/yarn-project/aztec-rpc/src/database/tx_dao.ts @@ -1,5 +1,6 @@ +import { TxHash } from '@aztec/tx'; + import { AztecAddress } from '../circuits.js'; -import { TxHash } from '../tx/index.js'; export class TxDao { constructor( diff --git a/yarn-project/aztec-rpc/src/index.ts b/yarn-project/aztec-rpc/src/index.ts index 74f07348677..f485eb0fa61 100644 --- a/yarn-project/aztec-rpc/src/index.ts +++ b/yarn-project/aztec-rpc/src/index.ts @@ -3,7 +3,7 @@ export * from './aztec_rpc_client/index.js'; export * from './aztec_rpc_server/index.js'; export * from './tx/index.js'; -export { Tx } from '@aztec/p2p'; +export { Tx, TxHash } from '@aztec/tx'; // TODO - only export necessary stuffs export * from './circuits.js'; export * from './noir.js'; diff --git a/yarn-project/aztec-rpc/src/synchroniser/synchroniser.ts b/yarn-project/aztec-rpc/src/synchroniser/synchroniser.ts index 4976a8fa203..b0183594657 100644 --- a/yarn-project/aztec-rpc/src/synchroniser/synchroniser.ts +++ b/yarn-project/aztec-rpc/src/synchroniser/synchroniser.ts @@ -1,10 +1,10 @@ +import { TxHash } from '@aztec/tx'; import { AztecNode } from '@aztec/aztec-node'; import { InterruptableSleep } from '@aztec/foundation'; import { AccountState } from '../account_state/index.js'; import { AztecAddress, EthAddress } from '../circuits.js'; import { Database } from '../database/index.js'; import { ContractAbi } from '../noir.js'; -import { TxHash } from '../tx/index.js'; export class Synchroniser { private runningPromise?: Promise; diff --git a/yarn-project/aztec-rpc/src/tx/index.ts b/yarn-project/aztec-rpc/src/tx/index.ts index 342a3450227..0576563fb7f 100644 --- a/yarn-project/aztec-rpc/src/tx/index.ts +++ b/yarn-project/aztec-rpc/src/tx/index.ts @@ -1,2 +1 @@ -export * from './tx_hash.js'; export * from './tx_receipt.js'; diff --git a/yarn-project/aztec-rpc/src/tx/tx_receipt.ts b/yarn-project/aztec-rpc/src/tx/tx_receipt.ts index fb0fe8fb1ce..922112b5798 100644 --- a/yarn-project/aztec-rpc/src/tx/tx_receipt.ts +++ b/yarn-project/aztec-rpc/src/tx/tx_receipt.ts @@ -1,5 +1,5 @@ +import { TxHash } from '@aztec/tx'; import { AztecAddress } from '../circuits.js'; -import { TxHash } from './tx_hash.js'; export interface TxReceipt { txHash: TxHash; diff --git a/yarn-project/aztec-rpc/tsconfig.dest.json b/yarn-project/aztec-rpc/tsconfig.dest.json index 95f0c3168cd..90aa413f120 100644 --- a/yarn-project/aztec-rpc/tsconfig.dest.json +++ b/yarn-project/aztec-rpc/tsconfig.dest.json @@ -14,8 +14,11 @@ "path": "../kernel-prover/tsconfig.dest.json" }, { - "path": "../p2p/tsconfig.dest.json" + "path": "../tx/tsconfig.dest.json" } ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} + "exclude": [ + "**/*.test.*", + "**/fixtures/*" + ] +} \ No newline at end of file diff --git a/yarn-project/aztec-rpc/tsconfig.json b/yarn-project/aztec-rpc/tsconfig.json index 88bc72ae571..0560f9843ed 100644 --- a/yarn-project/aztec-rpc/tsconfig.json +++ b/yarn-project/aztec-rpc/tsconfig.json @@ -19,8 +19,10 @@ "path": "../kernel-prover/tsconfig.dest.json" }, { - "path": "../p2p/tsconfig.dest.json" + "path": "../tx/tsconfig.dest.json" } ], - "include": ["src"] -} + "include": [ + "src" + ] +} \ No newline at end of file diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 53c836fa0e3..c0ac7b65354 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -31,6 +31,7 @@ "dependencies": { "@aztec/aztec-rpc": "workspace:^", "@aztec/foundation": "workspace:^", + "@aztec/tx": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -44,4 +45,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/aztec.js/src/contract/sent_tx.ts b/yarn-project/aztec.js/src/contract/sent_tx.ts index ad1dbce0bea..00c9723bbd1 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.ts @@ -1,5 +1,5 @@ -import { AztecRPCClient, TxHash, TxReceipt } from '@aztec/aztec-rpc'; -import { retryUntil } from '../foundation.js'; +import { AztecRPCClient, TxReceipt, TxHash } from '@aztec/aztec-rpc'; +import { retryUntil } from '@aztec/foundation'; export class SentTx { private receipt?: TxReceipt; diff --git a/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts b/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts index d744dd4fbe7..dc67db329c8 100644 --- a/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts +++ b/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts @@ -11,6 +11,7 @@ import { TxReceipt, TxRequest, } from '@aztec/aztec-rpc'; + import { ContractDeployer } from './contract_deployer.js'; describe('Contract Deployer', () => { diff --git a/yarn-project/aztec.js/src/foundation.ts b/yarn-project/aztec.js/src/foundation.ts deleted file mode 100644 index b9b48b88eeb..00000000000 --- a/yarn-project/aztec.js/src/foundation.ts +++ /dev/null @@ -1,63 +0,0 @@ -export function sleep(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -export class Timer { - private start: number; - - constructor() { - this.start = new Date().getTime(); - } - - public ms() { - return new Date().getTime() - this.start; - } - - public s() { - return (new Date().getTime() - this.start) / 1000; - } -} - -export function* backoffGenerator() { - const v = [1, 1, 1, 2, 4, 8, 16, 32, 64]; - let i = 0; - while (true) { - yield v[Math.min(i++, v.length - 1)]; - } -} - -export async function retry(fn: () => Promise, name = 'Operation', backoff = backoffGenerator()) { - while (true) { - try { - return await fn(); - } catch (err: any) { - const s = backoff.next().value; - if (s === undefined) { - throw err; - } - console.log(`${name} failed. Will retry in ${s}s...`); - console.log(err); - await sleep(s * 1000); - continue; - } - } -} - -// Call `fn` repeatedly until it returns true or timeout. -// Both `interval` and `timeout` are seconds. -// Will never timeout if the value is 0. -export async function retryUntil(fn: () => Promise, name = '', timeout = 0, interval = 1) { - const timer = new Timer(); - while (true) { - const result = await fn(); - if (result) { - return result; - } - - await sleep(interval * 1000); - - if (timeout && timer.s() > timeout) { - throw new Error(name ? `Timeout awaiting ${name}` : 'Timeout'); - } - } -} diff --git a/yarn-project/aztec.js/tsconfig.dest.json b/yarn-project/aztec.js/tsconfig.dest.json index 427378e2cb4..db25faf96af 100644 --- a/yarn-project/aztec.js/tsconfig.dest.json +++ b/yarn-project/aztec.js/tsconfig.dest.json @@ -8,5 +8,8 @@ "path": "../foundation/tsconfig.dest.json" } ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} + "exclude": [ + "**/*.test.*", + "**/fixtures/*" + ] +} \ No newline at end of file diff --git a/yarn-project/aztec.js/tsconfig.json b/yarn-project/aztec.js/tsconfig.json index 8df00c9048d..1207b40ad7a 100644 --- a/yarn-project/aztec.js/tsconfig.json +++ b/yarn-project/aztec.js/tsconfig.json @@ -13,5 +13,7 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": ["src"] -} + "include": [ + "src" + ] +} \ No newline at end of file diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 5035cfdec49..307dfb750a5 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -36,7 +36,6 @@ }, "dependencies": { "@aztec/foundation": "workspace:^", - "@aztec/wasm": "workspace:^", "cross-fetch": "^3.1.5", "detect-node": "^2.1.0", "eslint": "^8.35.0", @@ -56,4 +55,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/circuits.js/src/wasm/circuits_wasm.ts b/yarn-project/circuits.js/src/wasm/circuits_wasm.ts index 130cefdc146..a180918e563 100644 --- a/yarn-project/circuits.js/src/wasm/circuits_wasm.ts +++ b/yarn-project/circuits.js/src/wasm/circuits_wasm.ts @@ -1,6 +1,6 @@ import isNode from 'detect-node'; -import { AsyncCallState, AsyncFnState, NodeDataStore, WasmModule, WebDataStore } from '@aztec/wasm'; +import { AsyncCallState, AsyncFnState, NodeDataStore, WasmModule, WebDataStore } from '@aztec/foundation/wasm'; import { readFile } from 'fs/promises'; import { fetch } from 'cross-fetch'; import { dirname } from 'path'; diff --git a/yarn-project/foundation/src/retry/index.ts b/yarn-project/foundation/src/retry/index.ts index b46415e1172..a293108ca6c 100644 --- a/yarn-project/foundation/src/retry/index.ts +++ b/yarn-project/foundation/src/retry/index.ts @@ -29,11 +29,12 @@ export async function retry(fn: () => Promise, name = 'Operation // Call `fn` repeatedly until it returns true or timeout. // Both `interval` and `timeout` are seconds. // Will never timeout if the value is 0. -export async function retryUntil(fn: () => boolean | Promise, name = '', timeout = 0, interval = 1) { +export async function retryUntil(fn: () => Promise, name = '', timeout = 0, interval = 1) { const timer = new Timer(); while (true) { - if (await fn()) { - return; + const result = await fn(); + if (result) { + return result; } await sleep(interval * 1000); diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 613a1361386..fa8a3a5feed 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -32,9 +32,9 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l2-block": "workspace:^", + "@aztec/tx": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" }, diff --git a/yarn-project/p2p/src/client/index.ts b/yarn-project/p2p/src/client/index.ts index a51149dae99..ee127cbba40 100644 --- a/yarn-project/p2p/src/client/index.ts +++ b/yarn-project/p2p/src/client/index.ts @@ -1,2 +1 @@ export * from './p2p_client.js'; -export * from './tx.js'; diff --git a/yarn-project/p2p/src/client/mocks.ts b/yarn-project/p2p/src/client/mocks.ts index c17cac78a34..dfd5bc23793 100644 --- a/yarn-project/p2p/src/client/mocks.ts +++ b/yarn-project/p2p/src/client/mocks.ts @@ -1,7 +1,7 @@ import { L2Block, L2BlockSource } from '@aztec/l2-block'; import { UInt8Vector } from '@aztec/circuits.js'; +import { Tx } from '@aztec/tx'; import { makePrivateKernelPublicInputs } from '@aztec/circuits.js/factories'; -import { Tx } from './tx.js'; export const MockTx = () => { return new Tx(makePrivateKernelPublicInputs(), new UInt8Vector(Buffer.alloc(0))); diff --git a/yarn-project/p2p/src/client/p2p_client.ts b/yarn-project/p2p/src/client/p2p_client.ts index 4d90451f7df..e0fb83ba141 100644 --- a/yarn-project/p2p/src/client/p2p_client.ts +++ b/yarn-project/p2p/src/client/p2p_client.ts @@ -1,8 +1,9 @@ import { createDebugLogger } from '@aztec/foundation'; import { L2Block, L2BlockDownloader, L2BlockSource } from '@aztec/l2-block'; +import { createTxIds, Tx } from '@aztec/tx'; + import { TxPool } from '../tx_pool/index.js'; import { InMemoryTxPool } from '../tx_pool/memory_tx_pool.js'; -import { createTxIds, Tx } from './tx.js'; /** * Enum defining the possible states of the p2p client. diff --git a/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts b/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts index 4d6ed9bd978..fb838315a40 100644 --- a/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts +++ b/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts @@ -1,5 +1,6 @@ import { createDebugLogger } from '@aztec/foundation'; -import { Tx } from '../index.js'; +import { Tx } from '@aztec/tx'; + import { TxPool } from './index.js'; /** diff --git a/yarn-project/p2p/src/tx_pool/tx_pool.ts b/yarn-project/p2p/src/tx_pool/tx_pool.ts index c3134d45418..f7cbe1dd4b1 100644 --- a/yarn-project/p2p/src/tx_pool/tx_pool.ts +++ b/yarn-project/p2p/src/tx_pool/tx_pool.ts @@ -1,4 +1,4 @@ -import { Tx } from '../index.js'; +import { Tx } from '@aztec/tx'; /** * Interface of a transaction pool. The pool includes tx requests and is kept up-to-date by a P2P client. diff --git a/yarn-project/p2p/tsconfig.dest.json b/yarn-project/p2p/tsconfig.dest.json index 610c92b2f2a..2ac294ca2d1 100644 --- a/yarn-project/p2p/tsconfig.dest.json +++ b/yarn-project/p2p/tsconfig.dest.json @@ -1,9 +1,9 @@ { "extends": ".", "references": [ - { "path": "../circuits.js/tsconfig.dest.json" }, { "path": "../foundation/tsconfig.dest.json" }, - { "path": "../l2-block/tsconfig.dest.json" } + { "path": "../l2-block/tsconfig.dest.json" }, + { "path": "../tx/tsconfig.dest.json" } ], "exclude": ["**/*.test.*", "**/fixtures/*"] } diff --git a/yarn-project/p2p/tsconfig.json b/yarn-project/p2p/tsconfig.json index 94cf63740b1..d699ed27896 100644 --- a/yarn-project/p2p/tsconfig.json +++ b/yarn-project/p2p/tsconfig.json @@ -8,9 +8,9 @@ "types": ["node", "jest"] }, "references": [ - { "path": "../circuits.js/tsconfig.dest.json" }, { "path": "../foundation/tsconfig.dest.json" }, - { "path": "../l2-block/tsconfig.dest.json" } + { "path": "../l2-block/tsconfig.dest.json" }, + { "path": "../tx/tsconfig.dest.json" } ], "include": ["src"] } diff --git a/yarn-project/package.json b/yarn-project/package.json index da789364fc1..82db4f48205 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -30,8 +30,8 @@ "prover-client", "aztec-node", "sequencer-client", - "world-state", - ".yalc/*/*" + "tx", + "world-state" ], "prettier": "@aztec/foundation/prettier", "devDependencies": { diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 6724a151b94..9b6c3f0af8b 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -38,6 +38,7 @@ "@aztec/l1-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", "@aztec/p2p": "workspace:^", + "@aztec/tx": "workspace:^", "@aztec/world-state": "workspace:^", "lodash.times": "^4.3.2", "tslib": "^2.4.0" diff --git a/yarn-project/sequencer-client/src/deps/tx.ts b/yarn-project/sequencer-client/src/deps/tx.ts index 5cf22c4b4d2..b49c22aee99 100644 --- a/yarn-project/sequencer-client/src/deps/tx.ts +++ b/yarn-project/sequencer-client/src/deps/tx.ts @@ -24,7 +24,7 @@ import { } from '@aztec/circuits.js'; import { AccumulatedData } from '@aztec/circuits.js'; import { UInt8Vector } from '@aztec/circuits.js'; -import { Tx } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; import times from 'lodash.times'; function frZero() { diff --git a/yarn-project/sequencer-client/src/sequencer/block_builder.ts b/yarn-project/sequencer-client/src/sequencer/block_builder.ts index 905592a60f6..f3dfd6d6cc7 100644 --- a/yarn-project/sequencer-client/src/sequencer/block_builder.ts +++ b/yarn-project/sequencer-client/src/sequencer/block_builder.ts @@ -8,7 +8,7 @@ import { NewContractData, } from '@aztec/circuits.js'; import { MerkleTreeId, MerkleTreeOperations } from '@aztec/world-state'; -import { Tx } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; const mapContractData = (n: NewContractData) => { const contractData = new ContractData(new Fr(n.contractAddress.toBuffer()), n.portalContractAddress); diff --git a/yarn-project/sequencer-client/src/sequencer/circuit_powered_block_builder.ts b/yarn-project/sequencer-client/src/sequencer/circuit_powered_block_builder.ts index 265b3743a26..79084428626 100644 --- a/yarn-project/sequencer-client/src/sequencer/circuit_powered_block_builder.ts +++ b/yarn-project/sequencer-client/src/sequencer/circuit_powered_block_builder.ts @@ -16,7 +16,7 @@ import { RootRollupPublicInputs, VK_TREE_HEIGHT, } from '@aztec/circuits.js'; -import { Tx } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; import { MerkleTreeId, MerkleTreeOperations } from '@aztec/world-state'; import { makeEmptyTx } from '../deps/tx.js'; import { Proof, Prover } from '../prover/index.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/index.ts b/yarn-project/sequencer-client/src/sequencer/index.ts index 46d380e03dd..1eb72333e2b 100644 --- a/yarn-project/sequencer-client/src/sequencer/index.ts +++ b/yarn-project/sequencer-client/src/sequencer/index.ts @@ -1,4 +1,5 @@ -import { P2P, Tx } from '@aztec/p2p'; +import { Tx } from '@aztec/tx'; +import { P2P } from '@aztec/p2p'; import { WorldStateSynchroniser, WorldStateStatus } from '@aztec/world-state'; import { RunningPromise } from '../deps/running_promise.js'; import { L2BlockPublisher } from '../publisher/l2-block-publisher.js'; diff --git a/yarn-project/sequencer-client/tsconfig.dest.json b/yarn-project/sequencer-client/tsconfig.dest.json index 4e375731d11..81e4f6044e2 100644 --- a/yarn-project/sequencer-client/tsconfig.dest.json +++ b/yarn-project/sequencer-client/tsconfig.dest.json @@ -7,6 +7,7 @@ { "path": "../l2-block/tsconfig.dest.json" }, { "path": "../merkle-tree/tsconfig.dest.json" }, { "path": "../p2p/tsconfig.dest.json" }, + { "path": "../tx/tsconfig.dest.json" }, { "path": "../world-state/tsconfig.dest.json" } ] } diff --git a/yarn-project/sequencer-client/tsconfig.json b/yarn-project/sequencer-client/tsconfig.json index 9e18b4db6ed..6e00fde0941 100644 --- a/yarn-project/sequencer-client/tsconfig.json +++ b/yarn-project/sequencer-client/tsconfig.json @@ -12,6 +12,7 @@ { "path": "../l2-block/tsconfig.dest.json" }, { "path": "../merkle-tree/tsconfig.dest.json" }, { "path": "../p2p/tsconfig.dest.json" }, + { "path": "../tx/tsconfig.dest.json" }, { "path": "../world-state/tsconfig.dest.json" } ] } diff --git a/yarn-project/tx/.eslintrc.cjs b/yarn-project/tx/.eslintrc.cjs new file mode 100644 index 00000000000..e659927475c --- /dev/null +++ b/yarn-project/tx/.eslintrc.cjs @@ -0,0 +1 @@ +module.exports = require('@aztec/foundation/eslint'); diff --git a/yarn-project/.yalc/@aztec/wasm/Dockerfile b/yarn-project/tx/Dockerfile similarity index 60% rename from yarn-project/.yalc/@aztec/wasm/Dockerfile rename to yarn-project/tx/Dockerfile index ff060f58035..04a9602280d 100644 --- a/yarn-project/.yalc/@aztec/wasm/Dockerfile +++ b/yarn-project/tx/Dockerfile @@ -1,14 +1,14 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder -COPY wasm wasm -WORKDIR /usr/src/yarn-project/wasm +COPY tx tx +WORKDIR /usr/src/yarn-project/tx RUN yarn build && yarn formatting && yarn test # Prune dev dependencies. See comment in base image. RUN yarn cache clean RUN yarn workspaces focus --production > /dev/null -FROM alpine:latest -COPY --from=builder /usr/src/yarn-project/wasm /usr/src/yarn-project/wasm -WORKDIR /usr/src/yarn-project/wasm +FROM node:18-alpine +COPY --from=builder /usr/src/yarn-project/tx /usr/src/yarn-project/tx +WORKDIR /usr/src/yarn-project/tx ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/tx/README.md b/yarn-project/tx/README.md new file mode 100644 index 00000000000..1dca41485d7 --- /dev/null +++ b/yarn-project/tx/README.md @@ -0,0 +1 @@ +# TX diff --git a/yarn-project/.yalc/@aztec/wasm/package.json b/yarn-project/tx/package.json similarity index 54% rename from yarn-project/.yalc/@aztec/wasm/package.json rename to yarn-project/tx/package.json index 8a766b2290d..9a0f23cb16e 100644 --- a/yarn-project/.yalc/@aztec/wasm/package.json +++ b/yarn-project/tx/package.json @@ -1,19 +1,21 @@ { - "name": "@aztec/wasm", + "name": "@aztec/tx", "version": "0.0.0", "type": "module", "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "wasm", + "displayName": "TXs", "tsconfig": "./tsconfig.dest.json" }, "scripts": { - "build": "yarn clean && yarn formatting && tsc -b tsconfig.dest.json", + "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc -b tsconfig.dest.json --watch", + "start": "node ./dest", + "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", - "fix-eslint": "run -T eslint --fix ./src", - "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 53 ./src", + "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", + "formatting:fix": "run -T prettier -w ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" }, "jest": { @@ -30,13 +32,19 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/foundation": "workspace:^", - "@types/leveldown": "^4.0.3", - "detect-node": "^2.1.0", - "leveldown": "^6.1.1", - "levelup": "^5.1.1", - "memdown": "^6.1.1", + "@aztec/circuits.js": "workspace:^", + "@aztec/l2-block": "workspace:^", + "sha3": "^2.1.4", "tslib": "^2.4.0" }, - "yalcSig": "49e137843b2fae07ab3c4df8d2229740" + "devDependencies": { + "@jest/globals": "^29.4.3", + "@rushstack/eslint-patch": "^1.1.4", + "@types/jest": "^29.4.0", + "@types/node": "^18.14.6", + "jest": "^28.1.3", + "ts-jest": "^28.0.7", + "ts-node": "^10.9.1", + "typescript": "^4.9.5" + } } diff --git a/yarn-project/tx/src/index.ts b/yarn-project/tx/src/index.ts new file mode 100644 index 00000000000..9d063b35c95 --- /dev/null +++ b/yarn-project/tx/src/index.ts @@ -0,0 +1,2 @@ +export * from './tx.js'; +export * from './tx_hash.js'; diff --git a/yarn-project/p2p/src/client/tx.ts b/yarn-project/tx/src/tx.ts similarity index 100% rename from yarn-project/p2p/src/client/tx.ts rename to yarn-project/tx/src/tx.ts diff --git a/yarn-project/aztec-rpc/src/tx/tx_hash.ts b/yarn-project/tx/src/tx_hash.ts similarity index 100% rename from yarn-project/aztec-rpc/src/tx/tx_hash.ts rename to yarn-project/tx/src/tx_hash.ts diff --git a/yarn-project/tx/tsconfig.dest.json b/yarn-project/tx/tsconfig.dest.json new file mode 100644 index 00000000000..4699b81cbb0 --- /dev/null +++ b/yarn-project/tx/tsconfig.dest.json @@ -0,0 +1,7 @@ +{ + "extends": ".", + "references": [ + { "path": "../l2-block/tsconfig.dest.json" } + ], + "exclude": ["**/*.test.*", "**/fixtures/*"] +} diff --git a/yarn-project/tx/tsconfig.json b/yarn-project/tx/tsconfig.json new file mode 100644 index 00000000000..53e00432d3b --- /dev/null +++ b/yarn-project/tx/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "..", + "compilerOptions": { + "outDir": "dest", + "rootDir": "src", + "tsBuildInfoFile": ".tsbuildinfo", + "moduleResolution": "nodenext", + "types": ["node", "jest"] + }, + "references": [ + { "path": "../l2-block/tsconfig.dest.json" } + ], + "include": ["src"] +} diff --git a/yarn-project/typedoc.json b/yarn-project/typedoc.json index cfe21463540..5ed8f4c7261 100644 --- a/yarn-project/typedoc.json +++ b/yarn-project/typedoc.json @@ -16,7 +16,8 @@ "prover-client", "aztec-node", "sequencer-client", + "tx", "world-state", "merkle-tree" ] -} +} \ No newline at end of file diff --git a/yarn-project/yarn-project-base/Dockerfile b/yarn-project/yarn-project-base/Dockerfile index debda24288d..e90cd63cc26 100644 --- a/yarn-project/yarn-project-base/Dockerfile +++ b/yarn-project/yarn-project-base/Dockerfile @@ -34,11 +34,10 @@ COPY circuits.js/package.json circuits.js/package.json COPY p2p/package.json p2p/package.json COPY prover-client/package.json prover-client/package.json COPY sequencer-client/package.json sequencer-client/package.json +COPY tx/package.json tx/package.json COPY world-state/package.json world-state/package.json COPY package.json tsconfig.json yarn.lock .yarnrc.yml ./ COPY .yarn .yarn -# bundled dependencies -COPY .yalc .yalc # Although we're attempting to be "zero-install", in practice we still need to build arch specific packages. RUN yarn --immutable @@ -55,9 +54,9 @@ RUN echo "enableNetwork: false" >> .yarnrc.yml # - Do a `yarn workspaces focus --production` to install production dependencies from the global cache, to .yarn/cache # - A final stage of the build strips away the global cache. RUN /bin/bash -c '\ -[ -d /root/.yarn/berry/cache ] && exit 0; \ -cd .yarn/cache && \ -mkdir -p /root/.yarn/berry/cache && \ -for F in *; do \ + [ -d /root/.yarn/berry/cache ] && exit 0; \ + cd .yarn/cache && \ + mkdir -p /root/.yarn/berry/cache && \ + for F in *; do \ [[ $F =~ (.*-) ]] && ln $F /root/.yarn/berry/cache/${BASH_REMATCH[1]}8.zip; \ -done' + done' diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 4ab6611b0f6..f7540c10446 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -92,6 +92,7 @@ __metadata: "@aztec/l1-contracts": "workspace:^" "@aztec/p2p": "workspace:^" "@aztec/sequencer-client": "workspace:^" + "@aztec/tx": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 @@ -114,7 +115,7 @@ __metadata: "@aztec/aztec-node": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/kernel-prover": "workspace:^" - "@aztec/p2p": "workspace:^" + "@aztec/tx": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -134,6 +135,7 @@ __metadata: dependencies: "@aztec/aztec-rpc": "workspace:^" "@aztec/foundation": "workspace:^" + "@aztec/tx": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -187,7 +189,6 @@ __metadata: resolution: "@aztec/circuits.js@workspace:circuits.js" dependencies: "@aztec/foundation": "workspace:^" - "@aztec/wasm": "workspace:^" "@jest/globals": ^29.4.3 "@types/detect-node": ^2.0.0 "@types/jest": ^29.4.0 @@ -444,9 +445,9 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/p2p@workspace:p2p" dependencies: - "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/l2-block": "workspace:^" + "@aztec/tx": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -486,6 +487,7 @@ __metadata: "@aztec/l1-contracts": "workspace:^" "@aztec/l2-block": "workspace:^" "@aztec/p2p": "workspace:^" + "@aztec/tx": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 @@ -503,17 +505,22 @@ __metadata: languageName: unknown linkType: soft -"@aztec/wasm@workspace:.yalc/@aztec/wasm, @aztec/wasm@workspace:^": +"@aztec/tx@workspace:^, @aztec/tx@workspace:tx": version: 0.0.0-use.local - resolution: "@aztec/wasm@workspace:.yalc/@aztec/wasm" + resolution: "@aztec/tx@workspace:tx" dependencies: - "@aztec/foundation": "workspace:^" - "@types/leveldown": ^4.0.3 - detect-node: ^2.1.0 - leveldown: ^6.1.1 - levelup: ^5.1.1 - memdown: ^6.1.1 + "@aztec/circuits.js": "workspace:^" + "@aztec/l2-block": "workspace:^" + "@jest/globals": ^29.4.3 + "@rushstack/eslint-patch": ^1.1.4 + "@types/jest": ^29.4.0 + "@types/node": ^18.14.6 + jest: ^28.1.3 + sha3: ^2.1.4 + ts-jest: ^28.0.7 + ts-node: ^10.9.1 tslib: ^2.4.0 + typescript: ^4.9.5 languageName: unknown linkType: soft @@ -956,168 +963,168 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/android-arm64@npm:0.17.12" +"@esbuild/android-arm64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/android-arm64@npm:0.17.14" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/android-arm@npm:0.17.12" +"@esbuild/android-arm@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/android-arm@npm:0.17.14" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/android-x64@npm:0.17.12" +"@esbuild/android-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/android-x64@npm:0.17.14" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/darwin-arm64@npm:0.17.12" +"@esbuild/darwin-arm64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/darwin-arm64@npm:0.17.14" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/darwin-x64@npm:0.17.12" +"@esbuild/darwin-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/darwin-x64@npm:0.17.14" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/freebsd-arm64@npm:0.17.12" +"@esbuild/freebsd-arm64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/freebsd-arm64@npm:0.17.14" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/freebsd-x64@npm:0.17.12" +"@esbuild/freebsd-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/freebsd-x64@npm:0.17.14" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-arm64@npm:0.17.12" +"@esbuild/linux-arm64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-arm64@npm:0.17.14" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-arm@npm:0.17.12" +"@esbuild/linux-arm@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-arm@npm:0.17.14" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-ia32@npm:0.17.12" +"@esbuild/linux-ia32@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-ia32@npm:0.17.14" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-loong64@npm:0.17.12" +"@esbuild/linux-loong64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-loong64@npm:0.17.14" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-mips64el@npm:0.17.12" +"@esbuild/linux-mips64el@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-mips64el@npm:0.17.14" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-ppc64@npm:0.17.12" +"@esbuild/linux-ppc64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-ppc64@npm:0.17.14" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-riscv64@npm:0.17.12" +"@esbuild/linux-riscv64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-riscv64@npm:0.17.14" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-s390x@npm:0.17.12" +"@esbuild/linux-s390x@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-s390x@npm:0.17.14" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/linux-x64@npm:0.17.12" +"@esbuild/linux-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/linux-x64@npm:0.17.14" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/netbsd-x64@npm:0.17.12" +"@esbuild/netbsd-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/netbsd-x64@npm:0.17.14" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/openbsd-x64@npm:0.17.12" +"@esbuild/openbsd-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/openbsd-x64@npm:0.17.14" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/sunos-x64@npm:0.17.12" +"@esbuild/sunos-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/sunos-x64@npm:0.17.14" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/win32-arm64@npm:0.17.12" +"@esbuild/win32-arm64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/win32-arm64@npm:0.17.14" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/win32-ia32@npm:0.17.12" +"@esbuild/win32-ia32@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/win32-ia32@npm:0.17.14" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.17.12": - version: 0.17.12 - resolution: "@esbuild/win32-x64@npm:0.17.12" +"@esbuild/win32-x64@npm:0.17.14": + version: 0.17.14 + resolution: "@esbuild/win32-x64@npm:0.17.14" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@eslint-community/eslint-utils@npm:^4.2.0": - version: 4.3.0 - resolution: "@eslint-community/eslint-utils@npm:4.3.0" + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" dependencies: eslint-visitor-keys: ^3.3.0 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: f487760a692f0f1fef76e248ad72976919576ba57edc2b1b1dc1d182553bae6b5bf7b078e654da85d04f0af8a485d20bd26280002768f4fbcd2e330078340cb0 + checksum: cdfe3ae42b4f572cbfb46d20edafe6f36fc5fb52bf2d90875c58aefe226892b9677fef60820e2832caf864a326fe4fc225714c46e8389ccca04d5f9288aabd22 languageName: node linkType: hard @@ -2303,9 +2310,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^18.14.6, @types/node@npm:^18.15.0, @types/node@npm:^18.15.2, @types/node@npm:^18.15.3, @types/node@npm:^18.7.23": - version: 18.15.5 - resolution: "@types/node@npm:18.15.5" - checksum: 5fbf3453bd5ce1402bb2964e55d928fc8a8a7de5451b1b0fe66587fecb8a3eb86854ca9cefa5076a5971e2cff00e1773ceeb5d872a54f6c6ddfbbc1064b4e91a + version: 18.15.10 + resolution: "@types/node@npm:18.15.10" + checksum: 9aeae0b683eda82892def5315812bdee3f1a28c4898b7e70f8e2514564538b16c4dccbe8339c1266f8fc1d707a48f152689264a854f5ebc2eba5011e793612d9 languageName: node linkType: hard @@ -2406,22 +2413,22 @@ __metadata: linkType: hard "@types/yargs@npm:^17.0.8": - version: 17.0.23 - resolution: "@types/yargs@npm:17.0.23" + version: 17.0.24 + resolution: "@types/yargs@npm:17.0.24" dependencies: "@types/yargs-parser": "*" - checksum: c5f787d7a9a36ea94ba5d3f340fc5d93d2860eff8fa9731cd614ed23212e4fca75637e2386e37e376a720e4bf088ceed6f39050f1c3638fc1b75bce5c70b1ad4 + checksum: 5f3ac4dc4f6e211c1627340160fbe2fd247ceba002190da6cf9155af1798450501d628c9165a183f30a224fc68fa5e700490d740ff4c73e2cdef95bc4e8ba7bf languageName: node linkType: hard "@typescript-eslint/eslint-plugin@npm:^5.38.0, @typescript-eslint/eslint-plugin@npm:^5.54.1": - version: 5.56.0 - resolution: "@typescript-eslint/eslint-plugin@npm:5.56.0" + version: 5.57.0 + resolution: "@typescript-eslint/eslint-plugin@npm:5.57.0" dependencies: "@eslint-community/regexpp": ^4.4.0 - "@typescript-eslint/scope-manager": 5.56.0 - "@typescript-eslint/type-utils": 5.56.0 - "@typescript-eslint/utils": 5.56.0 + "@typescript-eslint/scope-manager": 5.57.0 + "@typescript-eslint/type-utils": 5.57.0 + "@typescript-eslint/utils": 5.57.0 debug: ^4.3.4 grapheme-splitter: ^1.0.4 ignore: ^5.2.0 @@ -2434,43 +2441,43 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 2eed4a4ed8279950ad553252e8623e947ffdee39b0d677a13f6e4e2d863ea1cbc5d683ff189e55d0de6fd5a25afd72d3c3a9ab7ae417d5405a21ead907e1b154 + checksum: be13aa74ee6f15f0ae67781c625d9dcf3ce8a3feca2b125eef0cfee850b7f9f0cec23fc56a729ef25926298fe3ea51603ebeee2b93fc9b73fce1410638707177 languageName: node linkType: hard "@typescript-eslint/parser@npm:^5.38.0, @typescript-eslint/parser@npm:^5.54.1": - version: 5.56.0 - resolution: "@typescript-eslint/parser@npm:5.56.0" + version: 5.57.0 + resolution: "@typescript-eslint/parser@npm:5.57.0" dependencies: - "@typescript-eslint/scope-manager": 5.56.0 - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/typescript-estree": 5.56.0 + "@typescript-eslint/scope-manager": 5.57.0 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/typescript-estree": 5.57.0 debug: ^4.3.4 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: eb25490290bd5e22f9c42603dedc0d2d8ee845553e3cf48ea377bd5dc22440d3463f8b84be637b6a2b37cd9ea56b21e4e43007a0a69998948d9c8965c03fe1aa + checksum: b7e8345631911f721591ba970fea5c888f0f3bf2e2ea2dbc3e5b0dc345c0776b62b92c534edfde1379b4b182958a421f35ac26d84705fe6ae7dd37aa675d9493 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/scope-manager@npm:5.56.0" +"@typescript-eslint/scope-manager@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/scope-manager@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/visitor-keys": 5.56.0 - checksum: bacac255ee52148cee6622be2811c0d7e25419058b89f1a11f4c1303faef4535a0a1237549f9556ec1d7a297c640ce4357183a1a8465d72e1393b7d8fb43874b + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/visitor-keys": 5.57.0 + checksum: 4a851f23da2adbf6341b04c1e3f19fcb66415683f26805d3123725d18845bd4a150bd182de0a91279d5682f2568bb5dd831d4ad0bdb70f49d9ca7381cec4dd17 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/type-utils@npm:5.56.0" +"@typescript-eslint/type-utils@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/type-utils@npm:5.57.0" dependencies: - "@typescript-eslint/typescript-estree": 5.56.0 - "@typescript-eslint/utils": 5.56.0 + "@typescript-eslint/typescript-estree": 5.57.0 + "@typescript-eslint/utils": 5.57.0 debug: ^4.3.4 tsutils: ^3.21.0 peerDependencies: @@ -2478,23 +2485,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 3dd1fcfadad18790b900a3d90f6617904adb6b0e2bd1e1edb6ebf239e1399865ca9098647405385feb4252d8b2b4577883e6fd3ef8d00bdd521d6070972d486b + checksum: 649d000edabfe4e567b8a384d0012c56396e40ce2123a78857d4b8da6bf2288627dc355745bd7d4a2877d4cc8a26e1d1dbfc422e6382ac3d3ab431b92eb5b852 languageName: node linkType: hard -"@typescript-eslint/types@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/types@npm:5.56.0" - checksum: 82ca11553bbb1bbfcaf7e7760b03c0d898940238dc002552c21af3e58f7d482c64c3c6cf0666521aff2a1e7b4b58bb6e4d9a00b1e4998a16b5039f5d288d003a +"@typescript-eslint/types@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/types@npm:5.57.0" + checksum: 79a100fb650965f63c01c20e6abd79ca0d2043c3a329b9fef89917d6b9ba3c0f946dca3f14f2975ee6349daadd6ce0e98fde3aafe4b710e5a27abe1adc590c85 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/typescript-estree@npm:5.56.0" +"@typescript-eslint/typescript-estree@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/visitor-keys": 5.56.0 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/visitor-keys": 5.57.0 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -2503,35 +2510,35 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: ec3e85201786aa9adddba7cb834a9f330a7f55c729ee9ccf847dbdc2f7437b760f3774152ccad6d0aa48d13fd78df766c880e3a7ca42e01a20aba0e1a1ed61c5 + checksum: 648b88f88ea6cc293ec67b4c0f4f3c2bf733be7e0f2eee08aadbaec6939fd724a6c287decc336abbf67b9e366cc2c48f2e0e48d8302b533e783f798332a06e83 languageName: node linkType: hard -"@typescript-eslint/utils@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/utils@npm:5.56.0" +"@typescript-eslint/utils@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/utils@npm:5.57.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@types/json-schema": ^7.0.9 "@types/semver": ^7.3.12 - "@typescript-eslint/scope-manager": 5.56.0 - "@typescript-eslint/types": 5.56.0 - "@typescript-eslint/typescript-estree": 5.56.0 + "@typescript-eslint/scope-manager": 5.57.0 + "@typescript-eslint/types": 5.57.0 + "@typescript-eslint/typescript-estree": 5.57.0 eslint-scope: ^5.1.1 semver: ^7.3.7 peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 413e8d4bf7023ee5ba4f695b62e796a1f94930bb92fe5aa0cee58f63b9837116c23f618825a9c671f610e50f5630188b6059b4ed6b05a2a3336f01d8e977becb + checksum: 461258e1194d24c5e642c65ba1afd612712fa8e617ac85cfbbe3dde2557fe4abadedbce19a6954ae0cccbfb92b8a09f38d65a3eedca0394861a5d1c4c893c5ed languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:5.56.0": - version: 5.56.0 - resolution: "@typescript-eslint/visitor-keys@npm:5.56.0" +"@typescript-eslint/visitor-keys@npm:5.57.0": + version: 5.57.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.57.0" dependencies: - "@typescript-eslint/types": 5.56.0 + "@typescript-eslint/types": 5.57.0 eslint-visitor-keys: ^3.3.0 - checksum: 568fda40134e153d7befb59b55698f7919ba780d2d3431d8745feabf2e0fbb8aa7a02173b3c467dd20a0f6594e5248a1f82bb25d6c37827716d77452e86cad29 + checksum: 77d53f74648e48bf1c6313cd60568c2b1539157ac13945f26204a54beb156666c24f3d033dd0db8ed5d1d4595ee63c072732b17132e4488b46763bf8fdcefa49 languageName: node linkType: hard @@ -3133,9 +3140,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001449": - version: 1.0.30001469 - resolution: "caniuse-lite@npm:1.0.30001469" - checksum: 8e496509d7e9ff189c72205675b5db0c5f1b6a09917027441e835efae0848a468a8c4e7d2b409ffc202438fcd23ae53e017f976a03c22c04d12d3c0e1e33e5de + version: 1.0.30001472 + resolution: "caniuse-lite@npm:1.0.30001472" + checksum: 60f2fbe9b7fc6d88c500779ddbebda5fb0ba86eece32ecf3c18d5c1f74e2c36ac5151ed6464f72b6c43c43dc6a3d1ea83c73a195ebb6d2f49738add1f8a0cd4d languageName: node linkType: hard @@ -3662,9 +3669,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.284": - version: 1.4.337 - resolution: "electron-to-chromium@npm:1.4.337" - checksum: b7da59afa5e3239f222c3e146d27757cef10bdcb4180f3f77d7a7d339d1ee7c99d0e281807fe47a865426995a3d1c06809743ca71dddc0aaf65e749e66a8be40 + version: 1.4.341 + resolution: "electron-to-chromium@npm:1.4.341" + checksum: b97377e4e622266953da2c92276b9c0a948ab7e8a0a9c9947da340269f8eb959b8678f76158b78b473a56912c697d89e37a93d82b4d2db84f622e9be7850a540 languageName: node linkType: hard @@ -3744,31 +3751,31 @@ __metadata: linkType: hard "esbuild@npm:^0.17.5": - version: 0.17.12 - resolution: "esbuild@npm:0.17.12" - dependencies: - "@esbuild/android-arm": 0.17.12 - "@esbuild/android-arm64": 0.17.12 - "@esbuild/android-x64": 0.17.12 - "@esbuild/darwin-arm64": 0.17.12 - "@esbuild/darwin-x64": 0.17.12 - "@esbuild/freebsd-arm64": 0.17.12 - "@esbuild/freebsd-x64": 0.17.12 - "@esbuild/linux-arm": 0.17.12 - "@esbuild/linux-arm64": 0.17.12 - "@esbuild/linux-ia32": 0.17.12 - "@esbuild/linux-loong64": 0.17.12 - "@esbuild/linux-mips64el": 0.17.12 - "@esbuild/linux-ppc64": 0.17.12 - "@esbuild/linux-riscv64": 0.17.12 - "@esbuild/linux-s390x": 0.17.12 - "@esbuild/linux-x64": 0.17.12 - "@esbuild/netbsd-x64": 0.17.12 - "@esbuild/openbsd-x64": 0.17.12 - "@esbuild/sunos-x64": 0.17.12 - "@esbuild/win32-arm64": 0.17.12 - "@esbuild/win32-ia32": 0.17.12 - "@esbuild/win32-x64": 0.17.12 + version: 0.17.14 + resolution: "esbuild@npm:0.17.14" + dependencies: + "@esbuild/android-arm": 0.17.14 + "@esbuild/android-arm64": 0.17.14 + "@esbuild/android-x64": 0.17.14 + "@esbuild/darwin-arm64": 0.17.14 + "@esbuild/darwin-x64": 0.17.14 + "@esbuild/freebsd-arm64": 0.17.14 + "@esbuild/freebsd-x64": 0.17.14 + "@esbuild/linux-arm": 0.17.14 + "@esbuild/linux-arm64": 0.17.14 + "@esbuild/linux-ia32": 0.17.14 + "@esbuild/linux-loong64": 0.17.14 + "@esbuild/linux-mips64el": 0.17.14 + "@esbuild/linux-ppc64": 0.17.14 + "@esbuild/linux-riscv64": 0.17.14 + "@esbuild/linux-s390x": 0.17.14 + "@esbuild/linux-x64": 0.17.14 + "@esbuild/netbsd-x64": 0.17.14 + "@esbuild/openbsd-x64": 0.17.14 + "@esbuild/sunos-x64": 0.17.14 + "@esbuild/win32-arm64": 0.17.14 + "@esbuild/win32-ia32": 0.17.14 + "@esbuild/win32-x64": 0.17.14 dependenciesMeta: "@esbuild/android-arm": optional: true @@ -3816,7 +3823,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: ea6d33eb1bc6c9e00dcee5e253c7e935251b4801d376661fd9f19a9dcffc27f970078a6f7116d6c78ee825ceff9b974594b0b616bd560ce4d875a951aa92977b + checksum: 8f4c05f5d3da04f05c48d65f60f3c6422253f406cd56a7ab7a898f0971b0366c454635a6340172874950771dc005a9928dd999b732a6d4caa504b537bfcbf2ff languageName: node linkType: hard @@ -3914,9 +3921,9 @@ __metadata: linkType: hard "eslint-visitor-keys@npm:^3.3.0": - version: 3.3.0 - resolution: "eslint-visitor-keys@npm:3.3.0" - checksum: d59e68a7c5a6d0146526b0eec16ce87fbf97fe46b8281e0d41384224375c4e52f5ffb9e16d48f4ea50785cde93f766b0c898e31ab89978d88b0e1720fbfb7808 + version: 3.4.0 + resolution: "eslint-visitor-keys@npm:3.4.0" + checksum: 33159169462d3989321a1ec1e9aaaf6a24cc403d5d347e9886d1b5bfe18ffa1be73bdc6203143a28a606b142b1af49787f33cff0d6d0813eb5f2e8d2e1a6043c languageName: node linkType: hard @@ -6460,11 +6467,11 @@ __metadata: linkType: hard "nanoid@npm:^3.3.4": - version: 3.3.4 - resolution: "nanoid@npm:3.3.4" + version: 3.3.6 + resolution: "nanoid@npm:3.3.6" bin: nanoid: bin/nanoid.cjs - checksum: 2fddd6dee994b7676f008d3ffa4ab16035a754f4bb586c61df5a22cf8c8c94017aadd360368f47d653829e0569a92b129979152ff97af23a558331e47e37cd9c + checksum: 7d0eda657002738aa5206107bd0580aead6c95c460ef1bdd0b1a87a9c7ae6277ac2e9b945306aaa5b32c6dcb7feaf462d0f552e7f8b5718abfc6ead5c94a71b3 languageName: node linkType: hard @@ -6858,11 +6865,11 @@ __metadata: linkType: hard "prettier@npm:^2.7.1, prettier@npm:^2.8.4": - version: 2.8.6 - resolution: "prettier@npm:2.8.6" + version: 2.8.7 + resolution: "prettier@npm:2.8.7" bin: prettier: bin-prettier.js - checksum: 8ac94fa67aec0e65743ea15ebf954ef2f1e52638abd129dc04e8b49e8bb3224c0233c98df6b5c98efd31bd2a43866590486559438ee4ead09dc81be389068572 + checksum: fdc8f2616f099f5f0d685907f4449a70595a0fc1d081a88919604375989e0d5e9168d6121d8cc6861f21990b31665828e00472544d785d5940ea08a17660c3a6 languageName: node linkType: hard @@ -7025,9 +7032,9 @@ __metadata: linkType: hard "resolve.exports@npm:^2.0.0": - version: 2.0.1 - resolution: "resolve.exports@npm:2.0.1" - checksum: 03be177026b4fe8dc1b2ffb421bce9cbf7fe3446e9f0c958df9fc8e144864b3eeea19fe788e057fd8be6b5655e65ce245b4f379258c1336e2e8f9205cbd4a9b4 + version: 2.0.2 + resolution: "resolve.exports@npm:2.0.2" + checksum: 1c7778ca1b86a94f8ab4055d196c7d87d1874b96df4d7c3e67bbf793140f0717fd506dcafd62785b079cd6086b9264424ad634fb904409764c3509c3df1653f2 languageName: node linkType: hard @@ -7122,8 +7129,8 @@ __metadata: linkType: hard "rollup@npm:^3.18.0": - version: 3.20.1 - resolution: "rollup@npm:3.20.1" + version: 3.20.2 + resolution: "rollup@npm:3.20.2" dependencies: fsevents: ~2.3.2 dependenciesMeta: @@ -7131,7 +7138,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: dc88f337133228311c4d52f005310f2b23ad6d0765b8909698aede1eecde32057ef2ae84e244fd27a45ff944f66f3c120d0b5e163c4642356d2d501df531b798 + checksum: 34b0932839b7c2a5d1742fb21ce95a47e0b49a0849f4abee2dccf25833187aa7babb898ca90d4fc761cffa4102b9ed0ac6ad7f6f6b96c8b8e2d67305abc5da65 languageName: node linkType: hard @@ -8069,8 +8076,8 @@ __metadata: linkType: hard "viem@npm:^0.1.15": - version: 0.1.22 - resolution: "viem@npm:0.1.22" + version: 0.1.23 + resolution: "viem@npm:0.1.23" dependencies: "@noble/hashes": ^1.1.2 "@noble/secp256k1": ^1.7.1 @@ -8079,7 +8086,7 @@ __metadata: idna-uts46-hx: ^4.1.2 isomorphic-ws: ^5.0.0 ws: ^8.12.0 - checksum: 55ca47241c3e7b6a5720909955cbf003c598e2564db0e25dce2f954a3a7894057e1c1bc0e9dda30b1e8007861bc850704b02eed244a3fde96b3dc6ecb7bd77b4 + checksum: c6633539dee2f1f63ab832d904a548e853da0955aa8a95456c990f258fa904597102c520f75a0ee64f9589c593e47eab5227a726604a1a3bf7a5865edb27f591 languageName: node linkType: hard