@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,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSetThresholdTx = exports.getRemoveOwnerTx = exports.getAddOwnerTx = exports.getThreshold = exports.getOwners = exports.setThreshold = exports.removeOwner = exports.addOwner = exports.multiSign = exports.prepareForMultiSign = exports.ownableReads = exports.ownableCalls = void 0;
|
|
4
|
+
exports.ownableActions = ownableActions;
|
|
5
|
+
const addOwner_1 = require("./addOwner.js");
|
|
6
|
+
Object.defineProperty(exports, "addOwner", { enumerable: true, get: function () { return addOwner_1.addOwner; } });
|
|
7
|
+
const getAddOwnerTx_1 = require("./getAddOwnerTx.js");
|
|
8
|
+
Object.defineProperty(exports, "getAddOwnerTx", { enumerable: true, get: function () { return getAddOwnerTx_1.getAddOwnerTx; } });
|
|
9
|
+
const getOwners_1 = require("./getOwners.js");
|
|
10
|
+
Object.defineProperty(exports, "getOwners", { enumerable: true, get: function () { return getOwners_1.getOwners; } });
|
|
11
|
+
const getRemoveOwnerTx_1 = require("./getRemoveOwnerTx.js");
|
|
12
|
+
Object.defineProperty(exports, "getRemoveOwnerTx", { enumerable: true, get: function () { return getRemoveOwnerTx_1.getRemoveOwnerTx; } });
|
|
13
|
+
const getSetThresholdTx_1 = require("./getSetThresholdTx.js");
|
|
14
|
+
Object.defineProperty(exports, "getSetThresholdTx", { enumerable: true, get: function () { return getSetThresholdTx_1.getSetThresholdTx; } });
|
|
15
|
+
const getThreshold_1 = require("./getThreshold.js");
|
|
16
|
+
Object.defineProperty(exports, "getThreshold", { enumerable: true, get: function () { return getThreshold_1.getThreshold; } });
|
|
17
|
+
const multiSign_1 = require("./multiSign.js");
|
|
18
|
+
Object.defineProperty(exports, "multiSign", { enumerable: true, get: function () { return multiSign_1.multiSign; } });
|
|
19
|
+
const prepareForMultiSign_1 = require("./prepareForMultiSign.js");
|
|
20
|
+
Object.defineProperty(exports, "prepareForMultiSign", { enumerable: true, get: function () { return prepareForMultiSign_1.prepareForMultiSign; } });
|
|
21
|
+
const removeOwner_1 = require("./removeOwner.js");
|
|
22
|
+
Object.defineProperty(exports, "removeOwner", { enumerable: true, get: function () { return removeOwner_1.removeOwner; } });
|
|
23
|
+
const setThreshold_1 = require("./setThreshold.js");
|
|
24
|
+
Object.defineProperty(exports, "setThreshold", { enumerable: true, get: function () { return setThreshold_1.setThreshold; } });
|
|
25
|
+
function ownableActions() {
|
|
26
|
+
return (client) => {
|
|
27
|
+
return {
|
|
28
|
+
prepareForMultiSign: async (args) => {
|
|
29
|
+
return await (0, prepareForMultiSign_1.prepareForMultiSign)(client, args);
|
|
30
|
+
},
|
|
31
|
+
multiSign: async (args) => {
|
|
32
|
+
return await (0, multiSign_1.multiSign)(client, args);
|
|
33
|
+
},
|
|
34
|
+
getThreshold: (args) => {
|
|
35
|
+
return (0, getThreshold_1.getThreshold)(client, args);
|
|
36
|
+
},
|
|
37
|
+
getAddOwnerTx: (args) => {
|
|
38
|
+
return (0, getAddOwnerTx_1.getAddOwnerTx)(client, args);
|
|
39
|
+
},
|
|
40
|
+
getOwners: (args) => {
|
|
41
|
+
return (0, getOwners_1.getOwners)(client, args);
|
|
42
|
+
},
|
|
43
|
+
getSetThresholdTx: (args) => {
|
|
44
|
+
return (0, getSetThresholdTx_1.getSetThresholdTx)(client, args);
|
|
45
|
+
},
|
|
46
|
+
getRemoveOwnerTx: (args) => {
|
|
47
|
+
return (0, getRemoveOwnerTx_1.getRemoveOwnerTx)(client, args);
|
|
48
|
+
},
|
|
49
|
+
addOwner: (args) => {
|
|
50
|
+
return (0, addOwner_1.addOwner)(client, args);
|
|
51
|
+
},
|
|
52
|
+
removeOwner: (args) => {
|
|
53
|
+
return (0, removeOwner_1.removeOwner)(client, args);
|
|
54
|
+
},
|
|
55
|
+
setThreshold: (args) => {
|
|
56
|
+
return (0, setThreshold_1.setThreshold)(client, args);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.ownableCalls = {
|
|
62
|
+
toAddOwnerCalls: getAddOwnerTx_1.toAddOwnerCalls,
|
|
63
|
+
toSetThresholdCalls: getSetThresholdTx_1.toSetThresholdCalls,
|
|
64
|
+
toRemoveOwnerCalls: getRemoveOwnerTx_1.toRemoveOwnerCalls
|
|
65
|
+
};
|
|
66
|
+
exports.ownableReads = {
|
|
67
|
+
toGetOwnersReads: getOwners_1.getOwners,
|
|
68
|
+
toGetThresholdReads: getThreshold_1.getThreshold
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/index.ts"],"names":[],"mappings":";;;AAyDA,wCAqCC;AA3FD,yCAA8D;AA2G5D,yFA3GgC,mBAAQ,OA2GhC;AA1GV,mDAAgE;AA+G9D,8FA/GO,6BAAa,OA+GP;AA9Gf,2CAAiE;AA4G/D,0FA5GiC,qBAAS,OA4GjC;AA3GX,yDAI2B;AA0GzB,iGA5GA,mCAAgB,OA4GA;AAzGlB,2DAI4B;AAsG1B,kGAxGA,qCAAiB,OAwGA;AArGnB,iDAA0E;AAkGxE,6FAlGoC,2BAAY,OAkGpC;AAjGd,2CAAiE;AA4F/D,0FA5FiC,qBAAS,OA4FjC;AA3FX,+DAI8B;AAsF5B,oGAvFA,yCAAmB,OAuFA;AArFrB,+CAAuE;AAwFrE,4FAxFmC,yBAAW,OAwFnC;AAvFb,iDAA0E;AAwFxE,6FAxFoC,2BAAY,OAwFpC;AAvDd,SAAgB,cAAc;IAC5B,OAAO,CACL,MAAkE,EAC5B,EAAE;QACxC,OAAO;YACL,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBAClC,OAAO,MAAM,IAAA,yCAAmB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAChD,CAAC;YACD,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBACxB,OAAO,MAAM,IAAA,qBAAS,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACtC,CAAC;YACD,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;gBACrB,OAAO,IAAA,2BAAY,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACnC,CAAC;YACD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE;gBACtB,OAAO,IAAA,6BAAa,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACpC,CAAC;YACD,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBAClB,OAAO,IAAA,qBAAS,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAChC,CAAC;YACD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC1B,OAAO,IAAA,qCAAiB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACxC,CAAC;YACD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE;gBACzB,OAAO,IAAA,mCAAgB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACvC,CAAC;YACD,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjB,OAAO,IAAA,mBAAQ,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC/B,CAAC;YACD,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;gBACpB,OAAO,IAAA,yBAAW,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAClC,CAAC;YACD,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;gBACrB,OAAO,IAAA,2BAAY,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACnC,CAAC;SACF,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAEY,QAAA,YAAY,GAAG;IAC1B,eAAe,EAAf,+BAAe;IACf,mBAAmB,EAAnB,uCAAmB;IACnB,kBAAkB,EAAlB,qCAAkB;CACV,CAAA;AAEG,QAAA,YAAY,GAAG;IAC1B,gBAAgB,EAAE,qBAAS;IAC3B,mBAAmB,EAAE,2BAAY;CACzB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.multiSign = multiSign;
|
|
4
|
+
const account_abstraction_1 = require("viem/account-abstraction");
|
|
5
|
+
const utils_1 = require("viem/utils");
|
|
6
|
+
const AccountNotFound_1 = require("../../../../account/utils/AccountNotFound.js");
|
|
7
|
+
const constants_1 = require("../../../../constants/index.js");
|
|
8
|
+
async function multiSign(client, parameters) {
|
|
9
|
+
const { account: account_ = client.account, signatures, ...rest } = parameters;
|
|
10
|
+
if (!account_) {
|
|
11
|
+
throw new AccountNotFound_1.AccountNotFoundError({
|
|
12
|
+
docsPath: "/startale-client/methods#sendtransaction"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const account = (0, utils_1.parseAccount)(account_);
|
|
16
|
+
const publicClient = account?.client;
|
|
17
|
+
if (!publicClient) {
|
|
18
|
+
throw new Error("Public client not found");
|
|
19
|
+
}
|
|
20
|
+
return (0, account_abstraction_1.sendUserOperation)(client, {
|
|
21
|
+
...rest,
|
|
22
|
+
signature: (0, constants_1.getOwnableValidatorSignature)({ signatures })
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=multiSign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiSign.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/multiSign.ts"],"names":[],"mappings":";;AAcA,8BAyBC;AAtCD,kEAAgF;AAChF,sCAAyC;AACzC,+EAAgF;AAChF,qDAAoE;AAU7D,KAAK,UAAU,SAAS,CAG7B,MAAkE,EAClE,UAAqD;IAErD,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAA;IAE9E,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sCAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,YAAY,GAAG,OAAO,EAAE,MAAsB,CAAA;IAEpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,IAAA,uCAAiB,EAAC,MAAM,EAAE;QAC/B,GAAG,IAAI;QACP,SAAS,EAAE,IAAA,wCAA4B,EAAC,EAAE,UAAU,EAAE,CAAC;KAC7C,CAAC,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareForMultiSign = prepareForMultiSign;
|
|
4
|
+
const utils_1 = require("viem/utils");
|
|
5
|
+
const AccountNotFound_1 = require("../../../../account/utils/AccountNotFound.js");
|
|
6
|
+
async function prepareForMultiSign(startaleAccountClient, parameters) {
|
|
7
|
+
const { account: account_ = startaleAccountClient.account, ...rest } = parameters;
|
|
8
|
+
if (!account_) {
|
|
9
|
+
throw new AccountNotFound_1.AccountNotFoundError({
|
|
10
|
+
docsPath: "/startale-client/methods#sendtransaction"
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const startaleAccount = (0, utils_1.parseAccount)(account_);
|
|
14
|
+
const publicClient = startaleAccount?.client;
|
|
15
|
+
if (!publicClient) {
|
|
16
|
+
throw new Error("Public client not found");
|
|
17
|
+
}
|
|
18
|
+
const userOp = await startaleAccountClient.prepareUserOperation(rest);
|
|
19
|
+
const userOpHash = startaleAccount.getUserOpHash(userOp);
|
|
20
|
+
return { userOpHash, userOp };
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=prepareForMultiSign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareForMultiSign.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/prepareForMultiSign.ts"],"names":[],"mappings":";;AA4BA,kDAiCC;AA5DD,sCAAyC;AACzC,+EAAgF;AA0BzE,KAAK,UAAU,mBAAmB,CAGvC,qBAIC,EACD,UAA+D;IAE/D,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,qBAAqB,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,GAClE,UAAU,CAAA;IAEZ,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sCAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAwB,CAAA;IACrE,MAAM,YAAY,GAAG,eAAe,EAAE,MAAsB,CAAA;IAE5D,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAGD,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAGrE,MAAM,UAAU,GAAG,eAAe,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;IAExD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;AAC/B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toRemoveOwnerCalls = void 0;
|
|
4
|
+
exports.removeOwner = removeOwner;
|
|
5
|
+
const account_abstraction_1 = require("viem/account-abstraction");
|
|
6
|
+
const utils_1 = require("viem/utils");
|
|
7
|
+
const AccountNotFound_1 = require("../../../../account/utils/AccountNotFound.js");
|
|
8
|
+
const constants_1 = require("../../../../constants/index.js");
|
|
9
|
+
async function removeOwner(client, parameters) {
|
|
10
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, owner } = parameters;
|
|
11
|
+
if (!account_) {
|
|
12
|
+
throw new AccountNotFound_1.AccountNotFoundError({
|
|
13
|
+
docsPath: "/startale-client/methods#sendtransaction"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const account = (0, utils_1.parseAccount)(account_);
|
|
17
|
+
const calls = await (0, exports.toRemoveOwnerCalls)(account, { owner });
|
|
18
|
+
return (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
19
|
+
calls,
|
|
20
|
+
maxFeePerGas,
|
|
21
|
+
maxPriorityFeePerGas,
|
|
22
|
+
nonce,
|
|
23
|
+
account
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const toRemoveOwnerCalls = async (account, parameters) => {
|
|
27
|
+
const action = await (0, constants_1.getRemoveOwnableValidatorOwnerAction)({
|
|
28
|
+
account: (0, constants_1.getAccount)({
|
|
29
|
+
address: account.address,
|
|
30
|
+
type: "erc7579-implementation"
|
|
31
|
+
}),
|
|
32
|
+
client: account.client,
|
|
33
|
+
owner: parameters.owner
|
|
34
|
+
});
|
|
35
|
+
if (!("callData" in action)) {
|
|
36
|
+
throw new Error("Error getting remove owner action");
|
|
37
|
+
}
|
|
38
|
+
return [
|
|
39
|
+
{
|
|
40
|
+
to: action.target,
|
|
41
|
+
value: BigInt(action.value.toString()),
|
|
42
|
+
data: action.callData
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
exports.toRemoveOwnerCalls = toRemoveOwnerCalls;
|
|
47
|
+
//# sourceMappingURL=removeOwner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeOwner.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/removeOwner.ts"],"names":[],"mappings":";;;AAuDA,kCAiCC;AAvFD,kEAA4D;AAC5D,sCAAoD;AACpD,+EAAgF;AAEhF,qDAG8B;AA+CvB,KAAK,UAAU,WAAW,CAG/B,MAAkE,EAClE,UAAuD;IAEvD,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,KAAK,EACN,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sCAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAwB,CAAA;IAC7D,MAAM,KAAK,GAAG,MAAM,IAAA,0BAAkB,EAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IAC1D,OAAO,IAAA,iBAAS,EACd,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACpB,CAAC;QACA,KAAK;QACL,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAEM,MAAM,kBAAkB,GAAG,KAAK,EACrC,OAA4B,EAC5B,UAAkE,EACjD,EAAE;IACnB,MAAM,MAAM,GAAG,MAAM,IAAA,gDAAoC,EAAC;QACxD,OAAO,EAAE,IAAA,sBAAU,EAAC;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,wBAAwB;SAC/B,CAAC;QACF,MAAM,EAAE,OAAO,CAAC,MAAa;QAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;KACxB,CAAC,CAAA;IAEF,IAAI,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL;YACE,EAAE,EAAE,MAAM,CAAC,MAAM;YACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACtC,IAAI,EAAE,MAAM,CAAC,QAAQ;SACtB;KACF,CAAA;AACH,CAAC,CAAA;AAxBY,QAAA,kBAAkB,sBAwB9B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toSetThresholdCalls = void 0;
|
|
4
|
+
exports.setThreshold = setThreshold;
|
|
5
|
+
const account_abstraction_1 = require("viem/account-abstraction");
|
|
6
|
+
const utils_1 = require("viem/utils");
|
|
7
|
+
const AccountNotFound_1 = require("../../../../account/utils/AccountNotFound.js");
|
|
8
|
+
const constants_1 = require("../../../../constants/index.js");
|
|
9
|
+
async function setThreshold(client, parameters) {
|
|
10
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce } = parameters;
|
|
11
|
+
if (!account_) {
|
|
12
|
+
throw new AccountNotFound_1.AccountNotFoundError({
|
|
13
|
+
docsPath: "/startale-client/methods#sendtransaction"
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const account = (0, utils_1.parseAccount)(account_);
|
|
17
|
+
const calls = await (0, exports.toSetThresholdCalls)(account, parameters);
|
|
18
|
+
return (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
19
|
+
calls,
|
|
20
|
+
maxFeePerGas,
|
|
21
|
+
maxPriorityFeePerGas,
|
|
22
|
+
nonce,
|
|
23
|
+
account
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const toSetThresholdCalls = async (_, parameters) => {
|
|
27
|
+
const action = (0, constants_1.getSetOwnableValidatorThresholdAction)({
|
|
28
|
+
threshold: parameters.threshold
|
|
29
|
+
});
|
|
30
|
+
return [
|
|
31
|
+
{
|
|
32
|
+
to: action.target,
|
|
33
|
+
value: BigInt(action.value.toString()),
|
|
34
|
+
data: action.callData
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
};
|
|
38
|
+
exports.toSetThresholdCalls = toSetThresholdCalls;
|
|
39
|
+
//# sourceMappingURL=setThreshold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setThreshold.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/setThreshold.ts"],"names":[],"mappings":";;;AAwDA,oCAkCC;AAzFD,kEAA4D;AAC5D,sCAAoD;AACpD,+EAAgF;AAEhF,qDAA6E;AAmDtE,KAAK,UAAU,YAAY,CAGhC,MAAkE,EAClE,UAAwD;IAExD,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACN,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sCAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAwB,CAAA;IAE7D,MAAM,KAAK,GAAG,MAAM,IAAA,2BAAmB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAE5D,OAAO,IAAA,iBAAS,EACd,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACpB,CAAC;QACA,KAAK;QACL,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAEM,MAAM,mBAAmB,GAAG,KAAK,EACtC,CAAsB,EACtB,UAAmE,EAClD,EAAE;IACnB,MAAM,MAAM,GAAG,IAAA,iDAAqC,EAAC;QACnD,SAAS,EAAE,UAAU,CAAC,SAAS;KAChC,CAAC,CAAA;IAEF,OAAO;QACL;YACE,EAAE,EAAE,MAAM,CAAC,MAAM;YACjB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACtC,IAAI,EAAE,MAAM,CAAC,QAAQ;SACtB;KACF,CAAA;AACH,CAAC,CAAA;AAfY,QAAA,mBAAmB,uBAe/B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./decorators/index.js"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./toOwnableModule.js"), exports);
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/ownable/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,4DAAiC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toOwnableModule = void 0;
|
|
4
|
+
const constants_1 = require("../../../constants/index.js");
|
|
5
|
+
const toValidator_1 = require("../toValidator.js");
|
|
6
|
+
const toOwnableModule = (parameters) => {
|
|
7
|
+
const { signer, threshold, owners } = parameters;
|
|
8
|
+
return (0, toValidator_1.toValidator)({
|
|
9
|
+
...(0, constants_1.getOwnableValidator)({ threshold, owners }),
|
|
10
|
+
type: "validator",
|
|
11
|
+
signer,
|
|
12
|
+
getStubSignature: async () => (0, constants_1.getOwnableValidatorMockSignature)({ threshold })
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
exports.toOwnableModule = toOwnableModule;
|
|
16
|
+
//# sourceMappingURL=toOwnableModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toOwnableModule.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/ownable/toOwnableModule.ts"],"names":[],"mappings":";;;AAEA,kDAG2B;AAC3B,gDAA4D;AAyCrD,MAAM,eAAe,GAAG,CAC7B,UAAqC,EAC1B,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,UAAU,CAAA;IAEhD,OAAO,IAAA,yBAAW,EAAC;QACjB,GAAG,IAAA,+BAAmB,EAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QAC7C,IAAI,EAAE,WAAW;QACjB,MAAM;QACN,gBAAgB,EAAE,KAAK,IAAkB,EAAE,CACzC,IAAA,4CAAgC,EAAC,EAAE,SAAS,EAAE,CAAC;KAClD,CAAC,CAAA;AACJ,CAAC,CAAA;AAZY,QAAA,eAAe,mBAY3B"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.abiToPoliciesInfo = exports.getTrustedAttesters = exports.toActionConfig = exports.createActionData = exports.applyDefaults = exports.createActionConfig = exports.generateSalt = exports.DUMMY_SIGNATURE = exports.MAX_RULES = void 0;
|
|
4
|
+
exports.stringify = stringify;
|
|
5
|
+
exports.parse = parse;
|
|
6
|
+
const viem_1 = require("viem");
|
|
7
|
+
const constants_1 = require("../../../constants/index.js");
|
|
8
|
+
const abi_1 = require("../../../constants/abi/index.js");
|
|
9
|
+
const Helpers_1 = require("../../utils/Helpers.js");
|
|
10
|
+
const preparePermission_1 = require("./decorators/preparePermission.js");
|
|
11
|
+
exports.MAX_RULES = 16;
|
|
12
|
+
exports.DUMMY_SIGNATURE = "0x81d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b";
|
|
13
|
+
const generateSalt = () => {
|
|
14
|
+
const randomBytes = new Uint8Array(32);
|
|
15
|
+
crypto.getRandomValues(randomBytes);
|
|
16
|
+
return `0x${Array.from(randomBytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
|
|
17
|
+
};
|
|
18
|
+
exports.generateSalt = generateSalt;
|
|
19
|
+
const createActionConfig = (rules, valueLimit = 0n) => ({
|
|
20
|
+
paramRules: {
|
|
21
|
+
length: rules.length,
|
|
22
|
+
rules: rules
|
|
23
|
+
},
|
|
24
|
+
valueLimitPerUse: valueLimit
|
|
25
|
+
});
|
|
26
|
+
exports.createActionConfig = createActionConfig;
|
|
27
|
+
const applyDefaults = (sessionInfo) => {
|
|
28
|
+
const sessionKeyData = sessionInfo.sessionKeyData ?? (0, viem_1.toHex)((0, viem_1.toBytes)(sessionInfo.sessionPublicKey));
|
|
29
|
+
const sessionPublicKey = sessionInfo.sessionPublicKey ?? sessionKeyData;
|
|
30
|
+
return {
|
|
31
|
+
...sessionInfo,
|
|
32
|
+
sessionKeyData,
|
|
33
|
+
sessionPublicKey,
|
|
34
|
+
sessionValidUntil: sessionInfo.sessionValidUntil ?? preparePermission_1.ONE_YEAR_FROM_NOW_IN_SECONDS,
|
|
35
|
+
sessionValidAfter: sessionInfo.sessionValidAfter ?? 0,
|
|
36
|
+
sessionValidator: sessionInfo.sessionValidator ?? constants_1.OWNABLE_VALIDATOR_ADDRESS,
|
|
37
|
+
sessionValidatorInitData: sessionInfo.sessionValidatorInitData ??
|
|
38
|
+
(0, constants_1.encodeValidationData)({
|
|
39
|
+
threshold: 1,
|
|
40
|
+
owners: [(0, viem_1.getAddress)(sessionPublicKey)]
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
exports.applyDefaults = applyDefaults;
|
|
45
|
+
const createActionData = (contractAddress, functionSelector, policies) => {
|
|
46
|
+
return {
|
|
47
|
+
actionTarget: contractAddress,
|
|
48
|
+
actionTargetSelector: (typeof functionSelector === "string"
|
|
49
|
+
? functionSelector
|
|
50
|
+
: functionSelector.name),
|
|
51
|
+
actionPolicies: policies
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
exports.createActionData = createActionData;
|
|
55
|
+
const toActionConfig = (config) => {
|
|
56
|
+
const filledRules = [...config.paramRules.rules];
|
|
57
|
+
while (filledRules.length < exports.MAX_RULES) {
|
|
58
|
+
filledRules.push({
|
|
59
|
+
condition: 0,
|
|
60
|
+
offsetIndex: 0,
|
|
61
|
+
isLimited: false,
|
|
62
|
+
ref: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
63
|
+
usage: {
|
|
64
|
+
limit: BigInt(0),
|
|
65
|
+
used: BigInt(0)
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
valueLimitPerUse: BigInt(config.valueLimitPerUse),
|
|
71
|
+
paramRules: {
|
|
72
|
+
length: BigInt(config.paramRules.length),
|
|
73
|
+
rules: filledRules
|
|
74
|
+
.map((rule) => {
|
|
75
|
+
const parsedRef = (0, Helpers_1.parseReferenceValue)(rule.ref);
|
|
76
|
+
return {
|
|
77
|
+
condition: rule.condition,
|
|
78
|
+
offset: rule.offsetIndex * 32,
|
|
79
|
+
isLimited: rule.isLimited,
|
|
80
|
+
ref: parsedRef,
|
|
81
|
+
usage: rule.usage
|
|
82
|
+
};
|
|
83
|
+
})
|
|
84
|
+
.concat(Array(exports.MAX_RULES - filledRules.length).fill({
|
|
85
|
+
condition: 0,
|
|
86
|
+
offset: 0,
|
|
87
|
+
isLimited: false,
|
|
88
|
+
ref: "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
89
|
+
usage: { limit: 0n, used: 0n }
|
|
90
|
+
}))
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
exports.toActionConfig = toActionConfig;
|
|
95
|
+
function stringify(obj) {
|
|
96
|
+
return JSON.stringify(obj, (_, value) => typeof value === "bigint"
|
|
97
|
+
? { __type: "bigint", value: value.toString() }
|
|
98
|
+
: value);
|
|
99
|
+
}
|
|
100
|
+
function parse(data) {
|
|
101
|
+
return JSON.parse(data, (_, value) => {
|
|
102
|
+
if (value && typeof value === "object" && value.__type === "bigint") {
|
|
103
|
+
return BigInt(value.value);
|
|
104
|
+
}
|
|
105
|
+
return value;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
const getTrustedAttesters = async ({ accountAddress, client }) => {
|
|
109
|
+
try {
|
|
110
|
+
const attesters = (await client.readContract({
|
|
111
|
+
address: constants_1.REGISTRY_ADDRESS,
|
|
112
|
+
abi: abi_1.ERC7484RegistryAbi,
|
|
113
|
+
functionName: "findTrustedAttesters",
|
|
114
|
+
args: [accountAddress]
|
|
115
|
+
}));
|
|
116
|
+
return attesters;
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
console.error(err);
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
exports.getTrustedAttesters = getTrustedAttesters;
|
|
124
|
+
const abiToPoliciesInfo = ({ abi, ...actionPolicyInfo }) => (abi ?? [])
|
|
125
|
+
.filter((item) => item.type === "function")
|
|
126
|
+
.map((func) => ({
|
|
127
|
+
...actionPolicyInfo,
|
|
128
|
+
functionSelector: (0, viem_1.toFunctionSelector)(func),
|
|
129
|
+
rules: []
|
|
130
|
+
}));
|
|
131
|
+
exports.abiToPoliciesInfo = abiToPoliciesInfo;
|
|
132
|
+
//# sourceMappingURL=Helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Helpers.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/Helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParamCondition = void 0;
|
|
4
|
+
var ParamCondition;
|
|
5
|
+
(function (ParamCondition) {
|
|
6
|
+
ParamCondition[ParamCondition["EQUAL"] = 0] = "EQUAL";
|
|
7
|
+
ParamCondition[ParamCondition["GREATER_THAN"] = 1] = "GREATER_THAN";
|
|
8
|
+
ParamCondition[ParamCondition["LESS_THAN"] = 2] = "LESS_THAN";
|
|
9
|
+
ParamCondition[ParamCondition["GREATER_THAN_OR_EQUAL"] = 3] = "GREATER_THAN_OR_EQUAL";
|
|
10
|
+
ParamCondition[ParamCondition["LESS_THAN_OR_EQUAL"] = 4] = "LESS_THAN_OR_EQUAL";
|
|
11
|
+
ParamCondition[ParamCondition["NOT_EQUAL"] = 5] = "NOT_EQUAL";
|
|
12
|
+
})(ParamCondition || (exports.ParamCondition = ParamCondition = {}));
|
|
13
|
+
//# sourceMappingURL=Types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/Types.ts"],"names":[],"mappings":";;;AAyLA,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,qDAAS,CAAA;IACT,mEAAgB,CAAA;IAChB,6DAAa,CAAA;IACb,qFAAyB,CAAA;IACzB,+EAAsB,CAAA;IACtB,6DAAa,CAAA;AACf,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.grantPermission = grantPermission;
|
|
4
|
+
const account_abstraction_1 = require("viem/account-abstraction");
|
|
5
|
+
const utils_1 = require("viem/utils");
|
|
6
|
+
const AccountNotFound_1 = require("../../../../account/utils/AccountNotFound.js");
|
|
7
|
+
const preparePermission_1 = require("./preparePermission.js");
|
|
8
|
+
async function grantPermission(client, parameters) {
|
|
9
|
+
const { account: account_ = client.account, maxFeePerGas, maxPriorityFeePerGas, nonce, calls: calls_ } = parameters;
|
|
10
|
+
if (!account_) {
|
|
11
|
+
throw new AccountNotFound_1.AccountNotFoundError({
|
|
12
|
+
docsPath: "/startale-client/methods#sendtransaction"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
const account = (0, utils_1.parseAccount)(account_);
|
|
16
|
+
if (!account || !account.address) {
|
|
17
|
+
throw new Error("Account not found");
|
|
18
|
+
}
|
|
19
|
+
const preparedPermission = await (0, utils_1.getAction)(client, preparePermission_1.preparePermission, "preparePermission")(parameters);
|
|
20
|
+
const userOpHash = await (0, utils_1.getAction)(client, account_abstraction_1.sendUserOperation, "sendUserOperation")({
|
|
21
|
+
calls: [
|
|
22
|
+
{
|
|
23
|
+
to: preparedPermission.action.target,
|
|
24
|
+
data: preparedPermission.action.callData
|
|
25
|
+
},
|
|
26
|
+
...(calls_ || [])
|
|
27
|
+
],
|
|
28
|
+
maxFeePerGas,
|
|
29
|
+
maxPriorityFeePerGas,
|
|
30
|
+
nonce,
|
|
31
|
+
account
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
userOpHash,
|
|
35
|
+
...preparedPermission
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=grantPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grantPermission.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/grantPermission.ts"],"names":[],"mappings":";;AA+EA,0CAsDC;AApID,kEAA4D;AAC5D,sCAAoD;AACpD,+EAAgF;AAIhF,2DAAuD;AAwEhD,KAAK,UAAU,eAAe,CAGnC,MAAkE,EAClE,UAA2D;IAE3D,MAAM,EACJ,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,YAAY,EACZ,oBAAoB,EACpB,KAAK,EACL,KAAK,EAAE,MAAM,EACd,GAAG,UAAU,CAAA;IAEd,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,sCAAoB,CAAC;YAC7B,QAAQ,EAAE,0CAA0C;SACrD,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAwB,CAAA;IAC7D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,kBAAkB,GAAG,MAAM,IAAA,iBAAS,EACxC,MAAM,EACN,qCAAiB,EACjB,mBAAmB,CACpB,CAAC,UAAU,CAAC,CAAA;IAEb,MAAM,UAAU,GAAG,MAAM,IAAA,iBAAS,EAChC,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACpB,CAAC;QACA,KAAK,EAAE;YACL;gBAEE,EAAE,EAAE,kBAAkB,CAAC,MAAM,CAAC,MAAM;gBACpC,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,QAAQ;aACzC;YACD,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;SAClB;QACD,YAAY;QACZ,oBAAoB;QACpB,KAAK;QACL,OAAO;KACR,CAAC,CAAA;IAEF,OAAO;QACL,UAAU;QACV,GAAG,kBAAkB;KACtB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.smartSessionCreateActions = smartSessionCreateActions;
|
|
4
|
+
exports.smartSessionUseActions = smartSessionUseActions;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const grantPermission_1 = require("./grantPermission.js");
|
|
7
|
+
const revokeSession_1 = require("./revokeSession.js");
|
|
8
|
+
const preparePermission_1 = require("./preparePermission.js");
|
|
9
|
+
const usePermission_1 = require("./usePermission.js");
|
|
10
|
+
function smartSessionCreateActions(_) {
|
|
11
|
+
return (client) => {
|
|
12
|
+
return {
|
|
13
|
+
grantPermission: (args) => (0, grantPermission_1.grantPermission)(client, args),
|
|
14
|
+
preparePermission: (args) => (0, preparePermission_1.preparePermission)(client, args),
|
|
15
|
+
revokeSession: (args) => (0, revokeSession_1.revokeSession)(client, args)
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function smartSessionUseActions(smartSessionsModule) {
|
|
20
|
+
return (client) => {
|
|
21
|
+
client?.account?.setModule(smartSessionsModule);
|
|
22
|
+
return {
|
|
23
|
+
usePermission: (args) => (0, usePermission_1.usePermission)(client, args)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
tslib_1.__exportStar(require("./usePermission.js"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./grantPermission.js"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./revokeSession.js"), exports);
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/index.ts"],"names":[],"mappings":";;AA8FA,8DAUC;AAQD,wDAWC;;AAnHD,uDAG0B;AAC1B,mDAGwB;AACxB,2DAG4B;AAC5B,mDAA6E;AA0E7E,SAAgB,yBAAyB,CAAC,CAAS;IACjD,OAAO,CACL,MAAkE,EACjB,EAAE;QACnD,OAAO;YACL,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,iCAAe,EAAC,MAAM,EAAE,IAAI,CAAC;YACxD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,qCAAiB,EAAC,MAAM,EAAE,IAAI,CAAC;YAC5D,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,6BAAa,EAAC,MAAM,EAAE,IAAI,CAAC;SACrD,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAQD,SAAgB,sBAAsB,CACpC,mBAAuC;IAEvC,OAAO,CACL,MAAkE,EACpB,EAAE;QAChD,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAA;QAC/C,OAAO;YACL,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,6BAAa,EAAC,MAAM,EAAE,IAAI,CAAC;SACrD,CAAA;IACH,CAAC,CAAA;AACH,CAAC;AAED,0DAA+B;AAC/B,4DAAiC;AACjC,0DAA+B"}
|