@aztec/aztec.js 0.0.0-test.1 → 0.0.1-commit.b655e406
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 +60 -0
- package/dest/account/account.d.ts.map +1 -0
- package/dest/account/account.js +59 -0
- package/dest/account/{contract.d.ts → account_contract.d.ts} +16 -10
- package/dest/account/account_contract.d.ts.map +1 -0
- package/dest/account/{contract.js → account_contract.js} +7 -4
- package/dest/{wallet/account_wallet_with_private_key.d.ts → account/account_with_secret_key.d.ts} +7 -8
- 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} +5 -5
- package/dest/account/index.d.ts +3 -7
- package/dest/account/index.d.ts.map +1 -1
- package/dest/account/index.js +2 -6
- package/dest/account/interface.d.ts +1 -13
- package/dest/account/interface.d.ts.map +1 -1
- package/dest/account/interface.js +1 -0
- package/dest/account/signerless_account.d.ts +24 -0
- package/dest/account/signerless_account.d.ts.map +1 -0
- package/dest/account/signerless_account.js +27 -0
- package/dest/api/abi.d.ts +2 -1
- package/dest/api/abi.d.ts.map +1 -1
- package/dest/api/abi.js +1 -1
- package/dest/api/account.d.ts +5 -2
- package/dest/api/account.d.ts.map +1 -1
- package/dest/api/account.js +3 -1
- package/dest/api/addresses.d.ts +1 -0
- 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/{contract/index.d.ts → api/contract.d.ts} +15 -11
- package/dest/api/contract.d.ts.map +1 -0
- package/dest/{contract/index.js → api/contract.js} +14 -10
- 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 +4 -3
- package/dest/api/deployment.d.ts.map +1 -1
- package/dest/api/deployment.js +4 -3
- 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 +1 -1
- 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/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 +1 -0
- 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 +21 -0
- package/dest/api/node.d.ts.map +1 -0
- package/dest/api/node.js +18 -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 +3 -0
- package/dest/api/protocol.d.ts.map +1 -0
- package/dest/api/protocol.js +2 -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 +4 -1
- 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 +16 -79
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +15 -128
- package/dest/contract/batch_call.d.ts +13 -14
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +60 -60
- package/dest/contract/checker.d.ts +1 -1
- package/dest/contract/checker.d.ts.map +1 -1
- package/dest/contract/checker.js +2 -2
- package/dest/contract/contract.d.ts +7 -6
- package/dest/contract/contract.d.ts.map +1 -1
- package/dest/contract/contract.js +7 -16
- package/dest/contract/contract_base.d.ts +3 -9
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/contract_base.js +2 -2
- package/dest/contract/contract_function_interaction.d.ts +52 -44
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +75 -74
- package/dest/contract/deploy_method.d.ts +102 -57
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +122 -132
- package/dest/contract/deploy_sent_tx.d.ts +3 -5
- package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
- package/dest/contract/deploy_sent_tx.js +10 -13
- package/dest/contract/get_gas_limits.d.ts +5 -6
- 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 +114 -0
- package/dest/contract/interaction_options.d.ts.map +1 -0
- package/dest/contract/interaction_options.js +52 -0
- package/dest/contract/protocol_contracts.d.ts +6 -6
- package/dest/contract/protocol_contracts.d.ts.map +1 -1
- package/dest/contract/protocol_contracts.js +7 -7
- package/dest/contract/sent_tx.d.ts +8 -18
- package/dest/contract/sent_tx.d.ts.map +1 -1
- package/dest/contract/sent_tx.js +30 -42
- package/dest/contract/unsafe_contract.d.ts +1 -1
- package/dest/contract/unsafe_contract.d.ts.map +1 -1
- 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/deployment/broadcast_function.d.ts +3 -3
- package/dest/deployment/broadcast_function.d.ts.map +1 -1
- package/dest/deployment/broadcast_function.js +27 -23
- package/dest/deployment/contract_deployer.d.ts +1 -1
- package/dest/deployment/contract_deployer.d.ts.map +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/{api/ethereum → ethereum}/portal_manager.d.ts +29 -25
- package/dest/ethereum/portal_manager.d.ts.map +1 -0
- package/dest/{api/ethereum → ethereum}/portal_manager.js +106 -73
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +16 -11
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.js +26 -16
- package/dest/fee/fee_payment_method.d.ts +11 -7
- package/dest/fee/fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.d.ts +25 -8
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.js +43 -21
- package/dest/fee/public_fee_payment_method.d.ts +26 -9
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.js +45 -23
- 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/utils/abi_types.d.ts +0 -2
- package/dest/utils/abi_types.d.ts.map +1 -1
- package/dest/utils/authwit.d.ts +81 -24
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +226 -40
- 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 +3 -2
- package/dest/utils/fee_juice.d.ts.map +1 -1
- package/dest/utils/fee_juice.js +3 -2
- package/dest/utils/field_compressed_string.d.ts.map +1 -1
- package/dest/utils/node.d.ts.map +1 -1
- package/dest/utils/node.js +1 -1
- package/dest/utils/pub_key.d.ts.map +1 -1
- package/dest/utils/pub_key.js +1 -2
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +34 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -0
- package/dest/wallet/account_entrypoint_meta_payment_method.js +76 -0
- package/dest/wallet/account_manager.d.ts +69 -0
- package/dest/wallet/account_manager.d.ts.map +1 -0
- package/dest/wallet/account_manager.js +113 -0
- package/dest/wallet/base_wallet.d.ts +81 -63
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +221 -106
- package/dest/wallet/deploy_account_method.d.ts +52 -0
- package/dest/wallet/deploy_account_method.d.ts.map +1 -0
- package/dest/wallet/deploy_account_method.js +77 -0
- package/dest/wallet/index.d.ts +3 -16
- package/dest/wallet/index.d.ts.map +1 -1
- package/dest/wallet/index.js +3 -20
- package/dest/wallet/wallet.d.ts +2478 -0
- package/dest/wallet/wallet.d.ts.map +1 -0
- package/dest/wallet/wallet.js +202 -0
- package/package.json +40 -32
- package/src/account/account.ts +97 -0
- package/src/account/{contract.ts → account_contract.ts} +24 -13
- package/src/{wallet/account_wallet_with_private_key.ts → account/account_with_secret_key.ts} +6 -8
- package/src/account/index.ts +3 -7
- package/src/account/interface.ts +1 -12
- package/src/account/signerless_account.ts +46 -0
- package/src/api/abi.ts +26 -0
- package/src/api/account.ts +5 -9
- package/src/api/addresses.ts +1 -0
- package/src/api/authorization.ts +14 -0
- package/src/api/block.ts +2 -0
- package/src/{contract/index.ts → api/contract.ts} +37 -13
- 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/keys.ts +8 -0
- package/src/api/log.ts +1 -0
- package/src/api/messaging.ts +2 -0
- package/src/api/node.ts +20 -0
- package/src/api/note.ts +1 -0
- package/src/api/protocol.ts +2 -0
- package/src/api/trees.ts +2 -0
- package/src/api/tx.ts +11 -0
- package/src/api/utils.ts +14 -0
- package/src/api/wallet.ts +33 -5
- package/src/authorization/call_authorization_request.ts +63 -0
- package/src/contract/base_contract_interaction.ts +24 -166
- package/src/contract/batch_call.ts +81 -49
- package/src/contract/checker.ts +8 -3
- package/src/contract/contract.ts +8 -17
- package/src/contract/contract_base.ts +4 -11
- package/src/contract/contract_function_interaction.ts +136 -106
- package/src/contract/deploy_method.ts +199 -129
- package/src/contract/deploy_sent_tx.ts +9 -15
- package/src/contract/get_gas_limits.ts +15 -8
- package/src/contract/interaction_options.ts +169 -0
- package/src/contract/protocol_contracts.ts +10 -10
- package/src/contract/sent_tx.ts +40 -51
- package/src/contract/unsafe_contract.ts +1 -1
- package/src/contract/wait_for_proven.ts +38 -0
- package/src/deployment/broadcast_function.ts +57 -57
- package/src/deployment/contract_deployer.ts +1 -1
- package/src/deployment/publish_class.ts +34 -0
- package/src/deployment/publish_instance.ts +26 -0
- package/src/{api/ethereum → ethereum}/portal_manager.ts +120 -74
- package/src/fee/fee_juice_payment_method_with_claim.ts +46 -33
- package/src/fee/fee_payment_method.ts +11 -7
- package/src/fee/private_fee_payment_method.ts +77 -57
- package/src/fee/public_fee_payment_method.ts +91 -67
- package/src/fee/sponsored_fee_payment.ts +44 -0
- package/src/utils/authwit.ts +255 -53
- package/src/utils/cross_chain.ts +53 -0
- package/src/utils/fee_juice.ts +4 -4
- package/src/utils/node.ts +1 -1
- package/src/utils/pub_key.ts +1 -2
- package/src/wallet/account_entrypoint_meta_payment_method.ts +105 -0
- package/src/wallet/account_manager.ts +154 -0
- package/src/wallet/base_wallet.ts +295 -143
- package/src/wallet/deploy_account_method.ts +125 -0
- package/src/wallet/index.ts +3 -33
- package/src/wallet/wallet.ts +362 -0
- package/dest/account/contract.d.ts.map +0 -1
- 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.map +0 -1
- 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/index.d.ts.map +0 -1
- 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/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.map +0 -1
- 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/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/proven_tx.ts +0 -42
- 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/signerless_wallet.ts +0 -52
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
2
|
-
import { FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
|
|
3
|
-
import { HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
4
|
-
import { EntrypointPayload } from './entrypoint.js';
|
|
5
|
-
/**
|
|
6
|
-
* Implementation for an entrypoint interface that can execute multiple function calls in a single transaction
|
|
7
|
-
*/ export class DefaultMultiCallEntrypoint {
|
|
8
|
-
chainId;
|
|
9
|
-
version;
|
|
10
|
-
address;
|
|
11
|
-
constructor(chainId, version, address = ProtocolContractAddress.MultiCallEntrypoint){
|
|
12
|
-
this.chainId = chainId;
|
|
13
|
-
this.version = version;
|
|
14
|
-
this.address = address;
|
|
15
|
-
}
|
|
16
|
-
async createTxExecutionRequest(executions) {
|
|
17
|
-
const { fee, calls, authWitnesses = [], hashedArguments = [], capsules = [] } = executions;
|
|
18
|
-
const payload = await EntrypointPayload.fromAppExecution(calls);
|
|
19
|
-
const abi = this.getEntrypointAbi();
|
|
20
|
-
const entrypointHashedArgs = await HashedValues.fromValues(encodeArguments(abi, [
|
|
21
|
-
payload
|
|
22
|
-
]));
|
|
23
|
-
const txRequest = TxExecutionRequest.from({
|
|
24
|
-
firstCallArgsHash: entrypointHashedArgs.hash,
|
|
25
|
-
origin: this.address,
|
|
26
|
-
functionSelector: await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters),
|
|
27
|
-
txContext: new TxContext(this.chainId, this.version, fee.gasSettings),
|
|
28
|
-
argsOfCalls: [
|
|
29
|
-
...payload.hashedArguments,
|
|
30
|
-
...hashedArguments,
|
|
31
|
-
entrypointHashedArgs
|
|
32
|
-
],
|
|
33
|
-
authWitnesses,
|
|
34
|
-
capsules
|
|
35
|
-
});
|
|
36
|
-
return Promise.resolve(txRequest);
|
|
37
|
-
}
|
|
38
|
-
getEntrypointAbi() {
|
|
39
|
-
return {
|
|
40
|
-
name: 'entrypoint',
|
|
41
|
-
isInitializer: false,
|
|
42
|
-
functionType: 'private',
|
|
43
|
-
isInternal: false,
|
|
44
|
-
isStatic: false,
|
|
45
|
-
parameters: [
|
|
46
|
-
{
|
|
47
|
-
name: 'app_payload',
|
|
48
|
-
type: {
|
|
49
|
-
kind: 'struct',
|
|
50
|
-
path: 'authwit::entrypoint::app::AppPayload',
|
|
51
|
-
fields: [
|
|
52
|
-
{
|
|
53
|
-
name: 'function_calls',
|
|
54
|
-
type: {
|
|
55
|
-
kind: 'array',
|
|
56
|
-
length: 4,
|
|
57
|
-
type: {
|
|
58
|
-
kind: 'struct',
|
|
59
|
-
path: 'authwit::entrypoint::function_call::FunctionCall',
|
|
60
|
-
fields: [
|
|
61
|
-
{
|
|
62
|
-
name: 'args_hash',
|
|
63
|
-
type: {
|
|
64
|
-
kind: 'field'
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'function_selector',
|
|
69
|
-
type: {
|
|
70
|
-
kind: 'struct',
|
|
71
|
-
path: 'authwit::aztec::protocol_types::abis::function_selector::FunctionSelector',
|
|
72
|
-
fields: [
|
|
73
|
-
{
|
|
74
|
-
name: 'inner',
|
|
75
|
-
type: {
|
|
76
|
-
kind: 'integer',
|
|
77
|
-
sign: 'unsigned',
|
|
78
|
-
width: 32
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'target_address',
|
|
86
|
-
type: {
|
|
87
|
-
kind: 'struct',
|
|
88
|
-
path: 'authwit::aztec::protocol_types::address::AztecAddress',
|
|
89
|
-
fields: [
|
|
90
|
-
{
|
|
91
|
-
name: 'inner',
|
|
92
|
-
type: {
|
|
93
|
-
kind: 'field'
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: 'is_public',
|
|
101
|
-
type: {
|
|
102
|
-
kind: 'boolean'
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: 'is_static',
|
|
107
|
-
type: {
|
|
108
|
-
kind: 'boolean'
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: 'nonce',
|
|
117
|
-
type: {
|
|
118
|
-
kind: 'field'
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
visibility: 'public'
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
returnTypes: [],
|
|
127
|
-
errorTypes: {}
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { FunctionCall } from '@aztec/stdlib/abi';
|
|
3
|
-
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
|
-
import type { Capsule, HashedValues, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
5
|
-
import { EntrypointPayload, type FeeOptions, computeCombinedPayloadHash } from './payload.js';
|
|
6
|
-
export { EntrypointPayload, type FeeOptions, computeCombinedPayloadHash };
|
|
7
|
-
export { DefaultEntrypoint } from './default_entrypoint.js';
|
|
8
|
-
export { DefaultMultiCallEntrypoint } from './default_multi_call_entrypoint.js';
|
|
9
|
-
/** Encodes the calls to be done in a transaction. */
|
|
10
|
-
export type ExecutionRequestInit = {
|
|
11
|
-
/** The function calls to be executed. */
|
|
12
|
-
calls: FunctionCall[];
|
|
13
|
-
/** Any transient auth witnesses needed for this execution */
|
|
14
|
-
authWitnesses?: AuthWitness[];
|
|
15
|
-
/** Any transient hashed arguments for this execution */
|
|
16
|
-
hashedArguments?: HashedValues[];
|
|
17
|
-
/** Data passed through an oracle for this execution. */
|
|
18
|
-
capsules?: Capsule[];
|
|
19
|
-
/** How the fee is going to be payed */
|
|
20
|
-
fee: FeeOptions;
|
|
21
|
-
/** An optional nonce. Used to repeat a previous tx with a higher fee so that the first one is cancelled */
|
|
22
|
-
nonce?: Fr;
|
|
23
|
-
/** Whether the transaction can be cancelled. If true, an extra nullifier will be emitted: H(nonce, GENERATOR_INDEX__TX_NULLIFIER) */
|
|
24
|
-
cancellable?: boolean;
|
|
25
|
-
};
|
|
26
|
-
/** Creates transaction execution requests out of a set of function calls. */
|
|
27
|
-
export interface EntrypointInterface {
|
|
28
|
-
/**
|
|
29
|
-
* Generates an execution request out of set of function calls.
|
|
30
|
-
* @param execution - The execution intents to be run.
|
|
31
|
-
* @returns The authenticated transaction execution request.
|
|
32
|
-
*/
|
|
33
|
-
createTxExecutionRequest(execution: ExecutionRequestInit): Promise<TxExecutionRequest>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=entrypoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../src/entrypoint/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE9F,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,0BAA0B,EAAE,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,qDAAqD;AACrD,MAAM,MAAM,oBAAoB,GAAG;IACjC,yCAAyC;IACzC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,6DAA6D;IAC7D,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,wDAAwD;IACxD,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IACjC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,uCAAuC;IACvC,GAAG,EAAE,UAAU,CAAC;IAChB,2GAA2G;IAC3G,KAAK,CAAC,EAAE,EAAE,CAAC;IACX,qIAAqI;IACrI,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,6EAA6E;AAC7E,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,wBAAwB,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACxF"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EntrypointPayload, computeCombinedPayloadHash } from './payload.js';
|
|
2
|
-
export { EntrypointPayload, computeCombinedPayloadHash };
|
|
3
|
-
export { DefaultEntrypoint } from './default_entrypoint.js';
|
|
4
|
-
export { DefaultMultiCallEntrypoint } from './default_multi_call_entrypoint.js';
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { Tuple } from '@aztec/foundation/serialize';
|
|
3
|
-
import type { FieldsOf } from '@aztec/foundation/types';
|
|
4
|
-
import { FunctionCall } from '@aztec/stdlib/abi';
|
|
5
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
-
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
7
|
-
import { HashedValues } from '@aztec/stdlib/tx';
|
|
8
|
-
import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
|
|
9
|
-
/**
|
|
10
|
-
* Fee payment options for a transaction.
|
|
11
|
-
*/
|
|
12
|
-
export type FeeOptions = {
|
|
13
|
-
/** The fee payment method to use */
|
|
14
|
-
paymentMethod: FeePaymentMethod;
|
|
15
|
-
/** The gas settings */
|
|
16
|
-
gasSettings: GasSettings;
|
|
17
|
-
};
|
|
18
|
-
/** Fee options as set by a user. */
|
|
19
|
-
export type UserFeeOptions = {
|
|
20
|
-
/** The fee payment method to use */
|
|
21
|
-
paymentMethod?: FeePaymentMethod;
|
|
22
|
-
/** The gas settings */
|
|
23
|
-
gasSettings?: Partial<FieldsOf<GasSettings>>;
|
|
24
|
-
/** Percentage to pad the base fee by, if empty, defaults to 0.5 */
|
|
25
|
-
baseFeePadding?: number;
|
|
26
|
-
/** Whether to run an initial simulation of the tx with high gas limit to figure out actual gas settings. */
|
|
27
|
-
estimateGas?: boolean;
|
|
28
|
-
/** Percentage to pad the estimated gas limits by, if empty, defaults to 0.1. Only relevant if estimateGas is set. */
|
|
29
|
-
estimatedGasPadding?: number;
|
|
30
|
-
};
|
|
31
|
-
/** Encoded function call for account contract entrypoint */
|
|
32
|
-
type EncodedFunctionCall = {
|
|
33
|
-
/** Arguments hash for the call */
|
|
34
|
-
args_hash: Fr;
|
|
35
|
-
/** Selector of the function to call */
|
|
36
|
-
function_selector: Fr;
|
|
37
|
-
/** Address of the contract to call */
|
|
38
|
-
target_address: Fr;
|
|
39
|
-
/** Whether the function is public or private */
|
|
40
|
-
is_public: boolean;
|
|
41
|
-
/** Whether the function can alter state */
|
|
42
|
-
is_static: boolean;
|
|
43
|
-
};
|
|
44
|
-
/** Assembles an entrypoint payload */
|
|
45
|
-
export declare abstract class EntrypointPayload {
|
|
46
|
-
private functionCalls;
|
|
47
|
-
private _hashedArguments;
|
|
48
|
-
private generatorIndex;
|
|
49
|
-
private _nonce;
|
|
50
|
-
protected constructor(functionCalls: EncodedFunctionCall[], _hashedArguments: HashedValues[], generatorIndex: number, _nonce: Fr);
|
|
51
|
-
protected static create(functionCalls: FunctionCall[]): Promise<{
|
|
52
|
-
encodedFunctionCalls: {
|
|
53
|
-
args_hash: Fr;
|
|
54
|
-
function_selector: Fr;
|
|
55
|
-
target_address: Fr;
|
|
56
|
-
is_public: boolean;
|
|
57
|
-
is_static: boolean;
|
|
58
|
-
}[];
|
|
59
|
-
hashedArguments: HashedValues[];
|
|
60
|
-
}>;
|
|
61
|
-
/**
|
|
62
|
-
* The function calls to execute. This uses snake_case naming so that it is compatible with Noir encoding
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
get function_calls(): EncodedFunctionCall[];
|
|
66
|
-
/**
|
|
67
|
-
* The nonce
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
get nonce(): Fr;
|
|
71
|
-
/**
|
|
72
|
-
* The hashed arguments for the function calls
|
|
73
|
-
*/
|
|
74
|
-
get hashedArguments(): HashedValues[];
|
|
75
|
-
/**
|
|
76
|
-
* Serializes the payload to an array of fields
|
|
77
|
-
* @returns The fields of the payload
|
|
78
|
-
*/
|
|
79
|
-
abstract toFields(): Fr[];
|
|
80
|
-
/**
|
|
81
|
-
* Hashes the payload
|
|
82
|
-
* @returns The hash of the payload
|
|
83
|
-
*/
|
|
84
|
-
hash(): Promise<Fr>;
|
|
85
|
-
/** Serializes the function calls to an array of fields. */
|
|
86
|
-
protected functionCallsToFields(): Fr[];
|
|
87
|
-
/**
|
|
88
|
-
* Creates an execution payload for a dapp from a set of function calls
|
|
89
|
-
* @param functionCalls - The function calls to execute
|
|
90
|
-
* @returns The execution payload
|
|
91
|
-
*/
|
|
92
|
-
static fromFunctionCalls(functionCalls: FunctionCall[]): Promise<AppEntrypointPayload>;
|
|
93
|
-
/**
|
|
94
|
-
* Creates an execution payload for the app-portion of a transaction from a set of function calls
|
|
95
|
-
* @param functionCalls - The function calls to execute
|
|
96
|
-
* @param nonce - The nonce for the payload, used to emit a nullifier identifying the call
|
|
97
|
-
* @returns The execution payload
|
|
98
|
-
*/
|
|
99
|
-
static fromAppExecution(functionCalls: FunctionCall[] | Tuple<FunctionCall, 4>, nonce?: Fr): Promise<AppEntrypointPayload>;
|
|
100
|
-
/**
|
|
101
|
-
* Creates an execution payload to pay the fee for a transaction
|
|
102
|
-
* @param sender - The address sending this payload
|
|
103
|
-
* @param feeOpts - The fee payment options
|
|
104
|
-
* @returns The execution payload
|
|
105
|
-
*/
|
|
106
|
-
static fromFeeOptions(sender: AztecAddress, feeOpts?: FeeOptions): Promise<FeeEntrypointPayload>;
|
|
107
|
-
}
|
|
108
|
-
/** Entrypoint payload for app phase execution. */
|
|
109
|
-
declare class AppEntrypointPayload extends EntrypointPayload {
|
|
110
|
-
toFields(): Fr[];
|
|
111
|
-
}
|
|
112
|
-
/** Entrypoint payload for fee payment to be run during setup phase. */
|
|
113
|
-
declare class FeeEntrypointPayload extends EntrypointPayload {
|
|
114
|
-
#private;
|
|
115
|
-
constructor(functionCalls: EncodedFunctionCall[], hashedArguments: HashedValues[], generatorIndex: number, nonce: Fr, isFeePayer: boolean);
|
|
116
|
-
toFields(): Fr[];
|
|
117
|
-
/** Whether the sender should be appointed as fee payer. */
|
|
118
|
-
get is_fee_payer(): boolean;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Computes a hash of a combined payload.
|
|
122
|
-
* @param appPayload - An app payload.
|
|
123
|
-
* @param feePayload - A fee payload.
|
|
124
|
-
* @returns A hash of a combined payload.
|
|
125
|
-
*/
|
|
126
|
-
export declare function computeCombinedPayloadHash(appPayload: AppEntrypointPayload, feePayload: FeeEntrypointPayload): Promise<Fr>;
|
|
127
|
-
export {};
|
|
128
|
-
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../src/entrypoint/payload.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { GeneratorIndex } from '@aztec/constants';
|
|
2
|
-
import { padArrayEnd } from '@aztec/foundation/collection';
|
|
3
|
-
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
|
|
4
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import { FunctionCall, FunctionType } from '@aztec/stdlib/abi';
|
|
6
|
-
import { HashedValues } from '@aztec/stdlib/tx';
|
|
7
|
-
// docs:end:user_fee_options
|
|
8
|
-
// These must match the values defined in:
|
|
9
|
-
// - noir-projects/aztec-nr/aztec/src/entrypoint/app.nr
|
|
10
|
-
const APP_MAX_CALLS = 4;
|
|
11
|
-
// - and noir-projects/aztec-nr/aztec/src/entrypoint/fee.nr
|
|
12
|
-
const FEE_MAX_CALLS = 2;
|
|
13
|
-
/* eslint-enable camelcase */ /** Assembles an entrypoint payload */ export class EntrypointPayload {
|
|
14
|
-
functionCalls;
|
|
15
|
-
_hashedArguments;
|
|
16
|
-
generatorIndex;
|
|
17
|
-
_nonce;
|
|
18
|
-
constructor(functionCalls, _hashedArguments, generatorIndex, _nonce){
|
|
19
|
-
this.functionCalls = functionCalls;
|
|
20
|
-
this._hashedArguments = _hashedArguments;
|
|
21
|
-
this.generatorIndex = generatorIndex;
|
|
22
|
-
this._nonce = _nonce;
|
|
23
|
-
}
|
|
24
|
-
static async create(functionCalls) {
|
|
25
|
-
const hashedArguments = [];
|
|
26
|
-
for (const call of functionCalls){
|
|
27
|
-
hashedArguments.push(await HashedValues.fromValues(call.args));
|
|
28
|
-
}
|
|
29
|
-
/* eslint-disable camelcase */ const encodedFunctionCalls = functionCalls.map((call, index)=>({
|
|
30
|
-
args_hash: hashedArguments[index].hash,
|
|
31
|
-
function_selector: call.selector.toField(),
|
|
32
|
-
target_address: call.to.toField(),
|
|
33
|
-
is_public: call.type == FunctionType.PUBLIC,
|
|
34
|
-
is_static: call.isStatic
|
|
35
|
-
}));
|
|
36
|
-
/* eslint-enable camelcase */ return {
|
|
37
|
-
encodedFunctionCalls,
|
|
38
|
-
hashedArguments
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/* eslint-disable camelcase */ /**
|
|
42
|
-
* The function calls to execute. This uses snake_case naming so that it is compatible with Noir encoding
|
|
43
|
-
* @internal
|
|
44
|
-
*/ get function_calls() {
|
|
45
|
-
return this.functionCalls;
|
|
46
|
-
}
|
|
47
|
-
/* eslint-enable camelcase */ /**
|
|
48
|
-
* The nonce
|
|
49
|
-
* @internal
|
|
50
|
-
*/ get nonce() {
|
|
51
|
-
return this._nonce;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* The hashed arguments for the function calls
|
|
55
|
-
*/ get hashedArguments() {
|
|
56
|
-
return this._hashedArguments;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Hashes the payload
|
|
60
|
-
* @returns The hash of the payload
|
|
61
|
-
*/ hash() {
|
|
62
|
-
return poseidon2HashWithSeparator(this.toFields(), this.generatorIndex);
|
|
63
|
-
}
|
|
64
|
-
/** Serializes the function calls to an array of fields. */ functionCallsToFields() {
|
|
65
|
-
return this.functionCalls.flatMap((call)=>[
|
|
66
|
-
call.args_hash,
|
|
67
|
-
call.function_selector,
|
|
68
|
-
call.target_address,
|
|
69
|
-
new Fr(call.is_public),
|
|
70
|
-
new Fr(call.is_static)
|
|
71
|
-
]);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Creates an execution payload for a dapp from a set of function calls
|
|
75
|
-
* @param functionCalls - The function calls to execute
|
|
76
|
-
* @returns The execution payload
|
|
77
|
-
*/ static async fromFunctionCalls(functionCalls) {
|
|
78
|
-
const { encodedFunctionCalls, hashedArguments } = await this.create(functionCalls);
|
|
79
|
-
return new AppEntrypointPayload(encodedFunctionCalls, hashedArguments, 0, Fr.random());
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Creates an execution payload for the app-portion of a transaction from a set of function calls
|
|
83
|
-
* @param functionCalls - The function calls to execute
|
|
84
|
-
* @param nonce - The nonce for the payload, used to emit a nullifier identifying the call
|
|
85
|
-
* @returns The execution payload
|
|
86
|
-
*/ static async fromAppExecution(functionCalls, nonce = Fr.random()) {
|
|
87
|
-
if (functionCalls.length > APP_MAX_CALLS) {
|
|
88
|
-
throw new Error(`Expected at most ${APP_MAX_CALLS} function calls, got ${functionCalls.length}`);
|
|
89
|
-
}
|
|
90
|
-
const paddedCalls = padArrayEnd(functionCalls, FunctionCall.empty(), APP_MAX_CALLS);
|
|
91
|
-
const { encodedFunctionCalls, hashedArguments } = await this.create(paddedCalls);
|
|
92
|
-
return new AppEntrypointPayload(encodedFunctionCalls, hashedArguments, GeneratorIndex.SIGNATURE_PAYLOAD, nonce);
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Creates an execution payload to pay the fee for a transaction
|
|
96
|
-
* @param sender - The address sending this payload
|
|
97
|
-
* @param feeOpts - The fee payment options
|
|
98
|
-
* @returns The execution payload
|
|
99
|
-
*/ static async fromFeeOptions(sender, feeOpts) {
|
|
100
|
-
const calls = await feeOpts?.paymentMethod.getFunctionCalls(feeOpts?.gasSettings) ?? [];
|
|
101
|
-
const feePayer = await feeOpts?.paymentMethod.getFeePayer(feeOpts?.gasSettings);
|
|
102
|
-
const isFeePayer = !!feePayer && feePayer.equals(sender);
|
|
103
|
-
const paddedCalls = padArrayEnd(calls, FunctionCall.empty(), FEE_MAX_CALLS);
|
|
104
|
-
const { encodedFunctionCalls, hashedArguments } = await this.create(paddedCalls);
|
|
105
|
-
return new FeeEntrypointPayload(encodedFunctionCalls, hashedArguments, GeneratorIndex.FEE_PAYLOAD, Fr.random(), isFeePayer);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/** Entrypoint payload for app phase execution. */ class AppEntrypointPayload extends EntrypointPayload {
|
|
109
|
-
toFields() {
|
|
110
|
-
return [
|
|
111
|
-
...this.functionCallsToFields(),
|
|
112
|
-
this.nonce
|
|
113
|
-
];
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/** Entrypoint payload for fee payment to be run during setup phase. */ class FeeEntrypointPayload extends EntrypointPayload {
|
|
117
|
-
#isFeePayer;
|
|
118
|
-
constructor(functionCalls, hashedArguments, generatorIndex, nonce, isFeePayer){
|
|
119
|
-
super(functionCalls, hashedArguments, generatorIndex, nonce);
|
|
120
|
-
this.#isFeePayer = isFeePayer;
|
|
121
|
-
}
|
|
122
|
-
toFields() {
|
|
123
|
-
return [
|
|
124
|
-
...this.functionCallsToFields(),
|
|
125
|
-
this.nonce,
|
|
126
|
-
new Fr(this.#isFeePayer)
|
|
127
|
-
];
|
|
128
|
-
}
|
|
129
|
-
/* eslint-disable camelcase */ /** Whether the sender should be appointed as fee payer. */ get is_fee_payer() {
|
|
130
|
-
return this.#isFeePayer;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Computes a hash of a combined payload.
|
|
135
|
-
* @param appPayload - An app payload.
|
|
136
|
-
* @param feePayload - A fee payload.
|
|
137
|
-
* @returns A hash of a combined payload.
|
|
138
|
-
*/ export async function computeCombinedPayloadHash(appPayload, feePayload) {
|
|
139
|
-
return poseidon2HashWithSeparator([
|
|
140
|
-
await appPayload.hash(),
|
|
141
|
-
await feePayload.hash()
|
|
142
|
-
], GeneratorIndex.COMBINED_PAYLOAD);
|
|
143
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FunctionCall } from '@aztec/stdlib/abi';
|
|
2
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
-
import type { FeePaymentMethod } from './fee_payment_method.js';
|
|
4
|
-
/**
|
|
5
|
-
* Pay fee directly in the Fee Juice.
|
|
6
|
-
*/
|
|
7
|
-
export declare class FeeJuicePaymentMethod implements FeePaymentMethod {
|
|
8
|
-
protected sender: AztecAddress;
|
|
9
|
-
constructor(sender: AztecAddress);
|
|
10
|
-
getAsset(): Promise<AztecAddress>;
|
|
11
|
-
getFunctionCalls(): Promise<FunctionCall[]>;
|
|
12
|
-
getFeePayer(): Promise<AztecAddress>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=fee_juice_payment_method.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fee_juice_payment_method.d.ts","sourceRoot":"","sources":["../../src/fee/fee_juice_payment_method.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;GAEG;AACH,qBAAa,qBAAsB,YAAW,gBAAgB;IAEhD,SAAS,CAAC,MAAM,EAAE,YAAY;gBAApB,MAAM,EAAE,YAAY;IAE1C,QAAQ;IAIR,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAI3C,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC;CAGrC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
2
|
-
// docs:start:fee_juice_method
|
|
3
|
-
/**
|
|
4
|
-
* Pay fee directly in the Fee Juice.
|
|
5
|
-
*/ export class FeeJuicePaymentMethod {
|
|
6
|
-
sender;
|
|
7
|
-
// docs:end:fee_juice_method
|
|
8
|
-
constructor(sender){
|
|
9
|
-
this.sender = sender;
|
|
10
|
-
}
|
|
11
|
-
getAsset() {
|
|
12
|
-
return Promise.resolve(ProtocolContractAddress.FeeJuice);
|
|
13
|
-
}
|
|
14
|
-
getFunctionCalls() {
|
|
15
|
-
return Promise.resolve([]);
|
|
16
|
-
}
|
|
17
|
-
getFeePayer() {
|
|
18
|
-
return Promise.resolve(this.sender);
|
|
19
|
-
}
|
|
20
|
-
}
|
package/dest/index.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is our public api.
|
|
3
|
-
* Do NOT "export * from ..." here.
|
|
4
|
-
* Everything here should be explicit, to ensure we can clearly see everything we're exposing to the world.
|
|
5
|
-
* If it's exposed, people will use it, and then we can't remove/change the api without breaking client code.
|
|
6
|
-
* At the time of writing we overexpose things that should only be internal.
|
|
7
|
-
*
|
|
8
|
-
* TODO: Review and narrow scope of public api.
|
|
9
|
-
* We should also consider exposing subsections of the api via package.json exports, like we do with foundation.
|
|
10
|
-
* This can allow consumers to import much smaller parts of the library to incur less overhead.
|
|
11
|
-
* It will also allow web bundlers do perform intelligent chunking of bundles etc.
|
|
12
|
-
* Some work as been done on this within the api folder, providing the alternative import style of e.g.:
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { TxHash } from '@aztec.js/tx_hash'
|
|
15
|
-
* import { type ContractArtifact, type FunctionArtifact, FunctionSelector } from '@aztec/aztec.js/abi';
|
|
16
|
-
* import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
17
|
-
* import { EthAddress } from '@aztec/aztec.js/eth_address';
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it).
|
|
21
|
-
*/
|
|
22
|
-
export { ContractDeployer } from './deployment/index.js';
|
|
23
|
-
export { NoteSelector } from '@aztec/stdlib/abi';
|
|
24
|
-
export { createCompatibleClient, createPXEClient } from './rpc_clients/index.js';
|
|
25
|
-
export { type DeployAccountOptions } from './account_manager/index.js';
|
|
26
|
-
export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet } from './wallet/index.js';
|
|
27
|
-
export { EthAddress } from '@aztec/foundation/eth-address';
|
|
28
|
-
export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
29
|
-
export { SiblingPath } from '@aztec/foundation/trees';
|
|
30
|
-
export { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
31
|
-
export { type PartialAddress, type ContractClassWithId, type ContractInstanceWithAddress, getContractClassFromArtifact, getContractInstanceFromDeployParams, type NodeInfo, } from '@aztec/stdlib/contract';
|
|
32
|
-
export { MerkleTreeId, merkleTreeIds } from '@aztec/stdlib/trees';
|
|
33
|
-
export { type PublicKey, PublicKeys } from '@aztec/stdlib/keys';
|
|
34
|
-
export { computeSecretHash } from '@aztec/stdlib/hash';
|
|
35
|
-
export { computeAppNullifierSecretKey, deriveKeys, deriveMasterIncomingViewingSecretKey, deriveMasterNullifierSecretKey, } from '@aztec/stdlib/keys';
|
|
36
|
-
export { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
37
|
-
export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
38
|
-
export { FunctionCall } from '@aztec/stdlib/abi';
|
|
39
|
-
export { Tx, TxExecutionRequest, TxHash, TxReceipt, TxStatus, Capsule, HashedValues, GlobalVariables, } from '@aztec/stdlib/tx';
|
|
40
|
-
export { Body, L2Block } from '@aztec/stdlib/block';
|
|
41
|
-
export { L1NotePayload, LogId, type LogFilter, EncryptedLogPayload } from '@aztec/stdlib/logs';
|
|
42
|
-
export { L1EventPayload, EventMetadata } from '@aztec/stdlib/event';
|
|
43
|
-
export { L1ToL2Message, L2Actor, L1Actor } from '@aztec/stdlib/messaging';
|
|
44
|
-
export { UniqueNote, ExtendedNote, Comparator, Note } from '@aztec/stdlib/note';
|
|
45
|
-
export { type PXE, EventType } from '@aztec/stdlib/interfaces/client';
|
|
46
|
-
export { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
47
|
-
export { decodeFromAbi, encodeArguments, type AbiType } from '@aztec/stdlib/abi';
|
|
48
|
-
export { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
49
|
-
export { sha256, Grumpkin, Schnorr } from '@aztec/foundation/crypto';
|
|
50
|
-
export { makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
51
|
-
export { retry, retryUntil } from '@aztec/foundation/retry';
|
|
52
|
-
export { to2Fields, toBigInt } from '@aztec/foundation/serialize';
|
|
53
|
-
export { sleep } from '@aztec/foundation/sleep';
|
|
54
|
-
export { elapsed } from '@aztec/foundation/timer';
|
|
55
|
-
export { type FieldsOf } from '@aztec/foundation/types';
|
|
56
|
-
export { fileURLToPath } from '@aztec/foundation/url';
|
|
57
|
-
export * from './api/abi.js';
|
|
58
|
-
export * from './api/account.js';
|
|
59
|
-
export * from './api/addresses.js';
|
|
60
|
-
export * from './api/cheat_codes.js';
|
|
61
|
-
export * from './api/ethereum/index.js';
|
|
62
|
-
export * from './api/fee.js';
|
|
63
|
-
export * from './api/log.js';
|
|
64
|
-
export * from './contract/index.js';
|
|
65
|
-
export * from './utils/index.js';
|
|
66
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dest/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dest/index.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is our public api.
|
|
3
|
-
* Do NOT "export * from ..." here.
|
|
4
|
-
* Everything here should be explicit, to ensure we can clearly see everything we're exposing to the world.
|
|
5
|
-
* If it's exposed, people will use it, and then we can't remove/change the api without breaking client code.
|
|
6
|
-
* At the time of writing we overexpose things that should only be internal.
|
|
7
|
-
*
|
|
8
|
-
* TODO: Review and narrow scope of public api.
|
|
9
|
-
* We should also consider exposing subsections of the api via package.json exports, like we do with foundation.
|
|
10
|
-
* This can allow consumers to import much smaller parts of the library to incur less overhead.
|
|
11
|
-
* It will also allow web bundlers do perform intelligent chunking of bundles etc.
|
|
12
|
-
* Some work as been done on this within the api folder, providing the alternative import style of e.g.:
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { TxHash } from '@aztec.js/tx_hash'
|
|
15
|
-
* import { type ContractArtifact, type FunctionArtifact, FunctionSelector } from '@aztec/aztec.js/abi';
|
|
16
|
-
* import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
17
|
-
* import { EthAddress } from '@aztec/aztec.js/eth_address';
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it).
|
|
21
|
-
*/ export { ContractDeployer } from './deployment/index.js';
|
|
22
|
-
export { NoteSelector } from '@aztec/stdlib/abi';
|
|
23
|
-
export { createCompatibleClient, createPXEClient } from './rpc_clients/index.js';
|
|
24
|
-
export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet } from './wallet/index.js';
|
|
25
|
-
export { EthAddress } from '@aztec/foundation/eth-address';
|
|
26
|
-
export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
27
|
-
export { SiblingPath } from '@aztec/foundation/trees';
|
|
28
|
-
export { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
29
|
-
export { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
|
|
30
|
-
export { MerkleTreeId, merkleTreeIds } from '@aztec/stdlib/trees';
|
|
31
|
-
export { PublicKeys } from '@aztec/stdlib/keys';
|
|
32
|
-
export { computeSecretHash } from '@aztec/stdlib/hash';
|
|
33
|
-
export { computeAppNullifierSecretKey, deriveKeys, deriveMasterIncomingViewingSecretKey, deriveMasterNullifierSecretKey } from '@aztec/stdlib/keys';
|
|
34
|
-
export { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
35
|
-
export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
36
|
-
export { FunctionCall } from '@aztec/stdlib/abi';
|
|
37
|
-
export { Tx, TxExecutionRequest, TxHash, TxReceipt, TxStatus, Capsule, HashedValues, GlobalVariables } from '@aztec/stdlib/tx';
|
|
38
|
-
export { Body, L2Block } from '@aztec/stdlib/block';
|
|
39
|
-
export { L1NotePayload, LogId, EncryptedLogPayload } from '@aztec/stdlib/logs';
|
|
40
|
-
export { L1EventPayload, EventMetadata } from '@aztec/stdlib/event';
|
|
41
|
-
export { L1ToL2Message, L2Actor, L1Actor } from '@aztec/stdlib/messaging';
|
|
42
|
-
export { UniqueNote, ExtendedNote, Comparator, Note } from '@aztec/stdlib/note';
|
|
43
|
-
export { EventType } from '@aztec/stdlib/interfaces/client';
|
|
44
|
-
export { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
45
|
-
// TODO: These kinds of things have no place on our public api.
|
|
46
|
-
// External devs will almost certainly have their own methods of doing these things.
|
|
47
|
-
// If we want to use them in our own "aztec.js consuming code", import them from foundation as needed.
|
|
48
|
-
export { decodeFromAbi, encodeArguments } from '@aztec/stdlib/abi';
|
|
49
|
-
export { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
50
|
-
export { sha256, Grumpkin, Schnorr } from '@aztec/foundation/crypto';
|
|
51
|
-
export { makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
52
|
-
export { retry, retryUntil } from '@aztec/foundation/retry';
|
|
53
|
-
export { to2Fields, toBigInt } from '@aztec/foundation/serialize';
|
|
54
|
-
export { sleep } from '@aztec/foundation/sleep';
|
|
55
|
-
export { elapsed } from '@aztec/foundation/timer';
|
|
56
|
-
export { fileURLToPath } from '@aztec/foundation/url';
|
|
57
|
-
// Start of section that exports public api via granular api.
|
|
58
|
-
// Here you *can* do `export *` as the granular api defacto exports things explicitly.
|
|
59
|
-
// This entire index file will be deprecated at some point after we're satisfied.
|
|
60
|
-
export * from './api/abi.js';
|
|
61
|
-
export * from './api/account.js';
|
|
62
|
-
export * from './api/addresses.js';
|
|
63
|
-
export * from './api/cheat_codes.js';
|
|
64
|
-
export * from './api/ethereum/index.js';
|
|
65
|
-
export * from './api/fee.js';
|
|
66
|
-
export * from './api/log.js';
|
|
67
|
-
// Granular export, even if not in the api folder
|
|
68
|
-
export * from './contract/index.js';
|
|
69
|
-
export * from './utils/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rpc_clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|