@aztec/aztec.js 0.0.0-test.1 → 0.0.1-commit.0208eb9
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/README.md +1 -1
- package/dest/account/account.d.ts +44 -0
- package/dest/account/account.d.ts.map +1 -0
- package/dest/account/account.js +31 -0
- package/dest/account/account_contract.d.ts +42 -0
- package/dest/account/account_contract.d.ts.map +1 -0
- package/dest/account/{contract.js → account_contract.js} +7 -4
- package/dest/account/account_with_secret_key.d.ts +36 -0
- package/dest/account/account_with_secret_key.d.ts.map +1 -0
- package/dest/{wallet/account_wallet_with_private_key.js → account/account_with_secret_key.js} +22 -5
- package/dest/account/index.d.ts +6 -9
- package/dest/account/index.d.ts.map +1 -1
- package/dest/account/index.js +4 -6
- package/dest/account/signerless_account.d.ts +22 -0
- package/dest/account/signerless_account.d.ts.map +1 -0
- package/dest/account/signerless_account.js +24 -0
- package/dest/api/abi.d.ts +3 -2
- package/dest/api/abi.d.ts.map +1 -1
- package/dest/api/abi.js +1 -1
- package/dest/api/account.d.ts +5 -3
- package/dest/api/account.d.ts.map +1 -1
- package/dest/api/account.js +3 -2
- package/dest/api/addresses.d.ts +2 -1
- package/dest/api/addresses.d.ts.map +1 -1
- package/dest/api/addresses.js +1 -0
- package/dest/api/authorization.d.ts +5 -0
- package/dest/api/authorization.d.ts.map +1 -0
- package/dest/api/authorization.js +4 -0
- package/dest/api/block.d.ts +3 -0
- package/dest/api/block.d.ts.map +1 -0
- package/dest/api/block.js +2 -0
- package/dest/api/contract.d.ts +55 -0
- package/dest/api/contract.d.ts.map +1 -0
- package/dest/api/contract.js +53 -0
- package/dest/api/crypto.d.ts +2 -0
- package/dest/api/crypto.d.ts.map +1 -0
- package/dest/api/crypto.js +1 -0
- package/dest/api/deployment.d.ts +5 -4
- package/dest/api/deployment.d.ts.map +1 -1
- package/dest/api/deployment.js +4 -3
- package/dest/api/eth_address.d.ts +1 -1
- package/dest/api/ethereum.d.ts +2 -0
- package/dest/api/ethereum.d.ts.map +1 -0
- package/dest/api/ethereum.js +1 -0
- package/dest/api/events.d.ts +12 -0
- package/dest/api/events.d.ts.map +1 -0
- package/dest/api/events.js +30 -0
- package/dest/api/fee.d.ts +2 -2
- package/dest/api/fee.d.ts.map +1 -1
- package/dest/api/fee.js +1 -1
- package/dest/api/fee_testing.d.ts +2 -0
- package/dest/api/fee_testing.d.ts.map +1 -0
- package/dest/api/fee_testing.js +1 -0
- package/dest/api/fields.d.ts +3 -2
- package/dest/api/fields.d.ts.map +1 -1
- package/dest/api/fields.js +2 -1
- package/dest/api/keys.d.ts +4 -0
- package/dest/api/keys.d.ts.map +1 -0
- package/dest/api/keys.js +3 -0
- package/dest/api/log.d.ts +2 -1
- package/dest/api/log.d.ts.map +1 -1
- package/dest/api/log.js +1 -0
- package/dest/api/messaging.d.ts +3 -0
- package/dest/api/messaging.d.ts.map +1 -0
- package/dest/api/messaging.js +2 -0
- package/dest/api/node.d.ts +25 -0
- package/dest/api/node.d.ts.map +1 -0
- package/dest/api/node.js +22 -0
- package/dest/api/note.d.ts +2 -0
- package/dest/api/note.d.ts.map +1 -0
- package/dest/api/note.js +1 -0
- package/dest/api/protocol.d.ts +9 -0
- package/dest/api/protocol.d.ts.map +1 -0
- package/dest/api/protocol.js +8 -0
- package/dest/api/trees.d.ts +3 -0
- package/dest/api/trees.d.ts.map +1 -0
- package/dest/api/trees.js +2 -0
- package/dest/api/tx.d.ts +2 -0
- package/dest/api/tx.d.ts.map +1 -0
- package/dest/api/tx.js +1 -0
- package/dest/api/utils.d.ts +13 -0
- package/dest/api/utils.d.ts.map +1 -0
- package/dest/api/utils.js +12 -0
- package/dest/api/wallet.d.ts +5 -2
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +4 -1
- package/dest/authorization/call_authorization_request.d.ts +67 -0
- package/dest/authorization/call_authorization_request.d.ts.map +1 -0
- package/dest/authorization/call_authorization_request.js +49 -0
- package/dest/contract/base_contract_interaction.d.ts +18 -84
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +11 -136
- package/dest/contract/batch_call.d.ts +19 -21
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +89 -69
- package/dest/contract/checker.d.ts +2 -2
- package/dest/contract/checker.d.ts.map +1 -1
- package/dest/contract/checker.js +2 -2
- package/dest/contract/contract.d.ts +9 -8
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract.js +10 -20
- package/dest/contract/contract_base.d.ts +8 -18
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_base.js +7 -14
- package/dest/contract/contract_function_interaction.d.ts +53 -45
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +78 -74
- package/dest/contract/deploy_method.d.ts +155 -62
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +152 -142
- package/dest/contract/get_gas_limits.d.ts +6 -7
- package/dest/contract/get_gas_limits.d.ts.map +1 -1
- package/dest/contract/get_gas_limits.js +9 -3
- package/dest/contract/interaction_options.d.ts +151 -0
- package/dest/contract/interaction_options.d.ts.map +1 -0
- package/dest/contract/interaction_options.js +53 -0
- package/dest/contract/protocol_contracts/auth-registry.d.ts +27 -0
- package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/auth-registry.js +558 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts +26 -0
- package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-class-registry.js +385 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +22 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/contract-instance-registry.js +465 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts +21 -0
- package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/fee-juice.js +426 -0
- package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
- package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/multi-call-entrypoint.js +585 -0
- package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
- package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
- package/dest/contract/protocol_contracts/public-checks.js +593 -0
- package/dest/contract/wait_for_proven.d.ts +17 -0
- package/dest/contract/wait_for_proven.d.ts.map +1 -0
- package/dest/contract/wait_for_proven.js +17 -0
- package/dest/contract/wait_opts.d.ts +16 -0
- package/dest/contract/wait_opts.d.ts.map +1 -0
- package/dest/contract/wait_opts.js +5 -0
- package/dest/deployment/broadcast_function.d.ts +4 -4
- package/dest/deployment/broadcast_function.d.ts.map +1 -1
- package/dest/deployment/broadcast_function.js +28 -24
- package/dest/deployment/contract_deployer.d.ts +2 -2
- package/dest/deployment/contract_deployer.d.ts.map +1 -1
- package/dest/deployment/contract_deployer.js +1 -1
- package/dest/deployment/publish_class.d.ts +6 -0
- package/dest/deployment/publish_class.d.ts.map +1 -0
- package/dest/deployment/publish_class.js +17 -0
- package/dest/deployment/publish_instance.d.ts +10 -0
- package/dest/deployment/publish_instance.d.ts.map +1 -0
- package/dest/deployment/publish_instance.js +11 -0
- package/dest/ethereum/portal_manager.d.ts +141 -0
- package/dest/ethereum/portal_manager.d.ts.map +1 -0
- package/dest/ethereum/portal_manager.js +345 -0
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +17 -12
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.js +27 -17
- package/dest/fee/fee_payment_method.d.ts +12 -8
- package/dest/fee/fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.d.ts +26 -9
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.js +45 -23
- package/dest/fee/public_fee_payment_method.d.ts +27 -10
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.js +47 -25
- package/dest/fee/sponsored_fee_payment.d.ts +17 -0
- package/dest/fee/sponsored_fee_payment.d.ts.map +1 -0
- package/dest/fee/sponsored_fee_payment.js +34 -0
- package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
- package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
- package/dest/scripts/generate_protocol_contract_types.js +120 -0
- package/dest/utils/abi_types.d.ts +2 -4
- package/dest/utils/abi_types.d.ts.map +1 -1
- package/dest/utils/authwit.d.ts +85 -26
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +234 -41
- package/dest/utils/cross_chain.d.ts +24 -0
- package/dest/utils/cross_chain.d.ts.map +1 -0
- package/dest/utils/cross_chain.js +30 -0
- package/dest/utils/fee_juice.d.ts +4 -3
- package/dest/utils/fee_juice.d.ts.map +1 -1
- package/dest/utils/fee_juice.js +4 -3
- package/dest/utils/field_compressed_string.d.ts +1 -1
- package/dest/utils/field_compressed_string.d.ts.map +1 -1
- package/dest/utils/field_compressed_string.js +1 -1
- package/dest/utils/node.d.ts +13 -2
- package/dest/utils/node.d.ts.map +1 -1
- package/dest/utils/node.js +47 -1
- package/dest/utils/pub_key.d.ts +2 -2
- package/dest/utils/pub_key.d.ts.map +1 -1
- package/dest/utils/pub_key.js +2 -3
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +31 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.js +61 -0
- package/dest/wallet/account_manager.d.ts +63 -0
- package/dest/wallet/account_manager.d.ts.map +1 -0
- package/dest/wallet/account_manager.js +107 -0
- package/dest/wallet/capabilities.d.ts +444 -0
- package/dest/wallet/capabilities.d.ts.map +1 -0
- package/dest/wallet/capabilities.js +3 -0
- package/dest/wallet/deploy_account_method.d.ts +80 -0
- package/dest/wallet/deploy_account_method.d.ts.map +1 -0
- package/dest/wallet/deploy_account_method.js +79 -0
- package/dest/wallet/index.d.ts +4 -17
- package/dest/wallet/index.d.ts.map +1 -1
- package/dest/wallet/index.js +3 -20
- package/dest/wallet/wallet.d.ts +2590 -0
- package/dest/wallet/wallet.d.ts.map +1 -0
- package/dest/wallet/wallet.js +291 -0
- package/package.json +47 -36
- package/src/account/account.ts +72 -0
- package/src/account/account_contract.ts +66 -0
- package/src/account/account_with_secret_key.ts +63 -0
- package/src/account/index.ts +5 -8
- package/src/account/signerless_account.ts +46 -0
- package/src/api/abi.ts +26 -0
- package/src/api/account.ts +8 -5
- package/src/api/addresses.ts +1 -0
- package/src/api/authorization.ts +15 -0
- package/src/api/block.ts +2 -0
- package/src/api/contract.ts +88 -0
- package/src/api/crypto.ts +1 -0
- package/src/api/deployment.ts +4 -3
- package/src/api/ethereum.ts +10 -0
- package/src/api/events.ts +44 -0
- package/src/api/fee.ts +1 -1
- package/src/api/fee_testing.ts +1 -0
- package/src/api/fields.ts +2 -1
- package/src/api/keys.ts +8 -0
- package/src/api/log.ts +1 -0
- package/src/api/messaging.ts +2 -0
- package/src/api/node.ts +24 -0
- package/src/api/note.ts +1 -0
- package/src/api/protocol.ts +9 -0
- package/src/api/trees.ts +2 -0
- package/src/api/tx.ts +15 -0
- package/src/api/utils.ts +14 -0
- package/src/api/wallet.ts +72 -5
- package/src/authorization/call_authorization_request.ts +63 -0
- package/src/contract/base_contract_interaction.ts +40 -171
- package/src/contract/batch_call.ts +108 -57
- package/src/contract/checker.ts +8 -3
- package/src/contract/contract.ts +14 -21
- package/src/contract/contract_base.ts +9 -26
- package/src/contract/contract_function_interaction.ts +135 -106
- package/src/contract/deploy_method.ts +307 -143
- package/src/contract/get_gas_limits.ts +15 -8
- package/src/contract/interaction_options.ts +208 -0
- package/src/contract/protocol_contracts/auth-registry.ts +351 -0
- package/src/contract/protocol_contracts/contract-class-registry.ts +241 -0
- package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
- package/src/contract/protocol_contracts/fee-juice.ts +264 -0
- package/src/contract/protocol_contracts/multi-call-entrypoint.ts +332 -0
- package/src/contract/protocol_contracts/public-checks.ts +316 -0
- package/src/contract/wait_for_proven.ts +38 -0
- package/src/contract/wait_opts.ts +21 -0
- package/src/deployment/broadcast_function.ts +58 -58
- package/src/deployment/contract_deployer.ts +4 -3
- package/src/deployment/publish_class.ts +34 -0
- package/src/deployment/publish_instance.ts +23 -0
- package/src/{api/ethereum → ethereum}/portal_manager.ts +166 -89
- package/src/fee/fee_juice_payment_method_with_claim.ts +49 -34
- package/src/fee/fee_payment_method.ts +11 -7
- package/src/fee/private_fee_payment_method.ts +80 -58
- package/src/fee/public_fee_payment_method.ts +94 -68
- package/src/fee/sponsored_fee_payment.ts +46 -0
- package/src/scripts/generate_protocol_contract_types.ts +150 -0
- package/src/utils/abi_types.ts +1 -1
- package/src/utils/authwit.ts +274 -54
- package/src/utils/cross_chain.ts +53 -0
- package/src/utils/fee_juice.ts +5 -5
- package/src/utils/field_compressed_string.ts +1 -1
- package/src/utils/node.ts +63 -1
- package/src/utils/pub_key.ts +3 -4
- package/src/wallet/account_entrypoint_meta_payment_method.ts +74 -0
- package/src/wallet/account_manager.ts +146 -0
- package/src/wallet/capabilities.ts +491 -0
- package/src/wallet/deploy_account_method.ts +150 -0
- package/src/wallet/index.ts +3 -33
- package/src/wallet/wallet.ts +533 -0
- package/dest/account/contract.d.ts +0 -37
- package/dest/account/contract.d.ts.map +0 -1
- package/dest/account/interface.d.ts +0 -31
- package/dest/account/interface.d.ts.map +0 -1
- package/dest/account/interface.js +0 -4
- package/dest/account/wallet.d.ts +0 -11
- package/dest/account/wallet.d.ts.map +0 -1
- package/dest/account/wallet.js +0 -3
- package/dest/account_manager/deploy_account_method.d.ts +0 -15
- package/dest/account_manager/deploy_account_method.d.ts.map +0 -1
- package/dest/account_manager/deploy_account_method.js +0 -43
- package/dest/account_manager/deploy_account_sent_tx.d.ts +0 -30
- package/dest/account_manager/deploy_account_sent_tx.d.ts.map +0 -1
- package/dest/account_manager/deploy_account_sent_tx.js +0 -29
- package/dest/account_manager/index.d.ts +0 -108
- package/dest/account_manager/index.d.ts.map +0 -1
- package/dest/account_manager/index.js +0 -159
- package/dest/api/cheat_codes.d.ts +0 -26
- package/dest/api/cheat_codes.d.ts.map +0 -1
- package/dest/api/cheat_codes.js +0 -25
- package/dest/api/entrypoint.d.ts +0 -2
- package/dest/api/entrypoint.d.ts.map +0 -1
- package/dest/api/entrypoint.js +0 -1
- package/dest/api/ethereum/anvil_test_watcher.d.ts +0 -32
- package/dest/api/ethereum/anvil_test_watcher.d.ts.map +0 -1
- package/dest/api/ethereum/anvil_test_watcher.js +0 -133
- package/dest/api/ethereum/chain_monitor.d.ts +0 -25
- package/dest/api/ethereum/chain_monitor.d.ts.map +0 -1
- package/dest/api/ethereum/chain_monitor.js +0 -74
- package/dest/api/ethereum/cheat_codes.d.ts +0 -63
- package/dest/api/ethereum/cheat_codes.d.ts.map +0 -1
- package/dest/api/ethereum/cheat_codes.js +0 -162
- package/dest/api/ethereum/index.d.ts +0 -7
- package/dest/api/ethereum/index.d.ts.map +0 -1
- package/dest/api/ethereum/index.js +0 -6
- package/dest/api/ethereum/l1_contracts.d.ts +0 -3
- package/dest/api/ethereum/l1_contracts.d.ts.map +0 -1
- package/dest/api/ethereum/l1_contracts.js +0 -13
- package/dest/api/ethereum/portal_manager.d.ts +0 -136
- package/dest/api/ethereum/portal_manager.d.ts.map +0 -1
- package/dest/api/ethereum/portal_manager.js +0 -286
- package/dest/api/interfaces/pxe.d.ts +0 -2
- package/dest/api/interfaces/pxe.d.ts.map +0 -1
- package/dest/api/interfaces/pxe.js +0 -1
- package/dest/api/log_id.d.ts +0 -2
- package/dest/api/log_id.d.ts.map +0 -1
- package/dest/api/log_id.js +0 -1
- package/dest/api/tx_hash.d.ts +0 -2
- package/dest/api/tx_hash.d.ts.map +0 -1
- package/dest/api/tx_hash.js +0 -1
- package/dest/contract/deploy_proven_tx.d.ts +0 -21
- package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
- package/dest/contract/deploy_proven_tx.js +0 -19
- package/dest/contract/deploy_sent_tx.d.ts +0 -45
- package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
- package/dest/contract/deploy_sent_tx.js +0 -43
- package/dest/contract/index.d.ts +0 -45
- package/dest/contract/index.d.ts.map +0 -1
- package/dest/contract/index.js +0 -43
- package/dest/contract/protocol_contracts.d.ts +0 -9
- package/dest/contract/protocol_contracts.d.ts.map +0 -1
- package/dest/contract/protocol_contracts.js +0 -26
- package/dest/contract/proven_tx.d.ts +0 -17
- package/dest/contract/proven_tx.d.ts.map +0 -1
- package/dest/contract/proven_tx.js +0 -22
- package/dest/contract/sent_tx.d.ts +0 -61
- package/dest/contract/sent_tx.d.ts.map +0 -1
- package/dest/contract/sent_tx.js +0 -102
- package/dest/contract/unsafe_contract.d.ts +0 -15
- package/dest/contract/unsafe_contract.d.ts.map +0 -1
- package/dest/contract/unsafe_contract.js +0 -6
- package/dest/deployment/deploy_instance.d.ts +0 -10
- package/dest/deployment/deploy_instance.d.ts.map +0 -1
- package/dest/deployment/deploy_instance.js +0 -14
- package/dest/deployment/index.d.ts +0 -2
- package/dest/deployment/index.d.ts.map +0 -1
- package/dest/deployment/index.js +0 -1
- package/dest/deployment/register_class.d.ts +0 -6
- package/dest/deployment/register_class.d.ts.map +0 -1
- package/dest/deployment/register_class.js +0 -22
- package/dest/entrypoint/default_entrypoint.d.ts +0 -12
- package/dest/entrypoint/default_entrypoint.d.ts.map +0 -1
- package/dest/entrypoint/default_entrypoint.js +0 -28
- package/dest/entrypoint/default_multi_call_entrypoint.d.ts +0 -15
- package/dest/entrypoint/default_multi_call_entrypoint.d.ts.map +0 -1
- package/dest/entrypoint/default_multi_call_entrypoint.js +0 -130
- package/dest/entrypoint/entrypoint.d.ts +0 -35
- package/dest/entrypoint/entrypoint.d.ts.map +0 -1
- package/dest/entrypoint/entrypoint.js +0 -4
- package/dest/entrypoint/payload.d.ts +0 -128
- package/dest/entrypoint/payload.d.ts.map +0 -1
- package/dest/entrypoint/payload.js +0 -143
- package/dest/fee/fee_juice_payment_method.d.ts +0 -14
- package/dest/fee/fee_juice_payment_method.d.ts.map +0 -1
- package/dest/fee/fee_juice_payment_method.js +0 -20
- package/dest/index.d.ts +0 -66
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -69
- package/dest/rpc_clients/index.d.ts +0 -3
- package/dest/rpc_clients/index.d.ts.map +0 -1
- package/dest/rpc_clients/index.js +0 -2
- package/dest/rpc_clients/node/index.d.ts +0 -12
- package/dest/rpc_clients/node/index.d.ts.map +0 -1
- package/dest/rpc_clients/node/index.js +0 -78
- package/dest/rpc_clients/pxe_client.d.ts +0 -10
- package/dest/rpc_clients/pxe_client.d.ts.map +0 -1
- package/dest/rpc_clients/pxe_client.js +0 -23
- package/dest/utils/aztec_cheatcodes.d.ts +0 -59
- package/dest/utils/aztec_cheatcodes.d.ts.map +0 -1
- package/dest/utils/aztec_cheatcodes.js +0 -62
- package/dest/utils/index.d.ts +0 -8
- package/dest/utils/index.d.ts.map +0 -1
- package/dest/utils/index.js +0 -6
- package/dest/utils/pxe.d.ts +0 -4
- package/dest/utils/pxe.d.ts.map +0 -1
- package/dest/utils/pxe.js +0 -14
- package/dest/wallet/account_wallet.d.ts +0 -76
- package/dest/wallet/account_wallet.d.ts.map +0 -1
- package/dest/wallet/account_wallet.js +0 -231
- package/dest/wallet/account_wallet_with_private_key.d.ts +0 -26
- package/dest/wallet/account_wallet_with_private_key.d.ts.map +0 -1
- package/dest/wallet/base_wallet.d.ts +0 -73
- package/dest/wallet/base_wallet.d.ts.map +0 -1
- package/dest/wallet/base_wallet.js +0 -123
- package/dest/wallet/signerless_wallet.d.ts +0 -25
- package/dest/wallet/signerless_wallet.d.ts.map +0 -1
- package/dest/wallet/signerless_wallet.js +0 -36
- package/src/account/contract.ts +0 -56
- package/src/account/interface.ts +0 -36
- package/src/account/wallet.ts +0 -13
- package/src/account_manager/deploy_account_method.ts +0 -86
- package/src/account_manager/deploy_account_sent_tx.ts +0 -42
- package/src/account_manager/index.ts +0 -229
- package/src/api/cheat_codes.ts +0 -35
- package/src/api/entrypoint.ts +0 -1
- package/src/api/ethereum/anvil_test_watcher.ts +0 -158
- package/src/api/ethereum/chain_monitor.ts +0 -88
- package/src/api/ethereum/cheat_codes.ts +0 -184
- package/src/api/ethereum/index.ts +0 -19
- package/src/api/ethereum/l1_contracts.ts +0 -21
- package/src/api/interfaces/pxe.ts +0 -1
- package/src/api/log_id.ts +0 -1
- package/src/api/tx_hash.ts +0 -1
- package/src/contract/deploy_proven_tx.ts +0 -34
- package/src/contract/deploy_sent_tx.ts +0 -74
- package/src/contract/index.ts +0 -48
- package/src/contract/protocol_contracts.ts +0 -35
- package/src/contract/proven_tx.ts +0 -42
- package/src/contract/sent_tx.ts +0 -141
- package/src/contract/unsafe_contract.ts +0 -19
- package/src/deployment/deploy_instance.ts +0 -31
- package/src/deployment/index.ts +0 -1
- package/src/deployment/register_class.ts +0 -44
- package/src/entrypoint/default_entrypoint.ts +0 -39
- package/src/entrypoint/default_multi_call_entrypoint.ts +0 -93
- package/src/entrypoint/entrypoint.ts +0 -39
- package/src/entrypoint/payload.ts +0 -238
- package/src/fee/fee_juice_payment_method.ts +0 -26
- package/src/index.ts +0 -106
- package/src/rpc_clients/index.ts +0 -2
- package/src/rpc_clients/node/index.ts +0 -77
- package/src/rpc_clients/pxe_client.ts +0 -25
- package/src/utils/aztec_cheatcodes.ts +0 -77
- package/src/utils/index.ts +0 -21
- package/src/utils/pxe.ts +0 -17
- package/src/wallet/account_wallet.ts +0 -242
- package/src/wallet/account_wallet_with_private_key.ts +0 -40
- package/src/wallet/base_wallet.ts +0 -198
- package/src/wallet/signerless_wallet.ts +0 -52
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { FieldsOf } from '@aztec/foundation/types';
|
|
2
|
+
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
3
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
5
|
+
import type { Capsule, OffchainEffect, SimulationStats, TxHash, TxReceipt } from '@aztec/stdlib/tx';
|
|
6
|
+
|
|
7
|
+
import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
|
|
8
|
+
import type { ProfileOptions, SendOptions, SimulateOptions } from '../wallet/index.js';
|
|
9
|
+
import type { WaitOpts } from './wait_opts.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Options used to tweak the simulation and add gas estimation capabilities
|
|
13
|
+
*/
|
|
14
|
+
export type FeeEstimationOptions = {
|
|
15
|
+
/** Whether to modify the fee settings of the simulation with high gas limit to figure out actual gas settings. */
|
|
16
|
+
estimateGas?: boolean;
|
|
17
|
+
/** Percentage to pad the estimated gas limits by, if empty, defaults to 0.1. Only relevant if estimateGas is set. */
|
|
18
|
+
estimatedGasPadding?: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Interactions allow configuring a custom fee payment method that gets bundled with the transaction before
|
|
23
|
+
* sending it to the wallet
|
|
24
|
+
*/
|
|
25
|
+
export type FeePaymentMethodOption = {
|
|
26
|
+
/** Fee payment method to embed in the interaction */
|
|
27
|
+
paymentMethod?: FeePaymentMethod;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* User-defined partial gas settings for the interaction. This type is completely optional since
|
|
32
|
+
* the wallet will fill in the missing options
|
|
33
|
+
*/
|
|
34
|
+
export type GasSettingsOption = {
|
|
35
|
+
/** The gas settings */
|
|
36
|
+
gasSettings?: Partial<FieldsOf<GasSettings>>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Fee options as set by a user. */
|
|
40
|
+
export type InteractionFeeOptions = GasSettingsOption & FeePaymentMethodOption;
|
|
41
|
+
|
|
42
|
+
/** Fee options that can be set for simulation *only* */
|
|
43
|
+
export type SimulationInteractionFeeOptions = InteractionFeeOptions & FeeEstimationOptions;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Represents the options to configure a request from a contract interaction.
|
|
47
|
+
* Allows specifying additional auth witnesses and capsules to use during execution
|
|
48
|
+
*/
|
|
49
|
+
export type RequestInteractionOptions = {
|
|
50
|
+
/** Extra authwits to use during execution */
|
|
51
|
+
authWitnesses?: AuthWitness[];
|
|
52
|
+
/** Extra capsules to use during execution */
|
|
53
|
+
capsules?: Capsule[];
|
|
54
|
+
/** Fee payment method to embed in the interaction request */
|
|
55
|
+
fee?: FeePaymentMethodOption;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constant for explicitly not waiting for transaction confirmation.
|
|
60
|
+
* We use this instead of false to avoid confusion with falsy checks.
|
|
61
|
+
*/
|
|
62
|
+
export const NO_WAIT = 'NO_WAIT' as const;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Type for the NO_WAIT constant.
|
|
66
|
+
*/
|
|
67
|
+
export type NoWait = typeof NO_WAIT;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Type for wait options in interactions.
|
|
71
|
+
* - NO_WAIT symbol: Don't wait for confirmation, return TxHash immediately
|
|
72
|
+
* - WaitOpts object: Wait with custom options and return receipt/result
|
|
73
|
+
* - undefined: Wait with default options and return receipt/result
|
|
74
|
+
*/
|
|
75
|
+
export type InteractionWaitOptions = NoWait | WaitOpts | undefined;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Base options for calling a (constrained) function in a contract, without wait parameter.
|
|
79
|
+
*/
|
|
80
|
+
export type SendInteractionOptionsWithoutWait = RequestInteractionOptions & {
|
|
81
|
+
/** The sender's Aztec address. */
|
|
82
|
+
from: AztecAddress;
|
|
83
|
+
/** The fee options for the transaction. */
|
|
84
|
+
fee?: InteractionFeeOptions;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Represents options for calling a (constrained) function in a contract.
|
|
89
|
+
*/
|
|
90
|
+
export type SendInteractionOptions<W extends InteractionWaitOptions = undefined> = SendInteractionOptionsWithoutWait & {
|
|
91
|
+
/**
|
|
92
|
+
* Whether to wait for the transaction to be mined.
|
|
93
|
+
* - undefined (default): wait with default options and return TxReceipt
|
|
94
|
+
* - WaitOpts object: wait with custom options and return TxReceipt
|
|
95
|
+
* - NO_WAIT: return txHash immediately without waiting
|
|
96
|
+
*/
|
|
97
|
+
wait?: W;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Represents the options for simulating a contract function interaction.
|
|
102
|
+
* Allows specifying the address from which the method should be called.
|
|
103
|
+
* Disregarded for simulation of public functions
|
|
104
|
+
*/
|
|
105
|
+
export type SimulateInteractionOptions = Omit<SendInteractionOptions, 'fee'> & {
|
|
106
|
+
/** The fee options for the transaction. */
|
|
107
|
+
fee?: SimulationInteractionFeeOptions;
|
|
108
|
+
/** Simulate without checking for the validity of the resulting transaction, e.g. whether it emits any existing nullifiers. */
|
|
109
|
+
skipTxValidation?: boolean;
|
|
110
|
+
/** Whether to ensure the fee payer is not empty and has enough balance to pay for the fee. */
|
|
111
|
+
skipFeeEnforcement?: boolean;
|
|
112
|
+
/** Whether to include metadata such as offchain effects and performance statistics (e.g. timing information of the different circuits and oracles) in
|
|
113
|
+
* the simulation result, instead of just the return value of the function */
|
|
114
|
+
includeMetadata?: boolean;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Represents the options for profiling an interaction.
|
|
119
|
+
*/
|
|
120
|
+
export type ProfileInteractionOptions = SimulateInteractionOptions & {
|
|
121
|
+
/** Whether to return gates information or the bytecode/witnesses. */
|
|
122
|
+
profileMode: 'gates' | 'execution-steps' | 'full';
|
|
123
|
+
/** Whether to generate a Chonk proof or not */
|
|
124
|
+
skipProofGeneration?: boolean;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Represents the result type of a simulation.
|
|
129
|
+
* By default, it will just be the return value of the simulated function
|
|
130
|
+
* If `includeMetadata` is set to true in `SimulateInteractionOptions` on the input of `simulate(...)`,
|
|
131
|
+
* it will provide extra information.
|
|
132
|
+
*/
|
|
133
|
+
export type SimulationReturn<T extends boolean | undefined> = T extends true
|
|
134
|
+
? {
|
|
135
|
+
/** Additional stats about the simulation */
|
|
136
|
+
stats: SimulationStats;
|
|
137
|
+
/** Offchain effects generated during the simulation */
|
|
138
|
+
offchainEffects: OffchainEffect[];
|
|
139
|
+
/** Return value of the function */
|
|
140
|
+
result: any;
|
|
141
|
+
/** Gas estimation results */
|
|
142
|
+
estimatedGas: Pick<GasSettings, 'gasLimits' | 'teardownGasLimits'>;
|
|
143
|
+
}
|
|
144
|
+
: any;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Represents the result type of sending a transaction.
|
|
148
|
+
* If `wait` is NO_WAIT, returns TxHash immediately without waiting.
|
|
149
|
+
* If `wait` is undefined or WaitOpts, returns TReturn (defaults to TxReceipt) after waiting.
|
|
150
|
+
*/
|
|
151
|
+
export type SendReturn<T extends InteractionWaitOptions, TReturn = TxReceipt> = T extends NoWait ? TxHash : TReturn;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Transforms and cleans up the higher level SendInteractionOptions defined by the interaction into
|
|
155
|
+
* SendOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
156
|
+
* @param options - The send interaction options with optional wait parameter
|
|
157
|
+
* @returns The send options to forward to the wallet
|
|
158
|
+
*/
|
|
159
|
+
export function toSendOptions<W extends InteractionWaitOptions = undefined>(
|
|
160
|
+
options: SendInteractionOptions<W>,
|
|
161
|
+
): SendOptions<W> {
|
|
162
|
+
return {
|
|
163
|
+
...options,
|
|
164
|
+
fee: {
|
|
165
|
+
// If a payment method that includes gas settings was used,
|
|
166
|
+
// try to reuse as much as possible while still allowing
|
|
167
|
+
// manual override. CAREFUL: this can cause mismatches during proving
|
|
168
|
+
gasSettings: {
|
|
169
|
+
...options.fee?.paymentMethod?.getGasSettings(),
|
|
170
|
+
...options.fee?.gasSettings,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
wait: options.wait, // Pass through wait option
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Transforms and cleans up the higher level SimulateInteractionOptions defined by the interaction into
|
|
179
|
+
* SimulateOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
180
|
+
*/
|
|
181
|
+
export function toSimulateOptions(options: SimulateInteractionOptions): SimulateOptions {
|
|
182
|
+
return {
|
|
183
|
+
...options,
|
|
184
|
+
fee: {
|
|
185
|
+
// If a payment method that includes gas settings was used,
|
|
186
|
+
// try to reuse as much as possible while still allowing
|
|
187
|
+
// manual override. CAREFUL: this can cause mismatches during proving
|
|
188
|
+
gasSettings: {
|
|
189
|
+
...options.fee?.paymentMethod?.getGasSettings(),
|
|
190
|
+
...options.fee?.gasSettings,
|
|
191
|
+
},
|
|
192
|
+
estimateGas: options.fee?.estimateGas,
|
|
193
|
+
estimatedGasPadding: options.fee?.estimatedGasPadding,
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Transforms and cleans up the higher level ProfileInteractionOptions defined by the interaction into
|
|
200
|
+
* ProfileOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
201
|
+
*/
|
|
202
|
+
export function toProfileOptions(options: ProfileInteractionOptions): ProfileOptions {
|
|
203
|
+
return {
|
|
204
|
+
...toSimulateOptions(options),
|
|
205
|
+
profileMode: options.profileMode,
|
|
206
|
+
skipProofGeneration: options.skipProofGeneration,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/* Autogenerated file, do not edit! */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
4
|
+
import { FunctionType } from '@aztec/stdlib/abi';
|
|
5
|
+
|
|
6
|
+
import type { ContractArtifact } from '../../api/abi.js';
|
|
7
|
+
import { PublicKeys } from '../../api/keys.js';
|
|
8
|
+
import type {
|
|
9
|
+
AztecAddressLike,
|
|
10
|
+
EthAddressLike,
|
|
11
|
+
FieldLike,
|
|
12
|
+
FunctionSelectorLike,
|
|
13
|
+
WrappedFieldLike,
|
|
14
|
+
} from '../../utils/abi_types.js';
|
|
15
|
+
import type { Wallet } from '../../wallet/wallet.js';
|
|
16
|
+
import { ContractBase, type ContractMethod } from '../contract_base.js';
|
|
17
|
+
import { ContractFunctionInteraction } from '../contract_function_interaction.js';
|
|
18
|
+
|
|
19
|
+
const AuthRegistryContractArtifact: ContractArtifact = {
|
|
20
|
+
name: 'AuthRegistry',
|
|
21
|
+
functions: [
|
|
22
|
+
{
|
|
23
|
+
...{
|
|
24
|
+
functionType: FunctionType.PUBLIC,
|
|
25
|
+
name: 'public_dispatch',
|
|
26
|
+
isOnlySelf: false,
|
|
27
|
+
isStatic: false,
|
|
28
|
+
isInitializer: false,
|
|
29
|
+
parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
|
|
30
|
+
returnTypes: [],
|
|
31
|
+
errorTypes: {
|
|
32
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
33
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
34
|
+
'5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
|
|
35
|
+
'11691217184967371519': {
|
|
36
|
+
error_kind: 'string',
|
|
37
|
+
string: 'Function is_reject_all can only be called statically',
|
|
38
|
+
},
|
|
39
|
+
'12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
|
|
40
|
+
'13455385521185560676': {
|
|
41
|
+
error_kind: 'string',
|
|
42
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
43
|
+
},
|
|
44
|
+
'13929691561421487185': {
|
|
45
|
+
error_kind: 'string',
|
|
46
|
+
string: 'Function _set_authorized can only be called by the same contract',
|
|
47
|
+
},
|
|
48
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
49
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
50
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
51
|
+
'17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
|
|
52
|
+
'17312933876399746100': {
|
|
53
|
+
error_kind: 'string',
|
|
54
|
+
string: 'Function is_consumable can only be called statically',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
bytecode: Buffer.from([]),
|
|
59
|
+
debugSymbols: '',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
...{
|
|
63
|
+
functionType: FunctionType.PRIVATE,
|
|
64
|
+
name: 'set_authorized_private',
|
|
65
|
+
isOnlySelf: false,
|
|
66
|
+
isStatic: false,
|
|
67
|
+
isInitializer: false,
|
|
68
|
+
parameters: [
|
|
69
|
+
{
|
|
70
|
+
name: 'approver',
|
|
71
|
+
type: {
|
|
72
|
+
kind: 'struct',
|
|
73
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
74
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
75
|
+
},
|
|
76
|
+
visibility: 'private',
|
|
77
|
+
},
|
|
78
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
79
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
80
|
+
],
|
|
81
|
+
returnTypes: [],
|
|
82
|
+
errorTypes: {
|
|
83
|
+
'7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
|
|
84
|
+
'9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
|
|
85
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
86
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
bytecode: Buffer.from([]),
|
|
90
|
+
debugSymbols: '',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
...{
|
|
94
|
+
functionType: FunctionType.UTILITY,
|
|
95
|
+
name: 'utility_is_consumable',
|
|
96
|
+
isOnlySelf: false,
|
|
97
|
+
isStatic: false,
|
|
98
|
+
isInitializer: false,
|
|
99
|
+
parameters: [
|
|
100
|
+
{
|
|
101
|
+
name: 'on_behalf_of',
|
|
102
|
+
type: {
|
|
103
|
+
kind: 'struct',
|
|
104
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
105
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
106
|
+
},
|
|
107
|
+
visibility: 'private',
|
|
108
|
+
},
|
|
109
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
110
|
+
],
|
|
111
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
112
|
+
errorTypes: {
|
|
113
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
114
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
115
|
+
'13455385521185560676': {
|
|
116
|
+
error_kind: 'string',
|
|
117
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
118
|
+
},
|
|
119
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
120
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
121
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
bytecode: Buffer.from([]),
|
|
125
|
+
debugSymbols: '',
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
nonDispatchPublicFunctions: [
|
|
129
|
+
{
|
|
130
|
+
functionType: FunctionType.PUBLIC,
|
|
131
|
+
name: '_set_authorized',
|
|
132
|
+
isOnlySelf: true,
|
|
133
|
+
isStatic: false,
|
|
134
|
+
isInitializer: false,
|
|
135
|
+
parameters: [
|
|
136
|
+
{
|
|
137
|
+
name: 'approver',
|
|
138
|
+
type: {
|
|
139
|
+
kind: 'struct',
|
|
140
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
141
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
142
|
+
},
|
|
143
|
+
visibility: 'private',
|
|
144
|
+
},
|
|
145
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
146
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
147
|
+
],
|
|
148
|
+
returnTypes: [],
|
|
149
|
+
errorTypes: {
|
|
150
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
151
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
152
|
+
'13455385521185560676': {
|
|
153
|
+
error_kind: 'string',
|
|
154
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
155
|
+
},
|
|
156
|
+
'13929691561421487185': {
|
|
157
|
+
error_kind: 'string',
|
|
158
|
+
string: 'Function _set_authorized can only be called by the same contract',
|
|
159
|
+
},
|
|
160
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
161
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
162
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
functionType: FunctionType.PUBLIC,
|
|
167
|
+
name: 'consume',
|
|
168
|
+
isOnlySelf: false,
|
|
169
|
+
isStatic: false,
|
|
170
|
+
isInitializer: false,
|
|
171
|
+
parameters: [
|
|
172
|
+
{
|
|
173
|
+
name: 'on_behalf_of',
|
|
174
|
+
type: {
|
|
175
|
+
kind: 'struct',
|
|
176
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
177
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
178
|
+
},
|
|
179
|
+
visibility: 'private',
|
|
180
|
+
},
|
|
181
|
+
{ name: 'inner_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
182
|
+
],
|
|
183
|
+
returnTypes: [{ kind: 'field' }],
|
|
184
|
+
errorTypes: {
|
|
185
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
186
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
187
|
+
'5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
|
|
188
|
+
'13455385521185560676': {
|
|
189
|
+
error_kind: 'string',
|
|
190
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
191
|
+
},
|
|
192
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
193
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
194
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
195
|
+
'17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
functionType: FunctionType.PUBLIC,
|
|
200
|
+
name: 'is_consumable',
|
|
201
|
+
isOnlySelf: false,
|
|
202
|
+
isStatic: true,
|
|
203
|
+
isInitializer: false,
|
|
204
|
+
parameters: [
|
|
205
|
+
{
|
|
206
|
+
name: 'on_behalf_of',
|
|
207
|
+
type: {
|
|
208
|
+
kind: 'struct',
|
|
209
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
210
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
211
|
+
},
|
|
212
|
+
visibility: 'private',
|
|
213
|
+
},
|
|
214
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
215
|
+
],
|
|
216
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
217
|
+
errorTypes: {
|
|
218
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
219
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
220
|
+
'13455385521185560676': {
|
|
221
|
+
error_kind: 'string',
|
|
222
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
223
|
+
},
|
|
224
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
225
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
226
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
227
|
+
'17312933876399746100': {
|
|
228
|
+
error_kind: 'string',
|
|
229
|
+
string: 'Function is_consumable can only be called statically',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
functionType: FunctionType.PUBLIC,
|
|
235
|
+
name: 'is_reject_all',
|
|
236
|
+
isOnlySelf: false,
|
|
237
|
+
isStatic: true,
|
|
238
|
+
isInitializer: false,
|
|
239
|
+
parameters: [
|
|
240
|
+
{
|
|
241
|
+
name: 'on_behalf_of',
|
|
242
|
+
type: {
|
|
243
|
+
kind: 'struct',
|
|
244
|
+
fields: [{ name: 'inner', type: { kind: 'field' } }],
|
|
245
|
+
path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
|
|
246
|
+
},
|
|
247
|
+
visibility: 'private',
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
returnTypes: [{ kind: 'boolean' }],
|
|
251
|
+
errorTypes: {
|
|
252
|
+
'11691217184967371519': {
|
|
253
|
+
error_kind: 'string',
|
|
254
|
+
string: 'Function is_reject_all can only be called statically',
|
|
255
|
+
},
|
|
256
|
+
'13455385521185560676': {
|
|
257
|
+
error_kind: 'string',
|
|
258
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
259
|
+
},
|
|
260
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
functionType: FunctionType.PUBLIC,
|
|
265
|
+
name: 'set_authorized',
|
|
266
|
+
isOnlySelf: false,
|
|
267
|
+
isStatic: false,
|
|
268
|
+
isInitializer: false,
|
|
269
|
+
parameters: [
|
|
270
|
+
{ name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
|
|
271
|
+
{ name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
|
|
272
|
+
],
|
|
273
|
+
returnTypes: [],
|
|
274
|
+
errorTypes: {
|
|
275
|
+
'361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
|
|
276
|
+
'1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
|
|
277
|
+
'13455385521185560676': {
|
|
278
|
+
error_kind: 'string',
|
|
279
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
280
|
+
},
|
|
281
|
+
'14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
|
|
282
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
283
|
+
'16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
functionType: FunctionType.PUBLIC,
|
|
288
|
+
name: 'set_reject_all',
|
|
289
|
+
isOnlySelf: false,
|
|
290
|
+
isStatic: false,
|
|
291
|
+
isInitializer: false,
|
|
292
|
+
parameters: [{ name: 'reject', type: { kind: 'boolean' }, visibility: 'private' }],
|
|
293
|
+
returnTypes: [],
|
|
294
|
+
errorTypes: {
|
|
295
|
+
'13455385521185560676': {
|
|
296
|
+
error_kind: 'string',
|
|
297
|
+
string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
|
|
298
|
+
},
|
|
299
|
+
'15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
outputs: { structs: {}, globals: {} },
|
|
304
|
+
storageLayout: {},
|
|
305
|
+
fileMap: {},
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
export class AuthRegistryContract extends ContractBase {
|
|
309
|
+
private constructor(wallet: Wallet) {
|
|
310
|
+
super(ProtocolContractAddress.AuthRegistry, AuthRegistryContractArtifact, wallet);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
public static at(wallet: Wallet): AuthRegistryContract {
|
|
314
|
+
return new AuthRegistryContract(wallet);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare public methods: {
|
|
318
|
+
/** consume(on_behalf_of: struct, inner_hash: field) */
|
|
319
|
+
consume: ((on_behalf_of: AztecAddressLike, inner_hash: FieldLike) => ContractFunctionInteraction) &
|
|
320
|
+
Pick<ContractMethod, 'selector'>;
|
|
321
|
+
|
|
322
|
+
/** is_consumable(on_behalf_of: struct, message_hash: field) */
|
|
323
|
+
is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
|
|
324
|
+
Pick<ContractMethod, 'selector'>;
|
|
325
|
+
|
|
326
|
+
/** is_reject_all(on_behalf_of: struct) */
|
|
327
|
+
is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
328
|
+
|
|
329
|
+
/** public_dispatch(selector: field) */
|
|
330
|
+
public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
331
|
+
|
|
332
|
+
/** set_authorized(message_hash: field, authorize: boolean) */
|
|
333
|
+
set_authorized: ((message_hash: FieldLike, authorize: boolean) => ContractFunctionInteraction) &
|
|
334
|
+
Pick<ContractMethod, 'selector'>;
|
|
335
|
+
|
|
336
|
+
/** set_authorized_private(approver: struct, message_hash: field, authorize: boolean) */
|
|
337
|
+
set_authorized_private: ((
|
|
338
|
+
approver: AztecAddressLike,
|
|
339
|
+
message_hash: FieldLike,
|
|
340
|
+
authorize: boolean,
|
|
341
|
+
) => ContractFunctionInteraction) &
|
|
342
|
+
Pick<ContractMethod, 'selector'>;
|
|
343
|
+
|
|
344
|
+
/** set_reject_all(reject: boolean) */
|
|
345
|
+
set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
|
|
346
|
+
|
|
347
|
+
/** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
|
|
348
|
+
utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
|
|
349
|
+
Pick<ContractMethod, 'selector'>;
|
|
350
|
+
};
|
|
351
|
+
}
|