@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 @@
|
|
|
1
|
+
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/Types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, PublicClient, Transport } from "viem";
|
|
2
|
+
import type { Call } from "../../../../account/utils/Types";
|
|
3
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
4
|
+
import type { CreateSessionDataParams, GrantPermissionResponse } from "../Types";
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for creating sessions in a modular smart account.
|
|
7
|
+
*
|
|
8
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
9
|
+
*/
|
|
10
|
+
export type GrantPermissionParameters<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
11
|
+
/** Array of session data parameters for creating multiple sessions. */
|
|
12
|
+
sessionRequestedInfo: CreateSessionDataParams[];
|
|
13
|
+
/** The maximum fee per gas unit the transaction is willing to pay. */
|
|
14
|
+
maxFeePerGas?: bigint;
|
|
15
|
+
/** The maximum priority fee per gas unit the transaction is willing to pay. */
|
|
16
|
+
maxPriorityFeePerGas?: bigint;
|
|
17
|
+
/** The nonce of the transaction. If not provided, it will be determined automatically. */
|
|
18
|
+
nonce?: bigint;
|
|
19
|
+
/** Optional public client for blockchain interactions. */
|
|
20
|
+
publicClient?: PublicClient;
|
|
21
|
+
/** The modular smart account to create sessions for. If not provided, the client's account will be used. */
|
|
22
|
+
account?: TModularSmartAccount;
|
|
23
|
+
/** Optional attesters to trust. */
|
|
24
|
+
attesters?: Hex[];
|
|
25
|
+
/** Additional calls to be included in the user operation. */
|
|
26
|
+
calls?: Call[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Adds multiple sessions to the SmartSessionValidator module of a given smart account.
|
|
30
|
+
*
|
|
31
|
+
* This function prepares and sends a user operation to create multiple sessions
|
|
32
|
+
* for the specified modular smart account. Each session can have its own policies
|
|
33
|
+
* and permissions.
|
|
34
|
+
*
|
|
35
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
36
|
+
* @param client - The client used to interact with the blockchain.
|
|
37
|
+
* @param parameters - Parameters including the smart account, required session specific policies info, and optional gas settings.
|
|
38
|
+
* @returns A promise that resolves to an object containing the user operation hash and an array of permission IDs.
|
|
39
|
+
*
|
|
40
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
41
|
+
* @throws {Error} If there's an error getting the enable sessions action.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* import { grantPermission } from '@startale-scs/aa-sdk'
|
|
46
|
+
*
|
|
47
|
+
* const result = await grantPermission(startaleClient, {
|
|
48
|
+
* sessionRequestedInfo: [
|
|
49
|
+
* {
|
|
50
|
+
* sessionKeyData: '0x...',
|
|
51
|
+
* actionPoliciesInfo: [
|
|
52
|
+
* {
|
|
53
|
+
* contractAddress: '0x...',
|
|
54
|
+
* functionSelector: '0x...',
|
|
55
|
+
* rules: [...],
|
|
56
|
+
* valueLimit: 1000000000000000000n
|
|
57
|
+
* }
|
|
58
|
+
* ],
|
|
59
|
+
* sessionValidUntil: 1234567890
|
|
60
|
+
* }
|
|
61
|
+
* ]
|
|
62
|
+
* });
|
|
63
|
+
* console.log(result.userOpHash); // '0x...'
|
|
64
|
+
* console.log(result.permissionIds); // ['0x...', '0x...']
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* - Ensure that the client has sufficient gas to cover the transaction.
|
|
69
|
+
* - The number of sessions created is determined by the length of the `sessionRequestedInfo` array.
|
|
70
|
+
* - Each session's policies and permissions are determined by the `actionPoliciesInfo` provided.
|
|
71
|
+
*/
|
|
72
|
+
export declare function grantPermission<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: GrantPermissionParameters<TModularSmartAccount>): Promise<GrantPermissionResponse>;
|
|
73
|
+
//# sourceMappingURL=grantPermission.d.ts.map
|
package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grantPermission.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/grantPermission.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAIvE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAGhF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,CACnC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF,uEAAuE;IACvE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA;IAC/C,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;IACd,0DAA0D;IAC1D,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,4GAA4G;IAC5G,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,mCAAmC;IACnC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAA;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,eAAe,CACnC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,GAC1D,OAAO,CAAC,uBAAuB,CAAC,CAgDlC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Chain, Client, Hash, Transport } from "viem";
|
|
2
|
+
import type { ModularSmartAccount, Module } from "../../../utils/Types";
|
|
3
|
+
import type { GrantPermissionResponse, PreparePermissionResponse } from "../Types";
|
|
4
|
+
import type { SmartSessionModule } from "../toSmartSessionsValidator";
|
|
5
|
+
import { type GrantPermissionParameters } from "./grantPermission";
|
|
6
|
+
import { type PreparePermissionParameters } from "./preparePermission";
|
|
7
|
+
import { type UsePermissionParameters } from "./usePermission";
|
|
8
|
+
/**
|
|
9
|
+
* Defines the shape of actions available for creating smart sessions.
|
|
10
|
+
*
|
|
11
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
12
|
+
*/
|
|
13
|
+
export type SmartSessionCreateActions<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
14
|
+
/**
|
|
15
|
+
* Creates multiple sessions for a modular smart account.
|
|
16
|
+
* This differs from grantPermission in that it defers the moment that the permission is granted
|
|
17
|
+
* on chain to the moment that the redemption user operation is sent/redeemed. It is also known as "ENABLE_MODE".
|
|
18
|
+
* It is the default mode for the grantDeferredPermission function.
|
|
19
|
+
*
|
|
20
|
+
* @param args - Parameters for creating sessions.
|
|
21
|
+
* @returns A promise that resolves to the creation response.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Creates multiple sessions for a modular smart account. This differs from grantDeferredPermission in that it
|
|
25
|
+
* grants the permission on chain immediately. It is also known as "USE_MODE", and it means that the permission
|
|
26
|
+
* is granted on chain immediately, and the permission is later redeemed when the user operation is sent.
|
|
27
|
+
*
|
|
28
|
+
* @param args - Parameters for creating sessions.
|
|
29
|
+
* @returns A promise that resolves to the creation response.
|
|
30
|
+
*/
|
|
31
|
+
grantPermission: (args: GrantPermissionParameters<TModularSmartAccount>) => Promise<GrantPermissionResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Prepares permission for a modular smart account.
|
|
34
|
+
*
|
|
35
|
+
* @param args - Parameters for preparing permission.
|
|
36
|
+
* @returns A promise that resolves to the transaction hash.
|
|
37
|
+
*/
|
|
38
|
+
preparePermission: (args: PreparePermissionParameters<TModularSmartAccount>) => Promise<PreparePermissionResponse>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Defines the shape of actions available for using smart sessions.
|
|
42
|
+
*
|
|
43
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
44
|
+
*/
|
|
45
|
+
export type SmartSessionUseActions<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
46
|
+
/**
|
|
47
|
+
* Uses a session to perform an action.
|
|
48
|
+
*
|
|
49
|
+
* @param args - Parameters for using a session.
|
|
50
|
+
* @returns A promise that resolves to the transaction hash.
|
|
51
|
+
*/
|
|
52
|
+
usePermission: (args: UsePermissionParameters<TModularSmartAccount>) => Promise<Hash>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Creates actions for managing smart session creation.
|
|
56
|
+
*
|
|
57
|
+
* @param _ - Unused parameter (placeholder for potential future use).
|
|
58
|
+
* @returns A function that takes a client and returns SmartSessionCreateActions.
|
|
59
|
+
*/
|
|
60
|
+
export declare function smartSessionCreateActions(_: Module): <TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>) => SmartSessionCreateActions<TModularSmartAccount>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates actions for using smart sessions.
|
|
63
|
+
*
|
|
64
|
+
* @param smartSessionsModule - The smart sessions module to be set on the client's account.
|
|
65
|
+
* @returns A function that takes a client and returns SmartSessionUseActions.
|
|
66
|
+
*/
|
|
67
|
+
export declare function smartSessionUseActions(smartSessionsModule: SmartSessionModule): <TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>) => SmartSessionUseActions<TModularSmartAccount>;
|
|
68
|
+
export * from "./usePermission";
|
|
69
|
+
export * from "./grantPermission";
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAKrE,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,KAAK,uBAAuB,EAAiB,MAAM,iBAAiB,CAAA;AAC7E;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,CACnC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF;;;;;;;;OAQG;IAIH;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,IAAI,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,KAClD,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACrC;;;;;OAKG;IACH,iBAAiB,EAAE,CACjB,IAAI,EAAE,2BAA2B,CAAC,oBAAoB,CAAC,KACpD,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACxC,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAChC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF;;;;;OAKG;IACH,aAAa,EAAE,CACb,IAAI,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,KAChD,OAAO,CAAC,IAAI,CAAC,CAAA;CACnB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,MAAM,IACzC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAClE,QAAQ,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,KACjE,yBAAyB,CAAC,oBAAoB,CAAC,CAOnD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,mBAAmB,EAAE,kBAAkB,IAE/B,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAClE,QAAQ,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,KACjE,sBAAsB,CAAC,oBAAoB,CAAC,CAMhD;AAED,cAAc,iBAAiB,CAAA;AAE/B,cAAc,mBAAmB,CAAA"}
|
package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { Chain, Client, PublicClient, Transport } from "viem";
|
|
2
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
3
|
+
import type { CreateSessionDataParams, FullCreateSessionDataParams, PreparePermissionResponse } from "../Types";
|
|
4
|
+
export declare const ONE_YEAR_FROM_NOW_IN_SECONDS: number;
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for creating sessions in a modular smart account.
|
|
7
|
+
*
|
|
8
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
9
|
+
*/
|
|
10
|
+
export type PreparePermissionParameters<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
11
|
+
/** Array of session data parameters for creating multiple sessions. */
|
|
12
|
+
sessionRequestedInfo: CreateSessionDataParams[];
|
|
13
|
+
/** The maximum fee per gas unit the transaction is willing to pay. */
|
|
14
|
+
maxFeePerGas?: bigint;
|
|
15
|
+
/** The maximum priority fee per gas unit the transaction is willing to pay. */
|
|
16
|
+
maxPriorityFeePerGas?: bigint;
|
|
17
|
+
/** The nonce of the transaction. If not provided, it will be determined automatically. */
|
|
18
|
+
nonce?: bigint;
|
|
19
|
+
/** Optional public client for blockchain interactions. */
|
|
20
|
+
publicClient?: PublicClient;
|
|
21
|
+
/** The modular smart account to create sessions for. If not provided, the client's account will be used. */
|
|
22
|
+
account?: TModularSmartAccount;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Generates the action data for creating sessions in the SmartSessionValidator.
|
|
26
|
+
*
|
|
27
|
+
* @param sessionRequestedInfo - Array of session data parameters.
|
|
28
|
+
* @param client - The public client for blockchain interactions.
|
|
29
|
+
* @returns A promise that resolves to the action data and permission IDs, or an Error.
|
|
30
|
+
*/
|
|
31
|
+
export declare const getPermissionAction: ({ chainId, sessionRequestedInfo, withPaymaster }: {
|
|
32
|
+
chainId: number;
|
|
33
|
+
sessionRequestedInfo: FullCreateSessionDataParams[];
|
|
34
|
+
withPaymaster: boolean;
|
|
35
|
+
}) => Promise<PreparePermissionResponse | Error>;
|
|
36
|
+
/**
|
|
37
|
+
* Adds multiple sessions to the SmartSessionValidator module of a given smart account.
|
|
38
|
+
*
|
|
39
|
+
* This function prepares and sends a user operation to create multiple sessions
|
|
40
|
+
* for the specified modular smart account. Each session can have its own policies
|
|
41
|
+
* and permissions.
|
|
42
|
+
*
|
|
43
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
44
|
+
* @param client - The client used to interact with the blockchain.
|
|
45
|
+
* @param parameters - Parameters including the smart account, required session specific policies info, and optional gas settings.
|
|
46
|
+
* @returns A promise that resolves to an object containing the user operation hash and an array of permission IDs.
|
|
47
|
+
*
|
|
48
|
+
* @throws {AccountNotFoundError} If the account is not found.
|
|
49
|
+
* @throws {Error} If there's an error getting the enable sessions action.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* import { preparePermission } from '@startale-scs/aa-sdk'
|
|
54
|
+
*
|
|
55
|
+
* const result = await preparePermission(startaleClient, {
|
|
56
|
+
* sessionRequestedInfo: [
|
|
57
|
+
* {
|
|
58
|
+
* sessionKeyData: '0x...',
|
|
59
|
+
* actionPoliciesInfo: [
|
|
60
|
+
* {
|
|
61
|
+
* contractAddress: '0x...',
|
|
62
|
+
* functionSelector: '0x...',
|
|
63
|
+
* rules: [...],
|
|
64
|
+
* valueLimit: 1000000000000000000n
|
|
65
|
+
* }
|
|
66
|
+
* ],
|
|
67
|
+
* sessionValidUntil: 1234567890
|
|
68
|
+
* }
|
|
69
|
+
* ]
|
|
70
|
+
* });
|
|
71
|
+
* console.log(result.userOpHash); // '0x...'
|
|
72
|
+
* console.log(result.permissionIds); // ['0x...', '0x...']
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* - Ensure that the client has sufficient gas to cover the transaction.
|
|
77
|
+
* - The number of sessions created is determined by the length of the `sessionRequestedInfo` array.
|
|
78
|
+
* - Each session's policies and permissions are determined by the `actionPoliciesInfo` provided.
|
|
79
|
+
*/
|
|
80
|
+
export declare function preparePermission<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: PreparePermissionParameters<TModularSmartAccount>): Promise<PreparePermissionResponse>;
|
|
81
|
+
//# sourceMappingURL=preparePermission.d.ts.map
|
package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preparePermission.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/preparePermission.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAO,YAAY,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAiBvE,OAAO,KAAK,EAAW,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AASxE,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,EAE1B,MAAM,UAAU,CAAA;AAEjB,eAAO,MAAM,4BAA4B,QAAkC,CAAA;AAE3E;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,CACrC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF,uEAAuE;IACvE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA;IAC/C,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;IACd,0DAA0D;IAC1D,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,4GAA4G;IAC5G,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAU,kDAIvC;IACD,OAAO,EAAE,MAAM,CAAA;IACf,oBAAoB,EAAE,2BAA2B,EAAE,CAAA;IACnD,aAAa,EAAE,OAAO,CAAA;CACvB,KAAG,OAAO,CAAC,yBAAyB,GAAG,KAAK,CAyI5C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,iBAAiB,CACrC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,EAAE,2BAA2B,CAAC,oBAAoB,CAAC,GAC5D,OAAO,CAAC,yBAAyB,CAAC,CAsCpC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, Transport } from "viem";
|
|
2
|
+
import type { Call } from "../../../../account/utils/Types";
|
|
3
|
+
import type { Signer } from "../../../../account/utils/toSigner";
|
|
4
|
+
import type { ModularSmartAccount } from "../../../utils/Types";
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for using a smart session to execute actions.
|
|
7
|
+
*
|
|
8
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
9
|
+
*/
|
|
10
|
+
export type UsePermissionParameters<TModularSmartAccount extends ModularSmartAccount | undefined> = {
|
|
11
|
+
/** Array of executions to perform in the session. Allows for batch transactions if the session is enabled for multiple actions. */
|
|
12
|
+
calls: Call[];
|
|
13
|
+
/** The maximum fee per gas unit the transaction is willing to pay. */
|
|
14
|
+
maxFeePerGas?: bigint;
|
|
15
|
+
/** The maximum priority fee per gas unit the transaction is willing to pay. */
|
|
16
|
+
maxPriorityFeePerGas?: bigint;
|
|
17
|
+
/** The nonce of the transaction. If not provided, it will be determined automatically. */
|
|
18
|
+
nonce?: bigint;
|
|
19
|
+
/** The modular smart account to use for the session. If not provided, the client's account will be used. */
|
|
20
|
+
account?: TModularSmartAccount;
|
|
21
|
+
/** The signer to use for the session. Defaults to the signer of the client. */
|
|
22
|
+
signer?: Signer;
|
|
23
|
+
/** The gas limit for the pre-verification phase. */
|
|
24
|
+
preVerificationGas?: bigint;
|
|
25
|
+
/** The gas limit for the verification phase. */
|
|
26
|
+
verificationGasLimit?: bigint;
|
|
27
|
+
/** The gas limit for the call phase. */
|
|
28
|
+
callGasLimit?: bigint;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Executes actions using a smart session.
|
|
32
|
+
*
|
|
33
|
+
* This function allows for the execution of one or more actions within an enabled smart session.
|
|
34
|
+
* It can handle batch transactions if the session is configured for multiple actions.
|
|
35
|
+
*
|
|
36
|
+
* @template TModularSmartAccount - Type of the modular smart account, extending ModularSmartAccount or undefined.
|
|
37
|
+
* @param client - The client used to interact with the blockchain.
|
|
38
|
+
* @param parameters - Parameters for using the session, including actions to execute and optional gas settings.
|
|
39
|
+
* @returns A promise that resolves to the hash of the sent user operation.
|
|
40
|
+
*
|
|
41
|
+
* @throws {AccountNotFoundError} If no account is provided and the client doesn't have an associated account.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const result = await usePermission(startaleClient, {
|
|
46
|
+
* calls: [
|
|
47
|
+
* {
|
|
48
|
+
* to: '0x1234...',
|
|
49
|
+
* data: '0xabcdef...'
|
|
50
|
+
* }
|
|
51
|
+
* ],
|
|
52
|
+
* maxFeePerGas: 1000000000n
|
|
53
|
+
* });
|
|
54
|
+
* console.log(`Transaction hash: ${result}`);
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* - Ensure that the session is enabled and has the necessary permissions for the actions being executed.
|
|
59
|
+
* - For batch transactions, all actions must be permitted within the same session.
|
|
60
|
+
* - The function uses the `sendUserOperation` method, which is specific to account abstraction implementations.
|
|
61
|
+
*/
|
|
62
|
+
export declare function usePermission<TModularSmartAccount extends ModularSmartAccount | undefined>(client: Client<Transport, Chain | undefined, TModularSmartAccount>, parameters: UsePermissionParameters<TModularSmartAccount>): Promise<Hex>;
|
|
63
|
+
//# sourceMappingURL=usePermission.d.ts.map
|
package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePermission.d.ts","sourceRoot":"","sources":["../../../../../../src/sdk/modules/validators/smartSessionsValidator/decorators/usePermission.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;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAA;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/D;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CACjC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,IAC1D;IACF,mIAAmI;IACnI,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,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;IACd,4GAA4G;IAC5G,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gDAAgD;IAChD,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,aAAa,CACjC,oBAAoB,SAAS,mBAAmB,GAAG,SAAS,EAE5D,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,oBAAoB,CAAC,EAClE,UAAU,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,GACxD,OAAO,CAAC,GAAG,CAAC,CAed"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type Address, type Hex } from "viem";
|
|
2
|
+
import type { ModuleMeta } from "../../utils/Types";
|
|
3
|
+
import type { ModularSmartAccount } from "../../utils/Types";
|
|
4
|
+
import type { Module, ModuleParameters } from "../../utils/Types";
|
|
5
|
+
import type { UsePermissionModuleData } from "./Types";
|
|
6
|
+
export declare const DUMMY_ECDSA_SIG = "0xe8b94748580ca0b4993c9a1b86b5be851bfc076ff5ce3a1ff65bf16392acfcb800f9b4f1aef1555c7fce5599fffb17e7c635502154a0333ba21f3ae491839af51c";
|
|
7
|
+
export type SmartSessionModule = Module & {
|
|
8
|
+
moduleData?: UsePermissionModuleData;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Arguments for getting the initialization data for a Use Session module.
|
|
12
|
+
*/
|
|
13
|
+
export type UsePermissionModuleGetInitDataArgs = {
|
|
14
|
+
signerAddress: Address;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Parameters for creating a Use Session module.
|
|
18
|
+
*/
|
|
19
|
+
export type UsePermissionModuleParameters = Omit<ModuleParameters, "accountAddress" | "address"> & {
|
|
20
|
+
account: ModularSmartAccount;
|
|
21
|
+
moduleData?: UsePermissionModuleData;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Gets the initialization data for a Use Session module.
|
|
25
|
+
*
|
|
26
|
+
* @param _ - Optional arguments (currently unused).
|
|
27
|
+
* @returns The module metadata including address, type, and initialization data.
|
|
28
|
+
*/
|
|
29
|
+
export declare const getUsePermissionModuleInitData: (_?: UsePermissionModuleGetInitDataArgs) => ModuleMeta;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the initialization data for a Use Session.
|
|
32
|
+
*
|
|
33
|
+
* @param signerAddress - The address of the signer for the session.
|
|
34
|
+
* @returns The encoded initialization data as a hexadecimal string.
|
|
35
|
+
*/
|
|
36
|
+
export declare const getUsePermissionInitData: ({ signerAddress }: UsePermissionModuleGetInitDataArgs) => Hex;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a Smart Sessions module for a modular smart account.
|
|
39
|
+
*
|
|
40
|
+
* This function sets up a Smart Sessions module with the specified parameters,
|
|
41
|
+
* including session mode, permission ID, and session data.
|
|
42
|
+
*
|
|
43
|
+
* @param parameters - The parameters for creating the Smart Sessions module.
|
|
44
|
+
* @returns A Module object representing the created Smart Sessions module.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const smartSessionsModule = toSmartSessionsValidator({
|
|
49
|
+
* account: mySmartAccount,
|
|
50
|
+
* signer: mySigner,
|
|
51
|
+
* moduleData: {
|
|
52
|
+
* permissionId: '0x1234...',
|
|
53
|
+
* mode: SmartSessionMode.USE,
|
|
54
|
+
* enableSessionData: '0x5678...'
|
|
55
|
+
* }
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* - The function generates stub signatures and can sign user operation hashes.
|
|
61
|
+
* - It uses the SmartSession address from the predefined addresses.
|
|
62
|
+
* - The default session mode is USE if not specified.
|
|
63
|
+
*/
|
|
64
|
+
export declare const toSmartSessionsValidator: (parameters: UsePermissionModuleParameters) => SmartSessionModule;
|
|
65
|
+
//# sourceMappingURL=toSmartSessionsValidator.d.ts.map
|
package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toSmartSessionsValidator.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/modules/validators/smartSessionsValidator/toSmartSessionsValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAgB,MAAM,MAAM,CAAA;AAQ3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAEtD,eAAO,MAAM,eAAe,yIAC4G,CAAA;AAExI,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IACxC,UAAU,CAAC,EAAE,uBAAuB,CAAA;CACrC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,gBAAgB,EAChB,gBAAgB,GAAG,SAAS,CAC7B,GAAG;IACF,OAAO,EAAE,mBAAmB,CAAA;IAC5B,UAAU,CAAC,EAAE,uBAAuB,CAAA;CACrC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,GACzC,IAAI,kCAAkC,KACrC,UAID,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,mBAEtC,kCAAkC,KAAG,GACI,CAAA;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,wBAAwB,GACnC,YAAY,6BAA6B,KACxC,kBAgDF,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Address, Hex, Prettify, SignableMessage } from "viem";
|
|
2
|
+
import type { Signer } from "../../account";
|
|
3
|
+
export type GenericValidatorConfig<T extends ValidatorRequiredConfig = ValidatorRequiredConfig> = T;
|
|
4
|
+
export type ValidatorRequiredConfig = {
|
|
5
|
+
/** The init data of the module. Alias for data. */
|
|
6
|
+
initData: Hex;
|
|
7
|
+
/** The hexadecimal address of the module. */
|
|
8
|
+
module: Address;
|
|
9
|
+
/** The eoa. */
|
|
10
|
+
signer: Signer;
|
|
11
|
+
};
|
|
12
|
+
export type ValidatorOptionalConfig = {
|
|
13
|
+
/** The type of the module. */
|
|
14
|
+
type: "validator";
|
|
15
|
+
/** The deinit data of the module. */
|
|
16
|
+
deInitData: Hex;
|
|
17
|
+
/** The address of the module. Alias for module. */
|
|
18
|
+
address: Address;
|
|
19
|
+
/** The init data of the module. Alias for initData. */
|
|
20
|
+
data: Hex;
|
|
21
|
+
};
|
|
22
|
+
export type ValidatorActions = {
|
|
23
|
+
/**
|
|
24
|
+
* Signs a message.
|
|
25
|
+
* @param message - The message to sign, either as a Uint8Array or string.
|
|
26
|
+
* @returns A promise that resolves to a hexadecimal string representing the signature.
|
|
27
|
+
*/
|
|
28
|
+
signMessage: (message: SignableMessage) => Promise<Hex>;
|
|
29
|
+
/**
|
|
30
|
+
* Signs a user operation hash.
|
|
31
|
+
* @param userOpHash - The user operation hash to sign.
|
|
32
|
+
// Review:
|
|
33
|
+
* @param params - Optional parameters for generating the signature.
|
|
34
|
+
* @returns A promise that resolves to a hexadecimal string representing the signature.
|
|
35
|
+
*/
|
|
36
|
+
signUserOpHash: (userOpHash: Hex) => Promise<Hex>;
|
|
37
|
+
/**
|
|
38
|
+
* Gets the stub signature of the module.
|
|
39
|
+
*/
|
|
40
|
+
getStubSignature: () => Promise<Hex>;
|
|
41
|
+
};
|
|
42
|
+
export type Validator = Prettify<GenericValidatorConfig & ValidatorOptionalConfig & ValidatorActions>;
|
|
43
|
+
export type ValidatorParameters = Prettify<GenericValidatorConfig & Partial<ValidatorOptionalConfig & ValidatorActions>>;
|
|
44
|
+
export declare const toValidator: (parameters: ValidatorParameters) => Validator;
|
|
45
|
+
//# sourceMappingURL=toValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toValidator.d.ts","sourceRoot":"","sources":["../../../../src/sdk/modules/validators/toValidator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AAEnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,sBAAsB,CAChC,CAAC,SAAS,uBAAuB,GAAG,uBAAuB,IACzD,CAAC,CAAA;AAEL,MAAM,MAAM,uBAAuB,GAAG;IACpC,mDAAmD;IACnD,QAAQ,EAAE,GAAG,CAAA;IACb,6CAA6C;IAC7C,MAAM,EAAE,OAAO,CAAA;IACf,eAAe;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,8BAA8B;IAC9B,IAAI,EAAE,WAAW,CAAA;IACjB,qCAAqC;IACrC,UAAU,EAAE,GAAG,CAAA;IACf,mDAAmD;IACnD,OAAO,EAAE,OAAO,CAAA;IAChB,uDAAuD;IACvD,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACvD;;;;;;qBAMiB;IACjB,cAAc,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACjD;;OAEG;IACH,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,CAC9B,sBAAsB,GAAG,uBAAuB,GAAG,gBAAgB,CACpE,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,CAC7E,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,mBAAmB,KAAG,SAwB7D,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@startale-scs/aa-sdk",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"author": "SCS",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "github:StartaleLabs/scs-aa-sdk"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/_cjs/index.js",
|
|
10
|
+
"module": "./dist/_esm/index.js",
|
|
11
|
+
"access": "public",
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@biomejs/biome": "1.9.4",
|
|
14
|
+
"@changesets/cli": "^2.28.1",
|
|
15
|
+
"@commitlint/cli": "^19.7.1",
|
|
16
|
+
"@commitlint/config-conventional": "^19.7.1",
|
|
17
|
+
"@ethersproject/abi": "^5.8.0",
|
|
18
|
+
"@ethersproject/providers": "^5.8.0",
|
|
19
|
+
"@ethersproject/wallet": "^5.8.0",
|
|
20
|
+
"@pimlico/alto": "^0.0.4",
|
|
21
|
+
"@rhinestone/module-sdk": "0.2.3",
|
|
22
|
+
"@size-limit/esbuild-why": "^11.2.0",
|
|
23
|
+
"@size-limit/preset-small-lib": "^11.2.0",
|
|
24
|
+
"@types/bun": "^1.2.4",
|
|
25
|
+
"@types/yargs": "^17.0.33",
|
|
26
|
+
"@vitest/coverage-istanbul": "^3.0.7",
|
|
27
|
+
"buffer": "^6.0.3",
|
|
28
|
+
"concurrently": "^9.1.2",
|
|
29
|
+
"dotenv": "^16.4.7",
|
|
30
|
+
"ethers": "^6.13.5",
|
|
31
|
+
"execa": "^9.5.2",
|
|
32
|
+
"get-port": "^7.1.0",
|
|
33
|
+
"gh-pages": "^6.3.0",
|
|
34
|
+
"prool": "^0.0.23",
|
|
35
|
+
"rimraf": "^6.0.1",
|
|
36
|
+
"simple-git-hooks": "^2.11.1",
|
|
37
|
+
"size-limit": "^11.2.0",
|
|
38
|
+
"ts-node": "^10.9.2",
|
|
39
|
+
"tsc-alias": "^1.8.11",
|
|
40
|
+
"tslib": "^2.8.1",
|
|
41
|
+
"typedoc": "^0.27.9",
|
|
42
|
+
"typescript": "^5.8.2",
|
|
43
|
+
"viem": "^2.23.2",
|
|
44
|
+
"vitest": "^3.0.7",
|
|
45
|
+
"yargs": "^17.7.2"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@rhinestone/module-sdk": "0.2.3",
|
|
49
|
+
"typescript": "^5.8.2",
|
|
50
|
+
"viem": "2.23.2"
|
|
51
|
+
},
|
|
52
|
+
"exports": {
|
|
53
|
+
".": {
|
|
54
|
+
"types": "./dist/_types/index.d.ts",
|
|
55
|
+
"import": "./dist/_esm/index.js",
|
|
56
|
+
"require": "./dist/_cjs/index.js",
|
|
57
|
+
"default": "./dist/_cjs/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./smart-sessions": {
|
|
60
|
+
"types": "./dist/_types/modules/validators/smartSessions/index.d.ts",
|
|
61
|
+
"import": "./dist/_esm/modules/validators/smartSessions/index.js",
|
|
62
|
+
"require": "./dist/_cjs/modules/validators/smartSessions/index.js",
|
|
63
|
+
"default": "./dist/_cjs/modules/validators/smartSessions/index.js"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"typesVersions": {
|
|
67
|
+
"*": {
|
|
68
|
+
"*": [
|
|
69
|
+
"./dist/_types/*"
|
|
70
|
+
],
|
|
71
|
+
"smart-sessions": [
|
|
72
|
+
"./dist/_types/modules/validators/smartSessions/*"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"commitlint": {
|
|
77
|
+
"extends": [
|
|
78
|
+
"@commitlint/config-conventional"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"description": "SDK for startale account integration with support for account abstraction, ERC-7579, ERC-4337.",
|
|
82
|
+
"files": [
|
|
83
|
+
"dist/*",
|
|
84
|
+
"README.md"
|
|
85
|
+
],
|
|
86
|
+
"homepage": "https://aa-docs.scs.startale.com/",
|
|
87
|
+
"keywords": [
|
|
88
|
+
"erc-7579",
|
|
89
|
+
"modular smart account",
|
|
90
|
+
"account abstraction",
|
|
91
|
+
"scs",
|
|
92
|
+
"sdk"
|
|
93
|
+
],
|
|
94
|
+
"license": "MIT",
|
|
95
|
+
"scripts": {
|
|
96
|
+
"format": "biome format . --write",
|
|
97
|
+
"lint": "biome check .",
|
|
98
|
+
"lint:fix": "bun run lint --apply",
|
|
99
|
+
"dev": "bun run build && bun link && concurrently \"bun run esm:watch\" \"bun run cjs:watch\" \"bun run esm:watch:aliases\" \"bun run cjs:watch:aliases\"",
|
|
100
|
+
"build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types",
|
|
101
|
+
"clean": "rimraf ./dist/_esm ./dist/_cjs ./dist/_types ./dist/tsconfig",
|
|
102
|
+
"coverage": "vitest run -c ./src/test/vitest.config.ts --coverage",
|
|
103
|
+
"test": "vitest run -c ./src/test/vitest.config.ts",
|
|
104
|
+
"test:watch": "vitest --watch -c ./src/test/vitest.config.ts",
|
|
105
|
+
"playground": "RUN_PLAYGROUND=true vitest -c ./src/test/vitest.config.ts -t=playground",
|
|
106
|
+
"playground:watch": "RUN_PLAYGROUND=true bun run test -t=playground --watch",
|
|
107
|
+
"fetch:tokenMap": "bun run scripts/fetch:tokenMap.ts && bun run lint:fix",
|
|
108
|
+
"size": "size-limit",
|
|
109
|
+
"docs": "typedoc --tsconfig ./tsconfig/tsconfig.esm.json",
|
|
110
|
+
"docs:deploy": "bun run docs && gh-pages -d docs",
|
|
111
|
+
"changeset": "changeset",
|
|
112
|
+
"changeset:release": "bun run build && changeset publish",
|
|
113
|
+
"changeset:version": "changeset version && bun install --lockfile-only",
|
|
114
|
+
"changeset:release:canary": "original_name=$(bun run scripts/publish:canary.ts | grep ORIGINAL_NAME | cut -d'=' -f2) && npm publish && git checkout package.json && git tag -l '*-canary.*' | xargs git tag -d && git fetch --tags && git reset --hard && git clean -fd && echo \"Published canary version of $original_name as latest\"",
|
|
115
|
+
"esm:watch": "tsc --project ./tsconfig/tsconfig.esm.json --watch",
|
|
116
|
+
"cjs:watch": "tsc --project ./tsconfig/tsconfig.cjs.json --watch",
|
|
117
|
+
"esm:watch:aliases": "tsc-alias -p ./tsconfig/tsconfig.esm.json --watch",
|
|
118
|
+
"cjs:watch:aliases": "tsc-alias -p ./tsconfig/tsconfig.cjs.json --watch",
|
|
119
|
+
"build:cjs": "tsc --project ./tsconfig/tsconfig.cjs.json && tsc-alias -p ./tsconfig/tsconfig.cjs.json && echo > ./dist/_cjs/package.json '{\"type\":\"commonjs\"}'",
|
|
120
|
+
"build:esm": "tsc --project ./tsconfig/tsconfig.esm.json && tsc-alias -p ./tsconfig/tsconfig.esm.json && echo > ./dist/_esm/package.json '{\"type\": \"module\",\"sideEffects\":false}'",
|
|
121
|
+
"build:types": "tsc --project ./tsconfig/tsconfig.types.json && tsc-alias -p ./tsconfig/tsconfig.types.json",
|
|
122
|
+
"fetch:deployment": "bun run ./scripts/fetch:deployment.ts && bun run lint --apply-unsafe",
|
|
123
|
+
"fetch:deployment:raw": "bun run ./scripts/fetch:deployment.ts",
|
|
124
|
+
"fund:smartAccount": "bun run ./scripts/fund:smartAccount.ts"
|
|
125
|
+
},
|
|
126
|
+
"sideEffects": false,
|
|
127
|
+
"simple-git-hooks": {
|
|
128
|
+
"pre-commit": "bun run format && bun run lint:fix",
|
|
129
|
+
"commit-msg": "npx --no -- commitlint --edit ${1}"
|
|
130
|
+
},
|
|
131
|
+
"type": "module",
|
|
132
|
+
"types": "./dist/_types/index.d.ts",
|
|
133
|
+
"typings": "./dist/_types/index.d.ts"
|
|
134
|
+
}
|