@startale-scs/aa-sdk 0.0.1
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 +20 -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 +251 -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/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/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 +27 -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 +42 -0
- package/dist/_cjs/clients/createHttpClient.js.map +1 -0
- package/dist/_cjs/clients/createSCSBundlerClient.js +45 -0
- package/dist/_cjs/clients/createSCSBundlerClient.js.map +1 -0
- package/dist/_cjs/clients/createSCSPaymasterClient.js +39 -0
- package/dist/_cjs/clients/createSCSPaymasterClient.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js +34 -0
- package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/getUserOperationStatus.js +10 -0
- package/dist/_cjs/clients/decorators/bundler/getUserOperationStatus.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/index.js +15 -0
- package/dist/_cjs/clients/decorators/bundler/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js +27 -0
- package/dist/_cjs/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js +13 -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 +94 -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 +35 -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 +62 -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 +44 -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 +38 -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 +44 -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 +124 -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 +27 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js +127 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.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 +327 -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/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/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 +19 -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 +43 -0
- package/dist/_esm/clients/createHttpClient.js.map +1 -0
- package/dist/_esm/clients/createSCSBundlerClient.js +56 -0
- package/dist/_esm/clients/createSCSBundlerClient.js.map +1 -0
- package/dist/_esm/clients/createSCSPaymasterClient.js +74 -0
- package/dist/_esm/clients/createSCSPaymasterClient.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js +53 -0
- package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/getUserOperationStatus.js +8 -0
- package/dist/_esm/clients/decorators/bundler/getUserOperationStatus.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/index.js +11 -0
- package/dist/_esm/clients/decorators/bundler/index.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js +26 -0
- package/dist/_esm/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js +10 -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 +109 -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 +44 -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 +70 -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 +29 -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 +52 -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 +46 -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 +63 -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 +173 -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 +79 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js +40 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js +191 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.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 +110 -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/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/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 +19 -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 +71 -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/getUserOperationStatus.d.ts +17 -0
- package/dist/_types/clients/decorators/bundler/getUserOperationStatus.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/index.d.ts +61 -0
- package/dist/_types/clients/decorators/bundler/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.d.ts +8 -0
- package/dist/_types/clients/decorators/bundler/waitForConfirmedUserOperationReceipt.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 +51 -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 +88 -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 +16 -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 +110 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts +223 -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 +70 -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/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,40 @@
|
|
|
1
|
+
import type { Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { GetSmartAccountParameter } from "viem/account-abstraction";
|
|
3
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for retrieving the threshold of a modular smart account.
|
|
6
|
+
*
|
|
7
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
8
|
+
*/
|
|
9
|
+
export type GetThresholdParameters<TModularSmartAccount extends ModularSmartAccount | undefined> = GetSmartAccountParameter<TModularSmartAccount>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves the current approval threshold for a modular smart account.
|
|
12
|
+
*
|
|
13
|
+
* In the context of multi-signature wallets or modular smart accounts, the threshold
|
|
14
|
+
* represents the minimum number of approvals required to execute a transaction.
|
|
15
|
+
* This function queries the blockchain to fetch the current threshold value.
|
|
16
|
+
*
|
|
17
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
18
|
+
*
|
|
19
|
+
* @param client - The client instance used for blockchain interactions.
|
|
20
|
+
* @param parameters - Optional. Specifies the account to query. If omitted, the client's default account is used.
|
|
21
|
+
*
|
|
22
|
+
* @returns A Promise that resolves to the current threshold value as a number.
|
|
23
|
+
*
|
|
24
|
+
* @throws {AccountNotFoundError} If no account is specified and the client has no default account.
|
|
25
|
+
* @throws {Error} If the public client is not available or if there's an issue fetching the threshold.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const startaleClient = createSmartAccountClient({ ... });
|
|
30
|
+
* const threshold = await getThreshold(startaleClient);
|
|
31
|
+
* console.log(`Current approval threshold: ${threshold}`);
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* - Ensure the client is properly initialized and connected to the correct network.
|
|
36
|
+
* - The threshold value is specific to the queried account and may vary between different accounts.
|
|
37
|
+
* - This function is read-only and does not modify the blockchain state.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getThreshold<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters?: GetThresholdParameters<TModularSmartAccount>): Promise<number>;
|
|
40
|
+
//# sourceMappingURL=getThreshold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getThreshold.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/getThreshold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAgB,SAAS,EAAE,MAAM,MAAM,CAAA;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAIxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAChC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D,wBAAwB,CAAC,oBAAoB,CAAC,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,YAAY,CAChC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,CAAC,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,GACxD,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Address, Chain, Client, Hash, Hex, Transport } from "viem";
|
|
2
|
+
import type { Call } from "../../../../account/utils/Types";
|
|
3
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
import { type AddOwnerParameters, addOwner } from "./addOwner";
|
|
5
|
+
import { getAddOwnerTx } from "./getAddOwnerTx";
|
|
6
|
+
import { type GetOwnersParameters, getOwners } from "./getOwners";
|
|
7
|
+
import { type GetRemoveOwnerTxParameters, getRemoveOwnerTx } from "./getRemoveOwnerTx";
|
|
8
|
+
import { type GetSetThresholdTxParameters, getSetThresholdTx } from "./getSetThresholdTx";
|
|
9
|
+
import { type GetThresholdParameters, getThreshold } from "./getThreshold";
|
|
10
|
+
import { type MultiSignParameters, multiSign } from "./multiSign";
|
|
11
|
+
import { type PrepareForMultiSignParameters, type PrepareForMultiSignPayload, prepareForMultiSign } from "./prepareForMultiSign";
|
|
12
|
+
import { type RemoveOwnerParameters, removeOwner } from "./removeOwner";
|
|
13
|
+
import { type SetThresholdParameters, setThreshold } from "./setThreshold";
|
|
14
|
+
export type OwnableActions<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
15
|
+
getRemoveOwnerTx: (args: GetRemoveOwnerTxParameters<TModularSmartAccount>) => Promise<Call>;
|
|
16
|
+
addOwner: (args: AddOwnerParameters<TModularSmartAccount>) => Promise<Hash>;
|
|
17
|
+
removeOwner: (args: RemoveOwnerParameters<TModularSmartAccount>) => Promise<Hash>;
|
|
18
|
+
setThreshold: (args: SetThresholdParameters<TModularSmartAccount>) => Promise<Hash>;
|
|
19
|
+
getOwners: (args?: GetOwnersParameters<TModularSmartAccount>) => Promise<Address[]>;
|
|
20
|
+
getSetThresholdTx: (args: GetSetThresholdTxParameters<TModularSmartAccount>) => Promise<Call>;
|
|
21
|
+
getAddOwnerTx: (args: AddOwnerParameters<TModularSmartAccount>) => Promise<Call>;
|
|
22
|
+
getThreshold: (args?: GetThresholdParameters<TModularSmartAccount>) => Promise<number>;
|
|
23
|
+
multiSign: (args: MultiSignParameters<TModularSmartAccount>) => Promise<Hex>;
|
|
24
|
+
prepareForMultiSign: (args: PrepareForMultiSignParameters<TModularSmartAccount>) => Promise<PrepareForMultiSignPayload>;
|
|
25
|
+
};
|
|
26
|
+
export declare function ownableActions(): <TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>) => OwnableActions<TModularSmartAccount>;
|
|
27
|
+
export declare const ownableCalls: {
|
|
28
|
+
readonly toAddOwnerCalls: (account: ModularSmartAccount, parameters: import("./getAddOwnerTx").GetAddOwnerTxParameters<ModularSmartAccount | undefined>) => Promise<Call[]>;
|
|
29
|
+
readonly toSetThresholdCalls: (account: ModularSmartAccount, parameters: GetSetThresholdTxParameters<ModularSmartAccount | undefined>) => Promise<Call[]>;
|
|
30
|
+
readonly toRemoveOwnerCalls: (account: ModularSmartAccount, parameters: GetRemoveOwnerTxParameters<ModularSmartAccount | undefined>) => Promise<Call[]>;
|
|
31
|
+
};
|
|
32
|
+
export declare const ownableReads: {
|
|
33
|
+
readonly toGetOwnersReads: typeof getOwners;
|
|
34
|
+
readonly toGetThresholdReads: typeof getThreshold;
|
|
35
|
+
};
|
|
36
|
+
export { prepareForMultiSign, multiSign, addOwner, removeOwner, setThreshold, getOwners, getThreshold, getAddOwnerTx, getRemoveOwnerTx, getSetThresholdTx };
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,KAAK,kBAAkB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAmB,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,KAAK,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EACL,KAAK,0BAA0B,EAC/B,gBAAgB,EAEjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,KAAK,2BAA2B,EAChC,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,sBAAsB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC1E,OAAO,EAAE,KAAK,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,qBAAqB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAE,KAAK,sBAAsB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,MAAM,cAAc,CACxB,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF,gBAAgB,EAAE,CAChB,IAAI,EAAE,0BAA0B,CAAC,oBAAoB,CAAC,KACnD,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,WAAW,EAAE,CACX,IAAI,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,KAC9C,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,YAAY,EAAE,CACZ,IAAI,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,KAC/C,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,SAAS,EAAE,CACT,IAAI,CAAC,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,KAC7C,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IACvB,iBAAiB,EAAE,CACjB,IAAI,EAAE,2BAA2B,CAAC,oBAAoB,CAAC,KACpD,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,aAAa,EAAE,CACb,IAAI,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,KAC3C,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,YAAY,EAAE,CACZ,IAAI,CAAC,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,KAChD,OAAO,CAAC,MAAM,CAAC,CAAA;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC5E,mBAAmB,EAAE,CACnB,IAAI,EAAE,6BAA6B,CAAC,oBAAoB,CAAC,KACtD,OAAO,CAAC,0BAA0B,CAAC,CAAA;CACzC,CAAA;AAED,wBAAgB,cAAc,KACpB,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAClE,QAAQ,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,KACjE,cAAc,CAAC,oBAAoB,CAAC,CAkCxC;AAED,eAAO,MAAM,YAAY;;;;CAIf,CAAA;AAEV,eAAO,MAAM,YAAY;;;CAGf,CAAA;AAEV,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, Transport } from "viem";
|
|
2
|
+
import { type UserOperation } from "viem/account-abstraction";
|
|
3
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
export type MultiSignParameters<TModularSmartAccount> = {
|
|
5
|
+
signatures: Hex[];
|
|
6
|
+
userOp: UserOperation<"0.7", bigint>;
|
|
7
|
+
} & {
|
|
8
|
+
account?: TModularSmartAccount;
|
|
9
|
+
};
|
|
10
|
+
export declare function multiSign<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: MultiSignParameters<TModularSmartAccount>): Promise<Hex>;
|
|
11
|
+
//# sourceMappingURL=multiSign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiSign.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/multiSign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAgB,SAAS,EAAE,MAAM,MAAM,CAAA;AACvE,OAAO,EAAE,KAAK,aAAa,EAAqB,MAAM,0BAA0B,CAAA;AAIhF,OAAO,KAAK,EAAW,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAExE,MAAM,MAAM,mBAAmB,CAAC,oBAAoB,IAAI;IACtD,UAAU,EAAE,GAAG,EAAE,CAAA;IACjB,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;CACrC,GAAG;IACF,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,wBAAsB,SAAS,CAC7B,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,GACpD,OAAO,CAAC,GAAG,CAAC,CAoBd"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, Transport } from "viem";
|
|
2
|
+
import type { Call } from "../../../../account/utils/Types";
|
|
3
|
+
import type { AnyData, ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
export type PrepareForMultiSignParameters<TModularSmartAccount> = {
|
|
5
|
+
/** Verification gas limit. */
|
|
6
|
+
verificationGasLimit?: bigint;
|
|
7
|
+
/** Call gas limit. */
|
|
8
|
+
callGasLimit?: bigint;
|
|
9
|
+
/** Pre verification gas. */
|
|
10
|
+
preVerificationGas?: bigint;
|
|
11
|
+
/** The maximum fee per gas unit the transaction is willing to pay. */
|
|
12
|
+
maxFeePerGas?: bigint;
|
|
13
|
+
/** The maximum priority fee per gas unit the transaction is willing to pay. */
|
|
14
|
+
maxPriorityFeePerGas?: bigint;
|
|
15
|
+
/** The calls to be included in the user operation. */
|
|
16
|
+
calls: Call[];
|
|
17
|
+
} & {
|
|
18
|
+
account?: TModularSmartAccount;
|
|
19
|
+
};
|
|
20
|
+
export type PrepareForMultiSignPayload = {
|
|
21
|
+
userOpHash: Hex;
|
|
22
|
+
userOp: AnyData;
|
|
23
|
+
};
|
|
24
|
+
export declare function prepareForMultiSign<TModularSmartAccount extends ModularSmartAccount | undefined>(startaleAccountClient: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: PrepareForMultiSignParameters<TModularSmartAccount>): Promise<PrepareForMultiSignPayload>;
|
|
25
|
+
//# sourceMappingURL=prepareForMultiSign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareForMultiSign.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/prepareForMultiSign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAgB,SAAS,EAAE,MAAM,MAAM,CAAA;AAGvE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAExE,MAAM,MAAM,6BAA6B,CAAC,oBAAoB,IAAI;IAChE,8BAA8B;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,sBAAsB;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,4BAA4B;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+EAA+E;IAC/E,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,sDAAsD;IACtD,KAAK,EAAE,IAAI,EAAE,CAAA;CACd,GAAG;IACF,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,EAAE,GAAG,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,wBAAsB,mBAAmB,CACvC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,qBAAqB,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EACjF,UAAU,EAAE,6BAA6B,CAAC,oBAAoB,CAAC,GAC9D,OAAO,CAAC,0BAA0B,CAAC,CAuBrC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, Transport } from "viem";
|
|
2
|
+
import type { Call } from "../../../../account/utils/Types";
|
|
3
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for removing an owner from a smart account.
|
|
6
|
+
*
|
|
7
|
+
* @template TModularSmartAccount - Type of the smart account, extending SmartAccount or undefined.
|
|
8
|
+
*/
|
|
9
|
+
export type RemoveOwnerParameters<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
10
|
+
/** The smart account to remove the owner from. If not provided, the client's account will be used. */
|
|
11
|
+
account?: TModularSmartAccount;
|
|
12
|
+
/** The address of the owner to be removed. */
|
|
13
|
+
owner: Hex;
|
|
14
|
+
/** The maximum fee per gas unit the transaction is willing to pay. */
|
|
15
|
+
maxFeePerGas?: bigint;
|
|
16
|
+
/** The maximum priority fee per gas unit the transaction is willing to pay. */
|
|
17
|
+
maxPriorityFeePerGas?: bigint;
|
|
18
|
+
/** The nonce of the transaction. If not provided, it will be determined automatically. */
|
|
19
|
+
nonce?: bigint;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Removes an owner from a smart account.
|
|
23
|
+
*
|
|
24
|
+
* This function prepares and sends a user operation to remove an existing owner from the specified smart account.
|
|
25
|
+
* It handles the creation of the necessary action data and sends the user operation.
|
|
26
|
+
*
|
|
27
|
+
* @template TModularSmartAccount - Type of the smart account, extending SmartAccount or undefined.
|
|
28
|
+
* @param client - The client used to interact with the blockchain.
|
|
29
|
+
* @param parameters - The parameters for removing the owner.
|
|
30
|
+
* @returns A promise that resolves to the hash of the sent user operation.
|
|
31
|
+
*
|
|
32
|
+
* @throws {AccountNotFoundError} If no account is provide
|
|
33
|
+
* @throws {Error} If there's an error getting the remove owner action.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { removeOwner } from '@startale-scs/aa-sdk'
|
|
38
|
+
*
|
|
39
|
+
* const userOpHash = await removeOwner(startaleClient, {
|
|
40
|
+
* owner: '0x...'
|
|
41
|
+
* })
|
|
42
|
+
* console.log(userOpHash) // '0x...'
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function removeOwner<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: RemoveOwnerParameters<TModularSmartAccount>): Promise<Hex>;
|
|
46
|
+
export declare const toRemoveOwnerCalls: (account: ModularSmartAccount, parameters: RemoveOwnerParameters<ModularSmartAccount | undefined>) => Promise<Call[]>;
|
|
47
|
+
//# sourceMappingURL=removeOwner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeOwner.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/removeOwner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAIzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAK3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,CAC/B,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF,sGAAsG;IACtG,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,8CAA8C;IAC9C,KAAK,EAAE,GAAG,CAAA;IACV,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+EAA+E;IAC/E,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,WAAW,CAC/B,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,GACtD,OAAO,CAAC,GAAG,CAAC,CA4Bd;AAED,eAAO,MAAM,kBAAkB,GAC7B,SAAS,mBAAmB,EAC5B,YAAY,qBAAqB,CAAC,mBAAmB,GAAG,SAAS,CAAC,KACjE,OAAO,CAAC,IAAI,EAAE,CAkBhB,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, Transport } from "viem";
|
|
2
|
+
import type { Call } from "../../../../account/utils/Types";
|
|
3
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for setting the threshold of a modular smart account.
|
|
6
|
+
*
|
|
7
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
8
|
+
*/
|
|
9
|
+
export type SetThresholdParameters<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
10
|
+
/** The modular smart account to set the threshold for. If not provided, the client's account will be used. */
|
|
11
|
+
account?: TModularSmartAccount;
|
|
12
|
+
/** The new threshold value to set. Determines the number of required signatures for transactions. */
|
|
13
|
+
threshold: number;
|
|
14
|
+
/** The maximum fee per gas unit the transaction is willing to pay. */
|
|
15
|
+
maxFeePerGas?: bigint;
|
|
16
|
+
/** The maximum priority fee per gas unit the transaction is willing to pay. */
|
|
17
|
+
maxPriorityFeePerGas?: bigint;
|
|
18
|
+
/** The nonce of the transaction. If not provided, it will be determined automatically. */
|
|
19
|
+
nonce?: bigint;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Sets a new threshold for a modular smart account.
|
|
23
|
+
*
|
|
24
|
+
* This function prepares and sends a user operation to change the threshold of the specified modular smart account.
|
|
25
|
+
* The threshold determines how many owners need to approve a transaction before it can be executed.
|
|
26
|
+
*
|
|
27
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
28
|
+
* @param client - The client used to interact with the blockchain.
|
|
29
|
+
* @param parameters - The parameters for setting the new threshold.
|
|
30
|
+
* @returns A promise that resolves to the hash of the sent user operation.
|
|
31
|
+
*
|
|
32
|
+
* @throws {AccountNotFoundError} If no account is provided and the client doesn't have an associated account.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const startaleClient = createSmartAccountClient({ ... });
|
|
37
|
+
* const hash = await setThreshold(startaleClient, {
|
|
38
|
+
* threshold: 2,
|
|
39
|
+
* maxFeePerGas: 1000000000n
|
|
40
|
+
* });
|
|
41
|
+
* console.log(`Set threshold transaction hash: ${hash}`);
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* - Ensure that the new threshold is valid for the current number of owners in the account.
|
|
46
|
+
* - This operation will modify the state of the smart account on the blockchain.
|
|
47
|
+
* - The transaction may fail if the caller doesn't have the necessary permissions to change the threshold.
|
|
48
|
+
*/
|
|
49
|
+
export declare function setThreshold<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: SetThresholdParameters<TModularSmartAccount>): Promise<Hex>;
|
|
50
|
+
export declare const toSetThresholdCalls: (_: ModularSmartAccount, parameters: SetThresholdParameters<ModularSmartAccount | undefined>) => Promise<Call[]>;
|
|
51
|
+
//# sourceMappingURL=setThreshold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setThreshold.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/ownable/decorators/setThreshold.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAIzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAE3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAChC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF,8GAA8G;IAC9G,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,qGAAqG;IACrG,SAAS,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+EAA+E;IAC/E,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,YAAY,CAChC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,GACvD,OAAO,CAAC,GAAG,CAAC,CA6Bd;AAED,eAAO,MAAM,mBAAmB,GAC9B,GAAG,mBAAmB,EACtB,YAAY,sBAAsB,CAAC,mBAAmB,GAAG,SAAS,CAAC,KAClE,OAAO,CAAC,IAAI,EAAE,CAYhB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/ownable/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
import type { Signer } from "../../../account/utils/toSigner";
|
|
3
|
+
import { type Validator } from "../toValidator";
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for creating an Ownable module.
|
|
6
|
+
* Extends ModuleParameters but replaces 'accountAddress' with 'account'.
|
|
7
|
+
*/
|
|
8
|
+
type ToOwnableModuleParameters = {
|
|
9
|
+
/** The threshold number of signatures required for operations. */
|
|
10
|
+
threshold: number;
|
|
11
|
+
/** Array of owner addresses for the module. */
|
|
12
|
+
owners: Address[];
|
|
13
|
+
/** Signer of the module. */
|
|
14
|
+
signer: Signer;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Creates an Ownable module for a modular smart account.
|
|
18
|
+
*
|
|
19
|
+
* This function sets up an Ownable module with the specified parameters,
|
|
20
|
+
* including threshold and owners for the smart account.
|
|
21
|
+
*
|
|
22
|
+
* @param parameters - The parameters for creating the Ownable module.
|
|
23
|
+
* @returns A Module object representing the created Ownable module.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const ownableModule = toOwnableModule({
|
|
28
|
+
* account: mySmartAccount,
|
|
29
|
+
* signer: mySigner,
|
|
30
|
+
* moduleInitArgs: {
|
|
31
|
+
* threshold: 2,
|
|
32
|
+
* owners: ['0x123...', '0x456...']
|
|
33
|
+
* }
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* - If the module is already installed, it will use the existing threshold.
|
|
39
|
+
* - If not installed, it will use the threshold from the initialization parameters.
|
|
40
|
+
* - The function generates a mock signature based on the threshold.
|
|
41
|
+
*/
|
|
42
|
+
export declare const toOwnableModule: (parameters: ToOwnableModuleParameters) => Validator;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=toOwnableModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toOwnableModule.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/ownable/toOwnableModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAK7D,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAE5D;;;GAGG;AACH,KAAK,yBAAyB,GAAG;IAC/B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAA;IACjB,+CAA+C;IAC/C,MAAM,EAAE,OAAO,EAAE,CAAA;IACjB,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,yBAAyB,KACpC,SAUF,CAAA"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type Abi, type AbiFunction, type Address, type Hex, type PublicClient } from "viem";
|
|
2
|
+
import { type ActionData, type PolicyData } from "../../../constants";
|
|
3
|
+
import type { AnyData } from "../../utils/Types";
|
|
4
|
+
import type { ActionConfig, ActionPolicyInfo, CreateSessionDataParams, FullCreateSessionDataParams, ResolvedActionPolicyInfo, Rule } from "./Types";
|
|
5
|
+
export declare const MAX_RULES = 16;
|
|
6
|
+
export declare const DUMMY_SIGNATURE: Hex;
|
|
7
|
+
/**
|
|
8
|
+
* Generates a random salt as a hexadecimal string.
|
|
9
|
+
*
|
|
10
|
+
* @returns A 32-byte hexadecimal string prefixed with '0x'.
|
|
11
|
+
*/
|
|
12
|
+
export declare const generateSalt: () => Hex;
|
|
13
|
+
/**
|
|
14
|
+
* Creates an ActionConfig object from rules and a value limit.
|
|
15
|
+
*
|
|
16
|
+
* @param rules - An array of Rule objects.
|
|
17
|
+
* @param valueLimit - The maximum value allowed for the action.
|
|
18
|
+
* @returns An ActionConfig object.
|
|
19
|
+
*/
|
|
20
|
+
export declare const createActionConfig: (rules: Rule[], valueLimit?: bigint) => ActionConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Applies default values to a CreateSessionDataParams object.
|
|
23
|
+
*
|
|
24
|
+
* @param sessionInfo - The CreateSessionDataParams object to apply defaults to.
|
|
25
|
+
* @returns A FullCreateSessionDataParams object with default values applied.
|
|
26
|
+
*/
|
|
27
|
+
export declare const applyDefaults: (sessionInfo: CreateSessionDataParams) => FullCreateSessionDataParams;
|
|
28
|
+
/**
|
|
29
|
+
* Creates an ActionData object.
|
|
30
|
+
*
|
|
31
|
+
* @param contractAddress - The address of the contract.
|
|
32
|
+
* @param functionSelector - The function selector or AbiFunction.
|
|
33
|
+
* @param policies - An array of PolicyData objects.
|
|
34
|
+
* @returns An ActionData object.
|
|
35
|
+
*/
|
|
36
|
+
export declare const createActionData: (contractAddress: Address, functionSelector: string | AbiFunction, policies: PolicyData[]) => ActionData;
|
|
37
|
+
/**
|
|
38
|
+
* Converts an ActionConfig to a RawActionConfig.
|
|
39
|
+
*
|
|
40
|
+
* @param config - The ActionConfig to convert.
|
|
41
|
+
* @returns A RawActionConfig object.
|
|
42
|
+
*/
|
|
43
|
+
export declare const toActionConfig: (config: ActionConfig) => {
|
|
44
|
+
valueLimitPerUse: bigint;
|
|
45
|
+
paramRules: {
|
|
46
|
+
length: number;
|
|
47
|
+
rules: {
|
|
48
|
+
condition: import("./Types").ParamCondition;
|
|
49
|
+
offset: number;
|
|
50
|
+
isLimited: boolean;
|
|
51
|
+
ref: `0x${string}`;
|
|
52
|
+
usage: import("./Types").LimitUsage;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Stringifies an object, explicitly tagging BigInt values.
|
|
58
|
+
*
|
|
59
|
+
* @param obj - The object to be stringified.
|
|
60
|
+
* @returns A string representing the stringified object with tagged BigInts.
|
|
61
|
+
*/
|
|
62
|
+
export declare function stringify(obj: Record<string, AnyData>): string;
|
|
63
|
+
/**
|
|
64
|
+
* Parses a string representation back into an object, correctly handling tagged BigInt values.
|
|
65
|
+
*
|
|
66
|
+
* @param data - The string representing the stringified object.
|
|
67
|
+
* @returns The parsed object with BigInt values restored.
|
|
68
|
+
*/
|
|
69
|
+
export declare function parse(data: string): Record<string, AnyData>;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves the list of trusted attesters for a given account from the registry.
|
|
72
|
+
*
|
|
73
|
+
* This function queries the registry contract to find all attesters that are trusted
|
|
74
|
+
* by the specified account.
|
|
75
|
+
*
|
|
76
|
+
* @param params - The parameters object
|
|
77
|
+
* @param params.account - The account to check trusted attesters for
|
|
78
|
+
* @param params.client - The public client used to interact with the blockchain
|
|
79
|
+
* @returns A promise that resolves to an array of addresses representing the trusted attesters
|
|
80
|
+
* @throws Will log error and return empty array if registry query fails
|
|
81
|
+
*/
|
|
82
|
+
export declare const getTrustedAttesters: ({ accountAddress, client }: {
|
|
83
|
+
accountAddress: Address;
|
|
84
|
+
client: PublicClient;
|
|
85
|
+
}) => Promise<Address[]>;
|
|
86
|
+
/**
|
|
87
|
+
* Converts an ABI to a list of ActionPolicyInfo objects.
|
|
88
|
+
*
|
|
89
|
+
* @param params - The parameters object
|
|
90
|
+
* @param params.abi - The ABI to convert
|
|
91
|
+
* @param params.actionPolicyInfo - The ActionPolicyInfo object to apply to each function in the ABI
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* const actionPoliciesInfo = abiToPoliciesInfo({
|
|
95
|
+
* abi: CounterAbi,
|
|
96
|
+
* actionPolicyInfo: {
|
|
97
|
+
* contractAddress: testAddresses.Counter,
|
|
98
|
+
* sudo: false,
|
|
99
|
+
* tokenLimits: [],
|
|
100
|
+
* usageLimit: 1000n,
|
|
101
|
+
* valueLimit: 1000n
|
|
102
|
+
* }
|
|
103
|
+
* })
|
|
104
|
+
* @returns An array of ActionPolicyInfo objects
|
|
105
|
+
*/
|
|
106
|
+
export type AbiToPoliciesInfoParams = Omit<ActionPolicyInfo, "functionSelector" | "rules"> & {
|
|
107
|
+
abi: Abi;
|
|
108
|
+
};
|
|
109
|
+
export declare const abiToPoliciesInfo: ({ abi, ...actionPolicyInfo }: AbiToPoliciesInfoParams) => ResolvedActionPolicyInfo[];
|
|
110
|
+
//# sourceMappingURL=Helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Helpers.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/Helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,YAAY,EAKlB,MAAM,MAAM,CAAA;AACb,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,IAAI,EACL,MAAM,SAAS,CAAA;AAGhB,eAAO,MAAM,SAAS,KAAK,CAAA;AAE3B,eAAO,MAAM,eAAe,EAAE,GACwG,CAAA;AAEtI;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAO,GAM/B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,IAAI,EAAE,EACb,mBAAe,KACd,YAMD,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,aAAa,uBAAuB,KACnC,2BAmBF,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC3B,iBAAiB,OAAO,EACxB,kBAAkB,MAAM,GAAG,WAAW,EACtC,UAAU,UAAU,EAAE,KACrB,UAQF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,YAAY;;;;;;;;;;;;CAkClD,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAM9D;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAO3D;AAMD;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,mBAAmB,GAAU,4BAGvC;IACD,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,YAAY,CAAA;CACrB,KAAG,OAAO,CAAC,OAAO,EAAE,CAcpB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,gBAAgB,EAChB,kBAAkB,GAAG,OAAO,CAC7B,GAAG;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,CAAA;AAEhB,eAAO,MAAM,iBAAiB,GAAI,8BAG/B,uBAAuB,KAAG,wBAAwB,EAO9C,CAAA"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import type { Abi, AbiFunction, Address, Hex, OneOf } from "viem";
|
|
2
|
+
import type { EnableSessionData, Session, SmartSessionMode } from "../../../constants";
|
|
3
|
+
import type { AnyReferenceValue } from "../../utils/Helpers";
|
|
4
|
+
import type { Execution } from "../../utils/Types";
|
|
5
|
+
/**
|
|
6
|
+
* Represents the data structure for a smart session.
|
|
7
|
+
* Smart sessions allow for delegated and controlled access to a user's account.
|
|
8
|
+
*
|
|
9
|
+
* @property granter - The address of the account granting the session permissions.
|
|
10
|
+
* @property sessionPublicKey - The public key used to verify session signatures.
|
|
11
|
+
* @property moduleData - Module-specific data for the session.
|
|
12
|
+
* @property sessionPrivateKey - Optional. The private key for signing session transactions.
|
|
13
|
+
*/
|
|
14
|
+
export type SessionData = {
|
|
15
|
+
/** Hex-encoded address of the account granting the session. */
|
|
16
|
+
granter: Hex;
|
|
17
|
+
/** Hex-encoded public key for the session. Used for signature verification. */
|
|
18
|
+
sessionPublicKey: Hex;
|
|
19
|
+
/** Module-specific data containing session configuration and permissions. */
|
|
20
|
+
moduleData: UsePermissionModuleData;
|
|
21
|
+
/** Description of the session. Useful for keeping humancontext about the session. */
|
|
22
|
+
description?: string;
|
|
23
|
+
};
|
|
24
|
+
export type PreparePermissionResponse = {
|
|
25
|
+
/** Array of permission IDs for the created sessions. */
|
|
26
|
+
permissionIds: Hex[];
|
|
27
|
+
/** The execution object for the action. */
|
|
28
|
+
action: Execution;
|
|
29
|
+
/** The sessions that were created. */
|
|
30
|
+
sessions: Session[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Represents the response for creating sessions.
|
|
34
|
+
*/
|
|
35
|
+
export type GrantPermissionResponse = {
|
|
36
|
+
/** The hash of the user operation. */
|
|
37
|
+
userOpHash: Hex;
|
|
38
|
+
} & PreparePermissionResponse;
|
|
39
|
+
/**
|
|
40
|
+
* Represents the possible modes for a smart session.
|
|
41
|
+
*/
|
|
42
|
+
export type SmartSessionModeType = (typeof SmartSessionMode)[keyof typeof SmartSessionMode];
|
|
43
|
+
/**
|
|
44
|
+
* Represents the data structure for using a session module.
|
|
45
|
+
*/
|
|
46
|
+
export type UsePermissionModuleData = {
|
|
47
|
+
/** The mode of the smart session. */
|
|
48
|
+
mode?: SmartSessionModeType;
|
|
49
|
+
/** Data for enabling the session. */
|
|
50
|
+
enableSessionData?: EnableSessionData;
|
|
51
|
+
/** The index of the permission ID to use for the session. Defaults to 0. */
|
|
52
|
+
permissionIdIndex?: number;
|
|
53
|
+
} & PreparePermissionResponse;
|
|
54
|
+
type OptionalSessionKeyData = OneOf<{
|
|
55
|
+
/** Public key for the session. Required for K1 algorithm validators. */
|
|
56
|
+
sessionPublicKey: Hex;
|
|
57
|
+
} | {
|
|
58
|
+
/** Data for the session key. */
|
|
59
|
+
sessionKeyData: Hex;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Parameters for creating a session.
|
|
63
|
+
*/
|
|
64
|
+
export type CreateSessionDataParams = OptionalSessionKeyData & {
|
|
65
|
+
/** Public key for the session. Required for K1 algorithm validators. */
|
|
66
|
+
sessionPublicKey?: Hex;
|
|
67
|
+
/** Address of the session validator. */
|
|
68
|
+
sessionValidator?: Address;
|
|
69
|
+
/** Data for the session validator. */
|
|
70
|
+
sessionValidatorInitData?: Hex;
|
|
71
|
+
/** Optional salt for the session. */
|
|
72
|
+
salt?: Hex;
|
|
73
|
+
/** Timestamp until which the session is valid. */
|
|
74
|
+
sessionValidUntil?: number;
|
|
75
|
+
/** Timestamp after which the session becomes valid. */
|
|
76
|
+
sessionValidAfter?: number;
|
|
77
|
+
/** Chain IDs where the session should be enabled. Useful for enable mode. */
|
|
78
|
+
chainIds?: bigint[];
|
|
79
|
+
/** Array of action policy data for the session. */
|
|
80
|
+
actionPoliciesInfo: ActionPolicyInfo[];
|
|
81
|
+
};
|
|
82
|
+
export type FullCreateSessionDataParams = {
|
|
83
|
+
/** Public key for the session. Required for K1 algorithm validators. */
|
|
84
|
+
sessionPublicKey: Hex;
|
|
85
|
+
/** Address of the session validator. */
|
|
86
|
+
sessionValidator?: Address;
|
|
87
|
+
/** Data for the session validator. */
|
|
88
|
+
sessionValidatorInitData?: Hex;
|
|
89
|
+
/** Data for the session key. */
|
|
90
|
+
sessionKeyData: Hex;
|
|
91
|
+
/** Optional salt for the session. */
|
|
92
|
+
salt?: Hex;
|
|
93
|
+
/** Timestamp until which the session is valid. */
|
|
94
|
+
sessionValidUntil: number;
|
|
95
|
+
/** Timestamp after which the session becomes valid. */
|
|
96
|
+
sessionValidAfter: number;
|
|
97
|
+
/** Chain IDs where the session should be enabled. Useful for enable mode. */
|
|
98
|
+
chainIds?: bigint[];
|
|
99
|
+
/** Array of action policy data for the session. */
|
|
100
|
+
actionPoliciesInfo: ActionPolicyInfo[];
|
|
101
|
+
};
|
|
102
|
+
export type SpendingLimitPolicyData = {
|
|
103
|
+
/** The address of the token to be included in the policy */
|
|
104
|
+
token: Address;
|
|
105
|
+
/** The limit for the token */
|
|
106
|
+
limit: bigint;
|
|
107
|
+
};
|
|
108
|
+
export type SudoPolicyData = {
|
|
109
|
+
/** The address of the contract to be included in the policy */
|
|
110
|
+
contractAddress: Hex;
|
|
111
|
+
/** The specific function selector from the contract to be included in the policy */
|
|
112
|
+
functionSelector: string | AbiFunction;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Represents the data structure for an action policy.
|
|
116
|
+
*
|
|
117
|
+
* Get the universal action policy to use when creating a new session.
|
|
118
|
+
* The universal action policy can be used to ensure that only actions where the calldata has certain parameters can be used.
|
|
119
|
+
* For example, it could restrict swaps on Uniswap to be only under X amount of input token.
|
|
120
|
+
*/
|
|
121
|
+
export type ActionPolicyInfo = {
|
|
122
|
+
/** The address of the contract to be included in the policy */
|
|
123
|
+
contractAddress: Hex;
|
|
124
|
+
/** The timeframe policy can be used to restrict a session to only be able to be used within a certain timeframe */
|
|
125
|
+
validUntil?: number;
|
|
126
|
+
/** Timestamp after which the policy becomes valid */
|
|
127
|
+
validAfter?: number;
|
|
128
|
+
/** The value limit policy can be used to enforce that only a certain amount of native value can be spent. For ERC-20 limits, use the spending limit policy */
|
|
129
|
+
valueLimit?: bigint;
|
|
130
|
+
/** The spending limits policy can be used to ensure that only a certain amount of ERC-20 tokens can be spent. For native value spends, use the value limit policy */
|
|
131
|
+
tokenLimits?: SpendingLimitPolicyData[];
|
|
132
|
+
/** The value limit policy can be used to enforce that only a certain amount of native value can be spent. For ERC-20 limits, use the spending limit policy. */
|
|
133
|
+
usageLimit?: bigint;
|
|
134
|
+
/** The sudo policy is an action policy that will allow any action for the specified target and selector. */
|
|
135
|
+
sudo?: boolean;
|
|
136
|
+
} & OneOf<{
|
|
137
|
+
/** The specific function selector from the contract to be included in the policy */
|
|
138
|
+
functionSelector: string | AbiFunction;
|
|
139
|
+
/** Array of rules for the policy */
|
|
140
|
+
rules?: Rule[];
|
|
141
|
+
} | {
|
|
142
|
+
/** The ABI of the contract to be included in the policy */
|
|
143
|
+
abi: Abi;
|
|
144
|
+
}>;
|
|
145
|
+
export type ResolvedActionPolicyInfo = ActionPolicyInfo & {
|
|
146
|
+
functionSelector: string | AbiFunction;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Enum representing different parameter conditions for rules.
|
|
150
|
+
*/
|
|
151
|
+
export declare enum ParamCondition {
|
|
152
|
+
EQUAL = 0,
|
|
153
|
+
GREATER_THAN = 1,
|
|
154
|
+
LESS_THAN = 2,
|
|
155
|
+
GREATER_THAN_OR_EQUAL = 3,
|
|
156
|
+
LESS_THAN_OR_EQUAL = 4,
|
|
157
|
+
NOT_EQUAL = 5
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Represents a rule for action policies.
|
|
161
|
+
*/
|
|
162
|
+
export type Rule = {
|
|
163
|
+
/** The condition to apply to the parameter */
|
|
164
|
+
condition: ParamCondition;
|
|
165
|
+
/** The offset index in the calldata where the value to be checked is located */
|
|
166
|
+
offsetIndex: number;
|
|
167
|
+
/** Indicates if the rule has a usage limit */
|
|
168
|
+
isLimited: boolean;
|
|
169
|
+
/** The reference value to compare against */
|
|
170
|
+
ref: AnyReferenceValue;
|
|
171
|
+
/** The usage object containing limit and used values (required if isLimited is true) */
|
|
172
|
+
usage: LimitUsage;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Represents a raw parameter rule.
|
|
176
|
+
*/
|
|
177
|
+
export type RawParamRule = {
|
|
178
|
+
condition: ParamCondition;
|
|
179
|
+
offset: number;
|
|
180
|
+
isLimited: boolean;
|
|
181
|
+
ref: Hex;
|
|
182
|
+
usage: LimitUsage;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Represents a set of raw parameter rules.
|
|
186
|
+
*/
|
|
187
|
+
export type RawParamRules = {
|
|
188
|
+
length: number;
|
|
189
|
+
rules: RawParamRule[];
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Represents the usage limit for a rule.
|
|
193
|
+
*/
|
|
194
|
+
export type LimitUsage = {
|
|
195
|
+
limit: bigint;
|
|
196
|
+
used: bigint;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Represents the configuration for an action.
|
|
200
|
+
*/
|
|
201
|
+
export type ActionConfig = {
|
|
202
|
+
valueLimitPerUse: bigint;
|
|
203
|
+
paramRules: {
|
|
204
|
+
length: number;
|
|
205
|
+
rules: Rule[];
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Represents the raw configuration for an action.
|
|
210
|
+
*/
|
|
211
|
+
export type RawActionConfig = {
|
|
212
|
+
valueLimitPerUse: bigint;
|
|
213
|
+
paramRules: RawParamRules;
|
|
214
|
+
};
|
|
215
|
+
/**
|
|
216
|
+
* Represents the parameters for spending limits.
|
|
217
|
+
*/
|
|
218
|
+
export type SpendingLimitsParams = {
|
|
219
|
+
token: Address;
|
|
220
|
+
limit: bigint;
|
|
221
|
+
}[];
|
|
222
|
+
export {};
|
|
223
|
+
//# sourceMappingURL=Types.d.ts.map
|