@aztec/foundation 0.76.4 → 0.77.0-testnet-ignition.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/array/array.d.ts +1 -1
- package/dest/array/array.d.ts.map +1 -1
- package/dest/array/array.js +19 -26
- package/dest/array/index.js +0 -1
- package/dest/async-map/index.js +2 -4
- package/dest/async-pool/index.js +6 -9
- package/dest/bigint-buffer/index.js +6 -13
- package/dest/buffer/buffer32.d.ts +1 -1
- package/dest/buffer/buffer32.d.ts.map +1 -1
- package/dest/buffer/buffer32.js +53 -66
- package/dest/buffer/index.js +0 -1
- package/dest/collection/array.d.ts +1 -1
- package/dest/collection/array.d.ts.map +1 -1
- package/dest/collection/array.js +47 -59
- package/dest/collection/index.js +0 -1
- package/dest/collection/object.js +9 -9
- package/dest/committable/committable.js +15 -20
- package/dest/committable/index.js +0 -1
- package/dest/config/env_var.d.ts +1 -1
- package/dest/config/env_var.d.ts.map +1 -1
- package/dest/config/env_var.js +1 -2
- package/dest/config/index.d.ts +1 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +31 -36
- package/dest/crypto/aes128/index.d.ts +34 -0
- package/dest/crypto/aes128/index.d.ts.map +1 -0
- package/dest/crypto/aes128/index.js +49 -0
- package/dest/crypto/ecdsa/index.d.ts +39 -0
- package/dest/crypto/ecdsa/index.d.ts.map +1 -0
- package/dest/crypto/ecdsa/index.js +88 -0
- package/dest/crypto/ecdsa/signature.d.ts +71 -0
- package/dest/crypto/ecdsa/signature.d.ts.map +1 -0
- package/dest/crypto/ecdsa/signature.js +92 -0
- package/dest/crypto/grumpkin/index.d.ts +47 -0
- package/dest/crypto/grumpkin/index.d.ts.map +1 -0
- package/dest/crypto/grumpkin/index.js +154 -0
- package/dest/crypto/index.d.ts +6 -0
- package/dest/crypto/index.d.ts.map +1 -1
- package/dest/crypto/index.js +6 -1
- package/dest/crypto/keccak/index.js +60 -69
- package/dest/crypto/keys/index.js +2 -3
- package/dest/crypto/pedersen/index.js +0 -1
- package/dest/crypto/pedersen/pedersen.elliptic.js +153 -146
- package/dest/crypto/pedersen/pedersen.noble.js +140 -142
- package/dest/crypto/pedersen/pedersen.wasm.js +17 -16
- package/dest/crypto/poseidon/index.js +15 -19
- package/dest/crypto/random/index.js +7 -12
- package/dest/crypto/random/randomness_singleton.js +12 -12
- package/dest/crypto/schnorr/index.d.ts +30 -0
- package/dest/crypto/schnorr/index.d.ts.map +1 -0
- package/dest/crypto/schnorr/index.js +68 -0
- package/dest/crypto/schnorr/signature.d.ts +70 -0
- package/dest/crypto/schnorr/signature.d.ts.map +1 -0
- package/dest/crypto/schnorr/signature.js +93 -0
- package/dest/crypto/secp256k1/index.d.ts +32 -0
- package/dest/crypto/secp256k1/index.d.ts.map +1 -0
- package/dest/crypto/secp256k1/index.js +116 -0
- package/dest/crypto/secp256k1-signer/index.js +0 -1
- package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts +2 -2
- package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts.map +1 -1
- package/dest/crypto/secp256k1-signer/secp256k1_signer.js +8 -9
- package/dest/crypto/secp256k1-signer/utils.js +11 -16
- package/dest/crypto/serialize.d.ts +53 -0
- package/dest/crypto/serialize.d.ts.map +1 -0
- package/dest/crypto/serialize.js +68 -0
- package/dest/crypto/sha256/index.js +80 -30
- package/dest/crypto/sha512/index.js +2 -4
- package/dest/crypto/signature/index.d.ts +19 -0
- package/dest/crypto/signature/index.d.ts.map +1 -0
- package/dest/crypto/signature/index.js +3 -0
- package/dest/crypto/sync/index.js +1 -2
- package/dest/crypto/sync/pedersen/index.js +14 -13
- package/dest/crypto/sync/poseidon/index.js +10 -14
- package/dest/decorators/index.js +0 -1
- package/dest/decorators/memoize.js +1 -2
- package/dest/error/index.js +6 -19
- package/dest/eth-address/index.js +92 -113
- package/dest/eth-signature/eth_signature.js +21 -27
- package/dest/eth-signature/index.js +0 -1
- package/dest/fields/coordinate.d.ts +1 -1
- package/dest/fields/coordinate.d.ts.map +1 -1
- package/dest/fields/coordinate.js +47 -46
- package/dest/fields/fields.d.ts.map +1 -1
- package/dest/fields/fields.js +112 -126
- package/dest/fields/index.js +0 -1
- package/dest/fields/point.js +119 -129
- package/dest/fs/index.js +0 -1
- package/dest/fs/run_in_dir.d.ts +1 -1
- package/dest/fs/run_in_dir.d.ts.map +1 -1
- package/dest/fs/run_in_dir.js +16 -7
- package/dest/index.d.ts +0 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +0 -3
- package/dest/iterable/all.js +3 -4
- package/dest/iterable/filter.js +10 -11
- package/dest/iterable/index.js +0 -1
- package/dest/iterable/isAsyncIt.js +1 -3
- package/dest/iterable/map.js +10 -11
- package/dest/iterable/peek.js +14 -14
- package/dest/iterable/sort.js +4 -5
- package/dest/iterable/take.js +6 -7
- package/dest/iterable/toArray.js +1 -2
- package/dest/jest/setup.js +7 -0
- package/dest/json-rpc/client/fetch.js +25 -20
- package/dest/json-rpc/client/index.js +0 -1
- package/dest/json-rpc/client/safe_json_rpc_client.js +20 -9
- package/dest/json-rpc/client/undici.d.ts +1 -1
- package/dest/json-rpc/client/undici.d.ts.map +1 -1
- package/dest/json-rpc/client/undici.js +16 -17
- package/dest/json-rpc/convert.d.ts +1 -1
- package/dest/json-rpc/convert.d.ts.map +1 -1
- package/dest/json-rpc/convert.js +10 -20
- package/dest/json-rpc/fixtures/class_a.js +8 -5
- package/dest/json-rpc/fixtures/class_b.js +8 -5
- package/dest/json-rpc/fixtures/test_state.js +53 -40
- package/dest/json-rpc/index.js +0 -1
- package/dest/json-rpc/js_utils.js +2 -5
- package/dest/json-rpc/server/index.js +0 -1
- package/dest/json-rpc/server/safe_json_rpc_server.js +145 -101
- package/dest/json-rpc/server/telemetry.js +0 -2
- package/dest/json-rpc/test/index.js +0 -1
- package/dest/json-rpc/test/integration.d.ts +1 -1
- package/dest/json-rpc/test/integration.d.ts.map +1 -1
- package/dest/json-rpc/test/integration.js +11 -5
- package/dest/log/console.d.ts +1 -1
- package/dest/log/console.d.ts.map +1 -1
- package/dest/log/console.js +14 -16
- package/dest/log/debug.d.ts +1 -1
- package/dest/log/debug.d.ts.map +1 -1
- package/dest/log/debug.js +9 -18
- package/dest/log/gcloud-logger-config.js +17 -15
- package/dest/log/index.d.ts +1 -0
- package/dest/log/index.d.ts.map +1 -1
- package/dest/log/index.js +1 -1
- package/dest/log/libp2p_logger.d.ts +7 -0
- package/dest/log/libp2p_logger.d.ts.map +1 -0
- package/dest/log/libp2p_logger.js +55 -0
- package/dest/log/log-filters.js +14 -13
- package/dest/log/log-levels.js +10 -2
- package/dest/log/log_fn.js +1 -2
- package/dest/log/log_history.js +21 -25
- package/dest/log/pino-logger.d.ts +8 -4
- package/dest/log/pino-logger.d.ts.map +1 -1
- package/dest/log/pino-logger.js +92 -74
- package/dest/message/index.js +7 -3
- package/dest/mutex/index.d.ts +1 -1
- package/dest/mutex/index.d.ts.map +1 -1
- package/dest/mutex/index.js +34 -32
- package/dest/mutex/mutex_database.js +4 -2
- package/dest/noir/index.js +0 -1
- package/dest/noir/noir_package_config.js +13 -8
- package/dest/promise/index.js +0 -1
- package/dest/promise/running-promise.d.ts +8 -2
- package/dest/promise/running-promise.d.ts.map +1 -1
- package/dest/promise/running-promise.js +44 -31
- package/dest/promise/utils.js +3 -5
- package/dest/queue/base_memory_queue.js +51 -59
- package/dest/queue/batch_queue.js +34 -27
- package/dest/queue/bounded_serial_queue.js +41 -51
- package/dest/queue/fifo_memory_queue.d.ts +1 -1
- package/dest/queue/fifo_memory_queue.d.ts.map +1 -1
- package/dest/queue/fifo_memory_queue.js +4 -8
- package/dest/queue/index.js +0 -1
- package/dest/queue/priority_memory_queue.js +3 -4
- package/dest/queue/priority_queue.js +5 -5
- package/dest/queue/semaphore.js +15 -19
- package/dest/queue/serial_queue.js +37 -47
- package/dest/retry/index.js +21 -18
- package/dest/running-promise/index.js +0 -1
- package/dest/schemas/api.d.ts +2 -2
- package/dest/schemas/api.d.ts.map +1 -1
- package/dest/schemas/api.js +2 -7
- package/dest/schemas/index.d.ts +1 -1
- package/dest/schemas/index.d.ts.map +1 -1
- package/dest/schemas/index.js +1 -2
- package/dest/schemas/parse.js +4 -8
- package/dest/schemas/schemas.d.ts +1 -16
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +28 -56
- package/dest/schemas/types.d.ts +1 -1
- package/dest/schemas/types.d.ts.map +1 -1
- package/dest/schemas/types.js +1 -2
- package/dest/schemas/utils.d.ts +1 -1
- package/dest/schemas/utils.d.ts.map +1 -1
- package/dest/schemas/utils.js +18 -31
- package/dest/serialize/buffer_reader.d.ts +1 -1
- package/dest/serialize/buffer_reader.d.ts.map +1 -1
- package/dest/serialize/buffer_reader.js +164 -188
- package/dest/serialize/field_reader.d.ts +1 -1
- package/dest/serialize/field_reader.d.ts.map +1 -1
- package/dest/serialize/field_reader.js +70 -79
- package/dest/serialize/free_funcs.d.ts +1 -1
- package/dest/serialize/free_funcs.d.ts.map +1 -1
- package/dest/serialize/free_funcs.js +40 -37
- package/dest/serialize/index.js +0 -1
- package/dest/serialize/serialize.js +72 -83
- package/dest/serialize/type_registry.js +10 -14
- package/dest/serialize/types.js +4 -5
- package/dest/sleep/index.js +25 -29
- package/dest/string/index.js +0 -1
- package/dest/testing/files/index.js +3 -7
- package/dest/testing/index.js +0 -1
- package/dest/testing/port_allocator.js +7 -10
- package/dest/testing/snapshot_serializer.d.ts +1 -1
- package/dest/testing/snapshot_serializer.d.ts.map +1 -1
- package/dest/testing/snapshot_serializer.js +14 -9
- package/dest/testing/test_data.js +7 -8
- package/dest/timer/date.js +9 -7
- package/dest/timer/elapsed.js +10 -7
- package/dest/timer/index.js +0 -1
- package/dest/timer/timeout.js +34 -34
- package/dest/timer/timer.js +17 -21
- package/dest/transport/browser/index.js +0 -1
- package/dest/transport/browser/message_port_socket.d.ts +1 -1
- package/dest/transport/browser/message_port_socket.d.ts.map +1 -1
- package/dest/transport/browser/message_port_socket.js +26 -30
- package/dest/transport/browser/shared_worker_connector.d.ts +1 -1
- package/dest/transport/browser/shared_worker_connector.d.ts.map +1 -1
- package/dest/transport/browser/shared_worker_connector.js +8 -10
- package/dest/transport/browser/shared_worker_listener.d.ts +1 -1
- package/dest/transport/browser/shared_worker_listener.d.ts.map +1 -1
- package/dest/transport/browser/shared_worker_listener.js +13 -17
- package/dest/transport/browser/worker_connector.d.ts +1 -1
- package/dest/transport/browser/worker_connector.d.ts.map +1 -1
- package/dest/transport/browser/worker_connector.js +12 -12
- package/dest/transport/browser/worker_listener.d.ts +1 -1
- package/dest/transport/browser/worker_listener.d.ts.map +1 -1
- package/dest/transport/browser/worker_listener.js +13 -17
- package/dest/transport/dispatch/create_dispatch_fn.js +2 -4
- package/dest/transport/dispatch/create_dispatch_proxy.d.ts +2 -2
- package/dest/transport/dispatch/create_dispatch_proxy.d.ts.map +1 -1
- package/dest/transport/dispatch/create_dispatch_proxy.js +16 -13
- package/dest/transport/dispatch/messages.js +4 -3
- package/dest/transport/index.js +0 -1
- package/dest/transport/interface/connector.d.ts +1 -1
- package/dest/transport/interface/connector.d.ts.map +1 -1
- package/dest/transport/interface/connector.js +3 -2
- package/dest/transport/interface/listener.d.ts +1 -1
- package/dest/transport/interface/listener.d.ts.map +1 -1
- package/dest/transport/interface/listener.js +4 -2
- package/dest/transport/interface/socket.js +7 -2
- package/dest/transport/interface/transferable.js +7 -9
- package/dest/transport/node/index.js +0 -1
- package/dest/transport/node/node_connector.d.ts +2 -2
- package/dest/transport/node/node_connector.d.ts.map +1 -1
- package/dest/transport/node/node_connector.js +9 -11
- package/dest/transport/node/node_connector_socket.d.ts +2 -2
- package/dest/transport/node/node_connector_socket.d.ts.map +1 -1
- package/dest/transport/node/node_connector_socket.js +21 -25
- package/dest/transport/node/node_listener.d.ts +1 -1
- package/dest/transport/node/node_listener.d.ts.map +1 -1
- package/dest/transport/node/node_listener.js +11 -15
- package/dest/transport/node/node_listener_socket.d.ts +2 -2
- package/dest/transport/node/node_listener_socket.d.ts.map +1 -1
- package/dest/transport/node/node_listener_socket.js +23 -27
- package/dest/transport/transport_client.d.ts +1 -1
- package/dest/transport/transport_client.d.ts.map +1 -1
- package/dest/transport/transport_client.js +47 -46
- package/dest/transport/transport_server.d.ts +1 -1
- package/dest/transport/transport_server.d.ts.map +1 -1
- package/dest/transport/transport_server.js +68 -55
- package/dest/trees/hasher.d.ts +39 -0
- package/dest/trees/hasher.d.ts.map +1 -0
- package/dest/trees/hasher.js +5 -0
- package/dest/trees/index.d.ts +8 -56
- package/dest/trees/index.d.ts.map +1 -1
- package/dest/trees/index.js +8 -1
- package/dest/trees/indexed_merkle_tree.d.ts +13 -0
- package/dest/trees/indexed_merkle_tree.d.ts.map +1 -0
- package/dest/trees/indexed_merkle_tree.js +27 -0
- package/dest/trees/indexed_merkle_tree_calculator.d.ts +23 -0
- package/dest/trees/indexed_merkle_tree_calculator.d.ts.map +1 -0
- package/dest/trees/indexed_merkle_tree_calculator.js +83 -0
- package/dest/trees/indexed_tree_leaf.d.ts +57 -0
- package/dest/trees/indexed_tree_leaf.d.ts.map +1 -0
- package/dest/trees/indexed_tree_leaf.js +5 -0
- package/dest/trees/membership_witness.d.ts +62 -0
- package/dest/trees/membership_witness.d.ts.map +1 -0
- package/dest/trees/membership_witness.js +70 -0
- package/dest/trees/merkle_tree.d.ts +18 -0
- package/dest/trees/merkle_tree.d.ts.map +1 -0
- package/dest/trees/merkle_tree.js +58 -0
- package/dest/trees/merkle_tree_calculator.d.ts +16 -0
- package/dest/trees/merkle_tree_calculator.d.ts.map +1 -0
- package/dest/trees/merkle_tree_calculator.js +61 -0
- package/dest/trees/sibling_path.d.ts +132 -0
- package/dest/trees/sibling_path.d.ts.map +1 -0
- package/dest/trees/sibling_path.js +144 -0
- package/dest/trees/unbalanced_merkle_tree.d.ts +1 -1
- package/dest/trees/unbalanced_merkle_tree.d.ts.map +1 -1
- package/dest/trees/unbalanced_merkle_tree.js +28 -18
- package/dest/trees/unbalanced_tree_store.js +43 -29
- package/dest/types/index.js +1 -3
- package/dest/url/index.js +4 -8
- package/dest/validation/index.js +2 -5
- package/dest/wasm/empty_wasi_sdk.js +142 -160
- package/dest/wasm/index.d.ts +1 -1
- package/dest/wasm/index.d.ts.map +1 -1
- package/dest/wasm/index.js +0 -1
- package/dest/wasm/wasm_module.js +80 -90
- package/dest/worker/browser/index.js +0 -1
- package/dest/worker/browser/start_web_module.d.ts +1 -1
- package/dest/worker/browser/start_web_module.d.ts.map +1 -1
- package/dest/worker/browser/start_web_module.js +9 -5
- package/dest/worker/browser/web_data_store.d.ts +1 -1
- package/dest/worker/browser/web_data_store.d.ts.map +1 -1
- package/dest/worker/browser/web_data_store.js +12 -15
- package/dest/worker/browser/web_worker.d.ts +1 -1
- package/dest/worker/browser/web_worker.d.ts.map +1 -1
- package/dest/worker/browser/web_worker.js +6 -5
- package/dest/worker/data_store.js +3 -2
- package/dest/worker/index.d.ts +1 -1
- package/dest/worker/index.d.ts.map +1 -1
- package/dest/worker/index.js +0 -1
- package/dest/worker/node/index.js +0 -1
- package/dest/worker/node/node_data_store.d.ts +1 -1
- package/dest/worker/node/node_data_store.d.ts.map +1 -1
- package/dest/worker/node/node_data_store.js +4 -5
- package/dest/worker/node/node_worker.d.ts +1 -1
- package/dest/worker/node/node_worker.d.ts.map +1 -1
- package/dest/worker/node/node_worker.js +6 -5
- package/dest/worker/node/start_node_module.d.ts +1 -1
- package/dest/worker/node/start_node_module.d.ts.map +1 -1
- package/dest/worker/node/start_node_module.js +9 -5
- package/dest/worker/wasm_worker.d.ts +2 -2
- package/dest/worker/wasm_worker.d.ts.map +1 -1
- package/dest/worker/wasm_worker.js +3 -2
- package/dest/worker/worker_pool.d.ts +1 -1
- package/dest/worker/worker_pool.d.ts.map +1 -1
- package/dest/worker/worker_pool.js +32 -43
- package/package.json +5 -5
- package/src/array/array.ts +1 -1
- package/src/buffer/buffer32.ts +1 -1
- package/src/collection/array.ts +1 -1
- package/src/config/env_var.ts +7 -5
- package/src/config/index.ts +1 -1
- package/src/crypto/aes128/index.ts +59 -0
- package/src/crypto/ecdsa/index.ts +70 -0
- package/src/crypto/ecdsa/signature.ts +100 -0
- package/src/crypto/grumpkin/index.ts +97 -0
- package/src/crypto/index.ts +6 -0
- package/src/crypto/keys/index.ts +1 -1
- package/src/crypto/pedersen/pedersen.wasm.ts +3 -3
- package/src/crypto/poseidon/index.ts +5 -5
- package/src/crypto/schnorr/index.ts +55 -0
- package/src/crypto/schnorr/signature.ts +116 -0
- package/src/crypto/secp256k1/index.ts +57 -0
- package/src/crypto/secp256k1-signer/secp256k1_signer.ts +2 -2
- package/src/crypto/serialize.ts +85 -0
- package/src/crypto/signature/index.ts +17 -0
- package/src/crypto/sync/index.ts +1 -1
- package/src/fields/coordinate.ts +1 -1
- package/src/fields/fields.ts +2 -1
- package/src/fs/run_in_dir.ts +8 -1
- package/src/index.ts +0 -2
- package/src/json-rpc/client/undici.ts +1 -1
- package/src/json-rpc/convert.ts +1 -1
- package/src/json-rpc/server/safe_json_rpc_server.ts +1 -1
- package/src/json-rpc/test/integration.ts +1 -1
- package/src/log/console.ts +1 -1
- package/src/log/debug.ts +1 -1
- package/src/log/gcloud-logger-config.ts +1 -1
- package/src/log/index.ts +1 -0
- package/src/log/libp2p_logger.ts +67 -0
- package/src/log/pino-logger.ts +16 -16
- package/src/mutex/index.ts +1 -1
- package/src/promise/running-promise.ts +24 -5
- package/src/queue/fifo_memory_queue.ts +1 -1
- package/src/schemas/api.ts +2 -2
- package/src/schemas/index.ts +1 -1
- package/src/schemas/schemas.ts +2 -26
- package/src/schemas/types.ts +1 -1
- package/src/schemas/utils.ts +1 -1
- package/src/serialize/buffer_reader.ts +1 -1
- package/src/serialize/field_reader.ts +1 -1
- package/src/serialize/free_funcs.ts +1 -1
- package/src/testing/snapshot_serializer.ts +1 -1
- package/src/transport/browser/message_port_socket.ts +1 -1
- package/src/transport/browser/shared_worker_connector.ts +1 -1
- package/src/transport/browser/shared_worker_listener.ts +1 -1
- package/src/transport/browser/worker_connector.ts +1 -1
- package/src/transport/browser/worker_listener.ts +1 -1
- package/src/transport/dispatch/create_dispatch_proxy.ts +2 -2
- package/src/transport/interface/connector.ts +1 -1
- package/src/transport/interface/listener.ts +1 -1
- package/src/transport/node/node_connector.ts +2 -2
- package/src/transport/node/node_connector_socket.ts +2 -2
- package/src/transport/node/node_listener.ts +1 -1
- package/src/transport/node/node_listener_socket.ts +2 -2
- package/src/transport/transport_client.ts +2 -2
- package/src/transport/transport_server.ts +3 -3
- package/src/trees/hasher.ts +39 -0
- package/src/trees/index.ts +8 -57
- package/src/trees/indexed_merkle_tree.ts +36 -0
- package/src/trees/indexed_merkle_tree_calculator.ts +94 -0
- package/src/trees/indexed_tree_leaf.ts +56 -0
- package/src/trees/membership_witness.ts +99 -0
- package/src/trees/merkle_tree.ts +72 -0
- package/src/trees/merkle_tree_calculator.ts +67 -0
- package/src/trees/sibling_path.ts +183 -0
- package/src/trees/unbalanced_merkle_tree.ts +2 -2
- package/src/wasm/index.ts +1 -1
- package/src/worker/browser/start_web_module.ts +1 -1
- package/src/worker/browser/web_data_store.ts +1 -1
- package/src/worker/browser/web_worker.ts +1 -1
- package/src/worker/index.ts +1 -1
- package/src/worker/node/node_data_store.ts +1 -1
- package/src/worker/node/node_worker.ts +1 -1
- package/src/worker/node/start_node_module.ts +1 -1
- package/src/worker/wasm_worker.ts +2 -2
- package/src/worker/worker_pool.ts +1 -1
- package/dest/abi/abi.d.ts +0 -853
- package/dest/abi/abi.d.ts.map +0 -1
- package/dest/abi/abi.js +0 -214
- package/dest/abi/buffer.d.ts +0 -18
- package/dest/abi/buffer.d.ts.map +0 -1
- package/dest/abi/buffer.js +0 -34
- package/dest/abi/decoder.d.ts +0 -58
- package/dest/abi/decoder.d.ts.map +0 -1
- package/dest/abi/decoder.js +0 -180
- package/dest/abi/encoder.d.ts +0 -16
- package/dest/abi/encoder.d.ts.map +0 -1
- package/dest/abi/encoder.js +0 -174
- package/dest/abi/event_selector.d.ts +0 -52
- package/dest/abi/event_selector.d.ts.map +0 -1
- package/dest/abi/event_selector.js +0 -76
- package/dest/abi/function_selector.d.ts +0 -65
- package/dest/abi/function_selector.d.ts.map +0 -1
- package/dest/abi/function_selector.js +0 -92
- package/dest/abi/index.d.ts +0 -10
- package/dest/abi/index.d.ts.map +0 -1
- package/dest/abi/index.js +0 -10
- package/dest/abi/note_selector.d.ts +0 -42
- package/dest/abi/note_selector.d.ts.map +0 -1
- package/dest/abi/note_selector.js +0 -63
- package/dest/abi/selector.d.ts +0 -42
- package/dest/abi/selector.d.ts.map +0 -1
- package/dest/abi/selector.js +0 -57
- package/dest/abi/u128.d.ts +0 -13
- package/dest/abi/u128.d.ts.map +0 -1
- package/dest/abi/u128.js +0 -58
- package/dest/abi/utils.d.ts +0 -44
- package/dest/abi/utils.d.ts.map +0 -1
- package/dest/abi/utils.js +0 -72
- package/dest/aztec-address/index.d.ts +0 -57
- package/dest/aztec-address/index.d.ts.map +0 -1
- package/dest/aztec-address/index.js +0 -114
- package/src/abi/abi.ts +0 -504
- package/src/abi/buffer.ts +0 -36
- package/src/abi/decoder.ts +0 -195
- package/src/abi/encoder.ts +0 -170
- package/src/abi/event_selector.ts +0 -92
- package/src/abi/function_selector.ts +0 -124
- package/src/abi/index.ts +0 -9
- package/src/abi/note_selector.ts +0 -78
- package/src/abi/selector.ts +0 -64
- package/src/abi/u128.ts +0 -71
- package/src/abi/utils.ts +0 -86
- package/src/aztec-address/index.ts +0 -146
package/dest/abi/abi.d.ts
DELETED
|
@@ -1,853 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { type Fr } from '../fields/fields.js';
|
|
5
|
-
import { type ZodFor } from '../schemas/types.js';
|
|
6
|
-
import { FunctionSelector } from './function_selector.js';
|
|
7
|
-
import { type NoteSelector } from './note_selector.js';
|
|
8
|
-
/** A basic value. */
|
|
9
|
-
export interface BasicValue<T extends string, V> {
|
|
10
|
-
/** The kind of the value. */
|
|
11
|
-
kind: T;
|
|
12
|
-
value: V;
|
|
13
|
-
}
|
|
14
|
-
/** An exported value. */
|
|
15
|
-
export type AbiValue = BasicValue<'boolean', boolean> | BasicValue<'string', string> | BasicValue<'array', AbiValue[]> | TupleValue | IntegerValue | StructValue;
|
|
16
|
-
export declare const AbiValueSchema: z.ZodType<AbiValue>;
|
|
17
|
-
export type TypedStructFieldValue<T> = {
|
|
18
|
-
name: string;
|
|
19
|
-
value: T;
|
|
20
|
-
};
|
|
21
|
-
export interface StructValue {
|
|
22
|
-
kind: 'struct';
|
|
23
|
-
fields: TypedStructFieldValue<AbiValue>[];
|
|
24
|
-
}
|
|
25
|
-
export interface TupleValue {
|
|
26
|
-
kind: 'tuple';
|
|
27
|
-
fields: AbiValue[];
|
|
28
|
-
}
|
|
29
|
-
export interface IntegerValue extends BasicValue<'integer', string> {
|
|
30
|
-
sign: boolean;
|
|
31
|
-
}
|
|
32
|
-
/** Indicates whether a parameter is public or secret/private. */
|
|
33
|
-
export declare const ABIParameterVisibility: readonly ["public", "private", "databus"];
|
|
34
|
-
/** Indicates whether a parameter is public or secret/private. */
|
|
35
|
-
export type ABIParameterVisibility = (typeof ABIParameterVisibility)[number];
|
|
36
|
-
/** A basic type. */
|
|
37
|
-
export interface BasicType<T extends string> {
|
|
38
|
-
/** The kind of the type. */
|
|
39
|
-
kind: T;
|
|
40
|
-
}
|
|
41
|
-
/** Sign for numeric types. */
|
|
42
|
-
declare const Sign: readonly ["unsigned", "signed"];
|
|
43
|
-
type Sign = (typeof Sign)[number];
|
|
44
|
-
/** A variable type. */
|
|
45
|
-
export type AbiType = BasicType<'field'> | BasicType<'boolean'> | IntegerType | ArrayType | StringType | StructType | TupleType;
|
|
46
|
-
export declare const AbiTypeSchema: z.ZodType<AbiType>;
|
|
47
|
-
/** A named type. */
|
|
48
|
-
export declare const ABIVariableSchema: z.ZodObject<{
|
|
49
|
-
/** The name of the variable. */
|
|
50
|
-
name: z.ZodString;
|
|
51
|
-
/** The type of the variable. */
|
|
52
|
-
type: z.ZodType<AbiType, z.ZodTypeDef, AbiType>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
name: string;
|
|
55
|
-
type: AbiType;
|
|
56
|
-
}, {
|
|
57
|
-
name: string;
|
|
58
|
-
type: AbiType;
|
|
59
|
-
}>;
|
|
60
|
-
/** A named type. */
|
|
61
|
-
export type ABIVariable = z.infer<typeof ABIVariableSchema>;
|
|
62
|
-
/** A function parameter. */
|
|
63
|
-
export declare const ABIParameterSchema: z.ZodIntersection<z.ZodObject<{
|
|
64
|
-
/** The name of the variable. */
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
/** The type of the variable. */
|
|
67
|
-
type: z.ZodType<AbiType, z.ZodTypeDef, AbiType>;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
name: string;
|
|
70
|
-
type: AbiType;
|
|
71
|
-
}, {
|
|
72
|
-
name: string;
|
|
73
|
-
type: AbiType;
|
|
74
|
-
}>, z.ZodObject<{
|
|
75
|
-
/** Visibility of the parameter in the function. */
|
|
76
|
-
visibility: z.ZodEnum<["public", "private", "databus"]>;
|
|
77
|
-
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
visibility: "public" | "private" | "databus";
|
|
79
|
-
}, {
|
|
80
|
-
visibility: "public" | "private" | "databus";
|
|
81
|
-
}>>;
|
|
82
|
-
/** A function parameter. */
|
|
83
|
-
export type ABIParameter = z.infer<typeof ABIParameterSchema>;
|
|
84
|
-
/** An integer type. */
|
|
85
|
-
export interface IntegerType extends BasicType<'integer'> {
|
|
86
|
-
/** The sign of the integer. */
|
|
87
|
-
sign: Sign;
|
|
88
|
-
/** The width of the integer in bits. */
|
|
89
|
-
width: number;
|
|
90
|
-
}
|
|
91
|
-
/** An array type. */
|
|
92
|
-
export interface ArrayType extends BasicType<'array'> {
|
|
93
|
-
/** The length of the array. */
|
|
94
|
-
length: number;
|
|
95
|
-
/** The type of the array elements. */
|
|
96
|
-
type: AbiType;
|
|
97
|
-
}
|
|
98
|
-
/** A tuple type. */
|
|
99
|
-
export interface TupleType extends BasicType<'tuple'> {
|
|
100
|
-
/** The types of the tuple elements. */
|
|
101
|
-
fields: AbiType[];
|
|
102
|
-
}
|
|
103
|
-
/** A string type. */
|
|
104
|
-
export interface StringType extends BasicType<'string'> {
|
|
105
|
-
/** The length of the string. */
|
|
106
|
-
length: number;
|
|
107
|
-
}
|
|
108
|
-
/** A struct type. */
|
|
109
|
-
export interface StructType extends BasicType<'struct'> {
|
|
110
|
-
/** The fields of the struct. */
|
|
111
|
-
fields: ABIVariable[];
|
|
112
|
-
/** Fully qualified name of the struct. */
|
|
113
|
-
path: string;
|
|
114
|
-
}
|
|
115
|
-
/** An error could be a custom error of any regular type or a string error. */
|
|
116
|
-
export type AbiErrorType = {
|
|
117
|
-
error_kind: 'string';
|
|
118
|
-
string: string;
|
|
119
|
-
} | {
|
|
120
|
-
error_kind: 'fmtstring';
|
|
121
|
-
length: number;
|
|
122
|
-
item_types: AbiType[];
|
|
123
|
-
} | ({
|
|
124
|
-
error_kind: 'custom';
|
|
125
|
-
} & AbiType);
|
|
126
|
-
/** Aztec.nr function types. */
|
|
127
|
-
export declare enum FunctionType {
|
|
128
|
-
PRIVATE = "private",
|
|
129
|
-
PUBLIC = "public",
|
|
130
|
-
UNCONSTRAINED = "unconstrained"
|
|
131
|
-
}
|
|
132
|
-
/** The abi entry of a function. */
|
|
133
|
-
export interface FunctionAbi {
|
|
134
|
-
/** The name of the function. */
|
|
135
|
-
name: string;
|
|
136
|
-
/** Whether the function is secret. */
|
|
137
|
-
functionType: FunctionType;
|
|
138
|
-
/** Whether the function is internal. */
|
|
139
|
-
isInternal: boolean;
|
|
140
|
-
/** Whether the function can alter state or not */
|
|
141
|
-
isStatic: boolean;
|
|
142
|
-
/** Function parameters. */
|
|
143
|
-
parameters: ABIParameter[];
|
|
144
|
-
/** The types of the return values. */
|
|
145
|
-
returnTypes: AbiType[];
|
|
146
|
-
/** The types of the errors that the function can throw. */
|
|
147
|
-
errorTypes: Partial<Record<string, AbiErrorType>>;
|
|
148
|
-
/** Whether the function is flagged as an initializer. */
|
|
149
|
-
isInitializer: boolean;
|
|
150
|
-
}
|
|
151
|
-
export declare const FunctionAbiSchema: z.ZodObject<{
|
|
152
|
-
name: z.ZodString;
|
|
153
|
-
functionType: z.ZodNativeEnum<typeof FunctionType>;
|
|
154
|
-
isInternal: z.ZodBoolean;
|
|
155
|
-
isStatic: z.ZodBoolean;
|
|
156
|
-
isInitializer: z.ZodBoolean;
|
|
157
|
-
parameters: z.ZodArray<z.ZodObject<{
|
|
158
|
-
name: z.ZodString;
|
|
159
|
-
type: z.ZodType<AbiType, z.ZodTypeDef, AbiType>;
|
|
160
|
-
visibility: z.ZodEnum<["public", "private", "databus"]>;
|
|
161
|
-
}, "strip", z.ZodTypeAny, {
|
|
162
|
-
name: string;
|
|
163
|
-
type: AbiType;
|
|
164
|
-
visibility: "public" | "private" | "databus";
|
|
165
|
-
}, {
|
|
166
|
-
name: string;
|
|
167
|
-
type: AbiType;
|
|
168
|
-
visibility: "public" | "private" | "databus";
|
|
169
|
-
}>, "many">;
|
|
170
|
-
returnTypes: z.ZodArray<z.ZodType<AbiType, z.ZodTypeDef, AbiType>, "many">;
|
|
171
|
-
errorTypes: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
172
|
-
error_kind: z.ZodLiteral<"string">;
|
|
173
|
-
string: z.ZodString;
|
|
174
|
-
}, "strip", z.ZodTypeAny, {
|
|
175
|
-
string: string;
|
|
176
|
-
error_kind: "string";
|
|
177
|
-
}, {
|
|
178
|
-
string: string;
|
|
179
|
-
error_kind: "string";
|
|
180
|
-
}>, z.ZodObject<{
|
|
181
|
-
error_kind: z.ZodLiteral<"fmtstring">;
|
|
182
|
-
length: z.ZodNumber;
|
|
183
|
-
item_types: z.ZodArray<z.ZodType<AbiType, z.ZodTypeDef, AbiType>, "many">;
|
|
184
|
-
}, "strip", z.ZodTypeAny, {
|
|
185
|
-
length: number;
|
|
186
|
-
error_kind: "fmtstring";
|
|
187
|
-
item_types: AbiType[];
|
|
188
|
-
}, {
|
|
189
|
-
length: number;
|
|
190
|
-
error_kind: "fmtstring";
|
|
191
|
-
item_types: AbiType[];
|
|
192
|
-
}>, z.ZodIntersection<z.ZodObject<{
|
|
193
|
-
error_kind: z.ZodLiteral<"custom">;
|
|
194
|
-
}, "strip", z.ZodTypeAny, {
|
|
195
|
-
error_kind: "custom";
|
|
196
|
-
}, {
|
|
197
|
-
error_kind: "custom";
|
|
198
|
-
}>, z.ZodType<AbiType, z.ZodTypeDef, AbiType>>]>>;
|
|
199
|
-
}, "strip", z.ZodTypeAny, {
|
|
200
|
-
name: string;
|
|
201
|
-
parameters: {
|
|
202
|
-
name: string;
|
|
203
|
-
type: AbiType;
|
|
204
|
-
visibility: "public" | "private" | "databus";
|
|
205
|
-
}[];
|
|
206
|
-
functionType: FunctionType;
|
|
207
|
-
isInternal: boolean;
|
|
208
|
-
isStatic: boolean;
|
|
209
|
-
isInitializer: boolean;
|
|
210
|
-
returnTypes: AbiType[];
|
|
211
|
-
errorTypes: Record<string, {
|
|
212
|
-
string: string;
|
|
213
|
-
error_kind: "string";
|
|
214
|
-
} | {
|
|
215
|
-
length: number;
|
|
216
|
-
error_kind: "fmtstring";
|
|
217
|
-
item_types: AbiType[];
|
|
218
|
-
} | ({
|
|
219
|
-
error_kind: "custom";
|
|
220
|
-
} & AbiType)>;
|
|
221
|
-
}, {
|
|
222
|
-
name: string;
|
|
223
|
-
parameters: {
|
|
224
|
-
name: string;
|
|
225
|
-
type: AbiType;
|
|
226
|
-
visibility: "public" | "private" | "databus";
|
|
227
|
-
}[];
|
|
228
|
-
functionType: FunctionType;
|
|
229
|
-
isInternal: boolean;
|
|
230
|
-
isStatic: boolean;
|
|
231
|
-
isInitializer: boolean;
|
|
232
|
-
returnTypes: AbiType[];
|
|
233
|
-
errorTypes: Record<string, {
|
|
234
|
-
string: string;
|
|
235
|
-
error_kind: "string";
|
|
236
|
-
} | {
|
|
237
|
-
length: number;
|
|
238
|
-
error_kind: "fmtstring";
|
|
239
|
-
item_types: AbiType[];
|
|
240
|
-
} | ({
|
|
241
|
-
error_kind: "custom";
|
|
242
|
-
} & AbiType)>;
|
|
243
|
-
}>;
|
|
244
|
-
/** Debug metadata for a function. */
|
|
245
|
-
export interface FunctionDebugMetadata {
|
|
246
|
-
/** Maps opcodes to source code pointers */
|
|
247
|
-
debugSymbols: DebugInfo;
|
|
248
|
-
/** Maps the file IDs to the file contents to resolve pointers */
|
|
249
|
-
files: DebugFileMap;
|
|
250
|
-
}
|
|
251
|
-
export declare const FunctionDebugMetadataSchema: z.ZodObject<{
|
|
252
|
-
debugSymbols: z.ZodObject<{
|
|
253
|
-
locations: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
254
|
-
span: z.ZodObject<{
|
|
255
|
-
start: z.ZodNumber;
|
|
256
|
-
end: z.ZodNumber;
|
|
257
|
-
}, "strip", z.ZodTypeAny, {
|
|
258
|
-
start: number;
|
|
259
|
-
end: number;
|
|
260
|
-
}, {
|
|
261
|
-
start: number;
|
|
262
|
-
end: number;
|
|
263
|
-
}>;
|
|
264
|
-
file: z.ZodNumber;
|
|
265
|
-
}, "strip", z.ZodTypeAny, {
|
|
266
|
-
span: {
|
|
267
|
-
start: number;
|
|
268
|
-
end: number;
|
|
269
|
-
};
|
|
270
|
-
file: number;
|
|
271
|
-
}, {
|
|
272
|
-
span: {
|
|
273
|
-
start: number;
|
|
274
|
-
end: number;
|
|
275
|
-
};
|
|
276
|
-
file: number;
|
|
277
|
-
}>, "many">>;
|
|
278
|
-
brillig_locations: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
279
|
-
span: z.ZodObject<{
|
|
280
|
-
start: z.ZodNumber;
|
|
281
|
-
end: z.ZodNumber;
|
|
282
|
-
}, "strip", z.ZodTypeAny, {
|
|
283
|
-
start: number;
|
|
284
|
-
end: number;
|
|
285
|
-
}, {
|
|
286
|
-
start: number;
|
|
287
|
-
end: number;
|
|
288
|
-
}>;
|
|
289
|
-
file: z.ZodNumber;
|
|
290
|
-
}, "strip", z.ZodTypeAny, {
|
|
291
|
-
span: {
|
|
292
|
-
start: number;
|
|
293
|
-
end: number;
|
|
294
|
-
};
|
|
295
|
-
file: number;
|
|
296
|
-
}, {
|
|
297
|
-
span: {
|
|
298
|
-
start: number;
|
|
299
|
-
end: number;
|
|
300
|
-
};
|
|
301
|
-
file: number;
|
|
302
|
-
}>, "many">>>;
|
|
303
|
-
}, "strip", z.ZodTypeAny, {
|
|
304
|
-
locations: Record<string, {
|
|
305
|
-
span: {
|
|
306
|
-
start: number;
|
|
307
|
-
end: number;
|
|
308
|
-
};
|
|
309
|
-
file: number;
|
|
310
|
-
}[]>;
|
|
311
|
-
brillig_locations: Record<string, Record<string, {
|
|
312
|
-
span: {
|
|
313
|
-
start: number;
|
|
314
|
-
end: number;
|
|
315
|
-
};
|
|
316
|
-
file: number;
|
|
317
|
-
}[]>>;
|
|
318
|
-
}, {
|
|
319
|
-
locations: Record<string, {
|
|
320
|
-
span: {
|
|
321
|
-
start: number;
|
|
322
|
-
end: number;
|
|
323
|
-
};
|
|
324
|
-
file: number;
|
|
325
|
-
}[]>;
|
|
326
|
-
brillig_locations: Record<string, Record<string, {
|
|
327
|
-
span: {
|
|
328
|
-
start: number;
|
|
329
|
-
end: number;
|
|
330
|
-
};
|
|
331
|
-
file: number;
|
|
332
|
-
}[]>>;
|
|
333
|
-
}>;
|
|
334
|
-
files: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
335
|
-
source: z.ZodString;
|
|
336
|
-
path: z.ZodString;
|
|
337
|
-
}, "strip", z.ZodTypeAny, {
|
|
338
|
-
path: string;
|
|
339
|
-
source: string;
|
|
340
|
-
}, {
|
|
341
|
-
path: string;
|
|
342
|
-
source: string;
|
|
343
|
-
}>>;
|
|
344
|
-
}, "strip", z.ZodTypeAny, {
|
|
345
|
-
debugSymbols: {
|
|
346
|
-
locations: Record<string, {
|
|
347
|
-
span: {
|
|
348
|
-
start: number;
|
|
349
|
-
end: number;
|
|
350
|
-
};
|
|
351
|
-
file: number;
|
|
352
|
-
}[]>;
|
|
353
|
-
brillig_locations: Record<string, Record<string, {
|
|
354
|
-
span: {
|
|
355
|
-
start: number;
|
|
356
|
-
end: number;
|
|
357
|
-
};
|
|
358
|
-
file: number;
|
|
359
|
-
}[]>>;
|
|
360
|
-
};
|
|
361
|
-
files: Record<string, {
|
|
362
|
-
path: string;
|
|
363
|
-
source: string;
|
|
364
|
-
}>;
|
|
365
|
-
}, {
|
|
366
|
-
debugSymbols: {
|
|
367
|
-
locations: Record<string, {
|
|
368
|
-
span: {
|
|
369
|
-
start: number;
|
|
370
|
-
end: number;
|
|
371
|
-
};
|
|
372
|
-
file: number;
|
|
373
|
-
}[]>;
|
|
374
|
-
brillig_locations: Record<string, Record<string, {
|
|
375
|
-
span: {
|
|
376
|
-
start: number;
|
|
377
|
-
end: number;
|
|
378
|
-
};
|
|
379
|
-
file: number;
|
|
380
|
-
}[]>>;
|
|
381
|
-
};
|
|
382
|
-
files: Record<string, {
|
|
383
|
-
path: string;
|
|
384
|
-
source: string;
|
|
385
|
-
}>;
|
|
386
|
-
}>;
|
|
387
|
-
/** The artifact entry of a function. */
|
|
388
|
-
export interface FunctionArtifact extends FunctionAbi {
|
|
389
|
-
/** The ACIR bytecode of the function. */
|
|
390
|
-
bytecode: Buffer;
|
|
391
|
-
/** The verification key of the function, base64 encoded, if it's a private fn. */
|
|
392
|
-
verificationKey?: string;
|
|
393
|
-
/** Maps opcodes to source code pointers */
|
|
394
|
-
debugSymbols: string;
|
|
395
|
-
/** Debug metadata for the function. */
|
|
396
|
-
debug?: FunctionDebugMetadata;
|
|
397
|
-
}
|
|
398
|
-
export declare const FunctionArtifactSchema: z.ZodIntersection<z.ZodObject<{
|
|
399
|
-
name: z.ZodString;
|
|
400
|
-
functionType: z.ZodNativeEnum<typeof FunctionType>;
|
|
401
|
-
isInternal: z.ZodBoolean;
|
|
402
|
-
isStatic: z.ZodBoolean;
|
|
403
|
-
isInitializer: z.ZodBoolean;
|
|
404
|
-
parameters: z.ZodArray<z.ZodObject<{
|
|
405
|
-
name: z.ZodString;
|
|
406
|
-
type: z.ZodType<AbiType, z.ZodTypeDef, AbiType>;
|
|
407
|
-
visibility: z.ZodEnum<["public", "private", "databus"]>;
|
|
408
|
-
}, "strip", z.ZodTypeAny, {
|
|
409
|
-
name: string;
|
|
410
|
-
type: AbiType;
|
|
411
|
-
visibility: "public" | "private" | "databus";
|
|
412
|
-
}, {
|
|
413
|
-
name: string;
|
|
414
|
-
type: AbiType;
|
|
415
|
-
visibility: "public" | "private" | "databus";
|
|
416
|
-
}>, "many">;
|
|
417
|
-
returnTypes: z.ZodArray<z.ZodType<AbiType, z.ZodTypeDef, AbiType>, "many">;
|
|
418
|
-
errorTypes: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
419
|
-
error_kind: z.ZodLiteral<"string">;
|
|
420
|
-
string: z.ZodString;
|
|
421
|
-
}, "strip", z.ZodTypeAny, {
|
|
422
|
-
string: string;
|
|
423
|
-
error_kind: "string";
|
|
424
|
-
}, {
|
|
425
|
-
string: string;
|
|
426
|
-
error_kind: "string";
|
|
427
|
-
}>, z.ZodObject<{
|
|
428
|
-
error_kind: z.ZodLiteral<"fmtstring">;
|
|
429
|
-
length: z.ZodNumber;
|
|
430
|
-
item_types: z.ZodArray<z.ZodType<AbiType, z.ZodTypeDef, AbiType>, "many">;
|
|
431
|
-
}, "strip", z.ZodTypeAny, {
|
|
432
|
-
length: number;
|
|
433
|
-
error_kind: "fmtstring";
|
|
434
|
-
item_types: AbiType[];
|
|
435
|
-
}, {
|
|
436
|
-
length: number;
|
|
437
|
-
error_kind: "fmtstring";
|
|
438
|
-
item_types: AbiType[];
|
|
439
|
-
}>, z.ZodIntersection<z.ZodObject<{
|
|
440
|
-
error_kind: z.ZodLiteral<"custom">;
|
|
441
|
-
}, "strip", z.ZodTypeAny, {
|
|
442
|
-
error_kind: "custom";
|
|
443
|
-
}, {
|
|
444
|
-
error_kind: "custom";
|
|
445
|
-
}>, z.ZodType<AbiType, z.ZodTypeDef, AbiType>>]>>;
|
|
446
|
-
}, "strip", z.ZodTypeAny, {
|
|
447
|
-
name: string;
|
|
448
|
-
parameters: {
|
|
449
|
-
name: string;
|
|
450
|
-
type: AbiType;
|
|
451
|
-
visibility: "public" | "private" | "databus";
|
|
452
|
-
}[];
|
|
453
|
-
functionType: FunctionType;
|
|
454
|
-
isInternal: boolean;
|
|
455
|
-
isStatic: boolean;
|
|
456
|
-
isInitializer: boolean;
|
|
457
|
-
returnTypes: AbiType[];
|
|
458
|
-
errorTypes: Record<string, {
|
|
459
|
-
string: string;
|
|
460
|
-
error_kind: "string";
|
|
461
|
-
} | {
|
|
462
|
-
length: number;
|
|
463
|
-
error_kind: "fmtstring";
|
|
464
|
-
item_types: AbiType[];
|
|
465
|
-
} | ({
|
|
466
|
-
error_kind: "custom";
|
|
467
|
-
} & AbiType)>;
|
|
468
|
-
}, {
|
|
469
|
-
name: string;
|
|
470
|
-
parameters: {
|
|
471
|
-
name: string;
|
|
472
|
-
type: AbiType;
|
|
473
|
-
visibility: "public" | "private" | "databus";
|
|
474
|
-
}[];
|
|
475
|
-
functionType: FunctionType;
|
|
476
|
-
isInternal: boolean;
|
|
477
|
-
isStatic: boolean;
|
|
478
|
-
isInitializer: boolean;
|
|
479
|
-
returnTypes: AbiType[];
|
|
480
|
-
errorTypes: Record<string, {
|
|
481
|
-
string: string;
|
|
482
|
-
error_kind: "string";
|
|
483
|
-
} | {
|
|
484
|
-
length: number;
|
|
485
|
-
error_kind: "fmtstring";
|
|
486
|
-
item_types: AbiType[];
|
|
487
|
-
} | ({
|
|
488
|
-
error_kind: "custom";
|
|
489
|
-
} & AbiType)>;
|
|
490
|
-
}>, z.ZodObject<{
|
|
491
|
-
bytecode: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer, string>, z.ZodEffects<z.ZodObject<{
|
|
492
|
-
type: z.ZodLiteral<"Buffer">;
|
|
493
|
-
data: z.ZodArray<z.ZodNumber, "many">;
|
|
494
|
-
}, "strip", z.ZodTypeAny, {
|
|
495
|
-
type: "Buffer";
|
|
496
|
-
data: number[];
|
|
497
|
-
}, {
|
|
498
|
-
type: "Buffer";
|
|
499
|
-
data: number[];
|
|
500
|
-
}>, Buffer, {
|
|
501
|
-
type: "Buffer";
|
|
502
|
-
data: number[];
|
|
503
|
-
}>]>;
|
|
504
|
-
verificationKey: z.ZodOptional<z.ZodString>;
|
|
505
|
-
debugSymbols: z.ZodString;
|
|
506
|
-
debug: z.ZodOptional<z.ZodObject<{
|
|
507
|
-
debugSymbols: z.ZodObject<{
|
|
508
|
-
locations: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
509
|
-
span: z.ZodObject<{
|
|
510
|
-
start: z.ZodNumber;
|
|
511
|
-
end: z.ZodNumber;
|
|
512
|
-
}, "strip", z.ZodTypeAny, {
|
|
513
|
-
start: number;
|
|
514
|
-
end: number;
|
|
515
|
-
}, {
|
|
516
|
-
start: number;
|
|
517
|
-
end: number;
|
|
518
|
-
}>;
|
|
519
|
-
file: z.ZodNumber;
|
|
520
|
-
}, "strip", z.ZodTypeAny, {
|
|
521
|
-
span: {
|
|
522
|
-
start: number;
|
|
523
|
-
end: number;
|
|
524
|
-
};
|
|
525
|
-
file: number;
|
|
526
|
-
}, {
|
|
527
|
-
span: {
|
|
528
|
-
start: number;
|
|
529
|
-
end: number;
|
|
530
|
-
};
|
|
531
|
-
file: number;
|
|
532
|
-
}>, "many">>;
|
|
533
|
-
brillig_locations: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
534
|
-
span: z.ZodObject<{
|
|
535
|
-
start: z.ZodNumber;
|
|
536
|
-
end: z.ZodNumber;
|
|
537
|
-
}, "strip", z.ZodTypeAny, {
|
|
538
|
-
start: number;
|
|
539
|
-
end: number;
|
|
540
|
-
}, {
|
|
541
|
-
start: number;
|
|
542
|
-
end: number;
|
|
543
|
-
}>;
|
|
544
|
-
file: z.ZodNumber;
|
|
545
|
-
}, "strip", z.ZodTypeAny, {
|
|
546
|
-
span: {
|
|
547
|
-
start: number;
|
|
548
|
-
end: number;
|
|
549
|
-
};
|
|
550
|
-
file: number;
|
|
551
|
-
}, {
|
|
552
|
-
span: {
|
|
553
|
-
start: number;
|
|
554
|
-
end: number;
|
|
555
|
-
};
|
|
556
|
-
file: number;
|
|
557
|
-
}>, "many">>>;
|
|
558
|
-
}, "strip", z.ZodTypeAny, {
|
|
559
|
-
locations: Record<string, {
|
|
560
|
-
span: {
|
|
561
|
-
start: number;
|
|
562
|
-
end: number;
|
|
563
|
-
};
|
|
564
|
-
file: number;
|
|
565
|
-
}[]>;
|
|
566
|
-
brillig_locations: Record<string, Record<string, {
|
|
567
|
-
span: {
|
|
568
|
-
start: number;
|
|
569
|
-
end: number;
|
|
570
|
-
};
|
|
571
|
-
file: number;
|
|
572
|
-
}[]>>;
|
|
573
|
-
}, {
|
|
574
|
-
locations: Record<string, {
|
|
575
|
-
span: {
|
|
576
|
-
start: number;
|
|
577
|
-
end: number;
|
|
578
|
-
};
|
|
579
|
-
file: number;
|
|
580
|
-
}[]>;
|
|
581
|
-
brillig_locations: Record<string, Record<string, {
|
|
582
|
-
span: {
|
|
583
|
-
start: number;
|
|
584
|
-
end: number;
|
|
585
|
-
};
|
|
586
|
-
file: number;
|
|
587
|
-
}[]>>;
|
|
588
|
-
}>;
|
|
589
|
-
files: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
590
|
-
source: z.ZodString;
|
|
591
|
-
path: z.ZodString;
|
|
592
|
-
}, "strip", z.ZodTypeAny, {
|
|
593
|
-
path: string;
|
|
594
|
-
source: string;
|
|
595
|
-
}, {
|
|
596
|
-
path: string;
|
|
597
|
-
source: string;
|
|
598
|
-
}>>;
|
|
599
|
-
}, "strip", z.ZodTypeAny, {
|
|
600
|
-
debugSymbols: {
|
|
601
|
-
locations: Record<string, {
|
|
602
|
-
span: {
|
|
603
|
-
start: number;
|
|
604
|
-
end: number;
|
|
605
|
-
};
|
|
606
|
-
file: number;
|
|
607
|
-
}[]>;
|
|
608
|
-
brillig_locations: Record<string, Record<string, {
|
|
609
|
-
span: {
|
|
610
|
-
start: number;
|
|
611
|
-
end: number;
|
|
612
|
-
};
|
|
613
|
-
file: number;
|
|
614
|
-
}[]>>;
|
|
615
|
-
};
|
|
616
|
-
files: Record<string, {
|
|
617
|
-
path: string;
|
|
618
|
-
source: string;
|
|
619
|
-
}>;
|
|
620
|
-
}, {
|
|
621
|
-
debugSymbols: {
|
|
622
|
-
locations: Record<string, {
|
|
623
|
-
span: {
|
|
624
|
-
start: number;
|
|
625
|
-
end: number;
|
|
626
|
-
};
|
|
627
|
-
file: number;
|
|
628
|
-
}[]>;
|
|
629
|
-
brillig_locations: Record<string, Record<string, {
|
|
630
|
-
span: {
|
|
631
|
-
start: number;
|
|
632
|
-
end: number;
|
|
633
|
-
};
|
|
634
|
-
file: number;
|
|
635
|
-
}[]>>;
|
|
636
|
-
};
|
|
637
|
-
files: Record<string, {
|
|
638
|
-
path: string;
|
|
639
|
-
source: string;
|
|
640
|
-
}>;
|
|
641
|
-
}>>;
|
|
642
|
-
}, "strip", z.ZodTypeAny, {
|
|
643
|
-
debugSymbols: string;
|
|
644
|
-
bytecode: Buffer;
|
|
645
|
-
debug?: {
|
|
646
|
-
debugSymbols: {
|
|
647
|
-
locations: Record<string, {
|
|
648
|
-
span: {
|
|
649
|
-
start: number;
|
|
650
|
-
end: number;
|
|
651
|
-
};
|
|
652
|
-
file: number;
|
|
653
|
-
}[]>;
|
|
654
|
-
brillig_locations: Record<string, Record<string, {
|
|
655
|
-
span: {
|
|
656
|
-
start: number;
|
|
657
|
-
end: number;
|
|
658
|
-
};
|
|
659
|
-
file: number;
|
|
660
|
-
}[]>>;
|
|
661
|
-
};
|
|
662
|
-
files: Record<string, {
|
|
663
|
-
path: string;
|
|
664
|
-
source: string;
|
|
665
|
-
}>;
|
|
666
|
-
} | undefined;
|
|
667
|
-
verificationKey?: string | undefined;
|
|
668
|
-
}, {
|
|
669
|
-
debugSymbols: string;
|
|
670
|
-
bytecode: string | {
|
|
671
|
-
type: "Buffer";
|
|
672
|
-
data: number[];
|
|
673
|
-
};
|
|
674
|
-
debug?: {
|
|
675
|
-
debugSymbols: {
|
|
676
|
-
locations: Record<string, {
|
|
677
|
-
span: {
|
|
678
|
-
start: number;
|
|
679
|
-
end: number;
|
|
680
|
-
};
|
|
681
|
-
file: number;
|
|
682
|
-
}[]>;
|
|
683
|
-
brillig_locations: Record<string, Record<string, {
|
|
684
|
-
span: {
|
|
685
|
-
start: number;
|
|
686
|
-
end: number;
|
|
687
|
-
};
|
|
688
|
-
file: number;
|
|
689
|
-
}[]>>;
|
|
690
|
-
};
|
|
691
|
-
files: Record<string, {
|
|
692
|
-
path: string;
|
|
693
|
-
source: string;
|
|
694
|
-
}>;
|
|
695
|
-
} | undefined;
|
|
696
|
-
verificationKey?: string | undefined;
|
|
697
|
-
}>>;
|
|
698
|
-
/** A file ID. It's assigned during compilation. */
|
|
699
|
-
export type FileId = number;
|
|
700
|
-
/** A pointer to a specific section of the source code. */
|
|
701
|
-
export interface SourceCodeLocation {
|
|
702
|
-
/** The section of the source code. */
|
|
703
|
-
span: {
|
|
704
|
-
/** The byte where the section starts. */
|
|
705
|
-
start: number;
|
|
706
|
-
/** The byte where the section ends. */
|
|
707
|
-
end: number;
|
|
708
|
-
};
|
|
709
|
-
/** The source code file pointed to. */
|
|
710
|
-
file: FileId;
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* The location of an opcode in the bytecode.
|
|
714
|
-
* It's a string of the form `{acirIndex}` or `{acirIndex}:{brilligIndex}`.
|
|
715
|
-
*/
|
|
716
|
-
export type OpcodeLocation = string;
|
|
717
|
-
export type BrilligFunctionId = number;
|
|
718
|
-
export type OpcodeToLocationsMap = Record<OpcodeLocation, SourceCodeLocation[]>;
|
|
719
|
-
/** The debug information for a given function. */
|
|
720
|
-
export interface DebugInfo {
|
|
721
|
-
/** A map of the opcode location to the source code location. */
|
|
722
|
-
locations: OpcodeToLocationsMap;
|
|
723
|
-
/** For each Brillig function, we have a map of the opcode location to the source code location. */
|
|
724
|
-
brillig_locations: Record<BrilligFunctionId, OpcodeToLocationsMap>;
|
|
725
|
-
}
|
|
726
|
-
/** The debug information for a given program (a collection of functions) */
|
|
727
|
-
export interface ProgramDebugInfo {
|
|
728
|
-
/** A list of debug information that matches with each function in a program */
|
|
729
|
-
debug_infos: Array<DebugInfo>;
|
|
730
|
-
}
|
|
731
|
-
/** Maps a file ID to its metadata for debugging purposes. */
|
|
732
|
-
export type DebugFileMap = Record<FileId, {
|
|
733
|
-
/** The source code of the file. */
|
|
734
|
-
source: string;
|
|
735
|
-
/** The path of the file. */
|
|
736
|
-
path: string;
|
|
737
|
-
}>;
|
|
738
|
-
/** Type representing a field of a note (e.g. `amount` in `TokenNote`). */
|
|
739
|
-
export type NoteField = {
|
|
740
|
-
/** Name of the field (e.g. `amount`). */
|
|
741
|
-
name: string;
|
|
742
|
-
/** Index where the note field starts in the serialized note array. */
|
|
743
|
-
index: number;
|
|
744
|
-
/** Whether the field can be unset when creating the note (in the partial notes flow). */
|
|
745
|
-
nullable: boolean;
|
|
746
|
-
};
|
|
747
|
-
export declare const NoteFieldSchema: z.ZodObject<{
|
|
748
|
-
name: z.ZodString;
|
|
749
|
-
index: z.ZodNumber;
|
|
750
|
-
nullable: z.ZodBoolean;
|
|
751
|
-
}, "strip", z.ZodTypeAny, {
|
|
752
|
-
name: string;
|
|
753
|
-
nullable: boolean;
|
|
754
|
-
index: number;
|
|
755
|
-
}, {
|
|
756
|
-
name: string;
|
|
757
|
-
nullable: boolean;
|
|
758
|
-
index: number;
|
|
759
|
-
}>;
|
|
760
|
-
/** Type representing a note in use in the contract. */
|
|
761
|
-
export type ContractNote = {
|
|
762
|
-
/** Note identifier */
|
|
763
|
-
id: NoteSelector;
|
|
764
|
-
/** Type of the note (e.g., 'TransparentNote') */
|
|
765
|
-
typ: string;
|
|
766
|
-
/** Fields of the note. */
|
|
767
|
-
fields: NoteField[];
|
|
768
|
-
};
|
|
769
|
-
export declare const ContractNoteSchema: z.ZodObject<{
|
|
770
|
-
id: z.ZodType<NoteSelector, any, string>;
|
|
771
|
-
typ: z.ZodString;
|
|
772
|
-
fields: z.ZodArray<z.ZodObject<{
|
|
773
|
-
name: z.ZodString;
|
|
774
|
-
index: z.ZodNumber;
|
|
775
|
-
nullable: z.ZodBoolean;
|
|
776
|
-
}, "strip", z.ZodTypeAny, {
|
|
777
|
-
name: string;
|
|
778
|
-
nullable: boolean;
|
|
779
|
-
index: number;
|
|
780
|
-
}, {
|
|
781
|
-
name: string;
|
|
782
|
-
nullable: boolean;
|
|
783
|
-
index: number;
|
|
784
|
-
}>, "many">;
|
|
785
|
-
}, "strip", z.ZodTypeAny, {
|
|
786
|
-
fields: {
|
|
787
|
-
name: string;
|
|
788
|
-
nullable: boolean;
|
|
789
|
-
index: number;
|
|
790
|
-
}[];
|
|
791
|
-
id: NoteSelector;
|
|
792
|
-
typ: string;
|
|
793
|
-
}, {
|
|
794
|
-
fields: {
|
|
795
|
-
name: string;
|
|
796
|
-
nullable: boolean;
|
|
797
|
-
index: number;
|
|
798
|
-
}[];
|
|
799
|
-
id: string;
|
|
800
|
-
typ: string;
|
|
801
|
-
}>;
|
|
802
|
-
/** Type representing a field layout in the storage of a contract. */
|
|
803
|
-
export type FieldLayout = {
|
|
804
|
-
/** Slot in which the field is stored. */
|
|
805
|
-
slot: Fr;
|
|
806
|
-
};
|
|
807
|
-
/** Defines artifact of a contract. */
|
|
808
|
-
export interface ContractArtifact {
|
|
809
|
-
/** The name of the contract. */
|
|
810
|
-
name: string;
|
|
811
|
-
/** The version of compiler used to create this artifact */
|
|
812
|
-
aztecNrVersion?: string;
|
|
813
|
-
/** The functions of the contract. */
|
|
814
|
-
functions: FunctionArtifact[];
|
|
815
|
-
/** The outputs of the contract. */
|
|
816
|
-
outputs: {
|
|
817
|
-
structs: Record<string, AbiType[]>;
|
|
818
|
-
globals: Record<string, AbiValue[]>;
|
|
819
|
-
};
|
|
820
|
-
/** Storage layout */
|
|
821
|
-
storageLayout: Record<string, FieldLayout>;
|
|
822
|
-
/** The notes used in the contract. */
|
|
823
|
-
notes: Record<string, ContractNote>;
|
|
824
|
-
/** The map of file ID to the source code and path of the file. */
|
|
825
|
-
fileMap: DebugFileMap;
|
|
826
|
-
}
|
|
827
|
-
export declare const ContractArtifactSchema: ZodFor<ContractArtifact>;
|
|
828
|
-
export declare function getFunctionArtifactByName(artifact: ContractArtifact, functionName: string): FunctionArtifact;
|
|
829
|
-
/** Gets a function artifact including debug metadata given its name or selector. */
|
|
830
|
-
export declare function getFunctionArtifact(artifact: ContractArtifact, functionNameOrSelector: string | FunctionSelector): Promise<FunctionArtifact>;
|
|
831
|
-
/**
|
|
832
|
-
* Gets the debug metadata of a given function from the contract artifact
|
|
833
|
-
* @param artifact - The contract build artifact
|
|
834
|
-
* @param functionName - The name of the function
|
|
835
|
-
* @returns The debug metadata of the function
|
|
836
|
-
*/
|
|
837
|
-
export declare function getFunctionDebugMetadata(contractArtifact: ContractArtifact, functionArtifact: FunctionArtifact): FunctionDebugMetadata | undefined;
|
|
838
|
-
/**
|
|
839
|
-
* Returns an initializer from the contract, assuming there is at least one. If there are multiple initializers,
|
|
840
|
-
* it returns the one named "constructor" or "initializer"; if there is none with that name, it returns the first
|
|
841
|
-
* initializer it finds, prioritizing initializers with no arguments and then private ones.
|
|
842
|
-
* @param contractArtifact - The contract artifact.
|
|
843
|
-
* @returns An initializer function, or none if there are no functions flagged as initializers in the contract.
|
|
844
|
-
*/
|
|
845
|
-
export declare function getDefaultInitializer(contractArtifact: ContractArtifact): FunctionArtifact | undefined;
|
|
846
|
-
/**
|
|
847
|
-
* Returns an initializer from the contract.
|
|
848
|
-
* @param initializerNameOrArtifact - The name of the constructor, or the artifact of the constructor, or undefined
|
|
849
|
-
* to pick the default initializer.
|
|
850
|
-
*/
|
|
851
|
-
export declare function getInitializer(contract: ContractArtifact, initializerNameOrArtifact: string | undefined | FunctionArtifact): FunctionArtifact | undefined;
|
|
852
|
-
export {};
|
|
853
|
-
//# sourceMappingURL=abi.d.ts.map
|