@startale-scs/aa-sdk 0.0.0-dev.20260331120000
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/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/_cjs/account/decorators/getFactoryData.js +36 -0
- package/dist/_cjs/account/decorators/getFactoryData.js.map +1 -0
- package/dist/_cjs/account/decorators/getStartaleAccountAddress.js +18 -0
- package/dist/_cjs/account/decorators/getStartaleAccountAddress.js.map +1 -0
- package/dist/_cjs/account/decorators/index.js +6 -0
- package/dist/_cjs/account/decorators/index.js.map +1 -0
- package/dist/_cjs/account/index.js +6 -0
- package/dist/_cjs/account/index.js.map +1 -0
- package/dist/_cjs/account/toStartaleSmartAccount.js +311 -0
- package/dist/_cjs/account/toStartaleSmartAccount.js.map +1 -0
- package/dist/_cjs/account/utils/AccountNotFound.js +18 -0
- package/dist/_cjs/account/utils/AccountNotFound.js.map +1 -0
- package/dist/_cjs/account/utils/Constants.js +128 -0
- package/dist/_cjs/account/utils/Constants.js.map +1 -0
- package/dist/_cjs/account/utils/Helpers.js +39 -0
- package/dist/_cjs/account/utils/Helpers.js.map +1 -0
- package/dist/_cjs/account/utils/Logger.js +35 -0
- package/dist/_cjs/account/utils/Logger.js.map +1 -0
- package/dist/_cjs/account/utils/Types.js +3 -0
- package/dist/_cjs/account/utils/Types.js.map +1 -0
- package/dist/_cjs/account/utils/Utils.js +258 -0
- package/dist/_cjs/account/utils/Utils.js.map +1 -0
- package/dist/_cjs/account/utils/addressToEmptyAccount.js +24 -0
- package/dist/_cjs/account/utils/addressToEmptyAccount.js.map +1 -0
- package/dist/_cjs/account/utils/contractSimulation.js +27 -0
- package/dist/_cjs/account/utils/contractSimulation.js.map +1 -0
- package/dist/_cjs/account/utils/deepHexlify.js +26 -0
- package/dist/_cjs/account/utils/deepHexlify.js.map +1 -0
- package/dist/_cjs/account/utils/eip7702Utils.js +21 -0
- package/dist/_cjs/account/utils/eip7702Utils.js.map +1 -0
- package/dist/_cjs/account/utils/fromBundlerClient.js +45 -0
- package/dist/_cjs/account/utils/fromBundlerClient.js.map +1 -0
- package/dist/_cjs/account/utils/getAAError.js +37 -0
- package/dist/_cjs/account/utils/getAAError.js.map +1 -0
- package/dist/_cjs/account/utils/getChain.js +66 -0
- package/dist/_cjs/account/utils/getChain.js.map +1 -0
- package/dist/_cjs/account/utils/getVersion.js +46 -0
- package/dist/_cjs/account/utils/getVersion.js.map +1 -0
- package/dist/_cjs/account/utils/index.js +28 -0
- package/dist/_cjs/account/utils/index.js.map +1 -0
- package/dist/_cjs/account/utils/parseErrorMessage.js +79 -0
- package/dist/_cjs/account/utils/parseErrorMessage.js.map +1 -0
- package/dist/_cjs/account/utils/tenderlySimulation.js +52 -0
- package/dist/_cjs/account/utils/tenderlySimulation.js.map +1 -0
- package/dist/_cjs/account/utils/toInitData.js +13 -0
- package/dist/_cjs/account/utils/toInitData.js.map +1 -0
- package/dist/_cjs/account/utils/toInstallData.js +15 -0
- package/dist/_cjs/account/utils/toInstallData.js.map +1 -0
- package/dist/_cjs/account/utils/toSigner.js +81 -0
- package/dist/_cjs/account/utils/toSigner.js.map +1 -0
- package/dist/_cjs/clients/createHttpClient.js +46 -0
- package/dist/_cjs/clients/createHttpClient.js.map +1 -0
- package/dist/_cjs/clients/createSCSBundlerClient.js +85 -0
- package/dist/_cjs/clients/createSCSBundlerClient.js.map +1 -0
- package/dist/_cjs/clients/createSCSPaymasterClient.js +48 -0
- package/dist/_cjs/clients/createSCSPaymasterClient.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js +49 -0
- package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/index.js +11 -0
- package/dist/_cjs/clients/decorators/bundler/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js +11 -0
- package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/accountId.js +65 -0
- package/dist/_cjs/clients/decorators/erc7579/accountId.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getActiveHook.js +43 -0
- package/dist/_cjs/clients/decorators/erc7579/getActiveHook.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getFallbackBySelector.js +56 -0
- package/dist/_cjs/clients/decorators/erc7579/getFallbackBySelector.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledExecutors.js +63 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledExecutors.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledValidators.js +61 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledValidators.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getPreviousModule.js +37 -0
- package/dist/_cjs/clients/decorators/erc7579/getPreviousModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/index.js +64 -0
- package/dist/_cjs/clients/decorators/erc7579/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/installModule.js +73 -0
- package/dist/_cjs/clients/decorators/erc7579/installModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/installModules.js +25 -0
- package/dist/_cjs/clients/decorators/erc7579/installModules.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/isModuleInstalled.js +90 -0
- package/dist/_cjs/clients/decorators/erc7579/isModuleInstalled.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsExecutionMode.js +102 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsExecutionMode.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsModule.js +90 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallFallback.js +61 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallFallback.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModule.js +79 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModules.js +26 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModules.js.map +1 -0
- package/dist/_cjs/clients/decorators/index.js +8 -0
- package/dist/_cjs/clients/decorators/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/debugUserOperation.js +75 -0
- package/dist/_cjs/clients/decorators/smartAccount/debugUserOperation.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/index.js +32 -0
- package/dist/_cjs/clients/decorators/smartAccount/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js +32 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js +35 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js +21 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTransaction.js +41 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTransaction.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/signMessage.js +14 -0
- package/dist/_cjs/clients/decorators/smartAccount/signMessage.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/signTypedData.js +31 -0
- package/dist/_cjs/clients/decorators/smartAccount/signTypedData.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/upgradeSmartAccount.js +61 -0
- package/dist/_cjs/clients/decorators/smartAccount/upgradeSmartAccount.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/waitForTransactionReceipt.js +17 -0
- package/dist/_cjs/clients/decorators/smartAccount/waitForTransactionReceipt.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/writeContract.js +20 -0
- package/dist/_cjs/clients/decorators/smartAccount/writeContract.js.map +1 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getSupportedTokens.js +25 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getSupportedTokens.js.map +1 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js +71 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js.map +1 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/index.js +11 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/index.js.map +1 -0
- package/dist/_cjs/clients/index.js +8 -0
- package/dist/_cjs/clients/index.js.map +1 -0
- package/dist/_cjs/constants/abi/AccountFactory.js +337 -0
- package/dist/_cjs/constants/abi/AccountFactory.js.map +1 -0
- package/dist/_cjs/constants/abi/AccountImplementationAbi.js +1179 -0
- package/dist/_cjs/constants/abi/AccountImplementationAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/BootstrapAbi.js +730 -0
- package/dist/_cjs/constants/abi/BootstrapAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/ComposabilityAbi.js +274 -0
- package/dist/_cjs/constants/abi/ComposabilityAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/EIP1271Abi.js +31 -0
- package/dist/_cjs/constants/abi/EIP1271Abi.js.map +1 -0
- package/dist/_cjs/constants/abi/ERC7484RegistryAbi.js +17 -0
- package/dist/_cjs/constants/abi/ERC7484RegistryAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/EntryPointABI.js +661 -0
- package/dist/_cjs/constants/abi/EntryPointABI.js.map +1 -0
- package/dist/_cjs/constants/abi/SmartSessionAbi.js +1472 -0
- package/dist/_cjs/constants/abi/SmartSessionAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/TokenWithPermitAbi.js +622 -0
- package/dist/_cjs/constants/abi/TokenWithPermitAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/UniActionPolicyAbi.js +62 -0
- package/dist/_cjs/constants/abi/UniActionPolicyAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/UniswapSwapRouterAbi.js +486 -0
- package/dist/_cjs/constants/abi/UniswapSwapRouterAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/index.js +14 -0
- package/dist/_cjs/constants/abi/index.js.map +1 -0
- package/dist/_cjs/constants/index.js +64 -0
- package/dist/_cjs/constants/index.js.map +1 -0
- package/dist/_cjs/index.js +13 -0
- package/dist/_cjs/index.js.map +1 -0
- package/dist/_cjs/modules/index.js +8 -0
- package/dist/_cjs/modules/index.js.map +1 -0
- package/dist/_cjs/modules/toEmptyExecutor.js +10 -0
- package/dist/_cjs/modules/toEmptyExecutor.js.map +1 -0
- package/dist/_cjs/modules/toEmptyHook.js +10 -0
- package/dist/_cjs/modules/toEmptyHook.js.map +1 -0
- package/dist/_cjs/modules/utils/Helpers.js +59 -0
- package/dist/_cjs/modules/utils/Helpers.js.map +1 -0
- package/dist/_cjs/modules/utils/Types.js +15 -0
- package/dist/_cjs/modules/utils/Types.js.map +1 -0
- package/dist/_cjs/modules/utils/Uid.js +14 -0
- package/dist/_cjs/modules/utils/Uid.js.map +1 -0
- package/dist/_cjs/modules/utils/composabilityCalls.js +117 -0
- package/dist/_cjs/modules/utils/composabilityCalls.js.map +1 -0
- package/dist/_cjs/modules/utils/index.js +9 -0
- package/dist/_cjs/modules/utils/index.js.map +1 -0
- package/dist/_cjs/modules/utils/runtimeAbiEncoding.js +276 -0
- package/dist/_cjs/modules/utils/runtimeAbiEncoding.js.map +1 -0
- package/dist/_cjs/modules/utils/toModule.js +39 -0
- package/dist/_cjs/modules/utils/toModule.js.map +1 -0
- package/dist/_cjs/modules/validators/default/index.js +5 -0
- package/dist/_cjs/modules/validators/default/index.js.map +1 -0
- package/dist/_cjs/modules/validators/default/toDefaultModule.js +18 -0
- package/dist/_cjs/modules/validators/default/toDefaultModule.js.map +1 -0
- package/dist/_cjs/modules/validators/index.js +9 -0
- package/dist/_cjs/modules/validators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/addOwner.js +48 -0
- package/dist/_cjs/modules/validators/ownable/decorators/addOwner.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getAddOwnerTx.js +42 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getAddOwnerTx.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getOwners.js +28 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getOwners.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getRemoveOwnerTx.js +42 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getRemoveOwnerTx.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getSetThresholdTx.js +32 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getSetThresholdTx.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getThreshold.js +28 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getThreshold.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/index.js +70 -0
- package/dist/_cjs/modules/validators/ownable/decorators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/multiSign.js +25 -0
- package/dist/_cjs/modules/validators/ownable/decorators/multiSign.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/prepareForMultiSign.js +22 -0
- package/dist/_cjs/modules/validators/ownable/decorators/prepareForMultiSign.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/removeOwner.js +47 -0
- package/dist/_cjs/modules/validators/ownable/decorators/removeOwner.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/setThreshold.js +39 -0
- package/dist/_cjs/modules/validators/ownable/decorators/setThreshold.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/index.js +6 -0
- package/dist/_cjs/modules/validators/ownable/index.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/toOwnableModule.js +16 -0
- package/dist/_cjs/modules/validators/ownable/toOwnableModule.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Helpers.js +132 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Helpers.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Types.js +13 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Types.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/grantPermission.js +38 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js +30 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js +152 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/revokeSession.js +42 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/revokeSession.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/usePermission.js +16 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/usePermission.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/index.js +8 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/index.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js +49 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js.map +1 -0
- package/dist/_cjs/modules/validators/toValidator.js +21 -0
- package/dist/_cjs/modules/validators/toValidator.js.map +1 -0
- package/dist/_cjs/package.json +1 -0
- package/dist/_esm/account/decorators/getFactoryData.js +31 -0
- package/dist/_esm/account/decorators/getFactoryData.js.map +1 -0
- package/dist/_esm/account/decorators/getStartaleAccountAddress.js +31 -0
- package/dist/_esm/account/decorators/getStartaleAccountAddress.js.map +1 -0
- package/dist/_esm/account/decorators/index.js +3 -0
- package/dist/_esm/account/decorators/index.js.map +1 -0
- package/dist/_esm/account/index.js +3 -0
- package/dist/_esm/account/index.js.map +1 -0
- package/dist/_esm/account/toStartaleSmartAccount.js +403 -0
- package/dist/_esm/account/toStartaleSmartAccount.js.map +1 -0
- package/dist/_esm/account/utils/AccountNotFound.js +17 -0
- package/dist/_esm/account/utils/AccountNotFound.js.map +1 -0
- package/dist/_esm/account/utils/Constants.js +129 -0
- package/dist/_esm/account/utils/Constants.js.map +1 -0
- package/dist/_esm/account/utils/Helpers.js +45 -0
- package/dist/_esm/account/utils/Helpers.js.map +1 -0
- package/dist/_esm/account/utils/Logger.js +50 -0
- package/dist/_esm/account/utils/Logger.js.map +1 -0
- package/dist/_esm/account/utils/Types.js +2 -0
- package/dist/_esm/account/utils/Types.js.map +1 -0
- package/dist/_esm/account/utils/Utils.js +319 -0
- package/dist/_esm/account/utils/Utils.js.map +1 -0
- package/dist/_esm/account/utils/addressToEmptyAccount.js +21 -0
- package/dist/_esm/account/utils/addressToEmptyAccount.js.map +1 -0
- package/dist/_esm/account/utils/contractSimulation.js +48 -0
- package/dist/_esm/account/utils/contractSimulation.js.map +1 -0
- package/dist/_esm/account/utils/deepHexlify.js +63 -0
- package/dist/_esm/account/utils/deepHexlify.js.map +1 -0
- package/dist/_esm/account/utils/eip7702Utils.js +16 -0
- package/dist/_esm/account/utils/eip7702Utils.js.map +1 -0
- package/dist/_esm/account/utils/fromBundlerClient.js +67 -0
- package/dist/_esm/account/utils/fromBundlerClient.js.map +1 -0
- package/dist/_esm/account/utils/getAAError.js +34 -0
- package/dist/_esm/account/utils/getAAError.js.map +1 -0
- package/dist/_esm/account/utils/getChain.js +117 -0
- package/dist/_esm/account/utils/getChain.js.map +1 -0
- package/dist/_esm/account/utils/getVersion.js +163 -0
- package/dist/_esm/account/utils/getVersion.js.map +1 -0
- package/dist/_esm/account/utils/index.js +20 -0
- package/dist/_esm/account/utils/index.js.map +1 -0
- package/dist/_esm/account/utils/parseErrorMessage.js +89 -0
- package/dist/_esm/account/utils/parseErrorMessage.js.map +1 -0
- package/dist/_esm/account/utils/tenderlySimulation.js +47 -0
- package/dist/_esm/account/utils/tenderlySimulation.js.map +1 -0
- package/dist/_esm/account/utils/toInitData.js +14 -0
- package/dist/_esm/account/utils/toInitData.js.map +1 -0
- package/dist/_esm/account/utils/toInstallData.js +16 -0
- package/dist/_esm/account/utils/toInstallData.js.map +1 -0
- package/dist/_esm/account/utils/toSigner.js +91 -0
- package/dist/_esm/account/utils/toSigner.js.map +1 -0
- package/dist/_esm/clients/createHttpClient.js +47 -0
- package/dist/_esm/clients/createHttpClient.js.map +1 -0
- package/dist/_esm/clients/createSCSBundlerClient.js +96 -0
- package/dist/_esm/clients/createSCSBundlerClient.js.map +1 -0
- package/dist/_esm/clients/createSCSPaymasterClient.js +85 -0
- package/dist/_esm/clients/createSCSPaymasterClient.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js +77 -0
- package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/index.js +7 -0
- package/dist/_esm/clients/decorators/bundler/index.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js +8 -0
- package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/accountId.js +77 -0
- package/dist/_esm/clients/decorators/erc7579/accountId.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getActiveHook.js +52 -0
- package/dist/_esm/clients/decorators/erc7579/getActiveHook.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getFallbackBySelector.js +67 -0
- package/dist/_esm/clients/decorators/erc7579/getFallbackBySelector.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledExecutors.js +74 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledExecutors.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledValidators.js +72 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledValidators.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getPreviousModule.js +54 -0
- package/dist/_esm/clients/decorators/erc7579/getPreviousModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/index.js +48 -0
- package/dist/_esm/clients/decorators/erc7579/index.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/installModule.js +115 -0
- package/dist/_esm/clients/decorators/erc7579/installModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/installModules.js +41 -0
- package/dist/_esm/clients/decorators/erc7579/installModules.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/isModuleInstalled.js +106 -0
- package/dist/_esm/clients/decorators/erc7579/isModuleInstalled.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/supportsExecutionMode.js +120 -0
- package/dist/_esm/clients/decorators/erc7579/supportsExecutionMode.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/supportsModule.js +108 -0
- package/dist/_esm/clients/decorators/erc7579/supportsModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallFallback.js +76 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallFallback.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModule.js +94 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModules.js +42 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModules.js.map +1 -0
- package/dist/_esm/clients/decorators/index.js +5 -0
- package/dist/_esm/clients/decorators/index.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/debugUserOperation.js +105 -0
- package/dist/_esm/clients/decorators/smartAccount/debugUserOperation.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/index.js +28 -0
- package/dist/_esm/clients/decorators/smartAccount/index.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js +60 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js +36 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js +43 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTransaction.js +57 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTransaction.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/signMessage.js +30 -0
- package/dist/_esm/clients/decorators/smartAccount/signMessage.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/signTypedData.js +82 -0
- package/dist/_esm/clients/decorators/smartAccount/signTypedData.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/upgradeSmartAccount.js +75 -0
- package/dist/_esm/clients/decorators/smartAccount/upgradeSmartAccount.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/waitForTransactionReceipt.js +14 -0
- package/dist/_esm/clients/decorators/smartAccount/waitForTransactionReceipt.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/writeContract.js +40 -0
- package/dist/_esm/clients/decorators/smartAccount/writeContract.js.map +1 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getSupportedTokens.js +35 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getSupportedTokens.js.map +1 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js +120 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js.map +1 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/index.js +63 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/index.js.map +1 -0
- package/dist/_esm/clients/index.js +5 -0
- package/dist/_esm/clients/index.js.map +1 -0
- package/dist/_esm/constants/abi/AccountFactory.js +334 -0
- package/dist/_esm/constants/abi/AccountFactory.js.map +1 -0
- package/dist/_esm/constants/abi/AccountImplementationAbi.js +1176 -0
- package/dist/_esm/constants/abi/AccountImplementationAbi.js.map +1 -0
- package/dist/_esm/constants/abi/BootstrapAbi.js +727 -0
- package/dist/_esm/constants/abi/BootstrapAbi.js.map +1 -0
- package/dist/_esm/constants/abi/ComposabilityAbi.js +271 -0
- package/dist/_esm/constants/abi/ComposabilityAbi.js.map +1 -0
- package/dist/_esm/constants/abi/EIP1271Abi.js +28 -0
- package/dist/_esm/constants/abi/EIP1271Abi.js.map +1 -0
- package/dist/_esm/constants/abi/ERC7484RegistryAbi.js +14 -0
- package/dist/_esm/constants/abi/ERC7484RegistryAbi.js.map +1 -0
- package/dist/_esm/constants/abi/EntryPointABI.js +658 -0
- package/dist/_esm/constants/abi/EntryPointABI.js.map +1 -0
- package/dist/_esm/constants/abi/SmartSessionAbi.js +1469 -0
- package/dist/_esm/constants/abi/SmartSessionAbi.js.map +1 -0
- package/dist/_esm/constants/abi/TokenWithPermitAbi.js +619 -0
- package/dist/_esm/constants/abi/TokenWithPermitAbi.js.map +1 -0
- package/dist/_esm/constants/abi/UniActionPolicyAbi.js +59 -0
- package/dist/_esm/constants/abi/UniActionPolicyAbi.js.map +1 -0
- package/dist/_esm/constants/abi/UniswapSwapRouterAbi.js +483 -0
- package/dist/_esm/constants/abi/UniswapSwapRouterAbi.js.map +1 -0
- package/dist/_esm/constants/abi/index.js +11 -0
- package/dist/_esm/constants/abi/index.js.map +1 -0
- package/dist/_esm/constants/index.js +38 -0
- package/dist/_esm/constants/index.js.map +1 -0
- package/dist/_esm/index.js +12 -0
- package/dist/_esm/index.js.map +1 -0
- package/dist/_esm/modules/index.js +6 -0
- package/dist/_esm/modules/index.js.map +1 -0
- package/dist/_esm/modules/toEmptyExecutor.js +6 -0
- package/dist/_esm/modules/toEmptyExecutor.js.map +1 -0
- package/dist/_esm/modules/toEmptyHook.js +6 -0
- package/dist/_esm/modules/toEmptyHook.js.map +1 -0
- package/dist/_esm/modules/utils/Helpers.js +81 -0
- package/dist/_esm/modules/utils/Helpers.js.map +1 -0
- package/dist/_esm/modules/utils/Types.js +12 -0
- package/dist/_esm/modules/utils/Types.js.map +1 -0
- package/dist/_esm/modules/utils/Uid.js +11 -0
- package/dist/_esm/modules/utils/Uid.js.map +1 -0
- package/dist/_esm/modules/utils/composabilityCalls.js +127 -0
- package/dist/_esm/modules/utils/composabilityCalls.js.map +1 -0
- package/dist/_esm/modules/utils/index.js +6 -0
- package/dist/_esm/modules/utils/index.js.map +1 -0
- package/dist/_esm/modules/utils/runtimeAbiEncoding.js +365 -0
- package/dist/_esm/modules/utils/runtimeAbiEncoding.js.map +1 -0
- package/dist/_esm/modules/utils/toModule.js +61 -0
- package/dist/_esm/modules/utils/toModule.js.map +1 -0
- package/dist/_esm/modules/validators/default/index.js +2 -0
- package/dist/_esm/modules/validators/default/index.js.map +1 -0
- package/dist/_esm/modules/validators/default/toDefaultModule.js +14 -0
- package/dist/_esm/modules/validators/default/toDefaultModule.js.map +1 -0
- package/dist/_esm/modules/validators/index.js +6 -0
- package/dist/_esm/modules/validators/index.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/addOwner.js +56 -0
- package/dist/_esm/modules/validators/ownable/decorators/addOwner.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getAddOwnerTx.js +50 -0
- package/dist/_esm/modules/validators/ownable/decorators/getAddOwnerTx.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getOwners.js +38 -0
- package/dist/_esm/modules/validators/ownable/decorators/getOwners.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getRemoveOwnerTx.js +50 -0
- package/dist/_esm/modules/validators/ownable/decorators/getRemoveOwnerTx.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getSetThresholdTx.js +48 -0
- package/dist/_esm/modules/validators/ownable/decorators/getSetThresholdTx.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getThreshold.js +54 -0
- package/dist/_esm/modules/validators/ownable/decorators/getThreshold.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/index.js +57 -0
- package/dist/_esm/modules/validators/ownable/decorators/index.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/multiSign.js +22 -0
- package/dist/_esm/modules/validators/ownable/decorators/multiSign.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/prepareForMultiSign.js +21 -0
- package/dist/_esm/modules/validators/ownable/decorators/prepareForMultiSign.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/removeOwner.js +66 -0
- package/dist/_esm/modules/validators/ownable/decorators/removeOwner.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/setThreshold.js +62 -0
- package/dist/_esm/modules/validators/ownable/decorators/setThreshold.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/index.js +3 -0
- package/dist/_esm/modules/validators/ownable/index.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/toOwnableModule.js +38 -0
- package/dist/_esm/modules/validators/ownable/toOwnableModule.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Helpers.js +181 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Helpers.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Types.js +13 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Types.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js +80 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js +37 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js +214 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/revokeSession.js +67 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/revokeSession.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/usePermission.js +47 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/usePermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/index.js +5 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/index.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js +82 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js.map +1 -0
- package/dist/_esm/modules/validators/toValidator.js +17 -0
- package/dist/_esm/modules/validators/toValidator.js.map +1 -0
- package/dist/_esm/package.json +1 -0
- package/dist/_types/account/decorators/getFactoryData.d.ts +25 -0
- package/dist/_types/account/decorators/getFactoryData.d.ts.map +1 -0
- package/dist/_types/account/decorators/getStartaleAccountAddress.d.ts +33 -0
- package/dist/_types/account/decorators/getStartaleAccountAddress.d.ts.map +1 -0
- package/dist/_types/account/decorators/index.d.ts +3 -0
- package/dist/_types/account/decorators/index.d.ts.map +1 -0
- package/dist/_types/account/index.d.ts +3 -0
- package/dist/_types/account/index.d.ts.map +1 -0
- package/dist/_types/account/toStartaleSmartAccount.d.ts +120 -0
- package/dist/_types/account/toStartaleSmartAccount.d.ts.map +1 -0
- package/dist/_types/account/utils/AccountNotFound.d.ts +10 -0
- package/dist/_types/account/utils/AccountNotFound.d.ts.map +1 -0
- package/dist/_types/account/utils/Constants.d.ts +73 -0
- package/dist/_types/account/utils/Constants.d.ts.map +1 -0
- package/dist/_types/account/utils/Helpers.d.ts +21 -0
- package/dist/_types/account/utils/Helpers.d.ts.map +1 -0
- package/dist/_types/account/utils/Logger.d.ts +20 -0
- package/dist/_types/account/utils/Logger.d.ts.map +1 -0
- package/dist/_types/account/utils/Types.d.ts +94 -0
- package/dist/_types/account/utils/Types.d.ts.map +1 -0
- package/dist/_types/account/utils/Utils.d.ts +129 -0
- package/dist/_types/account/utils/Utils.d.ts.map +1 -0
- package/dist/_types/account/utils/addressToEmptyAccount.d.ts +4 -0
- package/dist/_types/account/utils/addressToEmptyAccount.d.ts.map +1 -0
- package/dist/_types/account/utils/contractSimulation.d.ts +801 -0
- package/dist/_types/account/utils/contractSimulation.d.ts.map +1 -0
- package/dist/_types/account/utils/deepHexlify.d.ts +41 -0
- package/dist/_types/account/utils/deepHexlify.d.ts.map +1 -0
- package/dist/_types/account/utils/eip7702Utils.d.ts +4 -0
- package/dist/_types/account/utils/eip7702Utils.d.ts.map +1 -0
- package/dist/_types/account/utils/fromBundlerClient.d.ts +50 -0
- package/dist/_types/account/utils/fromBundlerClient.d.ts.map +1 -0
- package/dist/_types/account/utils/getAAError.d.ts +17 -0
- package/dist/_types/account/utils/getAAError.d.ts.map +1 -0
- package/dist/_types/account/utils/getChain.d.ts +64 -0
- package/dist/_types/account/utils/getChain.d.ts.map +1 -0
- package/dist/_types/account/utils/getVersion.d.ts +135 -0
- package/dist/_types/account/utils/getVersion.d.ts.map +1 -0
- package/dist/_types/account/utils/index.d.ts +20 -0
- package/dist/_types/account/utils/index.d.ts.map +1 -0
- package/dist/_types/account/utils/parseErrorMessage.d.ts +2 -0
- package/dist/_types/account/utils/parseErrorMessage.d.ts.map +1 -0
- package/dist/_types/account/utils/tenderlySimulation.d.ts +13 -0
- package/dist/_types/account/utils/tenderlySimulation.d.ts.map +1 -0
- package/dist/_types/account/utils/toInitData.d.ts +12 -0
- package/dist/_types/account/utils/toInitData.d.ts.map +1 -0
- package/dist/_types/account/utils/toInstallData.d.ts +8 -0
- package/dist/_types/account/utils/toInstallData.d.ts.map +1 -0
- package/dist/_types/account/utils/toSigner.d.ts +26 -0
- package/dist/_types/account/utils/toSigner.d.ts.map +1 -0
- package/dist/_types/clients/createHttpClient.d.ts +44 -0
- package/dist/_types/clients/createHttpClient.d.ts.map +1 -0
- package/dist/_types/clients/createSCSBundlerClient.d.ts +66 -0
- package/dist/_types/clients/createSCSBundlerClient.d.ts.map +1 -0
- package/dist/_types/clients/createSCSPaymasterClient.d.ts +70 -0
- package/dist/_types/clients/createSCSPaymasterClient.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/getGasFeeValues.d.ts +51 -0
- package/dist/_types/clients/decorators/bundler/getGasFeeValues.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/index.d.ts +43 -0
- package/dist/_types/clients/decorators/bundler/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/waitForUserOperationReceipt.d.ts +5 -0
- package/dist/_types/clients/decorators/bundler/waitForUserOperationReceipt.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/accountId.d.ts +21 -0
- package/dist/_types/clients/decorators/erc7579/accountId.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getActiveHook.d.ts +35 -0
- package/dist/_types/clients/decorators/erc7579/getActiveHook.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getFallbackBySelector.d.ts +43 -0
- package/dist/_types/clients/decorators/erc7579/getFallbackBySelector.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledExecutors.d.ts +52 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledExecutors.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledValidators.d.ts +52 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledValidators.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getPreviousModule.d.ts +32 -0
- package/dist/_types/clients/decorators/erc7579/getPreviousModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/index.d.ts +165 -0
- package/dist/_types/clients/decorators/erc7579/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/installModule.d.ts +36 -0
- package/dist/_types/clients/decorators/erc7579/installModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/installModules.d.ts +36 -0
- package/dist/_types/clients/decorators/erc7579/installModules.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/isModuleInstalled.d.ts +54 -0
- package/dist/_types/clients/decorators/erc7579/isModuleInstalled.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/supportsExecutionMode.d.ts +54 -0
- package/dist/_types/clients/decorators/erc7579/supportsExecutionMode.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/supportsModule.d.ts +48 -0
- package/dist/_types/clients/decorators/erc7579/supportsModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/uninstallFallback.d.ts +35 -0
- package/dist/_types/clients/decorators/erc7579/uninstallFallback.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModule.d.ts +35 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModules.d.ts +32 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModules.d.ts.map +1 -0
- package/dist/_types/clients/decorators/index.d.ts +5 -0
- package/dist/_types/clients/decorators/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/debugUserOperation.d.ts +35 -0
- package/dist/_types/clients/decorators/smartAccount/debugUserOperation.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/index.d.ts +315 -0
- package/dist/_types/clients/decorators/smartAccount/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.d.ts +52 -0
- package/dist/_types/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts +16 -0
- package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/sendTokenPaymasterUserOp.d.ts +36 -0
- package/dist/_types/clients/decorators/smartAccount/sendTokenPaymasterUserOp.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/sendTransaction.d.ts +23 -0
- package/dist/_types/clients/decorators/smartAccount/sendTransaction.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/signMessage.d.ts +23 -0
- package/dist/_types/clients/decorators/smartAccount/signMessage.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/signTypedData.d.ts +60 -0
- package/dist/_types/clients/decorators/smartAccount/signTypedData.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/upgradeSmartAccount.d.ts +40 -0
- package/dist/_types/clients/decorators/smartAccount/upgradeSmartAccount.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/waitForTransactionReceipt.d.ts +6 -0
- package/dist/_types/clients/decorators/smartAccount/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/writeContract.d.ts +27 -0
- package/dist/_types/clients/decorators/smartAccount/writeContract.d.ts.map +1 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getSupportedTokens.d.ts +16 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getSupportedTokens.d.ts.map +1 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.d.ts +93 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.d.ts.map +1 -0
- package/dist/_types/clients/decorators/tokenPaymaster/index.d.ts +65 -0
- package/dist/_types/clients/decorators/tokenPaymaster/index.d.ts.map +1 -0
- package/dist/_types/clients/index.d.ts +5 -0
- package/dist/_types/clients/index.d.ts.map +1 -0
- package/dist/_types/constants/abi/AccountFactory.d.ts +259 -0
- package/dist/_types/constants/abi/AccountFactory.d.ts.map +1 -0
- package/dist/_types/constants/abi/AccountImplementationAbi.d.ts +903 -0
- package/dist/_types/constants/abi/AccountImplementationAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/BootstrapAbi.d.ts +554 -0
- package/dist/_types/constants/abi/BootstrapAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/ComposabilityAbi.d.ts +67 -0
- package/dist/_types/constants/abi/ComposabilityAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/EIP1271Abi.d.ts +54 -0
- package/dist/_types/constants/abi/EIP1271Abi.d.ts.map +1 -0
- package/dist/_types/constants/abi/ERC7484RegistryAbi.d.ts +16 -0
- package/dist/_types/constants/abi/ERC7484RegistryAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/EntryPointABI.d.ts +776 -0
- package/dist/_types/constants/abi/EntryPointABI.d.ts.map +1 -0
- package/dist/_types/constants/abi/SmartSessionAbi.d.ts +90 -0
- package/dist/_types/constants/abi/SmartSessionAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/TokenWithPermitAbi.d.ts +477 -0
- package/dist/_types/constants/abi/TokenWithPermitAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/UniActionPolicyAbi.d.ts +33 -0
- package/dist/_types/constants/abi/UniActionPolicyAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/UniswapSwapRouterAbi.d.ts +821 -0
- package/dist/_types/constants/abi/UniswapSwapRouterAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/index.d.ts +11 -0
- package/dist/_types/constants/abi/index.d.ts.map +1 -0
- package/dist/_types/constants/index.d.ts +20 -0
- package/dist/_types/constants/index.d.ts.map +1 -0
- package/dist/_types/index.d.ts +7 -0
- package/dist/_types/index.d.ts.map +1 -0
- package/dist/_types/modules/index.d.ts +6 -0
- package/dist/_types/modules/index.d.ts.map +1 -0
- package/dist/_types/modules/toEmptyExecutor.d.ts +3 -0
- package/dist/_types/modules/toEmptyExecutor.d.ts.map +1 -0
- package/dist/_types/modules/toEmptyHook.d.ts +3 -0
- package/dist/_types/modules/toEmptyHook.d.ts.map +1 -0
- package/dist/_types/modules/utils/Helpers.d.ts +48 -0
- package/dist/_types/modules/utils/Helpers.d.ts.map +1 -0
- package/dist/_types/modules/utils/Types.d.ts +103 -0
- package/dist/_types/modules/utils/Types.d.ts.map +1 -0
- package/dist/_types/modules/utils/Uid.d.ts +2 -0
- package/dist/_types/modules/utils/Uid.d.ts.map +1 -0
- package/dist/_types/modules/utils/composabilityCalls.d.ts +63 -0
- package/dist/_types/modules/utils/composabilityCalls.d.ts.map +1 -0
- package/dist/_types/modules/utils/index.d.ts +6 -0
- package/dist/_types/modules/utils/index.d.ts.map +1 -0
- package/dist/_types/modules/utils/runtimeAbiEncoding.d.ts +18 -0
- package/dist/_types/modules/utils/runtimeAbiEncoding.d.ts.map +1 -0
- package/dist/_types/modules/utils/toModule.d.ts +28 -0
- package/dist/_types/modules/utils/toModule.d.ts.map +1 -0
- package/dist/_types/modules/validators/default/index.d.ts +2 -0
- package/dist/_types/modules/validators/default/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/default/toDefaultModule.d.ts +3 -0
- package/dist/_types/modules/validators/default/toDefaultModule.d.ts.map +1 -0
- package/dist/_types/modules/validators/index.d.ts +6 -0
- package/dist/_types/modules/validators/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/addOwner.d.ts +36 -0
- package/dist/_types/modules/validators/ownable/decorators/addOwner.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getAddOwnerTx.d.ts +30 -0
- package/dist/_types/modules/validators/ownable/decorators/getAddOwnerTx.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getOwners.d.ts +25 -0
- package/dist/_types/modules/validators/ownable/decorators/getOwners.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getRemoveOwnerTx.d.ts +30 -0
- package/dist/_types/modules/validators/ownable/decorators/getRemoveOwnerTx.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getSetThresholdTx.d.ts +39 -0
- package/dist/_types/modules/validators/ownable/decorators/getSetThresholdTx.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getThreshold.d.ts +40 -0
- package/dist/_types/modules/validators/ownable/decorators/getThreshold.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/index.d.ts +37 -0
- package/dist/_types/modules/validators/ownable/decorators/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/multiSign.d.ts +11 -0
- package/dist/_types/modules/validators/ownable/decorators/multiSign.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/prepareForMultiSign.d.ts +25 -0
- package/dist/_types/modules/validators/ownable/decorators/prepareForMultiSign.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/removeOwner.d.ts +47 -0
- package/dist/_types/modules/validators/ownable/decorators/removeOwner.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/setThreshold.d.ts +51 -0
- package/dist/_types/modules/validators/ownable/decorators/setThreshold.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/index.d.ts +3 -0
- package/dist/_types/modules/validators/ownable/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/toOwnableModule.d.ts +44 -0
- package/dist/_types/modules/validators/ownable/toOwnableModule.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts +98 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts +262 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts +73 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/index.d.ts +79 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts +81 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/revokeSession.d.ts +55 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/revokeSession.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts +63 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/index.d.ts +5 -0
- package/dist/_types/modules/validators/smartSessionsValidator/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts +65 -0
- package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts.map +1 -0
- package/dist/_types/modules/validators/toValidator.d.ts +45 -0
- package/dist/_types/modules/validators/toValidator.d.ts.map +1 -0
- package/package.json +134 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import type { Abi, Chain, Client, ContractFunctionArgs, ContractFunctionName, Hash, Transport, TypedData, WaitForTransactionReceiptParameters, WaitForTransactionReceiptReturnType, WriteContractParameters } from "viem";
|
|
2
|
+
import type { PrepareUserOperationParameters, SmartAccount, UserOperation } from "viem/account-abstraction";
|
|
3
|
+
import type { CallDictionary } from "../erc7579";
|
|
4
|
+
import { type DebugUserOperationReturnType } from "./debugUserOperation";
|
|
5
|
+
import type { DebugUserOperationParameters } from "./debugUserOperation";
|
|
6
|
+
import { type PrepareTokenPaymasterUserOpParameters } from "./prepareTokenPaymasterUserOp";
|
|
7
|
+
import { prepareUserOperationWithoutSignature } from "./prepareUserOperationWithoutSignature";
|
|
8
|
+
import { type SendTokenPaymasterUserOpParameters } from "./sendTokenPaymasterUserOp";
|
|
9
|
+
import { sendTransaction } from "./sendTransaction";
|
|
10
|
+
import { signMessage } from "./signMessage";
|
|
11
|
+
import { signTypedData } from "./signTypedData";
|
|
12
|
+
import { type UpgradeSmartAccountParameters } from "./upgradeSmartAccount";
|
|
13
|
+
import { writeContract } from "./writeContract";
|
|
14
|
+
export type SmartAccountActions<TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined> = {
|
|
15
|
+
/**
|
|
16
|
+
* Prepares and sends a user operation with token paymaster
|
|
17
|
+
*
|
|
18
|
+
* @param client - The Startale client instance
|
|
19
|
+
* @param args - The parameters for the token paymaster user operation
|
|
20
|
+
* @param args.calls - Array of transactions to be executed
|
|
21
|
+
* @param args.feeTokenAddress - Address of the token to be used for paying gas fees
|
|
22
|
+
* @param args.customApprovalAmount - Optional custom amount to approve for the paymaster (defaults to unlimited)
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const hash = await sendTokenPaymasterUserOp(client, {
|
|
27
|
+
* calls: [{
|
|
28
|
+
* to: "0x...", // Contract address
|
|
29
|
+
* data: "0x...", // Encoded function data
|
|
30
|
+
* value: BigInt(0)
|
|
31
|
+
* }],
|
|
32
|
+
* feeTokenAddress: "0x...", // USDC/USDT/etc address
|
|
33
|
+
* customApprovalAmount: BigInt(1000) // Optional: specific approval amount
|
|
34
|
+
* })
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @returns A promise that resolves to the user operation hash {@link Hash}
|
|
38
|
+
*/
|
|
39
|
+
sendTokenPaymasterUserOp: (args: SendTokenPaymasterUserOpParameters) => Promise<Hash>;
|
|
40
|
+
/**
|
|
41
|
+
* Prepares a user operation with token paymaster configuration, including ERC20 token approval
|
|
42
|
+
*
|
|
43
|
+
* This function handles:
|
|
44
|
+
* 1. Checking current token allowance of Smart Account
|
|
45
|
+
* 2. Creating an approval transaction for the token paymaster if needed
|
|
46
|
+
* 3. Preparing the user operation with the approval and user transactions
|
|
47
|
+
*
|
|
48
|
+
* @param client - The StartaleAccountClient instance
|
|
49
|
+
* @param args.txs - Array of transactions to be executed
|
|
50
|
+
* @param args.feeTokenAddress - Token used for paying for the gas
|
|
51
|
+
* @param args.customApprovalAmount - Optional custom approval amount
|
|
52
|
+
*
|
|
53
|
+
* @returns A prepared user operation without signature (will be signed by the Smart Account when sent)
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const userOp = await prepareTokenPaymasterUserOp(startaleClient, {
|
|
58
|
+
* txs: [
|
|
59
|
+
* {
|
|
60
|
+
* to: recipientAddress,
|
|
61
|
+
* value: 1n,
|
|
62
|
+
* data: "0x"
|
|
63
|
+
* }
|
|
64
|
+
* ],
|
|
65
|
+
* feeTokenAddress: baseSepoliaUSDCAddress,
|
|
66
|
+
* customApprovalAmount: usdcFeeAmount
|
|
67
|
+
* })
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @throws Will throw an error if client account or paymaster context is not properly configured
|
|
71
|
+
*/
|
|
72
|
+
prepareTokenPaymasterUserOp: (args: PrepareTokenPaymasterUserOpParameters) => Promise<Omit<UserOperation, "signature">>;
|
|
73
|
+
/**
|
|
74
|
+
* Creates, signs, and sends a new transaction to the network using a smart account.
|
|
75
|
+
* This function also allows you to sponsor this transaction if the sender is a smart account.
|
|
76
|
+
*
|
|
77
|
+
* @param client - The client instance.
|
|
78
|
+
* @param args - Parameters for sending the transaction or user operation.
|
|
79
|
+
* @param customApprovalAmount - The amount to approve for the Token Paymaster to be spent on gas.
|
|
80
|
+
* @returns The transaction hash as a hexadecimal string.
|
|
81
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* import { sendTransaction } from '@startale-scs/aa-sdk'
|
|
85
|
+
*
|
|
86
|
+
* const hash = await startaleClient.sendTransaction({calls: [{to: '0x...', value: parseEther('0.1'), data: '0x...'}]})
|
|
87
|
+
* console.log(hash) // '0x...'
|
|
88
|
+
*/
|
|
89
|
+
sendTransaction: <TChainOverride extends Chain | undefined = undefined, accountOverride extends SmartAccount | undefined = undefined, calls extends readonly unknown[] = readonly unknown[]>(args: Parameters<typeof sendTransaction<TSmartAccount, TChain, accountOverride, TChainOverride, calls>>[1]) => Promise<Hash>;
|
|
90
|
+
/**
|
|
91
|
+
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
92
|
+
*
|
|
93
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signMessage.html
|
|
94
|
+
* - JSON-RPC Methods:
|
|
95
|
+
* - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data.html#personal-sign)
|
|
96
|
+
* - Local Accounts: Signs locally. No JSON-RPC request.
|
|
97
|
+
*
|
|
98
|
+
* With the calculated signature, you can:
|
|
99
|
+
* - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage.html) to verify the signature,
|
|
100
|
+
* - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress.html) to recover the signing address from a signature.
|
|
101
|
+
*
|
|
102
|
+
* @param args - {@link SignMessageParameters}
|
|
103
|
+
* @returns The signed message. {@link SignMessageReturnType}
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* import { createWalletClient, custom } from 'viem'
|
|
107
|
+
* import { mainnet } from 'viem/chains'
|
|
108
|
+
*
|
|
109
|
+
* const client = createWalletClient({
|
|
110
|
+
* chain: mainnet,
|
|
111
|
+
* transport: custom(window.ethereum),
|
|
112
|
+
* })
|
|
113
|
+
* const signature = await client.signMessage({
|
|
114
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
115
|
+
* message: 'hello world',
|
|
116
|
+
* })
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* // Account Hoisting
|
|
120
|
+
* import { createWalletClient, http } from 'viem'
|
|
121
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
122
|
+
* import { mainnet } from 'viem/chains'
|
|
123
|
+
*
|
|
124
|
+
* const client = createWalletClient({
|
|
125
|
+
* account: privateKeyToAccount('0x…'),
|
|
126
|
+
* chain: mainnet,
|
|
127
|
+
* transport: http(),
|
|
128
|
+
* })
|
|
129
|
+
* const signature = await client.signMessage({
|
|
130
|
+
* message: 'hello world',
|
|
131
|
+
* })
|
|
132
|
+
*/
|
|
133
|
+
signMessage: (args: Parameters<typeof signMessage<TSmartAccount>>[1]) => ReturnType<typeof signMessage<TSmartAccount>>;
|
|
134
|
+
/**
|
|
135
|
+
* Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
136
|
+
*
|
|
137
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signTypedData.html
|
|
138
|
+
* - JSON-RPC Methods:
|
|
139
|
+
* - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data.html#signtypeddata-v4)
|
|
140
|
+
* - Local Accounts: Signs locally. No JSON-RPC request.
|
|
141
|
+
*
|
|
142
|
+
* @param client - Client to use
|
|
143
|
+
* @param args - {@link SignTypedDataParameters}
|
|
144
|
+
* @returns The signed data. {@link SignTypedDataReturnType}
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* import { createWalletClient, custom } from 'viem'
|
|
148
|
+
* import { mainnet } from 'viem/chains'
|
|
149
|
+
*
|
|
150
|
+
* const client = createWalletClient({
|
|
151
|
+
* chain: mainnet,
|
|
152
|
+
* transport: custom(window.ethereum),
|
|
153
|
+
* })
|
|
154
|
+
* const signature = await client.signTypedData({
|
|
155
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
156
|
+
* domain: {
|
|
157
|
+
* name: 'Ether Mail',
|
|
158
|
+
* version: '1',
|
|
159
|
+
* chainId: 1,
|
|
160
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
|
161
|
+
* },
|
|
162
|
+
* types: {
|
|
163
|
+
* Person: [
|
|
164
|
+
* { name: 'name', type: 'string' },
|
|
165
|
+
* { name: 'wallet', type: 'address' },
|
|
166
|
+
* ],
|
|
167
|
+
* Mail: [
|
|
168
|
+
* { name: 'from', type: 'Person' },
|
|
169
|
+
* { name: 'to', type: 'Person' },
|
|
170
|
+
* { name: 'contents', type: 'string' },
|
|
171
|
+
* ],
|
|
172
|
+
* },
|
|
173
|
+
* primaryType: 'Mail',
|
|
174
|
+
* message: {
|
|
175
|
+
* from: {
|
|
176
|
+
* name: 'Cow',
|
|
177
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
|
178
|
+
* },
|
|
179
|
+
* to: {
|
|
180
|
+
* name: 'Bob',
|
|
181
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
|
182
|
+
* },
|
|
183
|
+
* contents: 'Hello, Bob!',
|
|
184
|
+
* },
|
|
185
|
+
* })
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* // Account Hoisting
|
|
189
|
+
* import { createWalletClient, http } from 'viem'
|
|
190
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
191
|
+
* import { mainnet } from 'viem/chains'
|
|
192
|
+
*
|
|
193
|
+
* const client = createWalletClient({
|
|
194
|
+
* account: privateKeyToAccount('0x…'),
|
|
195
|
+
* chain: mainnet,
|
|
196
|
+
* transport: http(),
|
|
197
|
+
* })
|
|
198
|
+
* const signature = await client.signTypedData({
|
|
199
|
+
* domain: {
|
|
200
|
+
* name: 'Ether Mail',
|
|
201
|
+
* version: '1',
|
|
202
|
+
* chainId: 1,
|
|
203
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
|
204
|
+
* },
|
|
205
|
+
* types: {
|
|
206
|
+
* Person: [
|
|
207
|
+
* { name: 'name', type: 'string' },
|
|
208
|
+
* { name: 'wallet', type: 'address' },
|
|
209
|
+
* ],
|
|
210
|
+
* Mail: [
|
|
211
|
+
* { name: 'from', type: 'Person' },
|
|
212
|
+
* { name: 'to', type: 'Person' },
|
|
213
|
+
* { name: 'contents', type: 'string' },
|
|
214
|
+
* ],
|
|
215
|
+
* },
|
|
216
|
+
* primaryType: 'Mail',
|
|
217
|
+
* message: {
|
|
218
|
+
* from: {
|
|
219
|
+
* name: 'Cow',
|
|
220
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
|
221
|
+
* },
|
|
222
|
+
* to: {
|
|
223
|
+
* name: 'Bob',
|
|
224
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
|
225
|
+
* },
|
|
226
|
+
* contents: 'Hello, Bob!',
|
|
227
|
+
* },
|
|
228
|
+
* })
|
|
229
|
+
*/
|
|
230
|
+
signTypedData: <const TTypedData extends TypedData | {
|
|
231
|
+
[key: string]: unknown;
|
|
232
|
+
}, TPrimaryType extends string>(args: Parameters<typeof signTypedData<TTypedData, TPrimaryType, TSmartAccount>>[1]) => ReturnType<typeof signTypedData<TTypedData, TPrimaryType, TSmartAccount>>;
|
|
233
|
+
/**
|
|
234
|
+
* Executes a write function on a contract.
|
|
235
|
+
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
236
|
+
*
|
|
237
|
+
* - Docs: https://viem.sh/docs/contract/writeContract.html
|
|
238
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
|
|
239
|
+
*
|
|
240
|
+
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
|
|
241
|
+
*
|
|
242
|
+
* Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/startale-client/methods#sendtransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
|
243
|
+
*
|
|
244
|
+
* __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__
|
|
245
|
+
*
|
|
246
|
+
* @param args - {@link WriteContractParameters}
|
|
247
|
+
* @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash). {@link WriteContractReturnType}
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* import { createWalletClient, custom, parseAbi } from 'viem'
|
|
251
|
+
* import { mainnet } from 'viem/chains'
|
|
252
|
+
*
|
|
253
|
+
* const client = createWalletClient({
|
|
254
|
+
* chain: mainnet,
|
|
255
|
+
* transport: custom(window.ethereum),
|
|
256
|
+
* })
|
|
257
|
+
* const hash = await client.writeContract({
|
|
258
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
|
259
|
+
* abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
|
|
260
|
+
* functionName: 'mint',
|
|
261
|
+
* args: [69420],
|
|
262
|
+
* })
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* // With Validation
|
|
266
|
+
* import { createWalletClient, custom, parseAbi } from 'viem'
|
|
267
|
+
* import { mainnet } from 'viem/chains'
|
|
268
|
+
*
|
|
269
|
+
* const client = createWalletClient({
|
|
270
|
+
* chain: mainnet,
|
|
271
|
+
* transport: custom(window.ethereum),
|
|
272
|
+
* })
|
|
273
|
+
* const { request } = await client.simulateContract({
|
|
274
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
|
275
|
+
* abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
|
|
276
|
+
* functionName: 'mint',
|
|
277
|
+
* args: [69420],
|
|
278
|
+
* }
|
|
279
|
+
* const hash = await client.writeContract(request)
|
|
280
|
+
*/
|
|
281
|
+
writeContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(args: WriteContractParameters<TAbi, TFunctionName, TArgs, TChain, TSmartAccount, TChainOverride>) => ReturnType<typeof writeContract<TChain, TSmartAccount, TAbi, TFunctionName, TArgs, TChainOverride>>;
|
|
282
|
+
waitForTransactionReceipt: (params: WaitForTransactionReceiptParameters) => Promise<WaitForTransactionReceiptReturnType>;
|
|
283
|
+
/**
|
|
284
|
+
* Sends a user operation to the network and waits for the receipt.
|
|
285
|
+
* @param params - {@link DebugUserOperationParameters}
|
|
286
|
+
* @returns The user operation receipt. {@link DebugUserOperationReturnType}
|
|
287
|
+
*/
|
|
288
|
+
debugUserOperation: (params: DebugUserOperationParameters) => Promise<DebugUserOperationReturnType>;
|
|
289
|
+
/**
|
|
290
|
+
* Prepares a user operation
|
|
291
|
+
* @param params - {@link PrepareUserOperationParameters}
|
|
292
|
+
* @returns The user operation. {@link PrepareUserOperationReturnType}
|
|
293
|
+
* @example
|
|
294
|
+
* const userOp = await prepareUserOperation({
|
|
295
|
+
* calls: [{to: '0x...', value: 1n, data: '0x...'}]
|
|
296
|
+
* })
|
|
297
|
+
*/
|
|
298
|
+
prepareUserOperation: (params: PrepareUserOperationParameters) => Promise<ReturnType<typeof prepareUserOperationWithoutSignature>>;
|
|
299
|
+
/**
|
|
300
|
+
* Upgrades a smart account to a new implementation.
|
|
301
|
+
*
|
|
302
|
+
* @param parameters - Parameters including optional custom implementation address and initialization data
|
|
303
|
+
* @returns The hash of the user operation as a hexadecimal string
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* const hash = await client.upgradeSmartAccount()
|
|
308
|
+
* console.log(hash) // '0x...'
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
upgradeSmartAccount: (args?: UpgradeSmartAccountParameters<TSmartAccount>) => Promise<Hash>;
|
|
312
|
+
};
|
|
313
|
+
export declare function smartAccountActions(): <TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined>(client: Client<Transport, TChain, TSmartAccount>) => SmartAccountActions<TChain, TSmartAccount>;
|
|
314
|
+
export declare const smartAccountCalls: CallDictionary;
|
|
315
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,KAAK,EACL,MAAM,EACN,oBAAoB,EACpB,oBAAoB,EACpB,IAAI,EACJ,SAAS,EACT,SAAS,EACT,mCAAmC,EACnC,mCAAmC,EACnC,uBAAuB,EACxB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACV,8BAA8B,EAE9B,YAAY,EACZ,aAAa,EACd,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EACL,KAAK,4BAA4B,EAElC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EACL,KAAK,qCAAqC,EAE3C,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAA;AAC7F,OAAO,EACL,KAAK,kCAAkC,EAExC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EACL,KAAK,6BAA6B,EAGnC,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,MAAM,mBAAmB,CAC7B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,aAAa,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,IACvE;IACF;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,wBAAwB,EAAE,CACxB,IAAI,EAAE,kCAAkC,KACrC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,2BAA2B,EAAE,CAC3B,IAAI,EAAE,qCAAqC,KACxC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAA;IAC9C;;;;;;;;;;;;;;;OAeG;IACH,eAAe,EAAE,CACf,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EACpD,eAAe,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EAC5D,KAAK,SAAS,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAErD,IAAI,EAAE,UAAU,CACd,OAAO,eAAe,CACpB,aAAa,EACb,MAAM,EACN,eAAe,EACf,cAAc,EACd,KAAK,CACN,CACF,CAAC,CAAC,CAAC,KACD,OAAO,CAAC,IAAI,CAAC,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,WAAW,EAAE,CACX,IAAI,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,KACnD,UAAU,CAAC,OAAO,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;IAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+FG;IACH,aAAa,EAAE,CACb,KAAK,CAAC,UAAU,SAAS,SAAS,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,EAC/D,YAAY,SAAS,MAAM,EAE3B,IAAI,EAAE,UAAU,CACd,OAAO,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAC9D,CAAC,CAAC,CAAC,KACD,UAAU,CAAC,OAAO,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC,CAAA;IAC9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,aAAa,EAAE,CACb,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,oBAAoB,CACxC,IAAI,EACJ,YAAY,GAAG,SAAS,CACzB,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC,EACxD,KAAK,SAAS,oBAAoB,CAChC,IAAI,EACJ,YAAY,GAAG,SAAS,EACxB,aAAa,CACd,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,aAAa,CAAC,EACvE,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAEpD,IAAI,EAAE,uBAAuB,CAC3B,IAAI,EACJ,aAAa,EACb,KAAK,EACL,MAAM,EACN,aAAa,EACb,cAAc,CACf,KACE,UAAU,CACb,OAAO,aAAa,CAClB,MAAM,EACN,aAAa,EACb,IAAI,EACJ,aAAa,EACb,KAAK,EACL,cAAc,CACf,CACF,CAAA;IACD,yBAAyB,EAAE,CACzB,MAAM,EAAE,mCAAmC,KACxC,OAAO,CAAC,mCAAmC,CAAC,CAAA;IACjD;;;;OAIG;IACH,kBAAkB,EAAE,CAClB,MAAM,EAAE,4BAA4B,KACjC,OAAO,CAAC,4BAA4B,CAAC,CAAA;IAC1C;;;;;;;;OAQG;IACH,oBAAoB,EAAE,CACpB,MAAM,EAAE,8BAA8B,KACnC,OAAO,CAAC,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAAC,CAAA;IACrE;;;;;;;;;;;OAWG;IACH,mBAAmB,EAAE,CACnB,IAAI,CAAC,EAAE,6BAA6B,CAAC,aAAa,CAAC,KAChD,OAAO,CAAC,IAAI,CAAC,CAAA;CACnB,CAAA;AAED,wBAAgB,mBAAmB,KAE/B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,aAAa,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EAEzE,QAAQ,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,KAC/C,mBAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAe9C;AAED,eAAO,MAAM,iBAAiB,EAEzB,cAAc,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type SignedAuthorization, type Transport } from "viem";
|
|
2
|
+
import type { SmartAccount, UserOperation } from "viem/account-abstraction";
|
|
3
|
+
export type Transaction = {
|
|
4
|
+
to: Address;
|
|
5
|
+
data: `0x${string}`;
|
|
6
|
+
value: bigint;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Parameters for preparing a token paymaster user operation
|
|
10
|
+
*/
|
|
11
|
+
export type PrepareTokenPaymasterUserOpParameters = {
|
|
12
|
+
/** Array of transactions to be executed */
|
|
13
|
+
calls: Transaction[];
|
|
14
|
+
/** Token used for paying for the gas */
|
|
15
|
+
feeTokenAddress: Address;
|
|
16
|
+
/** Optional custom approval amount for the token paymaster. If not provided, max uint256 will be used */
|
|
17
|
+
customApprovalAmount?: bigint;
|
|
18
|
+
authorization?: SignedAuthorization<number> | undefined;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Prepares a user operation with token paymaster configuration, including ERC20 token approval
|
|
22
|
+
*
|
|
23
|
+
* This function handles:
|
|
24
|
+
* 1. Checking current token allowance of Smart Account
|
|
25
|
+
* 2. Creating an approval transaction for the token paymaster if needed
|
|
26
|
+
* 3. Preparing the user operation with the approval and user transactions
|
|
27
|
+
*
|
|
28
|
+
* @param client - The StartaleAccountClient instance
|
|
29
|
+
* @param args.txs - Array of transactions to be executed
|
|
30
|
+
* @param args.feeTokenAddress - Token used for paying for the gas
|
|
31
|
+
* @param args.customApprovalAmount - Optional custom approval amount
|
|
32
|
+
*
|
|
33
|
+
* @returns A prepared user operation without signature (will be signed by the Smart Account when sent)
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const userOp = await prepareTokenPaymasterUserOp(startaleClient, {
|
|
38
|
+
* txs: [
|
|
39
|
+
* {
|
|
40
|
+
* to: recipientAddress,
|
|
41
|
+
* value: 1n,
|
|
42
|
+
* data: "0x"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
customApprovalAmount: usdcFeeAmount
|
|
46
|
+
})
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @throws Will throw an error if client account or paymaster context is not properly configured
|
|
50
|
+
*/
|
|
51
|
+
export declare function prepareTokenPaymasterUserOp<account extends SmartAccount | undefined, chain extends Chain | undefined>(client: Client<Transport, chain, account>, args: PrepareTokenPaymasterUserOpParameters): Promise<Omit<UserOperation<"0.7">, "signature">>;
|
|
52
|
+
//# sourceMappingURL=prepareTokenPaymasterUserOp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareTokenPaymasterUserOp.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAGf,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAK3E,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,2CAA2C;IAC3C,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,wCAAwC;IACxC,eAAe,EAAE,OAAO,CAAA;IACxB,yGAAyG;IACzG,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,aAAa,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;CACxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,SAAS,YAAY,GAAG,SAAS,EACxC,KAAK,SAAS,KAAK,GAAG,SAAS,EAE/B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,IAAI,EAAE,qCAAqC,GAC1C,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CA6BlD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { PrepareUserOperationParameters, PrepareUserOperationRequest, PrepareUserOperationReturnType, SmartAccount } from "viem/account-abstraction";
|
|
3
|
+
declare const gasFields: readonly ["preVerificationGas", "verificationGasLimit", "callGasLimit", "maxFeePerGas", "maxPriorityFeePerGas", "paymasterVerificationGasLimit", "paymasterPostOpGasLimit"];
|
|
4
|
+
type GasBufferFields = (typeof gasFields)[number];
|
|
5
|
+
/** Gas buffer configuration. This can be used to apply a gas buffer to the user operation after gas estimates have been returned from the bundler. */
|
|
6
|
+
export type GasBufferFactor = {
|
|
7
|
+
gasBuffer?: {
|
|
8
|
+
/** The factor to multiply the gas limit by */
|
|
9
|
+
factor: number;
|
|
10
|
+
/** The fields to apply the gas buffer to */
|
|
11
|
+
fields: GasBufferFields[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function prepareUserOperationWithoutSignature<account extends SmartAccount | undefined, const calls extends readonly unknown[], const request extends PrepareUserOperationRequest<account, accountOverride, calls>, accountOverride extends SmartAccount | undefined = undefined>(client: Client<Transport, Chain | undefined, account>, parameters: GasBufferFactor & PrepareUserOperationParameters<account, accountOverride, calls, request>): Promise<Omit<PrepareUserOperationReturnType<account, accountOverride, calls, request>, "signature">>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=prepareUserOperationWithoutSignature.d.ts.map
|
package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareUserOperationWithoutSignature.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACpD,OAAO,KAAK,EACV,8BAA8B,EAC9B,2BAA2B,EAC3B,8BAA8B,EAC9B,YAAY,EACb,MAAM,0BAA0B,CAAA;AAKjC,QAAA,MAAM,SAAS,6KAQL,CAAA;AAEV,KAAK,eAAe,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjD,sJAAsJ;AACtJ,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE;QACV,8CAA8C;QAC9C,MAAM,EAAE,MAAM,CAAA;QACd,4CAA4C;QAC5C,MAAM,EAAE,eAAe,EAAE,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,wBAAsB,oCAAoC,CACxD,OAAO,SAAS,YAAY,GAAG,SAAS,EACxC,KAAK,CAAC,KAAK,SAAS,SAAS,OAAO,EAAE,EACtC,KAAK,CAAC,OAAO,SAAS,2BAA2B,CAC/C,OAAO,EACP,eAAe,EACf,KAAK,CACN,EACD,eAAe,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,OAAO,CAAC,EACrD,UAAU,EAAE,eAAe,GACzB,8BAA8B,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,GACzE,OAAO,CACR,IAAI,CACF,8BAA8B,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,EACxE,WAAW,CACZ,CACF,CAkCA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Chain, Hash, Transport } from "viem";
|
|
2
|
+
import type { Client } from "viem";
|
|
3
|
+
import type { Address } from "viem";
|
|
4
|
+
import { type SmartAccount } from "viem/account-abstraction";
|
|
5
|
+
import { type Transaction } from "./prepareTokenPaymasterUserOp";
|
|
6
|
+
export type SendTokenPaymasterUserOpParameters = {
|
|
7
|
+
calls: Transaction[];
|
|
8
|
+
feeTokenAddress: Address;
|
|
9
|
+
customApprovalAmount?: bigint;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Prepares and sends a user operation with token paymaster
|
|
13
|
+
*
|
|
14
|
+
* @param client - The Startale client instance
|
|
15
|
+
* @param args - The parameters for the token paymaster user operation
|
|
16
|
+
* @param args.calls - Array of transactions to be executed
|
|
17
|
+
* @param args.feeTokenAddress - Address of the token to be used for paying gas fees
|
|
18
|
+
* @param args.customApprovalAmount - Optional custom amount to approve for the paymaster (defaults to unlimited)
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const hash = await sendTokenPaymasterUserOp(client, {
|
|
23
|
+
* calls: [{
|
|
24
|
+
* to: "0x...", // Contract address
|
|
25
|
+
* data: "0x...", // Encoded function data
|
|
26
|
+
* value: BigInt(0)
|
|
27
|
+
* }],
|
|
28
|
+
* feeTokenAddress: "0x...", // USDC/USDT/etc address
|
|
29
|
+
* customApprovalAmount: BigInt(1000) // Optional: specific approval amount
|
|
30
|
+
* })
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @returns A promise that resolves to the user operation hash {@link Hash}
|
|
34
|
+
*/
|
|
35
|
+
export declare function sendTokenPaymasterUserOp<TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount | undefined = SmartAccount | undefined>(client: Client<Transport, TChain, TSmartAccount>, args: SendTokenPaymasterUserOpParameters): Promise<Hash>;
|
|
36
|
+
//# sourceMappingURL=sendTokenPaymasterUserOp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTokenPaymasterUserOp.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/sendTokenPaymasterUserOp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,0BAA0B,CAAA;AAE/E,OAAO,EACL,KAAK,WAAW,EAEjB,MAAM,+BAA+B,CAAA;AAEtC,MAAM,MAAM,kCAAkC,GAAG;IAC/C,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,aAAa,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EAEzE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAChD,IAAI,EAAE,kCAAkC,GACvC,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Chain, Client, Hash, SendTransactionParameters, Transport } from "viem";
|
|
2
|
+
import { type SendUserOperationParameters, type SmartAccount } from "viem/account-abstraction";
|
|
3
|
+
/**
|
|
4
|
+
* Creates, signs, and sends a new transaction to the network using a smart account.
|
|
5
|
+
* This function also allows you to sponsor this transaction if the sender is a smart account.
|
|
6
|
+
*
|
|
7
|
+
* @param client - The client instance.
|
|
8
|
+
* @param args - Parameters for sending the transaction or user operation.
|
|
9
|
+
* @returns The transaction hash as a hexadecimal string.
|
|
10
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { sendTransaction } from '@startale-scs/aa-sdk'
|
|
14
|
+
*
|
|
15
|
+
* const hash = await sendTransaction(startaleClient, {
|
|
16
|
+
* to: '0x...',
|
|
17
|
+
* value: parseEther('0.1'),
|
|
18
|
+
* data: '0x...'
|
|
19
|
+
* })
|
|
20
|
+
* console.log(hash) // '0x...'
|
|
21
|
+
*/
|
|
22
|
+
export declare function sendTransaction<account extends SmartAccount | undefined, chain extends Chain | undefined, accountOverride extends SmartAccount | undefined = undefined, chainOverride extends Chain | undefined = Chain | undefined, calls extends readonly unknown[] = readonly unknown[]>(client: Client<Transport, chain, account>, args: SendTransactionParameters<chain, account, chainOverride> | SendUserOperationParameters<account, accountOverride, calls>): Promise<Hash>;
|
|
23
|
+
//# sourceMappingURL=sendTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTransaction.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/sendTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACN,IAAI,EACJ,yBAAyB,EACzB,SAAS,EACV,MAAM,MAAM,CAAA;AACb,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,YAAY,EAGlB,MAAM,0BAA0B,CAAA;AAIjC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,OAAO,SAAS,YAAY,GAAG,SAAS,EACxC,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,eAAe,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EAC5D,aAAa,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAC3D,KAAK,SAAS,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EAErD,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,IAAI,EACA,yBAAyB,CAAC,KAAK,EAAE,OAAO,EAAE,aAAa,CAAC,GACxD,2BAA2B,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,CAAC,GAC/D,OAAO,CAAC,IAAI,CAAC,CA0Df"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Chain, Client, SignMessageParameters, SignMessageReturnType, Transport } from "viem";
|
|
2
|
+
import type { SmartAccount } from "viem/account-abstraction";
|
|
3
|
+
/**
|
|
4
|
+
* Signs a message using the smart account.
|
|
5
|
+
*
|
|
6
|
+
* This function calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):
|
|
7
|
+
* `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
8
|
+
*
|
|
9
|
+
* @param client - The client instance.
|
|
10
|
+
* @param parameters - Parameters for signing the message.
|
|
11
|
+
* @returns The signature as a hexadecimal string.
|
|
12
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { signMessage } from '@startale-scs/aa-sdk'
|
|
16
|
+
*
|
|
17
|
+
* const signature = await signMessage(startaleClient, {
|
|
18
|
+
* message: 'Hello, World!!'
|
|
19
|
+
* })
|
|
20
|
+
* console.log(signature) // '0x...'
|
|
21
|
+
*/
|
|
22
|
+
export declare function signMessage<TAccount extends SmartAccount | undefined>(client: Client<Transport, Chain | undefined, TAccount>, { account: account_, message }: SignMessageParameters<TAccount>): Promise<SignMessageReturnType>;
|
|
23
|
+
//# sourceMappingURL=signMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACN,qBAAqB,EACrB,qBAAqB,EACrB,SAAS,EACV,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAI5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAAC,QAAQ,SAAS,YAAY,GAAG,SAAS,EACzE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,CAAC,EACtD,EACE,OAAO,EAAE,QAAyB,EAClC,OAAO,EACR,EAAE,qBAAqB,CAAC,QAAQ,CAAC,GACjC,OAAO,CAAC,qBAAqB,CAAC,CAShC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type Chain, type Client, type SignTypedDataParameters, type SignTypedDataReturnType, type Transport, type TypedData } from "viem";
|
|
2
|
+
import type { SmartAccount } from "viem/account-abstraction";
|
|
3
|
+
/**
|
|
4
|
+
* Signs typed data using the smart account.
|
|
5
|
+
*
|
|
6
|
+
* This function calculates an Ethereum-specific signature in [EIP-712 format](https://eips.ethereum.org/EIPS/eip-712):
|
|
7
|
+
* `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`
|
|
8
|
+
*
|
|
9
|
+
* @param client - The client instance.
|
|
10
|
+
* @param parameters - Parameters for signing the typed data.
|
|
11
|
+
* @returns The signature as a hexadecimal string.
|
|
12
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { signTypedData } from '@startale-scs/aa-sdk'
|
|
16
|
+
* import { keccak256, encodeAbiParameters, parseAbiParameters } from 'viem'
|
|
17
|
+
*
|
|
18
|
+
* const domain = {
|
|
19
|
+
* name: 'Ether Mail',
|
|
20
|
+
* version: '1',
|
|
21
|
+
* chainId: 1,
|
|
22
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* const types = {
|
|
26
|
+
* Person: [
|
|
27
|
+
* { name: 'name', type: 'string' },
|
|
28
|
+
* { name: 'wallet', type: 'address' }
|
|
29
|
+
* ],
|
|
30
|
+
* Mail: [
|
|
31
|
+
* { name: 'from', type: 'Person' },
|
|
32
|
+
* { name: 'to', type: 'Person' },
|
|
33
|
+
* { name: 'contents', type: 'string' }
|
|
34
|
+
* ]
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* const message = {
|
|
38
|
+
* from: {
|
|
39
|
+
* name: 'Cow',
|
|
40
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826'
|
|
41
|
+
* },
|
|
42
|
+
* to: {
|
|
43
|
+
* name: 'Bob',
|
|
44
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB'
|
|
45
|
+
* },
|
|
46
|
+
* contents: 'Hello, Bob!'
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* const signature = await signTypedData(startaleClient, {
|
|
50
|
+
* domain,
|
|
51
|
+
* types,
|
|
52
|
+
* primaryType: 'Mail',
|
|
53
|
+
* message
|
|
54
|
+
* })
|
|
55
|
+
* console.log(signature) // '0x...'
|
|
56
|
+
*/
|
|
57
|
+
export declare function signTypedData<const TTypedData extends TypedData | {
|
|
58
|
+
[key: string]: unknown;
|
|
59
|
+
}, TPrimaryType extends string, TAccount extends SmartAccount | undefined = SmartAccount | undefined>(client: Client<Transport, Chain | undefined, TAccount>, { account: account_, domain, message, primaryType, types: types_ }: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>): Promise<SignTypedDataReturnType>;
|
|
60
|
+
//# sourceMappingURL=signTypedData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,SAAS,EAKf,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAI5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAsB,aAAa,CACjC,KAAK,CAAC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EAC/D,YAAY,SAAS,MAAM,EAC3B,QAAQ,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EAEpE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,CAAC,EACtD,EACE,OAAO,EAAE,QAAyB,EAClC,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EAAE,MAAM,EACd,EAAE,uBAAuB,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC,GAC7D,OAAO,CAAC,uBAAuB,CAAC,CA6BlC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type Chain, type Client, type Hash, type Hex, type Transport } from "viem";
|
|
2
|
+
import { type SmartAccount, type UserOperation } from "viem/account-abstraction";
|
|
3
|
+
import type { Call } from "../../../account";
|
|
4
|
+
import type { ModularSmartAccount } from "../../../modules";
|
|
5
|
+
export type UpgradeSmartAccountParameters<TSmartAccount extends SmartAccount | undefined> = {
|
|
6
|
+
account?: TSmartAccount;
|
|
7
|
+
} & {
|
|
8
|
+
/** Optional custom implementation address. If not provided, the latest default implementation will be used */
|
|
9
|
+
implementationAddress?: Hex;
|
|
10
|
+
/** Optional initialization data to pass to the new implementation */
|
|
11
|
+
initData?: Hex;
|
|
12
|
+
maxFeePerGas?: bigint;
|
|
13
|
+
maxPriorityFeePerGas?: bigint;
|
|
14
|
+
nonce?: bigint;
|
|
15
|
+
} & Partial<Omit<UserOperation<"0.7", bigint>, "callData">>;
|
|
16
|
+
/**
|
|
17
|
+
* Upgrades a smart account to a new implementation.
|
|
18
|
+
*
|
|
19
|
+
* @param client - The client instance.
|
|
20
|
+
* @param parameters - Parameters including the smart account, optional custom implementation address, and gas settings.
|
|
21
|
+
* @returns The hash of the user operation as a hexadecimal string.
|
|
22
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* import { upgradeSmartAccount } from '@startale-scs/aa-sdk'
|
|
26
|
+
*
|
|
27
|
+
* const userOpHash = await upgradeSmartAccount(startaleClient, {
|
|
28
|
+
* // Optional custom implementation address
|
|
29
|
+
* implementationAddress: '0x...',
|
|
30
|
+
* // Optional initialization data
|
|
31
|
+
* initData: '0x'
|
|
32
|
+
* })
|
|
33
|
+
* console.log(userOpHash) // '0x...'
|
|
34
|
+
*/
|
|
35
|
+
export declare function upgradeSmartAccount<TSmartAccount extends SmartAccount | undefined>(client: Client<Transport, Chain | undefined, TSmartAccount>, parameters?: UpgradeSmartAccountParameters<TSmartAccount>): Promise<Hash>;
|
|
36
|
+
export declare const toUpgradeSmartAccountCalls: (account: ModularSmartAccount, { implementationAddress, initData }: {
|
|
37
|
+
implementationAddress: Hex;
|
|
38
|
+
initData: Hex;
|
|
39
|
+
}) => Promise<Call[]>;
|
|
40
|
+
//# sourceMappingURL=upgradeSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgradeSmartAccount.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/upgradeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,GAAG,EACR,KAAK,SAAS,EAGf,MAAM,MAAM,CAAA;AACb,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,aAAa,EAEnB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAG5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,MAAM,MAAM,6BAA6B,CACvC,aAAa,SAAS,YAAY,GAAG,SAAS,IAC5C;IAAE,OAAO,CAAC,EAAE,aAAa,CAAA;CAAE,GAAG;IAChC,8GAA8G;IAC9G,qBAAqB,CAAC,EAAE,GAAG,CAAA;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAA;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,CACvC,aAAa,SAAS,YAAY,GAAG,SAAS,EAE9C,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,aAAa,CAAC,EAC3D,UAAU,CAAC,EAAE,6BAA6B,CAAC,aAAa,CAAC,GACxD,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED,eAAO,MAAM,0BAA0B,GACrC,SAAS,mBAAmB,EAC5B,qCAGG;IAAE,qBAAqB,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAA;CAAE,KAC/C,OAAO,CAAC,IAAI,EAAE,CA2BhB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Chain, Client, Transport, WaitForTransactionReceiptParameters, WaitForTransactionReceiptReturnType } from "viem";
|
|
2
|
+
import type { SmartAccount } from "viem/account-abstraction";
|
|
3
|
+
export declare function waitForTransactionReceipt<TAccount extends SmartAccount | undefined>(client: Client<Transport, Chain | undefined, TAccount>, { account: account_, hash }: WaitForTransactionReceiptParameters & {
|
|
4
|
+
account?: TAccount;
|
|
5
|
+
}): Promise<WaitForTransactionReceiptReturnType>;
|
|
6
|
+
//# sourceMappingURL=waitForTransactionReceipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForTransactionReceipt.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/waitForTransactionReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EAEN,SAAS,EACT,mCAAmC,EACnC,mCAAmC,EACpC,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAI5D,wBAAsB,yBAAyB,CAC7C,QAAQ,SAAS,YAAY,GAAG,SAAS,EAEzC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,CAAC,EACtD,EACE,OAAO,EAAE,QAAyB,EAClC,IAAI,EACL,EAAE,mCAAmC,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,CAAA;CAAE,GAC9D,OAAO,CAAC,mCAAmC,CAAC,CAY9C"}
|