@aztec/stdlib 0.0.1-commit.b655e406 → 0.0.1-commit.d3ec352c
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 +92 -107
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +2 -2
- package/dest/abi/authorization_selector.d.ts +1 -1
- package/dest/abi/authorization_selector.d.ts.map +1 -1
- package/dest/abi/buffer.d.ts +1 -1
- package/dest/abi/contract_artifact.d.ts +1 -1
- package/dest/abi/contract_artifact.js +3 -3
- package/dest/abi/decoder.d.ts +1 -1
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/encoder.d.ts +1 -1
- package/dest/abi/event_metadata_definition.d.ts +1 -1
- package/dest/abi/event_selector.d.ts +1 -1
- package/dest/abi/event_selector.d.ts.map +1 -1
- package/dest/abi/function_call.d.ts +1 -9
- package/dest/abi/function_call.d.ts.map +1 -1
- package/dest/abi/function_selector.d.ts +1 -1
- package/dest/abi/function_selector.d.ts.map +1 -1
- package/dest/abi/index.d.ts +1 -1
- package/dest/abi/mocked_keys.d.ts +1 -1
- package/dest/abi/note_selector.d.ts +1 -1
- package/dest/abi/note_selector.d.ts.map +1 -1
- package/dest/abi/selector.d.ts +1 -1
- package/dest/abi/selector.d.ts.map +1 -1
- package/dest/abi/utils.d.ts +1 -1
- package/dest/auth_witness/auth_witness.d.ts +1 -2
- package/dest/auth_witness/auth_witness.d.ts.map +1 -1
- package/dest/auth_witness/index.d.ts +1 -1
- package/dest/avm/avm.d.ts +4356 -2061
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +529 -16
- package/dest/avm/avm_accumulated_data.d.ts +25 -36
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +18 -0
- package/dest/avm/avm_circuit_public_inputs.d.ts +160 -148
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.js +9 -0
- package/dest/avm/avm_proving_request.d.ts +2031 -1507
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/avm/contract_storage_read.d.ts +1 -13
- package/dest/avm/contract_storage_read.d.ts.map +1 -1
- package/dest/avm/contract_storage_update_request.d.ts +1 -13
- package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
- package/dest/avm/index.d.ts +1 -1
- package/dest/avm/message_pack.d.ts +2 -2
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +3 -0
- package/dest/avm/public_call_stack_item_compressed.d.ts +1 -3
- package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
- package/dest/avm/public_data_read.d.ts +1 -10
- package/dest/avm/public_data_read.d.ts.map +1 -1
- package/dest/avm/public_data_update_request.d.ts +1 -10
- package/dest/avm/public_data_update_request.d.ts.map +1 -1
- package/dest/avm/public_data_write.d.ts +13 -11
- package/dest/avm/public_data_write.d.ts.map +1 -1
- package/dest/avm/public_data_write.js +9 -0
- package/dest/avm/public_inner_call_request.d.ts +1 -4
- package/dest/avm/public_inner_call_request.d.ts.map +1 -1
- package/dest/avm/revert_code.d.ts +16 -7
- package/dest/avm/revert_code.d.ts.map +1 -1
- package/dest/avm/revert_code.js +24 -8
- package/dest/aztec-address/index.d.ts +10 -1
- package/dest/aztec-address/index.d.ts.map +1 -1
- package/dest/aztec-address/index.js +24 -2
- package/dest/block/attestation_info.d.ts +3 -1
- package/dest/block/attestation_info.d.ts.map +1 -1
- package/dest/block/attestation_info.js +4 -1
- package/dest/block/block_hash.d.ts +1 -1
- package/dest/block/block_hash.d.ts.map +1 -1
- package/dest/block/block_parameter.d.ts +5 -0
- package/dest/block/block_parameter.d.ts.map +1 -0
- package/dest/block/block_parameter.js +6 -0
- package/dest/block/body.d.ts +8 -8
- package/dest/block/body.d.ts.map +1 -1
- package/dest/block/body.js +11 -27
- package/dest/block/in_block.d.ts +14 -19
- package/dest/block/in_block.d.ts.map +1 -1
- package/dest/block/in_block.js +3 -3
- package/dest/block/index.d.ts +3 -2
- package/dest/block/index.d.ts.map +1 -1
- package/dest/block/index.js +2 -1
- package/dest/block/l2_block.d.ts +18 -10
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +56 -5
- package/dest/block/l2_block_code_to_purge.d.ts +1 -1
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +6 -5
- package/dest/block/l2_block_header.d.ts +12 -14
- package/dest/block/l2_block_header.d.ts.map +1 -1
- package/dest/block/l2_block_header.js +18 -11
- package/dest/block/l2_block_info.d.ts +21 -16
- package/dest/block/l2_block_info.d.ts.map +1 -1
- package/dest/block/l2_block_info.js +7 -6
- package/dest/block/l2_block_new.d.ts +110 -0
- package/dest/block/l2_block_new.d.ts.map +1 -0
- package/dest/block/l2_block_new.js +138 -0
- package/dest/block/l2_block_source.d.ts +71 -104
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +5 -11
- package/dest/block/l2_block_stream/index.d.ts +1 -1
- package/dest/block/l2_block_stream/interfaces.d.ts +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.d.ts +1 -6
- package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
- package/dest/block/l2_block_stream/l2_block_stream.js +4 -3
- package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -2
- 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 +4 -2
- package/dest/block/proposal/attestations_and_signers.d.ts +16 -5
- package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
- package/dest/block/proposal/attestations_and_signers.js +14 -0
- package/dest/block/proposal/committee_attestation.d.ts +1 -1
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/proposal/index.d.ts +1 -1
- package/dest/block/published_l2_block.d.ts +15 -28
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +12 -27
- package/dest/block/test/index.d.ts +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 +6 -4
- package/dest/block/validate_block_result.d.ts +6 -178
- package/dest/block/validate_block_result.d.ts.map +1 -1
- package/dest/block/validate_block_result.js +4 -3
- package/dest/checkpoint/checkpoint.d.ts +124 -0
- package/dest/checkpoint/checkpoint.d.ts.map +1 -0
- package/dest/checkpoint/checkpoint.js +62 -0
- package/dest/checkpoint/index.d.ts +3 -2
- package/dest/checkpoint/index.d.ts.map +1 -1
- package/dest/checkpoint/index.js +2 -1
- package/dest/checkpoint/published_checkpoint.d.ts +214 -0
- package/dest/checkpoint/published_checkpoint.d.ts.map +1 -0
- package/dest/checkpoint/published_checkpoint.js +71 -0
- package/dest/config/chain-config.d.ts +1 -1
- package/dest/config/index.d.ts +1 -1
- package/dest/config/node-rpc-config.d.ts +1 -1
- package/dest/contract/artifact_hash.d.ts +2 -2
- package/dest/contract/artifact_hash.d.ts.map +1 -1
- package/dest/contract/complete_address.d.ts +1 -4
- package/dest/contract/complete_address.d.ts.map +1 -1
- package/dest/contract/contract_address.d.ts +1 -1
- package/dest/contract/contract_class.d.ts +1 -1
- package/dest/contract/contract_class_id.d.ts +1 -1
- package/dest/contract/contract_class_metadata.d.ts +1 -1
- package/dest/contract/contract_deployment_data.d.ts +119 -0
- package/dest/contract/contract_deployment_data.d.ts.map +1 -0
- package/dest/contract/contract_deployment_data.js +99 -0
- package/dest/contract/contract_function_dao.d.ts +1 -1
- package/dest/contract/contract_instance.d.ts +1 -1
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance_update.d.ts +1 -1
- package/dest/contract/contract_instance_update.d.ts.map +1 -1
- package/dest/contract/contract_metadata.d.ts +1 -1
- package/dest/contract/deployment_info.d.ts +1 -1
- package/dest/contract/index.d.ts +2 -1
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +1 -0
- package/dest/contract/interfaces/contract_class.d.ts +41 -122
- package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_data_source.d.ts +3 -2
- package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance.d.ts +11 -11
- package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
- package/dest/contract/interfaces/contract_instance_update.d.ts +3 -3
- package/dest/contract/interfaces/index.d.ts +1 -1
- package/dest/contract/interfaces/node-info.d.ts +1 -1
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts +1 -1
- package/dest/contract/partial_address.d.ts +1 -1
- package/dest/contract/private_function.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.d.ts +2 -2
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/contract/utility_function_membership_proof.d.ts +1 -1
- package/dest/database-version/index.d.ts +1 -1
- package/dest/database-version/version_manager.d.ts +6 -8
- package/dest/database-version/version_manager.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
- package/dest/delayed_public_mutable/index.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts.map +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts +1 -1
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
- package/dest/epoch-helpers/index.d.ts +12 -11
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +10 -9
- package/dest/errors/index.d.ts +1 -1
- 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 +1 -1
- package/dest/errors/simulation_error.d.ts.map +1 -1
- package/dest/fees/index.d.ts +1 -1
- package/dest/fees/transaction_fee.d.ts +1 -1
- package/dest/file-store/factory.d.ts +1 -1
- package/dest/file-store/gcs.d.ts +1 -1
- package/dest/file-store/gcs.d.ts.map +1 -1
- package/dest/file-store/http.d.ts +1 -1
- package/dest/file-store/http.d.ts.map +1 -1
- package/dest/file-store/http.js +8 -3
- package/dest/file-store/index.d.ts +1 -1
- package/dest/file-store/interface.d.ts +1 -1
- package/dest/file-store/local.d.ts +1 -1
- package/dest/file-store/local.d.ts.map +1 -1
- 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 +3 -7
- package/dest/gas/gas.d.ts +9 -1
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +12 -0
- package/dest/gas/gas_fees.d.ts +9 -1
- package/dest/gas/gas_fees.d.ts.map +1 -1
- package/dest/gas/gas_fees.js +12 -0
- package/dest/gas/gas_settings.d.ts +9 -1
- package/dest/gas/gas_settings.d.ts.map +1 -1
- package/dest/gas/gas_settings.js +12 -0
- package/dest/gas/gas_used.d.ts +13 -2
- package/dest/gas/gas_used.d.ts.map +1 -1
- package/dest/gas/gas_used.js +19 -1
- package/dest/gas/index.d.ts +1 -1
- package/dest/hash/hash.d.ts +11 -3
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +11 -1
- package/dest/hash/index.d.ts +1 -1
- package/dest/hash/map_slot.d.ts +1 -1
- package/dest/interfaces/allowed_element.d.ts +5 -5
- package/dest/interfaces/api_limit.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts +6 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +22 -14
- package/dest/interfaces/aztec-node-admin.d.ts +92 -85
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.d.ts +30 -24
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +26 -24
- package/dest/interfaces/block-builder.d.ts +3 -2
- package/dest/interfaces/block-builder.d.ts.map +1 -1
- package/dest/interfaces/client.d.ts +1 -1
- package/dest/interfaces/configs.d.ts +31 -21
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +3 -1
- package/dest/interfaces/epoch-prover.d.ts +7 -7
- package/dest/interfaces/epoch-prover.d.ts.map +1 -1
- package/dest/interfaces/get_logs_response.d.ts +6 -4
- package/dest/interfaces/get_logs_response.d.ts.map +1 -1
- package/dest/interfaces/l2_logs_source.d.ts +4 -3
- package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +5 -4
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/p2p-bootstrap.d.ts +1 -1
- package/dest/interfaces/p2p.d.ts +3 -2
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -1
- package/dest/interfaces/private_kernel_prover.d.ts +1 -1
- package/dest/interfaces/processed-tx-handler.d.ts +1 -1
- package/dest/interfaces/prover-agent.d.ts +1 -1
- package/dest/interfaces/prover-broker.d.ts +1 -1
- package/dest/interfaces/prover-client.d.ts +5 -5
- package/dest/interfaces/prover-client.d.ts.map +1 -1
- package/dest/interfaces/prover-coordination.d.ts +1 -1
- package/dest/interfaces/prover-node.d.ts +1 -1
- package/dest/interfaces/proving-job-source.d.ts +1 -1
- package/dest/interfaces/proving-job.d.ts +1680 -1163
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/proving-job.js +3 -2
- package/dest/interfaces/public_state_source.d.ts +1 -1
- package/dest/interfaces/server.d.ts +1 -1
- package/dest/interfaces/server_circuit_prover.d.ts +2 -3
- package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
- package/dest/interfaces/service.d.ts +1 -1
- package/dest/interfaces/slasher.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts +3 -3
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +27 -19
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/interfaces/world_state.d.ts +9 -26
- 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 +1 -1
- package/dest/kernel/claimed_length_array.d.ts.map +1 -1
- package/dest/kernel/hiding_kernel_private_inputs.d.ts +1 -1
- package/dest/kernel/hiding_kernel_private_inputs.d.ts.map +1 -1
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/build_transient_data_hints.d.ts +2 -2
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +2 -2
- package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/hints/index.d.ts +1 -1
- package/dest/kernel/hints/key_validation_hint.d.ts +1 -2
- package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request.d.ts +1 -2
- package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts +1 -6
- package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +2 -24
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.js +4 -9
- package/dest/kernel/hints/read_request.d.ts +1 -7
- package/dest/kernel/hints/read_request.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.d.ts +1 -7
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts +1 -1
- package/dest/kernel/hints/scoped_key_validation_request_and_generator.d.ts.map +1 -1
- package/dest/kernel/hints/scoped_value_cache.d.ts +1 -1
- package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts +1 -1
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts +1 -1
- package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
- package/dest/kernel/index.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts +1 -1
- package/dest/kernel/log_hash.d.ts.map +1 -1
- package/dest/kernel/note_hash.d.ts +1 -1
- package/dest/kernel/note_hash.d.ts.map +1 -1
- package/dest/kernel/nullifier.d.ts +1 -1
- package/dest/kernel/nullifier.d.ts.map +1 -1
- package/dest/kernel/padded_side_effects.d.ts +1 -1
- package/dest/kernel/padded_side_effects.d.ts.map +1 -1
- package/dest/kernel/private_accumulated_data.d.ts +1 -23
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +1 -25
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_request.d.ts +1 -16
- package/dest/kernel/private_call_request.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.d.ts +17 -74
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +17 -5
- package/dest/kernel/private_context_inputs.d.ts +1 -1
- package/dest/kernel/private_context_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -29
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_circuit_public_inputs.js +8 -4
- package/dest/kernel/private_kernel_data.d.ts +1 -7
- package/dest/kernel/private_kernel_data.d.ts.map +1 -1
- package/dest/kernel/private_kernel_data.js +0 -2
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +7 -20
- package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_init_circuit_private_inputs.js +7 -3
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +1 -7
- package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_prover_output.d.ts +10 -10
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +1 -4
- package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.d.ts +1 -1
- package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
- package/dest/kernel/private_kernel_simulated_output.d.ts +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +1 -10
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +1 -23
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_log_data.d.ts +1 -1
- package/dest/kernel/private_log_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +17 -1
- package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.js +18 -0
- package/dest/kernel/private_to_public_accumulated_data.d.ts +1 -1
- package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +1 -1
- package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +1 -1
- package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts +1 -17
- package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +1 -16
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.d.ts +2 -24
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +5 -13
- package/dest/kernel/public_call_request.d.ts +22 -27
- package/dest/kernel/public_call_request.d.ts.map +1 -1
- package/dest/kernel/public_call_request.js +18 -0
- package/dest/kernel/utils/index.d.ts +1 -1
- package/dest/kernel/utils/interfaces.d.ts +1 -1
- package/dest/kernel/utils/optional_number.d.ts +1 -7
- package/dest/kernel/utils/optional_number.d.ts.map +1 -1
- package/dest/kernel/utils/order_and_comparison.d.ts +1 -1
- package/dest/keys/derivation.d.ts +1 -1
- package/dest/keys/index.d.ts +1 -1
- package/dest/keys/key_types.d.ts +1 -1
- package/dest/keys/public_key.d.ts +1 -1
- package/dest/keys/public_keys.d.ts +9 -5
- package/dest/keys/public_keys.d.ts.map +1 -1
- package/dest/keys/public_keys.js +12 -0
- package/dest/keys/utils.d.ts +1 -1
- package/dest/l1-contracts/index.d.ts +1 -1
- package/dest/l1-contracts/slash_factory.d.ts +3 -3
- package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
- package/dest/logs/contract_class_log.d.ts +20 -4
- package/dest/logs/contract_class_log.d.ts.map +1 -1
- package/dest/logs/contract_class_log.js +24 -0
- package/dest/logs/debug_log.d.ts +10 -2
- package/dest/logs/debug_log.d.ts.map +1 -1
- package/dest/logs/debug_log.js +13 -0
- package/dest/logs/directional_app_tagging_secret.d.ts +1 -1
- package/dest/logs/directional_app_tagging_secret.d.ts.map +1 -1
- package/dest/logs/extended_contract_class_log.d.ts +1 -3
- package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
- package/dest/logs/extended_public_log.d.ts +7 -7
- package/dest/logs/extended_public_log.d.ts.map +1 -1
- package/dest/logs/index.d.ts +1 -1
- package/dest/logs/log_filter.d.ts +1 -1
- package/dest/logs/log_id.d.ts +8 -8
- package/dest/logs/log_id.d.ts.map +1 -1
- package/dest/logs/log_id.js +5 -4
- package/dest/logs/log_with_tx_data.d.ts +1 -1
- package/dest/logs/log_with_tx_data.d.ts.map +1 -1
- package/dest/logs/message_context.d.ts +1 -1
- package/dest/logs/message_context.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.d.ts +1 -1
- package/dest/logs/pending_tagged_log.d.ts.map +1 -1
- package/dest/logs/pre_tag.d.ts +1 -1
- package/dest/logs/private_log.d.ts +10 -2
- package/dest/logs/private_log.d.ts.map +1 -1
- package/dest/logs/private_log.js +14 -5
- package/dest/logs/public_log.d.ts +9 -1
- package/dest/logs/public_log.d.ts.map +1 -1
- package/dest/logs/public_log.js +9 -0
- package/dest/logs/shared_secret_derivation.d.ts +1 -1
- package/dest/logs/tx_scoped_l2_log.d.ts +14 -11
- package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
- package/dest/logs/tx_scoped_l2_log.js +4 -3
- package/dest/messaging/in_hash.d.ts +4 -0
- package/dest/messaging/in_hash.d.ts.map +1 -0
- package/dest/messaging/in_hash.js +8 -0
- package/dest/messaging/inbox_leaf.d.ts +1 -3
- package/dest/messaging/inbox_leaf.d.ts.map +1 -1
- package/dest/messaging/index.d.ts +3 -1
- package/dest/messaging/index.d.ts.map +1 -1
- package/dest/messaging/index.js +2 -0
- package/dest/messaging/l1_actor.d.ts +1 -7
- package/dest/messaging/l1_actor.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message.d.ts +1 -6
- package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
- package/dest/messaging/l1_to_l2_message_source.d.ts +10 -3
- package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
- package/dest/messaging/l2_actor.d.ts +1 -7
- package/dest/messaging/l2_actor.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +4 -3
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +2 -2
- package/dest/messaging/l2_to_l1_message.d.ts +17 -1
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +18 -0
- package/dest/messaging/out_hash.d.ts +5 -0
- package/dest/messaging/out_hash.d.ts.map +1 -0
- package/dest/messaging/out_hash.js +28 -0
- package/dest/noir/index.d.ts +7 -7
- package/dest/noir/index.d.ts.map +1 -1
- package/dest/noir/index.js +6 -6
- package/dest/note/comparator.d.ts +1 -1
- package/dest/note/index.d.ts +2 -2
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +1 -1
- package/dest/note/note.d.ts +2 -17
- package/dest/note/note.d.ts.map +1 -1
- package/dest/note/note_dao.d.ts +75 -0
- package/dest/note/note_dao.d.ts.map +1 -0
- package/dest/note/note_dao.js +106 -0
- package/dest/note/note_status.d.ts +1 -1
- package/dest/note/notes_filter.d.ts +3 -1
- package/dest/note/notes_filter.d.ts.map +1 -1
- package/dest/note/notes_filter.js +1 -0
- package/dest/p2p/attestation_utils.d.ts +1 -1
- package/dest/p2p/block_attestation.d.ts +5 -12
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +3 -6
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +1 -1
- package/dest/p2p/client_type.d.ts +1 -1
- package/dest/p2p/consensus_payload.d.ts +10 -188
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +16 -23
- package/dest/p2p/gossipable.d.ts +6 -5
- package/dest/p2p/gossipable.d.ts.map +1 -1
- package/dest/p2p/gossipable.js +16 -10
- package/dest/p2p/index.d.ts +1 -1
- package/dest/p2p/interface.d.ts +1 -1
- package/dest/p2p/message_validator.d.ts +1 -1
- package/dest/p2p/peer_error.d.ts +1 -1
- package/dest/p2p/signature_utils.d.ts +1 -1
- package/dest/p2p/topic_type.d.ts +1 -1
- package/dest/parity/index.d.ts +1 -1
- package/dest/parity/parity_base_private_inputs.d.ts +1 -3
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_public_inputs.d.ts +1 -4
- package/dest/parity/parity_public_inputs.d.ts.map +1 -1
- package/dest/parity/parity_root_private_inputs.d.ts +1 -2
- package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
- package/dest/proofs/chonk_proof.d.ts +1 -1
- package/dest/proofs/chonk_proof.d.ts.map +1 -1
- package/dest/proofs/index.d.ts +1 -1
- package/dest/proofs/proof.d.ts +1 -4
- package/dest/proofs/proof.d.ts.map +1 -1
- package/dest/proofs/proof_data.d.ts +1 -1
- package/dest/proofs/proof_data.d.ts.map +1 -1
- package/dest/proofs/proving_request_type.d.ts +1 -1
- package/dest/proofs/recursive_proof.d.ts +2 -26
- package/dest/proofs/recursive_proof.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.d.ts +1 -1
- package/dest/rollup/base_rollup_hints.d.ts +1 -34
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.d.ts +1 -12
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_headers_hash.d.ts +4 -0
- package/dest/rollup/block_headers_hash.d.ts.map +1 -0
- package/dest/rollup/block_headers_hash.js +9 -0
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.d.ts +8 -40
- package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/block_rollup_public_inputs.js +8 -2
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +2 -76
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +1 -9
- package/dest/rollup/checkpoint_constant_data.d.ts +26 -13
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +27 -3
- package/dest/rollup/checkpoint_header.d.ts +16 -14
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +40 -13
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +1 -25
- package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -29
- package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/checkpoint_root_rollup_private_inputs.js +4 -4
- package/dest/rollup/epoch_constant_data.d.ts +1 -16
- package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
- package/dest/rollup/index.d.ts +2 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -0
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +1 -1
- package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +1 -1
- package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +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/root_rollup_private_inputs.d.ts +1 -6
- package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/root_rollup_public_inputs.d.ts +1 -3
- package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tree_snapshot_diff_hints.d.ts +1 -24
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +1 -4
- package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.d.ts +1 -29
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/schemas/index.d.ts +1 -1
- package/dest/schemas/schemas.d.ts +86 -15
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +12 -1
- package/dest/slashing/empire.d.ts +1 -1
- package/dest/slashing/empire.d.ts.map +1 -1
- package/dest/slashing/empire.js +5 -4
- package/dest/slashing/helpers.d.ts +7 -6
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +8 -6
- package/dest/slashing/index.d.ts +1 -1
- package/dest/slashing/interfaces.d.ts +3 -2
- package/dest/slashing/interfaces.d.ts.map +1 -1
- package/dest/slashing/serialization.d.ts +1 -1
- package/dest/slashing/tally.d.ts +1 -1
- package/dest/slashing/types.d.ts +10 -10
- package/dest/snapshots/download.d.ts +1 -1
- package/dest/snapshots/index.d.ts +1 -1
- package/dest/snapshots/types.d.ts +18 -18
- package/dest/snapshots/upload.d.ts +1 -1
- package/dest/stats/index.d.ts +1 -1
- package/dest/stats/stats.d.ts +1 -1
- package/dest/tests/factories.d.ts +34 -29
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +76 -151
- package/dest/tests/fixtures.d.ts +1 -1
- package/dest/tests/index.d.ts +1 -1
- package/dest/tests/jest.d.ts +1 -1
- package/dest/tests/mocks.d.ts +54 -23
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +135 -34
- package/dest/trees/append_only_tree_snapshot.d.ts +9 -16
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +9 -9
- package/dest/trees/database_public_state_source.d.ts +1 -1
- package/dest/trees/database_public_state_source.d.ts.map +1 -1
- package/dest/trees/index.d.ts +1 -1
- package/dest/trees/merkle_tree_id.d.ts +5 -5
- package/dest/trees/merkle_tree_id.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.d.ts +17 -13
- package/dest/trees/nullifier_leaf.d.ts.map +1 -1
- package/dest/trees/nullifier_leaf.js +24 -0
- package/dest/trees/nullifier_membership_witness.d.ts +4 -37
- package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.d.ts +28 -27
- package/dest/trees/public_data_leaf.d.ts.map +1 -1
- package/dest/trees/public_data_leaf.js +24 -0
- package/dest/trees/public_data_witness.d.ts +11 -45
- package/dest/trees/public_data_witness.d.ts.map +1 -1
- package/dest/tx/block_header.d.ts +7 -14
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +13 -2
- package/dest/tx/call_context.d.ts +6 -18
- package/dest/tx/call_context.d.ts.map +1 -1
- package/dest/tx/capsule.d.ts +1 -4
- package/dest/tx/capsule.d.ts.map +1 -1
- package/dest/tx/content_commitment.d.ts +3 -2
- package/dest/tx/content_commitment.d.ts.map +1 -1
- package/dest/tx/content_commitment.js +10 -2
- package/dest/tx/execution_payload.d.ts +37 -0
- package/dest/tx/execution_payload.d.ts.map +1 -0
- package/dest/tx/execution_payload.js +40 -0
- package/dest/tx/function_data.d.ts +4 -6
- package/dest/tx/function_data.d.ts.map +1 -1
- package/dest/tx/global_variable_builder.d.ts +3 -2
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +52 -31
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +50 -10
- package/dest/tx/hashed_values.d.ts +1 -7
- package/dest/tx/hashed_values.d.ts.map +1 -1
- package/dest/tx/index.d.ts +2 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- package/dest/tx/indexed_tx_effect.d.ts +9 -6
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
- package/dest/tx/indexed_tx_effect.js +5 -2
- package/dest/tx/offchain_effect.d.ts +1 -1
- package/dest/tx/partial_state_reference.d.ts +4 -7
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +10 -10
- package/dest/tx/private_execution_result.d.ts +16 -51
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +6 -3
- package/dest/tx/private_tx_constant_data.d.ts +1 -16
- package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
- package/dest/tx/processed_tx.d.ts +2 -2
- package/dest/tx/processed_tx.d.ts.map +1 -1
- package/dest/tx/processed_tx.js +4 -1
- package/dest/tx/profiling.d.ts +38 -38
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +5 -4
- package/dest/tx/protocol_contracts.d.ts +10 -2
- package/dest/tx/protocol_contracts.d.ts.map +1 -1
- package/dest/tx/protocol_contracts.js +9 -0
- package/dest/tx/proven_tx.d.ts +18 -18
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.d.ts +9 -7
- package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
- package/dest/tx/public_call_request_with_calldata.js +12 -0
- package/dest/tx/public_simulation_output.d.ts +3 -1
- package/dest/tx/public_simulation_output.d.ts.map +1 -1
- package/dest/tx/public_simulation_output.js +8 -1
- package/dest/tx/simulated_tx.d.ts +21 -21
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/state_reference.d.ts +10 -12
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +9 -9
- package/dest/tx/tree_snapshots.d.ts +15 -7
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/tx/tree_snapshots.js +9 -0
- package/dest/tx/tx.d.ts +4 -18
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +6 -4
- package/dest/tx/tx_constant_data.d.ts +1 -1
- package/dest/tx/tx_constant_data.d.ts.map +1 -1
- package/dest/tx/tx_context.d.ts +1 -2
- package/dest/tx/tx_context.d.ts.map +1 -1
- package/dest/tx/tx_effect.d.ts +20 -42
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +54 -59
- package/dest/tx/tx_execution_request.d.ts +1 -30
- package/dest/tx/tx_execution_request.d.ts.map +1 -1
- package/dest/tx/tx_hash.d.ts +1 -2
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_receipt.d.ts +4 -9
- package/dest/tx/tx_receipt.d.ts.map +1 -1
- package/dest/tx/tx_receipt.js +2 -1
- package/dest/tx/tx_request.d.ts +1 -6
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/validator/empty_validator.d.ts +1 -1
- 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/tx_validator.d.ts +5 -5
- package/dest/types/index.d.ts +1 -1
- package/dest/types/shared.d.ts +1 -4
- package/dest/types/shared.d.ts.map +1 -1
- package/dest/update-checker/index.d.ts +1 -1
- package/dest/update-checker/update-checker.d.ts +2 -3
- package/dest/update-checker/update-checker.d.ts.map +1 -1
- package/dest/validators/errors.d.ts +6 -7
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +2 -4
- package/dest/validators/index.d.ts +1 -1
- package/dest/validators/schemas.d.ts +266 -208
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +7 -7
- package/dest/validators/types.d.ts +10 -9
- package/dest/validators/types.d.ts.map +1 -1
- package/dest/versioning/index.d.ts +1 -1
- package/dest/versioning/versioning.d.ts +1 -1
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/vks/index.d.ts +1 -1
- package/dest/vks/verification_key.d.ts +10 -22
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +20 -0
- package/dest/vks/vk_data.d.ts +1 -7
- package/dest/vks/vk_data.d.ts.map +1 -1
- package/dest/world-state/index.d.ts +1 -1
- package/dest/world-state/world_state_revision.d.ts +34 -2
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +24 -1
- package/dest/zkpassport/index.d.ts +1 -1
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/package.json +12 -11
- package/src/abi/abi.ts +4 -4
- package/src/abi/contract_artifact.ts +3 -3
- package/src/avm/avm.ts +777 -6
- package/src/avm/avm_accumulated_data.ts +40 -0
- package/src/avm/avm_circuit_public_inputs.ts +40 -0
- package/src/avm/message_pack.ts +4 -1
- package/src/avm/public_data_write.ts +12 -1
- package/src/avm/revert_code.ts +29 -9
- package/src/aztec-address/index.ts +26 -2
- package/src/block/attestation_info.ts +8 -1
- package/src/block/block_parameter.ts +8 -0
- package/src/block/body.ts +16 -39
- package/src/block/in_block.ts +13 -9
- package/src/block/index.ts +2 -1
- package/src/block/l2_block.ts +70 -7
- package/src/block/l2_block_code_to_purge.ts +6 -4
- package/src/block/l2_block_header.ts +19 -5
- package/src/block/l2_block_info.ts +10 -9
- package/src/block/l2_block_new.ts +176 -0
- package/src/block/l2_block_source.ts +48 -29
- package/src/block/l2_block_stream/l2_block_stream.ts +10 -5
- package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -2
- package/src/block/proposal/attestations_and_signers.ts +20 -1
- package/src/block/published_l2_block.ts +14 -31
- package/src/block/test/l2_tips_store_test_suite.ts +8 -3
- package/src/block/validate_block_result.ts +9 -7
- package/src/checkpoint/checkpoint.ts +88 -0
- package/src/checkpoint/index.ts +2 -1
- package/src/checkpoint/published_checkpoint.ts +91 -0
- package/src/contract/contract_deployment_data.ts +125 -0
- package/src/contract/index.ts +1 -0
- package/src/contract/interfaces/contract_data_source.ts +2 -1
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/epoch-helpers/index.ts +28 -21
- package/src/file-store/http.ts +6 -3
- package/src/file-store/s3.ts +3 -7
- package/src/gas/gas.ts +14 -0
- package/src/gas/gas_fees.ts +14 -0
- package/src/gas/gas_settings.ts +19 -0
- package/src/gas/gas_used.ts +22 -1
- package/src/hash/hash.ts +13 -2
- package/src/interfaces/archiver.ts +27 -13
- package/src/interfaces/aztec-node.ts +64 -48
- package/src/interfaces/block-builder.ts +2 -1
- package/src/interfaces/configs.ts +6 -0
- package/src/interfaces/epoch-prover.ts +5 -6
- package/src/interfaces/l2_logs_source.ts +3 -2
- package/src/interfaces/merkle_tree_operations.ts +4 -3
- package/src/interfaces/p2p.ts +4 -2
- package/src/interfaces/proving-job.ts +14 -5
- package/src/interfaces/tx_provider.ts +2 -2
- package/src/interfaces/validator.ts +5 -2
- package/src/interfaces/world_state.ts +12 -11
- package/src/kernel/hints/build_transient_data_hints.ts +2 -2
- package/src/kernel/hints/private_kernel_reset_hints.ts +0 -8
- package/src/kernel/private_circuit_public_inputs.ts +29 -9
- package/src/kernel/private_kernel_circuit_public_inputs.ts +7 -0
- package/src/kernel/private_kernel_data.ts +0 -2
- package/src/kernel/private_kernel_init_circuit_private_inputs.ts +6 -0
- package/src/kernel/private_to_avm_accumulated_data.ts +35 -0
- package/src/kernel/private_validation_requests.ts +1 -13
- package/src/kernel/public_call_request.ts +27 -0
- package/src/keys/public_keys.ts +19 -0
- package/src/logs/contract_class_log.ts +32 -0
- package/src/logs/debug_log.ts +20 -1
- package/src/logs/log_id.ts +6 -5
- package/src/logs/private_log.ts +19 -3
- package/src/logs/public_log.ts +14 -0
- package/src/logs/tx_scoped_l2_log.ts +5 -4
- package/src/messaging/in_hash.ts +10 -0
- package/src/messaging/index.ts +2 -0
- package/src/messaging/l1_to_l2_message_source.ts +10 -2
- package/src/messaging/l2_to_l1_membership.ts +5 -4
- package/src/messaging/l2_to_l1_message.ts +25 -0
- package/src/messaging/out_hash.ts +36 -0
- package/src/noir/index.ts +6 -6
- package/src/note/index.ts +1 -1
- package/src/note/note_dao.ts +161 -0
- package/src/note/notes_filter.ts +3 -0
- package/src/p2p/block_attestation.ts +2 -1
- package/src/p2p/block_proposal.ts +3 -2
- package/src/p2p/consensus_payload.ts +16 -26
- package/src/p2p/gossipable.ts +17 -8
- package/src/rollup/block_headers_hash.ts +12 -0
- package/src/rollup/block_rollup_public_inputs.ts +8 -0
- package/src/rollup/block_root_rollup_private_inputs.ts +0 -9
- package/src/rollup/checkpoint_constant_data.ts +43 -4
- package/src/rollup/checkpoint_header.ts +48 -22
- package/src/rollup/checkpoint_root_rollup_private_inputs.ts +5 -5
- package/src/rollup/index.ts +1 -0
- package/src/schemas/schemas.ts +18 -0
- package/src/slashing/empire.ts +6 -4
- package/src/slashing/helpers.ts +17 -12
- package/src/slashing/interfaces.ts +3 -1
- package/src/tests/factories.ts +213 -229
- package/src/tests/mocks.ts +230 -51
- package/src/trees/append_only_tree_snapshot.ts +11 -12
- package/src/trees/nullifier_leaf.ts +32 -0
- package/src/trees/public_data_leaf.ts +32 -0
- package/src/tx/block_header.ts +17 -4
- package/src/tx/content_commitment.ts +11 -2
- package/src/tx/execution_payload.ts +60 -0
- package/src/tx/global_variable_builder.ts +2 -1
- package/src/tx/global_variables.ts +69 -15
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +5 -4
- package/src/tx/partial_state_reference.ts +9 -17
- package/src/tx/private_execution_result.ts +7 -4
- package/src/tx/processed_tx.ts +8 -2
- package/src/tx/profiling.ts +4 -6
- package/src/tx/protocol_contracts.ts +16 -0
- package/src/tx/public_call_request_with_calldata.ts +17 -0
- package/src/tx/public_simulation_output.ts +18 -1
- package/src/tx/state_reference.ts +9 -15
- package/src/tx/tree_snapshots.ts +16 -0
- package/src/tx/tx.ts +7 -6
- package/src/tx/tx_effect.ts +84 -90
- package/src/tx/tx_receipt.ts +3 -2
- package/src/validators/errors.ts +3 -4
- package/src/validators/schemas.ts +7 -7
- package/src/validators/types.ts +9 -8
- package/src/vks/verification_key.ts +25 -0
- package/src/world-state/world_state_revision.ts +47 -5
- 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/checkpoint/checkpoint_body.d.ts +0 -4
- package/dest/checkpoint/checkpoint_body.d.ts.map +0 -1
- package/dest/checkpoint/checkpoint_body.js +0 -9
- package/dest/note/unique_note.d.ts +0 -43
- package/dest/note/unique_note.d.ts.map +0 -1
- package/dest/note/unique_note.js +0 -67
- package/src/block/l2_block_number.ts +0 -8
- package/src/checkpoint/checkpoint_body.ts +0 -10
- package/src/note/unique_note.ts +0 -88
|
@@ -97,6 +97,22 @@ export class PublicCallRequest {
|
|
|
97
97
|
return new PublicCallRequest(AztecAddress.ZERO, AztecAddress.ZERO, false, Fr.ZERO);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Creates a PublicCallRequest instance from a plain object without Zod validation.
|
|
102
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
103
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
104
|
+
* @param obj - Plain object containing PublicCallRequest fields
|
|
105
|
+
* @returns A PublicCallRequest instance
|
|
106
|
+
*/
|
|
107
|
+
static fromPlainObject(obj: any): PublicCallRequest {
|
|
108
|
+
return new PublicCallRequest(
|
|
109
|
+
AztecAddress.fromPlainObject(obj.msgSender),
|
|
110
|
+
AztecAddress.fromPlainObject(obj.contractAddress),
|
|
111
|
+
obj.isStaticCall,
|
|
112
|
+
Fr.fromPlainObject(obj.calldataHash),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
100
116
|
isEmpty(): boolean {
|
|
101
117
|
return (
|
|
102
118
|
this.msgSender.isZero() && this.contractAddress.isZero() && !this.isStaticCall && this.calldataHash.isEmpty()
|
|
@@ -180,6 +196,17 @@ export class PublicCallRequestArrayLengths {
|
|
|
180
196
|
return new PublicCallRequestArrayLengths(0, 0, false);
|
|
181
197
|
}
|
|
182
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Creates a PublicCallRequestArrayLengths instance from a plain object without Zod validation.
|
|
201
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
202
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
203
|
+
* @param obj - Plain object containing PublicCallRequestArrayLengths fields
|
|
204
|
+
* @returns A PublicCallRequestArrayLengths instance
|
|
205
|
+
*/
|
|
206
|
+
static fromPlainObject(obj: any): PublicCallRequestArrayLengths {
|
|
207
|
+
return new PublicCallRequestArrayLengths(obj.setupCalls, obj.appLogicCalls, obj.teardownCall);
|
|
208
|
+
}
|
|
209
|
+
|
|
183
210
|
[inspect.custom]() {
|
|
184
211
|
return `PublicCallRequestArrayLengths {
|
|
185
212
|
setupCalls: ${this.setupCalls}
|
package/src/keys/public_keys.ts
CHANGED
|
@@ -52,6 +52,25 @@ export class PublicKeys {
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Creates a PublicKeys from a plain object without Zod validation.
|
|
57
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
58
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
59
|
+
* @param obj - Plain object containing PublicKeys fields
|
|
60
|
+
* @returns A PublicKeys instance
|
|
61
|
+
*/
|
|
62
|
+
static fromPlainObject(obj: any): PublicKeys {
|
|
63
|
+
if (obj instanceof PublicKeys) {
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
return new PublicKeys(
|
|
67
|
+
Point.fromPlainObject(obj.masterNullifierPublicKey),
|
|
68
|
+
Point.fromPlainObject(obj.masterIncomingViewingPublicKey),
|
|
69
|
+
Point.fromPlainObject(obj.masterOutgoingViewingPublicKey),
|
|
70
|
+
Point.fromPlainObject(obj.masterTaggingPublicKey),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
55
74
|
hash() {
|
|
56
75
|
return this.isEmpty()
|
|
57
76
|
? Fr.ZERO
|
|
@@ -29,6 +29,20 @@ export class ContractClassLogFields {
|
|
|
29
29
|
.transform(({ fields }) => new ContractClassLogFields(fields));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Creates a ContractClassLogFields from a plain object without Zod validation.
|
|
34
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
35
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
36
|
+
* @param obj - Plain object containing ContractClassLogFields fields
|
|
37
|
+
* @returns A ContractClassLogFields instance
|
|
38
|
+
*/
|
|
39
|
+
static fromPlainObject(obj: any): ContractClassLogFields {
|
|
40
|
+
if (obj instanceof ContractClassLogFields) {
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
return new ContractClassLogFields(obj.fields.map((f: any) => Fr.fromPlainObject(f)));
|
|
44
|
+
}
|
|
45
|
+
|
|
32
46
|
toFields(): Fr[] {
|
|
33
47
|
return this.fields;
|
|
34
48
|
}
|
|
@@ -191,6 +205,24 @@ export class ContractClassLog {
|
|
|
191
205
|
.transform(ContractClassLog.from);
|
|
192
206
|
}
|
|
193
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Creates a ContractClassLog from a plain object without Zod validation.
|
|
210
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
211
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
212
|
+
* @param obj - Plain object containing ContractClassLog fields
|
|
213
|
+
* @returns A ContractClassLog instance
|
|
214
|
+
*/
|
|
215
|
+
static fromPlainObject(obj: any): ContractClassLog {
|
|
216
|
+
if (obj instanceof ContractClassLog) {
|
|
217
|
+
return obj;
|
|
218
|
+
}
|
|
219
|
+
return new ContractClassLog(
|
|
220
|
+
AztecAddress.fromPlainObject(obj.contractAddress),
|
|
221
|
+
ContractClassLogFields.fromPlainObject(obj.fields),
|
|
222
|
+
obj.emittedLength,
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
194
226
|
[inspect.custom](): string {
|
|
195
227
|
return `ContractClassLog {
|
|
196
228
|
contractAddress: ${this.contractAddress.toString()},
|
package/src/logs/debug_log.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import { type LogLevel, LogLevels } from '@aztec/foundation/log';
|
|
3
3
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
4
4
|
|
|
@@ -29,4 +29,23 @@ export class DebugLog {
|
|
|
29
29
|
({ contractAddress, level, message, fields }) => new DebugLog(contractAddress, level, message, fields),
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates a DebugLog from a plain object without Zod validation.
|
|
35
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
36
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
37
|
+
* @param obj - Plain object containing DebugLog fields
|
|
38
|
+
* @returns A DebugLog instance
|
|
39
|
+
*/
|
|
40
|
+
static fromPlainObject(obj: any): DebugLog {
|
|
41
|
+
if (obj instanceof DebugLog) {
|
|
42
|
+
return obj;
|
|
43
|
+
}
|
|
44
|
+
return new DebugLog(
|
|
45
|
+
AztecAddress.fromPlainObject(obj.contractAddress),
|
|
46
|
+
obj.level,
|
|
47
|
+
obj.message,
|
|
48
|
+
obj.fields.map((f: any) => Fr.fromPlainObject(f)),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
32
51
|
}
|
package/src/logs/log_id.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
2
2
|
import { toBufferBE } from '@aztec/foundation/bigint-buffer';
|
|
3
|
+
import { BlockNumber, BlockNumberSchema } from '@aztec/foundation/branded-types';
|
|
3
4
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
5
|
|
|
5
6
|
import { z } from 'zod';
|
|
@@ -16,7 +17,7 @@ export class LogId {
|
|
|
16
17
|
*/
|
|
17
18
|
constructor(
|
|
18
19
|
/** The block number the log was emitted in. */
|
|
19
|
-
public readonly blockNumber:
|
|
20
|
+
public readonly blockNumber: BlockNumber,
|
|
20
21
|
/** The index of a tx in a block the log was emitted in. */
|
|
21
22
|
public readonly txIndex: number,
|
|
22
23
|
/** The index of a log the tx was emitted in. */
|
|
@@ -35,7 +36,7 @@ export class LogId {
|
|
|
35
36
|
|
|
36
37
|
static random() {
|
|
37
38
|
return new LogId(
|
|
38
|
-
Math.floor(Math.random() * 1000) + 1,
|
|
39
|
+
BlockNumber(Math.floor(Math.random() * 1000) + 1),
|
|
39
40
|
Math.floor(Math.random() * 1000),
|
|
40
41
|
Math.floor(Math.random() * 100),
|
|
41
42
|
);
|
|
@@ -44,7 +45,7 @@ export class LogId {
|
|
|
44
45
|
static get schema() {
|
|
45
46
|
return z
|
|
46
47
|
.object({
|
|
47
|
-
blockNumber:
|
|
48
|
+
blockNumber: BlockNumberSchema,
|
|
48
49
|
txIndex: schemas.Integer,
|
|
49
50
|
logIndex: schemas.Integer,
|
|
50
51
|
})
|
|
@@ -71,7 +72,7 @@ export class LogId {
|
|
|
71
72
|
static fromBuffer(buffer: Buffer | BufferReader): LogId {
|
|
72
73
|
const reader = BufferReader.asReader(buffer);
|
|
73
74
|
|
|
74
|
-
const blockNumber = reader.readNumber();
|
|
75
|
+
const blockNumber = BlockNumber(reader.readNumber());
|
|
75
76
|
const txIndex = reader.readNumber();
|
|
76
77
|
const logIndex = reader.readNumber();
|
|
77
78
|
|
|
@@ -93,7 +94,7 @@ export class LogId {
|
|
|
93
94
|
*/
|
|
94
95
|
static fromString(data: string): LogId {
|
|
95
96
|
const [rawBlockNumber, rawTxIndex, rawLogIndex] = data.split('-');
|
|
96
|
-
const blockNumber = Number(rawBlockNumber);
|
|
97
|
+
const blockNumber = BlockNumber(Number(rawBlockNumber));
|
|
97
98
|
const txIndex = Number(rawTxIndex);
|
|
98
99
|
const logIndex = Number(rawLogIndex);
|
|
99
100
|
|
package/src/logs/private_log.ts
CHANGED
|
@@ -49,12 +49,11 @@ export class PrivateLog {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
toBlobFields(): Fr[] {
|
|
52
|
-
return
|
|
52
|
+
return this.getEmittedFields();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
static fromBlobFields(fields: Fr[] | FieldReader) {
|
|
55
|
+
static fromBlobFields(emittedLength: number, fields: Fr[] | FieldReader) {
|
|
56
56
|
const reader = FieldReader.asReader(fields);
|
|
57
|
-
const emittedLength = reader.readU32();
|
|
58
57
|
const emittedFields = reader.readFieldArray(emittedLength);
|
|
59
58
|
return new PrivateLog(padArrayEnd(emittedFields, Fr.ZERO, PRIVATE_LOG_SIZE_IN_FIELDS), emittedLength);
|
|
60
59
|
}
|
|
@@ -92,6 +91,23 @@ export class PrivateLog {
|
|
|
92
91
|
.transform(({ fields, emittedLength }) => PrivateLog.fromFields(fields.concat(new Fr(emittedLength))));
|
|
93
92
|
}
|
|
94
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Creates a PrivateLog from a plain object without Zod validation.
|
|
96
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
97
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
98
|
+
* @param obj - Plain object containing PrivateLog fields
|
|
99
|
+
* @returns A PrivateLog instance
|
|
100
|
+
*/
|
|
101
|
+
static fromPlainObject(obj: any): PrivateLog {
|
|
102
|
+
if (obj instanceof PrivateLog) {
|
|
103
|
+
return obj;
|
|
104
|
+
}
|
|
105
|
+
return new PrivateLog(
|
|
106
|
+
obj.fields.map((f: any) => Fr.fromPlainObject(f)),
|
|
107
|
+
obj.emittedLength,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
95
111
|
equals(other: PrivateLog) {
|
|
96
112
|
return this.fields.every((field, i) => field.equals(other.fields[i])) && this.emittedLength === other.emittedLength;
|
|
97
113
|
}
|
package/src/logs/public_log.ts
CHANGED
|
@@ -99,6 +99,20 @@ export class FlatPublicLogs {
|
|
|
99
99
|
return new FlatPublicLogs(0, Array(FLAT_PUBLIC_LOGS_PAYLOAD_LENGTH).fill(Fr.ZERO));
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Creates a FlatPublicLogs instance from a plain object without Zod validation.
|
|
104
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
105
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
106
|
+
* @param obj - Plain object containing FlatPublicLogs fields
|
|
107
|
+
* @returns A FlatPublicLogs instance
|
|
108
|
+
*/
|
|
109
|
+
static fromPlainObject(obj: any): FlatPublicLogs {
|
|
110
|
+
return new FlatPublicLogs(
|
|
111
|
+
obj.length,
|
|
112
|
+
obj.payload.map((p: any) => Fr.fromPlainObject(p)),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
102
116
|
isEmpty() {
|
|
103
117
|
return this.length === 0;
|
|
104
118
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BlockNumber, BlockNumberSchema } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { BufferReader, boolToBuffer, numToUInt32BE } from '@aztec/foundation/serialize';
|
|
2
3
|
|
|
3
4
|
import { z } from 'zod';
|
|
@@ -26,7 +27,7 @@ export class TxScopedL2Log {
|
|
|
26
27
|
/*
|
|
27
28
|
* The block this log is included in
|
|
28
29
|
*/
|
|
29
|
-
public blockNumber:
|
|
30
|
+
public blockNumber: BlockNumber,
|
|
30
31
|
/*
|
|
31
32
|
* The log data as either a PrivateLog or PublicLog
|
|
32
33
|
*/
|
|
@@ -43,7 +44,7 @@ export class TxScopedL2Log {
|
|
|
43
44
|
txHash: TxHash.schema,
|
|
44
45
|
dataStartIndexForTx: z.number(),
|
|
45
46
|
logIndexInTx: z.number(),
|
|
46
|
-
blockNumber:
|
|
47
|
+
blockNumber: BlockNumberSchema,
|
|
47
48
|
log: z.union([PrivateLog.schema, PublicLog.schema]),
|
|
48
49
|
})
|
|
49
50
|
.transform(
|
|
@@ -69,7 +70,7 @@ export class TxScopedL2Log {
|
|
|
69
70
|
const txHash = reader.readObject(TxHash);
|
|
70
71
|
const dataStartIndexForTx = reader.readNumber();
|
|
71
72
|
const logIndexInTx = reader.readNumber();
|
|
72
|
-
const blockNumber = reader.readNumber();
|
|
73
|
+
const blockNumber = BlockNumber(reader.readNumber());
|
|
73
74
|
const isFromPublic = reader.readBoolean();
|
|
74
75
|
const log = isFromPublic ? PublicLog.fromBuffer(reader) : PrivateLog.fromBuffer(reader);
|
|
75
76
|
|
|
@@ -78,7 +79,7 @@ export class TxScopedL2Log {
|
|
|
78
79
|
|
|
79
80
|
static async random(isFromPublic = Math.random() < 0.5) {
|
|
80
81
|
const log = isFromPublic ? await PublicLog.random() : PrivateLog.random();
|
|
81
|
-
return new TxScopedL2Log(TxHash.random(), 1, 1, 1, log);
|
|
82
|
+
return new TxScopedL2Log(TxHash.random(), 1, 1, BlockNumber(1), log);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
equals(other: TxScopedL2Log) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/constants';
|
|
2
|
+
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
3
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
+
import { computeBalancedShaRoot } from '@aztec/foundation/trees';
|
|
5
|
+
|
|
6
|
+
/** Computes the inHash for a block's ContentCommitment given its l1 to l2 messages. */
|
|
7
|
+
export function computeInHashFromL1ToL2Messages(unpaddedL1ToL2Messages: Fr[]): Fr {
|
|
8
|
+
const l1ToL2Messages = padArrayEnd<Fr, number>(unpaddedL1ToL2Messages, Fr.ZERO, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP);
|
|
9
|
+
return new Fr(computeBalancedShaRoot(l1ToL2Messages.map(msg => msg.toBuffer())));
|
|
10
|
+
}
|
package/src/messaging/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './in_hash.js';
|
|
1
2
|
export * from './inbox_leaf.js';
|
|
2
3
|
export * from './l1_to_l2_message.js';
|
|
3
4
|
export * from './l1_to_l2_message_source.js';
|
|
@@ -5,3 +6,4 @@ export * from './l1_actor.js';
|
|
|
5
6
|
export * from './l2_actor.js';
|
|
6
7
|
export * from './l2_to_l1_message.js';
|
|
7
8
|
export * from './l2_to_l1_membership.js';
|
|
9
|
+
export * from './out_hash.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
|
|
3
4
|
import type { L2Tips } from '../block/l2_block_source.js';
|
|
@@ -6,12 +7,19 @@ import type { L2Tips } from '../block/l2_block_source.js';
|
|
|
6
7
|
* Interface of classes allowing for the retrieval of L1 to L2 messages.
|
|
7
8
|
*/
|
|
8
9
|
export interface L1ToL2MessageSource {
|
|
10
|
+
/**
|
|
11
|
+
* Gets new L1 to L2 message (to be) included in a given checkpoint.
|
|
12
|
+
* @param checkpointNumber - Checkpoint number to get messages for.
|
|
13
|
+
* @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
|
|
14
|
+
*/
|
|
15
|
+
getL1ToL2MessagesForCheckpoint(checkpointNumber: CheckpointNumber): Promise<Fr[]>;
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
18
|
* Gets new L1 to L2 message (to be) included in a given block.
|
|
11
19
|
* @param blockNumber - L2 block number to get messages for.
|
|
12
20
|
* @returns The L1 to L2 messages/leaves of the messages subtree (throws if not found).
|
|
13
21
|
*/
|
|
14
|
-
getL1ToL2Messages(blockNumber:
|
|
22
|
+
getL1ToL2Messages(blockNumber: BlockNumber): Promise<Fr[]>;
|
|
15
23
|
|
|
16
24
|
/**
|
|
17
25
|
* Gets the L1 to L2 message index in the L1 to L2 message tree.
|
|
@@ -24,7 +32,7 @@ export interface L1ToL2MessageSource {
|
|
|
24
32
|
* Gets the number of the latest L2 block processed by the implementation.
|
|
25
33
|
* @returns The number of the latest L2 block processed by the implementation.
|
|
26
34
|
*/
|
|
27
|
-
getBlockNumber(): Promise<
|
|
35
|
+
getBlockNumber(): Promise<BlockNumber>;
|
|
28
36
|
|
|
29
37
|
/**
|
|
30
38
|
* Returns the tips of the L2 chain.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { SiblingPath, UnbalancedMerkleTreeCalculator,
|
|
3
|
+
import { SiblingPath, UnbalancedMerkleTreeCalculator, computeUnbalancedShaRoot } from '@aztec/foundation/trees';
|
|
3
4
|
|
|
4
5
|
export interface MessageRetrieval {
|
|
5
|
-
getL2ToL1Messages(l2BlockNumber:
|
|
6
|
+
getL2ToL1Messages(l2BlockNumber: BlockNumber): Promise<Fr[][] | undefined>;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export type L2ToL1MembershipWitness = {
|
|
@@ -13,7 +14,7 @@ export type L2ToL1MembershipWitness = {
|
|
|
13
14
|
|
|
14
15
|
export async function computeL2ToL1MembershipWitness(
|
|
15
16
|
messageRetriever: MessageRetrieval,
|
|
16
|
-
l2BlockNumber:
|
|
17
|
+
l2BlockNumber: BlockNumber,
|
|
17
18
|
message: Fr,
|
|
18
19
|
): Promise<L2ToL1MembershipWitness | undefined> {
|
|
19
20
|
const messagesForAllTxs = await messageRetriever.getL2ToL1Messages(l2BlockNumber);
|
|
@@ -58,7 +59,7 @@ export function computeL2ToL1MembershipWitnessFromMessagesForAllTxs(
|
|
|
58
59
|
return Fr.fromBuffer(txOutHash);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
const root =
|
|
62
|
+
const root = computeUnbalancedShaRoot(messages.map(msg => msg.toBuffer()));
|
|
62
63
|
return Fr.fromBuffer(root);
|
|
63
64
|
});
|
|
64
65
|
|
|
@@ -30,6 +30,17 @@ export class L2ToL1Message {
|
|
|
30
30
|
return new L2ToL1Message(EthAddress.ZERO, Fr.zero());
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Creates an L2ToL1Message instance from a plain object without Zod validation.
|
|
35
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
36
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
37
|
+
* @param obj - Plain object containing L2ToL1Message fields
|
|
38
|
+
* @returns An L2ToL1Message instance
|
|
39
|
+
*/
|
|
40
|
+
static fromPlainObject(obj: any): L2ToL1Message {
|
|
41
|
+
return new L2ToL1Message(EthAddress.fromPlainObject(obj.recipient), Fr.fromPlainObject(obj.content));
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
/**
|
|
34
45
|
* Checks if another L2ToL1Message is equal to this instance.
|
|
35
46
|
* @param other Another L2ToL1Message instance to compare with.
|
|
@@ -149,6 +160,20 @@ export class ScopedL2ToL1Message {
|
|
|
149
160
|
return new ScopedL2ToL1Message(L2ToL1Message.empty(), AztecAddress.ZERO);
|
|
150
161
|
}
|
|
151
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Creates a ScopedL2ToL1Message instance from a plain object without Zod validation.
|
|
165
|
+
* This method is optimized for performance and skips validation, making it suitable
|
|
166
|
+
* for deserializing trusted data (e.g., from C++ via MessagePack).
|
|
167
|
+
* @param obj - Plain object containing ScopedL2ToL1Message fields
|
|
168
|
+
* @returns A ScopedL2ToL1Message instance
|
|
169
|
+
*/
|
|
170
|
+
static fromPlainObject(obj: any): ScopedL2ToL1Message {
|
|
171
|
+
return new ScopedL2ToL1Message(
|
|
172
|
+
L2ToL1Message.fromPlainObject(obj.message),
|
|
173
|
+
AztecAddress.fromPlainObject(obj.contractAddress),
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
152
177
|
isEmpty(): boolean {
|
|
153
178
|
return this.message.isEmpty() && this.contractAddress.isZero();
|
|
154
179
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { UnbalancedMerkleTreeCalculator, computeUnbalancedShaRoot } from '@aztec/foundation/trees';
|
|
3
|
+
|
|
4
|
+
export function computeTxOutHash(messages: Fr[]): Fr {
|
|
5
|
+
if (!messages.length) {
|
|
6
|
+
return Fr.ZERO;
|
|
7
|
+
}
|
|
8
|
+
// Tx out hash is the root of the unbalanced merkle tree of all the messages.
|
|
9
|
+
// Zero hashes (which should not happen) are not compressed.
|
|
10
|
+
return Fr.fromBuffer(computeUnbalancedShaRoot(messages.map(msg => msg.toBuffer())));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function computeBlockOutHash(messagesPerBlock: Fr[][]): Fr {
|
|
14
|
+
const txOutHashes = messagesPerBlock.map(messages => computeTxOutHash(messages));
|
|
15
|
+
return aggregateOutHashes(txOutHashes);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function computeCheckpointOutHash(messagesForAllTxs: Fr[][][]): Fr {
|
|
19
|
+
const blockOutHashes = messagesForAllTxs.map(block => computeBlockOutHash(block));
|
|
20
|
+
return aggregateOutHashes(blockOutHashes);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// The root of this tree should match the `out_hash` calculated in the circuits. Zero hashes are compressed to reduce
|
|
24
|
+
// cost if the non-zero leaves result in a shorter path.
|
|
25
|
+
function aggregateOutHashes(outHashes: Fr[]): Fr {
|
|
26
|
+
if (!outHashes.length) {
|
|
27
|
+
return Fr.ZERO;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const valueToCompress = Buffer.alloc(32);
|
|
31
|
+
const tree = UnbalancedMerkleTreeCalculator.create(
|
|
32
|
+
outHashes.map(hash => hash.toBuffer()),
|
|
33
|
+
valueToCompress,
|
|
34
|
+
);
|
|
35
|
+
return Fr.fromBuffer(tree.getRoot());
|
|
36
|
+
}
|
package/src/noir/index.ts
CHANGED
|
@@ -8,12 +8,12 @@ import type {
|
|
|
8
8
|
DebugInfo,
|
|
9
9
|
} from '../abi/abi.js';
|
|
10
10
|
|
|
11
|
-
export const AZTEC_PRIVATE_ATTRIBUTE = '
|
|
12
|
-
export const AZTEC_PUBLIC_ATTRIBUTE = '
|
|
13
|
-
export const AZTEC_UTILITY_ATTRIBUTE = '
|
|
14
|
-
export const
|
|
15
|
-
export const AZTEC_INITIALIZER_ATTRIBUTE = '
|
|
16
|
-
export const AZTEC_VIEW_ATTRIBUTE = '
|
|
11
|
+
export const AZTEC_PRIVATE_ATTRIBUTE = 'abi_private';
|
|
12
|
+
export const AZTEC_PUBLIC_ATTRIBUTE = 'abi_public';
|
|
13
|
+
export const AZTEC_UTILITY_ATTRIBUTE = 'abi_utility';
|
|
14
|
+
export const AZTEC_ONLY_SELF_ATTRIBUTE = 'abi_only_self';
|
|
15
|
+
export const AZTEC_INITIALIZER_ATTRIBUTE = 'abi_initializer';
|
|
16
|
+
export const AZTEC_VIEW_ATTRIBUTE = 'abi_view';
|
|
17
17
|
|
|
18
18
|
/** The ABI of an Aztec.nr function. */
|
|
19
19
|
export interface NoirFunctionAbi {
|
package/src/note/index.ts
CHANGED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { Fr, Point } from '@aztec/foundation/fields';
|
|
4
|
+
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
+
import { Note } from '@aztec/stdlib/note';
|
|
7
|
+
import { TxHash } from '@aztec/stdlib/tx';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A Note Data Access Object, representing a note that was committed to the note hash tree, holding all of the
|
|
11
|
+
* information required to use it during execution and manage its state.
|
|
12
|
+
*/
|
|
13
|
+
export class NoteDao {
|
|
14
|
+
constructor(
|
|
15
|
+
// Note information
|
|
16
|
+
|
|
17
|
+
/** The packed content of the note, as will be returned in the getNotes oracle. */
|
|
18
|
+
public note: Note,
|
|
19
|
+
/** The address of the contract that created the note (i.e. the address used by the kernel during siloing). */
|
|
20
|
+
public contractAddress: AztecAddress,
|
|
21
|
+
/** The owner of the note - generally the account that can spend the note. */
|
|
22
|
+
public owner: AztecAddress,
|
|
23
|
+
/**
|
|
24
|
+
* The storage location of the note. This value is not used for anything in PXE, but we do index by storage slot
|
|
25
|
+
* since contracts typically make queries based on it.
|
|
26
|
+
*/
|
|
27
|
+
public storageSlot: Fr,
|
|
28
|
+
/**
|
|
29
|
+
* The randomness injected to the note hash preimage.
|
|
30
|
+
*/
|
|
31
|
+
public randomness: Fr,
|
|
32
|
+
/** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */
|
|
33
|
+
public noteNonce: Fr,
|
|
34
|
+
|
|
35
|
+
// Computed values
|
|
36
|
+
/**
|
|
37
|
+
* The inner hash (non-unique, non-siloed) of the note. Each contract determines how the note is hashed. Can
|
|
38
|
+
* be used alongside contractAddress and nonce to compute the uniqueNoteHash and the siloedNoteHash.
|
|
39
|
+
*/
|
|
40
|
+
public noteHash: Fr,
|
|
41
|
+
/**
|
|
42
|
+
* The nullifier of the note, siloed by contract address.
|
|
43
|
+
* Note: Might be set as 0 if the note was added to PXE as nullified.
|
|
44
|
+
*/
|
|
45
|
+
public siloedNullifier: Fr,
|
|
46
|
+
|
|
47
|
+
// Metadata
|
|
48
|
+
/** The hash of the tx in which this note was created. Knowing the tx hash allows for efficient node queries e.g.
|
|
49
|
+
* when searching for txEffects.
|
|
50
|
+
*/
|
|
51
|
+
public txHash: TxHash,
|
|
52
|
+
/** The L2 block number in which the tx with this note was included. Used for note management while processing
|
|
53
|
+
* reorgs.*/
|
|
54
|
+
public l2BlockNumber: BlockNumber,
|
|
55
|
+
/** The L2 block hash in which the tx with this note was included. Used for note management while processing
|
|
56
|
+
* reorgs.*/
|
|
57
|
+
public l2BlockHash: string,
|
|
58
|
+
/** The index of the leaf in the global note hash tree the note is stored at */
|
|
59
|
+
public index: bigint,
|
|
60
|
+
) {}
|
|
61
|
+
|
|
62
|
+
toBuffer(): Buffer {
|
|
63
|
+
return serializeToBuffer([
|
|
64
|
+
this.note,
|
|
65
|
+
this.contractAddress,
|
|
66
|
+
this.owner,
|
|
67
|
+
this.storageSlot,
|
|
68
|
+
this.randomness,
|
|
69
|
+
this.noteNonce,
|
|
70
|
+
this.noteHash,
|
|
71
|
+
this.siloedNullifier,
|
|
72
|
+
this.txHash,
|
|
73
|
+
this.l2BlockNumber,
|
|
74
|
+
Fr.fromHexString(this.l2BlockHash),
|
|
75
|
+
this.index,
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static fromBuffer(buffer: Buffer | BufferReader) {
|
|
80
|
+
const reader = BufferReader.asReader(buffer);
|
|
81
|
+
|
|
82
|
+
const note = Note.fromBuffer(reader);
|
|
83
|
+
const contractAddress = AztecAddress.fromBuffer(reader);
|
|
84
|
+
const owner = AztecAddress.fromBuffer(reader);
|
|
85
|
+
const storageSlot = Fr.fromBuffer(reader);
|
|
86
|
+
const randomness = Fr.fromBuffer(reader);
|
|
87
|
+
const noteNonce = Fr.fromBuffer(reader);
|
|
88
|
+
const noteHash = Fr.fromBuffer(reader);
|
|
89
|
+
const siloedNullifier = Fr.fromBuffer(reader);
|
|
90
|
+
const txHash = reader.readObject(TxHash);
|
|
91
|
+
const l2BlockNumber = BlockNumber(reader.readNumber());
|
|
92
|
+
const l2BlockHash = Fr.fromBuffer(reader).toString();
|
|
93
|
+
const index = toBigIntBE(reader.readBytes(32));
|
|
94
|
+
|
|
95
|
+
return new NoteDao(
|
|
96
|
+
note,
|
|
97
|
+
contractAddress,
|
|
98
|
+
owner,
|
|
99
|
+
storageSlot,
|
|
100
|
+
randomness,
|
|
101
|
+
noteNonce,
|
|
102
|
+
noteHash,
|
|
103
|
+
siloedNullifier,
|
|
104
|
+
txHash,
|
|
105
|
+
l2BlockNumber,
|
|
106
|
+
l2BlockHash,
|
|
107
|
+
index,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
toString() {
|
|
112
|
+
return '0x' + this.toBuffer().toString('hex');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static fromString(str: string) {
|
|
116
|
+
const hex = str.replace(/^0x/, '');
|
|
117
|
+
return NoteDao.fromBuffer(Buffer.from(hex, 'hex'));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Returns the size in bytes of the Note Dao.
|
|
122
|
+
* @returns - Its size in bytes.
|
|
123
|
+
*/
|
|
124
|
+
public getSize() {
|
|
125
|
+
const indexSize = Math.ceil(Math.log2(Number(this.index)));
|
|
126
|
+
const noteSize = 4 + this.note.items.length * Fr.SIZE_IN_BYTES;
|
|
127
|
+
return (
|
|
128
|
+
noteSize + AztecAddress.SIZE_IN_BYTES * 2 + Fr.SIZE_IN_BYTES * 4 + TxHash.SIZE + Point.SIZE_IN_BYTES + indexSize
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static async random({
|
|
133
|
+
note = Note.random(),
|
|
134
|
+
contractAddress = undefined,
|
|
135
|
+
owner = undefined,
|
|
136
|
+
storageSlot = Fr.random(),
|
|
137
|
+
randomness = Fr.random(),
|
|
138
|
+
noteNonce = Fr.random(),
|
|
139
|
+
noteHash = Fr.random(),
|
|
140
|
+
siloedNullifier = Fr.random(),
|
|
141
|
+
txHash = TxHash.random(),
|
|
142
|
+
l2BlockNumber = BlockNumber(Math.floor(Math.random() * 1000)),
|
|
143
|
+
l2BlockHash = Fr.random().toString(),
|
|
144
|
+
index = Fr.random().toBigInt(),
|
|
145
|
+
}: Partial<NoteDao> = {}) {
|
|
146
|
+
return new NoteDao(
|
|
147
|
+
note,
|
|
148
|
+
contractAddress ?? (await AztecAddress.random()),
|
|
149
|
+
owner ?? (await AztecAddress.random()),
|
|
150
|
+
storageSlot,
|
|
151
|
+
randomness,
|
|
152
|
+
noteNonce,
|
|
153
|
+
noteHash,
|
|
154
|
+
siloedNullifier,
|
|
155
|
+
txHash,
|
|
156
|
+
l2BlockNumber,
|
|
157
|
+
l2BlockHash,
|
|
158
|
+
index,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
}
|
package/src/note/notes_filter.ts
CHANGED
|
@@ -16,6 +16,8 @@ export type NotesFilter = {
|
|
|
16
16
|
* @remarks Providing a contract address is required as we need that information to trigger private state sync.
|
|
17
17
|
*/
|
|
18
18
|
contractAddress: AztecAddress;
|
|
19
|
+
/** The owner of the note. */
|
|
20
|
+
owner?: AztecAddress;
|
|
19
21
|
/** The specific storage location of the note on the contract. */
|
|
20
22
|
storageSlot?: Fr;
|
|
21
23
|
/** The status of the note. Defaults to 'ACTIVE'. */
|
|
@@ -28,6 +30,7 @@ export type NotesFilter = {
|
|
|
28
30
|
|
|
29
31
|
export const NotesFilterSchema: ZodFor<NotesFilter> = z.object({
|
|
30
32
|
contractAddress: schemas.AztecAddress,
|
|
33
|
+
owner: schemas.AztecAddress.optional(),
|
|
31
34
|
storageSlot: schemas.Fr.optional(),
|
|
32
35
|
status: z.nativeEnum(NoteStatus).optional(),
|
|
33
36
|
siloedNullifier: schemas.Fr.optional(),
|