@aztec/stdlib 0.0.1-commit.5476d83 → 0.0.1-commit.5914bae
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/abi.d.ts +619 -49
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +62 -13
- package/dest/abi/authorization_selector.d.ts +2 -2
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/authorization_selector.js +2 -1
- package/dest/abi/buffer.d.ts +15 -5
- package/dest/abi/buffer.d.ts.map +1 -1
- package/dest/abi/buffer.js +26 -5
- package/dest/abi/contract_artifact.d.ts +2 -2
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +1 -1
- package/dest/abi/decoder.d.ts +7 -46
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +17 -70
- package/dest/abi/encoder.d.ts +2 -2
- package/dest/abi/encoder.d.ts.map +1 -1
- package/dest/abi/encoder.js +38 -7
- package/dest/abi/event_metadata_definition.d.ts +3 -1
- package/dest/abi/event_metadata_definition.d.ts.map +1 -1
- package/dest/abi/event_metadata_definition.js +1 -1
- package/dest/abi/event_selector.d.ts +2 -2
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/event_selector.js +2 -1
- package/dest/abi/function_call.d.ts +48 -10
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_call.js +20 -3
- package/dest/abi/function_selector.d.ts +3 -2
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/function_selector.js +10 -2
- package/dest/abi/function_signature_decoder.d.ts +43 -0
- package/dest/abi/function_signature_decoder.d.ts.map +1 -0
- package/dest/abi/function_signature_decoder.js +66 -0
- package/dest/abi/index.d.ts +2 -1
- package/dest/abi/index.d.ts.map +1 -1
- package/dest/abi/index.js +1 -0
- package/dest/abi/note_selector.d.ts +2 -2
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/note_selector.js +2 -2
- package/dest/abi/selector.d.ts +3 -3
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/selector.js +5 -3
- package/dest/abi/utils.d.ts +20 -1
- package/dest/abi/utils.d.ts.map +1 -1
- package/dest/abi/utils.js +22 -0
- package/dest/auth_witness/auth_witness.d.ts +3 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/auth_witness.js +5 -5
- package/dest/avm/avm.d.ts +298 -86
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +238 -22
- package/dest/avm/avm_accumulated_data.d.ts +31 -4
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +8 -5
- package/dest/avm/avm_circuit_public_inputs.d.ts +14 -12
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +6 -4
- package/dest/avm/avm_proving_request.d.ts +472 -468
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +14 -2
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.js +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +14 -2
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.js +1 -1
- package/dest/avm/message_pack.d.ts +1 -1
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +2 -1
- package/dest/avm/public_call_stack_item_compressed.d.ts +4 -2
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_call_stack_item_compressed.js +1 -1
- package/dest/avm/public_data_read.d.ts +11 -2
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_read.js +1 -1
- package/dest/avm/public_data_update_request.d.ts +11 -2
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.js +4 -2
- package/dest/avm/public_data_write.d.ts +8 -2
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_data_write.js +1 -1
- package/dest/avm/public_inner_call_request.d.ts +5 -2
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/public_inner_call_request.js +3 -1
- package/dest/avm/revert_code.d.ts +13 -8
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +20 -23
- package/dest/aztec-address/index.d.ts +3 -2
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +5 -2
- package/dest/block/attestation_info.d.ts +5 -5
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +5 -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 +19 -15
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_hash.js +23 -21
- package/dest/block/block_parameter.d.ts +6 -0
- package/dest/block/block_parameter.d.ts.map +1 -0
- package/dest/block/block_parameter.js +8 -0
- package/dest/block/body.d.ts +1 -1
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +5 -2
- package/dest/block/checkpointed_l2_block.d.ts +150 -0
- package/dest/block/checkpointed_l2_block.d.ts.map +1 -0
- package/dest/block/checkpointed_l2_block.js +46 -0
- package/dest/block/in_block.d.ts +34 -15
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +21 -12
- package/dest/block/index.d.ts +4 -5
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +3 -4
- package/dest/block/l2_block.d.ts +67 -59
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +78 -109
- package/dest/block/l2_block_info.d.ts +16 -11
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_info.js +8 -7
- package/dest/block/l2_block_source.d.ts +402 -155
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +29 -16
- package/dest/block/l2_block_stream/index.d.ts +2 -1
- package/dest/block/l2_block_stream/index.d.ts.map +1 -1
- package/dest/block/l2_block_stream/index.js +1 -0
- package/dest/block/l2_block_stream/interfaces.d.ts +20 -7
- package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +13 -3
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +126 -32
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -15
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -59
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
- package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
- package/dest/block/proposal/attestations_and_signers.d.ts +2 -2
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/committee_attestation.d.ts +2 -2
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
- package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
- package/dest/block/test/l2_tips_store_test_suite.js +482 -43
- package/dest/block/validate_block_result.d.ts +24 -24
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +18 -17
- package/dest/checkpoint/checkpoint.d.ts +75 -18
- package/dest/checkpoint/checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/checkpoint.js +84 -17
- 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/checkpoint_info.d.ts +38 -0
- package/dest/checkpoint/checkpoint_info.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint_info.js +34 -0
- package/dest/checkpoint/index.d.ts +4 -1
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +3 -0
- package/dest/checkpoint/published_checkpoint.d.ts +58 -15
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
- package/dest/checkpoint/published_checkpoint.js +16 -6
- package/dest/checkpoint/validate.d.ts +36 -0
- package/dest/checkpoint/validate.d.ts.map +1 -0
- package/dest/checkpoint/validate.js +120 -0
- 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/node-rpc-config.js +1 -1
- 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 +23 -0
- package/dest/contract/artifact_hash.d.ts +2 -2
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/artifact_hash.js +2 -2
- package/dest/contract/complete_address.d.ts +5 -2
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/complete_address.js +1 -1
- package/dest/contract/contract_address.d.ts +2 -2
- package/dest/contract/contract_address.d.ts.map +1 -1
- package/dest/contract/contract_address.js +6 -6
- package/dest/contract/contract_class.d.ts +3 -4
- package/dest/contract/contract_class.d.ts.map +1 -1
- package/dest/contract/contract_class.js +1 -1
- package/dest/contract/contract_class_id.d.ts +3 -3
- package/dest/contract/contract_class_id.d.ts.map +1 -1
- package/dest/contract/contract_class_id.js +8 -7
- package/dest/contract/contract_deployment_data.d.ts +5 -5
- package/dest/contract/contract_instance.d.ts +2 -2
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance.js +1 -1
- package/dest/contract/contract_instance_update.d.ts +2 -2
- package/dest/contract/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/contract_instance_update.js +1 -1
- package/dest/contract/deployment_info.d.ts +2 -2
- package/dest/contract/deployment_info.d.ts.map +1 -1
- package/dest/contract/index.d.ts +1 -3
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +0 -2
- package/dest/contract/interfaces/contract_class.d.ts +19 -14
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_class.js +35 -18
- package/dest/contract/interfaces/contract_data_source.d.ts +4 -3
- package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +40 -31
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.js +30 -5
- package/dest/contract/interfaces/contract_instance_update.d.ts +7 -8
- package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance_update.js +5 -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/partial_address.d.ts +2 -2
- package/dest/contract/partial_address.d.ts.map +1 -1
- package/dest/contract/private_function.d.ts +2 -2
- package/dest/contract/private_function.d.ts.map +1 -1
- package/dest/contract/private_function.js +5 -5
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +3 -3
- package/dest/contract/utility_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 +3 -49
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/database-version/version_manager.js +1 -64
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +3 -3
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.js +9 -12
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +2 -2
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.js +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts +2 -2
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.js +1 -1
- package/dest/deserialization/index.d.ts +11 -0
- package/dest/deserialization/index.d.ts.map +1 -0
- package/dest/deserialization/index.js +10 -0
- package/dest/epoch-helpers/index.d.ts +15 -1
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +23 -6
- package/dest/errors/proving_error.d.ts +2 -2
- package/dest/errors/proving_error.d.ts.map +1 -1
- package/dest/errors/simulation_error.d.ts +2 -2
- package/dest/errors/simulation_error.d.ts.map +1 -1
- package/dest/fees/transaction_fee.d.ts +2 -2
- package/dest/fees/transaction_fee.d.ts.map +1 -1
- 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/gas/gas.d.ts +2 -2
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +4 -2
- package/dest/gas/gas_fees.d.ts +2 -2
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +7 -2
- package/dest/gas/gas_settings.d.ts +41 -4
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +51 -7
- package/dest/hash/hash.d.ts +21 -10
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +46 -22
- package/dest/hash/map_slot.d.ts +2 -2
- package/dest/hash/map_slot.d.ts.map +1 -1
- package/dest/hash/map_slot.js +4 -3
- package/dest/interfaces/allowed_element.d.ts +31 -26
- package/dest/interfaces/allowed_element.d.ts.map +1 -1
- package/dest/interfaces/allowed_element.js +11 -11
- package/dest/interfaces/api_limit.d.ts +3 -1
- package/dest/interfaces/api_limit.d.ts.map +1 -1
- package/dest/interfaces/api_limit.js +2 -0
- package/dest/interfaces/archiver.d.ts +12 -7
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +43 -23
- package/dest/interfaces/aztec-node-admin.d.ts +200 -65
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +15 -7
- package/dest/interfaces/aztec-node-debug.d.ts +21 -0
- package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
- package/dest/interfaces/aztec-node-debug.js +18 -0
- package/dest/interfaces/aztec-node.d.ts +93 -97
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +34 -33
- package/dest/interfaces/block-builder.d.ts +55 -18
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/block-builder.js +23 -1
- package/dest/interfaces/client.d.ts +2 -1
- package/dest/interfaces/client.d.ts.map +1 -1
- package/dest/interfaces/client.js +1 -0
- package/dest/interfaces/configs.d.ts +127 -53
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +21 -8
- package/dest/interfaces/epoch-prover.d.ts +5 -5
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.d.ts +30 -6
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.js +5 -4
- package/dest/interfaces/l2_logs_source.d.ts +21 -15
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +13 -22
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p.d.ts +9 -16
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +3 -4
- 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 +24 -3
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-client.js +22 -4
- package/dest/interfaces/proving-job.d.ts +60 -56
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +1 -7
- package/dest/interfaces/public_state_source.d.ts +2 -2
- package/dest/interfaces/public_state_source.d.ts.map +1 -1
- package/dest/interfaces/server_circuit_prover.d.ts +4 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/slasher.d.ts +9 -1
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +5 -3
- package/dest/interfaces/validator.d.ts +225 -48
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +17 -8
- package/dest/interfaces/world_state.d.ts +26 -33
- package/dest/interfaces/world_state.d.ts.map +1 -1
- package/dest/interfaces/world_state.js +4 -3
- package/dest/kernel/claimed_length_array.d.ts +2 -2
- package/dest/kernel/claimed_length_array.d.ts.map +1 -1
- package/dest/kernel/claimed_length_array.js +4 -2
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +7 -6
- 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 +31 -19
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +5 -5
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
- 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/find_private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -3
- package/dest/kernel/hints/index.d.ts +2 -2
- package/dest/kernel/hints/index.js +2 -2
- package/dest/kernel/hints/key_validation_hint.d.ts +3 -2
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_hint.js +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +5 -3
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.js +2 -1
- 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} +13 -16
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts +2 -2
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.js +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.d.ts +8 -2
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request.js +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +7 -1
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +9 -9
- 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/hints/scoped_value_cache.d.ts +2 -2
- package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts +2 -2
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.js +4 -2
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +2 -2
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.js +1 -1
- package/dest/kernel/log_hash.d.ts +2 -2
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/log_hash.js +4 -2
- package/dest/kernel/note_hash.d.ts +2 -2
- package/dest/kernel/note_hash.d.ts.map +1 -1
- package/dest/kernel/note_hash.js +1 -1
- package/dest/kernel/nullifier.d.ts +2 -2
- package/dest/kernel/nullifier.d.ts.map +1 -1
- package/dest/kernel/nullifier.js +1 -1
- package/dest/kernel/padded_side_effects.d.ts +2 -2
- package/dest/kernel/padded_side_effects.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.js +2 -2
- package/dest/kernel/private_accumulated_data.d.ts +23 -1
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +30 -63
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.js +5 -106
- package/dest/kernel/private_call_request.d.ts +17 -2
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_call_request.js +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +127 -54
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +72 -72
- package/dest/kernel/private_context_inputs.d.ts +2 -2
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +34 -4
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +5 -5
- package/dest/kernel/private_kernel_data.d.ts +7 -1
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +23 -2
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +1 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -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 +27 -4
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +12 -8
- package/dest/kernel/private_log_data.d.ts +2 -2
- package/dest/kernel/private_log_data.d.ts.map +1 -1
- package/dest/kernel/private_log_data.js +5 -2
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +4 -4
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +8 -5
- package/dest/kernel/private_to_public_accumulated_data.d.ts +2 -2
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data.js +6 -4
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +2 -2
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.js +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +4 -4
- 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 +8 -8
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +18 -2
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.js +5 -3
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +19 -4
- 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 +8 -8
- package/dest/kernel/private_validation_requests.d.ts +13 -4
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +12 -10
- package/dest/kernel/public_call_request.d.ts +23 -2
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +6 -3
- package/dest/kernel/utils/optional_number.d.ts +8 -2
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/keys/derivation.d.ts +7 -6
- package/dest/keys/derivation.d.ts.map +1 -1
- package/dest/keys/derivation.js +20 -17
- package/dest/keys/key_types.d.ts +3 -3
- package/dest/keys/key_types.d.ts.map +1 -1
- package/dest/keys/public_key.d.ts +2 -2
- package/dest/keys/public_key.d.ts.map +1 -1
- package/dest/keys/public_keys.d.ts +7 -2
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +5 -4
- 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 +3 -2
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/l1-contracts/slash_factory.js +2 -1
- package/dest/logs/contract_class_log.d.ts +2 -2
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +5 -3
- package/dest/logs/debug_log.d.ts +2 -2
- package/dest/logs/debug_log.d.ts.map +1 -1
- package/dest/logs/debug_log.js +1 -1
- 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_contract_class_log.d.ts +3 -1
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- 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} +38 -22
- package/dest/logs/extended_public_log.d.ts +20 -4
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +6 -3
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +5 -2
- package/dest/logs/log_filter.d.ts +4 -1
- package/dest/logs/log_filter.d.ts.map +1 -1
- package/dest/logs/log_filter.js +2 -1
- package/dest/logs/log_id.d.ts +29 -11
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +27 -16
- package/dest/logs/message_context.d.ts +5 -8
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/message_context.js +24 -10
- package/dest/logs/pending_tagged_log.d.ts +3 -4
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.js +3 -3
- 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 +3 -3
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +7 -4
- package/dest/logs/public_log.d.ts +6 -4
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +16 -4
- package/dest/logs/shared_secret_derivation.d.ts +11 -10
- package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
- package/dest/logs/shared_secret_derivation.js +16 -10
- package/dest/logs/siloed_tag.d.ts +28 -0
- package/dest/logs/siloed_tag.d.ts.map +1 -0
- package/dest/logs/siloed_tag.js +36 -0
- package/dest/logs/tag.d.ts +21 -0
- package/dest/logs/tag.d.ts.map +1 -0
- package/dest/logs/tag.js +30 -0
- package/dest/logs/tagging_index_range.d.ts +40 -0
- package/dest/logs/tagging_index_range.d.ts.map +1 -0
- package/dest/logs/tagging_index_range.js +8 -0
- package/dest/logs/tx_scoped_l2_log.d.ts +34 -38
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +46 -44
- package/dest/messaging/in_hash.d.ts +5 -3
- package/dest/messaging/in_hash.d.ts.map +1 -1
- package/dest/messaging/in_hash.js +4 -2
- package/dest/messaging/inbox_leaf.d.ts +10 -7
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/inbox_leaf.js +10 -9
- package/dest/messaging/l1_actor.d.ts +8 -2
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_actor.js +2 -2
- package/dest/messaging/l1_to_l2_message.d.ts +9 -3
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.js +13 -15
- package/dest/messaging/l1_to_l2_message_source.d.ts +6 -10
- package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +8 -2
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_actor.js +2 -2
- package/dest/messaging/l2_to_l1_membership.d.ts +117 -8
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +210 -49
- package/dest/messaging/l2_to_l1_message.d.ts +3 -2
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +4 -1
- package/dest/messaging/out_hash.d.ts +42 -4
- package/dest/messaging/out_hash.d.ts.map +1 -1
- package/dest/messaging/out_hash.js +55 -20
- package/dest/noir/index.d.ts +3 -3
- package/dest/noir/index.d.ts.map +1 -1
- 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/note/note.d.ts +2 -2
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note.js +5 -2
- package/dest/note/note_dao.d.ts +48 -9
- package/dest/note/note_dao.d.ts.map +1 -1
- package/dest/note/note_dao.js +27 -16
- package/dest/p2p/attestation_utils.d.ts +13 -3
- package/dest/p2p/attestation_utils.d.ts.map +1 -1
- package/dest/p2p/attestation_utils.js +46 -1
- package/dest/p2p/block_proposal.d.ts +103 -24
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +140 -40
- package/dest/p2p/checkpoint_attestation.d.ts +82 -0
- package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
- package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +24 -20
- package/dest/p2p/checkpoint_proposal.d.ts +174 -0
- package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
- package/dest/p2p/checkpoint_proposal.js +233 -0
- 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 +21 -12
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +25 -20
- package/dest/p2p/constants.d.ts +5 -0
- package/dest/p2p/constants.d.ts.map +1 -0
- package/dest/p2p/constants.js +3 -0
- package/dest/p2p/gossipable.d.ts +4 -3
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -5
- package/dest/p2p/index.d.ts +5 -3
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +4 -2
- package/dest/p2p/message_validator.d.ts +18 -3
- package/dest/p2p/message_validator.d.ts.map +1 -1
- package/dest/p2p/message_validator.js +2 -1
- package/dest/p2p/peer_error.d.ts +3 -1
- package/dest/p2p/peer_error.d.ts.map +1 -1
- package/dest/p2p/peer_error.js +5 -0
- package/dest/p2p/signature_utils.d.ts +5 -3
- package/dest/p2p/signature_utils.d.ts.map +1 -1
- package/dest/p2p/signature_utils.js +5 -2
- package/dest/p2p/signed_txs.d.ts +42 -0
- package/dest/p2p/signed_txs.d.ts.map +1 -0
- package/dest/p2p/signed_txs.js +75 -0
- package/dest/p2p/topic_type.d.ts +5 -5
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +9 -19
- package/dest/parity/parity_base_private_inputs.d.ts +4 -2
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +2 -2
- package/dest/parity/parity_public_inputs.d.ts +5 -2
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.js +1 -1
- package/dest/parity/parity_root_private_inputs.d.ts +2 -1
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.d.ts +2 -2
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.js +18 -7
- package/dest/proofs/proof.d.ts +5 -2
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/proof.js +1 -1
- package/dest/proofs/proof_data.d.ts +13 -1
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proof_data.js +17 -0
- package/dest/proofs/recursive_proof.d.ts +11 -2
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/proofs/recursive_proof.js +1 -1
- package/dest/rollup/avm_proof_data.d.ts +3 -5
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +1 -9
- package/dest/rollup/base_rollup_hints.d.ts +35 -2
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +3 -3
- package/dest/rollup/block_constant_data.d.ts +13 -2
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.js +1 -1
- package/dest/rollup/block_headers_hash.d.ts +2 -2
- package/dest/rollup/block_headers_hash.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.js +2 -2
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +48 -12
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +9 -13
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +65 -2
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +6 -6
- package/dest/rollup/checkpoint_constant_data.d.ts +12 -2
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +5 -2
- package/dest/rollup/checkpoint_header.d.ts +47 -13
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +55 -22
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +47 -7
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.js +12 -4
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +46 -4
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +17 -5
- package/dest/rollup/epoch_constant_data.d.ts +17 -2
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/epoch_constant_data.js +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.js +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.js +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
- package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +22 -7
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.js +11 -5
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +25 -2
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.js +3 -3
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +30 -2
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.js +1 -1
- package/dest/schemas/schemas.d.ts +7 -4
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +2 -1
- 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 +8 -2
- package/dest/slashing/tally.d.ts.map +1 -1
- package/dest/slashing/tally.js +35 -3
- package/dest/slashing/types.d.ts +10 -7
- package/dest/slashing/types.d.ts.map +1 -1
- package/dest/slashing/types.js +18 -6
- package/dest/snapshots/types.d.ts +1 -1
- package/dest/snapshots/types.d.ts.map +1 -1
- package/dest/snapshots/types.js +5 -5
- package/dest/stats/stats.d.ts +10 -8
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +44 -12
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +119 -44
- package/dest/tests/jest.js +1 -1
- package/dest/tests/mocks.d.ts +92 -19
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +202 -67
- 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/append_only_tree_snapshot.d.ts +14 -2
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +4 -2
- package/dest/trees/database_public_state_source.d.ts +2 -2
- package/dest/trees/database_public_state_source.d.ts.map +1 -1
- package/dest/trees/database_public_state_source.js +1 -1
- package/dest/trees/nullifier_leaf.d.ts +14 -2
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +1 -1
- package/dest/trees/nullifier_membership_witness.d.ts +11 -2
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/nullifier_membership_witness.js +1 -1
- package/dest/trees/public_data_leaf.d.ts +18 -2
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +8 -7
- package/dest/trees/public_data_witness.d.ts +12 -2
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/trees/public_data_witness.js +1 -1
- package/dest/tx/block_header.d.ts +27 -12
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +20 -5
- package/dest/tx/call_context.d.ts +14 -2
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/call_context.js +3 -1
- package/dest/tx/capsule.d.ts +10 -3
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/capsule.js +10 -4
- package/dest/tx/execution_payload.d.ts +9 -1
- package/dest/tx/execution_payload.d.ts.map +1 -1
- package/dest/tx/function_data.d.ts +5 -3
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/function_data.js +1 -1
- package/dest/tx/global_variable_builder.d.ts +5 -3
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +27 -12
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +11 -9
- package/dest/tx/hashed_values.d.ts +8 -2
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/hashed_values.js +1 -1
- package/dest/tx/in_tx.d.ts +26 -0
- package/dest/tx/in_tx.d.ts.map +1 -0
- package/dest/tx/in_tx.js +14 -0
- package/dest/tx/index.d.ts +2 -2
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -1
- package/dest/tx/indexed_tx_effect.d.ts +14 -10
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +8 -6
- package/dest/tx/offchain_effect.d.ts +2 -2
- package/dest/tx/offchain_effect.d.ts.map +1 -1
- package/dest/tx/offchain_effect.js +1 -1
- package/dest/tx/partial_state_reference.d.ts +5 -2
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/private_execution_result.d.ts +30 -13
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +10 -27
- package/dest/tx/private_tx_constant_data.d.ts +17 -2
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/private_tx_constant_data.js +1 -1
- package/dest/tx/processed_tx.d.ts +5 -4
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +8 -7
- package/dest/tx/profiling.d.ts +166 -31
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +60 -13
- package/dest/tx/protocol_contracts.d.ts +3 -3
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +5 -5
- package/dest/tx/public_call_request_with_calldata.d.ts +8 -2
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +4 -2
- package/dest/tx/public_simulation_output.d.ts +5 -3
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +8 -4
- package/dest/tx/simulated_tx.d.ts +1021 -11
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +7 -4
- package/dest/tx/state_reference.d.ts +4 -2
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +3 -1
- package/dest/tx/tree_snapshots.d.ts +2 -2
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +3 -1
- package/dest/tx/tx.d.ts +39 -8
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +36 -12
- package/dest/tx/tx_constant_data.d.ts +2 -2
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_constant_data.js +1 -1
- package/dest/tx/tx_context.d.ts +3 -2
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_context.js +1 -1
- package/dest/tx/tx_effect.d.ts +33 -7
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +8 -11
- package/dest/tx/tx_execution_request.d.ts +31 -2
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_execution_request.js +7 -3
- package/dest/tx/tx_hash.d.ts +3 -2
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +1 -1
- package/dest/tx/tx_receipt.d.ts +76 -18
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +65 -29
- package/dest/tx/tx_request.d.ts +7 -2
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +4 -4
- 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 +11 -2
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +13 -1
- package/dest/tx/validator/tx_validator.d.ts +2 -5
- package/dest/tx/validator/tx_validator.d.ts.map +1 -1
- package/dest/tx/validator/tx_validator.js +4 -4
- package/dest/types/shared.d.ts +4 -1
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/index.d.ts +3 -2
- package/dest/update-checker/index.d.ts.map +1 -1
- package/dest/update-checker/index.js +2 -1
- package/dest/update-checker/package_version.d.ts +3 -0
- package/dest/update-checker/package_version.d.ts.map +1 -0
- package/dest/update-checker/package_version.js +24 -0
- package/dest/update-checker/version_checker.d.ts +25 -0
- package/dest/update-checker/version_checker.d.ts.map +1 -0
- package/dest/update-checker/version_checker.js +50 -0
- package/dest/validators/errors.d.ts +7 -2
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +7 -0
- package/dest/validators/schemas.d.ts +38 -38
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +17 -16
- package/dest/validators/types.d.ts +3 -3
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/versioning/versioning.d.ts +5 -3
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/versioning/versioning.js +4 -1
- package/dest/vks/verification_key.d.ts +23 -2
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +1 -1
- package/dest/vks/vk_data.d.ts +8 -2
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/vks/vk_data.js +2 -2
- package/dest/zkpassport/index.d.ts +4 -5
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +11 -11
- package/package.json +34 -15
- package/src/abi/abi.ts +117 -35
- package/src/abi/authorization_selector.ts +3 -2
- package/src/abi/buffer.ts +26 -5
- package/src/abi/contract_artifact.ts +10 -10
- package/src/abi/decoder.ts +37 -83
- package/src/abi/encoder.ts +50 -7
- package/src/abi/event_metadata_definition.ts +2 -0
- package/src/abi/event_selector.ts +3 -2
- package/src/abi/function_call.ts +26 -4
- package/src/abi/function_selector.ts +12 -3
- package/src/abi/function_signature_decoder.ts +77 -0
- package/src/abi/index.ts +1 -0
- package/src/abi/note_selector.ts +2 -2
- package/src/abi/selector.ts +2 -2
- package/src/abi/utils.ts +42 -0
- package/src/auth_witness/auth_witness.ts +5 -5
- package/src/avm/avm.ts +338 -20
- package/src/avm/avm_accumulated_data.ts +7 -7
- package/src/avm/avm_circuit_public_inputs.ts +5 -5
- package/src/avm/contract_storage_read.ts +1 -1
- package/src/avm/contract_storage_update_request.ts +1 -1
- package/src/avm/message_pack.ts +2 -1
- package/src/avm/public_call_stack_item_compressed.ts +1 -1
- package/src/avm/public_data_read.ts +1 -1
- package/src/avm/public_data_update_request.ts +1 -1
- package/src/avm/public_data_write.ts +1 -1
- package/src/avm/public_inner_call_request.ts +1 -1
- package/src/avm/revert_code.ts +27 -26
- package/src/aztec-address/index.ts +2 -1
- package/src/block/attestation_info.ts +10 -7
- package/src/block/block_data.ts +26 -0
- package/src/block/block_hash.ts +27 -26
- package/src/block/block_parameter.ts +10 -0
- package/src/block/body.ts +2 -1
- package/src/block/checkpointed_l2_block.ts +70 -0
- package/src/block/in_block.ts +28 -15
- package/src/block/index.ts +3 -4
- package/src/block/l2_block.ts +117 -139
- package/src/block/l2_block_info.ts +11 -10
- package/src/block/l2_block_source.ts +231 -75
- package/src/block/l2_block_stream/index.ts +1 -0
- package/src/block/l2_block_stream/interfaces.ts +21 -6
- package/src/block/l2_block_stream/l2_block_stream.ts +163 -37
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +63 -54
- package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
- package/src/block/proposal/attestations_and_signers.ts +1 -1
- package/src/block/proposal/committee_attestation.ts +1 -1
- package/src/block/test/l2_tips_store_test_suite.ts +486 -36
- package/src/block/validate_block_result.ts +40 -35
- package/src/checkpoint/checkpoint.ts +125 -28
- package/src/checkpoint/checkpoint_data.ts +51 -0
- package/src/checkpoint/checkpoint_info.ts +52 -0
- package/src/checkpoint/index.ts +3 -0
- package/src/checkpoint/published_checkpoint.ts +26 -9
- package/src/checkpoint/validate.ts +230 -0
- package/src/config/index.ts +1 -0
- package/src/config/node-rpc-config.ts +1 -1
- package/src/config/sequencer-config.ts +34 -0
- package/src/contract/artifact_hash.ts +2 -2
- package/src/contract/complete_address.ts +1 -1
- package/src/contract/contract_address.ts +6 -6
- package/src/contract/contract_class.ts +5 -5
- package/src/contract/contract_class_id.ts +8 -7
- package/src/contract/contract_instance.ts +1 -1
- package/src/contract/contract_instance_update.ts +1 -1
- package/src/contract/deployment_info.ts +1 -1
- package/src/contract/index.ts +0 -2
- package/src/contract/interfaces/contract_class.ts +78 -47
- package/src/contract/interfaces/contract_data_source.ts +3 -2
- package/src/contract/interfaces/contract_instance.ts +48 -16
- package/src/contract/interfaces/contract_instance_update.ts +12 -10
- package/src/contract/interfaces/node-info.ts +3 -0
- package/src/contract/partial_address.ts +1 -1
- package/src/contract/private_function.ts +5 -5
- package/src/contract/private_function_membership_proof.ts +3 -3
- package/src/contract/utility_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/delayed_public_mutable/delayed_public_mutable_values.ts +11 -12
- package/src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts +1 -1
- package/src/delayed_public_mutable/scheduled_value_change.ts +1 -1
- package/src/deserialization/index.ts +21 -0
- package/src/epoch-helpers/index.ts +46 -10
- package/src/errors/simulation_error.ts +1 -1
- package/src/fees/transaction_fee.ts +1 -1
- package/src/file-store/local.ts +15 -5
- package/src/file-store/s3.ts +12 -3
- package/src/gas/README.md +123 -0
- package/src/gas/gas.ts +1 -1
- package/src/gas/gas_fees.ts +8 -2
- package/src/gas/gas_settings.ts +66 -13
- package/src/hash/hash.ts +49 -21
- package/src/hash/map_slot.ts +4 -3
- package/src/interfaces/allowed_element.ts +35 -13
- package/src/interfaces/api_limit.ts +2 -0
- package/src/interfaces/archiver.ts +57 -31
- package/src/interfaces/aztec-node-admin.ts +33 -6
- package/src/interfaces/aztec-node-debug.ts +40 -0
- package/src/interfaces/aztec-node.ts +172 -176
- package/src/interfaces/block-builder.ts +102 -27
- package/src/interfaces/client.ts +1 -0
- package/src/interfaces/configs.ts +99 -37
- package/src/interfaces/epoch-prover.ts +4 -4
- package/src/interfaces/get_logs_response.ts +13 -9
- package/src/interfaces/l2_logs_source.ts +24 -14
- package/src/interfaces/merkle_tree_operations.ts +15 -21
- package/src/interfaces/p2p.ts +10 -25
- package/src/interfaces/prover-broker.ts +22 -0
- package/src/interfaces/prover-client.ts +43 -10
- package/src/interfaces/proving-job.ts +2 -11
- package/src/interfaces/public_state_source.ts +1 -1
- package/src/interfaces/server_circuit_prover.ts +3 -3
- package/src/interfaces/slasher.ts +28 -22
- package/src/interfaces/validator.ts +111 -33
- package/src/interfaces/world_state.ts +29 -20
- package/src/kernel/claimed_length_array.ts +3 -3
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +34 -30
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +33 -33
- package/src/kernel/hints/build_transient_data_hints.ts +17 -2
- package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +2 -4
- package/src/kernel/hints/index.ts +2 -2
- package/src/kernel/hints/key_validation_hint.ts +1 -1
- package/src/kernel/hints/key_validation_request.ts +2 -1
- package/src/kernel/hints/key_validation_request_and_separator.ts +49 -0
- package/src/kernel/hints/note_hash_read_request_hints.ts +1 -1
- package/src/kernel/hints/private_kernel_reset_hints.ts +5 -2
- package/src/kernel/hints/read_request.ts +1 -1
- package/src/kernel/hints/read_request_hints.ts +3 -3
- package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +11 -11
- package/src/kernel/hints/scoped_value_cache.ts +1 -1
- package/src/kernel/hints/transient_data_squashing_hint.ts +1 -1
- package/src/kernel/hints/tree_leaf_read_request.ts +1 -1
- package/src/kernel/log_hash.ts +1 -1
- package/src/kernel/note_hash.ts +1 -1
- package/src/kernel/nullifier.ts +1 -1
- package/src/kernel/padded_side_effects.ts +4 -4
- package/src/kernel/private_call_data.ts +4 -131
- package/src/kernel/private_call_request.ts +1 -1
- package/src/kernel/private_circuit_public_inputs.ts +100 -100
- package/src/kernel/private_context_inputs.ts +1 -1
- package/src/kernel/private_kernel_circuit_public_inputs.ts +3 -3
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +1 -1
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +15 -6
- package/src/kernel/private_log_data.ts +1 -1
- package/src/kernel/private_to_avm_accumulated_data.ts +5 -5
- package/src/kernel/private_to_public_accumulated_data.ts +11 -11
- package/src/kernel/private_to_public_accumulated_data_builder.ts +1 -1
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +7 -7
- package/src/kernel/private_to_rollup_accumulated_data.ts +6 -6
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +7 -7
- package/src/kernel/private_validation_requests.ts +8 -8
- package/src/kernel/public_call_request.ts +1 -1
- package/src/kernel/utils/optional_number.ts +1 -1
- package/src/keys/derivation.ts +20 -17
- package/src/keys/key_types.ts +6 -2
- package/src/keys/public_key.ts +1 -1
- package/src/keys/public_keys.ts +5 -4
- package/src/keys/utils.ts +8 -4
- package/src/l1-contracts/slash_factory.ts +4 -1
- package/src/logs/contract_class_log.ts +2 -2
- package/src/logs/debug_log.ts +1 -1
- package/src/logs/debug_log_store.ts +54 -0
- package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +45 -24
- package/src/logs/index.ts +5 -2
- package/src/logs/log_filter.ts +5 -0
- package/src/logs/log_id.ts +32 -17
- package/src/logs/message_context.ts +18 -8
- package/src/logs/pending_tagged_log.ts +2 -4
- package/src/logs/pre_tag.ts +5 -5
- package/src/logs/private_log.ts +4 -3
- package/src/logs/public_log.ts +23 -4
- package/src/logs/shared_secret_derivation.ts +22 -11
- package/src/logs/siloed_tag.ts +55 -0
- package/src/logs/tag.ts +42 -0
- package/src/logs/tagging_index_range.ts +24 -0
- package/src/logs/tx_scoped_l2_log.ts +62 -43
- package/src/messaging/in_hash.ts +4 -2
- package/src/messaging/inbox_leaf.ts +11 -10
- package/src/messaging/l1_actor.ts +2 -2
- package/src/messaging/l1_to_l2_message.ts +14 -10
- package/src/messaging/l1_to_l2_message_source.ts +5 -10
- package/src/messaging/l2_actor.ts +2 -2
- package/src/messaging/l2_to_l1_membership.ts +253 -61
- package/src/messaging/l2_to_l1_message.ts +5 -1
- package/src/messaging/out_hash.ts +63 -22
- package/src/noir/index.ts +2 -2
- package/src/note/index.ts +0 -1
- package/src/note/note.ts +5 -2
- package/src/note/note_dao.ts +49 -16
- package/src/p2p/attestation_utils.ts +59 -3
- package/src/p2p/block_proposal.ts +214 -48
- package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +38 -26
- package/src/p2p/checkpoint_proposal.ts +373 -0
- package/src/p2p/client_type.ts +0 -6
- package/src/p2p/consensus_payload.ts +30 -19
- package/src/p2p/constants.ts +6 -0
- package/src/p2p/gossipable.ts +14 -4
- package/src/p2p/index.ts +4 -2
- package/src/p2p/message_validator.ts +14 -2
- package/src/p2p/peer_error.ts +7 -0
- package/src/p2p/signature_utils.ts +5 -2
- package/src/p2p/signed_txs.ts +88 -0
- package/src/p2p/topic_type.ts +10 -16
- package/src/parity/parity_base_private_inputs.ts +2 -2
- package/src/parity/parity_public_inputs.ts +1 -1
- package/src/proofs/chonk_proof.ts +20 -8
- package/src/proofs/proof.ts +1 -1
- package/src/proofs/proof_data.ts +24 -0
- package/src/proofs/recursive_proof.ts +1 -1
- package/src/rollup/avm_proof_data.ts +2 -9
- package/src/rollup/base_rollup_hints.ts +3 -3
- package/src/rollup/block_constant_data.ts +1 -1
- package/src/rollup/block_headers_hash.ts +2 -2
- package/src/rollup/block_rollup_public_inputs.ts +6 -12
- package/src/rollup/block_root_rollup_private_inputs.ts +9 -9
- package/src/rollup/checkpoint_constant_data.ts +2 -1
- package/src/rollup/checkpoint_header.ts +69 -20
- package/src/rollup/checkpoint_rollup_public_inputs.ts +18 -6
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +19 -5
- package/src/rollup/epoch_constant_data.ts +1 -1
- package/src/rollup/public_chonk_verifier_private_inputs.ts +1 -1
- package/src/rollup/public_chonk_verifier_public_inputs.ts +1 -1
- package/src/rollup/public_tx_base_rollup_private_inputs.ts +2 -2
- package/src/rollup/root_rollup_public_inputs.ts +17 -8
- package/src/rollup/tree_snapshot_diff_hints.ts +6 -6
- package/src/rollup/tx_rollup_public_inputs.ts +1 -1
- package/src/schemas/schemas.ts +6 -1
- package/src/slashing/empire.ts +3 -1
- package/src/slashing/helpers.ts +8 -0
- package/src/slashing/tally.ts +41 -2
- package/src/slashing/types.ts +38 -20
- package/src/snapshots/types.ts +33 -29
- package/src/stats/stats.ts +10 -7
- package/src/tests/factories.ts +153 -62
- package/src/tests/jest.ts +1 -1
- package/src/tests/mocks.ts +314 -90
- package/src/timetable/index.ts +66 -0
- package/src/trees/append_only_tree_snapshot.ts +1 -1
- package/src/trees/database_public_state_source.ts +1 -1
- package/src/trees/nullifier_leaf.ts +1 -1
- package/src/trees/nullifier_membership_witness.ts +1 -1
- package/src/trees/public_data_leaf.ts +12 -6
- package/src/trees/public_data_witness.ts +1 -1
- package/src/tx/block_header.ts +33 -13
- package/src/tx/call_context.ts +1 -1
- package/src/tx/capsule.ts +11 -3
- package/src/tx/function_data.ts +1 -1
- package/src/tx/global_variable_builder.ts +9 -2
- package/src/tx/global_variables.ts +16 -10
- package/src/tx/hashed_values.ts +1 -1
- package/src/tx/in_tx.ts +24 -0
- package/src/tx/index.ts +1 -1
- package/src/tx/indexed_tx_effect.ts +9 -7
- package/src/tx/offchain_effect.ts +1 -1
- package/src/tx/partial_state_reference.ts +1 -1
- package/src/tx/private_execution_result.ts +10 -25
- package/src/tx/private_tx_constant_data.ts +1 -1
- package/src/tx/processed_tx.ts +19 -16
- package/src/tx/profiling.ts +61 -10
- package/src/tx/protocol_contracts.ts +6 -6
- package/src/tx/public_call_request_with_calldata.ts +1 -1
- package/src/tx/public_simulation_output.ts +5 -1
- package/src/tx/simulated_tx.ts +14 -3
- package/src/tx/state_reference.ts +1 -1
- package/src/tx/tree_snapshots.ts +1 -1
- package/src/tx/tx.ts +40 -23
- package/src/tx/tx_constant_data.ts +1 -1
- package/src/tx/tx_context.ts +1 -1
- package/src/tx/tx_effect.ts +5 -12
- package/src/tx/tx_execution_request.ts +3 -1
- package/src/tx/tx_hash.ts +1 -1
- package/src/tx/tx_receipt.ts +100 -30
- package/src/tx/tx_request.ts +4 -4
- package/src/tx/validator/empty_validator.ts +1 -1
- package/src/tx/validator/error_texts.ts +16 -1
- package/src/tx/validator/tx_validator.ts +9 -7
- package/src/update-checker/index.ts +2 -1
- package/src/update-checker/package_version.ts +30 -0
- package/src/update-checker/version_checker.ts +65 -0
- package/src/validators/errors.ts +10 -1
- package/src/validators/schemas.ts +61 -48
- package/src/validators/types.ts +5 -4
- package/src/versioning/versioning.ts +5 -2
- package/src/vks/verification_key.ts +1 -1
- package/src/vks/vk_data.ts +2 -2
- package/src/zkpassport/index.ts +13 -14
- package/dest/block/l2_block_code_to_purge.d.ts +0 -12
- package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
- package/dest/block/l2_block_code_to_purge.js +0 -61
- package/dest/block/l2_block_header.d.ts +0 -98
- package/dest/block/l2_block_header.d.ts.map +0 -1
- package/dest/block/l2_block_header.js +0 -153
- package/dest/block/l2_block_new.d.ts +0 -108
- package/dest/block/l2_block_new.d.ts.map +0 -1
- package/dest/block/l2_block_new.js +0 -135
- package/dest/block/l2_block_number.d.ts +0 -5
- package/dest/block/l2_block_number.d.ts.map +0 -1
- package/dest/block/l2_block_number.js +0 -6
- package/dest/block/published_l2_block.d.ts +0 -130
- package/dest/block/published_l2_block.d.ts.map +0 -1
- package/dest/block/published_l2_block.js +0 -48
- package/dest/contract/contract_class_metadata.d.ts +0 -8
- package/dest/contract/contract_class_metadata.d.ts.map +0 -1
- package/dest/contract/contract_class_metadata.js +0 -1
- package/dest/contract/contract_metadata.d.ts +0 -7
- package/dest/contract/contract_metadata.d.ts.map +0 -1
- package/dest/contract/contract_metadata.js +0 -1
- 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 -25
- 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/logs/log_with_tx_data.d.ts +0 -19
- package/dest/logs/log_with_tx_data.d.ts.map +0 -1
- package/dest/logs/log_with_tx_data.js +0 -49
- package/dest/note/notes_filter.d.ts +0 -25
- package/dest/note/notes_filter.d.ts.map +0 -1
- package/dest/note/notes_filter.js +0 -10
- package/dest/p2p/block_attestation.d.ts +0 -80
- package/dest/p2p/block_attestation.d.ts.map +0 -1
- package/dest/tx/content_commitment.d.ts +0 -48
- package/dest/tx/content_commitment.d.ts.map +0 -1
- package/dest/tx/content_commitment.js +0 -82
- package/dest/update-checker/update-checker.d.ts +0 -49
- package/dest/update-checker/update-checker.d.ts.map +0 -1
- package/dest/update-checker/update-checker.js +0 -130
- package/src/block/l2_block_code_to_purge.ts +0 -88
- package/src/block/l2_block_header.ts +0 -246
- package/src/block/l2_block_new.ts +0 -171
- package/src/block/l2_block_number.ts +0 -8
- package/src/block/published_l2_block.ts +0 -65
- package/src/contract/contract_class_metadata.ts +0 -8
- package/src/contract/contract_metadata.ts +0 -7
- package/src/database-version/index.ts +0 -1
- package/src/kernel/hints/key_validation_request_and_generator.ts +0 -52
- package/src/logs/log_with_tx_data.ts +0 -46
- package/src/note/notes_filter.ts +0 -35
- package/src/tx/content_commitment.ts +0 -104
- package/src/update-checker/update-checker.ts +0 -165
package/src/abi/abi.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable camelcase */
|
|
2
|
-
import type { Fr } from '@aztec/foundation/
|
|
2
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
|
-
import {
|
|
4
|
+
import { schemas, zodFor } from '@aztec/foundation/schemas';
|
|
5
5
|
|
|
6
6
|
import { inflate } from 'pako';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -154,11 +154,13 @@ export type AbiErrorType =
|
|
|
154
154
|
| { error_kind: 'fmtstring'; length: number; item_types: AbiType[] }
|
|
155
155
|
| ({ error_kind: 'custom' } & AbiType);
|
|
156
156
|
|
|
157
|
-
const AbiErrorTypeSchema =
|
|
158
|
-
z.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
const AbiErrorTypeSchema = zodFor<AbiErrorType>()(
|
|
158
|
+
z.union([
|
|
159
|
+
z.object({ error_kind: z.literal('string'), string: z.string() }),
|
|
160
|
+
z.object({ error_kind: z.literal('fmtstring'), length: z.number(), item_types: z.array(AbiTypeSchema) }),
|
|
161
|
+
z.object({ error_kind: z.literal('custom') }).and(AbiTypeSchema),
|
|
162
|
+
]),
|
|
163
|
+
);
|
|
162
164
|
|
|
163
165
|
/** Aztec.nr function types. */
|
|
164
166
|
export enum FunctionType {
|
|
@@ -222,7 +224,20 @@ export const FunctionDebugMetadataSchema = z.object({
|
|
|
222
224
|
acir_locations: z.record(z.number()),
|
|
223
225
|
brillig_locations: z.record(z.record(z.number())),
|
|
224
226
|
}),
|
|
225
|
-
|
|
227
|
+
// `function_locations` is required in the static `DebugFileMap` type (noir-types compat), but legacy v4-next
|
|
228
|
+
// artifacts were compiled before this field existed — see {@link fillMissingFunctionLocations} for the full
|
|
229
|
+
// rationale. The preprocessor injects `[]` for missing entries so parsing succeeds; the cast restores the
|
|
230
|
+
// output type since `z.preprocess` widens the schema's input type to `unknown`.
|
|
231
|
+
files: z.preprocess(
|
|
232
|
+
fillMissingFunctionLocations,
|
|
233
|
+
z.record(
|
|
234
|
+
z.object({
|
|
235
|
+
source: z.string(),
|
|
236
|
+
path: z.string(),
|
|
237
|
+
function_locations: z.array(z.object({ start: z.number(), name: z.string() })),
|
|
238
|
+
}),
|
|
239
|
+
),
|
|
240
|
+
) as z.ZodType<DebugFileMap>,
|
|
226
241
|
}) satisfies z.ZodType<FunctionDebugMetadata>;
|
|
227
242
|
|
|
228
243
|
/** The artifact entry of a function. */
|
|
@@ -242,14 +257,16 @@ export interface FunctionArtifactWithContractName extends FunctionArtifact {
|
|
|
242
257
|
contractName: string;
|
|
243
258
|
}
|
|
244
259
|
|
|
245
|
-
export const FunctionArtifactSchema =
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
)
|
|
260
|
+
export const FunctionArtifactSchema = zodFor<FunctionArtifact>()(
|
|
261
|
+
FunctionAbiSchema.and(
|
|
262
|
+
z.object({
|
|
263
|
+
bytecode: schemas.Buffer,
|
|
264
|
+
verificationKey: z.string().optional(),
|
|
265
|
+
debugSymbols: z.string(),
|
|
266
|
+
debug: FunctionDebugMetadataSchema.optional(),
|
|
267
|
+
}),
|
|
268
|
+
),
|
|
269
|
+
);
|
|
253
270
|
|
|
254
271
|
/** A file ID. It's assigned during compilation. */
|
|
255
272
|
type FileId = number;
|
|
@@ -301,6 +318,14 @@ export interface ProgramDebugInfo {
|
|
|
301
318
|
debug_infos: Array<DebugInfo>;
|
|
302
319
|
}
|
|
303
320
|
|
|
321
|
+
/** The range a function occupies in a file. */
|
|
322
|
+
export type FunctionLocation = {
|
|
323
|
+
/** The byte where the function starts. */
|
|
324
|
+
start: number;
|
|
325
|
+
/** The name of the function. */
|
|
326
|
+
name: string;
|
|
327
|
+
};
|
|
328
|
+
|
|
304
329
|
/** Maps a file ID to its metadata for debugging purposes. */
|
|
305
330
|
export type DebugFileMap = Record<
|
|
306
331
|
FileId,
|
|
@@ -309,9 +334,50 @@ export type DebugFileMap = Record<
|
|
|
309
334
|
source: string;
|
|
310
335
|
/** The path of the file. */
|
|
311
336
|
path: string;
|
|
337
|
+
/** The range each function occupies in the file. */
|
|
338
|
+
function_locations: FunctionLocation[];
|
|
312
339
|
}
|
|
313
340
|
>;
|
|
314
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Preprocessor for {@link FunctionDebugMetadataSchema} / {@link ContractArtifactSchema} that injects an empty
|
|
344
|
+
* `function_locations` array on any file map entry missing it. Invoked via `z.preprocess(...)` before the strict
|
|
345
|
+
* object schema runs, so legacy inputs do not fail validation.
|
|
346
|
+
*
|
|
347
|
+
* Why this exists on v4-next (and not on `next` / v5):
|
|
348
|
+
*
|
|
349
|
+
* - The Noir submodule on `next` was bumped past nightly-2026-03-19, which added `function_locations` to the
|
|
350
|
+
* debug file map in the Noir `@aztec/noir-types` package and to every freshly-compiled artifact's `file_map`
|
|
351
|
+
* entries. The matching stdlib change (making `DebugFileMap.function_locations` required) was done in one
|
|
352
|
+
* go on `next`, so there `function_locations` is always present both at compile time and at runtime.
|
|
353
|
+
*
|
|
354
|
+
* - On v4-next we had to cherry-pick the Noir bump (chore: Update Noir to nightly-2026-04-10 (#22393)) without
|
|
355
|
+
* re-running the full noir-projects compilation pipeline, so the on-disk contract and protocol-circuit
|
|
356
|
+
* artifacts (e.g. `yarn-project/protocol-contracts/artifacts/AuthRegistry.json`) still carry the pre-update
|
|
357
|
+
* `file_map` shape with only `source` + `path`. Separately, `ivc-integration` compares our `DebugFileMap`
|
|
358
|
+
* against the Noir-types `DebugFileMap`, which *does* require `function_locations`, so we cannot simply make
|
|
359
|
+
* our own field optional — that would break the structural compatibility check.
|
|
360
|
+
*
|
|
361
|
+
* - To satisfy both constraints at once we keep `function_locations` required in the static TypeScript type
|
|
362
|
+
* (so `ivc-integration` keeps compiling) but relax the runtime input shape via this preprocessor (so legacy
|
|
363
|
+
* artifacts keep parsing). Once all v4-next artifacts get regenerated with the new Noir compiler, this
|
|
364
|
+
* helper — and both `z.preprocess(...)` wrappers — can be removed.
|
|
365
|
+
*/
|
|
366
|
+
function fillMissingFunctionLocations(val: unknown): unknown {
|
|
367
|
+
if (val && typeof val === 'object') {
|
|
368
|
+
for (const entry of Object.values(val as Record<string, unknown>)) {
|
|
369
|
+
if (
|
|
370
|
+
entry &&
|
|
371
|
+
typeof entry === 'object' &&
|
|
372
|
+
(entry as { function_locations?: unknown }).function_locations === undefined
|
|
373
|
+
) {
|
|
374
|
+
(entry as { function_locations: FunctionLocation[] }).function_locations = [];
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return val;
|
|
379
|
+
}
|
|
380
|
+
|
|
315
381
|
/** Type representing a field layout in the storage of a contract. */
|
|
316
382
|
export type FieldLayout = {
|
|
317
383
|
/** Slot in which the field is stored. */
|
|
@@ -342,28 +408,44 @@ export interface ContractArtifact {
|
|
|
342
408
|
fileMap: DebugFileMap;
|
|
343
409
|
}
|
|
344
410
|
|
|
345
|
-
export const ContractArtifactSchema
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
411
|
+
export const ContractArtifactSchema = zodFor<ContractArtifact>()(
|
|
412
|
+
z.object({
|
|
413
|
+
name: z.string(),
|
|
414
|
+
functions: z.array(FunctionArtifactSchema),
|
|
415
|
+
nonDispatchPublicFunctions: z.array(FunctionAbiSchema),
|
|
416
|
+
outputs: z.object({
|
|
417
|
+
structs: z.record(z.array(AbiTypeSchema)).transform(structs => {
|
|
418
|
+
for (const [key, value] of Object.entries(structs)) {
|
|
419
|
+
// We are manually ordering events and functions in the abi by path.
|
|
420
|
+
// The path ordering is arbitrary, and only needed to ensure deterministic order.
|
|
421
|
+
// These are the only arrays in the artifact with arbitrary order, and hence the only ones
|
|
422
|
+
// we need to sort.
|
|
423
|
+
if (key === 'events' || key === 'functions') {
|
|
424
|
+
structs[key] = (value as StructType[]).sort((a, b) => (a.path > b.path ? -1 : 1));
|
|
425
|
+
}
|
|
358
426
|
}
|
|
359
|
-
|
|
360
|
-
|
|
427
|
+
return structs;
|
|
428
|
+
}),
|
|
429
|
+
globals: z.record(z.array(AbiValueSchema)),
|
|
361
430
|
}),
|
|
362
|
-
|
|
431
|
+
storageLayout: z.record(z.object({ slot: schemas.Fr })),
|
|
432
|
+
// Legacy v4-next contract artifacts (e.g. `protocol-contracts/artifacts/AuthRegistry.json`) were emitted
|
|
433
|
+
// before Noir started including `function_locations` in their `file_map` entries — see
|
|
434
|
+
// {@link fillMissingFunctionLocations} for the full rationale. The preprocessor injects `[]` for missing
|
|
435
|
+
// entries so parsing succeeds without weakening the static `DebugFileMap` type.
|
|
436
|
+
fileMap: z.preprocess(
|
|
437
|
+
fillMissingFunctionLocations,
|
|
438
|
+
z.record(
|
|
439
|
+
z.coerce.number(),
|
|
440
|
+
z.object({
|
|
441
|
+
source: z.string(),
|
|
442
|
+
path: z.string(),
|
|
443
|
+
function_locations: z.array(z.object({ start: z.number(), name: z.string() })),
|
|
444
|
+
}),
|
|
445
|
+
),
|
|
446
|
+
),
|
|
363
447
|
}),
|
|
364
|
-
|
|
365
|
-
fileMap: z.record(z.coerce.number(), z.object({ source: z.string(), path: z.string() })),
|
|
366
|
-
});
|
|
448
|
+
);
|
|
367
449
|
|
|
368
450
|
export function getFunctionArtifactByName(artifact: ContractArtifact, functionName: string): FunctionArtifact {
|
|
369
451
|
const functionArtifact = artifact.functions.find(f => f.name === functionName);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fromHex, toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
2
|
-
import { poseidon2HashBytes
|
|
3
|
-
import
|
|
2
|
+
import { poseidon2HashBytes } from '@aztec/foundation/crypto/poseidon';
|
|
3
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
5
|
import { hexSchemaFor } from '@aztec/foundation/schemas';
|
|
5
6
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
6
7
|
|
package/src/abi/buffer.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
|
|
3
3
|
import chunk from 'lodash.chunk';
|
|
4
4
|
|
|
@@ -26,11 +26,32 @@ export function bufferAsFields(input: Buffer, targetLength: number): Fr[] {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Recovers a buffer from an array of fields.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* Recovers a buffer from an array of fields previously encoded with bufferAsFields.
|
|
30
|
+
*
|
|
31
|
+
* The first field encodes the byte length of the original buffer. The remaining fields
|
|
32
|
+
* each carry 31 bytes of payload (the leading byte of each 32-byte field element is skipped).
|
|
33
|
+
*
|
|
34
|
+
* If the declared byte length exceeds the bytes available from the payload fields, the result
|
|
35
|
+
* is zero-padded to the full declared length. This is important for correctness when the field
|
|
36
|
+
* array has been truncated (e.g. contract class logs reconstructed from blobs using a short
|
|
37
|
+
* emittedLength): without padding, the resulting buffer would be shorter than declared, causing
|
|
38
|
+
* bytecode commitment computations to diverge from what the circuit produced.
|
|
39
|
+
*
|
|
40
|
+
* @param fields - An output from bufferAsFields: [byteLength, ...payloadFields].
|
|
41
|
+
* @returns A buffer of exactly `byteLength` bytes.
|
|
32
42
|
*/
|
|
33
43
|
export function bufferFromFields(fields: Fr[]): Buffer {
|
|
34
44
|
const [length, ...payload] = fields;
|
|
35
|
-
|
|
45
|
+
const byteLength = length.toNumber();
|
|
46
|
+
const raw = Buffer.concat(payload.map(f => f.toBuffer().subarray(1)));
|
|
47
|
+
if (raw.length >= byteLength) {
|
|
48
|
+
return raw.subarray(0, byteLength);
|
|
49
|
+
}
|
|
50
|
+
// Pad with zeros if the declared length exceeds the available payload bytes.
|
|
51
|
+
// This ensures the returned buffer always matches the declared length, so that
|
|
52
|
+
// downstream bytecode commitment computations are consistent even when the
|
|
53
|
+
// source field array was truncated (e.g. reconstructed from blob with a short emittedLength).
|
|
54
|
+
const result = Buffer.alloc(byteLength);
|
|
55
|
+
raw.copy(result);
|
|
56
|
+
return result;
|
|
36
57
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc';
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
AZTEC_INITIALIZER_ATTRIBUTE,
|
|
5
|
+
AZTEC_ONLY_SELF_ATTRIBUTE,
|
|
6
|
+
AZTEC_PRIVATE_ATTRIBUTE,
|
|
7
|
+
AZTEC_PUBLIC_ATTRIBUTE,
|
|
8
|
+
AZTEC_UTILITY_ATTRIBUTE,
|
|
9
|
+
AZTEC_VIEW_ATTRIBUTE,
|
|
10
|
+
type NoirCompiledContract,
|
|
11
|
+
} from '../noir/index.js';
|
|
3
12
|
import {
|
|
4
13
|
type ABIParameter,
|
|
5
14
|
type ABIParameterVisibility,
|
|
@@ -14,16 +23,7 @@ import {
|
|
|
14
23
|
type IntegerValue,
|
|
15
24
|
type StructValue,
|
|
16
25
|
type TypedStructFieldValue,
|
|
17
|
-
} from '
|
|
18
|
-
import {
|
|
19
|
-
AZTEC_INITIALIZER_ATTRIBUTE,
|
|
20
|
-
AZTEC_ONLY_SELF_ATTRIBUTE,
|
|
21
|
-
AZTEC_PRIVATE_ATTRIBUTE,
|
|
22
|
-
AZTEC_PUBLIC_ATTRIBUTE,
|
|
23
|
-
AZTEC_UTILITY_ATTRIBUTE,
|
|
24
|
-
AZTEC_VIEW_ATTRIBUTE,
|
|
25
|
-
type NoirCompiledContract,
|
|
26
|
-
} from '../noir/index.js';
|
|
26
|
+
} from './abi.js';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Serializes a contract artifact to a buffer for storage.
|
package/src/abi/decoder.ts
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
3
|
|
|
3
4
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
5
|
+
import type { AbiType } from './abi.js';
|
|
6
|
+
import { FunctionSelector } from './function_selector.js';
|
|
7
|
+
import {
|
|
8
|
+
isAztecAddressStruct,
|
|
9
|
+
isEthAddressStruct,
|
|
10
|
+
isFunctionSelectorStruct,
|
|
11
|
+
isOptionStruct,
|
|
12
|
+
isWrappedFieldStruct,
|
|
13
|
+
parseSignedInt,
|
|
14
|
+
} from './utils.js';
|
|
6
15
|
|
|
7
16
|
/**
|
|
8
17
|
* The type of our decoded ABI.
|
|
9
18
|
*/
|
|
10
|
-
export type AbiDecoded =
|
|
19
|
+
export type AbiDecoded =
|
|
20
|
+
| bigint
|
|
21
|
+
| boolean
|
|
22
|
+
| string
|
|
23
|
+
| AztecAddress
|
|
24
|
+
| EthAddress
|
|
25
|
+
| FunctionSelector
|
|
26
|
+
| Fr
|
|
27
|
+
| AbiDecoded[]
|
|
28
|
+
| { [key: string]: AbiDecoded }
|
|
29
|
+
| undefined;
|
|
11
30
|
|
|
12
31
|
/**
|
|
13
32
|
* Decodes values using a provided ABI.
|
|
@@ -51,6 +70,20 @@ class AbiDecoder {
|
|
|
51
70
|
if (isAztecAddressStruct(abiType)) {
|
|
52
71
|
return new AztecAddress(this.getNextField().toBuffer());
|
|
53
72
|
}
|
|
73
|
+
if (isEthAddressStruct(abiType)) {
|
|
74
|
+
return EthAddress.fromField(this.getNextField());
|
|
75
|
+
}
|
|
76
|
+
if (isFunctionSelectorStruct(abiType)) {
|
|
77
|
+
return FunctionSelector.fromField(this.getNextField());
|
|
78
|
+
}
|
|
79
|
+
if (isWrappedFieldStruct(abiType)) {
|
|
80
|
+
return this.getNextField();
|
|
81
|
+
}
|
|
82
|
+
if (isOptionStruct(abiType)) {
|
|
83
|
+
const isSome = this.decodeNext(abiType.fields[0].type);
|
|
84
|
+
const value = this.decodeNext(abiType.fields[1].type);
|
|
85
|
+
return isSome ? value : undefined;
|
|
86
|
+
}
|
|
54
87
|
|
|
55
88
|
for (const field of abiType.fields) {
|
|
56
89
|
struct[field.name] = this.decodeNext(field.type);
|
|
@@ -111,82 +144,3 @@ class AbiDecoder {
|
|
|
111
144
|
export function decodeFromAbi(typ: AbiType[], buffer: Fr[]) {
|
|
112
145
|
return new AbiDecoder(typ, buffer.slice()).decode();
|
|
113
146
|
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Decodes the signature of a function from the name and parameters.
|
|
117
|
-
*/
|
|
118
|
-
export class FunctionSignatureDecoder {
|
|
119
|
-
private separator: string;
|
|
120
|
-
constructor(
|
|
121
|
-
private name: string,
|
|
122
|
-
private parameters: ABIParameter[],
|
|
123
|
-
private includeNames = false,
|
|
124
|
-
) {
|
|
125
|
-
this.separator = includeNames ? ', ' : ',';
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Decodes a single function parameter type for the function signature.
|
|
130
|
-
* @param param - The parameter type to decode.
|
|
131
|
-
* @returns A string representing the parameter type.
|
|
132
|
-
*/
|
|
133
|
-
private getParameterType(param: AbiType): string {
|
|
134
|
-
switch (param.kind) {
|
|
135
|
-
case 'field':
|
|
136
|
-
return 'Field';
|
|
137
|
-
case 'integer':
|
|
138
|
-
if (param.sign === 'signed') {
|
|
139
|
-
throw new Error('Unsupported type: signed integer');
|
|
140
|
-
}
|
|
141
|
-
return `u${param.width}`;
|
|
142
|
-
case 'boolean':
|
|
143
|
-
return 'bool';
|
|
144
|
-
case 'array':
|
|
145
|
-
return `[${this.getParameterType(param.type)};${param.length}]`;
|
|
146
|
-
case 'string':
|
|
147
|
-
return `str<${param.length}>`;
|
|
148
|
-
case 'struct':
|
|
149
|
-
return `(${param.fields.map(field => `${this.decodeParameter(field)}`).join(this.separator)})`;
|
|
150
|
-
default:
|
|
151
|
-
throw new Error(`Unsupported type: ${param.kind}`);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Decodes a single function parameter for the function signature.
|
|
157
|
-
* @param param - The parameter to decode.
|
|
158
|
-
* @returns A string representing the parameter type and optionally its name.
|
|
159
|
-
*/
|
|
160
|
-
private decodeParameter(param: ABIVariable): string {
|
|
161
|
-
const type = this.getParameterType(param.type);
|
|
162
|
-
return this.includeNames ? `${param.name}: ${type}` : type;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Decodes all the parameters and build the function signature
|
|
167
|
-
* @returns The function signature.
|
|
168
|
-
*/
|
|
169
|
-
public decode(): string {
|
|
170
|
-
return `${this.name}(${this.parameters.map(param => this.decodeParameter(param)).join(this.separator)})`;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Decodes a function signature from the name and parameters.
|
|
176
|
-
* @param name - The name of the function.
|
|
177
|
-
* @param parameters - The parameters of the function.
|
|
178
|
-
* @returns - The function signature.
|
|
179
|
-
*/
|
|
180
|
-
export function decodeFunctionSignature(name: string, parameters: ABIParameter[]) {
|
|
181
|
-
return new FunctionSignatureDecoder(name, parameters).decode();
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Decodes a function signature from the name and parameters including parameter names.
|
|
186
|
-
* @param name - The name of the function.
|
|
187
|
-
* @param parameters - The parameters of the function.
|
|
188
|
-
* @returns - The user-friendly function signature.
|
|
189
|
-
*/
|
|
190
|
-
export function decodeFunctionSignatureWithParameterNames(name: string, parameters: ABIParameter[]) {
|
|
191
|
-
return new FunctionSignatureDecoder(name, parameters, true).decode();
|
|
192
|
-
}
|
package/src/abi/encoder.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
|
|
3
3
|
import type { AbiType, FunctionAbi } from './abi.js';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
isAddressStruct,
|
|
6
|
+
isBoundedVecStruct,
|
|
7
|
+
isFunctionSelectorStruct,
|
|
8
|
+
isOptionStruct,
|
|
9
|
+
isWrappedFieldStruct,
|
|
10
|
+
} from './utils.js';
|
|
5
11
|
|
|
6
12
|
/**
|
|
7
13
|
* Encodes arguments for a function call.
|
|
@@ -43,6 +49,32 @@ class ArgumentEncoder {
|
|
|
43
49
|
* @param name - Name.
|
|
44
50
|
*/
|
|
45
51
|
private encodeArgument(abiType: AbiType, arg: any, name?: string) {
|
|
52
|
+
if (isOptionStruct(abiType)) {
|
|
53
|
+
const optionType = abiType as Extract<AbiType, { kind: 'struct' }>;
|
|
54
|
+
const [isSomeField, valueField] = optionType.fields;
|
|
55
|
+
|
|
56
|
+
if (arg === undefined || arg === null) {
|
|
57
|
+
this.encodeArgument(isSomeField.type, false, `${name}._is_some`);
|
|
58
|
+
this.#encodeDefaultValue(valueField.type);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (typeof arg === 'object' && '_is_some' in arg) {
|
|
63
|
+
this.encodeArgument(isSomeField.type, arg._is_some, `${name}._is_some`);
|
|
64
|
+
|
|
65
|
+
if (arg._is_some) {
|
|
66
|
+
this.encodeArgument(valueField.type, arg._value, `${name}._value`);
|
|
67
|
+
} else {
|
|
68
|
+
this.#encodeDefaultValue(valueField.type);
|
|
69
|
+
}
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
this.encodeArgument(isSomeField.type, true, `${name}._is_some`);
|
|
74
|
+
this.encodeArgument(valueField.type, arg, `${name}._value`);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
46
78
|
if (arg === undefined || arg == null) {
|
|
47
79
|
throw new Error(`Undefined argument ${name ?? 'unnamed'} of type ${abiType.kind}`);
|
|
48
80
|
}
|
|
@@ -123,14 +155,17 @@ class ArgumentEncoder {
|
|
|
123
155
|
}
|
|
124
156
|
break;
|
|
125
157
|
}
|
|
126
|
-
case 'integer':
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
158
|
+
case 'integer': {
|
|
159
|
+
const value = BigInt(arg);
|
|
160
|
+
if (abiType.sign === 'signed' && value < 0n) {
|
|
161
|
+
// Convert negative values to two's complement representation
|
|
162
|
+
const twosComplement = value + (1n << BigInt(abiType.width));
|
|
163
|
+
this.flattened.push(new Fr(twosComplement));
|
|
130
164
|
} else {
|
|
131
|
-
this.flattened.push(new Fr(
|
|
165
|
+
this.flattened.push(new Fr(value));
|
|
132
166
|
}
|
|
133
167
|
break;
|
|
168
|
+
}
|
|
134
169
|
default:
|
|
135
170
|
throw new Error(`Unsupported type: ${abiType.kind}`);
|
|
136
171
|
}
|
|
@@ -224,6 +259,14 @@ class ArgumentEncoder {
|
|
|
224
259
|
this.encodeArgument(lenField.type, arg.length, 'len');
|
|
225
260
|
}
|
|
226
261
|
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Appends the flattened zero value for an ABI type.
|
|
265
|
+
* Option::None still serializes the wrapped value, so we need to zero-fill its footprint.
|
|
266
|
+
*/
|
|
267
|
+
#encodeDefaultValue(abiType: AbiType) {
|
|
268
|
+
this.flattened.push(...new Array(ArgumentEncoder.typeSize(abiType)).fill(Fr.ZERO));
|
|
269
|
+
}
|
|
227
270
|
}
|
|
228
271
|
|
|
229
272
|
/**
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { AbiType } from './abi.js';
|
|
2
2
|
import type { EventSelector } from './event_selector.js';
|
|
3
3
|
|
|
4
|
+
/** Metadata for a contract event, used to decode emitted event logs back into structured data. */
|
|
4
5
|
export type EventMetadataDefinition = {
|
|
5
6
|
eventSelector: EventSelector;
|
|
6
7
|
abiType: AbiType;
|
|
8
|
+
/** Names of the event's struct members (not serialized Noir Field elements). */
|
|
7
9
|
fieldNames: string[];
|
|
8
10
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { fromHex, toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
2
|
-
import { poseidon2HashBytes
|
|
3
|
-
import
|
|
2
|
+
import { poseidon2HashBytes } from '@aztec/foundation/crypto/poseidon';
|
|
3
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
5
|
import { hexSchemaFor } from '@aztec/foundation/schemas';
|
|
5
6
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
6
7
|
|
package/src/abi/function_call.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/
|
|
1
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import type { FieldsOf } from '@aztec/foundation/types';
|
|
3
3
|
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
4
6
|
import { AztecAddress } from '../aztec-address/index.js';
|
|
5
|
-
import {
|
|
7
|
+
import { schemas } from '../schemas/index.js';
|
|
8
|
+
import { type AbiType, AbiTypeSchema, FunctionType } from './abi.js';
|
|
6
9
|
import { FunctionSelector } from './function_selector.js';
|
|
7
10
|
|
|
8
11
|
/** A request to call a function on a contract. */
|
|
@@ -43,12 +46,31 @@ export class FunctionCall {
|
|
|
43
46
|
return new FunctionCall(...FunctionCall.getFields(fields));
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
static get schema() {
|
|
50
|
+
return z
|
|
51
|
+
.object({
|
|
52
|
+
name: z.string(),
|
|
53
|
+
to: schemas.AztecAddress,
|
|
54
|
+
selector: schemas.FunctionSelector,
|
|
55
|
+
type: z.nativeEnum(FunctionType),
|
|
56
|
+
isStatic: z.boolean(),
|
|
57
|
+
hideMsgSender: z.boolean(),
|
|
58
|
+
args: z.array(schemas.Fr),
|
|
59
|
+
returnTypes: z.array(AbiTypeSchema),
|
|
60
|
+
})
|
|
61
|
+
.transform(FunctionCall.from);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public isPublicStatic(): boolean {
|
|
65
|
+
return this.type === FunctionType.PUBLIC && this.isStatic;
|
|
66
|
+
}
|
|
67
|
+
|
|
46
68
|
/**
|
|
47
69
|
* Creates an empty function call.
|
|
48
70
|
* @returns an empty function call.
|
|
49
71
|
*/
|
|
50
72
|
public static empty() {
|
|
51
|
-
return {
|
|
73
|
+
return FunctionCall.from({
|
|
52
74
|
name: '',
|
|
53
75
|
to: AztecAddress.ZERO,
|
|
54
76
|
selector: FunctionSelector.empty(),
|
|
@@ -57,6 +79,6 @@ export class FunctionCall {
|
|
|
57
79
|
isStatic: false,
|
|
58
80
|
args: [],
|
|
59
81
|
returnTypes: [],
|
|
60
|
-
};
|
|
82
|
+
});
|
|
61
83
|
}
|
|
62
84
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { fromHex, toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
2
|
-
import { poseidon2HashBytes
|
|
3
|
-
import
|
|
2
|
+
import { poseidon2HashBytes } from '@aztec/foundation/crypto/poseidon';
|
|
3
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
|
+
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
5
|
import { type ZodFor, hexSchemaFor } from '@aztec/foundation/schemas';
|
|
5
6
|
import { BufferReader, FieldReader, TypeRegistry } from '@aztec/foundation/serialize';
|
|
6
7
|
|
|
7
8
|
import type { ABIParameter } from './abi.js';
|
|
8
|
-
import { decodeFunctionSignature } from './
|
|
9
|
+
import { decodeFunctionSignature } from './function_signature_decoder.js';
|
|
9
10
|
import { Selector } from './selector.js';
|
|
10
11
|
|
|
11
12
|
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
|
@@ -38,6 +39,14 @@ export class FunctionSelector extends Selector {
|
|
|
38
39
|
return new FunctionSelector(Number(fr.toBigInt()));
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
static fromFieldOrUndefined(fr: Fr) {
|
|
43
|
+
try {
|
|
44
|
+
return FunctionSelector.fromField(fr);
|
|
45
|
+
} catch {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
static fromFields(fields: Fr[] | FieldReader) {
|
|
42
51
|
const reader = FieldReader.asReader(fields);
|
|
43
52
|
return FunctionSelector.fromField(reader.readField());
|