@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 @@
|
|
|
1
|
+
{"version":3,"file":"sendTokenPaymasterUserOp.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/sendTokenPaymasterUserOp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAEL,2BAA2B,EAC5B,MAAM,+BAA+B,CAAA;AAQtC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAI5C,MAAgD,EAChD,IAAwC;IAExC,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAA;IAE7D,MAAM,MAAM,GAAG,MAAM,SAAS,CAC5B,MAAM,EACN,2BAA2B,EAC3B,oCAAoC,CACrC,CAAC;QACA,KAAK;QACL,8EAA8E;QAC9E,eAAe;QACf,oBAAoB;KACrB,CAAC,CAAA;IAEF,MAAM,aAAa,GAAG;QACpB,GAAG,MAAM;QACT,SAAS,EAAE,SAAS;KACrB,CAAA;IAED,MAAM,UAAU,GAAG,MAAM,SAAS,CAChC,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACpB,CAAC,aAAa,CAAC,CAAA;IAEhB,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { sendUserOperation, waitForUserOperationReceipt } from "viem/account-abstraction";
|
|
2
|
+
import { getAction, parseAccount } from "viem/utils";
|
|
3
|
+
import { AccountNotFoundError } from "../../../account/utils/AccountNotFound.js";
|
|
4
|
+
/**
|
|
5
|
+
* Creates, signs, and sends a new transaction to the network using a smart account.
|
|
6
|
+
* This function also allows you to sponsor this transaction if the sender is a smart account.
|
|
7
|
+
*
|
|
8
|
+
* @param client - The client instance.
|
|
9
|
+
* @param args - Parameters for sending the transaction or user operation.
|
|
10
|
+
* @returns The transaction hash as a hexadecimal string.
|
|
11
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { sendTransaction } from '@startale-scs/aa-sdk'
|
|
15
|
+
*
|
|
16
|
+
* const hash = await sendTransaction(startaleClient, {
|
|
17
|
+
* to: '0x...',
|
|
18
|
+
* value: parseEther('0.1'),
|
|
19
|
+
* data: '0x...'
|
|
20
|
+
* })
|
|
21
|
+
* console.log(hash) // '0x...'
|
|
22
|
+
*/
|
|
23
|
+
export async function sendTransaction(client, args) {
|
|
24
|
+
let userOpHash;
|
|
25
|
+
if ("to" in args) {
|
|
26
|
+
const { account: account_ = client.account, data, maxFeePerGas, maxPriorityFeePerGas, to, value, nonce } = args;
|
|
27
|
+
if (!account_) {
|
|
28
|
+
throw new AccountNotFoundError({
|
|
29
|
+
docsPath: "/startale-client/methods#sendtransaction"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const account = parseAccount(account_);
|
|
33
|
+
if (!to)
|
|
34
|
+
throw new Error("Missing to address");
|
|
35
|
+
userOpHash = await getAction(client, sendUserOperation, "sendUserOperation")({
|
|
36
|
+
calls: [
|
|
37
|
+
{
|
|
38
|
+
to,
|
|
39
|
+
value: value || BigInt(0),
|
|
40
|
+
data: data || "0x"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
account,
|
|
44
|
+
maxFeePerGas,
|
|
45
|
+
maxPriorityFeePerGas,
|
|
46
|
+
nonce: nonce ? BigInt(nonce) : undefined
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
userOpHash = await getAction(client, sendUserOperation, "sendUserOperation")({ ...args });
|
|
51
|
+
}
|
|
52
|
+
const userOperationReceipt = await getAction(client, waitForUserOperationReceipt, "waitForUserOperationReceipt")({
|
|
53
|
+
hash: userOpHash
|
|
54
|
+
});
|
|
55
|
+
return userOperationReceipt?.receipt.transactionHash;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=sendTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/sendTransaction.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAE7E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAOnC,MAAyC,EACzC,IAEgE;IAEhE,IAAI,UAAgB,CAAA;IAEpB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,EAAE,EACF,KAAK,EACL,KAAK,EACN,GAAG,IAAI,CAAA;QAER,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,oBAAoB,CAAC;gBAC7B,QAAQ,EAAE,0CAA0C;aACrD,CAAC,CAAA;QACJ,CAAC;QAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;QAEtD,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAE9C,UAAU,GAAG,MAAM,SAAS,CAC1B,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACpB,CAAC;YACA,KAAK,EAAE;gBACL;oBACE,EAAE;oBACF,KAAK,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;oBACzB,IAAI,EAAE,IAAI,IAAI,IAAI;iBACnB;aACF;YACD,OAAO;YACP,YAAY;YACZ,oBAAoB;YACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;SACzC,CAAC,CAAA;IACJ,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,SAAS,CAC1B,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACpB,CAAC,EAAE,GAAG,IAAI,EAA2D,CAAC,CAAA;IACzE,CAAC;IAED,MAAM,oBAAoB,GAAG,MAAM,SAAS,CAC1C,MAAM,EACN,2BAA2B,EAC3B,6BAA6B,CAC9B,CAAC;QACA,IAAI,EAAE,UAAU;KACjB,CAAC,CAAA;IAEF,OAAO,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAA;AACtD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { parseAccount } from "viem/utils";
|
|
2
|
+
import { AccountNotFoundError } from "../../../account/utils/AccountNotFound.js";
|
|
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 async function signMessage(client, { account: account_ = client.account, message }) {
|
|
23
|
+
if (!account_)
|
|
24
|
+
throw new AccountNotFoundError({
|
|
25
|
+
docsPath: "/docs/actions/wallet/signMessage"
|
|
26
|
+
});
|
|
27
|
+
const account = parseAccount(account_);
|
|
28
|
+
return account.signMessage({ message });
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=signMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/signMessage.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAE7E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAsD,EACtD,EACE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,OAAO,EACyB;IAElC,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,kCAAkC;SAC7C,CAAC,CAAA;IAEJ,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IAEtD,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AACzC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { getTypesForEIP712Domain, validateTypedData } from "viem";
|
|
2
|
+
import { parseAccount } from "viem/utils";
|
|
3
|
+
import { AccountNotFoundError } from "../../../account/utils/AccountNotFound.js";
|
|
4
|
+
/**
|
|
5
|
+
* Signs typed data using the smart account.
|
|
6
|
+
*
|
|
7
|
+
* This function calculates an Ethereum-specific signature in [EIP-712 format](https://eips.ethereum.org/EIPS/eip-712):
|
|
8
|
+
* `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`
|
|
9
|
+
*
|
|
10
|
+
* @param client - The client instance.
|
|
11
|
+
* @param parameters - Parameters for signing the typed data.
|
|
12
|
+
* @returns The signature as a hexadecimal string.
|
|
13
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { signTypedData } from '@startale-scs/aa-sdk'
|
|
17
|
+
* import { keccak256, encodeAbiParameters, parseAbiParameters } from 'viem'
|
|
18
|
+
*
|
|
19
|
+
* const domain = {
|
|
20
|
+
* name: 'Ether Mail',
|
|
21
|
+
* version: '1',
|
|
22
|
+
* chainId: 1,
|
|
23
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* const types = {
|
|
27
|
+
* Person: [
|
|
28
|
+
* { name: 'name', type: 'string' },
|
|
29
|
+
* { name: 'wallet', type: 'address' }
|
|
30
|
+
* ],
|
|
31
|
+
* Mail: [
|
|
32
|
+
* { name: 'from', type: 'Person' },
|
|
33
|
+
* { name: 'to', type: 'Person' },
|
|
34
|
+
* { name: 'contents', type: 'string' }
|
|
35
|
+
* ]
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* const message = {
|
|
39
|
+
* from: {
|
|
40
|
+
* name: 'Cow',
|
|
41
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826'
|
|
42
|
+
* },
|
|
43
|
+
* to: {
|
|
44
|
+
* name: 'Bob',
|
|
45
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB'
|
|
46
|
+
* },
|
|
47
|
+
* contents: 'Hello, Bob!'
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* const signature = await signTypedData(startaleClient, {
|
|
51
|
+
* domain,
|
|
52
|
+
* types,
|
|
53
|
+
* primaryType: 'Mail',
|
|
54
|
+
* message
|
|
55
|
+
* })
|
|
56
|
+
* console.log(signature) // '0x...'
|
|
57
|
+
*/
|
|
58
|
+
export async function signTypedData(client, { account: account_ = client.account, domain, message, primaryType, types: types_ }) {
|
|
59
|
+
if (!account_) {
|
|
60
|
+
throw new AccountNotFoundError({
|
|
61
|
+
docsPath: "/docs/actions/wallet/signMessage"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const account = parseAccount(account_);
|
|
65
|
+
const types = {
|
|
66
|
+
EIP712Domain: getTypesForEIP712Domain({ domain }),
|
|
67
|
+
...types_
|
|
68
|
+
};
|
|
69
|
+
validateTypedData({
|
|
70
|
+
domain,
|
|
71
|
+
message,
|
|
72
|
+
primaryType,
|
|
73
|
+
types
|
|
74
|
+
});
|
|
75
|
+
return account.signTypedData({
|
|
76
|
+
domain,
|
|
77
|
+
primaryType,
|
|
78
|
+
types,
|
|
79
|
+
message
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=signTypedData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAKjC,MAAsD,EACtD,EACE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EAAE,MAAM,EAC+C;IAE9D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,kCAAkC;SAC7C,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,KAAK,GAAG;QACZ,YAAY,EAAE,uBAAuB,CAAC,EAAE,MAAM,EAE7C,CAAC;QACF,GAAI,MAAqB;KAC1B,CAAA;IAED,iBAAiB,CAAC;QAChB,MAAM;QACN,OAAO;QACP,WAAW;QACX,KAAK;KACiB,CAAC,CAAA;IAEzB,OAAO,OAAO,CAAC,aAAa,CAAC;QAC3B,MAAM;QACN,WAAW;QACX,KAAK;QACL,OAAO;KACe,CAAC,CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { encodeFunctionData, getAddress } from "viem";
|
|
2
|
+
import { sendUserOperation } from "viem/account-abstraction";
|
|
3
|
+
import { getAction, parseAccount } from "viem/utils";
|
|
4
|
+
import { AccountNotFoundError } from "../../../account/utils/AccountNotFound.js";
|
|
5
|
+
import { ACCOUNT_IMPLEMENTATION_ADDRESS } from "../../../constants/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Upgrades a smart account to a new implementation.
|
|
8
|
+
*
|
|
9
|
+
* @param client - The client instance.
|
|
10
|
+
* @param parameters - Parameters including the smart account, optional custom implementation address, and gas settings.
|
|
11
|
+
* @returns The hash of the user operation as a hexadecimal string.
|
|
12
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { upgradeSmartAccount } from '@startale-scs/aa-sdk'
|
|
16
|
+
*
|
|
17
|
+
* const userOpHash = await upgradeSmartAccount(startaleClient, {
|
|
18
|
+
* // Optional custom implementation address
|
|
19
|
+
* implementationAddress: '0x...',
|
|
20
|
+
* // Optional initialization data
|
|
21
|
+
* initData: '0x'
|
|
22
|
+
* })
|
|
23
|
+
* console.log(userOpHash) // '0x...'
|
|
24
|
+
*/
|
|
25
|
+
export async function upgradeSmartAccount(client, parameters) {
|
|
26
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, implementationAddress = ACCOUNT_IMPLEMENTATION_ADDRESS, initData = "0x", ...rest } = parameters ?? {};
|
|
27
|
+
if (!account_) {
|
|
28
|
+
throw new AccountNotFoundError({
|
|
29
|
+
docsPath: "/startale-client/methods#upgradeSmartAccount"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const account = parseAccount(account_);
|
|
33
|
+
const calls = await toUpgradeSmartAccountCalls(account, {
|
|
34
|
+
implementationAddress,
|
|
35
|
+
initData
|
|
36
|
+
});
|
|
37
|
+
const sendUserOperationParams = {
|
|
38
|
+
calls,
|
|
39
|
+
maxFeePerGas,
|
|
40
|
+
maxPriorityFeePerGas,
|
|
41
|
+
nonce,
|
|
42
|
+
account,
|
|
43
|
+
...rest
|
|
44
|
+
};
|
|
45
|
+
return getAction(client, sendUserOperation, "sendUserOperation")(sendUserOperationParams);
|
|
46
|
+
}
|
|
47
|
+
export const toUpgradeSmartAccountCalls = async (account, { implementationAddress, initData }) => [
|
|
48
|
+
{
|
|
49
|
+
to: account.address,
|
|
50
|
+
value: BigInt(0),
|
|
51
|
+
data: encodeFunctionData({
|
|
52
|
+
abi: [
|
|
53
|
+
{
|
|
54
|
+
name: "upgradeToAndCall",
|
|
55
|
+
type: "function",
|
|
56
|
+
stateMutability: "payable",
|
|
57
|
+
inputs: [
|
|
58
|
+
{
|
|
59
|
+
type: "address",
|
|
60
|
+
name: "newImplementation"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "bytes",
|
|
64
|
+
name: "data"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
outputs: []
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
functionName: "upgradeToAndCall",
|
|
71
|
+
args: [getAddress(implementationAddress), initData]
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
//# sourceMappingURL=upgradeSmartAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgradeSmartAccount.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/upgradeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,kBAAkB,EAClB,UAAU,EACX,MAAM,MAAM,CAAA;AACb,OAAO,EAGL,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAA;AAenE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAGvC,MAA2D,EAC3D,UAAyD;IAEzD,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,qBAAqB,GAAG,8BAA8B,EACtD,QAAQ,GAAG,IAAI,EACf,GAAG,IAAI,EACR,GAAG,UAAU,IAAI,EAAE,CAAA;IAEpB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,8CAA8C;SACzD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAwB,CAAA;IAE7D,MAAM,KAAK,GAAG,MAAM,0BAA0B,CAAC,OAAO,EAAE;QACtD,qBAAqB;QACrB,QAAQ;KACT,CAAC,CAAA;IACF,MAAM,uBAAuB,GAAG;QAC9B,KAAK;QACL,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;QACP,GAAG,IAAI;KACR,CAAA;IAED,OAAO,SAAS,CACd,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACpB,CAAC,uBAAuB,CAAC,CAAA;AAC5B,CAAC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,EAC7C,OAA4B,EAC5B,EACE,qBAAqB,EACrB,QAAQ,EACsC,EAC/B,EAAE,CAAC;IACpB;QACE,EAAE,EAAE,OAAO,CAAC,OAAO;QACnB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;QAChB,IAAI,EAAE,kBAAkB,CAAC;YACvB,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,kBAAkB;oBACxB,IAAI,EAAE,UAAU;oBAChB,eAAe,EAAE,SAAS;oBAC1B,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,SAAS;4BACf,IAAI,EAAE,mBAAmB;yBAC1B;wBACD;4BACE,IAAI,EAAE,OAAO;4BACb,IAAI,EAAE,MAAM;yBACb;qBACF;oBACD,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,YAAY,EAAE,kBAAkB;YAChC,IAAI,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,QAAQ,CAAC;SACpD,CAAC;KACH;CACF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { parseAccount } from "viem/utils";
|
|
2
|
+
import { AccountNotFoundError } from "../../../account/utils/AccountNotFound.js";
|
|
3
|
+
export async function waitForTransactionReceipt(client, { account: account_ = client.account, hash }) {
|
|
4
|
+
if (!account_)
|
|
5
|
+
throw new AccountNotFoundError({
|
|
6
|
+
docsPath: "/docs/actions/wallet/waitForTransactionReceipt"
|
|
7
|
+
});
|
|
8
|
+
const account = parseAccount(account_);
|
|
9
|
+
const accountClient = account?.client;
|
|
10
|
+
if (!accountClient)
|
|
11
|
+
throw new Error("Requires a Public Client");
|
|
12
|
+
return accountClient.waitForTransactionReceipt({ hash });
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=waitForTransactionReceipt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForTransactionReceipt.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/waitForTransactionReceipt.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAA;AAE7E,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAG7C,MAAsD,EACtD,EACE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,IAAI,EACyD;IAE/D,IAAI,CAAC,QAAQ;QACX,MAAM,IAAI,oBAAoB,CAAC;YAC7B,QAAQ,EAAE,gDAAgD;SAC3D,CAAC,CAAA;IAEJ,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IACtD,MAAM,aAAa,GAAG,OAAO,EAAE,MAAsB,CAAA;IAErD,IAAI,CAAC,aAAa;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAE/D,OAAO,aAAa,CAAC,yBAAyB,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;AAC1D,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { encodeFunctionData } from "viem";
|
|
2
|
+
import { getAction } from "viem/utils";
|
|
3
|
+
import { sendTransaction } from "./sendTransaction.js";
|
|
4
|
+
/**
|
|
5
|
+
* Executes a write operation on a smart contract using a smart account.
|
|
6
|
+
*
|
|
7
|
+
* @param client - The client instance.
|
|
8
|
+
* @param parameters - Parameters for the contract write operation.
|
|
9
|
+
* @returns The transaction hash as a hexadecimal string.
|
|
10
|
+
* @throws {Error} If the 'to' address is missing in the request.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { writeContract } from '@startale-scs/aa-sdk'
|
|
14
|
+
* import { encodeFunctionData } from 'viem'
|
|
15
|
+
*
|
|
16
|
+
* const encodedCall = encodeFunctionData({
|
|
17
|
+
* abi: CounterAbi,
|
|
18
|
+
* functionName: "incrementNumber"
|
|
19
|
+
* })
|
|
20
|
+
* const call = {
|
|
21
|
+
* to: '0x61f70428b61864B38D9B45b7B032c700B960acCD',
|
|
22
|
+
* data: encodedCall
|
|
23
|
+
* }
|
|
24
|
+
* const hash = await writeContract(startaleClient, call)
|
|
25
|
+
* console.log(hash) // '0x...'
|
|
26
|
+
*/
|
|
27
|
+
export async function writeContract(client, { abi, address, args, dataSuffix, functionName, ...request }) {
|
|
28
|
+
const data = encodeFunctionData({
|
|
29
|
+
abi,
|
|
30
|
+
args,
|
|
31
|
+
functionName
|
|
32
|
+
});
|
|
33
|
+
const hash = await getAction(client, (sendTransaction), "sendTransaction")({
|
|
34
|
+
data: `${data}${dataSuffix ? dataSuffix.replace("0x", "") : ""}`,
|
|
35
|
+
to: address,
|
|
36
|
+
...request
|
|
37
|
+
});
|
|
38
|
+
return hash;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=writeContract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/smartAccount/writeContract.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,kBAAkB,EACnB,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAejC,MAA2C,EAC3C,EACE,GAAG,EACH,OAAO,EACP,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,GAAG,OAAO,EAQX;IAED,MAAM,IAAI,GAAG,kBAAkB,CAAsB;QACnD,GAAG;QACH,IAAI;QACJ,YAAY;KACwC,CAAC,CAAA;IAEvD,MAAM,IAAI,GAAG,MAAM,SAAS,CAC1B,MAAM,EACN,CAAA,eAA+C,CAAA,EAC/C,iBAAiB,CAClB,CAAC;QACA,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KAKX,CAAC,CAAA;IACF,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { toHex } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the supported tokens for the Startale Token Paymaster..
|
|
4
|
+
*
|
|
5
|
+
* @param client - The Startale client instance
|
|
6
|
+
* @returns A promise that resolves to an array of FeeQuote objects.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const supportedTokens = await paymaster.getSupportedTokens(startaleClient);
|
|
11
|
+
* console.log(supportedTokens);
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export const getSupportedTokens = async (client) => {
|
|
15
|
+
const userOp = await client.prepareUserOperation({
|
|
16
|
+
calls: [
|
|
17
|
+
{
|
|
18
|
+
to: client.account.address,
|
|
19
|
+
data: "0x",
|
|
20
|
+
value: 0n
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
});
|
|
24
|
+
const paymaster = client.paymaster;
|
|
25
|
+
if (!client?.chain?.id)
|
|
26
|
+
throw new Error("Chain ID is required");
|
|
27
|
+
const quote = await paymaster.getTokenPaymasterQuotes({
|
|
28
|
+
userOp,
|
|
29
|
+
chainId: toHex(client.chain.id)
|
|
30
|
+
// Review: can be removed
|
|
31
|
+
// tokenList: []
|
|
32
|
+
});
|
|
33
|
+
return quote.feeQuotes;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=getSupportedTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSupportedTokens.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/tokenPaymaster/getSupportedTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAK5B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,MAA6B,EACR,EAAE;IACvB,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC;QAC/C,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO;gBAC1B,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,EAAE;aACV;SACF;KACF,CAAC,CAAA;IACF,MAAM,SAAS,GAAG,MAAM,CAAC,SAA+B,CAAA;IACxD,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;IAC/D,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,uBAAuB,CAAC;QACpD,MAAM;QACN,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,yBAAyB;QACzB,gBAAgB;KACjB,CAAC,CAAA;IAEF,OAAO,KAAK,CAAC,SAAS,CAAA;AACxB,CAAC,CAAA"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { toHex } from "viem";
|
|
2
|
+
import { ENTRY_POINT_ADDRESS } from "../../../constants/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Normalizes the authorization object to ensure yParity, chainId, and nonce are properly converted to hex.
|
|
5
|
+
* This is important for EIP-7702 authorization compatibility.
|
|
6
|
+
*/
|
|
7
|
+
const normalizeAuthorization = (authorization) => {
|
|
8
|
+
if (!authorization || typeof authorization !== 'object') {
|
|
9
|
+
return authorization;
|
|
10
|
+
}
|
|
11
|
+
// Create a copy to avoid mutating the original
|
|
12
|
+
const normalizedAuth = { ...authorization };
|
|
13
|
+
// Normalize yParity
|
|
14
|
+
if ('yParity' in normalizedAuth && normalizedAuth.yParity !== undefined) {
|
|
15
|
+
const yParity = normalizedAuth.yParity;
|
|
16
|
+
// Convert to number if it's a string or hex
|
|
17
|
+
let yParityNumber;
|
|
18
|
+
if (typeof yParity === 'string') {
|
|
19
|
+
// If it's a hex string, convert to number
|
|
20
|
+
if (yParity.startsWith('0x')) {
|
|
21
|
+
yParityNumber = parseInt(yParity, 16);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
yParityNumber = parseInt(yParity, 10);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
yParityNumber = yParity;
|
|
29
|
+
}
|
|
30
|
+
// Ensure yParity is even (0) or odd (1) and convert to hex with proper padding
|
|
31
|
+
// If the number is odd, keep it as 1, if even, make it 0
|
|
32
|
+
// Using size: 1 ensures even character count (0x00 or 0x01)
|
|
33
|
+
const normalizedYParity = yParityNumber % 2 === 1 ? 1 : 0;
|
|
34
|
+
normalizedAuth.yParity = toHex(normalizedYParity, { size: 1 });
|
|
35
|
+
}
|
|
36
|
+
// Convert chainId to hex
|
|
37
|
+
if ('chainId' in normalizedAuth && normalizedAuth.chainId !== undefined) {
|
|
38
|
+
const chainId = normalizedAuth.chainId;
|
|
39
|
+
normalizedAuth.chainId = toHex(chainId);
|
|
40
|
+
}
|
|
41
|
+
// Convert nonce to hex
|
|
42
|
+
if ('nonce' in normalizedAuth && normalizedAuth.nonce !== undefined) {
|
|
43
|
+
const nonce = normalizedAuth.nonce;
|
|
44
|
+
normalizedAuth.nonce = toHex(nonce);
|
|
45
|
+
}
|
|
46
|
+
return normalizedAuth;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Fetches paymaster quotes for ERC20 token payment options for a given UserOperation.
|
|
50
|
+
*
|
|
51
|
+
* @param userOp - The UserOperation to get paymaster quotes for
|
|
52
|
+
* @param client - Viem Client configured with TokenPaymaster RPC methods
|
|
53
|
+
* @param tokenList - Array of ERC20 token addresses to get quotes for
|
|
54
|
+
*
|
|
55
|
+
* @returns A promise of {@link TokenPaymasterQuotesResponse}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* // Configure client with paymaster RPC
|
|
60
|
+
* const paymasterClient = createSCSPaymasterClient({
|
|
61
|
+
* paymasterUrl
|
|
62
|
+
* })
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
* // Get paymaster quotes
|
|
66
|
+
* const quotes = await paymasterClient.getTokenPaymasterQuotes(userOp);
|
|
67
|
+
*
|
|
68
|
+
* // Example response:
|
|
69
|
+
* // {
|
|
70
|
+
* // paymasterAddress: "0x...",
|
|
71
|
+
* // feeQuotes: [{
|
|
72
|
+
* // symbol: "USDT",
|
|
73
|
+
* // decimal: 6,
|
|
74
|
+
* // tokenAddress: "0x...",
|
|
75
|
+
* // maxGasFee: "5000000",
|
|
76
|
+
* // maxGasFeeUSD: "5",
|
|
77
|
+
* // exchangeRate: "0x94ede635",
|
|
78
|
+
* // requiredAmount: "0x57",
|
|
79
|
+
* // logoUrl: "https://...",
|
|
80
|
+
* // premiumPercentage: 5,
|
|
81
|
+
* // }],
|
|
82
|
+
* // unsupportedTokens: []
|
|
83
|
+
* // }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export const getTokenPaymasterQuotes = async (client, parameters) => {
|
|
87
|
+
const { userOp, chainId } = parameters;
|
|
88
|
+
// Normalize the authorization yParity and convert chainId/nonce to hex if they exist
|
|
89
|
+
const normalizedAuthorization = userOp.authorization
|
|
90
|
+
? normalizeAuthorization(userOp.authorization)
|
|
91
|
+
: undefined;
|
|
92
|
+
// Transform UserOperation parameters into the format required by the pm_getFeeQuotes service endpoint.
|
|
93
|
+
const quote = await client.request({
|
|
94
|
+
method: "pm_getFeeQuotes",
|
|
95
|
+
params: [
|
|
96
|
+
{
|
|
97
|
+
sender: userOp.sender,
|
|
98
|
+
nonce: toHex(userOp.nonce),
|
|
99
|
+
factory: userOp.factory,
|
|
100
|
+
factoryData: userOp.factoryData,
|
|
101
|
+
callData: userOp.callData,
|
|
102
|
+
maxFeePerGas: userOp.maxFeePerGas.toString(),
|
|
103
|
+
maxPriorityFeePerGas: userOp.maxPriorityFeePerGas.toString(),
|
|
104
|
+
verificationGasLimit: toHex(Number(userOp.verificationGasLimit)),
|
|
105
|
+
callGasLimit: toHex(Number(userOp.callGasLimit)),
|
|
106
|
+
preVerificationGas: toHex(Number(userOp.preVerificationGas)),
|
|
107
|
+
paymasterPostOpGasLimit: toHex(Number(userOp.paymasterPostOpGasLimit ?? 0x0)),
|
|
108
|
+
paymasterVerificationGasLimit: toHex(Number(userOp.paymasterVerificationGasLimit ?? 0x0)),
|
|
109
|
+
eip7702Auth: normalizedAuthorization
|
|
110
|
+
},
|
|
111
|
+
ENTRY_POINT_ADDRESS,
|
|
112
|
+
chainId,
|
|
113
|
+
{
|
|
114
|
+
calculateGasLimits: true
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
return quote;
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=getTokenPaymasterQuotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTokenPaymasterQuotes.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EACN,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AA8DxD;;;GAGG;AACH,MAAM,sBAAsB,GAAG,CAAC,aAAkB,EAAE,EAAE;IACpD,IAAI,CAAC,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QACxD,OAAO,aAAa,CAAA;IACtB,CAAC;IAED,+CAA+C;IAC/C,MAAM,cAAc,GAAG,EAAE,GAAG,aAAa,EAAE,CAAA;IAE3C,oBAAoB;IACpB,IAAI,SAAS,IAAI,cAAc,IAAI,cAAc,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACxE,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAA;QAEtC,4CAA4C;QAC5C,IAAI,aAAqB,CAAA;QACzB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,0CAA0C;YAC1C,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7B,aAAa,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,aAAa,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,aAAa,GAAG,OAAO,CAAA;QACzB,CAAC;QAED,+EAA+E;QAC/E,yDAAyD;QACzD,4DAA4D;QAC5D,MAAM,iBAAiB,GAAG,aAAa,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACzD,cAAc,CAAC,OAAO,GAAG,KAAK,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAA;IAChE,CAAC;IAED,yBAAyB;IACzB,IAAI,SAAS,IAAI,cAAc,IAAI,cAAc,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACxE,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAA;QACtC,cAAc,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;IACzC,CAAC;IAED,uBAAuB;IACvB,IAAI,OAAO,IAAI,cAAc,IAAI,cAAc,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACpE,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAA;QAClC,cAAc,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;IACrC,CAAC;IAED,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAC1C,MAKC,EACD,UAA6C,EACN,EAAE;IACzC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAA;IAEtC,qFAAqF;IACrF,MAAM,uBAAuB,GAAG,MAAM,CAAC,aAAa;QAClD,CAAC,CAAC,sBAAsB,CAAC,MAAM,CAAC,aAAa,CAAC;QAC9C,CAAC,CAAC,SAAS,CAAA;IAEb,uGAAuG;IACvG,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACjC,MAAM,EAAE,iBAAiB;QACzB,MAAM,EAAE;YACN;gBACE,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;gBAC1B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE;gBAC5C,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE;gBAC5D,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;gBAChE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;gBAChD,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;gBAC5D,uBAAuB,EAAE,KAAK,CAC5B,MAAM,CAAC,MAAM,CAAC,uBAAuB,IAAI,GAAG,CAAC,CAC9C;gBACD,6BAA6B,EAAE,KAAK,CAClC,MAAM,CAAC,MAAM,CAAC,6BAA6B,IAAI,GAAG,CAAC,CACpD;gBACD,WAAW,EAAE,uBAAuB;aACrC;YACD,mBAAmB;YACnB,OAAO;YACP;gBACE,kBAAkB,EAAE,IAAI;aACzB;SACF;KACF,CAAC,CAAA;IAEF,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { getSupportedTokens } from "./getSupportedTokens.js";
|
|
2
|
+
import { getTokenPaymasterQuotes } from "./getTokenPaymasterQuotes.js";
|
|
3
|
+
export const scsTokenPaymasterActions = () => (client) => ({
|
|
4
|
+
/**
|
|
5
|
+
* Fetches paymaster quotes for ERC20 token payment options for a given UserOperation.
|
|
6
|
+
*
|
|
7
|
+
* @param userOp - The UserOperation to get paymaster quotes for
|
|
8
|
+
* @param client - Viem Client configured with TokenPaymaster RPC methods
|
|
9
|
+
* @param tokenList - Array of ERC20 token addresses to get quotes for
|
|
10
|
+
*
|
|
11
|
+
* @returns A promise of {@link TokenPaymasterQuotesResponse}
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* // Configure client with paymaster RPC
|
|
16
|
+
* const paymasterClient = createSCSPaymasterClient({
|
|
17
|
+
* paymasterUrl
|
|
18
|
+
* })
|
|
19
|
+
*
|
|
20
|
+
* // Token addresses to get quotes for
|
|
21
|
+
* const tokenList = [
|
|
22
|
+
* "0x...", // USDT
|
|
23
|
+
* "0x..." // USDC
|
|
24
|
+
* ];
|
|
25
|
+
*
|
|
26
|
+
* // Get paymaster quotes
|
|
27
|
+
* const quotes = await paymasterClient.getTokenPaymasterQuotes(userOp, tokenList);
|
|
28
|
+
*
|
|
29
|
+
* // Example response:
|
|
30
|
+
* // {
|
|
31
|
+
* // mode: "ERC20",
|
|
32
|
+
* // paymasterAddress: "0x...",
|
|
33
|
+
* // feeQuotes: [{
|
|
34
|
+
* // symbol: "USDT",
|
|
35
|
+
* // decimal: 6,
|
|
36
|
+
* // tokenAddress: "0x...",
|
|
37
|
+
* // maxGasFee: 5000000,
|
|
38
|
+
* // maxGasFeeUSD: 5,
|
|
39
|
+
* // exchangeRate: 1,
|
|
40
|
+
* // logoUrl: "https://...",
|
|
41
|
+
* // premiumPercentage: "0.1",
|
|
42
|
+
* // validUntil: 1234567890
|
|
43
|
+
* // }],
|
|
44
|
+
* // unsupportedTokens: []
|
|
45
|
+
* // }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
getTokenPaymasterQuotes: async (parameters) => getTokenPaymasterQuotes(client, parameters),
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves the supported tokens for the Token Paymaster..
|
|
51
|
+
*
|
|
52
|
+
* @param client - The Startale client instance
|
|
53
|
+
* @returns A promise that resolves to an array of FeeQuote objects.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const supportedTokens = await paymaster.getSupportedTokens(startaleClient);
|
|
58
|
+
* console.log(supportedTokens);
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
getSupportedTokens: async (client) => getSupportedTokens(client)
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/sdk/clients/decorators/tokenPaymaster/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAIL,uBAAuB,EACxB,MAAM,2BAA2B,CAAA;AAiElC,MAAM,CAAC,MAAM,wBAAwB,GACnC,GAAG,EAAE,CACL,CAAC,MAAuB,EAAyB,EAAE,CAAC,CAAC;IACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,uBAAuB,EAAE,KAAK,EAC5B,UAA6C,EAC7C,EAAE,CAAC,uBAAuB,CAAC,MAAM,EAAE,UAAU,CAAC;IAChD;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,KAAK,EAAE,MAA6B,EAAE,EAAE,CAC1D,kBAAkB,CAAC,MAAM,CAAC;CAC7B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sdk/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA"}
|