@startale-scs/aa-sdk 0.0.0-dev.20260331120000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/_cjs/account/decorators/getFactoryData.js +36 -0
- package/dist/_cjs/account/decorators/getFactoryData.js.map +1 -0
- package/dist/_cjs/account/decorators/getStartaleAccountAddress.js +18 -0
- package/dist/_cjs/account/decorators/getStartaleAccountAddress.js.map +1 -0
- package/dist/_cjs/account/decorators/index.js +6 -0
- package/dist/_cjs/account/decorators/index.js.map +1 -0
- package/dist/_cjs/account/index.js +6 -0
- package/dist/_cjs/account/index.js.map +1 -0
- package/dist/_cjs/account/toStartaleSmartAccount.js +311 -0
- package/dist/_cjs/account/toStartaleSmartAccount.js.map +1 -0
- package/dist/_cjs/account/utils/AccountNotFound.js +18 -0
- package/dist/_cjs/account/utils/AccountNotFound.js.map +1 -0
- package/dist/_cjs/account/utils/Constants.js +128 -0
- package/dist/_cjs/account/utils/Constants.js.map +1 -0
- package/dist/_cjs/account/utils/Helpers.js +39 -0
- package/dist/_cjs/account/utils/Helpers.js.map +1 -0
- package/dist/_cjs/account/utils/Logger.js +35 -0
- package/dist/_cjs/account/utils/Logger.js.map +1 -0
- package/dist/_cjs/account/utils/Types.js +3 -0
- package/dist/_cjs/account/utils/Types.js.map +1 -0
- package/dist/_cjs/account/utils/Utils.js +258 -0
- package/dist/_cjs/account/utils/Utils.js.map +1 -0
- package/dist/_cjs/account/utils/addressToEmptyAccount.js +24 -0
- package/dist/_cjs/account/utils/addressToEmptyAccount.js.map +1 -0
- package/dist/_cjs/account/utils/contractSimulation.js +27 -0
- package/dist/_cjs/account/utils/contractSimulation.js.map +1 -0
- package/dist/_cjs/account/utils/deepHexlify.js +26 -0
- package/dist/_cjs/account/utils/deepHexlify.js.map +1 -0
- package/dist/_cjs/account/utils/eip7702Utils.js +21 -0
- package/dist/_cjs/account/utils/eip7702Utils.js.map +1 -0
- package/dist/_cjs/account/utils/fromBundlerClient.js +45 -0
- package/dist/_cjs/account/utils/fromBundlerClient.js.map +1 -0
- package/dist/_cjs/account/utils/getAAError.js +37 -0
- package/dist/_cjs/account/utils/getAAError.js.map +1 -0
- package/dist/_cjs/account/utils/getChain.js +66 -0
- package/dist/_cjs/account/utils/getChain.js.map +1 -0
- package/dist/_cjs/account/utils/getVersion.js +46 -0
- package/dist/_cjs/account/utils/getVersion.js.map +1 -0
- package/dist/_cjs/account/utils/index.js +28 -0
- package/dist/_cjs/account/utils/index.js.map +1 -0
- package/dist/_cjs/account/utils/parseErrorMessage.js +79 -0
- package/dist/_cjs/account/utils/parseErrorMessage.js.map +1 -0
- package/dist/_cjs/account/utils/tenderlySimulation.js +52 -0
- package/dist/_cjs/account/utils/tenderlySimulation.js.map +1 -0
- package/dist/_cjs/account/utils/toInitData.js +13 -0
- package/dist/_cjs/account/utils/toInitData.js.map +1 -0
- package/dist/_cjs/account/utils/toInstallData.js +15 -0
- package/dist/_cjs/account/utils/toInstallData.js.map +1 -0
- package/dist/_cjs/account/utils/toSigner.js +81 -0
- package/dist/_cjs/account/utils/toSigner.js.map +1 -0
- package/dist/_cjs/clients/createHttpClient.js +46 -0
- package/dist/_cjs/clients/createHttpClient.js.map +1 -0
- package/dist/_cjs/clients/createSCSBundlerClient.js +85 -0
- package/dist/_cjs/clients/createSCSBundlerClient.js.map +1 -0
- package/dist/_cjs/clients/createSCSPaymasterClient.js +48 -0
- package/dist/_cjs/clients/createSCSPaymasterClient.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js +49 -0
- package/dist/_cjs/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/index.js +11 -0
- package/dist/_cjs/clients/decorators/bundler/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js +11 -0
- package/dist/_cjs/clients/decorators/bundler/waitForUserOperationReceipt.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/accountId.js +65 -0
- package/dist/_cjs/clients/decorators/erc7579/accountId.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getActiveHook.js +43 -0
- package/dist/_cjs/clients/decorators/erc7579/getActiveHook.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getFallbackBySelector.js +56 -0
- package/dist/_cjs/clients/decorators/erc7579/getFallbackBySelector.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledExecutors.js +63 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledExecutors.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledValidators.js +61 -0
- package/dist/_cjs/clients/decorators/erc7579/getInstalledValidators.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/getPreviousModule.js +37 -0
- package/dist/_cjs/clients/decorators/erc7579/getPreviousModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/index.js +64 -0
- package/dist/_cjs/clients/decorators/erc7579/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/installModule.js +73 -0
- package/dist/_cjs/clients/decorators/erc7579/installModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/installModules.js +25 -0
- package/dist/_cjs/clients/decorators/erc7579/installModules.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/isModuleInstalled.js +90 -0
- package/dist/_cjs/clients/decorators/erc7579/isModuleInstalled.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsExecutionMode.js +102 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsExecutionMode.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsModule.js +90 -0
- package/dist/_cjs/clients/decorators/erc7579/supportsModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallFallback.js +61 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallFallback.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModule.js +79 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModule.js.map +1 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModules.js +26 -0
- package/dist/_cjs/clients/decorators/erc7579/uninstallModules.js.map +1 -0
- package/dist/_cjs/clients/decorators/index.js +8 -0
- package/dist/_cjs/clients/decorators/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/debugUserOperation.js +75 -0
- package/dist/_cjs/clients/decorators/smartAccount/debugUserOperation.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/index.js +32 -0
- package/dist/_cjs/clients/decorators/smartAccount/index.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js +32 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js +35 -0
- package/dist/_cjs/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js +21 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTransaction.js +41 -0
- package/dist/_cjs/clients/decorators/smartAccount/sendTransaction.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/signMessage.js +14 -0
- package/dist/_cjs/clients/decorators/smartAccount/signMessage.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/signTypedData.js +31 -0
- package/dist/_cjs/clients/decorators/smartAccount/signTypedData.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/upgradeSmartAccount.js +61 -0
- package/dist/_cjs/clients/decorators/smartAccount/upgradeSmartAccount.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/waitForTransactionReceipt.js +17 -0
- package/dist/_cjs/clients/decorators/smartAccount/waitForTransactionReceipt.js.map +1 -0
- package/dist/_cjs/clients/decorators/smartAccount/writeContract.js +20 -0
- package/dist/_cjs/clients/decorators/smartAccount/writeContract.js.map +1 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getSupportedTokens.js +25 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getSupportedTokens.js.map +1 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js +71 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js.map +1 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/index.js +11 -0
- package/dist/_cjs/clients/decorators/tokenPaymaster/index.js.map +1 -0
- package/dist/_cjs/clients/index.js +8 -0
- package/dist/_cjs/clients/index.js.map +1 -0
- package/dist/_cjs/constants/abi/AccountFactory.js +337 -0
- package/dist/_cjs/constants/abi/AccountFactory.js.map +1 -0
- package/dist/_cjs/constants/abi/AccountImplementationAbi.js +1179 -0
- package/dist/_cjs/constants/abi/AccountImplementationAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/BootstrapAbi.js +730 -0
- package/dist/_cjs/constants/abi/BootstrapAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/ComposabilityAbi.js +274 -0
- package/dist/_cjs/constants/abi/ComposabilityAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/EIP1271Abi.js +31 -0
- package/dist/_cjs/constants/abi/EIP1271Abi.js.map +1 -0
- package/dist/_cjs/constants/abi/ERC7484RegistryAbi.js +17 -0
- package/dist/_cjs/constants/abi/ERC7484RegistryAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/EntryPointABI.js +661 -0
- package/dist/_cjs/constants/abi/EntryPointABI.js.map +1 -0
- package/dist/_cjs/constants/abi/SmartSessionAbi.js +1472 -0
- package/dist/_cjs/constants/abi/SmartSessionAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/TokenWithPermitAbi.js +622 -0
- package/dist/_cjs/constants/abi/TokenWithPermitAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/UniActionPolicyAbi.js +62 -0
- package/dist/_cjs/constants/abi/UniActionPolicyAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/UniswapSwapRouterAbi.js +486 -0
- package/dist/_cjs/constants/abi/UniswapSwapRouterAbi.js.map +1 -0
- package/dist/_cjs/constants/abi/index.js +14 -0
- package/dist/_cjs/constants/abi/index.js.map +1 -0
- package/dist/_cjs/constants/index.js +64 -0
- package/dist/_cjs/constants/index.js.map +1 -0
- package/dist/_cjs/index.js +13 -0
- package/dist/_cjs/index.js.map +1 -0
- package/dist/_cjs/modules/index.js +8 -0
- package/dist/_cjs/modules/index.js.map +1 -0
- package/dist/_cjs/modules/toEmptyExecutor.js +10 -0
- package/dist/_cjs/modules/toEmptyExecutor.js.map +1 -0
- package/dist/_cjs/modules/toEmptyHook.js +10 -0
- package/dist/_cjs/modules/toEmptyHook.js.map +1 -0
- package/dist/_cjs/modules/utils/Helpers.js +59 -0
- package/dist/_cjs/modules/utils/Helpers.js.map +1 -0
- package/dist/_cjs/modules/utils/Types.js +15 -0
- package/dist/_cjs/modules/utils/Types.js.map +1 -0
- package/dist/_cjs/modules/utils/Uid.js +14 -0
- package/dist/_cjs/modules/utils/Uid.js.map +1 -0
- package/dist/_cjs/modules/utils/composabilityCalls.js +117 -0
- package/dist/_cjs/modules/utils/composabilityCalls.js.map +1 -0
- package/dist/_cjs/modules/utils/index.js +9 -0
- package/dist/_cjs/modules/utils/index.js.map +1 -0
- package/dist/_cjs/modules/utils/runtimeAbiEncoding.js +276 -0
- package/dist/_cjs/modules/utils/runtimeAbiEncoding.js.map +1 -0
- package/dist/_cjs/modules/utils/toModule.js +39 -0
- package/dist/_cjs/modules/utils/toModule.js.map +1 -0
- package/dist/_cjs/modules/validators/default/index.js +5 -0
- package/dist/_cjs/modules/validators/default/index.js.map +1 -0
- package/dist/_cjs/modules/validators/default/toDefaultModule.js +18 -0
- package/dist/_cjs/modules/validators/default/toDefaultModule.js.map +1 -0
- package/dist/_cjs/modules/validators/index.js +9 -0
- package/dist/_cjs/modules/validators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/addOwner.js +48 -0
- package/dist/_cjs/modules/validators/ownable/decorators/addOwner.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getAddOwnerTx.js +42 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getAddOwnerTx.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getOwners.js +28 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getOwners.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getRemoveOwnerTx.js +42 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getRemoveOwnerTx.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getSetThresholdTx.js +32 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getSetThresholdTx.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getThreshold.js +28 -0
- package/dist/_cjs/modules/validators/ownable/decorators/getThreshold.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/index.js +70 -0
- package/dist/_cjs/modules/validators/ownable/decorators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/multiSign.js +25 -0
- package/dist/_cjs/modules/validators/ownable/decorators/multiSign.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/prepareForMultiSign.js +22 -0
- package/dist/_cjs/modules/validators/ownable/decorators/prepareForMultiSign.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/removeOwner.js +47 -0
- package/dist/_cjs/modules/validators/ownable/decorators/removeOwner.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/decorators/setThreshold.js +39 -0
- package/dist/_cjs/modules/validators/ownable/decorators/setThreshold.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/index.js +6 -0
- package/dist/_cjs/modules/validators/ownable/index.js.map +1 -0
- package/dist/_cjs/modules/validators/ownable/toOwnableModule.js +16 -0
- package/dist/_cjs/modules/validators/ownable/toOwnableModule.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Helpers.js +132 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Helpers.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Types.js +13 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/Types.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/grantPermission.js +38 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js +30 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js +152 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/preparePermission.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/revokeSession.js +42 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/revokeSession.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/usePermission.js +16 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/decorators/usePermission.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/index.js +8 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/index.js.map +1 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js +49 -0
- package/dist/_cjs/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js.map +1 -0
- package/dist/_cjs/modules/validators/toValidator.js +21 -0
- package/dist/_cjs/modules/validators/toValidator.js.map +1 -0
- package/dist/_cjs/package.json +1 -0
- package/dist/_esm/account/decorators/getFactoryData.js +31 -0
- package/dist/_esm/account/decorators/getFactoryData.js.map +1 -0
- package/dist/_esm/account/decorators/getStartaleAccountAddress.js +31 -0
- package/dist/_esm/account/decorators/getStartaleAccountAddress.js.map +1 -0
- package/dist/_esm/account/decorators/index.js +3 -0
- package/dist/_esm/account/decorators/index.js.map +1 -0
- package/dist/_esm/account/index.js +3 -0
- package/dist/_esm/account/index.js.map +1 -0
- package/dist/_esm/account/toStartaleSmartAccount.js +403 -0
- package/dist/_esm/account/toStartaleSmartAccount.js.map +1 -0
- package/dist/_esm/account/utils/AccountNotFound.js +17 -0
- package/dist/_esm/account/utils/AccountNotFound.js.map +1 -0
- package/dist/_esm/account/utils/Constants.js +129 -0
- package/dist/_esm/account/utils/Constants.js.map +1 -0
- package/dist/_esm/account/utils/Helpers.js +45 -0
- package/dist/_esm/account/utils/Helpers.js.map +1 -0
- package/dist/_esm/account/utils/Logger.js +50 -0
- package/dist/_esm/account/utils/Logger.js.map +1 -0
- package/dist/_esm/account/utils/Types.js +2 -0
- package/dist/_esm/account/utils/Types.js.map +1 -0
- package/dist/_esm/account/utils/Utils.js +319 -0
- package/dist/_esm/account/utils/Utils.js.map +1 -0
- package/dist/_esm/account/utils/addressToEmptyAccount.js +21 -0
- package/dist/_esm/account/utils/addressToEmptyAccount.js.map +1 -0
- package/dist/_esm/account/utils/contractSimulation.js +48 -0
- package/dist/_esm/account/utils/contractSimulation.js.map +1 -0
- package/dist/_esm/account/utils/deepHexlify.js +63 -0
- package/dist/_esm/account/utils/deepHexlify.js.map +1 -0
- package/dist/_esm/account/utils/eip7702Utils.js +16 -0
- package/dist/_esm/account/utils/eip7702Utils.js.map +1 -0
- package/dist/_esm/account/utils/fromBundlerClient.js +67 -0
- package/dist/_esm/account/utils/fromBundlerClient.js.map +1 -0
- package/dist/_esm/account/utils/getAAError.js +34 -0
- package/dist/_esm/account/utils/getAAError.js.map +1 -0
- package/dist/_esm/account/utils/getChain.js +117 -0
- package/dist/_esm/account/utils/getChain.js.map +1 -0
- package/dist/_esm/account/utils/getVersion.js +163 -0
- package/dist/_esm/account/utils/getVersion.js.map +1 -0
- package/dist/_esm/account/utils/index.js +20 -0
- package/dist/_esm/account/utils/index.js.map +1 -0
- package/dist/_esm/account/utils/parseErrorMessage.js +89 -0
- package/dist/_esm/account/utils/parseErrorMessage.js.map +1 -0
- package/dist/_esm/account/utils/tenderlySimulation.js +47 -0
- package/dist/_esm/account/utils/tenderlySimulation.js.map +1 -0
- package/dist/_esm/account/utils/toInitData.js +14 -0
- package/dist/_esm/account/utils/toInitData.js.map +1 -0
- package/dist/_esm/account/utils/toInstallData.js +16 -0
- package/dist/_esm/account/utils/toInstallData.js.map +1 -0
- package/dist/_esm/account/utils/toSigner.js +91 -0
- package/dist/_esm/account/utils/toSigner.js.map +1 -0
- package/dist/_esm/clients/createHttpClient.js +47 -0
- package/dist/_esm/clients/createHttpClient.js.map +1 -0
- package/dist/_esm/clients/createSCSBundlerClient.js +96 -0
- package/dist/_esm/clients/createSCSBundlerClient.js.map +1 -0
- package/dist/_esm/clients/createSCSPaymasterClient.js +85 -0
- package/dist/_esm/clients/createSCSPaymasterClient.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js +77 -0
- package/dist/_esm/clients/decorators/bundler/getGasFeeValues.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/index.js +7 -0
- package/dist/_esm/clients/decorators/bundler/index.js.map +1 -0
- package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js +8 -0
- package/dist/_esm/clients/decorators/bundler/waitForUserOperationReceipt.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/accountId.js +77 -0
- package/dist/_esm/clients/decorators/erc7579/accountId.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getActiveHook.js +52 -0
- package/dist/_esm/clients/decorators/erc7579/getActiveHook.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getFallbackBySelector.js +67 -0
- package/dist/_esm/clients/decorators/erc7579/getFallbackBySelector.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledExecutors.js +74 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledExecutors.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledValidators.js +72 -0
- package/dist/_esm/clients/decorators/erc7579/getInstalledValidators.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/getPreviousModule.js +54 -0
- package/dist/_esm/clients/decorators/erc7579/getPreviousModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/index.js +48 -0
- package/dist/_esm/clients/decorators/erc7579/index.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/installModule.js +115 -0
- package/dist/_esm/clients/decorators/erc7579/installModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/installModules.js +41 -0
- package/dist/_esm/clients/decorators/erc7579/installModules.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/isModuleInstalled.js +106 -0
- package/dist/_esm/clients/decorators/erc7579/isModuleInstalled.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/supportsExecutionMode.js +120 -0
- package/dist/_esm/clients/decorators/erc7579/supportsExecutionMode.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/supportsModule.js +108 -0
- package/dist/_esm/clients/decorators/erc7579/supportsModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallFallback.js +76 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallFallback.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModule.js +94 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModule.js.map +1 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModules.js +42 -0
- package/dist/_esm/clients/decorators/erc7579/uninstallModules.js.map +1 -0
- package/dist/_esm/clients/decorators/index.js +5 -0
- package/dist/_esm/clients/decorators/index.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/debugUserOperation.js +105 -0
- package/dist/_esm/clients/decorators/smartAccount/debugUserOperation.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/index.js +28 -0
- package/dist/_esm/clients/decorators/smartAccount/index.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js +60 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js +36 -0
- package/dist/_esm/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js +43 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTokenPaymasterUserOp.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTransaction.js +57 -0
- package/dist/_esm/clients/decorators/smartAccount/sendTransaction.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/signMessage.js +30 -0
- package/dist/_esm/clients/decorators/smartAccount/signMessage.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/signTypedData.js +82 -0
- package/dist/_esm/clients/decorators/smartAccount/signTypedData.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/upgradeSmartAccount.js +75 -0
- package/dist/_esm/clients/decorators/smartAccount/upgradeSmartAccount.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/waitForTransactionReceipt.js +14 -0
- package/dist/_esm/clients/decorators/smartAccount/waitForTransactionReceipt.js.map +1 -0
- package/dist/_esm/clients/decorators/smartAccount/writeContract.js +40 -0
- package/dist/_esm/clients/decorators/smartAccount/writeContract.js.map +1 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getSupportedTokens.js +35 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getSupportedTokens.js.map +1 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js +120 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.js.map +1 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/index.js +63 -0
- package/dist/_esm/clients/decorators/tokenPaymaster/index.js.map +1 -0
- package/dist/_esm/clients/index.js +5 -0
- package/dist/_esm/clients/index.js.map +1 -0
- package/dist/_esm/constants/abi/AccountFactory.js +334 -0
- package/dist/_esm/constants/abi/AccountFactory.js.map +1 -0
- package/dist/_esm/constants/abi/AccountImplementationAbi.js +1176 -0
- package/dist/_esm/constants/abi/AccountImplementationAbi.js.map +1 -0
- package/dist/_esm/constants/abi/BootstrapAbi.js +727 -0
- package/dist/_esm/constants/abi/BootstrapAbi.js.map +1 -0
- package/dist/_esm/constants/abi/ComposabilityAbi.js +271 -0
- package/dist/_esm/constants/abi/ComposabilityAbi.js.map +1 -0
- package/dist/_esm/constants/abi/EIP1271Abi.js +28 -0
- package/dist/_esm/constants/abi/EIP1271Abi.js.map +1 -0
- package/dist/_esm/constants/abi/ERC7484RegistryAbi.js +14 -0
- package/dist/_esm/constants/abi/ERC7484RegistryAbi.js.map +1 -0
- package/dist/_esm/constants/abi/EntryPointABI.js +658 -0
- package/dist/_esm/constants/abi/EntryPointABI.js.map +1 -0
- package/dist/_esm/constants/abi/SmartSessionAbi.js +1469 -0
- package/dist/_esm/constants/abi/SmartSessionAbi.js.map +1 -0
- package/dist/_esm/constants/abi/TokenWithPermitAbi.js +619 -0
- package/dist/_esm/constants/abi/TokenWithPermitAbi.js.map +1 -0
- package/dist/_esm/constants/abi/UniActionPolicyAbi.js +59 -0
- package/dist/_esm/constants/abi/UniActionPolicyAbi.js.map +1 -0
- package/dist/_esm/constants/abi/UniswapSwapRouterAbi.js +483 -0
- package/dist/_esm/constants/abi/UniswapSwapRouterAbi.js.map +1 -0
- package/dist/_esm/constants/abi/index.js +11 -0
- package/dist/_esm/constants/abi/index.js.map +1 -0
- package/dist/_esm/constants/index.js +38 -0
- package/dist/_esm/constants/index.js.map +1 -0
- package/dist/_esm/index.js +12 -0
- package/dist/_esm/index.js.map +1 -0
- package/dist/_esm/modules/index.js +6 -0
- package/dist/_esm/modules/index.js.map +1 -0
- package/dist/_esm/modules/toEmptyExecutor.js +6 -0
- package/dist/_esm/modules/toEmptyExecutor.js.map +1 -0
- package/dist/_esm/modules/toEmptyHook.js +6 -0
- package/dist/_esm/modules/toEmptyHook.js.map +1 -0
- package/dist/_esm/modules/utils/Helpers.js +81 -0
- package/dist/_esm/modules/utils/Helpers.js.map +1 -0
- package/dist/_esm/modules/utils/Types.js +12 -0
- package/dist/_esm/modules/utils/Types.js.map +1 -0
- package/dist/_esm/modules/utils/Uid.js +11 -0
- package/dist/_esm/modules/utils/Uid.js.map +1 -0
- package/dist/_esm/modules/utils/composabilityCalls.js +127 -0
- package/dist/_esm/modules/utils/composabilityCalls.js.map +1 -0
- package/dist/_esm/modules/utils/index.js +6 -0
- package/dist/_esm/modules/utils/index.js.map +1 -0
- package/dist/_esm/modules/utils/runtimeAbiEncoding.js +365 -0
- package/dist/_esm/modules/utils/runtimeAbiEncoding.js.map +1 -0
- package/dist/_esm/modules/utils/toModule.js +61 -0
- package/dist/_esm/modules/utils/toModule.js.map +1 -0
- package/dist/_esm/modules/validators/default/index.js +2 -0
- package/dist/_esm/modules/validators/default/index.js.map +1 -0
- package/dist/_esm/modules/validators/default/toDefaultModule.js +14 -0
- package/dist/_esm/modules/validators/default/toDefaultModule.js.map +1 -0
- package/dist/_esm/modules/validators/index.js +6 -0
- package/dist/_esm/modules/validators/index.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/addOwner.js +56 -0
- package/dist/_esm/modules/validators/ownable/decorators/addOwner.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getAddOwnerTx.js +50 -0
- package/dist/_esm/modules/validators/ownable/decorators/getAddOwnerTx.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getOwners.js +38 -0
- package/dist/_esm/modules/validators/ownable/decorators/getOwners.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getRemoveOwnerTx.js +50 -0
- package/dist/_esm/modules/validators/ownable/decorators/getRemoveOwnerTx.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getSetThresholdTx.js +48 -0
- package/dist/_esm/modules/validators/ownable/decorators/getSetThresholdTx.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/getThreshold.js +54 -0
- package/dist/_esm/modules/validators/ownable/decorators/getThreshold.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/index.js +57 -0
- package/dist/_esm/modules/validators/ownable/decorators/index.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/multiSign.js +22 -0
- package/dist/_esm/modules/validators/ownable/decorators/multiSign.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/prepareForMultiSign.js +21 -0
- package/dist/_esm/modules/validators/ownable/decorators/prepareForMultiSign.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/removeOwner.js +66 -0
- package/dist/_esm/modules/validators/ownable/decorators/removeOwner.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/decorators/setThreshold.js +62 -0
- package/dist/_esm/modules/validators/ownable/decorators/setThreshold.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/index.js +3 -0
- package/dist/_esm/modules/validators/ownable/index.js.map +1 -0
- package/dist/_esm/modules/validators/ownable/toOwnableModule.js +38 -0
- package/dist/_esm/modules/validators/ownable/toOwnableModule.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Helpers.js +181 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Helpers.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Types.js +13 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/Types.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js +80 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/grantPermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js +37 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/index.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js +214 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/preparePermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/revokeSession.js +67 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/revokeSession.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/usePermission.js +47 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/decorators/usePermission.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/index.js +5 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/index.js.map +1 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js +82 -0
- package/dist/_esm/modules/validators/smartSessionsValidator/toSmartSessionsValidator.js.map +1 -0
- package/dist/_esm/modules/validators/toValidator.js +17 -0
- package/dist/_esm/modules/validators/toValidator.js.map +1 -0
- package/dist/_esm/package.json +1 -0
- package/dist/_types/account/decorators/getFactoryData.d.ts +25 -0
- package/dist/_types/account/decorators/getFactoryData.d.ts.map +1 -0
- package/dist/_types/account/decorators/getStartaleAccountAddress.d.ts +33 -0
- package/dist/_types/account/decorators/getStartaleAccountAddress.d.ts.map +1 -0
- package/dist/_types/account/decorators/index.d.ts +3 -0
- package/dist/_types/account/decorators/index.d.ts.map +1 -0
- package/dist/_types/account/index.d.ts +3 -0
- package/dist/_types/account/index.d.ts.map +1 -0
- package/dist/_types/account/toStartaleSmartAccount.d.ts +120 -0
- package/dist/_types/account/toStartaleSmartAccount.d.ts.map +1 -0
- package/dist/_types/account/utils/AccountNotFound.d.ts +10 -0
- package/dist/_types/account/utils/AccountNotFound.d.ts.map +1 -0
- package/dist/_types/account/utils/Constants.d.ts +73 -0
- package/dist/_types/account/utils/Constants.d.ts.map +1 -0
- package/dist/_types/account/utils/Helpers.d.ts +21 -0
- package/dist/_types/account/utils/Helpers.d.ts.map +1 -0
- package/dist/_types/account/utils/Logger.d.ts +20 -0
- package/dist/_types/account/utils/Logger.d.ts.map +1 -0
- package/dist/_types/account/utils/Types.d.ts +94 -0
- package/dist/_types/account/utils/Types.d.ts.map +1 -0
- package/dist/_types/account/utils/Utils.d.ts +129 -0
- package/dist/_types/account/utils/Utils.d.ts.map +1 -0
- package/dist/_types/account/utils/addressToEmptyAccount.d.ts +4 -0
- package/dist/_types/account/utils/addressToEmptyAccount.d.ts.map +1 -0
- package/dist/_types/account/utils/contractSimulation.d.ts +801 -0
- package/dist/_types/account/utils/contractSimulation.d.ts.map +1 -0
- package/dist/_types/account/utils/deepHexlify.d.ts +41 -0
- package/dist/_types/account/utils/deepHexlify.d.ts.map +1 -0
- package/dist/_types/account/utils/eip7702Utils.d.ts +4 -0
- package/dist/_types/account/utils/eip7702Utils.d.ts.map +1 -0
- package/dist/_types/account/utils/fromBundlerClient.d.ts +50 -0
- package/dist/_types/account/utils/fromBundlerClient.d.ts.map +1 -0
- package/dist/_types/account/utils/getAAError.d.ts +17 -0
- package/dist/_types/account/utils/getAAError.d.ts.map +1 -0
- package/dist/_types/account/utils/getChain.d.ts +64 -0
- package/dist/_types/account/utils/getChain.d.ts.map +1 -0
- package/dist/_types/account/utils/getVersion.d.ts +135 -0
- package/dist/_types/account/utils/getVersion.d.ts.map +1 -0
- package/dist/_types/account/utils/index.d.ts +20 -0
- package/dist/_types/account/utils/index.d.ts.map +1 -0
- package/dist/_types/account/utils/parseErrorMessage.d.ts +2 -0
- package/dist/_types/account/utils/parseErrorMessage.d.ts.map +1 -0
- package/dist/_types/account/utils/tenderlySimulation.d.ts +13 -0
- package/dist/_types/account/utils/tenderlySimulation.d.ts.map +1 -0
- package/dist/_types/account/utils/toInitData.d.ts +12 -0
- package/dist/_types/account/utils/toInitData.d.ts.map +1 -0
- package/dist/_types/account/utils/toInstallData.d.ts +8 -0
- package/dist/_types/account/utils/toInstallData.d.ts.map +1 -0
- package/dist/_types/account/utils/toSigner.d.ts +26 -0
- package/dist/_types/account/utils/toSigner.d.ts.map +1 -0
- package/dist/_types/clients/createHttpClient.d.ts +44 -0
- package/dist/_types/clients/createHttpClient.d.ts.map +1 -0
- package/dist/_types/clients/createSCSBundlerClient.d.ts +66 -0
- package/dist/_types/clients/createSCSBundlerClient.d.ts.map +1 -0
- package/dist/_types/clients/createSCSPaymasterClient.d.ts +70 -0
- package/dist/_types/clients/createSCSPaymasterClient.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/getGasFeeValues.d.ts +51 -0
- package/dist/_types/clients/decorators/bundler/getGasFeeValues.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/index.d.ts +43 -0
- package/dist/_types/clients/decorators/bundler/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/bundler/waitForUserOperationReceipt.d.ts +5 -0
- package/dist/_types/clients/decorators/bundler/waitForUserOperationReceipt.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/accountId.d.ts +21 -0
- package/dist/_types/clients/decorators/erc7579/accountId.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getActiveHook.d.ts +35 -0
- package/dist/_types/clients/decorators/erc7579/getActiveHook.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getFallbackBySelector.d.ts +43 -0
- package/dist/_types/clients/decorators/erc7579/getFallbackBySelector.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledExecutors.d.ts +52 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledExecutors.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledValidators.d.ts +52 -0
- package/dist/_types/clients/decorators/erc7579/getInstalledValidators.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/getPreviousModule.d.ts +32 -0
- package/dist/_types/clients/decorators/erc7579/getPreviousModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/index.d.ts +165 -0
- package/dist/_types/clients/decorators/erc7579/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/installModule.d.ts +36 -0
- package/dist/_types/clients/decorators/erc7579/installModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/installModules.d.ts +36 -0
- package/dist/_types/clients/decorators/erc7579/installModules.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/isModuleInstalled.d.ts +54 -0
- package/dist/_types/clients/decorators/erc7579/isModuleInstalled.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/supportsExecutionMode.d.ts +54 -0
- package/dist/_types/clients/decorators/erc7579/supportsExecutionMode.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/supportsModule.d.ts +48 -0
- package/dist/_types/clients/decorators/erc7579/supportsModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/uninstallFallback.d.ts +35 -0
- package/dist/_types/clients/decorators/erc7579/uninstallFallback.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModule.d.ts +35 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModule.d.ts.map +1 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModules.d.ts +32 -0
- package/dist/_types/clients/decorators/erc7579/uninstallModules.d.ts.map +1 -0
- package/dist/_types/clients/decorators/index.d.ts +5 -0
- package/dist/_types/clients/decorators/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/debugUserOperation.d.ts +35 -0
- package/dist/_types/clients/decorators/smartAccount/debugUserOperation.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/index.d.ts +315 -0
- package/dist/_types/clients/decorators/smartAccount/index.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.d.ts +52 -0
- package/dist/_types/clients/decorators/smartAccount/prepareTokenPaymasterUserOp.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts +16 -0
- package/dist/_types/clients/decorators/smartAccount/prepareUserOperationWithoutSignature.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/sendTokenPaymasterUserOp.d.ts +36 -0
- package/dist/_types/clients/decorators/smartAccount/sendTokenPaymasterUserOp.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/sendTransaction.d.ts +23 -0
- package/dist/_types/clients/decorators/smartAccount/sendTransaction.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/signMessage.d.ts +23 -0
- package/dist/_types/clients/decorators/smartAccount/signMessage.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/signTypedData.d.ts +60 -0
- package/dist/_types/clients/decorators/smartAccount/signTypedData.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/upgradeSmartAccount.d.ts +40 -0
- package/dist/_types/clients/decorators/smartAccount/upgradeSmartAccount.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/waitForTransactionReceipt.d.ts +6 -0
- package/dist/_types/clients/decorators/smartAccount/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/_types/clients/decorators/smartAccount/writeContract.d.ts +27 -0
- package/dist/_types/clients/decorators/smartAccount/writeContract.d.ts.map +1 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getSupportedTokens.d.ts +16 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getSupportedTokens.d.ts.map +1 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.d.ts +93 -0
- package/dist/_types/clients/decorators/tokenPaymaster/getTokenPaymasterQuotes.d.ts.map +1 -0
- package/dist/_types/clients/decorators/tokenPaymaster/index.d.ts +65 -0
- package/dist/_types/clients/decorators/tokenPaymaster/index.d.ts.map +1 -0
- package/dist/_types/clients/index.d.ts +5 -0
- package/dist/_types/clients/index.d.ts.map +1 -0
- package/dist/_types/constants/abi/AccountFactory.d.ts +259 -0
- package/dist/_types/constants/abi/AccountFactory.d.ts.map +1 -0
- package/dist/_types/constants/abi/AccountImplementationAbi.d.ts +903 -0
- package/dist/_types/constants/abi/AccountImplementationAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/BootstrapAbi.d.ts +554 -0
- package/dist/_types/constants/abi/BootstrapAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/ComposabilityAbi.d.ts +67 -0
- package/dist/_types/constants/abi/ComposabilityAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/EIP1271Abi.d.ts +54 -0
- package/dist/_types/constants/abi/EIP1271Abi.d.ts.map +1 -0
- package/dist/_types/constants/abi/ERC7484RegistryAbi.d.ts +16 -0
- package/dist/_types/constants/abi/ERC7484RegistryAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/EntryPointABI.d.ts +776 -0
- package/dist/_types/constants/abi/EntryPointABI.d.ts.map +1 -0
- package/dist/_types/constants/abi/SmartSessionAbi.d.ts +90 -0
- package/dist/_types/constants/abi/SmartSessionAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/TokenWithPermitAbi.d.ts +477 -0
- package/dist/_types/constants/abi/TokenWithPermitAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/UniActionPolicyAbi.d.ts +33 -0
- package/dist/_types/constants/abi/UniActionPolicyAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/UniswapSwapRouterAbi.d.ts +821 -0
- package/dist/_types/constants/abi/UniswapSwapRouterAbi.d.ts.map +1 -0
- package/dist/_types/constants/abi/index.d.ts +11 -0
- package/dist/_types/constants/abi/index.d.ts.map +1 -0
- package/dist/_types/constants/index.d.ts +20 -0
- package/dist/_types/constants/index.d.ts.map +1 -0
- package/dist/_types/index.d.ts +7 -0
- package/dist/_types/index.d.ts.map +1 -0
- package/dist/_types/modules/index.d.ts +6 -0
- package/dist/_types/modules/index.d.ts.map +1 -0
- package/dist/_types/modules/toEmptyExecutor.d.ts +3 -0
- package/dist/_types/modules/toEmptyExecutor.d.ts.map +1 -0
- package/dist/_types/modules/toEmptyHook.d.ts +3 -0
- package/dist/_types/modules/toEmptyHook.d.ts.map +1 -0
- package/dist/_types/modules/utils/Helpers.d.ts +48 -0
- package/dist/_types/modules/utils/Helpers.d.ts.map +1 -0
- package/dist/_types/modules/utils/Types.d.ts +103 -0
- package/dist/_types/modules/utils/Types.d.ts.map +1 -0
- package/dist/_types/modules/utils/Uid.d.ts +2 -0
- package/dist/_types/modules/utils/Uid.d.ts.map +1 -0
- package/dist/_types/modules/utils/composabilityCalls.d.ts +63 -0
- package/dist/_types/modules/utils/composabilityCalls.d.ts.map +1 -0
- package/dist/_types/modules/utils/index.d.ts +6 -0
- package/dist/_types/modules/utils/index.d.ts.map +1 -0
- package/dist/_types/modules/utils/runtimeAbiEncoding.d.ts +18 -0
- package/dist/_types/modules/utils/runtimeAbiEncoding.d.ts.map +1 -0
- package/dist/_types/modules/utils/toModule.d.ts +28 -0
- package/dist/_types/modules/utils/toModule.d.ts.map +1 -0
- package/dist/_types/modules/validators/default/index.d.ts +2 -0
- package/dist/_types/modules/validators/default/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/default/toDefaultModule.d.ts +3 -0
- package/dist/_types/modules/validators/default/toDefaultModule.d.ts.map +1 -0
- package/dist/_types/modules/validators/index.d.ts +6 -0
- package/dist/_types/modules/validators/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/addOwner.d.ts +36 -0
- package/dist/_types/modules/validators/ownable/decorators/addOwner.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getAddOwnerTx.d.ts +30 -0
- package/dist/_types/modules/validators/ownable/decorators/getAddOwnerTx.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getOwners.d.ts +25 -0
- package/dist/_types/modules/validators/ownable/decorators/getOwners.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getRemoveOwnerTx.d.ts +30 -0
- package/dist/_types/modules/validators/ownable/decorators/getRemoveOwnerTx.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getSetThresholdTx.d.ts +39 -0
- package/dist/_types/modules/validators/ownable/decorators/getSetThresholdTx.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/getThreshold.d.ts +40 -0
- package/dist/_types/modules/validators/ownable/decorators/getThreshold.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/index.d.ts +37 -0
- package/dist/_types/modules/validators/ownable/decorators/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/multiSign.d.ts +11 -0
- package/dist/_types/modules/validators/ownable/decorators/multiSign.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/prepareForMultiSign.d.ts +25 -0
- package/dist/_types/modules/validators/ownable/decorators/prepareForMultiSign.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/removeOwner.d.ts +47 -0
- package/dist/_types/modules/validators/ownable/decorators/removeOwner.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/decorators/setThreshold.d.ts +51 -0
- package/dist/_types/modules/validators/ownable/decorators/setThreshold.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/index.d.ts +3 -0
- package/dist/_types/modules/validators/ownable/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/ownable/toOwnableModule.d.ts +44 -0
- package/dist/_types/modules/validators/ownable/toOwnableModule.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts +98 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Helpers.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts +262 -0
- package/dist/_types/modules/validators/smartSessionsValidator/Types.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts +73 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/grantPermission.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/index.d.ts +79 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts +81 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/preparePermission.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/revokeSession.d.ts +55 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/revokeSession.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts +63 -0
- package/dist/_types/modules/validators/smartSessionsValidator/decorators/usePermission.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/index.d.ts +5 -0
- package/dist/_types/modules/validators/smartSessionsValidator/index.d.ts.map +1 -0
- package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts +65 -0
- package/dist/_types/modules/validators/smartSessionsValidator/toSmartSessionsValidator.d.ts.map +1 -0
- package/dist/_types/modules/validators/toValidator.d.ts +45 -0
- package/dist/_types/modules/validators/toValidator.d.ts.map +1 -0
- package/package.json +134 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
/**
|
|
3
|
+
* Single class to be used for logging purpose.
|
|
4
|
+
*
|
|
5
|
+
* @param {any} message Message to be logged
|
|
6
|
+
*/
|
|
7
|
+
import { isDebugging } from "./Helpers.js";
|
|
8
|
+
// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>
|
|
9
|
+
class Logger {
|
|
10
|
+
/**
|
|
11
|
+
* \x1b[0m is an escape sequence to reset the color of the text
|
|
12
|
+
* All color codes used - 31 - Red, 33 - Yellow, 34 - Blue, 35 - Magenta, 36 - Cyan
|
|
13
|
+
* log - Magenta[time] Cyan[message]: [value]
|
|
14
|
+
* warn - Magenta[time] Yellow[WARN]: Cyan[message]: [value]
|
|
15
|
+
* error - Magenta[time] Red[ERROR]: Cyan[message]: [value]
|
|
16
|
+
*/
|
|
17
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
18
|
+
static log(message, value = "") {
|
|
19
|
+
const timestamp = new Date().toISOString();
|
|
20
|
+
const logMessage = `\x1b[35m[${timestamp}]\x1b[0m \x1b[36m${message}\x1b[0m:`;
|
|
21
|
+
if (Logger.isDebug) {
|
|
22
|
+
console.log(logMessage, value === undefined ? "" : value);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
26
|
+
static warn(message, value = "") {
|
|
27
|
+
const timestamp = new Date().toISOString();
|
|
28
|
+
const warnMessage = `\x1b[35m[${timestamp}]\x1b[0m \x1b[33mWARN\x1b[0m: \x1b[36m${message}\x1b[0m`;
|
|
29
|
+
if (Logger.isDebug) {
|
|
30
|
+
console.warn(warnMessage, value === undefined ? "" : value);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
34
|
+
static error(message, value = "") {
|
|
35
|
+
const timestamp = new Date().toISOString();
|
|
36
|
+
const errorMessage = `\x1b[35m[${timestamp}]\x1b[0m \x1b[31mERROR\x1b[0m: \x1b[36m${message}\x1b[0m`;
|
|
37
|
+
if (Logger.isDebug) {
|
|
38
|
+
console.error(errorMessage, value === undefined ? "" : value);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// By default, the logger is not in debug mode.
|
|
43
|
+
Object.defineProperty(Logger, "isDebug", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
writable: true,
|
|
47
|
+
value: isDebugging()
|
|
48
|
+
});
|
|
49
|
+
export { Logger };
|
|
50
|
+
//# sourceMappingURL=Logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/Logger.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,gEAAgE;AAChE,MAAM,MAAM;IAIV;;;;;;OAMG;IAEH,4DAA4D;IAC5D,MAAM,CAAC,GAAG,CAAC,OAAe,EAAE,QAAa,EAAE;QACzC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;QAC1C,MAAM,UAAU,GAAG,YAAY,SAAS,oBAAoB,OAAO,UAAU,CAAA;QAE7E,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;QAC3D,CAAC;IACH,CAAC;IACD,4DAA4D;IAC5D,MAAM,CAAC,IAAI,CAAC,OAAe,EAAE,QAAa,EAAE;QAC1C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;QAC1C,MAAM,WAAW,GAAG,YAAY,SAAS,yCAAyC,OAAO,SAAS,CAAA;QAElG,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC;IACD,4DAA4D;IAC5D,MAAM,CAAC,KAAK,CAAC,OAAe,EAAE,QAAa,EAAE;QAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;QAC1C,MAAM,YAAY,GAAG,YAAY,SAAS,0CAA0C,OAAO,SAAS,CAAA;QAEpG,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;QAC/D,CAAC;IACH,CAAC;;AArCD,+CAA+C;AACxC;;;;WAAmB,WAAW,EAAE;GAAA;AAuCzC,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/Types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { concat, decodeFunctionResult, encodeAbiParameters, encodeFunctionData, erc20Abi, hexToBytes, keccak256, parseAbi, parseAbiParameters, publicActions, stringToBytes, toBytes, toHex } from "viem";
|
|
2
|
+
import { ACCOUNT_DOMAIN_NAME, ACCOUNT_DOMAIN_TYPEHASH, ACCOUNT_DOMAIN_VERSION, MOCK_MULTI_MODULE_ADDRESS, MODULE_ENABLE_MODE_TYPE_HASH, STARTALE_TOKEN_PAYMASTER } from "../../account/utils/Constants.js";
|
|
3
|
+
import { EIP1271Abi } from "../../constants/abi/index.js";
|
|
4
|
+
import { moduleTypeIds } from "../../modules/utils/Types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Type guard to check if a value is null or undefined.
|
|
7
|
+
*
|
|
8
|
+
* @param value - The value to check
|
|
9
|
+
* @returns True if the value is null or undefined
|
|
10
|
+
*/
|
|
11
|
+
export const isNullOrUndefined = (value) => {
|
|
12
|
+
return value === null || value === undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Validates if a string is a valid RPC URL.
|
|
16
|
+
*
|
|
17
|
+
* @param url - The URL to validate
|
|
18
|
+
* @returns True if the URL is a valid RPC endpoint
|
|
19
|
+
*/
|
|
20
|
+
export const isValidRpcUrl = (url) => {
|
|
21
|
+
const regex = /^(http:\/\/|wss:\/\/|https:\/\/).*/;
|
|
22
|
+
return regex.test(url);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Compares two addresses for equality, case-insensitive.
|
|
26
|
+
*
|
|
27
|
+
* @param a - First address
|
|
28
|
+
* @param b - Second address
|
|
29
|
+
* @returns True if addresses are equal
|
|
30
|
+
*/
|
|
31
|
+
export const addressEquals = (a, b) => !!a && !!b && a?.toLowerCase() === b.toLowerCase();
|
|
32
|
+
/**
|
|
33
|
+
* Wraps a signature according to EIP-6492 specification.
|
|
34
|
+
*
|
|
35
|
+
* @param params - Parameters including factory address, calldata, and signature
|
|
36
|
+
* @returns The wrapped signature
|
|
37
|
+
*/
|
|
38
|
+
export const wrapSignatureWith6492 = ({ factoryAddress, factoryCalldata, signature }) => {
|
|
39
|
+
// wrap the signature as follows: https://eips.ethereum.org/EIPS/eip-6492
|
|
40
|
+
// concat(
|
|
41
|
+
// abi.encode(
|
|
42
|
+
// (create2Factory, factoryCalldata, originalERC1271Signature),
|
|
43
|
+
// (address, bytes, bytes)),
|
|
44
|
+
// magicBytes
|
|
45
|
+
// )
|
|
46
|
+
return concat([
|
|
47
|
+
encodeAbiParameters(parseAbiParameters("address, bytes, bytes"), [
|
|
48
|
+
factoryAddress,
|
|
49
|
+
factoryCalldata,
|
|
50
|
+
signature
|
|
51
|
+
]),
|
|
52
|
+
"0x6492649264926492649264926492649264926492649264926492649264926492"
|
|
53
|
+
]);
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Calculates the percentage of a partial value relative to a total value.
|
|
57
|
+
*
|
|
58
|
+
* @param partialValue - The partial value
|
|
59
|
+
* @param totalValue - The total value
|
|
60
|
+
* @returns The percentage as a number
|
|
61
|
+
*/
|
|
62
|
+
export function percentage(partialValue, totalValue) {
|
|
63
|
+
return (100 * partialValue) / totalValue;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Converts a percentage to a factor (e.g., 50% -> 1.5).
|
|
67
|
+
*
|
|
68
|
+
* @param percentage - The percentage value (1-100)
|
|
69
|
+
* @returns The converted factor
|
|
70
|
+
* @throws If percentage is outside valid range
|
|
71
|
+
*/
|
|
72
|
+
export function convertToFactor(percentage) {
|
|
73
|
+
// Check if the input is within the valid range
|
|
74
|
+
if (percentage) {
|
|
75
|
+
if (percentage < 1 || percentage > 100) {
|
|
76
|
+
throw new Error("The percentage value should be between 1 and 100.");
|
|
77
|
+
}
|
|
78
|
+
// Calculate the factor
|
|
79
|
+
const factor = percentage / 100 + 1;
|
|
80
|
+
return factor;
|
|
81
|
+
}
|
|
82
|
+
return 1;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Generates installation data and hash for module installation.
|
|
86
|
+
*
|
|
87
|
+
* @param accountOwner - The account owner address
|
|
88
|
+
* @param modules - Array of modules with their types and configurations
|
|
89
|
+
* @param domainName - Optional domain name
|
|
90
|
+
* @param domainVersion - Optional domain version
|
|
91
|
+
* @returns Tuple of [installData, hash]
|
|
92
|
+
*/
|
|
93
|
+
export function makeInstallDataAndHash(accountOwner, modules, domainName = ACCOUNT_DOMAIN_NAME, domainVersion = ACCOUNT_DOMAIN_VERSION) {
|
|
94
|
+
const types = modules.map((module) => BigInt(moduleTypeIds[module.type]));
|
|
95
|
+
const initDatas = modules.map((module) => toHex(concat([toBytes(BigInt(moduleTypeIds[module.type])), module.config])));
|
|
96
|
+
const multiInstallData = encodeAbiParameters([{ type: "uint256[]" }, { type: "bytes[]" }], [types, initDatas]);
|
|
97
|
+
const structHash = keccak256(encodeAbiParameters([{ type: "bytes32" }, { type: "address" }, { type: "bytes32" }], [
|
|
98
|
+
MODULE_ENABLE_MODE_TYPE_HASH,
|
|
99
|
+
MOCK_MULTI_MODULE_ADDRESS,
|
|
100
|
+
keccak256(multiInstallData)
|
|
101
|
+
]));
|
|
102
|
+
const hashToSign = _hashTypedData(structHash, domainName, domainVersion, accountOwner);
|
|
103
|
+
return [multiInstallData, hashToSign];
|
|
104
|
+
}
|
|
105
|
+
export function _hashTypedData(structHash, name, version, verifyingContract) {
|
|
106
|
+
const DOMAIN_SEPARATOR = keccak256(encodeAbiParameters([
|
|
107
|
+
{ type: "bytes32" },
|
|
108
|
+
{ type: "bytes32" },
|
|
109
|
+
{ type: "bytes32" },
|
|
110
|
+
{ type: "address" }
|
|
111
|
+
], [
|
|
112
|
+
keccak256(stringToBytes(ACCOUNT_DOMAIN_TYPEHASH)),
|
|
113
|
+
keccak256(stringToBytes(name)),
|
|
114
|
+
keccak256(stringToBytes(version)),
|
|
115
|
+
verifyingContract
|
|
116
|
+
]));
|
|
117
|
+
return keccak256(concat([
|
|
118
|
+
stringToBytes("\x19\x01"),
|
|
119
|
+
hexToBytes(DOMAIN_SEPARATOR),
|
|
120
|
+
hexToBytes(structHash)
|
|
121
|
+
]));
|
|
122
|
+
}
|
|
123
|
+
export function getTypesForEIP712Domain({ domain }) {
|
|
124
|
+
return [
|
|
125
|
+
typeof domain?.name === "string" && { name: "name", type: "string" },
|
|
126
|
+
domain?.version && { name: "version", type: "string" },
|
|
127
|
+
typeof domain?.chainId === "number" && {
|
|
128
|
+
name: "chainId",
|
|
129
|
+
type: "uint256"
|
|
130
|
+
},
|
|
131
|
+
domain?.verifyingContract && {
|
|
132
|
+
name: "verifyingContract",
|
|
133
|
+
type: "address"
|
|
134
|
+
},
|
|
135
|
+
domain?.salt && { name: "salt", type: "bytes32" }
|
|
136
|
+
].filter(Boolean);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Retrieves account metadata including name, version, and chain ID.
|
|
140
|
+
*
|
|
141
|
+
* @param client - The viem Client instance
|
|
142
|
+
* @param accountAddress - The account address to query
|
|
143
|
+
* @returns Promise resolving to account metadata
|
|
144
|
+
*/
|
|
145
|
+
export const getAccountMeta = async (client, accountAddress) => {
|
|
146
|
+
try {
|
|
147
|
+
const domain = await client.request({
|
|
148
|
+
method: "eth_call",
|
|
149
|
+
params: [
|
|
150
|
+
{
|
|
151
|
+
to: accountAddress,
|
|
152
|
+
data: encodeFunctionData({
|
|
153
|
+
abi: EIP1271Abi,
|
|
154
|
+
functionName: "eip712Domain"
|
|
155
|
+
})
|
|
156
|
+
},
|
|
157
|
+
"latest"
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
if (domain !== "0x") {
|
|
161
|
+
const decoded = decodeFunctionResult({
|
|
162
|
+
abi: EIP1271Abi,
|
|
163
|
+
functionName: "eip712Domain",
|
|
164
|
+
data: domain
|
|
165
|
+
});
|
|
166
|
+
return {
|
|
167
|
+
name: decoded?.[1],
|
|
168
|
+
version: decoded?.[2],
|
|
169
|
+
chainId: decoded?.[3]
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch (error) { }
|
|
174
|
+
return {
|
|
175
|
+
name: ACCOUNT_DOMAIN_NAME,
|
|
176
|
+
version: ACCOUNT_DOMAIN_VERSION,
|
|
177
|
+
chainId: client.chain
|
|
178
|
+
? BigInt(client.chain.id)
|
|
179
|
+
: BigInt(await client.extend(publicActions).getChainId())
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Wraps a typed data hash with EIP-712 domain separator.
|
|
184
|
+
*
|
|
185
|
+
* @param typedHash - The hash to wrap
|
|
186
|
+
* @param appDomainSeparator - The domain separator
|
|
187
|
+
* @returns The wrapped hash
|
|
188
|
+
*/
|
|
189
|
+
export const eip712WrapHash = (typedHash, appDomainSeparator) => keccak256(concat(["0x1901", appDomainSeparator, typedHash]));
|
|
190
|
+
export function typeToString(typeDef) {
|
|
191
|
+
return Object.entries(typeDef).map(([key, fields]) => {
|
|
192
|
+
const fieldStrings = (fields ?? [])
|
|
193
|
+
.map((field) => `${field.type} ${field.name}`)
|
|
194
|
+
.join(",");
|
|
195
|
+
return `${key}(${fieldStrings})`;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/** @ignore */
|
|
199
|
+
export function bigIntReplacer(_key, value) {
|
|
200
|
+
return typeof value === "bigint" ? value.toString() : value;
|
|
201
|
+
}
|
|
202
|
+
export function numberTo3Bytes(key) {
|
|
203
|
+
// todo: check range
|
|
204
|
+
const buffer = new Uint8Array(3);
|
|
205
|
+
buffer[0] = Number((key >> 16n) & 0xffn);
|
|
206
|
+
buffer[1] = Number((key >> 8n) & 0xffn);
|
|
207
|
+
buffer[2] = Number(key & 0xffn);
|
|
208
|
+
return buffer;
|
|
209
|
+
}
|
|
210
|
+
export function toHexString(byteArray) {
|
|
211
|
+
return Array.from(byteArray)
|
|
212
|
+
.map((byte) => byte.toString(16).padStart(2, "0")) // Convert each byte to hex and pad to 2 digits
|
|
213
|
+
.join(""); // Join all hex values together into a single string
|
|
214
|
+
}
|
|
215
|
+
export const getAccountDomainStructFields = async (publicClient, accountAddress) => {
|
|
216
|
+
const accountDomainStructFields = (await publicClient.readContract({
|
|
217
|
+
address: accountAddress,
|
|
218
|
+
abi: parseAbi([
|
|
219
|
+
"function eip712Domain() public view returns (bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions)"
|
|
220
|
+
]),
|
|
221
|
+
functionName: "eip712Domain"
|
|
222
|
+
}));
|
|
223
|
+
const [, name, version, chainId, verifyingContract, salt] = accountDomainStructFields;
|
|
224
|
+
const params = parseAbiParameters([
|
|
225
|
+
"bytes32",
|
|
226
|
+
"bytes32",
|
|
227
|
+
"uint256",
|
|
228
|
+
"address",
|
|
229
|
+
"bytes32"
|
|
230
|
+
]);
|
|
231
|
+
return encodeAbiParameters(params, [
|
|
232
|
+
keccak256(toBytes(name)),
|
|
233
|
+
keccak256(toBytes(version)),
|
|
234
|
+
chainId,
|
|
235
|
+
verifyingContract,
|
|
236
|
+
salt
|
|
237
|
+
]);
|
|
238
|
+
};
|
|
239
|
+
export const inProduction = () => {
|
|
240
|
+
try {
|
|
241
|
+
return process?.env?.environment === "production";
|
|
242
|
+
}
|
|
243
|
+
catch (e) {
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
export const playgroundTrue = () => {
|
|
248
|
+
try {
|
|
249
|
+
return process?.env?.RUN_PLAYGROUND === "true";
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
export const getTenderlyDetails = () => {
|
|
256
|
+
try {
|
|
257
|
+
const accountSlug = process?.env?.TENDERLY_ACCOUNT_SLUG;
|
|
258
|
+
const projectSlug = process?.env?.TENDERLY_PROJECT_SLUG;
|
|
259
|
+
const apiKey = process?.env?.TENDERLY_API_KEY;
|
|
260
|
+
if (!accountSlug || !projectSlug || !apiKey) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
accountSlug,
|
|
265
|
+
projectSlug,
|
|
266
|
+
apiKey
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
catch (e) {
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Safely multiplies a bigint by a number, rounding appropriately.
|
|
275
|
+
*
|
|
276
|
+
* @param bI - The bigint to multiply
|
|
277
|
+
* @param multiplier - The multiplication factor
|
|
278
|
+
* @returns The multiplied bigint
|
|
279
|
+
*/
|
|
280
|
+
export const safeMultiplier = (bI, multiplier) => BigInt(Math.round(Number(bI) * multiplier));
|
|
281
|
+
export const getAllowance = async (client, owner, tokenAddress, grantee = STARTALE_TOKEN_PAYMASTER) => {
|
|
282
|
+
const approval = await client.readContract({
|
|
283
|
+
address: tokenAddress,
|
|
284
|
+
abi: erc20Abi,
|
|
285
|
+
functionName: "allowance",
|
|
286
|
+
args: [owner, grantee]
|
|
287
|
+
});
|
|
288
|
+
return approval;
|
|
289
|
+
};
|
|
290
|
+
export function parseRequestArguments(input) {
|
|
291
|
+
const fieldsToOmit = [
|
|
292
|
+
"callGasLimit",
|
|
293
|
+
"preVerificationGas",
|
|
294
|
+
"maxFeePerGas",
|
|
295
|
+
"maxPriorityFeePerGas",
|
|
296
|
+
"paymasterAndData",
|
|
297
|
+
"verificationGasLimit"
|
|
298
|
+
];
|
|
299
|
+
// Skip the first element which is just "Request Arguments:"
|
|
300
|
+
const argsString = input.slice(1).join("");
|
|
301
|
+
// Split by newlines and filter out empty lines
|
|
302
|
+
const lines = argsString.split("\n").filter((line) => line.trim());
|
|
303
|
+
// Create an object from the key-value pairs
|
|
304
|
+
const result = lines.reduce((acc, line) => {
|
|
305
|
+
// Remove extra spaces and split by ':'
|
|
306
|
+
const [key, value] = line.split(":").map((s) => s.trim());
|
|
307
|
+
// Clean up the key (remove trailing spaces and colons)
|
|
308
|
+
const cleanKey = key.trim();
|
|
309
|
+
// Clean up the value (remove 'gwei' and other units)
|
|
310
|
+
const cleanValue = value.replace("gwei", "").trim();
|
|
311
|
+
if (fieldsToOmit.includes(cleanKey)) {
|
|
312
|
+
return acc;
|
|
313
|
+
}
|
|
314
|
+
acc[cleanKey] = cleanValue;
|
|
315
|
+
return acc;
|
|
316
|
+
}, {});
|
|
317
|
+
return result;
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=Utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,MAAM,EACN,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,OAAO,EACP,KAAK,EACN,MAAM,MAAM,CAAA;AACb,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAGL,aAAa,EACd,MAAM,2BAA2B,CAAA;AAGlC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAsB,EAAE;IACtE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAA;AAC9C,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAAE;IACpD,MAAM,KAAK,GAAG,oCAAoC,CAAA;IAClD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAU,EAAE,CAAU,EAAW,EAAE,CAC/D,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,WAAW,E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C,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;QAEzD,uDAAuD;QACvD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,EAAE,CAAA;QAE3B,qDAAqD;QACrD,MAAM,UAAU,GAAoB,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;QAEpE,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpC,OAAO,GAAG,CAAA;QACZ,CAAC;QAED,GAAG,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAA;QAC1B,OAAO,GAAG,CAAA;IACZ,CAAC,EACD,EAAqC,CACtC,CAAA;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { toAccount } from "viem/accounts";
|
|
2
|
+
export function addressToEmptyAccount(address) {
|
|
3
|
+
const account = toAccount({
|
|
4
|
+
address,
|
|
5
|
+
async signMessage() {
|
|
6
|
+
throw new Error("Method not supported");
|
|
7
|
+
},
|
|
8
|
+
async signTransaction(_transaction) {
|
|
9
|
+
throw new Error("Method not supported");
|
|
10
|
+
},
|
|
11
|
+
async signTypedData(_typedData) {
|
|
12
|
+
throw new Error("Method not supported");
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return {
|
|
16
|
+
...account,
|
|
17
|
+
publicKey: "0x",
|
|
18
|
+
source: "empty"
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=addressToEmptyAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addressToEmptyAccount.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/addressToEmptyAccount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,MAAM,OAAO,GAAG,SAAS,CAAC;QACxB,OAAO;QACP,KAAK,CAAC,WAAW;YACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACzC,CAAC;QACD,KAAK,CAAC,eAAe,CAAC,YAAY;YAChC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACzC,CAAC;QACD,KAAK,CAAC,aAAa,CAAC,UAAU;YAC5B,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACzC,CAAC;KACF,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,OAAO;QACV,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,OAAO;KAChB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { http, createPublicClient, parseEther } from "viem";
|
|
2
|
+
import { ENTRY_POINT_ADDRESS, EntrypointAbi } from "../../constants/index.js";
|
|
3
|
+
import { getChain } from "./getChain.js";
|
|
4
|
+
import { getSimulationUserOp } from "./tenderlySimulation.js";
|
|
5
|
+
/**
|
|
6
|
+
* Simulates a user operation through the EntryPoint contract
|
|
7
|
+
*
|
|
8
|
+
* @param partialUserOp - {@link AnyUserOperation} The user operation to simulate
|
|
9
|
+
* @param chainId - The numeric ID of the chain to simulate on
|
|
10
|
+
*
|
|
11
|
+
* @returns Promise resolving to the simulation result from the EntryPoint contract
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* This function creates a temporary public client and simulates the operation with
|
|
15
|
+
* a state override that ensures the sender has sufficient balance (1000 ETH).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const userOp = {
|
|
19
|
+
* sender: "0x123...",
|
|
20
|
+
* nonce: 0n,
|
|
21
|
+
* initCode: "0x",
|
|
22
|
+
* callData: "0x...",
|
|
23
|
+
* // ... other UserOperation fields
|
|
24
|
+
* };
|
|
25
|
+
*
|
|
26
|
+
* const simulation = await contractSimulation(userOp, 1); // Simulate on mainnet
|
|
27
|
+
* console.log("Simulation successful:", simulation.result);
|
|
28
|
+
*/
|
|
29
|
+
export async function contractSimulation(partialUserOp, chainId) {
|
|
30
|
+
const packed = getSimulationUserOp(partialUserOp);
|
|
31
|
+
return createPublicClient({
|
|
32
|
+
chain: getChain(chainId),
|
|
33
|
+
transport: http()
|
|
34
|
+
}).simulateContract({
|
|
35
|
+
account: partialUserOp.sender,
|
|
36
|
+
address: ENTRY_POINT_ADDRESS,
|
|
37
|
+
abi: EntrypointAbi,
|
|
38
|
+
functionName: "handleOps",
|
|
39
|
+
args: [[packed], packed.sender],
|
|
40
|
+
stateOverride: [
|
|
41
|
+
{
|
|
42
|
+
address: partialUserOp.sender,
|
|
43
|
+
balance: parseEther("1000")
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=contractSimulation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractSimulation.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/contractSimulation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,kBAAkB,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,aAA+B,EAC/B,OAAe;IAEf,MAAM,MAAM,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAA;IAEjD,OAAO,kBAAkB,CAAC;QACxB,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC;QACxB,SAAS,EAAE,IAAI,EAAE;KAClB,CAAC,CAAC,gBAAgB,CAAC;QAClB,OAAO,EAAE,aAAa,CAAC,MAAiB;QACxC,OAAO,EAAE,mBAAmB;QAC5B,GAAG,EAAE,aAAa;QAClB,YAAY,EAAE,WAAW;QACzB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC;QAC/B,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,aAAa,CAAC,MAAiB;gBACxC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { toHex } from "viem";
|
|
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 function deepHexlify(obj) {
|
|
41
|
+
if (typeof obj === "function") {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (obj == null || typeof obj === "string" || typeof obj === "boolean") {
|
|
45
|
+
return obj;
|
|
46
|
+
}
|
|
47
|
+
if (typeof obj === "bigint") {
|
|
48
|
+
return toHex(obj);
|
|
49
|
+
}
|
|
50
|
+
if (obj._isBigNumber != null || typeof obj !== "object") {
|
|
51
|
+
return toHex(obj).replace(/^0x0/, "0x");
|
|
52
|
+
}
|
|
53
|
+
if (Array.isArray(obj)) {
|
|
54
|
+
return obj.map((member) => deepHexlify(member));
|
|
55
|
+
}
|
|
56
|
+
return Object.keys(obj).reduce(
|
|
57
|
+
// biome-ignore lint/suspicious/noExplicitAny: it's a recursive function, so it's hard to type
|
|
58
|
+
(set, key) => {
|
|
59
|
+
set[key] = deepHexlify(obj[key]);
|
|
60
|
+
return set;
|
|
61
|
+
}, {});
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=deepHexlify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepHexlify.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/deepHexlify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE,CAAC;QACvE,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,IAAI,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACxD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM;IAC5B,8FAA8F;IAC9F,CAAC,GAAQ,EAAE,GAAW,EAAE,EAAE;QACxB,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QAChC,OAAO,GAAG,CAAA;IACZ,CAAC,EACD,EAAE,CACH,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { STARTALE_7702_DELEGATION_ADDRESS } from "../../constants/index.js";
|
|
2
|
+
export const isEip7702 = async (publicClient, address) => {
|
|
3
|
+
const code = await publicClient.getCode({ address });
|
|
4
|
+
return (!!code &&
|
|
5
|
+
code
|
|
6
|
+
?.toLowerCase()
|
|
7
|
+
.includes(STARTALE_7702_DELEGATION_ADDRESS.substring(2).toLowerCase()));
|
|
8
|
+
};
|
|
9
|
+
export const getEip7702Authorization = async (walletClient, delegationAddress) => {
|
|
10
|
+
const contractAddress = delegationAddress || STARTALE_7702_DELEGATION_ADDRESS;
|
|
11
|
+
const authorization = await walletClient.signAuthorization({
|
|
12
|
+
address: contractAddress
|
|
13
|
+
});
|
|
14
|
+
return authorization;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=eip7702Utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip7702Utils.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/eip7702Utils.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAA;AAElE,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,YAA0B,EAC1B,OAAgB,EAChB,EAAE;IACF,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IACpD,OAAO,CACL,CAAC,CAAC,IAAI;QACN,IAAI;YACF,EAAE,WAAW,EAAE;aACd,QAAQ,CAAC,gCAAgC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CACzE,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAC1C,YAA4E,EAC5E,iBAA2B,EACW,EAAE;IACxC,MAAM,eAAe,GAAG,iBAAiB,IAAI,gCAAgC,CAAA;IAC7E,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC;QACzD,OAAO,EAAE,eAAe;KACzB,CAAC,CAAA;IACF,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the PublicClient from a bundler client
|
|
3
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
4
|
+
* @returns {PublicClient<Transport, Chain, Account>} The public client instance
|
|
5
|
+
* @throws {Error} If the Smart account is not found
|
|
6
|
+
*/
|
|
7
|
+
export const fromBundlerClientToPublicClient = (bundlerClient) => {
|
|
8
|
+
const startaleAccount = fromBundlerClientToStartaleAccount(bundlerClient);
|
|
9
|
+
if (!startaleAccount.client) {
|
|
10
|
+
throw new Error("Public client not found");
|
|
11
|
+
}
|
|
12
|
+
return startaleAccount.client;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Extracts the StartaleSmartAccount from a bundler client
|
|
16
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
17
|
+
* @returns {StartaleSmartAccount} The Startale smart account instance
|
|
18
|
+
* @throws {Error} If the account is not a valid Startale smart account
|
|
19
|
+
*/
|
|
20
|
+
export const fromBundlerClientToStartaleAccount = (bundlerClient) => {
|
|
21
|
+
const startaleAccount = bundlerClient.account;
|
|
22
|
+
if (!startaleAccount.type || startaleAccount.type !== "smart") {
|
|
23
|
+
throw new Error("Startale account not found");
|
|
24
|
+
}
|
|
25
|
+
return bundlerClient.account;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Extracts the Chain information from a bundler client
|
|
29
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
30
|
+
* @returns {Chain} The chain information
|
|
31
|
+
* @throws {Error} If the chain information is not found
|
|
32
|
+
*/
|
|
33
|
+
export const fromBundlerClientToChain = (bundlerClient) => {
|
|
34
|
+
const startaleAccount = fromBundlerClientToStartaleAccount(bundlerClient);
|
|
35
|
+
const chain = startaleAccount.chain;
|
|
36
|
+
if (!chain.id) {
|
|
37
|
+
throw new Error("Chain not found");
|
|
38
|
+
}
|
|
39
|
+
return chain;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Extracts the chain ID from a bundler client
|
|
43
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
44
|
+
* @returns {number} The chain ID
|
|
45
|
+
* @throws {Error} If the chain information is not found
|
|
46
|
+
*/
|
|
47
|
+
export const fromBundlerClientToChainId = (bundlerClient) => {
|
|
48
|
+
const chain = fromBundlerClientToChain(bundlerClient);
|
|
49
|
+
if (!chain.id) {
|
|
50
|
+
throw new Error("Chain ID not found");
|
|
51
|
+
}
|
|
52
|
+
return chain.id;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Extracts the Signer from a bundler client
|
|
56
|
+
* @param {BundlerClientTypes} bundlerClient - The bundler client to extract from
|
|
57
|
+
* @returns {Signer} The signer instance
|
|
58
|
+
* @throws {Error} If the Startale smart account is not found
|
|
59
|
+
*/
|
|
60
|
+
export const fromBundlerClientToSigner = (bundlerClient) => {
|
|
61
|
+
const startaleAccount = fromBundlerClientToStartaleAccount(bundlerClient);
|
|
62
|
+
if (!startaleAccount.signer || !startaleAccount.signer.address) {
|
|
63
|
+
throw new Error("Signer not found");
|
|
64
|
+
}
|
|
65
|
+
return startaleAccount.signer;
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=fromBundlerClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fromBundlerClient.js","sourceRoot":"","sources":["../../../../src/sdk/account/utils/fromBundlerClient.ts"],"names":[],"mappings":"AAmBA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,aAAiC,EACQ,EAAE;IAC3C,MAAM,eAAe,GAAG,kCAAkC,CAAC,aAAa,CAAC,CAAA;IACzE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IACD,OAAO,eAAe,CAAC,MAAiD,CAAA;AAC1E,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,aAAiC,EACX,EAAE;IACxB,MAAM,eAAe,GAAG,aAAa,CAAC,OAA+B,CAAA;IACrE,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,eAAe,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IAC/C,CAAC;IACD,OAAO,aAAa,CAAC,OAA+B,CAAA;AACtD,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAA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