@aztec/stdlib 0.0.1-commit.e6bd8901 → 0.0.1-commit.ec5f612
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/abi/decoder.d.ts +1 -1
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +1 -4
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +9 -5
- package/dest/abi/function_call.d.ts +39 -9
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +20 -3
- package/dest/auth_witness/auth_witness.js +3 -3
- package/dest/avm/avm.d.ts +300 -300
- package/dest/avm/avm_proving_request.d.ts +166 -166
- package/dest/avm/revert_code.d.ts +16 -1
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +15 -5
- package/dest/block/block_data.d.ts +52 -0
- package/dest/block/block_data.d.ts.map +1 -0
- package/dest/block/block_data.js +12 -0
- package/dest/block/block_hash.d.ts +16 -18
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +21 -31
- package/dest/block/block_parameter.d.ts +4 -4
- package/dest/block/block_parameter.d.ts.map +1 -1
- package/dest/block/block_parameter.js +2 -2
- package/dest/block/in_block.d.ts +9 -9
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +5 -5
- package/dest/block/index.d.ts +2 -1
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +1 -0
- package/dest/block/l2_block.d.ts +3 -2
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block_source.d.ts +24 -4
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +10 -0
- package/dest/checkpoint/checkpoint.d.ts +21 -7
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +24 -13
- package/dest/checkpoint/checkpoint_data.d.ts +120 -0
- package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_data.js +26 -0
- package/dest/checkpoint/index.d.ts +2 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +1 -0
- package/dest/checkpoint/published_checkpoint.d.ts +17 -2
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +1 -2
- package/dest/config/index.d.ts +2 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +1 -0
- package/dest/config/sequencer-config.d.ts +10 -0
- package/dest/config/sequencer-config.d.ts.map +1 -0
- package/dest/config/sequencer-config.js +18 -0
- package/dest/contract/contract_address.js +4 -4
- package/dest/contract/contract_class.d.ts +2 -3
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class_id.d.ts +2 -2
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_class_id.js +6 -5
- package/dest/contract/interfaces/node-info.d.ts +3 -1
- package/dest/contract/interfaces/node-info.d.ts.map +1 -1
- package/dest/contract/interfaces/node-info.js +2 -1
- package/dest/contract/private_function.js +2 -2
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/database-version/database_version.d.ts +58 -0
- package/dest/database-version/database_version.d.ts.map +1 -0
- package/dest/database-version/database_version.js +69 -0
- package/dest/database-version/version_manager.d.ts +2 -50
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +1 -66
- package/dest/epoch-helpers/index.d.ts +7 -1
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +8 -2
- package/dest/file-store/local.d.ts +3 -3
- package/dest/file-store/local.d.ts.map +1 -1
- package/dest/file-store/local.js +13 -4
- package/dest/file-store/s3.d.ts +1 -1
- package/dest/file-store/s3.d.ts.map +1 -1
- package/dest/file-store/s3.js +11 -3
- package/dest/ha-signing/config.d.ts +101 -0
- package/dest/ha-signing/config.d.ts.map +1 -0
- package/dest/ha-signing/config.js +92 -0
- package/dest/ha-signing/index.d.ts +3 -0
- package/dest/ha-signing/index.d.ts.map +1 -0
- package/dest/ha-signing/index.js +2 -0
- package/dest/ha-signing/types.d.ts +85 -0
- package/dest/ha-signing/types.d.ts.map +1 -0
- package/dest/ha-signing/types.js +32 -0
- package/dest/hash/hash.d.ts +2 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +16 -10
- package/dest/hash/map_slot.d.ts +1 -1
- package/dest/hash/map_slot.d.ts.map +1 -1
- package/dest/hash/map_slot.js +4 -3
- package/dest/interfaces/archiver.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +9 -3
- package/dest/interfaces/aztec-node-admin.d.ts +46 -3
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +12 -4
- package/dest/interfaces/aztec-node.d.ts +34 -55
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +6 -10
- package/dest/interfaces/block-builder.d.ts +10 -4
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +7 -0
- package/dest/interfaces/configs.d.ts +17 -2
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +4 -1
- package/dest/interfaces/get_logs_response.d.ts +15 -8
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +4 -9
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/prover-broker.d.ts +16 -1
- package/dest/interfaces/prover-broker.d.ts.map +1 -1
- package/dest/interfaces/prover-broker.js +4 -1
- package/dest/interfaces/prover-client.d.ts +6 -1
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +5 -0
- package/dest/interfaces/proving-job.d.ts +202 -202
- package/dest/interfaces/slasher.d.ts +9 -1
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +2 -0
- package/dest/interfaces/validator.d.ts +51 -5
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +5 -2
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.js +13 -10
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +3 -3
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.js +13 -10
- package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +9 -3
- package/dest/kernel/hints/index.d.ts +2 -2
- package/dest/kernel/hints/index.js +2 -2
- package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
- package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
- package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
- package/dest/kernel/private_circuit_public_inputs.d.ts +9 -9
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +16 -16
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +3 -3
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +3 -3
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +3 -3
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +3 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
- package/dest/kernel/private_validation_requests.d.ts +3 -3
- package/dest/kernel/private_validation_requests.js +9 -9
- package/dest/keys/derivation.d.ts +3 -3
- package/dest/keys/derivation.js +15 -15
- package/dest/keys/key_types.d.ts +3 -3
- package/dest/keys/key_types.d.ts.map +1 -1
- package/dest/keys/public_keys.js +2 -2
- package/dest/keys/utils.d.ts +1 -1
- package/dest/keys/utils.d.ts.map +1 -1
- package/dest/keys/utils.js +8 -4
- package/dest/l1-contracts/slash_factory.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +1 -0
- package/dest/logs/debug_log_store.d.ts +30 -0
- package/dest/logs/debug_log_store.d.ts.map +1 -0
- package/dest/logs/debug_log_store.js +30 -0
- package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
- package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
- package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +23 -15
- package/dest/logs/extended_public_log.d.ts +13 -7
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +3 -2
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +2 -1
- package/dest/logs/log_id.d.ts +17 -14
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +20 -17
- package/dest/logs/pre_tag.d.ts +16 -11
- package/dest/logs/pre_tag.d.ts.map +1 -1
- package/dest/logs/pre_tag.js +2 -2
- package/dest/logs/private_log.d.ts +2 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/siloed_tag.d.ts +5 -3
- package/dest/logs/siloed_tag.d.ts.map +1 -1
- package/dest/logs/siloed_tag.js +8 -6
- package/dest/logs/tag.js +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +2 -2
- package/dest/messaging/l2_to_l1_membership.js +3 -3
- package/dest/note/index.d.ts +1 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +0 -1
- package/dest/p2p/attestation_utils.d.ts +11 -1
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +45 -0
- package/dest/p2p/block_proposal.d.ts +11 -4
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +2 -4
- package/dest/p2p/checkpoint_attestation.d.ts +2 -1
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
- package/dest/p2p/checkpoint_attestation.js +1 -1
- package/dest/p2p/checkpoint_proposal.d.ts +27 -8
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
- package/dest/p2p/checkpoint_proposal.js +30 -16
- package/dest/p2p/client_type.d.ts +2 -5
- package/dest/p2p/client_type.d.ts.map +1 -1
- package/dest/p2p/client_type.js +0 -7
- package/dest/p2p/consensus_payload.d.ts +12 -3
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +22 -15
- package/dest/p2p/constants.d.ts +3 -1
- package/dest/p2p/constants.d.ts.map +1 -1
- package/dest/p2p/constants.js +1 -0
- package/dest/p2p/index.d.ts +1 -2
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +0 -1
- package/dest/p2p/topic_type.d.ts +3 -4
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +7 -24
- package/dest/rollup/checkpoint_header.d.ts +2 -2
- package/dest/rollup/checkpoint_header.js +2 -2
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +6 -6
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +2 -2
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +2 -2
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +6 -6
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +3 -3
- package/dest/slashing/empire.d.ts +1 -1
- package/dest/slashing/empire.d.ts.map +1 -1
- package/dest/slashing/empire.js +2 -0
- package/dest/slashing/helpers.d.ts +2 -2
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +6 -0
- package/dest/slashing/tally.d.ts +2 -1
- package/dest/slashing/tally.d.ts.map +1 -1
- package/dest/slashing/tally.js +6 -2
- package/dest/slashing/types.d.ts +7 -3
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +13 -1
- package/dest/stats/stats.d.ts +1 -3
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +3 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +21 -13
- package/dest/tests/mocks.d.ts +10 -3
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +22 -16
- package/dest/timetable/index.d.ts +37 -0
- package/dest/timetable/index.d.ts.map +1 -0
- package/dest/timetable/index.js +39 -0
- package/dest/trees/public_data_leaf.d.ts +2 -1
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +7 -6
- package/dest/tx/block_header.d.ts +3 -2
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +4 -3
- package/dest/tx/global_variables.d.ts +4 -4
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/in_tx.d.ts +3 -3
- package/dest/tx/indexed_tx_effect.d.ts +5 -5
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +3 -2
- package/dest/tx/profiling.d.ts +4 -4
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +3 -3
- package/dest/tx/protocol_contracts.d.ts +1 -1
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +2 -2
- package/dest/tx/public_simulation_output.d.ts +4 -2
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +7 -3
- package/dest/tx/tx_receipt.d.ts +20 -6
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +13 -5
- package/dest/tx/tx_request.js +2 -2
- package/dest/tx/validator/empty_validator.d.ts +2 -2
- package/dest/tx/validator/empty_validator.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.d.ts +1 -1
- package/dest/tx/validator/error_texts.js +1 -1
- package/dest/tx/validator/tx_validator.d.ts +2 -2
- package/dest/tx/validator/tx_validator.d.ts.map +1 -1
- package/dest/validators/schemas.d.ts +30 -30
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +4 -3
- package/dest/validators/types.d.ts +3 -3
- package/dest/validators/types.d.ts.map +1 -1
- package/package.json +25 -13
- package/src/abi/decoder.ts +1 -4
- package/src/abi/encoder.ts +8 -5
- package/src/abi/function_call.ts +25 -3
- package/src/auth_witness/auth_witness.ts +3 -3
- package/src/avm/revert_code.ts +15 -0
- package/src/block/block_data.ts +26 -0
- package/src/block/block_hash.ts +26 -47
- package/src/block/block_parameter.ts +3 -3
- package/src/block/in_block.ts +6 -6
- package/src/block/index.ts +1 -0
- package/src/block/l2_block.ts +2 -1
- package/src/block/l2_block_source.ts +26 -3
- package/src/block/l2_block_stream/l2_block_stream.ts +21 -0
- package/src/checkpoint/checkpoint.ts +32 -14
- package/src/checkpoint/checkpoint_data.ts +51 -0
- package/src/checkpoint/index.ts +1 -0
- package/src/checkpoint/published_checkpoint.ts +3 -1
- package/src/config/index.ts +1 -0
- package/src/config/sequencer-config.ts +29 -0
- package/src/contract/contract_address.ts +4 -4
- package/src/contract/contract_class.ts +3 -3
- package/src/contract/contract_class_id.ts +6 -5
- package/src/contract/interfaces/node-info.ts +3 -0
- package/src/contract/private_function.ts +2 -2
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/database-version/database_version.ts +87 -0
- package/src/database-version/version_manager.ts +1 -77
- package/src/epoch-helpers/index.ts +12 -0
- package/src/file-store/local.ts +15 -5
- package/src/file-store/s3.ts +12 -3
- package/src/ha-signing/config.ts +149 -0
- package/src/ha-signing/index.ts +18 -0
- package/src/ha-signing/types.ts +112 -0
- package/src/hash/hash.ts +14 -10
- package/src/hash/map_slot.ts +3 -2
- package/src/interfaces/archiver.ts +9 -3
- package/src/interfaces/aztec-node-admin.ts +26 -2
- package/src/interfaces/aztec-node.ts +43 -94
- package/src/interfaces/block-builder.ts +13 -2
- package/src/interfaces/configs.ts +12 -1
- package/src/interfaces/merkle_tree_operations.ts +1 -1
- package/src/interfaces/p2p.ts +3 -14
- package/src/interfaces/prover-broker.ts +22 -0
- package/src/interfaces/prover-client.ts +7 -0
- package/src/interfaces/slasher.ts +4 -0
- package/src/interfaces/validator.ts +13 -4
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +14 -18
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +15 -18
- package/src/kernel/hints/build_transient_data_hints.ts +17 -2
- package/src/kernel/hints/index.ts +2 -2
- package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
- package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
- package/src/kernel/private_circuit_public_inputs.ts +14 -14
- package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
- package/src/kernel/private_validation_requests.ts +8 -8
- package/src/keys/derivation.ts +15 -15
- package/src/keys/key_types.ts +6 -2
- package/src/keys/public_keys.ts +2 -2
- package/src/keys/utils.ts +8 -4
- package/src/l1-contracts/slash_factory.ts +1 -0
- package/src/logs/debug_log_store.ts +54 -0
- package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +24 -16
- package/src/logs/index.ts +2 -1
- package/src/logs/log_id.ts +22 -18
- package/src/logs/pre_tag.ts +5 -5
- package/src/logs/siloed_tag.ts +10 -4
- package/src/logs/tag.ts +1 -1
- package/src/messaging/l2_to_l1_membership.ts +3 -3
- package/src/note/index.ts +0 -1
- package/src/p2p/attestation_utils.ts +56 -0
- package/src/p2p/block_proposal.ts +10 -5
- package/src/p2p/checkpoint_attestation.ts +6 -1
- package/src/p2p/checkpoint_proposal.ts +55 -16
- package/src/p2p/client_type.ts +0 -6
- package/src/p2p/consensus_payload.ts +25 -12
- package/src/p2p/constants.ts +3 -0
- package/src/p2p/index.ts +0 -1
- package/src/p2p/topic_type.ts +8 -15
- package/src/rollup/checkpoint_header.ts +2 -2
- package/src/rollup/checkpoint_rollup_public_inputs.ts +5 -5
- package/src/rollup/root_rollup_public_inputs.ts +7 -7
- package/src/slashing/empire.ts +3 -1
- package/src/slashing/helpers.ts +8 -0
- package/src/slashing/tally.ts +8 -2
- package/src/slashing/types.ts +14 -0
- package/src/stats/stats.ts +0 -2
- package/src/tests/factories.ts +26 -17
- package/src/tests/mocks.ts +34 -17
- package/src/timetable/index.ts +66 -0
- package/src/trees/public_data_leaf.ts +11 -5
- package/src/tx/block_header.ts +8 -5
- package/src/tx/global_variables.ts +3 -3
- package/src/tx/indexed_tx_effect.ts +3 -2
- package/src/tx/profiling.ts +5 -5
- package/src/tx/protocol_contracts.ts +2 -2
- package/src/tx/public_simulation_output.ts +4 -0
- package/src/tx/tx_receipt.ts +14 -4
- package/src/tx/tx_request.ts +2 -2
- package/src/tx/validator/empty_validator.ts +1 -1
- package/src/tx/validator/error_texts.ts +1 -1
- package/src/tx/validator/tx_validator.ts +1 -1
- package/src/validators/schemas.ts +8 -1
- package/src/validators/types.ts +5 -4
- package/dest/database-version/index.d.ts +0 -2
- package/dest/database-version/index.d.ts.map +0 -1
- package/dest/database-version/index.js +0 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -30
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
- package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
- package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
- package/dest/note/notes_filter.d.ts +0 -27
- package/dest/note/notes_filter.d.ts.map +0 -1
- package/dest/note/notes_filter.js +0 -11
- package/src/database-version/index.ts +0 -1
- package/src/note/notes_filter.ts +0 -38
|
@@ -71,7 +71,7 @@ export class PrivateKernelTailCircuitPublicInputs {
|
|
|
71
71
|
constants;
|
|
72
72
|
gasUsed;
|
|
73
73
|
feePayer;
|
|
74
|
-
|
|
74
|
+
expirationTimestamp;
|
|
75
75
|
forPublic;
|
|
76
76
|
forRollup;
|
|
77
77
|
constructor(/**
|
|
@@ -83,11 +83,11 @@ export class PrivateKernelTailCircuitPublicInputs {
|
|
|
83
83
|
* The address of the fee payer for the transaction.
|
|
84
84
|
*/ feePayer, /**
|
|
85
85
|
* The timestamp by which the transaction must be included in a block.
|
|
86
|
-
*/
|
|
86
|
+
*/ expirationTimestamp, forPublic, forRollup){
|
|
87
87
|
this.constants = constants;
|
|
88
88
|
this.gasUsed = gasUsed;
|
|
89
89
|
this.feePayer = feePayer;
|
|
90
|
-
this.
|
|
90
|
+
this.expirationTimestamp = expirationTimestamp;
|
|
91
91
|
this.forPublic = forPublic;
|
|
92
92
|
this.forRollup = forRollup;
|
|
93
93
|
if (!forPublic && !forRollup) {
|
|
@@ -104,21 +104,21 @@ export class PrivateKernelTailCircuitPublicInputs {
|
|
|
104
104
|
return this.toBuffer();
|
|
105
105
|
}
|
|
106
106
|
getSize() {
|
|
107
|
-
return (this.forPublic?.getSize() ?? 0) + (this.forRollup?.getSize() ?? 0) + this.constants.getSize() + this.gasUsed.getSize() + this.feePayer.size + 8 //
|
|
107
|
+
return (this.forPublic?.getSize() ?? 0) + (this.forRollup?.getSize() ?? 0) + this.constants.getSize() + this.gasUsed.getSize() + this.feePayer.size + 8 // expirationTimestamp
|
|
108
108
|
;
|
|
109
109
|
}
|
|
110
110
|
toPrivateToPublicKernelCircuitPublicInputs() {
|
|
111
111
|
if (!this.forPublic) {
|
|
112
112
|
throw new Error('Private tail public inputs is not for public circuit.');
|
|
113
113
|
}
|
|
114
|
-
return new PrivateToPublicKernelCircuitPublicInputs(this.constants, this.forPublic.nonRevertibleAccumulatedData, this.forPublic.revertibleAccumulatedData, this.forPublic.publicTeardownCallRequest, this.gasUsed, this.feePayer, this.
|
|
114
|
+
return new PrivateToPublicKernelCircuitPublicInputs(this.constants, this.forPublic.nonRevertibleAccumulatedData, this.forPublic.revertibleAccumulatedData, this.forPublic.publicTeardownCallRequest, this.gasUsed, this.feePayer, this.expirationTimestamp);
|
|
115
115
|
}
|
|
116
116
|
toPrivateToRollupKernelCircuitPublicInputs() {
|
|
117
117
|
if (!this.forRollup) {
|
|
118
118
|
throw new Error('Private tail public inputs is not for rollup circuit.');
|
|
119
119
|
}
|
|
120
120
|
const constants = new TxConstantData(this.constants.anchorBlockHeader, this.constants.txContext, this.constants.vkTreeRoot, this.constants.protocolContractsHash);
|
|
121
|
-
return new PrivateToRollupKernelCircuitPublicInputs(constants, this.forRollup.end, this.gasUsed, this.feePayer, this.
|
|
121
|
+
return new PrivateToRollupKernelCircuitPublicInputs(constants, this.forRollup.end, this.gasUsed, this.feePayer, this.expirationTimestamp);
|
|
122
122
|
}
|
|
123
123
|
publicInputs() {
|
|
124
124
|
return this.forPublic ? this.toPrivateToPublicKernelCircuitPublicInputs() : this.toPrivateToRollupKernelCircuitPublicInputs();
|
|
@@ -176,7 +176,7 @@ export class PrivateKernelTailCircuitPublicInputs {
|
|
|
176
176
|
}
|
|
177
177
|
toBuffer() {
|
|
178
178
|
const isForPublic = !!this.forPublic;
|
|
179
|
-
return serializeToBuffer(isForPublic, this.constants, this.gasUsed, this.feePayer, bigintToUInt64BE(this.
|
|
179
|
+
return serializeToBuffer(isForPublic, this.constants, this.gasUsed, this.feePayer, bigintToUInt64BE(this.expirationTimestamp), isForPublic ? this.forPublic.toBuffer() : this.forRollup.toBuffer());
|
|
180
180
|
}
|
|
181
181
|
static empty() {
|
|
182
182
|
return new PrivateKernelTailCircuitPublicInputs(TxConstantData.empty(), Gas.empty(), AztecAddress.ZERO, 0n, undefined, PartialPrivateTailPublicInputsForRollup.empty());
|
|
@@ -14,8 +14,8 @@ export declare class PrivateToPublicKernelCircuitPublicInputs {
|
|
|
14
14
|
publicTeardownCallRequest: PublicCallRequest;
|
|
15
15
|
gasUsed: Gas;
|
|
16
16
|
feePayer: AztecAddress;
|
|
17
|
-
|
|
18
|
-
constructor(constants: TxConstantData, nonRevertibleAccumulatedData: PrivateToPublicAccumulatedData, revertibleAccumulatedData: PrivateToPublicAccumulatedData, publicTeardownCallRequest: PublicCallRequest, gasUsed: Gas, feePayer: AztecAddress,
|
|
17
|
+
expirationTimestamp: UInt64;
|
|
18
|
+
constructor(constants: TxConstantData, nonRevertibleAccumulatedData: PrivateToPublicAccumulatedData, revertibleAccumulatedData: PrivateToPublicAccumulatedData, publicTeardownCallRequest: PublicCallRequest, gasUsed: Gas, feePayer: AztecAddress, expirationTimestamp: UInt64);
|
|
19
19
|
toBuffer(): Buffer<ArrayBufferLike>;
|
|
20
20
|
static getFields(fields: FieldsOf<PrivateToPublicKernelCircuitPublicInputs>): readonly [TxConstantData, PrivateToPublicAccumulatedData, PrivateToPublicAccumulatedData, PublicCallRequest, Gas, AztecAddress, bigint];
|
|
21
21
|
static fromBuffer(buffer: Buffer | BufferReader): PrivateToPublicKernelCircuitPublicInputs;
|
|
@@ -27,4 +27,4 @@ export declare class PrivateToPublicKernelCircuitPublicInputs {
|
|
|
27
27
|
toJSON(): Buffer<ArrayBufferLike>;
|
|
28
28
|
static get schema(): import("zod").ZodType<PrivateToPublicKernelCircuitPublicInputs, any, string>;
|
|
29
29
|
}
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV90b19wdWJsaWNfa2VybmVsX2NpcmN1aXRfcHVibGljX2lucHV0cy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2tlcm5lbC9wcml2YXRlX3RvX3B1YmxpY19rZXJuZWxfY2lyY3VpdF9wdWJsaWNfaW5wdXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRXpELE9BQU8sRUFBRSxZQUFZLEVBQTBELE1BQU0sNkJBQTZCLENBQUM7QUFFbkgsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0seUJBQXlCLENBQUM7Q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sTUFBTSxDQUFDLFVBQVUsQ0FBQyxHQUFHLEVBQUUsTUFBTSw0Q0FFNUI7SUFFRCxRQUFRLGtCQUVQO0lBRUQsUUFBUSxJQUFJLEVBQUUsRUFBRSxDQVFmO0lBRUQsSUFBSSxnQkFFSDtJQUVELE1BQU0sNEJBRUw7SUFFRCxNQUFNLEtBQUssTUFBTSxpRkFFaEI7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_to_public_kernel_circuit_public_inputs.d.ts","sourceRoot":"","sources":["../../src/kernel/private_to_public_kernel_circuit_public_inputs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAE,YAAY,EAA0D,MAAM,6BAA6B,CAAC;AAEnH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,qBAAa,wCAAwC;IAE1C,SAAS,EAAE,cAAc;IACzB,4BAA4B,EAAE,8BAA8B;IAC5D,yBAAyB,EAAE,8BAA8B;IACzD,yBAAyB,EAAE,iBAAiB;IAC5C,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,YAAY;IACtB,
|
|
1
|
+
{"version":3,"file":"private_to_public_kernel_circuit_public_inputs.d.ts","sourceRoot":"","sources":["../../src/kernel/private_to_public_kernel_circuit_public_inputs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,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}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DomainSeparator, PRIVATE_TO_PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH } from '@aztec/constants';
|
|
2
2
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
3
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, bigintToUInt64BE, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
|
|
@@ -15,18 +15,18 @@ export class PrivateToPublicKernelCircuitPublicInputs {
|
|
|
15
15
|
publicTeardownCallRequest;
|
|
16
16
|
gasUsed;
|
|
17
17
|
feePayer;
|
|
18
|
-
|
|
19
|
-
constructor(constants, nonRevertibleAccumulatedData, revertibleAccumulatedData, publicTeardownCallRequest, gasUsed, feePayer,
|
|
18
|
+
expirationTimestamp;
|
|
19
|
+
constructor(constants, nonRevertibleAccumulatedData, revertibleAccumulatedData, publicTeardownCallRequest, gasUsed, feePayer, expirationTimestamp){
|
|
20
20
|
this.constants = constants;
|
|
21
21
|
this.nonRevertibleAccumulatedData = nonRevertibleAccumulatedData;
|
|
22
22
|
this.revertibleAccumulatedData = revertibleAccumulatedData;
|
|
23
23
|
this.publicTeardownCallRequest = publicTeardownCallRequest;
|
|
24
24
|
this.gasUsed = gasUsed;
|
|
25
25
|
this.feePayer = feePayer;
|
|
26
|
-
this.
|
|
26
|
+
this.expirationTimestamp = expirationTimestamp;
|
|
27
27
|
}
|
|
28
28
|
toBuffer() {
|
|
29
|
-
return serializeToBuffer(this.constants, this.nonRevertibleAccumulatedData, this.revertibleAccumulatedData, this.publicTeardownCallRequest, this.gasUsed, this.feePayer, bigintToUInt64BE(this.
|
|
29
|
+
return serializeToBuffer(this.constants, this.nonRevertibleAccumulatedData, this.revertibleAccumulatedData, this.publicTeardownCallRequest, this.gasUsed, this.feePayer, bigintToUInt64BE(this.expirationTimestamp));
|
|
30
30
|
}
|
|
31
31
|
static getFields(fields) {
|
|
32
32
|
return [
|
|
@@ -36,7 +36,7 @@ export class PrivateToPublicKernelCircuitPublicInputs {
|
|
|
36
36
|
fields.publicTeardownCallRequest,
|
|
37
37
|
fields.gasUsed,
|
|
38
38
|
fields.feePayer,
|
|
39
|
-
fields.
|
|
39
|
+
fields.expirationTimestamp
|
|
40
40
|
];
|
|
41
41
|
}
|
|
42
42
|
static fromBuffer(buffer) {
|
|
@@ -60,7 +60,7 @@ export class PrivateToPublicKernelCircuitPublicInputs {
|
|
|
60
60
|
return fields;
|
|
61
61
|
}
|
|
62
62
|
hash() {
|
|
63
|
-
return poseidon2HashWithSeparator(this.toFields(),
|
|
63
|
+
return poseidon2HashWithSeparator(this.toFields(), DomainSeparator.PUBLIC_TX_HASH);
|
|
64
64
|
}
|
|
65
65
|
toJSON() {
|
|
66
66
|
return this.toBuffer();
|
|
@@ -30,7 +30,7 @@ export declare class PrivateToRollupKernelCircuitPublicInputs {
|
|
|
30
30
|
/**
|
|
31
31
|
* The timestamp by which the transaction must be included in a block.
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
expirationTimestamp: UInt64;
|
|
34
34
|
constructor(
|
|
35
35
|
/**
|
|
36
36
|
* Data which is not modified by the circuits.
|
|
@@ -51,7 +51,7 @@ export declare class PrivateToRollupKernelCircuitPublicInputs {
|
|
|
51
51
|
/**
|
|
52
52
|
* The timestamp by which the transaction must be included in a block.
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
expirationTimestamp: UInt64);
|
|
55
55
|
getNonEmptyNullifiers(): Fr[];
|
|
56
56
|
toBuffer(): Buffer<ArrayBufferLike>;
|
|
57
57
|
/**
|
|
@@ -71,4 +71,4 @@ export declare class PrivateToRollupKernelCircuitPublicInputs {
|
|
|
71
71
|
toFields(): Fr[];
|
|
72
72
|
hash(): Promise<Fr>;
|
|
73
73
|
}
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
74
|
+
//# sourceMappingURL=data:application/json;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FDaEM7O09BRUc7SUFDSSxHQUFHLEVBQUUsOEJBQThCO0lBQzFDOztPQUVHO0lBQ0ksT0FBTyxFQUFFLEdBQUc7SUFDbkI7O09BRUc7SUFDSSxRQUFRLEVBQUUsWUFBWTtJQUM3Qjs7T0FFRztJQUNJLG1CQUFtQixFQUFFLE1BQU0sRUFDaEM7SUFFSixxQkFBcUIsU0FFcEI7SUFFRCxRQUFRLDRCQVFQO0lBRUQ7Ozs7T0FJRztJQUNILE1BQU0sQ0FBQyxVQUFVLENBQUMsTUFBTSxFQUFFLE1BQU0sR0FBRyxZQUFZLEdBQUcsd0NBQXdDLENBU3pGO0lBRUQsTUFBTSxDQUFDLEtBQUssNkNBUVg7SUFFRCxRQUFRLGtCQUVQO0lBRUQsTUFBTSxDQUFDLFVBQVUsQ0FBQyxHQUFHLEVBQUUsTUFBTSw0Q0FFNUI7SUFFRCwyREFBMkQ7SUFDM0QsTUFBTSw0QkFFTDtJQUVELE1BQU0sQ0FBQyxTQUFTLENBQUMsTUFBTSxFQUFFLFFBQVEsQ0FBQyx3Q0FBd0MsQ0FBQyx3RkFFMUU7SUFFRCw2Q0FBNkM7SUFDN0MsTUFBTSxLQUFLLE1BQU0saUZBRWhCO0lBRUQsUUFBUSxJQUFJLEVBQUUsRUFBRSxDQVFmO0lBRUQsSUFBSSxnQkFFSDtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_to_rollup_kernel_circuit_public_inputs.d.ts","sourceRoot":"","sources":["../../src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAE,YAAY,EAA0D,MAAM,6BAA6B,CAAC;AAEnH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF;;;GAGG;AACH,qBAAa,wCAAwC;IAEjD;;OAEG;IACI,SAAS,EAAE,cAAc;IAChC;;OAEG;IACI,GAAG,EAAE,8BAA8B;IAC1C;;OAEG;IACI,OAAO,EAAE,GAAG;IACnB;;OAEG;IACI,QAAQ,EAAE,YAAY;IAC7B;;OAEG;IACI,
|
|
1
|
+
{"version":3,"file":"private_to_rollup_kernel_circuit_public_inputs.d.ts","sourceRoot":"","sources":["../../src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAE,YAAY,EAA0D,MAAM,6BAA6B,CAAC;AAEnH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF;;;GAGG;AACH,qBAAa,wCAAwC;IAEjD;;OAEG;IACI,SAAS,EAAE,cAAc;IAChC;;OAEG;IACI,GAAG,EAAE,8BAA8B;IAC1C;;OAEG;IACI,OAAO,EAAE,GAAG;IACnB;;OAEG;IACI,QAAQ,EAAE,YAAY;IAC7B;;OAEG;IACI,mBAAmB,EAAE,MAAM;IApBpC;IACE;;OAEG;IACI,SAAS,EAAE,cAAc;IAChC;;OAEG;IACI,GAAG,EAAE,8BAA8B;IAC1C;;OAEG;IACI,OAAO,EAAE,GAAG;IACnB;;OAEG;IACI,QAAQ,EAAE,YAAY;IAC7B;;OAEG;IACI,mBAAmB,EAAE,MAAM,EAChC;IAEJ,qBAAqB,SAEpB;IAED,QAAQ,4BAQP;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,wCAAwC,CASzF;IAED,MAAM,CAAC,KAAK,6CAQX;IAED,QAAQ,kBAEP;IAED,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,4CAE5B;IAED,2DAA2D;IAC3D,MAAM,4BAEL;IAED,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,wCAAwC,CAAC,wFAE1E;IAED,6CAA6C;IAC7C,MAAM,KAAK,MAAM,iFAEhB;IAED,QAAQ,IAAI,EAAE,EAAE,CAQf;IAED,IAAI,gBAEH;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DomainSeparator, PRIVATE_TO_ROLLUP_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH } from '@aztec/constants';
|
|
2
2
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
3
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, bigintToUInt64BE, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
|
|
@@ -15,7 +15,7 @@ import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_
|
|
|
15
15
|
end;
|
|
16
16
|
gasUsed;
|
|
17
17
|
feePayer;
|
|
18
|
-
|
|
18
|
+
expirationTimestamp;
|
|
19
19
|
constructor(/**
|
|
20
20
|
* Data which is not modified by the circuits.
|
|
21
21
|
*/ constants, /**
|
|
@@ -26,18 +26,18 @@ import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_
|
|
|
26
26
|
* The address of the fee payer for the transaction.
|
|
27
27
|
*/ feePayer, /**
|
|
28
28
|
* The timestamp by which the transaction must be included in a block.
|
|
29
|
-
*/
|
|
29
|
+
*/ expirationTimestamp){
|
|
30
30
|
this.constants = constants;
|
|
31
31
|
this.end = end;
|
|
32
32
|
this.gasUsed = gasUsed;
|
|
33
33
|
this.feePayer = feePayer;
|
|
34
|
-
this.
|
|
34
|
+
this.expirationTimestamp = expirationTimestamp;
|
|
35
35
|
}
|
|
36
36
|
getNonEmptyNullifiers() {
|
|
37
37
|
return this.end.nullifiers.filter((n)=>!n.isZero());
|
|
38
38
|
}
|
|
39
39
|
toBuffer() {
|
|
40
|
-
return serializeToBuffer(this.constants, this.end, this.gasUsed, this.feePayer, bigintToUInt64BE(this.
|
|
40
|
+
return serializeToBuffer(this.constants, this.end, this.gasUsed, this.feePayer, bigintToUInt64BE(this.expirationTimestamp));
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Deserializes from a buffer or reader, corresponding to a write in cpp.
|
|
@@ -65,7 +65,7 @@ import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_
|
|
|
65
65
|
fields.end,
|
|
66
66
|
fields.gasUsed,
|
|
67
67
|
fields.feePayer,
|
|
68
|
-
fields.
|
|
68
|
+
fields.expirationTimestamp
|
|
69
69
|
];
|
|
70
70
|
}
|
|
71
71
|
/** Creates an instance from a hex string. */ static get schema() {
|
|
@@ -79,6 +79,6 @@ import { PrivateToRollupAccumulatedData } from './private_to_rollup_accumulated_
|
|
|
79
79
|
return fields;
|
|
80
80
|
}
|
|
81
81
|
hash() {
|
|
82
|
-
return poseidon2HashWithSeparator(this.toFields(),
|
|
82
|
+
return poseidon2HashWithSeparator(this.toFields(), DomainSeparator.PRIVATE_TX_HASH);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MAX_KEY_VALIDATION_REQUESTS_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_TX, MAX_NULLIFIER_READ_REQUESTS_PER_TX } from '@aztec/constants';
|
|
2
2
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { inspect } from 'util';
|
|
4
|
-
import {
|
|
4
|
+
import { ScopedKeyValidationRequestAndSeparator } from '../kernel/hints/scoped_key_validation_request_and_separator.js';
|
|
5
5
|
import { ClaimedLengthArray } from './claimed_length_array.js';
|
|
6
6
|
import { ScopedReadRequest } from './hints/read_request.js';
|
|
7
7
|
/**
|
|
@@ -19,7 +19,7 @@ export declare class PrivateValidationRequests {
|
|
|
19
19
|
/**
|
|
20
20
|
* All the key validation requests made in this transaction.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
scopedKeyValidationRequestsAndSeparators: ClaimedLengthArray<ScopedKeyValidationRequestAndSeparator, typeof MAX_KEY_VALIDATION_REQUESTS_PER_TX>;
|
|
23
23
|
constructor(
|
|
24
24
|
/**
|
|
25
25
|
* All the read requests made in this transaction.
|
|
@@ -32,7 +32,7 @@ export declare class PrivateValidationRequests {
|
|
|
32
32
|
/**
|
|
33
33
|
* All the key validation requests made in this transaction.
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
scopedKeyValidationRequestsAndSeparators: ClaimedLengthArray<ScopedKeyValidationRequestAndSeparator, typeof MAX_KEY_VALIDATION_REQUESTS_PER_TX>);
|
|
36
36
|
getSize(): number;
|
|
37
37
|
toBuffer(): Buffer<ArrayBufferLike>;
|
|
38
38
|
toString(): `0x${string}`;
|
|
@@ -3,7 +3,7 @@ import { MAX_KEY_VALIDATION_REQUESTS_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_TX,
|
|
|
3
3
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
4
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
5
5
|
import { inspect } from 'util';
|
|
6
|
-
import {
|
|
6
|
+
import { ScopedKeyValidationRequestAndSeparator } from '../kernel/hints/scoped_key_validation_request_and_separator.js';
|
|
7
7
|
import { ClaimedLengthArray, ClaimedLengthArrayFromBuffer } from './claimed_length_array.js';
|
|
8
8
|
import { ScopedReadRequest } from './hints/read_request.js';
|
|
9
9
|
_computedKey = inspect.custom;
|
|
@@ -12,23 +12,23 @@ _computedKey = inspect.custom;
|
|
|
12
12
|
*/ export class PrivateValidationRequests {
|
|
13
13
|
noteHashReadRequests;
|
|
14
14
|
nullifierReadRequests;
|
|
15
|
-
|
|
15
|
+
scopedKeyValidationRequestsAndSeparators;
|
|
16
16
|
constructor(/**
|
|
17
17
|
* All the read requests made in this transaction.
|
|
18
18
|
*/ noteHashReadRequests, /**
|
|
19
19
|
* All the nullifier read requests made in this transaction.
|
|
20
20
|
*/ nullifierReadRequests, /**
|
|
21
21
|
* All the key validation requests made in this transaction.
|
|
22
|
-
*/
|
|
22
|
+
*/ scopedKeyValidationRequestsAndSeparators){
|
|
23
23
|
this.noteHashReadRequests = noteHashReadRequests;
|
|
24
24
|
this.nullifierReadRequests = nullifierReadRequests;
|
|
25
|
-
this.
|
|
25
|
+
this.scopedKeyValidationRequestsAndSeparators = scopedKeyValidationRequestsAndSeparators;
|
|
26
26
|
}
|
|
27
27
|
getSize() {
|
|
28
|
-
return this.noteHashReadRequests.getSize() + this.nullifierReadRequests.getSize() + this.
|
|
28
|
+
return this.noteHashReadRequests.getSize() + this.nullifierReadRequests.getSize() + this.scopedKeyValidationRequestsAndSeparators.getSize();
|
|
29
29
|
}
|
|
30
30
|
toBuffer() {
|
|
31
|
-
return serializeToBuffer(this.noteHashReadRequests, this.nullifierReadRequests, this.
|
|
31
|
+
return serializeToBuffer(this.noteHashReadRequests, this.nullifierReadRequests, this.scopedKeyValidationRequestsAndSeparators);
|
|
32
32
|
}
|
|
33
33
|
toString() {
|
|
34
34
|
return bufferToHex(this.toBuffer());
|
|
@@ -39,7 +39,7 @@ _computedKey = inspect.custom;
|
|
|
39
39
|
* @returns Deserialized object.
|
|
40
40
|
*/ static fromBuffer(buffer) {
|
|
41
41
|
const reader = BufferReader.asReader(buffer);
|
|
42
|
-
return new PrivateValidationRequests(reader.readObject(ClaimedLengthArrayFromBuffer(ScopedReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_TX)), reader.readObject(ClaimedLengthArrayFromBuffer(ScopedReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_TX)), reader.readObject(ClaimedLengthArrayFromBuffer(
|
|
42
|
+
return new PrivateValidationRequests(reader.readObject(ClaimedLengthArrayFromBuffer(ScopedReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_TX)), reader.readObject(ClaimedLengthArrayFromBuffer(ScopedReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_TX)), reader.readObject(ClaimedLengthArrayFromBuffer(ScopedKeyValidationRequestAndSeparator, MAX_KEY_VALIDATION_REQUESTS_PER_TX)));
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Deserializes from a string, corresponding to a write in cpp.
|
|
@@ -49,13 +49,13 @@ _computedKey = inspect.custom;
|
|
|
49
49
|
return PrivateValidationRequests.fromBuffer(hexToBuffer(str));
|
|
50
50
|
}
|
|
51
51
|
static empty() {
|
|
52
|
-
return new PrivateValidationRequests(ClaimedLengthArray.empty(ScopedReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_TX), ClaimedLengthArray.empty(ScopedReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_TX), ClaimedLengthArray.empty(
|
|
52
|
+
return new PrivateValidationRequests(ClaimedLengthArray.empty(ScopedReadRequest, MAX_NOTE_HASH_READ_REQUESTS_PER_TX), ClaimedLengthArray.empty(ScopedReadRequest, MAX_NULLIFIER_READ_REQUESTS_PER_TX), ClaimedLengthArray.empty(ScopedKeyValidationRequestAndSeparator, MAX_KEY_VALIDATION_REQUESTS_PER_TX));
|
|
53
53
|
}
|
|
54
54
|
[_computedKey]() {
|
|
55
55
|
return `PrivateValidationRequests {
|
|
56
56
|
noteHashReadRequests: ${inspect(this.noteHashReadRequests)},
|
|
57
57
|
nullifierReadRequests: ${inspect(this.nullifierReadRequests)},
|
|
58
|
-
|
|
58
|
+
scopedKeyValidationRequestsAndSeparators: ${inspect(this.scopedKeyValidationRequestsAndSeparators)},
|
|
59
59
|
`;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -3,10 +3,10 @@ import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
|
|
|
3
3
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
4
4
|
import type { KeyPrefix } from './key_types.js';
|
|
5
5
|
import { PublicKeys } from './public_keys.js';
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function computeAppNullifierHidingKey(masterNullifierHidingKey: GrumpkinScalar, app: AztecAddress): Promise<Fr>;
|
|
7
7
|
export declare function computeAppSecretKey(skM: GrumpkinScalar, app: AztecAddress, keyPrefix: KeyPrefix): Promise<Fr>;
|
|
8
8
|
export declare function computeOvskApp(ovsk: GrumpkinScalar, app: AztecAddress): Promise<Fq>;
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function deriveMasterNullifierHidingKey(secretKey: Fr): GrumpkinScalar;
|
|
10
10
|
export declare function deriveMasterIncomingViewingSecretKey(secretKey: Fr): GrumpkinScalar;
|
|
11
11
|
export declare function deriveMasterOutgoingViewingSecretKey(secretKey: Fr): GrumpkinScalar;
|
|
12
12
|
export declare function deriveSigningKey(secretKey: Fr): GrumpkinScalar;
|
|
@@ -20,7 +20,7 @@ export declare function derivePublicKeyFromSecretKey(secretKey: Fq): Promise<imp
|
|
|
20
20
|
* @returns The derived keys.
|
|
21
21
|
*/
|
|
22
22
|
export declare function deriveKeys(secretKey: Fr): Promise<{
|
|
23
|
-
|
|
23
|
+
masterNullifierHidingKey: Fq;
|
|
24
24
|
masterIncomingViewingSecretKey: Fq;
|
|
25
25
|
masterOutgoingViewingSecretKey: Fq;
|
|
26
26
|
masterTaggingSecretKey: Fq;
|
package/dest/keys/derivation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DomainSeparator } from '@aztec/constants';
|
|
2
2
|
import { Grumpkin } from '@aztec/foundation/crypto/grumpkin';
|
|
3
3
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
4
4
|
import { sha512ToGrumpkinScalar } from '@aztec/foundation/crypto/sha512';
|
|
@@ -7,8 +7,8 @@ import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
|
|
|
7
7
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
8
8
|
import { PublicKeys } from './public_keys.js';
|
|
9
9
|
import { getKeyGenerator } from './utils.js';
|
|
10
|
-
export function
|
|
11
|
-
return computeAppSecretKey(
|
|
10
|
+
export function computeAppNullifierHidingKey(masterNullifierHidingKey, app) {
|
|
11
|
+
return computeAppSecretKey(masterNullifierHidingKey, app, 'n'); // 'n' is the key prefix for nullifier hiding key
|
|
12
12
|
}
|
|
13
13
|
export function computeAppSecretKey(skM, app, keyPrefix) {
|
|
14
14
|
const generator = getKeyGenerator(keyPrefix);
|
|
@@ -24,40 +24,40 @@ export async function computeOvskApp(ovsk, app) {
|
|
|
24
24
|
// P = s * G will not be uniform because 2 * (q - r) / q is small.
|
|
25
25
|
return GrumpkinScalar.fromBuffer(ovskAppFr.toBuffer());
|
|
26
26
|
}
|
|
27
|
-
export function
|
|
27
|
+
export function deriveMasterNullifierHidingKey(secretKey) {
|
|
28
28
|
return sha512ToGrumpkinScalar([
|
|
29
29
|
secretKey,
|
|
30
|
-
|
|
30
|
+
DomainSeparator.NHK_M
|
|
31
31
|
]);
|
|
32
32
|
}
|
|
33
33
|
export function deriveMasterIncomingViewingSecretKey(secretKey) {
|
|
34
34
|
return sha512ToGrumpkinScalar([
|
|
35
35
|
secretKey,
|
|
36
|
-
|
|
36
|
+
DomainSeparator.IVSK_M
|
|
37
37
|
]);
|
|
38
38
|
}
|
|
39
39
|
export function deriveMasterOutgoingViewingSecretKey(secretKey) {
|
|
40
40
|
return sha512ToGrumpkinScalar([
|
|
41
41
|
secretKey,
|
|
42
|
-
|
|
42
|
+
DomainSeparator.OVSK_M
|
|
43
43
|
]);
|
|
44
44
|
}
|
|
45
45
|
export function deriveSigningKey(secretKey) {
|
|
46
46
|
// TODO(#5837): come up with a standard signing key derivation scheme instead of using ivsk_m as signing keys here
|
|
47
47
|
return sha512ToGrumpkinScalar([
|
|
48
48
|
secretKey,
|
|
49
|
-
|
|
49
|
+
DomainSeparator.IVSK_M
|
|
50
50
|
]);
|
|
51
51
|
}
|
|
52
52
|
export function computePreaddress(publicKeysHash, partialAddress) {
|
|
53
53
|
return poseidon2HashWithSeparator([
|
|
54
54
|
publicKeysHash,
|
|
55
55
|
partialAddress
|
|
56
|
-
],
|
|
56
|
+
], DomainSeparator.CONTRACT_ADDRESS_V1);
|
|
57
57
|
}
|
|
58
58
|
export async function computeAddress(publicKeys, partialAddress) {
|
|
59
59
|
// Given public keys and a partial address, we can compute our address in the following steps.
|
|
60
|
-
// 1. preaddress = poseidon2([publicKeysHash, partialAddress],
|
|
60
|
+
// 1. preaddress = poseidon2([publicKeysHash, partialAddress], DomainSeparator.CONTRACT_ADDRESS_V1);
|
|
61
61
|
// 2. addressPoint = (preaddress * G) + ivpk_m
|
|
62
62
|
// 3. address = addressPoint.x
|
|
63
63
|
const preaddress = await computePreaddress(await publicKeys.hash(), partialAddress);
|
|
@@ -91,24 +91,24 @@ export function derivePublicKeyFromSecretKey(secretKey) {
|
|
|
91
91
|
* @param secretKey - The secret key to derive keys from.
|
|
92
92
|
* @returns The derived keys.
|
|
93
93
|
*/ export async function deriveKeys(secretKey) {
|
|
94
|
-
// First we derive master secret keys - we use sha512 here because this derivation will never take place
|
|
94
|
+
// First we derive master secret/hiding keys - we use sha512 here because this derivation will never take place
|
|
95
95
|
// in a circuit
|
|
96
|
-
const
|
|
96
|
+
const masterNullifierHidingKey = deriveMasterNullifierHidingKey(secretKey);
|
|
97
97
|
const masterIncomingViewingSecretKey = deriveMasterIncomingViewingSecretKey(secretKey);
|
|
98
98
|
const masterOutgoingViewingSecretKey = deriveMasterOutgoingViewingSecretKey(secretKey);
|
|
99
99
|
const masterTaggingSecretKey = sha512ToGrumpkinScalar([
|
|
100
100
|
secretKey,
|
|
101
|
-
|
|
101
|
+
DomainSeparator.TSK_M
|
|
102
102
|
]);
|
|
103
103
|
// Then we derive master public keys
|
|
104
|
-
const masterNullifierPublicKey = await derivePublicKeyFromSecretKey(
|
|
104
|
+
const masterNullifierPublicKey = await derivePublicKeyFromSecretKey(masterNullifierHidingKey);
|
|
105
105
|
const masterIncomingViewingPublicKey = await derivePublicKeyFromSecretKey(masterIncomingViewingSecretKey);
|
|
106
106
|
const masterOutgoingViewingPublicKey = await derivePublicKeyFromSecretKey(masterOutgoingViewingSecretKey);
|
|
107
107
|
const masterTaggingPublicKey = await derivePublicKeyFromSecretKey(masterTaggingSecretKey);
|
|
108
108
|
// We hash the public keys to get the public keys hash
|
|
109
109
|
const publicKeys = new PublicKeys(masterNullifierPublicKey, masterIncomingViewingPublicKey, masterOutgoingViewingPublicKey, masterTaggingPublicKey);
|
|
110
110
|
return {
|
|
111
|
-
|
|
111
|
+
masterNullifierHidingKey,
|
|
112
112
|
masterIncomingViewingSecretKey,
|
|
113
113
|
masterOutgoingViewingSecretKey,
|
|
114
114
|
masterTaggingSecretKey,
|
package/dest/keys/key_types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type KeyGenerator =
|
|
1
|
+
import type { DomainSeparator } from '@aztec/constants';
|
|
2
|
+
export type KeyGenerator = DomainSeparator.NHK_M | DomainSeparator.IVSK_M | DomainSeparator.OVSK_M | DomainSeparator.TSK_M;
|
|
3
3
|
export type KeyPrefix = 'n' | 'iv' | 'ov' | 't';
|
|
4
4
|
export declare const KEY_PREFIXES: KeyPrefix[];
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5X3R5cGVzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5cy9rZXlfdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFeEQsTUFBTSxNQUFNLFlBQVksR0FDcEIsZUFBZSxDQUFDLEtBQUssR0FDckIsZUFBZSxDQUFDLE1BQU0sR0FDdEIsZUFBZSxDQUFDLE1BQU0sR0FDdEIsZUFBZSxDQUFDLEtBQUssQ0FBQztBQUMxQixNQUFNLE1BQU0sU0FBUyxHQUFHLEdBQUcsR0FBRyxJQUFJLEdBQUcsSUFBSSxHQUFHLEdBQUcsQ0FBQztBQUNoRCxlQUFPLE1BQU0sWUFBWSxFQUFFLFNBQVMsRUFBMkIsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key_types.d.ts","sourceRoot":"","sources":["../../src/keys/key_types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"key_types.d.ts","sourceRoot":"","sources":["../../src/keys/key_types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,YAAY,GACpB,eAAe,CAAC,KAAK,GACrB,eAAe,CAAC,MAAM,GACtB,eAAe,CAAC,MAAM,GACtB,eAAe,CAAC,KAAK,CAAC;AAC1B,MAAM,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC;AAChD,eAAO,MAAM,YAAY,EAAE,SAAS,EAA2B,CAAC"}
|
package/dest/keys/public_keys.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_IVPK_M_X, DEFAULT_IVPK_M_Y, DEFAULT_NPK_M_X, DEFAULT_NPK_M_Y, DEFAULT_OVPK_M_X, DEFAULT_OVPK_M_Y, DEFAULT_TPK_M_X, DEFAULT_TPK_M_Y,
|
|
1
|
+
import { DEFAULT_IVPK_M_X, DEFAULT_IVPK_M_Y, DEFAULT_NPK_M_X, DEFAULT_NPK_M_Y, DEFAULT_OVPK_M_X, DEFAULT_OVPK_M_Y, DEFAULT_TPK_M_X, DEFAULT_TPK_M_Y, DomainSeparator } from '@aztec/constants';
|
|
2
2
|
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import { Point } from '@aztec/foundation/curves/grumpkin';
|
|
@@ -46,7 +46,7 @@ export class PublicKeys {
|
|
|
46
46
|
this.masterIncomingViewingPublicKey,
|
|
47
47
|
this.masterOutgoingViewingPublicKey,
|
|
48
48
|
this.masterTaggingPublicKey
|
|
49
|
-
],
|
|
49
|
+
], DomainSeparator.PUBLIC_KEYS_HASH);
|
|
50
50
|
}
|
|
51
51
|
isEmpty() {
|
|
52
52
|
return this.masterNullifierPublicKey.isZero() && this.masterIncomingViewingPublicKey.isZero() && this.masterOutgoingViewingPublicKey.isZero() && this.masterTaggingPublicKey.isZero();
|
package/dest/keys/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { KeyGenerator, KeyPrefix } from './key_types.js';
|
|
2
2
|
export declare function getKeyGenerator(prefix: KeyPrefix): KeyGenerator;
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9rZXlzL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUU5RCx3QkFBZ0IsZUFBZSxDQUFDLE1BQU0sRUFBRSxTQUFTLEdBQUcsWUFBWSxDQVEvRCJ9
|
package/dest/keys/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/keys/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE9D,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/keys/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE9D,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,YAAY,CAQ/D"}
|
package/dest/keys/utils.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DomainSeparator } from '@aztec/constants';
|
|
2
2
|
export function getKeyGenerator(prefix) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const map = {
|
|
4
|
+
n: DomainSeparator.NHK_M,
|
|
5
|
+
iv: DomainSeparator.IVSK_M,
|
|
6
|
+
ov: DomainSeparator.OVSK_M,
|
|
7
|
+
t: DomainSeparator.TSK_M
|
|
8
|
+
};
|
|
9
|
+
return map[prefix];
|
|
6
10
|
}
|
|
@@ -42,4 +42,4 @@ export declare class SlashFactoryContract {
|
|
|
42
42
|
}
|
|
43
43
|
export declare function packValidatorSlashOffense(offense: ValidatorSlashOffense): bigint;
|
|
44
44
|
export declare function unpackValidatorSlashOffense(packed: bigint): ValidatorSlashOffense;
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWx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O,eAEjB;IAEM,yBAAyB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,WAAW,CAgBvE;IAED,wEAAwE;IACjE,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE;;;;;;;;kBAEpD;IAEY,4BAA4B,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAenE;IAED;;;;;OAKG;IACU,yBAAyB,CACpC,cAAc,EAAE,UAAU,EAC1B,QAAQ,EAAE;QACR,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,+BAA+B,EAAE,MAAM,CAAC;KACzC,GAAG,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,sBAAsB,CAAC,GACnE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAmDlD;IAEY,uBAAuB,CAClC,OAAO,EAAE,cAAc,EAAE,GACxB,OAAO,CAAC;QAAE,OAAO,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,GAAG,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAQlE;IAED,OAAO,CAAC,WAAW;CAQpB;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAMhF;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,qBAAqB,CAKjF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TxReceipt } from '../tx/tx_receipt.js';
|
|
2
|
+
import type { DebugLog } from './debug_log.js';
|
|
3
|
+
/**
|
|
4
|
+
* Store for debug logs emitted by public functions during transaction execution.
|
|
5
|
+
*
|
|
6
|
+
* Uses the Null Object pattern: production code uses NullDebugLogStore (no-op), while test mode uses
|
|
7
|
+
* InMemoryDebugLogStore (stores and serves logs).
|
|
8
|
+
*/
|
|
9
|
+
export interface DebugLogStore {
|
|
10
|
+
/** Store debug logs for a processed transaction. */
|
|
11
|
+
storeLogs(txHash: string, logs: DebugLog[]): void;
|
|
12
|
+
/** Decorate a TxReceipt with any stored debug logs for the given tx. */
|
|
13
|
+
decorateReceiptWithLogs(txHash: string, receipt: TxReceipt): void;
|
|
14
|
+
/** Whether debug log collection is enabled. */
|
|
15
|
+
readonly isEnabled: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** No-op implementation for production mode. */
|
|
18
|
+
export declare class NullDebugLogStore implements DebugLogStore {
|
|
19
|
+
storeLogs(_txHash: string, _logs: DebugLog[]): void;
|
|
20
|
+
decorateReceiptWithLogs(_txHash: string, _receipt: TxReceipt): void;
|
|
21
|
+
get isEnabled(): boolean;
|
|
22
|
+
}
|
|
23
|
+
/** In-memory implementation for test mode that stores and serves debug logs. */
|
|
24
|
+
export declare class InMemoryDebugLogStore implements DebugLogStore {
|
|
25
|
+
private map;
|
|
26
|
+
storeLogs(txHash: string, logs: DebugLog[]): void;
|
|
27
|
+
decorateReceiptWithLogs(txHash: string, receipt: TxReceipt): void;
|
|
28
|
+
get isEnabled(): boolean;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVidWdfbG9nX3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbG9ncy9kZWJ1Z19sb2dfc3RvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDckQsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFL0M7Ozs7O0dBS0c7QUFDSCxNQUFNLFdBQVcsYUFBYTtJQUM1QixvREFBb0Q7SUFDcEQsU0FBUyxDQUFDLE1BQU0sRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxHQUFHLElBQUksQ0FBQztJQUNs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;IACpD,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAClD,wEAAwE;IACxE,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IAClE,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,gDAAgD;AAChD,qBAAa,iBAAkB,YAAW,aAAa;IACrD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAElD;IACD,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,CAElE;IACD,IAAI,SAAS,IAAI,OAAO,CAEvB;CACF;AAED,gFAAgF;AAChF,qBAAa,qBAAsB,YAAW,aAAa;IACzD,OAAO,CAAC,GAAG,CAAiC;IAE5C,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAIhD;IAED,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,IAAI,CAOhE;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;CACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** No-op implementation for production mode. */ export class NullDebugLogStore {
|
|
2
|
+
storeLogs(_txHash, _logs) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
decorateReceiptWithLogs(_txHash, _receipt) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
get isEnabled() {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** In-memory implementation for test mode that stores and serves debug logs. */ export class InMemoryDebugLogStore {
|
|
13
|
+
map = new Map();
|
|
14
|
+
storeLogs(txHash, logs) {
|
|
15
|
+
if (logs.length > 0) {
|
|
16
|
+
this.map.set(txHash, logs);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
decorateReceiptWithLogs(txHash, receipt) {
|
|
20
|
+
if (receipt.isMined()) {
|
|
21
|
+
const debugLogs = this.map.get(txHash);
|
|
22
|
+
if (debugLogs) {
|
|
23
|
+
receipt.debugLogs = debugLogs;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
get isEnabled() {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}
|