@aztec/foundation 3.0.0-devnet.6 → 3.0.0-devnet.6-patch.1
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 -9
- package/dest/array/array.d.ts.map +1 -1
- package/dest/array/array.js +0 -11
- package/dest/array/index.d.ts +1 -1
- package/dest/async-map/index.d.ts +1 -1
- package/dest/async-pool/index.d.ts +1 -1
- package/dest/bigint/index.d.ts +1 -1
- package/dest/bigint-buffer/index.d.ts +1 -1
- package/dest/branded-types/block_number.d.ts +53 -0
- package/dest/branded-types/block_number.d.ts.map +1 -0
- package/dest/branded-types/block_number.js +75 -0
- package/dest/branded-types/checkpoint_number.d.ts +46 -0
- package/dest/branded-types/checkpoint_number.d.ts.map +1 -0
- package/dest/branded-types/checkpoint_number.js +68 -0
- package/dest/branded-types/epoch.d.ts +42 -0
- package/dest/branded-types/epoch.d.ts.map +1 -0
- package/dest/branded-types/epoch.js +59 -0
- package/dest/branded-types/index.d.ts +6 -0
- package/dest/branded-types/index.d.ts.map +1 -0
- package/dest/branded-types/index.js +4 -0
- package/dest/branded-types/slot.d.ts +42 -0
- package/dest/branded-types/slot.d.ts.map +1 -0
- package/dest/branded-types/slot.js +59 -0
- package/dest/branded-types/types.d.ts +5 -0
- package/dest/branded-types/types.d.ts.map +1 -0
- package/dest/branded-types/types.js +1 -0
- package/dest/buffer/buffer16.d.ts +2 -5
- package/dest/buffer/buffer16.d.ts.map +1 -1
- package/dest/buffer/buffer16.js +1 -1
- package/dest/buffer/buffer32.d.ts +2 -5
- package/dest/buffer/buffer32.d.ts.map +1 -1
- package/dest/buffer/buffer32.js +1 -1
- package/dest/buffer/index.d.ts +1 -1
- package/dest/collection/array.d.ts +3 -1
- package/dest/collection/array.d.ts.map +1 -1
- package/dest/collection/array.js +12 -3
- package/dest/collection/index.d.ts +1 -1
- package/dest/collection/object.d.ts +1 -1
- package/dest/committable/committable.d.ts +1 -1
- package/dest/committable/committable.d.ts.map +1 -1
- package/dest/committable/index.d.ts +1 -1
- package/dest/config/env_var.d.ts +2 -2
- package/dest/config/env_var.d.ts.map +1 -1
- package/dest/config/index.d.ts +10 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +16 -2
- package/dest/config/network_config.d.ts +1 -1
- package/dest/config/network_name.d.ts +1 -1
- package/dest/config/secret_value.d.ts +1 -1
- package/dest/config/secret_value.d.ts.map +1 -1
- package/dest/crypto/aes128/index.d.ts +1 -1
- package/dest/crypto/aes128/index.d.ts.map +1 -1
- package/dest/crypto/aes128/index.js +2 -6
- package/dest/crypto/bls/bn254_keystore.d.ts +296 -0
- package/dest/crypto/bls/bn254_keystore.d.ts.map +1 -0
- package/dest/crypto/bls/bn254_keystore.js +218 -0
- package/dest/crypto/bls/index.d.ts +13 -0
- package/dest/crypto/bls/index.d.ts.map +1 -0
- package/dest/crypto/bls/index.js +87 -0
- package/dest/crypto/bn254/index.d.ts +39 -0
- package/dest/crypto/bn254/index.d.ts.map +1 -0
- package/dest/crypto/bn254/index.js +56 -0
- package/dest/crypto/ecdsa/index.d.ts +1 -1
- package/dest/crypto/ecdsa/index.d.ts.map +1 -1
- package/dest/crypto/ecdsa/index.js +4 -12
- package/dest/crypto/ecdsa/signature.d.ts +2 -11
- package/dest/crypto/ecdsa/signature.d.ts.map +1 -1
- package/dest/crypto/ecdsa/signature.js +2 -2
- package/dest/crypto/grumpkin/index.d.ts +10 -13
- package/dest/crypto/grumpkin/index.d.ts.map +1 -1
- package/dest/crypto/grumpkin/index.js +12 -27
- package/dest/crypto/keccak/index.d.ts +1 -1
- package/dest/crypto/keys/index.d.ts +2 -2
- package/dest/crypto/keys/index.d.ts.map +1 -1
- package/dest/crypto/keys/index.js +2 -4
- package/dest/crypto/pedersen/index.d.ts +1 -1
- package/dest/crypto/pedersen/pedersen.noble.d.ts +1 -1
- package/dest/crypto/pedersen/pedersen.wasm.d.ts +2 -2
- package/dest/crypto/pedersen/pedersen.wasm.d.ts.map +1 -1
- package/dest/crypto/pedersen/pedersen.wasm.js +4 -10
- package/dest/crypto/poseidon/index.d.ts +2 -2
- package/dest/crypto/poseidon/index.d.ts.map +1 -1
- package/dest/crypto/poseidon/index.js +6 -16
- package/dest/crypto/random/index.d.ts +1 -1
- package/dest/crypto/random/index.d.ts.map +1 -1
- package/dest/crypto/random/randomness_singleton.d.ts +1 -1
- package/dest/crypto/random/randomness_singleton.d.ts.map +1 -1
- package/dest/crypto/schnorr/index.d.ts +3 -2
- package/dest/crypto/schnorr/index.d.ts.map +1 -1
- package/dest/crypto/schnorr/index.js +4 -10
- package/dest/crypto/schnorr/signature.d.ts +2 -2
- package/dest/crypto/schnorr/signature.d.ts.map +1 -1
- package/dest/crypto/schnorr/signature.js +2 -2
- package/dest/crypto/secp256k1/index.d.ts +1 -1
- package/dest/crypto/secp256k1/index.d.ts.map +1 -1
- package/dest/crypto/secp256k1/index.js +3 -9
- package/dest/crypto/secp256k1-signer/index.d.ts +1 -1
- package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts +1 -1
- package/dest/crypto/secp256k1-signer/secp256k1_signer.d.ts.map +1 -1
- package/dest/crypto/secp256k1-signer/utils.d.ts +43 -5
- package/dest/crypto/secp256k1-signer/utils.d.ts.map +1 -1
- package/dest/crypto/secp256k1-signer/utils.js +76 -8
- package/dest/crypto/serialize.d.ts +1 -1
- package/dest/crypto/sha256/index.d.ts +2 -2
- package/dest/crypto/sha256/index.d.ts.map +1 -1
- package/dest/crypto/sha256/index.js +1 -1
- package/dest/crypto/sha512/index.d.ts +3 -3
- package/dest/crypto/sha512/index.d.ts.map +1 -1
- package/dest/crypto/sha512/index.js +1 -1
- package/dest/crypto/signature/index.d.ts +2 -2
- package/dest/crypto/signature/index.d.ts.map +1 -1
- package/dest/crypto/sync/index.d.ts +1 -1
- package/dest/crypto/sync/index.js +1 -3
- package/dest/crypto/sync/pedersen/index.d.ts +2 -2
- package/dest/crypto/sync/pedersen/index.d.ts.map +1 -1
- package/dest/crypto/sync/pedersen/index.js +1 -1
- package/dest/crypto/sync/poseidon/index.d.ts +2 -2
- package/dest/crypto/sync/poseidon/index.d.ts.map +1 -1
- package/dest/crypto/sync/poseidon/index.js +1 -1
- package/dest/{fields/bls12_fields.d.ts → curves/bls12/field.d.ts} +3 -3
- package/dest/curves/bls12/field.d.ts.map +1 -0
- package/dest/{fields/bls12_fields.js → curves/bls12/field.js} +6 -6
- package/dest/curves/bls12/index.d.ts +3 -0
- package/dest/curves/bls12/index.d.ts.map +1 -0
- package/dest/curves/bls12/index.js +2 -0
- package/dest/{fields/bls12_point.d.ts → curves/bls12/point.d.ts} +4 -13
- package/dest/curves/bls12/point.d.ts.map +1 -0
- package/dest/{fields/bls12_point.js → curves/bls12/point.js} +7 -7
- package/dest/{fields/fields.d.ts → curves/bn254/field.d.ts} +16 -9
- package/dest/curves/bn254/field.d.ts.map +1 -0
- package/dest/{fields/fields.js → curves/bn254/field.js} +35 -9
- package/dest/curves/bn254/index.d.ts +3 -0
- package/dest/curves/bn254/index.d.ts.map +1 -0
- package/dest/curves/bn254/index.js +2 -0
- package/dest/curves/bn254/point.d.ts +54 -0
- package/dest/curves/bn254/point.d.ts.map +1 -0
- package/dest/curves/bn254/point.js +143 -0
- package/dest/curves/grumpkin/index.d.ts +10 -0
- package/dest/curves/grumpkin/index.d.ts.map +1 -0
- package/dest/curves/grumpkin/index.js +3 -0
- package/dest/{fields → curves/grumpkin}/point.d.ts +13 -13
- package/dest/curves/grumpkin/point.d.ts.map +1 -0
- package/dest/{fields → curves/grumpkin}/point.js +24 -7
- package/dest/decorators/index.d.ts +1 -1
- package/dest/decorators/memoize.d.ts +1 -1
- package/dest/decorators/memoize.d.ts.map +1 -1
- package/dest/error/index.d.ts +4 -4
- package/dest/error/index.d.ts.map +1 -1
- package/dest/eth-address/index.d.ts +12 -2
- package/dest/eth-address/index.d.ts.map +1 -1
- package/dest/eth-address/index.js +23 -1
- package/dest/eth-signature/eth_signature.d.ts +1 -4
- package/dest/eth-signature/eth_signature.d.ts.map +1 -1
- package/dest/eth-signature/index.d.ts +1 -1
- package/dest/fs/index.d.ts +1 -1
- package/dest/fs/run_in_dir.d.ts +1 -1
- package/dest/fs/try_rm_dir.d.ts +1 -1
- package/dest/iterable/all.d.ts +1 -1
- package/dest/iterable/filter.d.ts +1 -1
- package/dest/iterable/index.d.ts +1 -1
- package/dest/iterable/isAsyncIt.d.ts +1 -1
- package/dest/iterable/map.d.ts +1 -1
- package/dest/iterable/peek.d.ts +1 -1
- package/dest/iterable/sort.d.ts +1 -1
- package/dest/iterable/take.d.ts +1 -1
- package/dest/iterable/toArray.d.ts +1 -1
- package/dest/json-rpc/client/fetch.d.ts +1 -1
- package/dest/json-rpc/client/index.d.ts +1 -1
- package/dest/json-rpc/client/safe_json_rpc_client.d.ts +1 -1
- package/dest/json-rpc/client/undici.d.ts +1 -1
- package/dest/json-rpc/convert.d.ts +1 -1
- package/dest/json-rpc/errors.d.ts +1 -1
- package/dest/json-rpc/errors.d.ts.map +1 -1
- package/dest/json-rpc/fixtures/class_a.d.ts +3 -3
- package/dest/json-rpc/fixtures/class_a.d.ts.map +1 -1
- package/dest/json-rpc/fixtures/class_b.d.ts +3 -3
- package/dest/json-rpc/fixtures/class_b.d.ts.map +1 -1
- package/dest/json-rpc/fixtures/test_state.d.ts +1 -1
- package/dest/json-rpc/fixtures/test_state.d.ts.map +1 -1
- package/dest/json-rpc/index.d.ts +1 -1
- package/dest/json-rpc/js_utils.d.ts +1 -1
- package/dest/json-rpc/js_utils.d.ts.map +1 -1
- package/dest/json-rpc/server/index.d.ts +1 -1
- package/dest/json-rpc/server/safe_json_rpc_server.d.ts +1 -1
- package/dest/json-rpc/server/safe_json_rpc_server.d.ts.map +1 -1
- package/dest/json-rpc/server/telemetry.d.ts +1 -1
- package/dest/json-rpc/test/index.d.ts +1 -1
- package/dest/json-rpc/test/integration.d.ts +1 -1
- package/dest/log/console.d.ts +1 -1
- package/dest/log/gcloud-logger-config.d.ts +1 -1
- package/dest/log/gcloud-logger-config.d.ts.map +1 -1
- package/dest/log/index.d.ts +1 -1
- package/dest/log/libp2p_logger.d.ts +1 -1
- package/dest/log/log-filters.d.ts +1 -1
- package/dest/log/log-levels.d.ts +1 -1
- package/dest/log/log_fn.d.ts +1 -1
- package/dest/log/noir_debug_log_util.d.ts +1 -1
- package/dest/log/pino-logger.d.ts +2 -2
- package/dest/message/index.d.ts +1 -1
- package/dest/message/index.d.ts.map +1 -1
- package/dest/mutex/index.d.ts +1 -1
- package/dest/mutex/index.d.ts.map +1 -1
- package/dest/mutex/mutex_database.d.ts +1 -1
- package/dest/noir/index.d.ts +1 -1
- package/dest/noir/noir_package_config.d.ts +9 -9
- package/dest/number/index.d.ts +1 -1
- package/dest/profiler/index.d.ts +1 -1
- package/dest/profiler/profiler.d.ts +1 -1
- package/dest/promise/index.d.ts +1 -1
- package/dest/promise/running-promise.d.ts +1 -1
- package/dest/promise/running-promise.d.ts.map +1 -1
- package/dest/promise/utils.d.ts +1 -1
- package/dest/queue/base_memory_queue.d.ts +1 -1
- package/dest/queue/base_memory_queue.d.ts.map +1 -1
- package/dest/queue/batch_queue.d.ts +1 -1
- package/dest/queue/batch_queue.d.ts.map +1 -1
- package/dest/queue/bounded_serial_queue.d.ts +1 -1
- package/dest/queue/bounded_serial_queue.d.ts.map +1 -1
- package/dest/queue/fifo_memory_queue.d.ts +1 -1
- package/dest/queue/fifo_memory_queue.d.ts.map +1 -1
- package/dest/queue/index.d.ts +1 -1
- package/dest/queue/priority_memory_queue.d.ts +1 -1
- package/dest/queue/priority_memory_queue.d.ts.map +1 -1
- package/dest/queue/priority_queue.d.ts +1 -1
- package/dest/queue/priority_queue.d.ts.map +1 -1
- package/dest/queue/semaphore.d.ts +1 -1
- package/dest/queue/semaphore.d.ts.map +1 -1
- package/dest/queue/serial_queue.d.ts +1 -1
- package/dest/queue/serial_queue.d.ts.map +1 -1
- package/dest/retry/index.d.ts +1 -1
- package/dest/running-promise/index.d.ts +1 -1
- package/dest/schemas/api.d.ts +1 -1
- package/dest/schemas/index.d.ts +1 -1
- package/dest/schemas/parse.d.ts +1 -1
- package/dest/schemas/schemas.d.ts +13 -17
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +9 -10
- package/dest/schemas/types.d.ts +1 -1
- package/dest/schemas/utils.d.ts +4 -4
- package/dest/schemas/utils.d.ts.map +1 -1
- package/dest/schemas/utils.js +15 -5
- package/dest/serialize/buffer_reader.d.ts +1 -1
- package/dest/serialize/buffer_reader.d.ts.map +1 -1
- package/dest/serialize/field_reader.d.ts +2 -2
- package/dest/serialize/field_reader.d.ts.map +1 -1
- package/dest/serialize/field_reader.js +1 -1
- package/dest/serialize/free_funcs.d.ts +2 -2
- package/dest/serialize/free_funcs.d.ts.map +1 -1
- package/dest/serialize/free_funcs.js +1 -1
- package/dest/serialize/index.d.ts +1 -1
- package/dest/serialize/serialize.d.ts +2 -2
- package/dest/serialize/serialize.d.ts.map +1 -1
- package/dest/serialize/serialize.js +1 -1
- package/dest/serialize/type_registry.d.ts +1 -1
- package/dest/serialize/type_registry.d.ts.map +1 -1
- package/dest/serialize/types.d.ts +1 -1
- package/dest/sleep/index.d.ts +1 -1
- package/dest/sleep/index.d.ts.map +1 -1
- package/dest/string/index.d.ts +5 -1
- package/dest/string/index.d.ts.map +1 -1
- package/dest/string/index.js +1 -1
- package/dest/testing/files/index.d.ts +2 -1
- package/dest/testing/files/index.d.ts.map +1 -1
- package/dest/testing/files/index.js +1 -1
- package/dest/testing/formatting.d.ts +1 -1
- package/dest/testing/index.d.ts +1 -1
- package/dest/testing/port_allocator.d.ts +1 -1
- package/dest/testing/snapshot_serializer.d.ts +1 -1
- package/dest/testing/test_data.d.ts +1 -1
- package/dest/timer/date.d.ts +1 -1
- package/dest/timer/date.d.ts.map +1 -1
- package/dest/timer/elapsed.d.ts +1 -1
- package/dest/timer/index.d.ts +1 -1
- package/dest/timer/timeout.d.ts +1 -1
- package/dest/timer/timeout.d.ts.map +1 -1
- package/dest/timer/timer.d.ts +1 -1
- package/dest/timer/timer.d.ts.map +1 -1
- package/dest/transport/dispatch/create_dispatch_fn.d.ts +1 -1
- package/dest/transport/dispatch/create_dispatch_fn.d.ts.map +1 -1
- package/dest/transport/dispatch/create_dispatch_proxy.d.ts +1 -1
- package/dest/transport/dispatch/messages.d.ts +1 -1
- package/dest/transport/index.d.ts +1 -1
- package/dest/transport/interface/connector.d.ts +1 -1
- package/dest/transport/interface/listener.d.ts +1 -1
- package/dest/transport/interface/socket.d.ts +1 -1
- package/dest/transport/interface/transferable.d.ts +1 -1
- package/dest/transport/node/index.d.ts +1 -1
- package/dest/transport/node/node_connector.d.ts +1 -1
- package/dest/transport/node/node_connector.d.ts.map +1 -1
- package/dest/transport/node/node_connector_socket.d.ts +1 -1
- package/dest/transport/node/node_connector_socket.d.ts.map +1 -1
- 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_socket.d.ts +1 -1
- package/dest/transport/node/node_listener_socket.d.ts.map +1 -1
- package/dest/transport/transport_client.d.ts +1 -1
- package/dest/transport/transport_client.d.ts.map +1 -1
- package/dest/transport/transport_server.d.ts +1 -10
- package/dest/transport/transport_server.d.ts.map +1 -1
- package/dest/trees/balanced_merkle_tree.d.ts +22 -0
- package/dest/trees/balanced_merkle_tree.d.ts.map +1 -0
- package/dest/trees/balanced_merkle_tree.js +66 -0
- package/dest/trees/hasher.d.ts +1 -1
- package/dest/trees/index.d.ts +2 -1
- package/dest/trees/index.d.ts.map +1 -1
- package/dest/trees/index.js +1 -0
- package/dest/trees/indexed_merkle_tree.d.ts +1 -1
- package/dest/trees/indexed_merkle_tree.d.ts.map +1 -1
- package/dest/trees/indexed_merkle_tree.js +1 -1
- package/dest/trees/indexed_merkle_tree_calculator.d.ts +1 -1
- package/dest/trees/indexed_merkle_tree_calculator.d.ts.map +1 -1
- package/dest/trees/indexed_tree_leaf.d.ts +1 -1
- package/dest/trees/membership_witness.d.ts +3 -24
- package/dest/trees/membership_witness.d.ts.map +1 -1
- package/dest/trees/membership_witness.js +1 -1
- package/dest/trees/merkle_tree.d.ts +1 -1
- package/dest/trees/merkle_tree.d.ts.map +1 -1
- package/dest/trees/merkle_tree_calculator.d.ts +2 -12
- package/dest/trees/merkle_tree_calculator.d.ts.map +1 -1
- package/dest/trees/merkle_tree_calculator.js +1 -31
- package/dest/trees/sibling_path.d.ts +5 -39
- package/dest/trees/sibling_path.d.ts.map +1 -1
- package/dest/trees/sibling_path.js +2 -2
- package/dest/trees/unbalanced_merkle_tree.d.ts +5 -3
- package/dest/trees/unbalanced_merkle_tree.d.ts.map +1 -1
- package/dest/trees/unbalanced_merkle_tree.js +32 -9
- package/dest/trees/unbalanced_merkle_tree_calculator.d.ts +6 -5
- package/dest/trees/unbalanced_merkle_tree_calculator.d.ts.map +1 -1
- package/dest/trees/unbalanced_merkle_tree_calculator.js +36 -40
- package/dest/trees/unbalanced_tree_store.d.ts +1 -1
- package/dest/trees/unbalanced_tree_store.d.ts.map +1 -1
- package/dest/types/index.d.ts +1 -1
- package/dest/url/index.d.ts +1 -1
- package/dest/validation/index.d.ts +1 -1
- package/package.json +29 -7
- package/src/array/array.ts +0 -16
- package/src/branded-types/block_number.ts +112 -0
- package/src/branded-types/checkpoint_number.ts +100 -0
- package/src/branded-types/epoch.ts +88 -0
- package/src/branded-types/index.ts +6 -0
- package/src/branded-types/slot.ts +88 -0
- package/src/branded-types/types.ts +2 -0
- package/src/buffer/buffer16.ts +2 -2
- package/src/buffer/buffer32.ts +2 -2
- package/src/collection/array.ts +15 -3
- package/src/config/env_var.ts +20 -2
- package/src/config/index.ts +20 -2
- package/src/crypto/aes128/index.ts +2 -2
- package/src/crypto/bls/bn254_keystore.ts +287 -0
- package/src/crypto/bls/index.ts +77 -0
- package/src/crypto/bn254/index.ts +64 -0
- package/src/crypto/ecdsa/index.ts +4 -4
- package/src/crypto/ecdsa/signature.ts +2 -2
- package/src/crypto/grumpkin/index.ts +14 -20
- package/src/crypto/keys/index.ts +2 -2
- package/src/crypto/pedersen/pedersen.wasm.ts +4 -4
- package/src/crypto/poseidon/index.ts +6 -6
- package/src/crypto/schnorr/index.ts +5 -4
- package/src/crypto/schnorr/signature.ts +2 -2
- package/src/crypto/secp256k1/index.ts +3 -3
- package/src/crypto/secp256k1-signer/utils.ts +102 -10
- package/src/crypto/sha256/index.ts +1 -1
- package/src/crypto/sha512/index.ts +1 -1
- package/src/crypto/signature/index.ts +1 -1
- package/src/crypto/sync/index.ts +1 -1
- package/src/crypto/sync/pedersen/index.ts +1 -1
- package/src/crypto/sync/poseidon/index.ts +1 -1
- package/src/{fields/bls12_fields.ts → curves/bls12/field.ts} +6 -6
- package/src/curves/bls12/index.ts +2 -0
- package/src/{fields/bls12_point.ts → curves/bls12/point.ts} +7 -7
- package/src/{fields/fields.ts → curves/bn254/field.ts} +37 -14
- package/src/curves/bn254/index.ts +2 -0
- package/src/curves/bn254/point.ts +170 -0
- package/src/curves/grumpkin/index.ts +11 -0
- package/src/{fields → curves/grumpkin}/point.ts +26 -7
- package/src/eth-address/index.ts +26 -1
- package/src/schemas/schemas.ts +16 -13
- package/src/schemas/utils.ts +21 -8
- package/src/serialize/field_reader.ts +1 -1
- package/src/serialize/free_funcs.ts +1 -1
- package/src/serialize/serialize.ts +1 -1
- package/src/string/index.ts +3 -0
- package/src/testing/files/index.ts +1 -1
- package/src/trees/balanced_merkle_tree.ts +84 -0
- package/src/trees/index.ts +1 -0
- package/src/trees/indexed_merkle_tree.ts +1 -1
- package/src/trees/membership_witness.ts +1 -1
- package/src/trees/merkle_tree_calculator.ts +1 -34
- package/src/trees/sibling_path.ts +2 -2
- package/src/trees/unbalanced_merkle_tree.ts +54 -6
- package/src/trees/unbalanced_merkle_tree_calculator.ts +34 -41
- package/dest/crypto/index.d.ts +0 -15
- package/dest/crypto/index.d.ts.map +0 -1
- package/dest/crypto/index.js +0 -14
- package/dest/fields/bls12_fields.d.ts.map +0 -1
- package/dest/fields/bls12_point.d.ts.map +0 -1
- package/dest/fields/coordinate.d.ts +0 -66
- package/dest/fields/coordinate.d.ts.map +0 -1
- package/dest/fields/coordinate.js +0 -96
- package/dest/fields/fields.d.ts.map +0 -1
- package/dest/fields/index.d.ts +0 -6
- package/dest/fields/index.d.ts.map +0 -1
- package/dest/fields/index.js +0 -5
- package/dest/fields/point.d.ts.map +0 -1
- package/dest/index.d.ts +0 -30
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -30
- package/src/crypto/index.ts +0 -14
- package/src/fields/coordinate.ts +0 -104
- package/src/fields/index.ts +0 -5
- package/src/index.ts +0 -30
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* BN254 Keystore Format
|
|
4
|
+
*
|
|
5
|
+
* Implements encryption and decryption of keystores for BN254 BLS private keys
|
|
6
|
+
* using PBKDF2 and AES-128-CTR. This format is inspired by EIP-2335 but adapted
|
|
7
|
+
* for BN254 keys rather than BLS12-381.
|
|
8
|
+
*
|
|
9
|
+
* @see https://eips.ethereum.org/EIPS/eip-2335
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Zod schema for validating BN254 keystore structure
|
|
13
|
+
*/
|
|
14
|
+
declare const bn254KeystoreSchema: z.ZodObject<{
|
|
15
|
+
crypto: z.ZodObject<{
|
|
16
|
+
kdf: z.ZodObject<{
|
|
17
|
+
function: z.ZodLiteral<"pbkdf2">;
|
|
18
|
+
params: z.ZodObject<{
|
|
19
|
+
dklen: z.ZodNumber;
|
|
20
|
+
c: z.ZodNumber;
|
|
21
|
+
prf: z.ZodString;
|
|
22
|
+
salt: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
dklen: number;
|
|
25
|
+
c: number;
|
|
26
|
+
prf: string;
|
|
27
|
+
salt: string;
|
|
28
|
+
}, {
|
|
29
|
+
dklen: number;
|
|
30
|
+
c: number;
|
|
31
|
+
prf: string;
|
|
32
|
+
salt: string;
|
|
33
|
+
}>;
|
|
34
|
+
message: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
function: "pbkdf2";
|
|
37
|
+
params: {
|
|
38
|
+
dklen: number;
|
|
39
|
+
c: number;
|
|
40
|
+
prf: string;
|
|
41
|
+
salt: string;
|
|
42
|
+
};
|
|
43
|
+
message: string;
|
|
44
|
+
}, {
|
|
45
|
+
function: "pbkdf2";
|
|
46
|
+
params: {
|
|
47
|
+
dklen: number;
|
|
48
|
+
c: number;
|
|
49
|
+
prf: string;
|
|
50
|
+
salt: string;
|
|
51
|
+
};
|
|
52
|
+
message: string;
|
|
53
|
+
}>;
|
|
54
|
+
checksum: z.ZodObject<{
|
|
55
|
+
function: z.ZodLiteral<"sha256">;
|
|
56
|
+
params: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
57
|
+
message: z.ZodString;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
function: "sha256";
|
|
60
|
+
params: {};
|
|
61
|
+
message: string;
|
|
62
|
+
}, {
|
|
63
|
+
function: "sha256";
|
|
64
|
+
params: {};
|
|
65
|
+
message: string;
|
|
66
|
+
}>;
|
|
67
|
+
cipher: z.ZodObject<{
|
|
68
|
+
function: z.ZodLiteral<"aes-128-ctr">;
|
|
69
|
+
params: z.ZodObject<{
|
|
70
|
+
iv: z.ZodString;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
iv: string;
|
|
73
|
+
}, {
|
|
74
|
+
iv: string;
|
|
75
|
+
}>;
|
|
76
|
+
message: z.ZodString;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
function: "aes-128-ctr";
|
|
79
|
+
params: {
|
|
80
|
+
iv: string;
|
|
81
|
+
};
|
|
82
|
+
message: string;
|
|
83
|
+
}, {
|
|
84
|
+
function: "aes-128-ctr";
|
|
85
|
+
params: {
|
|
86
|
+
iv: string;
|
|
87
|
+
};
|
|
88
|
+
message: string;
|
|
89
|
+
}>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
kdf: {
|
|
92
|
+
function: "pbkdf2";
|
|
93
|
+
params: {
|
|
94
|
+
dklen: number;
|
|
95
|
+
c: number;
|
|
96
|
+
prf: string;
|
|
97
|
+
salt: string;
|
|
98
|
+
};
|
|
99
|
+
message: string;
|
|
100
|
+
};
|
|
101
|
+
checksum: {
|
|
102
|
+
function: "sha256";
|
|
103
|
+
params: {};
|
|
104
|
+
message: string;
|
|
105
|
+
};
|
|
106
|
+
cipher: {
|
|
107
|
+
function: "aes-128-ctr";
|
|
108
|
+
params: {
|
|
109
|
+
iv: string;
|
|
110
|
+
};
|
|
111
|
+
message: string;
|
|
112
|
+
};
|
|
113
|
+
}, {
|
|
114
|
+
kdf: {
|
|
115
|
+
function: "pbkdf2";
|
|
116
|
+
params: {
|
|
117
|
+
dklen: number;
|
|
118
|
+
c: number;
|
|
119
|
+
prf: string;
|
|
120
|
+
salt: string;
|
|
121
|
+
};
|
|
122
|
+
message: string;
|
|
123
|
+
};
|
|
124
|
+
checksum: {
|
|
125
|
+
function: "sha256";
|
|
126
|
+
params: {};
|
|
127
|
+
message: string;
|
|
128
|
+
};
|
|
129
|
+
cipher: {
|
|
130
|
+
function: "aes-128-ctr";
|
|
131
|
+
params: {
|
|
132
|
+
iv: string;
|
|
133
|
+
};
|
|
134
|
+
message: string;
|
|
135
|
+
};
|
|
136
|
+
}>;
|
|
137
|
+
description: z.ZodOptional<z.ZodString>;
|
|
138
|
+
pubkey: z.ZodString;
|
|
139
|
+
path: z.ZodString;
|
|
140
|
+
uuid: z.ZodString;
|
|
141
|
+
version: z.ZodNumber;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
crypto: {
|
|
144
|
+
kdf: {
|
|
145
|
+
function: "pbkdf2";
|
|
146
|
+
params: {
|
|
147
|
+
dklen: number;
|
|
148
|
+
c: number;
|
|
149
|
+
prf: string;
|
|
150
|
+
salt: string;
|
|
151
|
+
};
|
|
152
|
+
message: string;
|
|
153
|
+
};
|
|
154
|
+
checksum: {
|
|
155
|
+
function: "sha256";
|
|
156
|
+
params: {};
|
|
157
|
+
message: string;
|
|
158
|
+
};
|
|
159
|
+
cipher: {
|
|
160
|
+
function: "aes-128-ctr";
|
|
161
|
+
params: {
|
|
162
|
+
iv: string;
|
|
163
|
+
};
|
|
164
|
+
message: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
description?: string | undefined;
|
|
168
|
+
pubkey: string;
|
|
169
|
+
path: string;
|
|
170
|
+
uuid: string;
|
|
171
|
+
version: number;
|
|
172
|
+
}, {
|
|
173
|
+
crypto: {
|
|
174
|
+
kdf: {
|
|
175
|
+
function: "pbkdf2";
|
|
176
|
+
params: {
|
|
177
|
+
dklen: number;
|
|
178
|
+
c: number;
|
|
179
|
+
prf: string;
|
|
180
|
+
salt: string;
|
|
181
|
+
};
|
|
182
|
+
message: string;
|
|
183
|
+
};
|
|
184
|
+
checksum: {
|
|
185
|
+
function: "sha256";
|
|
186
|
+
params: {};
|
|
187
|
+
message: string;
|
|
188
|
+
};
|
|
189
|
+
cipher: {
|
|
190
|
+
function: "aes-128-ctr";
|
|
191
|
+
params: {
|
|
192
|
+
iv: string;
|
|
193
|
+
};
|
|
194
|
+
message: string;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
description?: string | undefined;
|
|
198
|
+
pubkey: string;
|
|
199
|
+
path: string;
|
|
200
|
+
uuid: string;
|
|
201
|
+
version: number;
|
|
202
|
+
}>;
|
|
203
|
+
/**
|
|
204
|
+
* Error thrown when BN254 keystore operations fail
|
|
205
|
+
*/
|
|
206
|
+
export declare class Bn254KeystoreError extends Error {
|
|
207
|
+
cause?: Error | undefined;
|
|
208
|
+
constructor(message: string, cause?: Error | undefined);
|
|
209
|
+
}
|
|
210
|
+
export type Bn254Keystore = z.infer<typeof bn254KeystoreSchema>;
|
|
211
|
+
/**
|
|
212
|
+
* The JSON structure of a BN254 keystore file.
|
|
213
|
+
* @deprecated Use the inferred type from bn254KeystoreSchema instead
|
|
214
|
+
*/
|
|
215
|
+
export interface Bn254KeystoreInterface {
|
|
216
|
+
crypto: {
|
|
217
|
+
kdf: {
|
|
218
|
+
function: 'pbkdf2';
|
|
219
|
+
params: {
|
|
220
|
+
dklen: number;
|
|
221
|
+
c: number;
|
|
222
|
+
prf: string;
|
|
223
|
+
salt: string;
|
|
224
|
+
};
|
|
225
|
+
message: string;
|
|
226
|
+
};
|
|
227
|
+
checksum: {
|
|
228
|
+
function: 'sha256';
|
|
229
|
+
params: Record<string, never>;
|
|
230
|
+
message: string;
|
|
231
|
+
};
|
|
232
|
+
cipher: {
|
|
233
|
+
function: 'aes-128-ctr';
|
|
234
|
+
params: {
|
|
235
|
+
iv: string;
|
|
236
|
+
};
|
|
237
|
+
message: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
description: string;
|
|
241
|
+
pubkey: string;
|
|
242
|
+
path: string;
|
|
243
|
+
uuid: string;
|
|
244
|
+
version: number;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Creates a BN254 keystore object for a BN254 BLS private key.
|
|
248
|
+
*
|
|
249
|
+
* Uses PBKDF2 with SHA-256 for key derivation and AES-128-CTR for encryption,
|
|
250
|
+
* following the EIP-2335 specification format.
|
|
251
|
+
*
|
|
252
|
+
* @param password - Password for encrypting the private key
|
|
253
|
+
* @param privateKeyHex - Private key as 0x-prefixed hex string (32 bytes)
|
|
254
|
+
* @param pubkeyHex - Public key as hex string (compressed or uncompressed)
|
|
255
|
+
* @param derivationPath - BIP-44 style derivation path (e.g., "m/12381/3600/0/0/0")
|
|
256
|
+
* @returns BN254 keystore object ready to be serialized to JSON
|
|
257
|
+
* @throws Error if private key is not 32-byte hex
|
|
258
|
+
*/
|
|
259
|
+
export declare function createBn254Keystore(password: string, privateKeyHex: string, pubkeyHex: string, derivationPath: string): Bn254Keystore;
|
|
260
|
+
/**
|
|
261
|
+
* Loads and validates a BN254 keystore file.
|
|
262
|
+
*
|
|
263
|
+
* @param filePath - Path to the BN254 keystore JSON file
|
|
264
|
+
* @returns Validated keystore object
|
|
265
|
+
* @throws Bn254KeystoreError if file cannot be read or validated
|
|
266
|
+
*/
|
|
267
|
+
export declare function loadBn254Keystore(filePath: string): Bn254Keystore;
|
|
268
|
+
/**
|
|
269
|
+
* Decrypts a BN254 BLS private key from a keystore file.
|
|
270
|
+
*
|
|
271
|
+
* @param filePath - Path to the BN254 keystore JSON file
|
|
272
|
+
* @param password - Password to decrypt the keystore
|
|
273
|
+
* @returns Decrypted private key as 0x-prefixed hex string (32 bytes)
|
|
274
|
+
* @throws Bn254KeystoreError if decryption fails or checksum is invalid
|
|
275
|
+
*/
|
|
276
|
+
export declare function decryptBn254Keystore(filePath: string, password: string): string;
|
|
277
|
+
/**
|
|
278
|
+
* Decrypts a BN254 BLS private key from a keystore object.
|
|
279
|
+
*
|
|
280
|
+
* @param keystore - BN254 keystore object
|
|
281
|
+
* @param password - Password to decrypt the keystore
|
|
282
|
+
* @returns Decrypted private key as 0x-prefixed hex string (32 bytes)
|
|
283
|
+
* @throws Bn254KeystoreError if decryption fails or checksum is invalid
|
|
284
|
+
*/
|
|
285
|
+
export declare function decryptBn254KeystoreFromObject(keystore: Bn254Keystore, password: string): string;
|
|
286
|
+
/**
|
|
287
|
+
* Validates that a decrypted private key matches the public key in the keystore.
|
|
288
|
+
*
|
|
289
|
+
* @param privateKeyHex - Decrypted private key (0x-prefixed)
|
|
290
|
+
* @param expectedPubkey - Expected public key from keystore
|
|
291
|
+
* @param computePublicKey - Function to compute public key from private key
|
|
292
|
+
* @returns true if keys match, false otherwise
|
|
293
|
+
*/
|
|
294
|
+
export declare function verifyBn254Keypair(privateKeyHex: string, expectedPubkey: string, computePublicKey: (privateKey: string) => string): boolean;
|
|
295
|
+
export {};
|
|
296
|
+
//# sourceMappingURL=data:application/json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AAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAC/C,OAAO,CAST"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
2
|
+
import { createCipheriv, createDecipheriv, createHash, pbkdf2Sync, randomUUID } from 'crypto';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
/**
|
|
6
|
+
* BN254 Keystore Format
|
|
7
|
+
*
|
|
8
|
+
* Implements encryption and decryption of keystores for BN254 BLS private keys
|
|
9
|
+
* using PBKDF2 and AES-128-CTR. This format is inspired by EIP-2335 but adapted
|
|
10
|
+
* for BN254 keys rather than BLS12-381.
|
|
11
|
+
*
|
|
12
|
+
* @see https://eips.ethereum.org/EIPS/eip-2335
|
|
13
|
+
*/ /**
|
|
14
|
+
* Zod schema for validating BN254 keystore structure
|
|
15
|
+
*/ const bn254KeystoreSchema = z.object({
|
|
16
|
+
crypto: z.object({
|
|
17
|
+
kdf: z.object({
|
|
18
|
+
function: z.literal('pbkdf2'),
|
|
19
|
+
params: z.object({
|
|
20
|
+
dklen: z.number(),
|
|
21
|
+
c: z.number(),
|
|
22
|
+
prf: z.string(),
|
|
23
|
+
salt: z.string()
|
|
24
|
+
}),
|
|
25
|
+
message: z.string()
|
|
26
|
+
}),
|
|
27
|
+
checksum: z.object({
|
|
28
|
+
function: z.literal('sha256'),
|
|
29
|
+
params: z.object({}),
|
|
30
|
+
message: z.string()
|
|
31
|
+
}),
|
|
32
|
+
cipher: z.object({
|
|
33
|
+
function: z.literal('aes-128-ctr'),
|
|
34
|
+
params: z.object({
|
|
35
|
+
iv: z.string()
|
|
36
|
+
}),
|
|
37
|
+
message: z.string()
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
description: z.string().optional(),
|
|
41
|
+
pubkey: z.string(),
|
|
42
|
+
path: z.string(),
|
|
43
|
+
uuid: z.string(),
|
|
44
|
+
version: z.number()
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Error thrown when BN254 keystore operations fail
|
|
48
|
+
*/ export class Bn254KeystoreError extends Error {
|
|
49
|
+
cause;
|
|
50
|
+
constructor(message, cause){
|
|
51
|
+
super(message), this.cause = cause;
|
|
52
|
+
this.name = 'Bn254KeystoreError';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Creates a BN254 keystore object for a BN254 BLS private key.
|
|
57
|
+
*
|
|
58
|
+
* Uses PBKDF2 with SHA-256 for key derivation and AES-128-CTR for encryption,
|
|
59
|
+
* following the EIP-2335 specification format.
|
|
60
|
+
*
|
|
61
|
+
* @param password - Password for encrypting the private key
|
|
62
|
+
* @param privateKeyHex - Private key as 0x-prefixed hex string (32 bytes)
|
|
63
|
+
* @param pubkeyHex - Public key as hex string (compressed or uncompressed)
|
|
64
|
+
* @param derivationPath - BIP-44 style derivation path (e.g., "m/12381/3600/0/0/0")
|
|
65
|
+
* @returns BN254 keystore object ready to be serialized to JSON
|
|
66
|
+
* @throws Error if private key is not 32-byte hex
|
|
67
|
+
*/ export function createBn254Keystore(password, privateKeyHex, pubkeyHex, derivationPath) {
|
|
68
|
+
const ensureHex = (hex)=>hex.replace(/^0x/i, '');
|
|
69
|
+
const privHex = ensureHex(privateKeyHex);
|
|
70
|
+
if (!/^[0-9a-fA-F]{64}$/.test(privHex)) {
|
|
71
|
+
throw new Error('BLS private key must be 32-byte hex');
|
|
72
|
+
}
|
|
73
|
+
const salt = randomBytes(32);
|
|
74
|
+
const iv = randomBytes(16);
|
|
75
|
+
const dk = pbkdf2Sync(Buffer.from(password.normalize('NFKD'), 'utf8'), salt, 262144, 32, 'sha256');
|
|
76
|
+
const cipherKey = dk.subarray(0, 16);
|
|
77
|
+
const cipher = createCipheriv('aes-128-ctr', cipherKey, iv);
|
|
78
|
+
const plaintext = Buffer.from(privHex, 'hex');
|
|
79
|
+
const ciphertext = Buffer.concat([
|
|
80
|
+
cipher.update(plaintext),
|
|
81
|
+
cipher.final()
|
|
82
|
+
]);
|
|
83
|
+
const checksum = createHash('sha256').update(Buffer.concat([
|
|
84
|
+
dk.subarray(16, 32),
|
|
85
|
+
ciphertext
|
|
86
|
+
])).digest();
|
|
87
|
+
const uuid = randomUUID();
|
|
88
|
+
return {
|
|
89
|
+
crypto: {
|
|
90
|
+
kdf: {
|
|
91
|
+
function: 'pbkdf2',
|
|
92
|
+
params: {
|
|
93
|
+
dklen: 32,
|
|
94
|
+
c: 262144,
|
|
95
|
+
prf: 'hmac-sha256',
|
|
96
|
+
salt: salt.toString('hex')
|
|
97
|
+
},
|
|
98
|
+
message: ''
|
|
99
|
+
},
|
|
100
|
+
checksum: {
|
|
101
|
+
function: 'sha256',
|
|
102
|
+
params: {},
|
|
103
|
+
message: checksum.toString('hex')
|
|
104
|
+
},
|
|
105
|
+
cipher: {
|
|
106
|
+
function: 'aes-128-ctr',
|
|
107
|
+
params: {
|
|
108
|
+
iv: iv.toString('hex')
|
|
109
|
+
},
|
|
110
|
+
message: ciphertext.toString('hex')
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
description: ensureHex(pubkeyHex),
|
|
114
|
+
pubkey: pubkeyHex,
|
|
115
|
+
path: derivationPath ?? '',
|
|
116
|
+
uuid,
|
|
117
|
+
version: 4
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Loads and validates a BN254 keystore file.
|
|
122
|
+
*
|
|
123
|
+
* @param filePath - Path to the BN254 keystore JSON file
|
|
124
|
+
* @returns Validated keystore object
|
|
125
|
+
* @throws Bn254KeystoreError if file cannot be read or validated
|
|
126
|
+
*/ export function loadBn254Keystore(filePath) {
|
|
127
|
+
try {
|
|
128
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
129
|
+
const json = JSON.parse(content);
|
|
130
|
+
return bn254KeystoreSchema.parse(json);
|
|
131
|
+
} catch (error) {
|
|
132
|
+
if (error instanceof SyntaxError) {
|
|
133
|
+
throw new Bn254KeystoreError(`Invalid JSON in keystore file: ${filePath}`, error);
|
|
134
|
+
}
|
|
135
|
+
if (error && typeof error === 'object' && 'issues' in error) {
|
|
136
|
+
const issues = error.issues ?? [];
|
|
137
|
+
const message = issues.map((e)=>`${e.message} at ${e.path?.join('.') ?? 'root'}`).join('; ');
|
|
138
|
+
throw new Bn254KeystoreError(`Invalid BN254 keystore format: ${message}`);
|
|
139
|
+
}
|
|
140
|
+
throw new Bn254KeystoreError(`Failed to load keystore from ${filePath}: ${String(error)}`, error);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Decrypts a BN254 BLS private key from a keystore file.
|
|
145
|
+
*
|
|
146
|
+
* @param filePath - Path to the BN254 keystore JSON file
|
|
147
|
+
* @param password - Password to decrypt the keystore
|
|
148
|
+
* @returns Decrypted private key as 0x-prefixed hex string (32 bytes)
|
|
149
|
+
* @throws Bn254KeystoreError if decryption fails or checksum is invalid
|
|
150
|
+
*/ export function decryptBn254Keystore(filePath, password) {
|
|
151
|
+
const keystore = loadBn254Keystore(filePath);
|
|
152
|
+
return decryptBn254KeystoreFromObject(keystore, password);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Decrypts a BN254 BLS private key from a keystore object.
|
|
156
|
+
*
|
|
157
|
+
* @param keystore - BN254 keystore object
|
|
158
|
+
* @param password - Password to decrypt the keystore
|
|
159
|
+
* @returns Decrypted private key as 0x-prefixed hex string (32 bytes)
|
|
160
|
+
* @throws Bn254KeystoreError if decryption fails or checksum is invalid
|
|
161
|
+
*/ export function decryptBn254KeystoreFromObject(keystore, password) {
|
|
162
|
+
try {
|
|
163
|
+
const { crypto } = keystore;
|
|
164
|
+
// Only support PBKDF2 + AES-128-CTR (as per our implementation)
|
|
165
|
+
if (crypto.kdf.function !== 'pbkdf2') {
|
|
166
|
+
throw new Bn254KeystoreError(`Unsupported KDF function: ${crypto.kdf.function}`);
|
|
167
|
+
}
|
|
168
|
+
if (crypto.cipher.function !== 'aes-128-ctr') {
|
|
169
|
+
throw new Bn254KeystoreError(`Unsupported cipher function: ${crypto.cipher.function}`);
|
|
170
|
+
}
|
|
171
|
+
// Derive decryption key using PBKDF2
|
|
172
|
+
const salt = Buffer.from(crypto.kdf.params.salt, 'hex');
|
|
173
|
+
const dk = pbkdf2Sync(Buffer.from(password.normalize('NFKD'), 'utf8'), salt, crypto.kdf.params.c, crypto.kdf.params.dklen, 'sha256');
|
|
174
|
+
const cipherKey = dk.subarray(0, 16);
|
|
175
|
+
const checksumKey = dk.subarray(16, 32);
|
|
176
|
+
// Decrypt the ciphertext
|
|
177
|
+
const iv = Buffer.from(crypto.cipher.params.iv, 'hex');
|
|
178
|
+
const ciphertext = Buffer.from(crypto.cipher.message, 'hex');
|
|
179
|
+
const decipher = createDecipheriv('aes-128-ctr', cipherKey, iv);
|
|
180
|
+
const decrypted = Buffer.concat([
|
|
181
|
+
decipher.update(ciphertext),
|
|
182
|
+
decipher.final()
|
|
183
|
+
]);
|
|
184
|
+
// Verify checksum
|
|
185
|
+
const computedChecksum = createHash('sha256').update(Buffer.concat([
|
|
186
|
+
checksumKey,
|
|
187
|
+
ciphertext
|
|
188
|
+
])).digest();
|
|
189
|
+
const expectedChecksum = Buffer.from(crypto.checksum.message, 'hex');
|
|
190
|
+
if (!computedChecksum.equals(expectedChecksum)) {
|
|
191
|
+
throw new Bn254KeystoreError('Checksum verification failed - incorrect password or corrupted keystore');
|
|
192
|
+
}
|
|
193
|
+
// Return as 0x-prefixed hex
|
|
194
|
+
return '0x' + decrypted.toString('hex');
|
|
195
|
+
} catch (error) {
|
|
196
|
+
if (error instanceof Bn254KeystoreError) {
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
throw new Bn254KeystoreError(`Failed to decrypt keystore: ${String(error)}`, error);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Validates that a decrypted private key matches the public key in the keystore.
|
|
204
|
+
*
|
|
205
|
+
* @param privateKeyHex - Decrypted private key (0x-prefixed)
|
|
206
|
+
* @param expectedPubkey - Expected public key from keystore
|
|
207
|
+
* @param computePublicKey - Function to compute public key from private key
|
|
208
|
+
* @returns true if keys match, false otherwise
|
|
209
|
+
*/ export function verifyBn254Keypair(privateKeyHex, expectedPubkey, computePublicKey) {
|
|
210
|
+
try {
|
|
211
|
+
const computedPubkey = computePublicKey(privateKeyHex);
|
|
212
|
+
const normalizedExpected = expectedPubkey.toLowerCase().replace(/^0x/i, '');
|
|
213
|
+
const normalizedComputed = computedPubkey.toLowerCase().replace(/^0x/i, '');
|
|
214
|
+
return normalizedExpected === normalizedComputed;
|
|
215
|
+
} catch {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Hex } from '@aztec/foundation/string';
|
|
2
|
+
export declare function deriveBlsPrivateKey(mnemonic: string | undefined, ikm: string | undefined, path: string): Hex<32>;
|
|
3
|
+
/**
|
|
4
|
+
* Deterministically derive a BN254 BLS private key from mnemonic and derivation path.
|
|
5
|
+
* Returns a 0x-prefixed 32-byte hex string representing an Fr in [1, r-1].
|
|
6
|
+
*/
|
|
7
|
+
export declare function deriveBlsKeyFromMnemonic(mnemonic: string, derivationPath: string, passphrase?: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Deterministically derive a BN254 BLS private key from input keying material (IKM) and derivation path.
|
|
10
|
+
* Returns a 0x-prefixed 32-byte hex string representing an Fr in [1, r-1].
|
|
11
|
+
*/
|
|
12
|
+
export declare function deriveBlsKeyFromEntropy(ikm: string, derivationPath: string): string;
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jcnlwdG8vYmxzL2luZGV4LnRzIl0sIm5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/curves/bn254';
|
|
2
|
+
import { mod } from '@noble/curves/abstract/modular';
|
|
3
|
+
import { bytesToNumberBE } from '@noble/curves/abstract/utils';
|
|
4
|
+
import { hmac } from '@noble/hashes/hmac';
|
|
5
|
+
import { sha512 } from '@noble/hashes/sha2';
|
|
6
|
+
import { mnemonicToSeedSync } from '@scure/bip39';
|
|
7
|
+
export function deriveBlsPrivateKey(mnemonic, ikm, path) {
|
|
8
|
+
if (ikm) {
|
|
9
|
+
return deriveBlsKeyFromEntropy(ikm, path);
|
|
10
|
+
}
|
|
11
|
+
if (!mnemonic) {
|
|
12
|
+
throw new Error('Either mnemonic or ikm must be provided for BLS derivation');
|
|
13
|
+
}
|
|
14
|
+
return deriveBlsKeyFromMnemonic(mnemonic, path);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Deterministically derive a BN254 BLS private key from mnemonic and derivation path.
|
|
18
|
+
* Returns a 0x-prefixed 32-byte hex string representing an Fr in [1, r-1].
|
|
19
|
+
*/ export function deriveBlsKeyFromMnemonic(mnemonic, derivationPath, passphrase = '') {
|
|
20
|
+
const seed = Buffer.from(mnemonicToSeedSync(mnemonic, passphrase)); // 64 bytes
|
|
21
|
+
const data = Buffer.concat([
|
|
22
|
+
Buffer.from([
|
|
23
|
+
0x00
|
|
24
|
+
]),
|
|
25
|
+
seed,
|
|
26
|
+
Buffer.from(derivationPath, 'utf8')
|
|
27
|
+
]);
|
|
28
|
+
const sk = deriveBn254ScalarFromData(data);
|
|
29
|
+
return `0x${toFixed32(sk).toString('hex')}`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Deterministically derive a BN254 BLS private key from input keying material (IKM) and derivation path.
|
|
33
|
+
* Returns a 0x-prefixed 32-byte hex string representing an Fr in [1, r-1].
|
|
34
|
+
*/ export function deriveBlsKeyFromEntropy(ikm, derivationPath) {
|
|
35
|
+
const ikmBytes = parseIkm(ikm);
|
|
36
|
+
const data = Buffer.concat([
|
|
37
|
+
Buffer.from([
|
|
38
|
+
0x01
|
|
39
|
+
]),
|
|
40
|
+
ikmBytes,
|
|
41
|
+
Buffer.from(derivationPath, 'utf8')
|
|
42
|
+
]);
|
|
43
|
+
const sk = deriveBn254ScalarFromData(data);
|
|
44
|
+
return `0x${toFixed32(sk).toString('hex')}`;
|
|
45
|
+
}
|
|
46
|
+
function deriveBn254ScalarFromData(data) {
|
|
47
|
+
// Domain-separated HMAC-SHA512, then map to BN254 Fr using noble modular math. Retry on zero.
|
|
48
|
+
const domainKey = Buffer.from('Aztec bn254 key', 'utf8');
|
|
49
|
+
for(let counter = 0;; counter = counter + 1 & 0xff){
|
|
50
|
+
const msg = counter === 0 ? data : Buffer.concat([
|
|
51
|
+
data,
|
|
52
|
+
Buffer.from([
|
|
53
|
+
counter
|
|
54
|
+
])
|
|
55
|
+
]);
|
|
56
|
+
const digest = hmac(sha512, domainKey, msg); // 64 bytes
|
|
57
|
+
const x = bytesToNumberBE(digest);
|
|
58
|
+
const sk = mod(x, Fr.MODULUS);
|
|
59
|
+
if (sk !== 0n) {
|
|
60
|
+
return sk;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function parseIkm(ikm) {
|
|
65
|
+
const hexMatch = ikm.replace(/^0x/i, '');
|
|
66
|
+
if (/^[0-9a-fA-F]+$/.test(hexMatch) && hexMatch.length >= 2) {
|
|
67
|
+
const normalized = hexMatch.length % 2 === 1 ? `0${hexMatch}` : hexMatch;
|
|
68
|
+
return Buffer.from(normalized, 'hex');
|
|
69
|
+
}
|
|
70
|
+
return Buffer.from(ikm, 'utf8');
|
|
71
|
+
}
|
|
72
|
+
function toFixed32(x) {
|
|
73
|
+
const hex = x.toString(16);
|
|
74
|
+
const padded = hex.length % 2 === 1 ? `0${hex}` : hex;
|
|
75
|
+
const buf = Buffer.from(padded, 'hex');
|
|
76
|
+
if (buf.length === 32) {
|
|
77
|
+
return buf;
|
|
78
|
+
}
|
|
79
|
+
if (buf.length < 32) {
|
|
80
|
+
return Buffer.concat([
|
|
81
|
+
Buffer.alloc(32 - buf.length, 0),
|
|
82
|
+
buf
|
|
83
|
+
]);
|
|
84
|
+
}
|
|
85
|
+
// Should never happen since x < bn254.Fr.ORDER < 2^256, but guard anyway
|
|
86
|
+
return buf.subarray(buf.length - 32);
|
|
87
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BN254 utility functions for point operations.
|
|
3
|
+
* Provides compression, decompression, and public key generation for the BN254 curve.
|
|
4
|
+
* Uses the bb.js Barretenberg backend for point operations.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Generate a compressed BN254 G1 public key from a private key.
|
|
8
|
+
*
|
|
9
|
+
* @param privateKeyHex - Private key as 0x-prefixed hex string
|
|
10
|
+
* @returns Compressed G1 point (32 bytes with sign bit in MSB)
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeBn254G1PublicKeyCompressed(privateKeyHex: string): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Generate uncompressed BN254 G1 public key from a private key.
|
|
15
|
+
*
|
|
16
|
+
* @param privateKeyHex - Private key as 0x-prefixed hex string
|
|
17
|
+
* @returns G1 point in affine coordinates
|
|
18
|
+
*/
|
|
19
|
+
export declare function computeBn254G1PublicKey(privateKeyHex: string): Promise<{
|
|
20
|
+
x: bigint;
|
|
21
|
+
y: bigint;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Generate BN254 G2 public key from a private key.
|
|
25
|
+
*
|
|
26
|
+
* @param privateKeyHex - Private key as 0x-prefixed hex string
|
|
27
|
+
* @returns G2 point in affine coordinates
|
|
28
|
+
*/
|
|
29
|
+
export declare function computeBn254G2PublicKey(privateKeyHex: string): Promise<{
|
|
30
|
+
x: {
|
|
31
|
+
c0: bigint;
|
|
32
|
+
c1: bigint;
|
|
33
|
+
};
|
|
34
|
+
y: {
|
|
35
|
+
c0: bigint;
|
|
36
|
+
c1: bigint;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jcnlwdG8vYm4yNTQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0E7Ozs7R0FJRztBQUVIOzs7OztHQUtHO0FBQ0gsd0JBQXNCLGlDQUFpQyxDQUFDLGFBQWEsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQVU5RjtBQUVEOzs7OztHQUtHO0FBQ0gsd0JBQXNCLHVCQUF1QixDQUFDLGFBQWEsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDO0lBQUUsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUFDLENBQUMsRUFBRSxNQUFNLENBQUE7Q0FBRSxDQUFDLENBUXRHO0FBRUQ7Ozs7O0dBS0c7QUFDSCx3QkFBc0IsdUJBQXVCLENBQUMsYUFBYSxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUM7SUFDNUUsQ0FBQyxFQUFFO1FBQUUsRUFBRSxFQUFFLE1BQU0sQ0FBQztRQUFDLEVBQUUsRUFBRSxNQUFNLENBQUE7S0FBRSxDQUFDO0lBQzlCLENBQUMsRUFBRTtRQUFFLEVBQUUsRUFBRSxNQUFNLENBQUM7UUFBQyxFQUFFLEVBQUUsTUFBTSxDQUFBO0tBQUUsQ0FBQztDQUMvQixDQUFDLENBV0QifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crypto/bn254/index.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;GAKG;AACH,wBAAsB,iCAAiC,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAU9F;AAED;;;;;GAKG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