@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":"contractSimulation.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/contractSimulation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,gBAAgB,EAC/B,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iOAoBhB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AnyData } from "../../modules/utils/Types";
|
|
2
|
+
/**
|
|
3
|
+
* Recursively converts all BigInt and BigNumber values in an object or array to hexadecimal strings
|
|
4
|
+
*
|
|
5
|
+
* @param obj - {@link AnyData} The input object or value to convert
|
|
6
|
+
* @returns {@link AnyData} The converted object or value with all BigInts and BigNumbers as hex strings
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* - Functions are converted to undefined
|
|
10
|
+
* - Null, strings, and booleans remain unchanged
|
|
11
|
+
* - BigInts and BigNumbers are converted to hex strings
|
|
12
|
+
* - Arrays are processed recursively
|
|
13
|
+
* - Objects are processed recursively with their keys preserved
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // Converting simple values
|
|
17
|
+
* deepHexlify(BigInt(123)); // returns "0x7b"
|
|
18
|
+
* deepHexlify("hello"); // returns "hello"
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Converting complex objects
|
|
22
|
+
* const result = deepHexlify({
|
|
23
|
+
* amount: BigInt(1000000),
|
|
24
|
+
* token: "0x123...",
|
|
25
|
+
* values: [BigInt(1), BigInt(2)],
|
|
26
|
+
* nested: {
|
|
27
|
+
* balance: BigInt(500)
|
|
28
|
+
* }
|
|
29
|
+
* });
|
|
30
|
+
* // Returns:
|
|
31
|
+
* // {
|
|
32
|
+
* // amount: "0xf4240",
|
|
33
|
+
* // token: "0x123...",
|
|
34
|
+
* // values: ["0x1", "0x2"],
|
|
35
|
+
* // nested: {
|
|
36
|
+
* // balance: "0x1f4"
|
|
37
|
+
* // }
|
|
38
|
+
* // }
|
|
39
|
+
*/
|
|
40
|
+
export declare function deepHexlify(obj: AnyData): AnyData;
|
|
41
|
+
//# sourceMappingURL=deepHexlify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepHexlify.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/deepHexlify.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CA0BjD"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { PublicClient } from "viem";
|
|
2
|
+
import type { Client } from "viem";
|
|
3
|
+
import type { Transport } from "viem";
|
|
4
|
+
import type { Chain } from "viem";
|
|
5
|
+
import type { Account } from "viem";
|
|
6
|
+
import type { BundlerClient, SmartAccount } from "viem/account-abstraction";
|
|
7
|
+
import type { StartaleAccountClient } from "../../clients/createSCSBundlerClient";
|
|
8
|
+
import type { StartaleSmartAccount } from "../toStartaleSmartAccount";
|
|
9
|
+
import type { Signer } from "./toSigner";
|
|
10
|
+
/**
|
|
11
|
+
* Union type representing all supported bundler client types
|
|
12
|
+
* @typedef {BundlerClient | StartaleAccountClient | Client<Transport, Chain | undefined, Account>} BundlerClientTypes
|
|
13
|
+
*/
|
|
14
|
+
export type BundlerClientTypes = BundlerClient | StartaleAccountClient | Client<Transport, Chain | undefined, SmartAccount | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Extracts the PublicClient from a bundler client
|
|
17
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
18
|
+
* @returns {PublicClient<Transport, Chain, Account>} The public client instance
|
|
19
|
+
* @throws {Error} If the Smart account is not found
|
|
20
|
+
*/
|
|
21
|
+
export declare const fromBundlerClientToPublicClient: (bundlerClient: BundlerClientTypes) => PublicClient<Transport, Chain, Account>;
|
|
22
|
+
/**
|
|
23
|
+
* Extracts the StartaleSmartAccount from a bundler client
|
|
24
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
25
|
+
* @returns {StartaleSmartAccount} The Startale smart account instance
|
|
26
|
+
* @throws {Error} If the account is not a valid Startale smart account
|
|
27
|
+
*/
|
|
28
|
+
export declare const fromBundlerClientToStartaleAccount: (bundlerClient: BundlerClientTypes) => StartaleSmartAccount;
|
|
29
|
+
/**
|
|
30
|
+
* Extracts the Chain information from a bundler client
|
|
31
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
32
|
+
* @returns {Chain} The chain information
|
|
33
|
+
* @throws {Error} If the chain information is not found
|
|
34
|
+
*/
|
|
35
|
+
export declare const fromBundlerClientToChain: (bundlerClient: BundlerClientTypes) => Chain;
|
|
36
|
+
/**
|
|
37
|
+
* Extracts the chain ID from a bundler client
|
|
38
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
39
|
+
* @returns {number} The chain ID
|
|
40
|
+
* @throws {Error} If the chain information is not found
|
|
41
|
+
*/
|
|
42
|
+
export declare const fromBundlerClientToChainId: (bundlerClient: BundlerClientTypes) => number;
|
|
43
|
+
/**
|
|
44
|
+
* Extracts the Signer from a bundler client
|
|
45
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
46
|
+
* @returns {Signer} The signer instance
|
|
47
|
+
* @throws {Error} If the Startale smart account is not found
|
|
48
|
+
*/
|
|
49
|
+
export declare const fromBundlerClientToSigner: (bundlerClient: BundlerClientTypes) => Signer;
|
|
50
|
+
//# sourceMappingURL=fromBundlerClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromBundlerClient.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/fromBundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACjC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,qBAAqB,GACrB,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC,CAAA;AAElE;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,GAC1C,eAAe,kBAAkB,KAChC,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAMxC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,GAC7C,eAAe,kBAAkB,KAChC,oBAMF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,eAAe,kBAAkB,KAChC,KAOF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,eAAe,kBAAkB,KAChC,MAMF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,eAAe,kBAAkB,KAChC,MAMF,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type KnownError = {
|
|
2
|
+
name: string;
|
|
3
|
+
regex: string;
|
|
4
|
+
description: string;
|
|
5
|
+
causes: string[];
|
|
6
|
+
solutions: string[];
|
|
7
|
+
docsUrl?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const ERRORS_URL = "https://raw.githubusercontent.com/bcnmy/aa-errors/main/docs/errors.json";
|
|
10
|
+
export declare const DOCS_URL = "https://docs.biconomy.io/troubleshooting/commonerrors";
|
|
11
|
+
export declare const getAAError: (message: string, httpStatus?: number) => Promise<{
|
|
12
|
+
title: string;
|
|
13
|
+
docsSlug: string;
|
|
14
|
+
metaMessages: string[];
|
|
15
|
+
message: string;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=getAAError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAAError.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/getAAError.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAGD,eAAO,MAAM,UAAU,4EACoD,CAAA;AAC3E,eAAO,MAAM,QAAQ,0DAA0D,CAAA;AA6B/E,eAAO,MAAM,UAAU,GAAU,SAAS,MAAM,EAAE,aAAa,MAAM;;;;;EAiBpE,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Chain } from "viem/chains";
|
|
2
|
+
/**
|
|
3
|
+
* Utility method for converting a chainId to a {@link Chain} object
|
|
4
|
+
*
|
|
5
|
+
* @param chainId
|
|
6
|
+
* @returns a {@link Chain} object for the given chainId
|
|
7
|
+
* @throws if the chainId is not found
|
|
8
|
+
*/
|
|
9
|
+
export declare const getChain: (chainId: number) => Chain;
|
|
10
|
+
export declare const stringOrStringsToArray: (str: string | string[]) => string[];
|
|
11
|
+
type StringOrStrings = string | string[];
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* getCustomChain
|
|
15
|
+
*
|
|
16
|
+
* Utility method for creating a custom chain object
|
|
17
|
+
*
|
|
18
|
+
* @param name The name of the chain
|
|
19
|
+
* @param id The chainId (number)
|
|
20
|
+
* @param rpcUrl The RPC URL for the chain - may also be an array of URLs
|
|
21
|
+
* @param blockExplorer The block explorer URL for the chain - may also be an array of URLs
|
|
22
|
+
* @param nativeCurrency The native currency for the chain, ETH by default
|
|
23
|
+
* @param testnet Whether the chain is a testnet or not, true by default
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
*
|
|
27
|
+
* import { getCustomChain, createSmartAccountClient } from "@startale-scs/aa-sdk"
|
|
28
|
+
*
|
|
29
|
+
* const customChain = getCustomChain(
|
|
30
|
+
* "My Custom Chain",
|
|
31
|
+
* 123456, // id
|
|
32
|
+
* "https://rpc.my-custom-chain.io", // Can also pass an array of URLs
|
|
33
|
+
* "https://explorer.my-custom-chain.io" // Can also pass an array of URLs
|
|
34
|
+
* )
|
|
35
|
+
*
|
|
36
|
+
* const account = privateKeyToAccount(`0x${privateKey}`)
|
|
37
|
+
* const walletClientWithCustomChain = createWalletClient({
|
|
38
|
+
* account,
|
|
39
|
+
* chain: customChain,
|
|
40
|
+
* transport: http()
|
|
41
|
+
* })
|
|
42
|
+
*
|
|
43
|
+
* const smartAccountCustomChain = createSmartAccountClient({
|
|
44
|
+
* account: await toStartaleSmartAccount({
|
|
45
|
+
* chain: customChain,
|
|
46
|
+
* signer: walletClientWithCustomChain,
|
|
47
|
+
* transport: http(),
|
|
48
|
+
* mock: true
|
|
49
|
+
* }),
|
|
50
|
+
* transport: http(bundlerUrl),
|
|
51
|
+
* })
|
|
52
|
+
*
|
|
53
|
+
* const { wait } = await smartAccountCustomChain.sendUserOperation({
|
|
54
|
+
* to: recipient,
|
|
55
|
+
* value: BigInt(1)
|
|
56
|
+
* })
|
|
57
|
+
*
|
|
58
|
+
* const { success, receipt } = await wait();
|
|
59
|
+
* console.log(success);
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export declare const getCustomChain: (name: string, id: number, rpcUrl: StringOrStrings, blockExplorer?: StringOrStrings, nativeCurrency?: Chain["nativeCurrency"], contracts?: Chain["contracts"], testnet?: boolean) => Chain;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=getChain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getChain.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/getChain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AA4BxC;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,KAAG,KAW1C,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,GAAG,MAAM,EAAE,KAAG,MAAM,EACpC,CAAA;AAElC,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;AACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,EACZ,IAAI,MAAM,EACV,QAAQ,eAAe,EACvB,gBAAgB,eAAe,EAC/B,iBAAiB,KAAK,CAAC,gBAAgB,CAAC,EACxC,YAAY,KAAK,CAAC,WAAW,CAAC,EAC9B,iBAAc,KACb,KAsBF,CAAA"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { Hex } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the current version of the SDK from package.json
|
|
4
|
+
*
|
|
5
|
+
* This function provides access to the version number defined in the package.json file,
|
|
6
|
+
* which can be useful for logging, debugging, or feature compatibility checks.
|
|
7
|
+
*
|
|
8
|
+
* @returns {string} The current version of the SDK
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { getVersion } from '@startale-scs/aa-sdk'
|
|
13
|
+
*
|
|
14
|
+
* console.log(`Using SCS SDK version: ${getVersion()}`)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function getVersion(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Compares two semantic version strings
|
|
20
|
+
*
|
|
21
|
+
* This function compares two semantic version strings (e.g., "1.2.3" and "1.3.0")
|
|
22
|
+
* and determines their relative order.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} a - First version string to compare
|
|
25
|
+
* @param {string} b - Second version string to compare
|
|
26
|
+
* @returns {number} Returns:
|
|
27
|
+
* - Negative number if version a is lower than version b
|
|
28
|
+
* - Zero if versions are equal
|
|
29
|
+
* - Positive number if version a is higher than version b
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { semverCompare } from '@startale-scs/aa-sdk'
|
|
34
|
+
*
|
|
35
|
+
* // Returns negative number (a < b)
|
|
36
|
+
* semverCompare("1.2.3", "1.3.0")
|
|
37
|
+
*
|
|
38
|
+
* // Returns positive number (a > b)
|
|
39
|
+
* semverCompare("2.0.0", "1.9.9")
|
|
40
|
+
*
|
|
41
|
+
* // Returns 0 (a === b)
|
|
42
|
+
* semverCompare("1.2.3", "1.2.3")
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const semverCompare: (a: string, b: string) => number;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if a version meets or exceeds a required version
|
|
48
|
+
*
|
|
49
|
+
* This function determines if a given version is equal to or higher than
|
|
50
|
+
* a required minimum version, which is useful for feature compatibility checks.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} currentVersion - The version to check
|
|
53
|
+
* @param {string} requiredVersion - The minimum required version
|
|
54
|
+
* @returns {boolean} Returns true if currentVersion >= requiredVersion, false otherwise
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { versionMeetsRequirement } from '@startale-scs/aa-sdk'
|
|
59
|
+
*
|
|
60
|
+
* // Returns true (current version exceeds required)
|
|
61
|
+
* versionMeetsRequirement("1.3.0", "1.2.0")
|
|
62
|
+
*
|
|
63
|
+
* // Returns false (current version below required)
|
|
64
|
+
* versionMeetsRequirement("1.2.3", "1.3.0")
|
|
65
|
+
*
|
|
66
|
+
* // Returns true (versions are equal)
|
|
67
|
+
* versionMeetsRequirement("1.2.3", "1.2.3")
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare const versionMeetsRequirement: (currentVersion: string, requiredVersion: string) => boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Checks if a version is older than a specified version
|
|
73
|
+
*
|
|
74
|
+
* This function determines if a given version is lower than (comes before)
|
|
75
|
+
* a specified version, which is useful for backward compatibility checks.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} currentVersion - The version to check
|
|
78
|
+
* @param {string} referenceVersion - The version to compare against
|
|
79
|
+
* @returns {boolean} Returns true if currentVersion < referenceVersion, false otherwise
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* import { isVersionOlder } from '@startale-scs/aa-sdk'
|
|
84
|
+
*
|
|
85
|
+
* // Returns true (current version is older than reference)
|
|
86
|
+
* isVersionOlder("1.2.0", "1.3.0")
|
|
87
|
+
*
|
|
88
|
+
* // Returns false (current version is newer than reference)
|
|
89
|
+
* isVersionOlder("1.3.0", "1.2.3")
|
|
90
|
+
*
|
|
91
|
+
* // Returns false (versions are equal)
|
|
92
|
+
* isVersionOlder("1.2.3", "1.2.3")
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare const isVersionOlder: (currentVersion: string, referenceVersion: string) => boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Checks if a version is newer than a specified version
|
|
98
|
+
*
|
|
99
|
+
* This function determines if a given version is higher than (comes after)
|
|
100
|
+
* a specified version, which is useful for forward compatibility checks.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} currentVersion - The version to check
|
|
103
|
+
* @param {string} referenceVersion - The version to compare against
|
|
104
|
+
* @returns {boolean} Returns true if currentVersion > referenceVersion, false otherwise
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* import { isVersionNewer } from '@startale-scs/aa-sdk'
|
|
109
|
+
*
|
|
110
|
+
* // Returns true (current version is newer than reference)
|
|
111
|
+
* isVersionNewer("1.3.0", "1.2.3")
|
|
112
|
+
*
|
|
113
|
+
* // Returns false (current version is older than reference)
|
|
114
|
+
* isVersionNewer("1.2.0", "1.3.0")
|
|
115
|
+
*
|
|
116
|
+
* // Returns false (versions are equal)
|
|
117
|
+
* isVersionNewer("1.2.3", "1.2.3")
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare const isVersionNewer: (currentVersion: string, referenceVersion: string) => boolean;
|
|
121
|
+
export type AddressConfig = {
|
|
122
|
+
/** The factory address for the account */
|
|
123
|
+
factoryAddress: Hex;
|
|
124
|
+
/** The bootstrap address for the account */
|
|
125
|
+
bootStrapAddress: Hex;
|
|
126
|
+
/** The validator address for the account */
|
|
127
|
+
validatorAddress: Hex;
|
|
128
|
+
/** The accountId for the account. Of the format startale.smart-account.${major}.${minor}.${patch} */
|
|
129
|
+
accountId: `startale.smart-account.${number}.${number}.${number}`;
|
|
130
|
+
/** The implementation address for the account */
|
|
131
|
+
implementationAddress: Hex;
|
|
132
|
+
/** The execution module address for the account */
|
|
133
|
+
executorAddress: Hex;
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=getVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVersion.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/getVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAE/B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAYnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAepD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,uBAAuB,GAClC,gBAAgB,MAAM,EACtB,iBAAiB,MAAM,KACtB,OAMF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,GACzB,gBAAgB,MAAM,EACtB,kBAAkB,MAAM,KACvB,OAMF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,GACzB,gBAAgB,MAAM,EACtB,kBAAkB,MAAM,KACvB,OAKF,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,0CAA0C;IAC1C,cAAc,EAAE,GAAG,CAAA;IACnB,4CAA4C;IAC5C,gBAAgB,EAAE,GAAG,CAAA;IACrB,4CAA4C;IAC5C,gBAAgB,EAAE,GAAG,CAAA;IACrB,qGAAqG;IACrG,SAAS,EAAE,0BAA0B,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;IACjE,iDAAiD;IACjD,qBAAqB,EAAE,GAAG,CAAA;IAC1B,mDAAmD;IACnD,eAAe,EAAE,GAAG,CAAA;CACrB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./Types";
|
|
2
|
+
export * from "./Utils";
|
|
3
|
+
export * from "./AccountNotFound";
|
|
4
|
+
export * from "./Constants";
|
|
5
|
+
export * from "./contractSimulation";
|
|
6
|
+
export * from "./deepHexlify";
|
|
7
|
+
export * from "./fromBundlerClient";
|
|
8
|
+
export * from "./getAAError";
|
|
9
|
+
export * from "./getChain";
|
|
10
|
+
export * from "./getVersion";
|
|
11
|
+
export * from "../decorators";
|
|
12
|
+
export { isDebugging, isStaging, getRandomInt, getRandomBigInt } from "./Helpers";
|
|
13
|
+
export * from "./Logger";
|
|
14
|
+
export * from "./parseErrorMessage";
|
|
15
|
+
export * from "./tenderlySimulation";
|
|
16
|
+
export * from "./toInitData";
|
|
17
|
+
export * from "./toInstallData";
|
|
18
|
+
export * from "./toSigner";
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,OAAO,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseErrorMessage.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/parseErrorMessage.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,MAkDlD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RpcUserOperation } from "viem";
|
|
2
|
+
import { type UserOperation } from "viem/account-abstraction";
|
|
3
|
+
export type AnyUserOperation = Partial<UserOperation<"0.7"> | RpcUserOperation>;
|
|
4
|
+
export declare const DUMMY_SIMULATION_GAS: {
|
|
5
|
+
callGasLimit: bigint;
|
|
6
|
+
verificationGasLimit: bigint;
|
|
7
|
+
preVerificationGas: bigint;
|
|
8
|
+
maxFeePerGas: bigint;
|
|
9
|
+
maxPriorityFeePerGas: bigint;
|
|
10
|
+
};
|
|
11
|
+
export declare const getSimulationUserOp: (partialUserOp: AnyUserOperation) => import("viem/account-abstraction").PackedUserOperation;
|
|
12
|
+
export declare function tenderlySimulation(partialUserOp: AnyUserOperation, chainId?: number): string | null;
|
|
13
|
+
//# sourceMappingURL=tenderlySimulation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenderlySimulation.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/tenderlySimulation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAC5C,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,0BAA0B,CAAA;AAKjC,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAA;AAE/E,eAAO,MAAM,oBAAoB;;;;;;CAMhC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,eAAe,gBAAgB,2DAOlE,CAAA;AAED,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,gBAAgB,EAC/B,OAAO,SAAQ,iBAsChB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
|
+
import type { AnyData } from "../../modules";
|
|
3
|
+
/**
|
|
4
|
+
* Formats modules to ensure they have the correct structure for the contract
|
|
5
|
+
* @param modules Array of modules to format
|
|
6
|
+
* @returns Formatted modules with module and data properties
|
|
7
|
+
*/
|
|
8
|
+
export declare const toInitData: (mod: AnyData) => {
|
|
9
|
+
module: Address;
|
|
10
|
+
data: Hex;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=toInitData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toInitData.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/toInitData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,OAAO,KAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAOrE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AnyData, ModuleMeta } from "../../modules";
|
|
2
|
+
/**
|
|
3
|
+
* Formats modules to ensure they have the correct structure for the contract
|
|
4
|
+
* @param modules Array of modules to format
|
|
5
|
+
* @returns Formatted modules with module and data properties
|
|
6
|
+
*/
|
|
7
|
+
export declare const toInstallData: (mod: AnyData) => ModuleMeta;
|
|
8
|
+
//# sourceMappingURL=toInstallData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toInstallData.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/toInstallData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAExD;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,OAAO,KAAG,UAS5C,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Account, type Address, type Chain, type LocalAccount, type OneOf, type Transport, type WalletClient } from "viem";
|
|
2
|
+
import type { AnyData } from "../../modules/utils/Types";
|
|
3
|
+
import type { EthersWallet } from "./Utils";
|
|
4
|
+
export interface BaseProvider {
|
|
5
|
+
request(...args: AnyData): Promise<AnyData>;
|
|
6
|
+
}
|
|
7
|
+
export type EthereumProvider<T extends BaseProvider = BaseProvider> = T & BaseProvider;
|
|
8
|
+
/** Represents a local account that can sign transactions and messages */
|
|
9
|
+
export type Signer = LocalAccount;
|
|
10
|
+
/**
|
|
11
|
+
* Converts various signer types into a standardized LocalAccount format.
|
|
12
|
+
* Handles conversion from different wallet implementations including ethers.js wallets,
|
|
13
|
+
* EIP-1193 providers, and existing LocalAccounts.
|
|
14
|
+
*
|
|
15
|
+
* @param signer - The signer to convert, must implement required signing methods
|
|
16
|
+
* @param address - Optional address to use for the account
|
|
17
|
+
* @returns A Promise resolving to a LocalAccount
|
|
18
|
+
*
|
|
19
|
+
* @throws {Error} When signTransaction is called (not supported)
|
|
20
|
+
* @throws {Error} When address is required but not provided
|
|
21
|
+
*/
|
|
22
|
+
export declare function toSigner<provider extends EthereumProvider, wallet extends EthersWallet>({ signer, address }: {
|
|
23
|
+
signer: OneOf<provider | wallet | WalletClient<Transport, Chain | undefined, Account> | LocalAccount>;
|
|
24
|
+
address?: Address;
|
|
25
|
+
}): Promise<LocalAccount>;
|
|
26
|
+
//# sourceMappingURL=toSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toSigner.d.ts","sourceRoot":"","sources":["../../../../src/sdk/account/utils/toSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EAKlB,MAAM,MAAM,CAAA;AAKb,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,GAAG,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC5C;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,IAAI,CAAC,GACrE,YAAY,CAAA;AAEd,yEAAyE;AACzE,MAAM,MAAM,MAAM,GAAG,YAAY,CAAA;AAEjC;;;;;;;;;;;GAWG;AACH,wBAAsB,QAAQ,CAC5B,QAAQ,SAAS,gBAAgB,EACjC,MAAM,SAAS,YAAY,EAC3B,EACA,MAAM,EACN,OAAO,EACR,EAAE;IACD,MAAM,EAAE,KAAK,CACT,QAAQ,GACR,MAAM,GACN,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,OAAO,CAAC,GACnD,YAAY,CACf,CAAA;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,OAAO,CAAC,YAAY,CAAC,CA0FxB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Prettify } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for initializing a Http client
|
|
4
|
+
*/
|
|
5
|
+
export type Url = `https://${string}` | `http://${string}`;
|
|
6
|
+
/**
|
|
7
|
+
* Parameters for making requests to the Http node
|
|
8
|
+
*/
|
|
9
|
+
type RequestParams = {
|
|
10
|
+
/** API endpoint path */
|
|
11
|
+
path: string;
|
|
12
|
+
/** HTTP method to use. Defaults to "POST" */
|
|
13
|
+
method?: "GET" | "POST";
|
|
14
|
+
/** Optional request body */
|
|
15
|
+
body?: object;
|
|
16
|
+
/** Optional request params */
|
|
17
|
+
params?: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Base interface for the Http client
|
|
21
|
+
*/
|
|
22
|
+
export type HttpClient = {
|
|
23
|
+
/** Makes HTTP requests to the Http node */
|
|
24
|
+
request: <T>(params: RequestParams) => Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Extends the client with additional functionality
|
|
27
|
+
* @param fn - Function that adds new properties/methods to the base client
|
|
28
|
+
* @returns Extended client with both base and new functionality
|
|
29
|
+
*/
|
|
30
|
+
extend: <const client extends Extended, const extendedHttpClient extends HttpClient>(fn: (base: extendedHttpClient) => client) => client & extendedHttpClient;
|
|
31
|
+
};
|
|
32
|
+
type Extended = Prettify<{
|
|
33
|
+
[_ in keyof HttpClient]?: undefined;
|
|
34
|
+
} & {
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new Http client instance
|
|
39
|
+
* @param params - Configuration parameters for the client
|
|
40
|
+
* @returns A base Http client instance that can be extended with additional functionality
|
|
41
|
+
*/
|
|
42
|
+
export declare const createHttpClient: (url: Url, apiKey?: string) => HttpClient;
|
|
43
|
+
export default createHttpClient;
|
|
44
|
+
//# sourceMappingURL=createHttpClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHttpClient.d.ts","sourceRoot":"","sources":["../../../src/sdk/clients/createHttpClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAIpC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,WAAW,MAAM,EAAE,GAAG,UAAU,MAAM,EAAE,CAAA;AAE1D;;GAEG;AACH,KAAK,aAAa,GAAG;IACnB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACvB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,2CAA2C;IAC3C,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IACjD;;;;OAIG;IACH,MAAM,EAAE,CACN,KAAK,CAAC,MAAM,SAAS,QAAQ,EAC7B,KAAK,CAAC,kBAAkB,SAAS,UAAU,EAE3C,EAAE,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,MAAM,KACrC,MAAM,GAAG,kBAAkB,CAAA;CACjC,CAAA;AAED,KAAK,QAAQ,GAAG,QAAQ,CAEtB;KAAG,CAAC,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,SAAS;CAAE,GAAG;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CACF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,GAAG,EAAE,SAAS,MAAM,KAAG,UAsC5D,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type BundlerRpcSchema, type Chain, type Client, type OneOf, type Prettify, type RpcSchema, type Transport } from "viem";
|
|
2
|
+
import { type BundlerActions, type BundlerClientConfig } from "viem/account-abstraction";
|
|
3
|
+
import type { AnyData, ModularSmartAccount } from "../modules/utils/Types";
|
|
4
|
+
import { type SCSActions } from "./decorators/bundler";
|
|
5
|
+
import { type Erc7579Actions } from "./decorators/erc7579";
|
|
6
|
+
import { type SmartAccountActions } from "./decorators/smartAccount";
|
|
7
|
+
/**
|
|
8
|
+
* Startale Account Client type
|
|
9
|
+
*/
|
|
10
|
+
export type StartaleAccountClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends ModularSmartAccount | undefined = ModularSmartAccount | undefined, client extends Client | undefined = Client | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<transport, chain extends Chain ? chain : client extends Client<AnyData, infer chain> ? chain : undefined, account, rpcSchema extends RpcSchema ? [...BundlerRpcSchema, ...rpcSchema] : BundlerRpcSchema, BundlerActions<account>>> & BundlerActions<ModularSmartAccount> & SCSActions & Erc7579Actions<ModularSmartAccount> & SmartAccountActions<chain, ModularSmartAccount> & {
|
|
11
|
+
/**
|
|
12
|
+
* Whether to use the test bundler. Conditionally used by the `getGasFeeValues` decorator.
|
|
13
|
+
*/
|
|
14
|
+
mock: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The Smart account associated with this client
|
|
17
|
+
*/
|
|
18
|
+
account: ModularSmartAccount;
|
|
19
|
+
/**
|
|
20
|
+
* Optional client for additional functionality
|
|
21
|
+
*/
|
|
22
|
+
client?: client | Client | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Optional paymaster configuration
|
|
25
|
+
*/
|
|
26
|
+
paymaster?: BundlerClientConfig["paymaster"] | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Optional paymaster context
|
|
29
|
+
*/
|
|
30
|
+
paymasterContext?: unknown;
|
|
31
|
+
/**
|
|
32
|
+
* Optional user operation configuration
|
|
33
|
+
*/
|
|
34
|
+
userOperation?: BundlerClientConfig["userOperation"] | undefined;
|
|
35
|
+
};
|
|
36
|
+
type SCSBundlerClientConfig = Omit<BundlerClientConfig, "transport"> & {
|
|
37
|
+
/**
|
|
38
|
+
* Whether to use the test bundler. Conditionally used by the `getGasFeeValues` decorator.
|
|
39
|
+
*/
|
|
40
|
+
mock?: boolean;
|
|
41
|
+
} & OneOf<{
|
|
42
|
+
transport: Transport;
|
|
43
|
+
} | {
|
|
44
|
+
bundlerUrl: string;
|
|
45
|
+
} | {
|
|
46
|
+
apiKey?: string;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates SCS Bundler Client with a given Transport configured for a Chain.
|
|
50
|
+
*
|
|
51
|
+
* @param parameters - Configuration for the SCS Bundler Client
|
|
52
|
+
* @returns SCS Bundler Client
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* import { createSCSBundlerClient, http } from '@startale-scs/aa-sdk'
|
|
56
|
+
* import { mainnet } from 'viem/chains'
|
|
57
|
+
*
|
|
58
|
+
* const bundlerClient = createSCSBundlerClient({ chain: mainnet });
|
|
59
|
+
*/
|
|
60
|
+
export declare const createSCSBundlerClient: (parameters: SCSBundlerClientConfig) => StartaleAccountClient<Transport, Chain | undefined, ModularSmartAccount | undefined, Client | undefined, undefined>;
|
|
61
|
+
export declare const createSmartAccountClient: (parameters: SCSBundlerClientConfig) => StartaleAccountClient<Transport, Chain | undefined, ModularSmartAccount | undefined, Client | undefined, undefined>;
|
|
62
|
+
export declare const createStartaleAccountClient: (parameters: SCSBundlerClientConfig) => StartaleAccountClient<Transport, Chain | undefined, ModularSmartAccount | undefined, Client | undefined, undefined>;
|
|
63
|
+
export declare const createStartaleSessionClient: (parameters: SCSBundlerClientConfig) => StartaleAccountClient<Transport, Chain | undefined, ModularSmartAccount | undefined, Client | undefined, undefined>;
|
|
64
|
+
export type SCSBundlerClient = StartaleAccountClient;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=createSCSBundlerClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSCSBundlerClient.d.ts","sourceRoot":"","sources":["../../../src/sdk/clients/createSCSBundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,MAAM,CAAA;AACb,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAEzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAE1E,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,sBAAsB,CAAA;AAEzE,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,2BAA2B,CAAA;AAElC;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAC/B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,mBAAmB,GAAG,SAAS,GAC3C,mBAAmB,GACnB,SAAS,EACb,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,EACtD,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IACjD,QAAQ,CACV,MAAM,CACJ,SAAS,EACT,KAAK,SAAS,KAAK,GACf,KAAK,GACL,MAAM,SAAS,MAAM,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC,GACzC,KAAK,GACL,SAAS,EACf,OAAO,EACP,SAAS,SAAS,SAAS,GACvB,CAAC,GAAG,gBAAgB,EAAE,GAAG,SAAS,CAAC,GACnC,gBAAgB,EACpB,cAAc,CAAC,OAAO,CAAC,CACxB,CACF,GACC,cAAc,CAAC,mBAAmB,CAAC,GACnC,UAAU,GACV,cAAc,CAAC,mBAAmB,CAAC,GACnC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,GAAG;IAChD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;OAEG;IACH,OAAO,EAAE,mBAAmB,CAAA;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAA;IACxD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;CACjE,CAAA;AAEH,KAAK,sBAAsB,GAAG,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,GAAG;IACrE;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,GAAG,KAAK,CACH;IACE,SAAS,EAAE,SAAS,CAAA;CACrB,GACD;IACE,UAAU,EAAE,MAAM,CAAA;CACnB,GACD;IACE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CACJ,CAAA;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GACjC,YAAY,sBAAsB,wHAoDnC,CAAA;AAGD,eAAO,MAAM,wBAAwB,eAvDvB,sBAAsB,wHAuD0B,CAAA;AAC9D,eAAO,MAAM,2BAA2B,eAxD1B,sBAAsB,wHAwD+B,CAAA;AACnE,eAAO,MAAM,2BAA2B,eAzD1B,sBAAsB,wHAyD+B,CAAA;AACnE,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type Address, type OneOf, type Transport } from "viem";
|
|
2
|
+
import { type PaymasterClient, type PaymasterClientConfig } from "viem/account-abstraction";
|
|
3
|
+
import { type TokenPaymasterActions } from "./decorators/tokenPaymaster";
|
|
4
|
+
export type SCSPaymasterClient = Omit<PaymasterClient, "getPaymasterStubData"> & TokenPaymasterActions;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for creating a SCS Paymaster Client.
|
|
7
|
+
* @typedef {Object} SCSPaymasterClientConfig
|
|
8
|
+
* @property {Transport} [transport] - Optional custom transport.
|
|
9
|
+
* @property {string} [paymasterUrl] - URL of the paymaster service.
|
|
10
|
+
* @property {number} [chainId] - Chain ID for the network.
|
|
11
|
+
* @property {string} [apiKey] - API key for authentication.
|
|
12
|
+
*/
|
|
13
|
+
type SCSPaymasterClientConfig = Omit<PaymasterClientConfig, "transport"> & OneOf<{
|
|
14
|
+
transport?: Transport;
|
|
15
|
+
} | {
|
|
16
|
+
paymasterUrl: string;
|
|
17
|
+
} | {
|
|
18
|
+
chainId: number;
|
|
19
|
+
apiKey: string;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Context for the SCS SPONSORED Paymaster.
|
|
23
|
+
*/
|
|
24
|
+
export type SCSPaymasterContext = {
|
|
25
|
+
paymasterId?: string;
|
|
26
|
+
token?: Address;
|
|
27
|
+
calculateGasLimits?: boolean;
|
|
28
|
+
};
|
|
29
|
+
type ToSCSTokenPaymasterContextParams = {
|
|
30
|
+
token: Address;
|
|
31
|
+
calculateGasLimits?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare const scsSponsoredPaymasterContext: SCSPaymasterContext;
|
|
34
|
+
export declare const toSCSSponsoredPaymasterContext: (params?: Partial<SCSPaymasterContext>) => SCSPaymasterContext;
|
|
35
|
+
export declare const toSCSTokenPaymasterContext: (params: ToSCSTokenPaymasterContextParams) => SCSPaymasterContext;
|
|
36
|
+
/**
|
|
37
|
+
* Creates a SCS Paymaster Client.
|
|
38
|
+
*
|
|
39
|
+
* This function sets up a client for interacting with SCS's paymaster service.
|
|
40
|
+
* It can be configured with a custom transport, a specific paymaster URL, or with a chain ID and API key.
|
|
41
|
+
*
|
|
42
|
+
* @param {SCSPaymasterClientConfig} parameters - Configuration options for the client.
|
|
43
|
+
* @returns {PaymasterClient} A configured Paymaster Client instance.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // Create a client with a custom transport
|
|
47
|
+
* const client1 = createSCSPaymasterClient({ transport: customTransport })
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Create a client with a specific paymaster URL
|
|
51
|
+
* const client2 = createSCSPaymasterClient({ paymasterUrl: 'https://example.com/paymaster' })
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Create a client with chain ID and API key
|
|
55
|
+
* const client3 = createSCSPaymasterClient({ chainId: 1, apiKey: 'your-api-key' })
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // Create a Token Paymaster Client
|
|
59
|
+
* const tokenPaymasterClient = createSCSPaymasterClient({
|
|
60
|
+
* paymasterUrl: 'https://example.com/paymaster',
|
|
61
|
+
* paymasterContext: {
|
|
62
|
+
* mode: "ERC20",
|
|
63
|
+
* tokenInfo: {
|
|
64
|
+
* feeTokenAddress: "0x..."
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* })
|
|
68
|
+
*/
|
|
69
|
+
export declare const createSCSPaymasterClient: (parameters: SCSPaymasterClientConfig) => SCSPaymasterClient;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=createSCSPaymasterClient.d.ts.map
|