@aztec/stdlib 1.2.0 → 2.0.0-nightly.20250813
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 +0 -67
- package/dest/abi/abi.d.ts.map +1 -1
- package/dest/abi/abi.js +1 -14
- package/dest/abi/authorization_selector.d.ts +52 -0
- package/dest/abi/authorization_selector.d.ts.map +1 -0
- package/dest/abi/authorization_selector.js +70 -0
- package/dest/abi/contract_artifact.d.ts.map +1 -1
- package/dest/abi/contract_artifact.js +0 -40
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +3 -6
- package/dest/abi/index.d.ts +1 -0
- package/dest/abi/index.d.ts.map +1 -1
- package/dest/abi/index.js +1 -0
- package/dest/avm/avm.d.ts +278 -412
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +12 -12
- package/dest/avm/avm_proving_request.d.ts +160 -186
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/block/l2_block.d.ts +8 -0
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +9 -0
- package/dest/block/l2_block_source.d.ts +446 -2
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +29 -0
- package/dest/block/proposal/committee_attestation.d.ts +3 -1
- package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
- package/dest/block/proposal/committee_attestation.js +3 -0
- package/dest/block/published_l2_block.d.ts +2 -1
- package/dest/block/published_l2_block.d.ts.map +1 -1
- package/dest/block/published_l2_block.js +6 -1
- package/dest/contract/contract_instance.d.ts +3 -3
- package/dest/contract/contract_instance.d.ts.map +1 -1
- package/dest/contract/contract_instance.js +3 -3
- package/dest/contract/interfaces/contract_class.d.ts +2 -2
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts +9 -9
- package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
- package/dest/contract/interfaces/protocol_contract_addresses.js +4 -4
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/contract/utility_function_membership_proof.d.ts +1 -1
- package/dest/contract/utility_function_membership_proof.js +1 -1
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +20 -0
- package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -0
- package/dest/{shared_mutable/shared_mutable_values.js → delayed_public_mutable/delayed_public_mutable_values.js} +9 -9
- package/dest/{shared_mutable/shared_mutable_values_with_hash.d.ts → delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts} +6 -6
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -0
- package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.js +30 -0
- package/dest/delayed_public_mutable/index.d.ts +5 -0
- package/dest/delayed_public_mutable/index.d.ts.map +1 -0
- package/dest/delayed_public_mutable/index.js +4 -0
- package/dest/delayed_public_mutable/scheduled_delay_change.d.ts.map +1 -0
- package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -0
- package/dest/gas/gas.d.ts +1 -0
- package/dest/gas/gas.d.ts.map +1 -1
- package/dest/gas/gas.js +3 -0
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +1 -4
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +4 -2
- package/dest/interfaces/aztec-node-admin.d.ts +211 -8
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +9 -3
- package/dest/interfaces/configs.d.ts +27 -0
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +6 -1
- package/dest/interfaces/get_logs_response.d.ts +1 -1
- package/dest/interfaces/proving-job.d.ts +166 -192
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/pxe.d.ts +3 -1
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +1 -1
- package/dest/interfaces/server.d.ts +4 -2
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +4 -2
- package/dest/interfaces/slasher.d.ts +86 -0
- package/dest/interfaces/slasher.d.ts.map +1 -0
- package/dest/interfaces/slasher.js +23 -0
- package/dest/interfaces/tx_provider.d.ts +24 -0
- package/dest/interfaces/tx_provider.d.ts.map +1 -0
- package/dest/kernel/claimed_length_array.d.ts +34 -0
- package/dest/kernel/claimed_length_array.d.ts.map +1 -0
- package/dest/kernel/claimed_length_array.js +58 -0
- package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +6 -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 +18 -20
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +7 -10
- package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_nullifier_read_request_hints.js +17 -32
- package/dest/kernel/hints/build_transient_data_hints.d.ts +4 -3
- package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
- package/dest/kernel/hints/build_transient_data_hints.js +9 -10
- package/dest/kernel/hints/index.d.ts +1 -2
- package/dest/kernel/hints/index.d.ts.map +1 -1
- package/dest/kernel/hints/index.js +1 -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 +4 -4
- package/dest/kernel/hints/nullifier_read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/nullifier_read_request_hints.js +4 -4
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts +5 -5
- package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
- package/dest/kernel/hints/private_kernel_reset_hints.js +9 -9
- package/dest/kernel/hints/read_request_hints.d.ts +17 -17
- package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
- package/dest/kernel/hints/read_request_hints.js +28 -28
- package/dest/kernel/hints/{transient_data_index_hint.d.ts → transient_data_squashing_hint.d.ts} +5 -5
- package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -0
- package/dest/kernel/hints/{transient_data_index_hint.js → transient_data_squashing_hint.js} +5 -5
- package/dest/kernel/index.d.ts +1 -0
- package/dest/kernel/index.d.ts.map +1 -1
- package/dest/kernel/index.js +1 -0
- package/dest/kernel/private_accumulated_data.d.ts +16 -15
- package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
- package/dest/kernel/private_accumulated_data.js +3 -3
- package/dest/kernel/private_call_data.d.ts +4 -4
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.js +2 -2
- package/dest/kernel/private_circuit_public_inputs.d.ts +26 -25
- package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
- package/dest/kernel/private_circuit_public_inputs.js +33 -15
- package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +9 -0
- 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_tail_circuit_private_inputs.d.ts +10 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
- package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +9 -6
- package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +11 -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 +20 -18
- 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 +9 -10
- package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +11 -11
- 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 +11 -12
- package/dest/kernel/private_validation_requests.d.ts +8 -20
- package/dest/kernel/private_validation_requests.d.ts.map +1 -1
- package/dest/kernel/private_validation_requests.js +9 -21
- package/dest/kernel/utils/order_and_comparison.d.ts +0 -3
- package/dest/kernel/utils/order_and_comparison.d.ts.map +1 -1
- package/dest/kernel/utils/order_and_comparison.js +0 -19
- package/dest/logs/extended_public_log.d.ts +1 -1
- package/dest/logs/shared_secret_derivation.d.ts +1 -1
- package/dest/logs/shared_secret_derivation.js +1 -1
- package/dest/messaging/l2_to_l1_membership.d.ts +4 -1
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +49 -54
- package/dest/messaging/l2_to_l1_message.d.ts +2 -0
- package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_message.js +7 -0
- package/dest/note/notes_filter.d.ts +5 -2
- package/dest/note/notes_filter.d.ts.map +1 -1
- package/dest/note/notes_filter.js +1 -1
- package/dest/p2p/attestation_utils.d.ts +10 -0
- package/dest/p2p/attestation_utils.d.ts.map +1 -0
- package/dest/p2p/attestation_utils.js +21 -0
- package/dest/p2p/block_attestation.d.ts +3 -4
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_attestation.js +3 -4
- package/dest/p2p/block_proposal.d.ts +8 -1
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +21 -8
- package/dest/p2p/consensus_payload.d.ts +3 -11
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +13 -22
- package/dest/p2p/index.d.ts +1 -0
- package/dest/p2p/index.d.ts.map +1 -1
- package/dest/p2p/index.js +1 -0
- package/dest/p2p/topic_type.d.ts.map +1 -1
- package/dest/p2p/topic_type.js +5 -3
- package/dest/rollup/block_root_rollup.d.ts +1 -1
- package/dest/slashing/index.d.ts +51 -0
- package/dest/slashing/index.d.ts.map +1 -0
- package/dest/slashing/index.js +54 -0
- package/dest/stats/stats.d.ts +2 -2
- package/dest/stats/stats.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +0 -2
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +25 -24
- package/dest/tests/mocks.d.ts +2 -0
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +31 -22
- package/dest/tx/index.d.ts +0 -1
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +0 -1
- package/dest/tx/private_execution_result.d.ts +2 -2
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +11 -11
- 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 -4
- package/dest/tx/proven_tx.d.ts +1 -1
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +7 -3
- package/dest/tx/simulated_tx.d.ts +11 -17
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +12 -12
- package/dest/tx/tx.d.ts +25 -25
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +60 -48
- package/dest/tx/tx_effect.d.ts +2 -2
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +3 -18
- package/dest/tx/tx_execution_request.js +2 -2
- package/dest/tx/tx_hash.d.ts +7 -0
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +19 -1
- package/dest/tx/tx_request.d.ts +5 -5
- package/dest/tx/tx_request.d.ts.map +1 -1
- package/dest/tx/tx_request.js +7 -7
- package/dest/tx/validator/error_texts.d.ts +1 -0
- package/dest/tx/validator/error_texts.d.ts.map +1 -1
- package/dest/tx/validator/error_texts.js +1 -0
- package/dest/tx/validator/tx_validator.d.ts +6 -4
- package/dest/tx/validator/tx_validator.d.ts.map +1 -1
- package/dest/tx/validator/tx_validator.js +3 -0
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/vks/verification_key.d.ts.map +1 -1
- package/dest/vks/verification_key.js +4 -4
- package/package.json +10 -9
- package/src/abi/abi.ts +0 -38
- package/src/abi/authorization_selector.ts +95 -0
- package/src/abi/contract_artifact.ts +0 -49
- package/src/abi/decoder.ts +3 -6
- package/src/abi/index.ts +1 -0
- package/src/avm/avm.ts +7 -9
- package/src/block/l2_block.ts +18 -0
- package/src/block/l2_block_source.ts +70 -1
- package/src/block/proposal/committee_attestation.ts +5 -1
- package/src/block/published_l2_block.ts +14 -5
- package/src/contract/contract_instance.ts +3 -3
- package/src/contract/interfaces/protocol_contract_addresses.ts +5 -10
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/contract/utility_function_membership_proof.ts +1 -1
- package/src/{shared_mutable/shared_mutable_values.ts → delayed_public_mutable/delayed_public_mutable_values.ts} +10 -10
- package/src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts +38 -0
- package/src/delayed_public_mutable/index.ts +4 -0
- package/src/gas/gas.ts +4 -0
- package/src/hash/hash.ts +1 -4
- package/src/interfaces/archiver.ts +3 -1
- package/src/interfaces/aztec-node-admin.ts +19 -8
- package/src/interfaces/configs.ts +17 -0
- package/src/interfaces/pxe.ts +4 -2
- package/src/interfaces/server.ts +4 -2
- package/src/interfaces/slasher.ts +49 -0
- package/src/interfaces/tx_provider.ts +16 -0
- package/src/kernel/claimed_length_array.ts +104 -0
- package/src/kernel/hints/build_note_hash_read_request_hints.ts +28 -30
- package/src/kernel/hints/build_nullifier_read_request_hints.ts +28 -59
- package/src/kernel/hints/build_transient_data_hints.ts +12 -14
- package/src/kernel/hints/index.ts +1 -2
- package/src/kernel/hints/note_hash_read_request_hints.ts +4 -16
- package/src/kernel/hints/nullifier_read_request_hints.ts +4 -16
- package/src/kernel/hints/private_kernel_reset_hints.ts +7 -7
- package/src/kernel/hints/read_request_hints.ts +22 -22
- package/src/kernel/hints/{transient_data_index_hint.ts → transient_data_squashing_hint.ts} +5 -5
- package/src/kernel/index.ts +1 -0
- package/src/kernel/private_accumulated_data.ts +23 -23
- package/src/kernel/private_call_data.ts +3 -3
- package/src/kernel/private_circuit_public_inputs.ts +92 -68
- package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -1
- package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +13 -4
- package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +20 -20
- package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +7 -7
- package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +16 -10
- package/src/kernel/private_validation_requests.ts +19 -50
- package/src/kernel/utils/order_and_comparison.ts +0 -25
- package/src/logs/shared_secret_derivation.ts +1 -1
- package/src/messaging/l2_to_l1_membership.ts +76 -85
- package/src/messaging/l2_to_l1_message.ts +9 -0
- package/src/note/notes_filter.ts +6 -3
- package/src/p2p/attestation_utils.ts +35 -0
- package/src/p2p/block_attestation.ts +3 -4
- package/src/p2p/block_proposal.ts +23 -5
- package/src/p2p/consensus_payload.ts +10 -29
- package/src/p2p/index.ts +1 -0
- package/src/p2p/topic_type.ts +3 -1
- package/src/slashing/index.ts +74 -0
- package/src/stats/stats.ts +2 -2
- package/src/tests/factories.ts +37 -27
- package/src/tests/mocks.ts +24 -22
- package/src/tx/index.ts +0 -1
- package/src/tx/private_execution_result.ts +11 -9
- package/src/tx/processed_tx.ts +6 -6
- package/src/tx/proven_tx.ts +7 -8
- package/src/tx/simulated_tx.ts +13 -19
- package/src/tx/tx.ts +70 -57
- package/src/tx/tx_effect.ts +5 -20
- package/src/tx/tx_execution_request.ts +2 -2
- package/src/tx/tx_hash.ts +21 -1
- package/src/tx/tx_request.ts +7 -6
- package/src/tx/validator/error_texts.ts +1 -0
- package/src/tx/validator/tx_validator.ts +5 -0
- package/src/versioning/versioning.ts +0 -3
- package/src/vks/verification_key.ts +4 -7
- package/dest/interfaces/tx-collector.d.ts +0 -15
- package/dest/interfaces/tx-collector.d.ts.map +0 -1
- package/dest/kernel/hints/rollup_validation_requests.d.ts +0 -34
- package/dest/kernel/hints/rollup_validation_requests.d.ts.map +0 -1
- package/dest/kernel/hints/rollup_validation_requests.js +0 -55
- package/dest/kernel/hints/transient_data_index_hint.d.ts.map +0 -1
- package/dest/shared_mutable/index.d.ts +0 -5
- package/dest/shared_mutable/index.d.ts.map +0 -1
- package/dest/shared_mutable/index.js +0 -4
- package/dest/shared_mutable/scheduled_delay_change.d.ts.map +0 -1
- package/dest/shared_mutable/scheduled_value_change.d.ts.map +0 -1
- package/dest/shared_mutable/shared_mutable_values.d.ts +0 -20
- package/dest/shared_mutable/shared_mutable_values.d.ts.map +0 -1
- package/dest/shared_mutable/shared_mutable_values_with_hash.d.ts.map +0 -1
- package/dest/shared_mutable/shared_mutable_values_with_hash.js +0 -30
- package/dest/tx/include_by_timestamp.d.ts +0 -54
- package/dest/tx/include_by_timestamp.d.ts.map +0 -1
- package/dest/tx/include_by_timestamp.js +0 -72
- package/src/interfaces/tx-collector.ts +0 -17
- package/src/kernel/hints/rollup_validation_requests.ts +0 -71
- package/src/shared_mutable/index.ts +0 -4
- package/src/shared_mutable/shared_mutable_values_with_hash.ts +0 -38
- package/src/tx/include_by_timestamp.ts +0 -90
- /package/dest/{shared_mutable → delayed_public_mutable}/scheduled_delay_change.d.ts +0 -0
- /package/dest/{shared_mutable → delayed_public_mutable}/scheduled_delay_change.js +0 -0
- /package/dest/{shared_mutable → delayed_public_mutable}/scheduled_value_change.d.ts +0 -0
- /package/dest/{shared_mutable → delayed_public_mutable}/scheduled_value_change.js +0 -0
- /package/dest/interfaces/{tx-collector.js → tx_provider.js} +0 -0
- /package/src/{shared_mutable → delayed_public_mutable}/scheduled_delay_change.ts +0 -0
- /package/src/{shared_mutable → delayed_public_mutable}/scheduled_value_change.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"published_l2_block.d.ts","sourceRoot":"","sources":["../../src/block/published_l2_block.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"published_l2_block.d.ts","sourceRoot":"","sources":["../../src/block/published_l2_block.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,qBAAa,eAAe;IAEjB,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;gBAFjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM;IAG1B,MAAM,KAAK,MAAM;;;;;;;;;;;;OAMhB;IAED,MAAM,CAAC,MAAM;CAOd;AAED,qBAAa,gBAAgB;IAElB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,eAAe;IACnB,YAAY,EAAE,oBAAoB,EAAE;gBAFpC,KAAK,EAAE,OAAO,EACd,EAAE,EAAE,eAAe,EACnB,YAAY,EAAE,oBAAoB,EAAE;IAG7C,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAMhB;CACF;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,GAAG,OAAO,CAAC,GACtD,gBAAgB,EAAE,CAKpB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// Ignoring import issue to fix portable inferred type issue in zod schema
|
|
2
|
+
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
|
+
import { randomBigInt } from '@aztec/foundation/crypto';
|
|
2
4
|
import { schemas } from '@aztec/foundation/schemas';
|
|
3
5
|
import { z } from 'zod';
|
|
4
6
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
@@ -21,6 +23,9 @@ export class L1PublishedData {
|
|
|
21
23
|
blockHash: z.string()
|
|
22
24
|
});
|
|
23
25
|
}
|
|
26
|
+
static random() {
|
|
27
|
+
return new L1PublishedData(randomBigInt(1000n) + 1n, BigInt(Math.floor(Date.now() / 1000)), Buffer32.random().toString());
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
30
|
export class PublishedL2Block {
|
|
26
31
|
block;
|
|
@@ -41,5 +46,5 @@ export class PublishedL2Block {
|
|
|
41
46
|
}
|
|
42
47
|
export function getAttestationsFromPublishedL2Block(block) {
|
|
43
48
|
const payload = ConsensusPayload.fromBlock(block.block);
|
|
44
|
-
return block.attestations.filter((attestation)=>!attestation.signature.isEmpty()).map((attestation)=>new BlockAttestation(block.block.
|
|
49
|
+
return block.attestations.filter((attestation)=>!attestation.signature.isEmpty()).map((attestation)=>new BlockAttestation(block.block.number, payload, attestation.signature));
|
|
45
50
|
}
|
|
@@ -22,12 +22,12 @@ export declare class SerializableContractInstance {
|
|
|
22
22
|
static default(): SerializableContractInstance;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Generates a Contract Instance from
|
|
25
|
+
* Generates a Contract Instance from some instantiation params.
|
|
26
26
|
* @param artifact - The account contract build artifact.
|
|
27
|
-
* @param opts - Options for the
|
|
27
|
+
* @param opts - Options for the contract's instantiation.
|
|
28
28
|
* @returns - The contract instance
|
|
29
29
|
*/
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function getContractInstanceFromInstantiationParams(artifact: ContractArtifact, opts: {
|
|
31
31
|
constructorArtifact?: FunctionAbi | string;
|
|
32
32
|
constructorArgs?: any[];
|
|
33
33
|
skipArgsDecoding?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_instance.d.ts","sourceRoot":"","sources":["../../src/contract/contract_instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,E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|
/**
|
|
74
|
-
* Generates a Contract Instance from
|
|
74
|
+
* Generates a Contract Instance from some instantiation params.
|
|
75
75
|
* @param artifact - The account contract build artifact.
|
|
76
|
-
* @param opts - Options for the
|
|
76
|
+
* @param opts - Options for the contract's instantiation.
|
|
77
77
|
* @returns - The contract instance
|
|
78
|
-
*/ export async function
|
|
78
|
+
*/ export async function getContractInstanceFromInstantiationParams(artifact, opts) {
|
|
79
79
|
const args = opts.constructorArgs ?? [];
|
|
80
80
|
const salt = opts.salt ?? Fr.random();
|
|
81
81
|
const constructorArtifact = getConstructorArtifact(artifact, opts.constructorArtifact);
|
|
@@ -149,8 +149,8 @@ export declare const ContractClassWithIdSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
149
149
|
}, {
|
|
150
150
|
id: z.ZodType<Fr, any, string>;
|
|
151
151
|
}>, "strip", z.ZodTypeAny, {
|
|
152
|
-
id: Fr;
|
|
153
152
|
version: 1;
|
|
153
|
+
id: Fr;
|
|
154
154
|
artifactHash: Fr;
|
|
155
155
|
packedBytecode: Buffer<ArrayBuffer>;
|
|
156
156
|
privateFunctions: {
|
|
@@ -158,8 +158,8 @@ export declare const ContractClassWithIdSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
158
158
|
vkHash: Fr;
|
|
159
159
|
}[];
|
|
160
160
|
}, {
|
|
161
|
-
id: string;
|
|
162
161
|
version: 1;
|
|
162
|
+
id: string;
|
|
163
163
|
artifactHash: string;
|
|
164
164
|
packedBytecode: string | {
|
|
165
165
|
type: "Buffer";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { AztecAddress } from '../../aztec-address/index.js';
|
|
3
|
-
export declare const ProtocolContractsNames: readonly ["
|
|
3
|
+
export declare const ProtocolContractsNames: readonly ["classRegistry", "feeJuice", "instanceRegistry", "multiCallEntrypoint"];
|
|
4
4
|
export type ProtocolContractAddresses = {
|
|
5
|
-
|
|
5
|
+
classRegistry: AztecAddress;
|
|
6
6
|
feeJuice: AztecAddress;
|
|
7
|
-
|
|
7
|
+
instanceRegistry: AztecAddress;
|
|
8
8
|
multiCallEntrypoint: AztecAddress;
|
|
9
9
|
};
|
|
10
10
|
export declare const ProtocolContractAddressesSchema: z.ZodObject<{
|
|
11
|
-
|
|
11
|
+
classRegistry: import("../../schemas/index.js").ZodFor<AztecAddress>;
|
|
12
12
|
feeJuice: import("../../schemas/index.js").ZodFor<AztecAddress>;
|
|
13
|
-
|
|
13
|
+
instanceRegistry: import("../../schemas/index.js").ZodFor<AztecAddress>;
|
|
14
14
|
multiCallEntrypoint: import("../../schemas/index.js").ZodFor<AztecAddress>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
|
|
16
|
+
classRegistry: AztecAddress;
|
|
17
17
|
feeJuice: AztecAddress;
|
|
18
|
-
|
|
18
|
+
instanceRegistry: AztecAddress;
|
|
19
19
|
multiCallEntrypoint: AztecAddress;
|
|
20
20
|
}, {
|
|
21
|
-
|
|
21
|
+
classRegistry?: any;
|
|
22
22
|
feeJuice?: any;
|
|
23
|
-
|
|
23
|
+
instanceRegistry?: any;
|
|
24
24
|
multiCallEntrypoint?: any;
|
|
25
25
|
}>;
|
|
26
26
|
//# sourceMappingURL=protocol_contract_addresses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol_contract_addresses.d.ts","sourceRoot":"","sources":["../../../src/contract/interfaces/protocol_contract_addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"protocol_contract_addresses.d.ts","sourceRoot":"","sources":["../../../src/contract/interfaces/protocol_contract_addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,eAAO,MAAM,sBAAsB,mFAAoF,CAAC;AAExH,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,EAAE,YAAY,CAAC;IAC5B,QAAQ,EAAE,YAAY,CAAC;IACvB,gBAAgB,EAAE,YAAY,CAAC;IAC/B,mBAAmB,EAAE,YAAY,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;EAK1C,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { schemas } from '../../schemas/index.js';
|
|
3
3
|
export const ProtocolContractsNames = [
|
|
4
|
-
'
|
|
4
|
+
'classRegistry',
|
|
5
5
|
'feeJuice',
|
|
6
|
-
'
|
|
6
|
+
'instanceRegistry',
|
|
7
7
|
'multiCallEntrypoint'
|
|
8
8
|
];
|
|
9
9
|
export const ProtocolContractAddressesSchema = z.object({
|
|
10
|
-
|
|
10
|
+
classRegistry: schemas.AztecAddress,
|
|
11
11
|
feeJuice: schemas.AztecAddress,
|
|
12
|
-
|
|
12
|
+
instanceRegistry: schemas.AztecAddress,
|
|
13
13
|
multiCallEntrypoint: schemas.AztecAddress
|
|
14
14
|
});
|
|
@@ -7,7 +7,7 @@ import type { ContractClassPublic, ExecutablePrivateFunctionWithMembershipProof,
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function createPrivateFunctionMembershipProof(selector: FunctionSelector, artifact: ContractArtifact): Promise<PrivateFunctionMembershipProof>;
|
|
9
9
|
/**
|
|
10
|
-
* Verifies that a private function with a membership proof as emitted by the
|
|
10
|
+
* Verifies that a private function with a membership proof as emitted by the ClassRegistry contract is valid,
|
|
11
11
|
* as defined in the protocol specs at contract-deployment/classes:
|
|
12
12
|
*
|
|
13
13
|
* ```
|
|
@@ -62,7 +62,7 @@ import { computePrivateFunctionLeaf, computePrivateFunctionsTree } from './priva
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* Verifies that a private function with a membership proof as emitted by the
|
|
65
|
+
* Verifies that a private function with a membership proof as emitted by the ClassRegistry contract is valid,
|
|
66
66
|
* as defined in the protocol specs at contract-deployment/classes:
|
|
67
67
|
*
|
|
68
68
|
* ```
|
|
@@ -7,7 +7,7 @@ import type { ContractClassPublic, UtilityFunctionMembershipProof, UtilityFuncti
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function createUtilityFunctionMembershipProof(selector: FunctionSelector, artifact: ContractArtifact): Promise<UtilityFunctionMembershipProof>;
|
|
9
9
|
/**
|
|
10
|
-
* Verifies that a utility function with a membership proof as emitted by the
|
|
10
|
+
* Verifies that a utility function with a membership proof as emitted by the ClassRegistry contract is valid,
|
|
11
11
|
* as defined in the protocol specs at contract-deployment/classes:
|
|
12
12
|
*
|
|
13
13
|
* ```
|
|
@@ -46,7 +46,7 @@ import { computeArtifactFunctionTree, computeArtifactHash, computeArtifactHashPr
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Verifies that a utility function with a membership proof as emitted by the
|
|
49
|
+
* Verifies that a utility function with a membership proof as emitted by the ClassRegistry contract is valid,
|
|
50
50
|
* as defined in the protocol specs at contract-deployment/classes:
|
|
51
51
|
*
|
|
52
52
|
* ```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
+
import { BufferReader, FieldReader } from '@aztec/foundation/serialize';
|
|
3
|
+
import { ScheduledDelayChange } from './scheduled_delay_change.js';
|
|
4
|
+
import { ScheduledValueChange } from './scheduled_value_change.js';
|
|
5
|
+
export declare const DELAYED_PUBLIC_MUTABLE_VALUES_LEN: number;
|
|
6
|
+
export declare class DelayedPublicMutableValues {
|
|
7
|
+
svc: ScheduledValueChange;
|
|
8
|
+
sdc: ScheduledDelayChange;
|
|
9
|
+
constructor(svc: ScheduledValueChange, sdc: ScheduledDelayChange);
|
|
10
|
+
static fromFields(fields: Fr[] | FieldReader): DelayedPublicMutableValues;
|
|
11
|
+
toFields(): Fr[];
|
|
12
|
+
toBuffer(): Buffer;
|
|
13
|
+
static fromBuffer(buffer: Buffer | BufferReader, valueSize: number): DelayedPublicMutableValues;
|
|
14
|
+
static empty(valueSize: number): DelayedPublicMutableValues;
|
|
15
|
+
static readFromTree(delayedPublicMutableSlot: Fr, readStorage: (storageSlot: Fr) => Promise<Fr>): Promise<DelayedPublicMutableValues>;
|
|
16
|
+
isEmpty(): boolean;
|
|
17
|
+
writeToTree(delayedPublicMutableSlot: Fr, storageWrite: (storageSlot: Fr, value: Fr) => Promise<void>): Promise<void>;
|
|
18
|
+
hash(): Promise<Fr>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=delayed_public_mutable_values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delayed_public_mutable_values.d.ts","sourceRoot":"","sources":["../../src/delayed_public_mutable/delayed_public_mutable_values.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAqB,MAAM,6BAA6B,CAAC;AAE3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,eAAO,MAAM,iCAAiC,QAA6B,CAAC;AAE5E,qBAAa,0BAA0B;IAE5B,GAAG,EAAE,oBAAoB;IACzB,GAAG,EAAE,oBAAoB;gBADzB,GAAG,EAAE,oBAAoB,EACzB,GAAG,EAAE,oBAAoB;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IA2B5C,QAAQ,IAAI,EAAE,EAAE;IAahB,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,0BAA0B;IAK/F,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM;WAIjB,YAAY,CAAC,wBAAwB,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,WAAW,EAAE,EAAE,KAAK,OAAO,CAAC,EAAE,CAAC;IAQrG,OAAO,IAAI,OAAO;IAIZ,WAAW,CAAC,wBAAwB,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;IAQrG,IAAI,IAAI,OAAO,CAAC,EAAE,CAAC;CAK1B"}
|
|
@@ -4,8 +4,8 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
4
4
|
import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
5
5
|
import { ScheduledDelayChange } from './scheduled_delay_change.js';
|
|
6
6
|
import { ScheduledValueChange } from './scheduled_value_change.js';
|
|
7
|
-
export const
|
|
8
|
-
export class
|
|
7
|
+
export const DELAYED_PUBLIC_MUTABLE_VALUES_LEN = 2 * UPDATES_VALUE_SIZE + 1;
|
|
8
|
+
export class DelayedPublicMutableValues {
|
|
9
9
|
svc;
|
|
10
10
|
sdc;
|
|
11
11
|
constructor(svc, sdc){
|
|
@@ -49,25 +49,25 @@ export class SharedMutableValues {
|
|
|
49
49
|
}
|
|
50
50
|
static fromBuffer(buffer, valueSize) {
|
|
51
51
|
const reader = BufferReader.asReader(buffer);
|
|
52
|
-
return
|
|
52
|
+
return DelayedPublicMutableValues.fromFields(reader.readArray(2 * valueSize + 1, Fr));
|
|
53
53
|
}
|
|
54
54
|
static empty(valueSize) {
|
|
55
55
|
return new this(ScheduledValueChange.empty(valueSize), ScheduledDelayChange.empty());
|
|
56
56
|
}
|
|
57
|
-
static async readFromTree(
|
|
57
|
+
static async readFromTree(delayedPublicMutableSlot, readStorage) {
|
|
58
58
|
const fields = [];
|
|
59
|
-
for(let i = 0; i <
|
|
60
|
-
fields.push(await readStorage(
|
|
59
|
+
for(let i = 0; i < DELAYED_PUBLIC_MUTABLE_VALUES_LEN; i++){
|
|
60
|
+
fields.push(await readStorage(delayedPublicMutableSlot.add(new Fr(i))));
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return DelayedPublicMutableValues.fromFields(fields);
|
|
63
63
|
}
|
|
64
64
|
isEmpty() {
|
|
65
65
|
return this.svc.isEmpty() && this.sdc.isEmpty();
|
|
66
66
|
}
|
|
67
|
-
async writeToTree(
|
|
67
|
+
async writeToTree(delayedPublicMutableSlot, storageWrite) {
|
|
68
68
|
const fields = this.toFields();
|
|
69
69
|
for(let i = 0; i < fields.length; i++){
|
|
70
|
-
await storageWrite(
|
|
70
|
+
await storageWrite(delayedPublicMutableSlot.add(new Fr(i)), fields[i]);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
async hash() {
|
|
@@ -2,14 +2,14 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
2
2
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
3
3
|
import { ScheduledDelayChange } from './scheduled_delay_change.js';
|
|
4
4
|
import { ScheduledValueChange } from './scheduled_value_change.js';
|
|
5
|
-
export declare class
|
|
6
|
-
private
|
|
5
|
+
export declare class DelayedPublicMutableValuesWithHash {
|
|
6
|
+
private dpmv;
|
|
7
7
|
constructor(svc: ScheduledValueChange, sdc: ScheduledDelayChange);
|
|
8
8
|
toFields(): Promise<Fr[]>;
|
|
9
|
-
writeToTree(
|
|
9
|
+
writeToTree(delayedPublicMutableSlot: Fr, storageWrite: (storageSlot: Fr, value: Fr) => Promise<void>): Promise<void>;
|
|
10
10
|
static getContractUpdateSlots(contractAddress: AztecAddress): Promise<{
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
delayedPublicMutableSlot: Fr;
|
|
12
|
+
delayedPublicMutableHashSlot: Fr;
|
|
13
13
|
}>;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=delayed_public_mutable_values_with_hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delayed_public_mutable_values_with_hash.d.ts","sourceRoot":"","sources":["../../src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,qBAAa,kCAAkC;IAC7C,OAAO,CAAC,IAAI,CAA6B;gBAE7B,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,oBAAoB;IAI1D,QAAQ,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;IAIzB,WAAW,CAAC,wBAAwB,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC;WAQ9F,sBAAsB,CAAC,eAAe,EAAE,YAAY;;;;CASlE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { UPDATED_CLASS_IDS_SLOT } from '@aztec/constants';
|
|
2
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import { deriveStorageSlotInMap } from '../hash/map_slot.js';
|
|
4
|
+
import { DELAYED_PUBLIC_MUTABLE_VALUES_LEN, DelayedPublicMutableValues } from './delayed_public_mutable_values.js';
|
|
5
|
+
export class DelayedPublicMutableValuesWithHash {
|
|
6
|
+
dpmv;
|
|
7
|
+
constructor(svc, sdc){
|
|
8
|
+
this.dpmv = new DelayedPublicMutableValues(svc, sdc);
|
|
9
|
+
}
|
|
10
|
+
async toFields() {
|
|
11
|
+
return [
|
|
12
|
+
...this.dpmv.toFields(),
|
|
13
|
+
await this.dpmv.hash()
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
async writeToTree(delayedPublicMutableSlot, storageWrite) {
|
|
17
|
+
const fields = await this.toFields();
|
|
18
|
+
for(let i = 0; i < fields.length; i++){
|
|
19
|
+
await storageWrite(delayedPublicMutableSlot.add(new Fr(i)), fields[i]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
static async getContractUpdateSlots(contractAddress) {
|
|
23
|
+
const delayedPublicMutableSlot = await deriveStorageSlotInMap(new Fr(UPDATED_CLASS_IDS_SLOT), contractAddress);
|
|
24
|
+
const delayedPublicMutableHashSlot = delayedPublicMutableSlot.add(new Fr(DELAYED_PUBLIC_MUTABLE_VALUES_LEN));
|
|
25
|
+
return {
|
|
26
|
+
delayedPublicMutableSlot,
|
|
27
|
+
delayedPublicMutableHashSlot
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delayed_public_mutable/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8CAA8C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled_delay_change.d.ts","sourceRoot":"","sources":["../../src/delayed_public_mutable/scheduled_delay_change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAAa,oBAAoB;IAEtB,GAAG,EAAE,MAAM,GAAG,SAAS;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS;IACxB,iBAAiB,EAAE,MAAM;gBAFzB,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,iBAAiB,EAAE,MAAM;IAGlC,MAAM,CAAC,KAAK;IAIZ,OAAO,IAAI,OAAO;CAGnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled_value_change.d.ts","sourceRoot":"","sources":["../../src/delayed_public_mutable/scheduled_value_change.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAAa,oBAAoB;IAEtB,QAAQ,EAAE,EAAE,EAAE;IACd,IAAI,EAAE,EAAE,EAAE;IACV,iBAAiB,EAAE,MAAM;gBAFzB,QAAQ,EAAE,EAAE,EAAE,EACd,IAAI,EAAE,EAAE,EAAE,EACV,iBAAiB,EAAE,MAAM;IAOlC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM;IAI9B,OAAO,IAAI,OAAO;IAIlB,YAAY,CAAC,SAAS,EAAE,MAAM;CAO/B"}
|
package/dest/gas/gas.d.ts
CHANGED
package/dest/gas/gas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.d.ts","sourceRoot":"","sources":["../../src/gas/gas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAwC,MAAM,6BAA6B,CAAC;AAC9G,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAO,MAAM,aAAa,uBAAwB,CAAC;AACnD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,qC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D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAO,MAAM,aAAa,uBAAwB,CAAC;AACnD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,qCAAqC;AACrC,qBAAa,GAAG;aAEI,KAAK,EAAE,MAAM;aACb,KAAK,EAAE,MAAM;gBADb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM;IAG/B,MAAM,KAAK,MAAM;;;;;;;;;;;;OAOhB;IAED,OAAO;IAIP,KAAK,IAAI,GAAG;IAIZ,GAAG,CAAC,SAAS,EAAE,aAAa;IAI5B,MAAM,CAAC,KAAK,EAAE,GAAG;IAIjB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAI1C,MAAM,CAAC,KAAK;IAIZ,MAAM,CAAC,MAAM;IAIb,OAAO;IAIP,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,GAAG;IAKrD,QAAQ;IAIR,CAAC,OAAO,CAAC,MAAM,CAAC;IAIhB,GAAG,CAAC,KAAK,EAAE,GAAG;IAId,GAAG,CAAC,KAAK,EAAE,GAAG;IAId,GAAG,CAAC,MAAM,EAAE,MAAM;IAIlB,wGAAwG;IACxG,KAAK,CAAC,KAAK,EAAE,GAAG;IAIhB,UAAU,CAAC,OAAO,EAAE,OAAO;IAO3B,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;CAI7C"}
|
package/dest/gas/gas.js
CHANGED
package/dest/hash/hash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/hash/hash.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/hash/hash.ts"],"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AAmB,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAM/D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAEzD;AAED,wBAAsB,6BAA6B,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,eAMtG;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,EACb,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,EAAE,UAAU,CAAC;IACxB,OAAO,EAAE,EAAE,CAAC;IACZ,aAAa,EAAE,EAAE,CAAC;IAClB,OAAO,EAAE,EAAE,CAAC;CACb,MAEA"}
|
package/dest/hash/hash.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GeneratorIndex } from '@aztec/constants';
|
|
2
|
-
import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
3
2
|
import { poseidon2Hash, poseidon2HashWithSeparator, sha256ToField } from '@aztec/foundation/crypto';
|
|
4
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
5
4
|
/**
|
|
@@ -8,9 +7,7 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
8
7
|
* @returns The hash of the verification key.
|
|
9
8
|
*/ export async function hashVK(keyAsFields) {
|
|
10
9
|
// Should match the implementation in barretenberg/cpp/src/barretenberg/flavor/flavor.hpp > hash()
|
|
11
|
-
|
|
12
|
-
// Taking the last 16 bytes (128 bits) of the hash.
|
|
13
|
-
return new Fr(toBigIntBE(hash.subarray(Fr.SIZE_IN_BYTES - 16)));
|
|
10
|
+
return await poseidon2Hash(keyAsFields);
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
13
|
* Computes a note hash nonce, which will be used to create a unique note hash.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,EAA2C,MAAM,6BAA6B,CAAC;AAE1G,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAOnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,EACvE,OAAO,GAAG,MAAM,CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAiDvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { L2Block } from '../block/l2_block.js';
|
|
3
|
-
import { L2TipsSchema } from '../block/l2_block_source.js';
|
|
3
|
+
import { L2TipsSchema, ValidateBlockResultSchema } from '../block/l2_block_source.js';
|
|
4
4
|
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
5
5
|
import { ContractClassPublicSchema, ContractInstanceWithAddressSchema } from '../contract/index.js';
|
|
6
6
|
import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
@@ -47,5 +47,7 @@ export const ArchiverApiSchema = {
|
|
|
47
47
|
getDebugFunctionName: z.function().args(schemas.AztecAddress, schemas.FunctionSelector).returns(optional(z.string())),
|
|
48
48
|
getL1Constants: z.function().args().returns(L1RollupConstantsSchema),
|
|
49
49
|
getL1Timestamp: z.function().args().returns(schemas.BigInt),
|
|
50
|
-
syncImmediate: z.function().args().returns(z.void())
|
|
50
|
+
syncImmediate: z.function().args().returns(z.void()),
|
|
51
|
+
isPendingChainInvalid: z.function().args().returns(z.boolean()),
|
|
52
|
+
getPendingChainValidationStatus: z.function().args().returns(ValidateBlockResultSchema)
|
|
51
53
|
};
|