permissionless 0.1.47 → 0.1.49
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/_cjs/accounts/biconomy/abi/BiconomySmartAccountAbi.js +102 -0
- package/_cjs/accounts/biconomy/abi/BiconomySmartAccountAbi.js.map +1 -0
- package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js +14 -0
- package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -0
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js +233 -0
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -0
- package/_cjs/accounts/index.js +30 -0
- package/_cjs/accounts/index.js.map +1 -0
- package/_cjs/accounts/kernel/abi/KernelAccountAbi.js +84 -0
- package/_cjs/accounts/kernel/abi/KernelAccountAbi.js.map +1 -0
- package/_cjs/accounts/kernel/abi/KernelV3AccountAbi.js +110 -0
- package/_cjs/accounts/kernel/abi/KernelV3AccountAbi.js.map +1 -0
- package/_cjs/accounts/kernel/abi/KernelV3MetaFactoryAbi.js +21 -0
- package/_cjs/accounts/kernel/abi/KernelV3MetaFactoryAbi.js.map +1 -0
- package/_cjs/accounts/kernel/constants.js +27 -0
- package/_cjs/accounts/kernel/constants.js.map +1 -0
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js +332 -0
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -0
- package/_cjs/accounts/kernel/utils/encodeCallData.js +90 -0
- package/_cjs/accounts/kernel/utils/encodeCallData.js.map +1 -0
- package/_cjs/accounts/kernel/utils/getExecMode.js +15 -0
- package/_cjs/accounts/kernel/utils/getExecMode.js.map +1 -0
- package/_cjs/accounts/kernel/utils/getNonceKey.js +25 -0
- package/_cjs/accounts/kernel/utils/getNonceKey.js.map +1 -0
- package/_cjs/accounts/kernel/utils/isKernelV2.js +9 -0
- package/_cjs/accounts/kernel/utils/isKernelV2.js.map +1 -0
- package/_cjs/accounts/kernel/utils/signMessage.js +29 -0
- package/_cjs/accounts/kernel/utils/signMessage.js.map +1 -0
- package/_cjs/accounts/kernel/utils/signTypedData.js +41 -0
- package/_cjs/accounts/kernel/utils/signTypedData.js.map +1 -0
- package/_cjs/accounts/kernel/utils/wrapMessageHash.js +20 -0
- package/_cjs/accounts/kernel/utils/wrapMessageHash.js.map +1 -0
- package/_cjs/accounts/light/privateKeyToLightSmartAccount.js +14 -0
- package/_cjs/accounts/light/privateKeyToLightSmartAccount.js.map +1 -0
- package/_cjs/accounts/light/signerToLightSmartAccount.js +256 -0
- package/_cjs/accounts/light/signerToLightSmartAccount.js.map +1 -0
- package/_cjs/accounts/safe/privateKeyToSafeSmartAccount.js +14 -0
- package/_cjs/accounts/safe/privateKeyToSafeSmartAccount.js.map +1 -0
- package/_cjs/accounts/safe/signerToSafeSmartAccount.js +1012 -0
- package/_cjs/accounts/safe/signerToSafeSmartAccount.js.map +1 -0
- package/_cjs/accounts/simple/privateKeyToSimpleSmartAccount.js +14 -0
- package/_cjs/accounts/simple/privateKeyToSimpleSmartAccount.js.map +1 -0
- package/_cjs/accounts/simple/signerToSimpleSmartAccount.js +259 -0
- package/_cjs/accounts/simple/signerToSimpleSmartAccount.js.map +1 -0
- package/_cjs/accounts/toSmartAccount.js +84 -0
- package/_cjs/accounts/toSmartAccount.js.map +1 -0
- package/_cjs/accounts/trust/privateKeyToTrustSmartAccount.js +14 -0
- package/_cjs/accounts/trust/privateKeyToTrustSmartAccount.js.map +1 -0
- package/_cjs/accounts/trust/signerToTrustSmartAccount.js +134 -0
- package/_cjs/accounts/trust/signerToTrustSmartAccount.js.map +1 -0
- package/_cjs/accounts/trust/utils/encodeCallData.js +74 -0
- package/_cjs/accounts/trust/utils/encodeCallData.js.map +1 -0
- package/_cjs/accounts/trust/utils/getAccountAddress.js +19 -0
- package/_cjs/accounts/trust/utils/getAccountAddress.js.map +1 -0
- package/_cjs/accounts/trust/utils/getDummySignature.js +8 -0
- package/_cjs/accounts/trust/utils/getDummySignature.js.map +1 -0
- package/_cjs/accounts/trust/utils/getFactoryData.js +43 -0
- package/_cjs/accounts/trust/utils/getFactoryData.js.map +1 -0
- package/_cjs/accounts/trust/utils/signMessage.js +9 -0
- package/_cjs/accounts/trust/utils/signMessage.js.map +1 -0
- package/_cjs/accounts/trust/utils/signTransaction.js +9 -0
- package/_cjs/accounts/trust/utils/signTransaction.js.map +1 -0
- package/_cjs/accounts/trust/utils/signUserOperation.js +19 -0
- package/_cjs/accounts/trust/utils/signUserOperation.js.map +1 -0
- package/_cjs/accounts/types.js +23 -0
- package/_cjs/accounts/types.js.map +1 -0
- package/_cjs/actions/bundler/chainId.js +11 -0
- package/_cjs/actions/bundler/chainId.js.map +1 -0
- package/_cjs/actions/bundler/estimateUserOperationGas.js +49 -0
- package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -0
- package/_cjs/actions/bundler/getUserOperationByHash.js +47 -0
- package/_cjs/actions/bundler/getUserOperationByHash.js.map +1 -0
- package/_cjs/actions/bundler/getUserOperationReceipt.js +52 -0
- package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -0
- package/_cjs/actions/bundler/sendUserOperation.js +23 -0
- package/_cjs/actions/bundler/sendUserOperation.js.map +1 -0
- package/_cjs/actions/bundler/supportedEntryPoints.js +11 -0
- package/_cjs/actions/bundler/supportedEntryPoints.js.map +1 -0
- package/_cjs/actions/bundler/waitForUserOperationReceipt.js +67 -0
- package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -0
- package/_cjs/actions/erc7579/accountId.js +66 -0
- package/_cjs/actions/erc7579/accountId.js.map +1 -0
- package/_cjs/actions/erc7579/installModule.js +65 -0
- package/_cjs/actions/erc7579/installModule.js.map +1 -0
- package/_cjs/actions/erc7579/installModules.js +65 -0
- package/_cjs/actions/erc7579/installModules.js.map +1 -0
- package/_cjs/actions/erc7579/isModuleInstalled.js +86 -0
- package/_cjs/actions/erc7579/isModuleInstalled.js.map +1 -0
- package/_cjs/actions/erc7579/supportsExecutionMode.js +95 -0
- package/_cjs/actions/erc7579/supportsExecutionMode.js.map +1 -0
- package/_cjs/actions/erc7579/supportsModule.js +84 -0
- package/_cjs/actions/erc7579/supportsModule.js.map +1 -0
- package/_cjs/actions/erc7579/uninstallModule.js +65 -0
- package/_cjs/actions/erc7579/uninstallModule.js.map +1 -0
- package/_cjs/actions/erc7579/uninstallModules.js +65 -0
- package/_cjs/actions/erc7579/uninstallModules.js.map +1 -0
- package/_cjs/actions/erc7579.js +33 -0
- package/_cjs/actions/erc7579.js.map +1 -0
- package/_cjs/actions/index.js +25 -0
- package/_cjs/actions/index.js.map +1 -0
- package/_cjs/actions/pimlico/getUserOperationGasPrice.js +25 -0
- package/_cjs/actions/pimlico/getUserOperationGasPrice.js.map +1 -0
- package/_cjs/actions/pimlico/getUserOperationStatus.js +11 -0
- package/_cjs/actions/pimlico/getUserOperationStatus.js.map +1 -0
- package/_cjs/actions/pimlico/sendCompressedUserOperation.js +16 -0
- package/_cjs/actions/pimlico/sendCompressedUserOperation.js.map +1 -0
- package/_cjs/actions/pimlico/sponsorUserOperation.js +43 -0
- package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -0
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js +16 -0
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -0
- package/_cjs/actions/pimlico.js +17 -0
- package/_cjs/actions/pimlico.js.map +1 -0
- package/_cjs/actions/public/getAccountNonce.js +38 -0
- package/_cjs/actions/public/getAccountNonce.js.map +1 -0
- package/_cjs/actions/public/getSenderAddress.js +59 -0
- package/_cjs/actions/public/getSenderAddress.js.map +1 -0
- package/_cjs/actions/smartAccount/deployContract.js +38 -0
- package/_cjs/actions/smartAccount/deployContract.js.map +1 -0
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +195 -0
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
- package/_cjs/actions/smartAccount/sendTransaction.js +43 -0
- package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -0
- package/_cjs/actions/smartAccount/sendTransactions.js +45 -0
- package/_cjs/actions/smartAccount/sendTransactions.js.map +1 -0
- package/_cjs/actions/smartAccount/sendUserOperation.js +21 -0
- package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -0
- package/_cjs/actions/smartAccount/signMessage.js +16 -0
- package/_cjs/actions/smartAccount/signMessage.js.map +1 -0
- package/_cjs/actions/smartAccount/signTypedData.js +34 -0
- package/_cjs/actions/smartAccount/signTypedData.js.map +1 -0
- package/_cjs/actions/smartAccount/writeContract.js +21 -0
- package/_cjs/actions/smartAccount/writeContract.js.map +1 -0
- package/_cjs/actions/smartAccount.js +20 -0
- package/_cjs/actions/smartAccount.js.map +1 -0
- package/_cjs/actions/stackup/accounts.js +12 -0
- package/_cjs/actions/stackup/accounts.js.map +1 -0
- package/_cjs/actions/stackup/sponsorUserOperation.js +32 -0
- package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -0
- package/_cjs/actions/stackup.js +10 -0
- package/_cjs/actions/stackup.js.map +1 -0
- package/_cjs/clients/createBundlerClient.js +17 -0
- package/_cjs/clients/createBundlerClient.js.map +1 -0
- package/_cjs/clients/createSmartAccountClient.js +20 -0
- package/_cjs/clients/createSmartAccountClient.js.map +1 -0
- package/_cjs/clients/decorators/bundler.js +24 -0
- package/_cjs/clients/decorators/bundler.js.map +1 -0
- package/_cjs/clients/decorators/pimlico.js +25 -0
- package/_cjs/clients/decorators/pimlico.js.map +1 -0
- package/_cjs/clients/decorators/smartAccount.js +43 -0
- package/_cjs/clients/decorators/smartAccount.js.map +1 -0
- package/_cjs/clients/decorators/stackup.js +14 -0
- package/_cjs/clients/decorators/stackup.js.map +1 -0
- package/_cjs/clients/pimlico.js +31 -0
- package/_cjs/clients/pimlico.js.map +1 -0
- package/_cjs/clients/stackup.js +20 -0
- package/_cjs/clients/stackup.js.map +1 -0
- package/_cjs/errors/account.js +311 -0
- package/_cjs/errors/account.js.map +1 -0
- package/_cjs/errors/bundler.js +61 -0
- package/_cjs/errors/bundler.js.map +1 -0
- package/_cjs/errors/estimateUserOperationGas.js +53 -0
- package/_cjs/errors/estimateUserOperationGas.js.map +1 -0
- package/_cjs/errors/gas.js +113 -0
- package/_cjs/errors/gas.js.map +1 -0
- package/_cjs/errors/index.js +35 -0
- package/_cjs/errors/index.js.map +1 -0
- package/_cjs/errors/paymaster.js +228 -0
- package/_cjs/errors/paymaster.js.map +1 -0
- package/_cjs/errors/sendUserOperation.js +37 -0
- package/_cjs/errors/sendUserOperation.js.map +1 -0
- package/_cjs/errors/utils.js +18 -0
- package/_cjs/errors/utils.js.map +1 -0
- package/_cjs/experimental/eip7677/actions/getPaymasterData.js +41 -0
- package/_cjs/experimental/eip7677/actions/getPaymasterData.js.map +1 -0
- package/_cjs/experimental/eip7677/actions/getPaymasterStubData.js +51 -0
- package/_cjs/experimental/eip7677/actions/getPaymasterStubData.js.map +1 -0
- package/_cjs/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js +21 -0
- package/_cjs/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js.map +1 -0
- package/_cjs/experimental/eip7677/index.js +10 -0
- package/_cjs/experimental/eip7677/index.js.map +1 -0
- package/_cjs/experimental/eip7677/types/paymaster.js +3 -0
- package/_cjs/experimental/eip7677/types/paymaster.js.map +1 -0
- package/_cjs/experimental/index.js +5 -0
- package/_cjs/experimental/index.js.map +1 -0
- package/_cjs/index.js +37 -0
- package/_cjs/index.js.map +1 -0
- package/_cjs/package.json +1 -0
- package/_cjs/types/bundler.js +3 -0
- package/_cjs/types/bundler.js.map +1 -0
- package/_cjs/types/entrypoint.js +3 -0
- package/_cjs/types/entrypoint.js.map +1 -0
- package/_cjs/types/index.js +3 -0
- package/_cjs/types/index.js.map +1 -0
- package/_cjs/types/pimlico.js +3 -0
- package/_cjs/types/pimlico.js.map +1 -0
- package/_cjs/types/stackup.js +3 -0
- package/_cjs/types/stackup.js.map +1 -0
- package/_cjs/types/userOperation.js +3 -0
- package/_cjs/types/userOperation.js.map +1 -0
- package/_cjs/utils/decodeNonce.js +12 -0
- package/_cjs/utils/decodeNonce.js.map +1 -0
- package/_cjs/utils/deepHexlify.js +31 -0
- package/_cjs/utils/deepHexlify.js.map +1 -0
- package/_cjs/utils/encode7579CallData.js +81 -0
- package/_cjs/utils/encode7579CallData.js.map +1 -0
- package/_cjs/utils/encodeNonce.js +11 -0
- package/_cjs/utils/encodeNonce.js.map +1 -0
- package/_cjs/utils/errors/getBundlerError.js +124 -0
- package/_cjs/utils/errors/getBundlerError.js.map +1 -0
- package/_cjs/utils/errors/getEstimateUserOperationGasError.js +19 -0
- package/_cjs/utils/errors/getEstimateUserOperationGasError.js.map +1 -0
- package/_cjs/utils/errors/getSendUserOperationError.js +19 -0
- package/_cjs/utils/errors/getSendUserOperationError.js.map +1 -0
- package/_cjs/utils/getAddressFromInitCodeOrPaymasterAndData.js +15 -0
- package/_cjs/utils/getAddressFromInitCodeOrPaymasterAndData.js.map +1 -0
- package/_cjs/utils/getEntryPointVersion.js +16 -0
- package/_cjs/utils/getEntryPointVersion.js.map +1 -0
- package/_cjs/utils/getPackedUserOperation.js +106 -0
- package/_cjs/utils/getPackedUserOperation.js.map +1 -0
- package/_cjs/utils/getRequiredPrefund.js +27 -0
- package/_cjs/utils/getRequiredPrefund.js.map +1 -0
- package/_cjs/utils/getUserOperationHash.js +94 -0
- package/_cjs/utils/getUserOperationHash.js.map +1 -0
- package/_cjs/utils/index.js +38 -0
- package/_cjs/utils/index.js.map +1 -0
- package/_cjs/utils/isSmartAccountDeployed.js +15 -0
- package/_cjs/utils/isSmartAccountDeployed.js.map +1 -0
- package/_cjs/utils/observe.js +44 -0
- package/_cjs/utils/observe.js.map +1 -0
- package/_cjs/utils/providerToSmartAccountSigner.js +32 -0
- package/_cjs/utils/providerToSmartAccountSigner.js.map +1 -0
- package/_cjs/utils/signUserOperationHashWithECDSA.js +58 -0
- package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -0
- package/_cjs/utils/walletClientToSmartAccountSigner.js +23 -0
- package/_cjs/utils/walletClientToSmartAccountSigner.js.map +1 -0
- package/_cjs/vitest.config.js +31 -0
- package/_cjs/vitest.config.js.map +1 -0
- package/_esm/accounts/biconomy/abi/BiconomySmartAccountAbi.js +105 -0
- package/_esm/accounts/biconomy/abi/BiconomySmartAccountAbi.js.map +1 -0
- package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js +15 -0
- package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -0
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js +268 -0
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -0
- package/_esm/accounts/index.js +15 -0
- package/_esm/accounts/index.js.map +1 -0
- package/_esm/accounts/kernel/abi/KernelAccountAbi.js +87 -0
- package/_esm/accounts/kernel/abi/KernelAccountAbi.js.map +1 -0
- package/_esm/accounts/kernel/abi/KernelV3AccountAbi.js +107 -0
- package/_esm/accounts/kernel/abi/KernelV3AccountAbi.js.map +1 -0
- package/_esm/accounts/kernel/abi/KernelV3MetaFactoryAbi.js +18 -0
- package/_esm/accounts/kernel/abi/KernelV3MetaFactoryAbi.js.map +1 -0
- package/_esm/accounts/kernel/constants.js +24 -0
- package/_esm/accounts/kernel/constants.js.map +1 -0
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js +395 -0
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -0
- package/_esm/accounts/kernel/utils/encodeCallData.js +89 -0
- package/_esm/accounts/kernel/utils/encodeCallData.js.map +1 -0
- package/_esm/accounts/kernel/utils/getExecMode.js +11 -0
- package/_esm/accounts/kernel/utils/getExecMode.js.map +1 -0
- package/_esm/accounts/kernel/utils/getNonceKey.js +21 -0
- package/_esm/accounts/kernel/utils/getNonceKey.js.map +1 -0
- package/_esm/accounts/kernel/utils/isKernelV2.js +5 -0
- package/_esm/accounts/kernel/utils/isKernelV2.js.map +1 -0
- package/_esm/accounts/kernel/utils/signMessage.js +25 -0
- package/_esm/accounts/kernel/utils/signMessage.js.map +1 -0
- package/_esm/accounts/kernel/utils/signTypedData.js +39 -0
- package/_esm/accounts/kernel/utils/signTypedData.js.map +1 -0
- package/_esm/accounts/kernel/utils/wrapMessageHash.js +16 -0
- package/_esm/accounts/kernel/utils/wrapMessageHash.js.map +1 -0
- package/_esm/accounts/light/privateKeyToLightSmartAccount.js +15 -0
- package/_esm/accounts/light/privateKeyToLightSmartAccount.js.map +1 -0
- package/_esm/accounts/light/signerToLightSmartAccount.js +258 -0
- package/_esm/accounts/light/signerToLightSmartAccount.js.map +1 -0
- package/_esm/accounts/safe/privateKeyToSafeSmartAccount.js +15 -0
- package/_esm/accounts/safe/privateKeyToSafeSmartAccount.js.map +1 -0
- package/_esm/accounts/safe/signerToSafeSmartAccount.js +1014 -0
- package/_esm/accounts/safe/signerToSafeSmartAccount.js.map +1 -0
- package/_esm/accounts/simple/privateKeyToSimpleSmartAccount.js +15 -0
- package/_esm/accounts/simple/privateKeyToSimpleSmartAccount.js.map +1 -0
- package/_esm/accounts/simple/signerToSimpleSmartAccount.js +261 -0
- package/_esm/accounts/simple/signerToSimpleSmartAccount.js.map +1 -0
- package/_esm/accounts/toSmartAccount.js +80 -0
- package/_esm/accounts/toSmartAccount.js.map +1 -0
- package/_esm/accounts/trust/privateKeyToTrustSmartAccount.js +15 -0
- package/_esm/accounts/trust/privateKeyToTrustSmartAccount.js.map +1 -0
- package/_esm/accounts/trust/signerToTrustSmartAccount.js +138 -0
- package/_esm/accounts/trust/signerToTrustSmartAccount.js.map +1 -0
- package/_esm/accounts/trust/utils/encodeCallData.js +70 -0
- package/_esm/accounts/trust/utils/encodeCallData.js.map +1 -0
- package/_esm/accounts/trust/utils/getAccountAddress.js +15 -0
- package/_esm/accounts/trust/utils/getAccountAddress.js.map +1 -0
- package/_esm/accounts/trust/utils/getDummySignature.js +4 -0
- package/_esm/accounts/trust/utils/getDummySignature.js.map +1 -0
- package/_esm/accounts/trust/utils/getFactoryData.js +42 -0
- package/_esm/accounts/trust/utils/getFactoryData.js.map +1 -0
- package/_esm/accounts/trust/utils/signMessage.js +5 -0
- package/_esm/accounts/trust/utils/signMessage.js.map +1 -0
- package/_esm/accounts/trust/utils/signTransaction.js +5 -0
- package/_esm/accounts/trust/utils/signTransaction.js.map +1 -0
- package/_esm/accounts/trust/utils/signUserOperation.js +15 -0
- package/_esm/accounts/trust/utils/signUserOperation.js.map +1 -0
- package/_esm/accounts/types.js +19 -0
- package/_esm/accounts/types.js.map +1 -0
- package/_esm/actions/bundler/chainId.js +29 -0
- package/_esm/actions/bundler/chainId.js.map +1 -0
- package/_esm/actions/bundler/estimateUserOperationGas.js +72 -0
- package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -0
- package/_esm/actions/bundler/getUserOperationByHash.js +65 -0
- package/_esm/actions/bundler/getUserOperationByHash.js.map +1 -0
- package/_esm/actions/bundler/getUserOperationReceipt.js +70 -0
- package/_esm/actions/bundler/getUserOperationReceipt.js.map +1 -0
- package/_esm/actions/bundler/sendUserOperation.js +44 -0
- package/_esm/actions/bundler/sendUserOperation.js.map +1 -0
- package/_esm/actions/bundler/supportedEntryPoints.js +29 -0
- package/_esm/actions/bundler/supportedEntryPoints.js.map +1 -0
- package/_esm/actions/bundler/waitForUserOperationReceipt.js +83 -0
- package/_esm/actions/bundler/waitForUserOperationReceipt.js.map +1 -0
- package/_esm/actions/erc7579/accountId.js +62 -0
- package/_esm/actions/erc7579/accountId.js.map +1 -0
- package/_esm/actions/erc7579/installModule.js +61 -0
- package/_esm/actions/erc7579/installModule.js.map +1 -0
- package/_esm/actions/erc7579/installModules.js +61 -0
- package/_esm/actions/erc7579/installModules.js.map +1 -0
- package/_esm/actions/erc7579/isModuleInstalled.js +82 -0
- package/_esm/actions/erc7579/isModuleInstalled.js.map +1 -0
- package/_esm/actions/erc7579/supportsExecutionMode.js +90 -0
- package/_esm/actions/erc7579/supportsExecutionMode.js.map +1 -0
- package/_esm/actions/erc7579/supportsModule.js +79 -0
- package/_esm/actions/erc7579/supportsModule.js.map +1 -0
- package/_esm/actions/erc7579/uninstallModule.js +61 -0
- package/_esm/actions/erc7579/uninstallModule.js.map +1 -0
- package/_esm/actions/erc7579/uninstallModules.js +61 -0
- package/_esm/actions/erc7579/uninstallModules.js.map +1 -0
- package/_esm/actions/erc7579.js +22 -0
- package/_esm/actions/erc7579.js.map +1 -0
- package/_esm/actions/index.js +12 -0
- package/_esm/actions/index.js.map +1 -0
- package/_esm/actions/pimlico/getUserOperationGasPrice.js +42 -0
- package/_esm/actions/pimlico/getUserOperationGasPrice.js.map +1 -0
- package/_esm/actions/pimlico/getUserOperationStatus.js +30 -0
- package/_esm/actions/pimlico/getUserOperationStatus.js.map +1 -0
- package/_esm/actions/pimlico/sendCompressedUserOperation.js +37 -0
- package/_esm/actions/pimlico/sendCompressedUserOperation.js.map +1 -0
- package/_esm/actions/pimlico/sponsorUserOperation.js +64 -0
- package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -0
- package/_esm/actions/pimlico/validateSponsorshipPolicies.js +47 -0
- package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -0
- package/_esm/actions/pimlico.js +8 -0
- package/_esm/actions/pimlico.js.map +1 -0
- package/_esm/actions/public/getAccountNonce.js +60 -0
- package/_esm/actions/public/getAccountNonce.js.map +1 -0
- package/_esm/actions/public/getSenderAddress.js +80 -0
- package/_esm/actions/public/getSenderAddress.js.map +1 -0
- package/_esm/actions/smartAccount/deployContract.js +62 -0
- package/_esm/actions/smartAccount/deployContract.js.map +1 -0
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js +195 -0
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
- package/_esm/actions/smartAccount/sendTransaction.js +85 -0
- package/_esm/actions/smartAccount/sendTransaction.js.map +1 -0
- package/_esm/actions/smartAccount/sendTransactions.js +87 -0
- package/_esm/actions/smartAccount/sendTransactions.js.map +1 -0
- package/_esm/actions/smartAccount/sendUserOperation.js +17 -0
- package/_esm/actions/smartAccount/sendUserOperation.js.map +1 -0
- package/_esm/actions/smartAccount/signMessage.js +58 -0
- package/_esm/actions/smartAccount/signMessage.js.map +1 -0
- package/_esm/actions/smartAccount/signTypedData.js +128 -0
- package/_esm/actions/smartAccount/signTypedData.js.map +1 -0
- package/_esm/actions/smartAccount/writeContract.js +17 -0
- package/_esm/actions/smartAccount/writeContract.js.map +1 -0
- package/_esm/actions/smartAccount.js +10 -0
- package/_esm/actions/smartAccount.js.map +1 -0
- package/_esm/actions/stackup/accounts.js +30 -0
- package/_esm/actions/stackup/accounts.js.map +1 -0
- package/_esm/actions/stackup/sponsorUserOperation.js +53 -0
- package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -0
- package/_esm/actions/stackup.js +5 -0
- package/_esm/actions/stackup.js.map +1 -0
- package/_esm/clients/createBundlerClient.js +32 -0
- package/_esm/clients/createBundlerClient.js.map +1 -0
- package/_esm/clients/createSmartAccountClient.js +35 -0
- package/_esm/clients/createSmartAccountClient.js.map +1 -0
- package/_esm/clients/decorators/bundler.js +21 -0
- package/_esm/clients/decorators/bundler.js.map +1 -0
- package/_esm/clients/decorators/pimlico.js +64 -0
- package/_esm/clients/decorators/pimlico.js.map +1 -0
- package/_esm/clients/decorators/smartAccount.js +39 -0
- package/_esm/clients/decorators/smartAccount.js.map +1 -0
- package/_esm/clients/decorators/stackup.js +10 -0
- package/_esm/clients/decorators/stackup.js.map +1 -0
- package/_esm/clients/pimlico.js +64 -0
- package/_esm/clients/pimlico.js.map +1 -0
- package/_esm/clients/stackup.js +35 -0
- package/_esm/clients/stackup.js.map +1 -0
- package/_esm/errors/account.js +298 -0
- package/_esm/errors/account.js.map +1 -0
- package/_esm/errors/bundler.js +56 -0
- package/_esm/errors/bundler.js.map +1 -0
- package/_esm/errors/estimateUserOperationGas.js +49 -0
- package/_esm/errors/estimateUserOperationGas.js.map +1 -0
- package/_esm/errors/gas.js +106 -0
- package/_esm/errors/gas.js.map +1 -0
- package/_esm/errors/index.js +8 -0
- package/_esm/errors/index.js.map +1 -0
- package/_esm/errors/paymaster.js +218 -0
- package/_esm/errors/paymaster.js.map +1 -0
- package/_esm/errors/sendUserOperation.js +33 -0
- package/_esm/errors/sendUserOperation.js.map +1 -0
- package/_esm/errors/utils.js +14 -0
- package/_esm/errors/utils.js.map +1 -0
- package/_esm/experimental/eip7677/actions/getPaymasterData.js +37 -0
- package/_esm/experimental/eip7677/actions/getPaymasterData.js.map +1 -0
- package/_esm/experimental/eip7677/actions/getPaymasterStubData.js +47 -0
- package/_esm/experimental/eip7677/actions/getPaymasterStubData.js.map +1 -0
- package/_esm/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js +18 -0
- package/_esm/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js.map +1 -0
- package/_esm/experimental/eip7677/index.js +5 -0
- package/_esm/experimental/eip7677/index.js.map +1 -0
- package/_esm/experimental/eip7677/types/paymaster.js +2 -0
- package/_esm/experimental/eip7677/types/paymaster.js.map +1 -0
- package/_esm/experimental/index.js +2 -0
- package/_esm/experimental/index.js.map +1 -0
- package/_esm/index.js +20 -0
- package/_esm/index.js.map +1 -0
- package/_esm/package.json +1 -0
- package/_esm/types/bundler.js +2 -0
- package/_esm/types/bundler.js.map +1 -0
- package/_esm/types/entrypoint.js +2 -0
- package/_esm/types/entrypoint.js.map +1 -0
- package/_esm/types/index.js +2 -0
- package/_esm/types/index.js.map +1 -0
- package/_esm/types/pimlico.js +2 -0
- package/_esm/types/pimlico.js.map +1 -0
- package/_esm/types/stackup.js +2 -0
- package/_esm/types/stackup.js.map +1 -0
- package/_esm/types/userOperation.js +2 -0
- package/_esm/types/userOperation.js.map +1 -0
- package/_esm/utils/decodeNonce.js +8 -0
- package/_esm/utils/decodeNonce.js.map +1 -0
- package/_esm/utils/deepHexlify.js +30 -0
- package/_esm/utils/deepHexlify.js.map +1 -0
- package/_esm/utils/encode7579CallData.js +77 -0
- package/_esm/utils/encode7579CallData.js.map +1 -0
- package/_esm/utils/encodeNonce.js +7 -0
- package/_esm/utils/encodeNonce.js.map +1 -0
- package/_esm/utils/errors/getBundlerError.js +121 -0
- package/_esm/utils/errors/getBundlerError.js.map +1 -0
- package/_esm/utils/errors/getEstimateUserOperationGasError.js +18 -0
- package/_esm/utils/errors/getEstimateUserOperationGasError.js.map +1 -0
- package/_esm/utils/errors/getSendUserOperationError.js +15 -0
- package/_esm/utils/errors/getSendUserOperationError.js.map +1 -0
- package/_esm/utils/getAddressFromInitCodeOrPaymasterAndData.js +11 -0
- package/_esm/utils/getAddressFromInitCodeOrPaymasterAndData.js.map +1 -0
- package/_esm/utils/getEntryPointVersion.js +11 -0
- package/_esm/utils/getEntryPointVersion.js.map +1 -0
- package/_esm/utils/getPackedUserOperation.js +94 -0
- package/_esm/utils/getPackedUserOperation.js.map +1 -0
- package/_esm/utils/getRequiredPrefund.js +37 -0
- package/_esm/utils/getRequiredPrefund.js.map +1 -0
- package/_esm/utils/getUserOperationHash.js +111 -0
- package/_esm/utils/getUserOperationHash.js.map +1 -0
- package/_esm/utils/index.js +19 -0
- package/_esm/utils/index.js.map +1 -0
- package/_esm/utils/isSmartAccountDeployed.js +11 -0
- package/_esm/utils/isSmartAccountDeployed.js.map +1 -0
- package/_esm/utils/observe.js +47 -0
- package/_esm/utils/observe.js.map +1 -0
- package/_esm/utils/providerToSmartAccountSigner.js +28 -0
- package/_esm/utils/providerToSmartAccountSigner.js.map +1 -0
- package/_esm/utils/signUserOperationHashWithECDSA.js +76 -0
- package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -0
- package/_esm/utils/walletClientToSmartAccountSigner.js +19 -0
- package/_esm/utils/walletClientToSmartAccountSigner.js.map +1 -0
- package/_esm/vitest.config.js +29 -0
- package/_esm/vitest.config.js.map +1 -0
- package/_types/accounts/biconomy/abi/BiconomySmartAccountAbi.d.ts +59 -0
- package/_types/accounts/biconomy/abi/BiconomySmartAccountAbi.d.ts.map +1 -0
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts +13 -0
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts.map +1 -0
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts +29 -0
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts.map +1 -0
- package/_types/accounts/index.d.ts +15 -0
- package/_types/accounts/index.d.ts.map +1 -0
- package/_types/accounts/kernel/abi/KernelAccountAbi.d.ts +68 -0
- package/_types/accounts/kernel/abi/KernelAccountAbi.d.ts.map +1 -0
- package/_types/accounts/kernel/abi/KernelV3AccountAbi.d.ts +135 -0
- package/_types/accounts/kernel/abi/KernelV3AccountAbi.d.ts.map +1 -0
- package/_types/accounts/kernel/abi/KernelV3MetaFactoryAbi.d.ts +24 -0
- package/_types/accounts/kernel/abi/KernelV3MetaFactoryAbi.d.ts.map +1 -0
- package/_types/accounts/kernel/constants.d.ts +21 -0
- package/_types/accounts/kernel/constants.d.ts.map +1 -0
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts +44 -0
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/encodeCallData.d.ts +13 -0
- package/_types/accounts/kernel/utils/encodeCallData.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/getExecMode.d.ts +7 -0
- package/_types/accounts/kernel/utils/getExecMode.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/getNonceKey.d.ts +5 -0
- package/_types/accounts/kernel/utils/getNonceKey.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/isKernelV2.d.ts +4 -0
- package/_types/accounts/kernel/utils/isKernelV2.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/signMessage.d.ts +4 -0
- package/_types/accounts/kernel/utils/signMessage.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/signTypedData.d.ts +4 -0
- package/_types/accounts/kernel/utils/signTypedData.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/wrapMessageHash.d.ts +11 -0
- package/_types/accounts/kernel/utils/wrapMessageHash.d.ts.map +1 -0
- package/_types/accounts/light/privateKeyToLightSmartAccount.d.ts +14 -0
- package/_types/accounts/light/privateKeyToLightSmartAccount.d.ts.map +1 -0
- package/_types/accounts/light/signerToLightSmartAccount.d.ts +22 -0
- package/_types/accounts/light/signerToLightSmartAccount.d.ts.map +1 -0
- package/_types/accounts/safe/privateKeyToSafeSmartAccount.d.ts +13 -0
- package/_types/accounts/safe/privateKeyToSafeSmartAccount.d.ts.map +1 -0
- package/_types/accounts/safe/signerToSafeSmartAccount.d.ts +61 -0
- package/_types/accounts/safe/signerToSafeSmartAccount.d.ts.map +1 -0
- package/_types/accounts/simple/privateKeyToSimpleSmartAccount.d.ts +13 -0
- package/_types/accounts/simple/privateKeyToSimpleSmartAccount.d.ts.map +1 -0
- package/_types/accounts/simple/signerToSimpleSmartAccount.d.ts +20 -0
- package/_types/accounts/simple/signerToSimpleSmartAccount.d.ts.map +1 -0
- package/_types/accounts/toSmartAccount.d.ts +26 -0
- package/_types/accounts/toSmartAccount.d.ts.map +1 -0
- package/_types/accounts/trust/privateKeyToTrustSmartAccount.d.ts +13 -0
- package/_types/accounts/trust/privateKeyToTrustSmartAccount.d.ts.map +1 -0
- package/_types/accounts/trust/signerToTrustSmartAccount.d.ts +27 -0
- package/_types/accounts/trust/signerToTrustSmartAccount.d.ts.map +1 -0
- package/_types/accounts/trust/utils/encodeCallData.d.ts +12 -0
- package/_types/accounts/trust/utils/encodeCallData.d.ts.map +1 -0
- package/_types/accounts/trust/utils/getAccountAddress.d.ts +10 -0
- package/_types/accounts/trust/utils/getAccountAddress.d.ts.map +1 -0
- package/_types/accounts/trust/utils/getDummySignature.d.ts +3 -0
- package/_types/accounts/trust/utils/getDummySignature.d.ts.map +1 -0
- package/_types/accounts/trust/utils/getFactoryData.d.ts +10 -0
- package/_types/accounts/trust/utils/getFactoryData.d.ts.map +1 -0
- package/_types/accounts/trust/utils/signMessage.d.ts +4 -0
- package/_types/accounts/trust/utils/signMessage.d.ts.map +1 -0
- package/_types/accounts/trust/utils/signTransaction.d.ts +5 -0
- package/_types/accounts/trust/utils/signTransaction.d.ts.map +1 -0
- package/_types/accounts/trust/utils/signUserOperation.d.ts +9 -0
- package/_types/accounts/trust/utils/signUserOperation.d.ts.map +1 -0
- package/_types/accounts/types.d.ts +32 -0
- package/_types/accounts/types.d.ts.map +1 -0
- package/_types/actions/bundler/chainId.d.ts +27 -0
- package/_types/actions/bundler/chainId.d.ts.map +1 -0
- package/_types/actions/bundler/estimateUserOperationGas.d.ts +91 -0
- package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -0
- package/_types/actions/bundler/getUserOperationByHash.d.ts +39 -0
- package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -0
- package/_types/actions/bundler/getUserOperationReceipt.d.ts +58 -0
- package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -0
- package/_types/actions/bundler/sendUserOperation.d.ts +39 -0
- package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -0
- package/_types/actions/bundler/supportedEntryPoints.d.ts +27 -0
- package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -0
- package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +43 -0
- package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -0
- package/_types/actions/erc7579/accountId.d.ts +6 -0
- package/_types/actions/erc7579/accountId.d.ts.map +1 -0
- package/_types/actions/erc7579/installModule.d.ts +16 -0
- package/_types/actions/erc7579/installModule.d.ts.map +1 -0
- package/_types/actions/erc7579/installModules.d.ts +18 -0
- package/_types/actions/erc7579/installModules.d.ts.map +1 -0
- package/_types/actions/erc7579/isModuleInstalled.d.ts +12 -0
- package/_types/actions/erc7579/isModuleInstalled.d.ts.map +1 -0
- package/_types/actions/erc7579/supportsExecutionMode.d.ts +15 -0
- package/_types/actions/erc7579/supportsExecutionMode.d.ts.map +1 -0
- package/_types/actions/erc7579/supportsModule.d.ts +11 -0
- package/_types/actions/erc7579/supportsModule.d.ts.map +1 -0
- package/_types/actions/erc7579/uninstallModule.d.ts +16 -0
- package/_types/actions/erc7579/uninstallModule.d.ts.map +1 -0
- package/_types/actions/erc7579/uninstallModules.d.ts +20 -0
- package/_types/actions/erc7579/uninstallModules.d.ts.map +1 -0
- package/_types/actions/erc7579.d.ts +30 -0
- package/_types/actions/erc7579.d.ts.map +1 -0
- package/_types/actions/index.d.ts +20 -0
- package/_types/actions/index.d.ts.map +1 -0
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +40 -0
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -0
- package/_types/actions/pimlico/getUserOperationStatus.d.ts +32 -0
- package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -0
- package/_types/actions/pimlico/sendCompressedUserOperation.d.ts +35 -0
- package/_types/actions/pimlico/sendCompressedUserOperation.d.ts.map +1 -0
- package/_types/actions/pimlico/sponsorUserOperation.d.ts +52 -0
- package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -0
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +56 -0
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -0
- package/_types/actions/pimlico.d.ts +10 -0
- package/_types/actions/pimlico.d.ts.map +1 -0
- package/_types/actions/public/getAccountNonce.d.ts +36 -0
- package/_types/actions/public/getAccountNonce.d.ts.map +1 -0
- package/_types/actions/public/getSenderAddress.d.ts +48 -0
- package/_types/actions/public/getSenderAddress.d.ts.map +1 -0
- package/_types/actions/smartAccount/deployContract.d.ts +36 -0
- package/_types/actions/smartAccount/deployContract.d.ts.map +1 -0
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +28 -0
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -0
- package/_types/actions/smartAccount/sendTransaction.d.ts +54 -0
- package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -0
- package/_types/actions/smartAccount/sendTransactions.d.ts +64 -0
- package/_types/actions/smartAccount/sendTransactions.d.ts.map +1 -0
- package/_types/actions/smartAccount/sendUserOperation.d.ts +10 -0
- package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -0
- package/_types/actions/smartAccount/signMessage.d.ts +51 -0
- package/_types/actions/smartAccount/signMessage.d.ts.map +1 -0
- package/_types/actions/smartAccount/signTypedData.d.ts +105 -0
- package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -0
- package/_types/actions/smartAccount/writeContract.d.ts +58 -0
- package/_types/actions/smartAccount/writeContract.d.ts.map +1 -0
- package/_types/actions/smartAccount.d.ts +10 -0
- package/_types/actions/smartAccount.d.ts.map +1 -0
- package/_types/actions/stackup/accounts.d.ts +30 -0
- package/_types/actions/stackup/accounts.d.ts.map +1 -0
- package/_types/actions/stackup/sponsorUserOperation.d.ts +38 -0
- package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -0
- package/_types/actions/stackup.d.ts +7 -0
- package/_types/actions/stackup.d.ts.map +1 -0
- package/_types/clients/createBundlerClient.d.ts +28 -0
- package/_types/clients/createBundlerClient.d.ts.map +1 -0
- package/_types/clients/createSmartAccountClient.d.ts +40 -0
- package/_types/clients/createSmartAccountClient.d.ts.map +1 -0
- package/_types/clients/decorators/bundler.d.ts +175 -0
- package/_types/clients/decorators/bundler.d.ts.map +1 -0
- package/_types/clients/decorators/pimlico.d.ts +142 -0
- package/_types/clients/decorators/pimlico.d.ts.map +1 -0
- package/_types/clients/decorators/smartAccount.d.ts +330 -0
- package/_types/clients/decorators/smartAccount.d.ts.map +1 -0
- package/_types/clients/decorators/stackup.d.ts +55 -0
- package/_types/clients/decorators/stackup.d.ts.map +1 -0
- package/_types/clients/pimlico.d.ts +52 -0
- package/_types/clients/pimlico.d.ts.map +1 -0
- package/_types/clients/stackup.d.ts +29 -0
- package/_types/clients/stackup.d.ts.map +1 -0
- package/_types/errors/account.d.ts +121 -0
- package/_types/errors/account.d.ts.map +1 -0
- package/_types/errors/bundler.d.ts +24 -0
- package/_types/errors/bundler.d.ts.map +1 -0
- package/_types/errors/estimateUserOperationGas.d.ts +14 -0
- package/_types/errors/estimateUserOperationGas.d.ts.map +1 -0
- package/_types/errors/gas.d.ts +47 -0
- package/_types/errors/gas.d.ts.map +1 -0
- package/_types/errors/index.d.ts +8 -0
- package/_types/errors/index.d.ts.map +1 -0
- package/_types/errors/paymaster.d.ts +85 -0
- package/_types/errors/paymaster.d.ts.map +1 -0
- package/_types/errors/sendUserOperation.d.ts +14 -0
- package/_types/errors/sendUserOperation.d.ts.map +1 -0
- package/_types/errors/utils.d.ts +5 -0
- package/_types/errors/utils.d.ts.map +1 -0
- package/_types/experimental/eip7677/actions/getPaymasterData.d.ts +51 -0
- package/_types/experimental/eip7677/actions/getPaymasterData.d.ts.map +1 -0
- package/_types/experimental/eip7677/actions/getPaymasterStubData.d.ts +63 -0
- package/_types/experimental/eip7677/actions/getPaymasterStubData.d.ts.map +1 -0
- package/_types/experimental/eip7677/clients/decorators/paymasterActionsEip7677.d.ts +11 -0
- package/_types/experimental/eip7677/clients/decorators/paymasterActionsEip7677.d.ts.map +1 -0
- package/_types/experimental/eip7677/index.d.ts +6 -0
- package/_types/experimental/eip7677/index.d.ts.map +1 -0
- package/_types/experimental/eip7677/types/paymaster.d.ts +52 -0
- package/_types/experimental/eip7677/types/paymaster.d.ts.map +1 -0
- package/_types/experimental/index.d.ts +2 -0
- package/_types/experimental/index.d.ts.map +1 -0
- package/_types/index.d.ts +33 -0
- package/_types/index.d.ts.map +1 -0
- package/_types/types/bundler.d.ts +110 -0
- package/_types/types/bundler.d.ts.map +1 -0
- package/_types/types/entrypoint.d.ts +6 -0
- package/_types/types/entrypoint.d.ts.map +1 -0
- package/_types/types/index.d.ts +27 -0
- package/_types/types/index.d.ts.map +1 -0
- package/_types/types/pimlico.d.ts +93 -0
- package/_types/types/pimlico.d.ts.map +1 -0
- package/_types/types/stackup.d.ts +49 -0
- package/_types/types/stackup.d.ts.map +1 -0
- package/_types/types/userOperation.d.ts +93 -0
- package/_types/types/userOperation.d.ts.map +1 -0
- package/_types/utils/decodeNonce.d.ts +5 -0
- package/_types/utils/decodeNonce.d.ts.map +1 -0
- package/_types/utils/deepHexlify.d.ts +6 -0
- package/_types/utils/deepHexlify.d.ts.map +1 -0
- package/_types/utils/encode7579CallData.d.ts +16 -0
- package/_types/utils/encode7579CallData.d.ts.map +1 -0
- package/_types/utils/encodeNonce.d.ts +5 -0
- package/_types/utils/encodeNonce.d.ts.map +1 -0
- package/_types/utils/errors/getBundlerError.d.ts +11 -0
- package/_types/utils/errors/getBundlerError.d.ts.map +1 -0
- package/_types/utils/errors/getEstimateUserOperationGasError.d.ts +10 -0
- package/_types/utils/errors/getEstimateUserOperationGasError.d.ts.map +1 -0
- package/_types/utils/errors/getSendUserOperationError.d.ts +5 -0
- package/_types/utils/errors/getSendUserOperationError.d.ts.map +1 -0
- package/_types/utils/getAddressFromInitCodeOrPaymasterAndData.d.ts +3 -0
- package/_types/utils/getAddressFromInitCodeOrPaymasterAndData.d.ts.map +1 -0
- package/_types/utils/getEntryPointVersion.d.ts +8 -0
- package/_types/utils/getEntryPointVersion.d.ts.map +1 -0
- package/_types/utils/getPackedUserOperation.d.ts +39 -0
- package/_types/utils/getPackedUserOperation.d.ts.map +1 -0
- package/_types/utils/getRequiredPrefund.d.ts +21 -0
- package/_types/utils/getRequiredPrefund.d.ts.map +1 -0
- package/_types/utils/getUserOperationHash.d.ts +31 -0
- package/_types/utils/getUserOperationHash.d.ts.map +1 -0
- package/_types/utils/index.d.ts +16 -0
- package/_types/utils/index.d.ts.map +1 -0
- package/_types/utils/isSmartAccountDeployed.d.ts +3 -0
- package/_types/utils/isSmartAccountDeployed.d.ts.map +1 -0
- package/_types/utils/observe.d.ts +17 -0
- package/_types/utils/observe.d.ts.map +1 -0
- package/_types/utils/providerToSmartAccountSigner.d.ts +5 -0
- package/_types/utils/providerToSmartAccountSigner.d.ts.map +1 -0
- package/_types/utils/signUserOperationHashWithECDSA.d.ts +45 -0
- package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -0
- package/_types/utils/walletClientToSmartAccountSigner.d.ts +4 -0
- package/_types/utils/walletClientToSmartAccountSigner.d.ts.map +1 -0
- package/_types/vitest.config.d.ts +3 -0
- package/_types/vitest.config.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import type { Abi, Chain, Client, ContractFunctionArgs, ContractFunctionName, DeployContractParameters, Hash, SendTransactionParameters, Transport, TypedData, WriteContractParameters } from "viem";
|
|
2
|
+
import type { SmartAccount } from "../../accounts/types";
|
|
3
|
+
import { type SendTransactionsWithPaymasterParameters, sendTransactions } from "../../actions/smartAccount";
|
|
4
|
+
import { type Middleware, type PrepareUserOperationRequestReturnType, prepareUserOperationRequest } from "../../actions/smartAccount/prepareUserOperationRequest";
|
|
5
|
+
import { sendUserOperation } from "../../actions/smartAccount/sendUserOperation";
|
|
6
|
+
import { signMessage } from "../../actions/smartAccount/signMessage";
|
|
7
|
+
import { signTypedData } from "../../actions/smartAccount/signTypedData";
|
|
8
|
+
import { writeContract } from "../../actions/smartAccount/writeContract";
|
|
9
|
+
import type { Prettify } from "../../types";
|
|
10
|
+
import type { StateOverrides } from "../../types/bundler";
|
|
11
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
12
|
+
export type SmartAccountActions<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount<entryPoint, string, TTransport, TChain> | undefined = SmartAccount<entryPoint, string, TTransport, TChain> | undefined> = {
|
|
13
|
+
/**
|
|
14
|
+
* Creates, signs, and sends a new transaction to the network.
|
|
15
|
+
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
16
|
+
*
|
|
17
|
+
* - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html
|
|
18
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions
|
|
19
|
+
* - JSON-RPC Methods:
|
|
20
|
+
* - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
|
|
21
|
+
* - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
|
|
22
|
+
*
|
|
23
|
+
* @param args - {@link SendTransactionParameters}
|
|
24
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* import { createWalletClient, custom } from 'viem'
|
|
28
|
+
* import { mainnet } from 'viem/chains'
|
|
29
|
+
*
|
|
30
|
+
* const client = createWalletClient({
|
|
31
|
+
* chain: mainnet,
|
|
32
|
+
* transport: custom(window.ethereum),
|
|
33
|
+
* })
|
|
34
|
+
* const hash = await client.sendTransaction({
|
|
35
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
36
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
37
|
+
* value: 1000000000000000000n,
|
|
38
|
+
* })
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Account Hoisting
|
|
42
|
+
* import { createWalletClient, http } from 'viem'
|
|
43
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
44
|
+
* import { mainnet } from 'viem/chains'
|
|
45
|
+
*
|
|
46
|
+
* const client = createWalletClient({
|
|
47
|
+
* account: privateKeyToAccount('0x…'),
|
|
48
|
+
* chain: mainnet,
|
|
49
|
+
* transport: http(),
|
|
50
|
+
* })
|
|
51
|
+
* const hash = await client.sendTransaction({
|
|
52
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
53
|
+
* value: 1000000000000000000n,
|
|
54
|
+
* })
|
|
55
|
+
*/
|
|
56
|
+
sendTransaction: <TChainOverride extends Chain | undefined>(args: SendTransactionParameters<TChain, TSmartAccount, TChainOverride>) => Promise<Hash>;
|
|
57
|
+
/**
|
|
58
|
+
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
59
|
+
*
|
|
60
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signMessage.html
|
|
61
|
+
* - JSON-RPC Methods:
|
|
62
|
+
* - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data.html#personal-sign)
|
|
63
|
+
* - Local Accounts: Signs locally. No JSON-RPC request.
|
|
64
|
+
*
|
|
65
|
+
* With the calculated signature, you can:
|
|
66
|
+
* - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage.html) to verify the signature,
|
|
67
|
+
* - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress.html) to recover the signing address from a signature.
|
|
68
|
+
*
|
|
69
|
+
* @param args - {@link SignMessageParameters}
|
|
70
|
+
* @returns The signed message. {@link SignMessageReturnType}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* import { createWalletClient, custom } from 'viem'
|
|
74
|
+
* import { mainnet } from 'viem/chains'
|
|
75
|
+
*
|
|
76
|
+
* const client = createWalletClient({
|
|
77
|
+
* chain: mainnet,
|
|
78
|
+
* transport: custom(window.ethereum),
|
|
79
|
+
* })
|
|
80
|
+
* const signature = await client.signMessage({
|
|
81
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
82
|
+
* message: 'hello world',
|
|
83
|
+
* })
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* // Account Hoisting
|
|
87
|
+
* import { createWalletClient, http } from 'viem'
|
|
88
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
89
|
+
* import { mainnet } from 'viem/chains'
|
|
90
|
+
*
|
|
91
|
+
* const client = createWalletClient({
|
|
92
|
+
* account: privateKeyToAccount('0x…'),
|
|
93
|
+
* chain: mainnet,
|
|
94
|
+
* transport: http(),
|
|
95
|
+
* })
|
|
96
|
+
* const signature = await client.signMessage({
|
|
97
|
+
* message: 'hello world',
|
|
98
|
+
* })
|
|
99
|
+
*/
|
|
100
|
+
signMessage: (args: Parameters<typeof signMessage<entryPoint, TTransport, TChain, TSmartAccount>>[1]) => ReturnType<typeof signMessage<entryPoint, TTransport, TChain, TSmartAccount>>;
|
|
101
|
+
/**
|
|
102
|
+
* Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
103
|
+
*
|
|
104
|
+
* - Docs: https://viem.sh/docs/actions/wallet/signTypedData.html
|
|
105
|
+
* - JSON-RPC Methods:
|
|
106
|
+
* - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data.html#signtypeddata-v4)
|
|
107
|
+
* - Local Accounts: Signs locally. No JSON-RPC request.
|
|
108
|
+
*
|
|
109
|
+
* @param client - Client to use
|
|
110
|
+
* @param args - {@link SignTypedDataParameters}
|
|
111
|
+
* @returns The signed data. {@link SignTypedDataReturnType}
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* import { createWalletClient, custom } from 'viem'
|
|
115
|
+
* import { mainnet } from 'viem/chains'
|
|
116
|
+
*
|
|
117
|
+
* const client = createWalletClient({
|
|
118
|
+
* chain: mainnet,
|
|
119
|
+
* transport: custom(window.ethereum),
|
|
120
|
+
* })
|
|
121
|
+
* const signature = await client.signTypedData({
|
|
122
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
123
|
+
* domain: {
|
|
124
|
+
* name: 'Ether Mail',
|
|
125
|
+
* version: '1',
|
|
126
|
+
* chainId: 1,
|
|
127
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
|
128
|
+
* },
|
|
129
|
+
* types: {
|
|
130
|
+
* Person: [
|
|
131
|
+
* { name: 'name', type: 'string' },
|
|
132
|
+
* { name: 'wallet', type: 'address' },
|
|
133
|
+
* ],
|
|
134
|
+
* Mail: [
|
|
135
|
+
* { name: 'from', type: 'Person' },
|
|
136
|
+
* { name: 'to', type: 'Person' },
|
|
137
|
+
* { name: 'contents', type: 'string' },
|
|
138
|
+
* ],
|
|
139
|
+
* },
|
|
140
|
+
* primaryType: 'Mail',
|
|
141
|
+
* message: {
|
|
142
|
+
* from: {
|
|
143
|
+
* name: 'Cow',
|
|
144
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
|
145
|
+
* },
|
|
146
|
+
* to: {
|
|
147
|
+
* name: 'Bob',
|
|
148
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
|
149
|
+
* },
|
|
150
|
+
* contents: 'Hello, Bob!',
|
|
151
|
+
* },
|
|
152
|
+
* })
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* // Account Hoisting
|
|
156
|
+
* import { createWalletClient, http } from 'viem'
|
|
157
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
158
|
+
* import { mainnet } from 'viem/chains'
|
|
159
|
+
*
|
|
160
|
+
* const client = createWalletClient({
|
|
161
|
+
* account: privateKeyToAccount('0x…'),
|
|
162
|
+
* chain: mainnet,
|
|
163
|
+
* transport: http(),
|
|
164
|
+
* })
|
|
165
|
+
* const signature = await client.signTypedData({
|
|
166
|
+
* domain: {
|
|
167
|
+
* name: 'Ether Mail',
|
|
168
|
+
* version: '1',
|
|
169
|
+
* chainId: 1,
|
|
170
|
+
* verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
|
|
171
|
+
* },
|
|
172
|
+
* types: {
|
|
173
|
+
* Person: [
|
|
174
|
+
* { name: 'name', type: 'string' },
|
|
175
|
+
* { name: 'wallet', type: 'address' },
|
|
176
|
+
* ],
|
|
177
|
+
* Mail: [
|
|
178
|
+
* { name: 'from', type: 'Person' },
|
|
179
|
+
* { name: 'to', type: 'Person' },
|
|
180
|
+
* { name: 'contents', type: 'string' },
|
|
181
|
+
* ],
|
|
182
|
+
* },
|
|
183
|
+
* primaryType: 'Mail',
|
|
184
|
+
* message: {
|
|
185
|
+
* from: {
|
|
186
|
+
* name: 'Cow',
|
|
187
|
+
* wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',
|
|
188
|
+
* },
|
|
189
|
+
* to: {
|
|
190
|
+
* name: 'Bob',
|
|
191
|
+
* wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',
|
|
192
|
+
* },
|
|
193
|
+
* contents: 'Hello, Bob!',
|
|
194
|
+
* },
|
|
195
|
+
* })
|
|
196
|
+
*/
|
|
197
|
+
signTypedData: <const TTypedData extends TypedData | {
|
|
198
|
+
[key: string]: unknown;
|
|
199
|
+
}, TPrimaryType extends string>(args: Parameters<typeof signTypedData<entryPoint, TTypedData, TPrimaryType, TTransport, TChain, TSmartAccount>>[1]) => ReturnType<typeof signTypedData<entryPoint, TTypedData, TPrimaryType, TTransport, TChain, TSmartAccount>>;
|
|
200
|
+
/**
|
|
201
|
+
* Deploys a contract to the network, given bytecode and constructor arguments.
|
|
202
|
+
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
203
|
+
*
|
|
204
|
+
* - Docs: https://viem.sh/docs/contract/deployContract.html
|
|
205
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/deploying-contracts
|
|
206
|
+
*
|
|
207
|
+
* @param args - {@link DeployContractParameters}
|
|
208
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link DeployContractReturnType}
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* import { createWalletClient, http } from 'viem'
|
|
212
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
213
|
+
* import { mainnet } from 'viem/chains'
|
|
214
|
+
*
|
|
215
|
+
* const client = createWalletClient({
|
|
216
|
+
* account: privateKeyToAccount('0x…'),
|
|
217
|
+
* chain: mainnet,
|
|
218
|
+
* transport: http(),
|
|
219
|
+
* })
|
|
220
|
+
* const hash = await client.deployContract({
|
|
221
|
+
* abi: [],
|
|
222
|
+
* account: '0x…,
|
|
223
|
+
* bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
|
|
224
|
+
* })
|
|
225
|
+
*/
|
|
226
|
+
deployContract: <const TAbi extends Abi | readonly unknown[], TChainOverride extends Chain | undefined = undefined>(args: Prettify<DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride>>) => Promise<Hash>;
|
|
227
|
+
/**
|
|
228
|
+
* Executes a write function on a contract.
|
|
229
|
+
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
230
|
+
*
|
|
231
|
+
* - Docs: https://viem.sh/docs/contract/writeContract.html
|
|
232
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
|
|
233
|
+
*
|
|
234
|
+
* A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
|
|
235
|
+
*
|
|
236
|
+
* Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
|
|
237
|
+
*
|
|
238
|
+
* __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__
|
|
239
|
+
*
|
|
240
|
+
* @param args - {@link WriteContractParameters}
|
|
241
|
+
* @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash). {@link WriteContractReturnType}
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* import { createWalletClient, custom, parseAbi } from 'viem'
|
|
245
|
+
* import { mainnet } from 'viem/chains'
|
|
246
|
+
*
|
|
247
|
+
* const client = createWalletClient({
|
|
248
|
+
* chain: mainnet,
|
|
249
|
+
* transport: custom(window.ethereum),
|
|
250
|
+
* })
|
|
251
|
+
* const hash = await client.writeContract({
|
|
252
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
|
253
|
+
* abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
|
|
254
|
+
* functionName: 'mint',
|
|
255
|
+
* args: [69420],
|
|
256
|
+
* })
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* // With Validation
|
|
260
|
+
* import { createWalletClient, custom, parseAbi } from 'viem'
|
|
261
|
+
* import { mainnet } from 'viem/chains'
|
|
262
|
+
*
|
|
263
|
+
* const client = createWalletClient({
|
|
264
|
+
* chain: mainnet,
|
|
265
|
+
* transport: custom(window.ethereum),
|
|
266
|
+
* })
|
|
267
|
+
* const { request } = await client.simulateContract({
|
|
268
|
+
* address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
|
|
269
|
+
* abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
|
|
270
|
+
* functionName: 'mint',
|
|
271
|
+
* args: [69420],
|
|
272
|
+
* }
|
|
273
|
+
* const hash = await client.writeContract(request)
|
|
274
|
+
*/
|
|
275
|
+
writeContract: <const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(args: WriteContractParameters<TAbi, TFunctionName, TArgs, TChain, TSmartAccount, TChainOverride>) => ReturnType<typeof writeContract<entryPoint, TTransport, TChain, TSmartAccount, TAbi, TFunctionName, TArgs, TChainOverride>>;
|
|
276
|
+
prepareUserOperationRequest: <TTransport extends Transport>(args: Prettify<Parameters<typeof prepareUserOperationRequest<entryPoint, TTransport, TChain, TSmartAccount>>[1]>, stateOverrides?: StateOverrides) => Promise<Prettify<PrepareUserOperationRequestReturnType<entryPoint>>>;
|
|
277
|
+
sendUserOperation: <TTransport extends Transport>(args: Prettify<Parameters<typeof sendUserOperation<entryPoint, TTransport, TChain, TSmartAccount>>[1]>) => Promise<Hash>;
|
|
278
|
+
/**
|
|
279
|
+
* Creates, signs, and sends a new transaction to the network.
|
|
280
|
+
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
281
|
+
*
|
|
282
|
+
* - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html
|
|
283
|
+
* - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions
|
|
284
|
+
* - JSON-RPC Methods:
|
|
285
|
+
* - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
|
|
286
|
+
* - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
|
|
287
|
+
*
|
|
288
|
+
* @param args - {@link SendTransactionParameters}
|
|
289
|
+
* @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType}
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* import { createWalletClient, custom } from 'viem'
|
|
293
|
+
* import { mainnet } from 'viem/chains'
|
|
294
|
+
*
|
|
295
|
+
* const client = createWalletClient({
|
|
296
|
+
* chain: mainnet,
|
|
297
|
+
* transport: custom(window.ethereum),
|
|
298
|
+
* })
|
|
299
|
+
* const hash = await client.sendTransaction([{
|
|
300
|
+
* account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
|
|
301
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
302
|
+
* value: 1000000000000000000n
|
|
303
|
+
* }, {
|
|
304
|
+
* to: '0x61897970c51812dc3a010c7d01b50e0d17dc1234',
|
|
305
|
+
* value: 10000000000000000n
|
|
306
|
+
* })
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* // Account Hoisting
|
|
310
|
+
* import { createWalletClient, http } from 'viem'
|
|
311
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
312
|
+
* import { mainnet } from 'viem/chains'
|
|
313
|
+
*
|
|
314
|
+
* const client = createWalletClient({
|
|
315
|
+
* account: privateKeyToAccount('0x…'),
|
|
316
|
+
* chain: mainnet,
|
|
317
|
+
* transport: http(),
|
|
318
|
+
* })
|
|
319
|
+
* const hash = await client.sendTransaction([{
|
|
320
|
+
* to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
|
|
321
|
+
* value: 1000000000000000000n
|
|
322
|
+
* }, {
|
|
323
|
+
* to: '0x61897970c51812dc3a010c7d01b50e0d17dc1234',
|
|
324
|
+
* value: 10000000000000000n
|
|
325
|
+
* }])
|
|
326
|
+
*/
|
|
327
|
+
sendTransactions: (args: Prettify<SendTransactionsWithPaymasterParameters<entryPoint, TTransport, TChain, TSmartAccount>>) => ReturnType<typeof sendTransactions<TTransport, TChain, TSmartAccount, entryPoint>>;
|
|
328
|
+
};
|
|
329
|
+
export declare function smartAccountActions<entryPoint extends EntryPoint>({ middleware }: Middleware<entryPoint>): <TTransport extends Transport, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount<entryPoint, string, TTransport, TChain> | undefined = SmartAccount<entryPoint, string, TTransport, TChain> | undefined>(client: Client<TTransport, TChain, TSmartAccount>) => SmartAccountActions<entryPoint, TTransport, TChain, TSmartAccount>;
|
|
330
|
+
//# sourceMappingURL=smartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartAccount.d.ts","sourceRoot":"","sources":["../../../clients/decorators/smartAccount.ts"],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;;;;;;;;;OAgDG;IACH,gBAAgB,EAAE,CACd,IAAI,EAAE,QAAQ,CACV,uCAAuC,CACnC,UAAU,EACV,UAAU,EACV,MAAM,EACN,aAAa,CAChB,CACJ,KACA,UAAU,CACX,OAAO,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,CAAC,CACzE,CAAA;CACJ,CAAA;AAED,wBAAgB,mBAAmB,CAAC,UAAU,SAAS,UAAU,EAAE,EAC/D,UAAU,EACb,EAAE,UAAU,CAAC,UAAU,CAAC,2PAUT,OAAO,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,KAClD,oBAAoB,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,CAkHxE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Address, Client } from "viem";
|
|
2
|
+
import { type AccountsParameters } from "../../actions/stackup/accounts";
|
|
3
|
+
import { type SponsorUserOperationParameters, type SponsorUserOperationReturnType } from "../../actions/stackup/sponsorUserOperation";
|
|
4
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
5
|
+
export type StackupPaymasterClientActions<entryPoint extends EntryPoint> = {
|
|
6
|
+
/**
|
|
7
|
+
* Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
|
|
8
|
+
*
|
|
9
|
+
* https://docs.stackup.sh/docs/paymaster-api-rpc-methods#pm_sponsoruseroperation
|
|
10
|
+
*
|
|
11
|
+
* @param args {@link SponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
|
|
12
|
+
* @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { createClient } from "viem"
|
|
16
|
+
* import { stackupPaymasterActions } from "permissionless/actions/stackup"
|
|
17
|
+
*
|
|
18
|
+
* const bundlerClient = createClient({
|
|
19
|
+
* chain: goerli,
|
|
20
|
+
* transport: http("https://api.stackup.sh/v1/paymaster/YOUR_API_KEY_HERE")
|
|
21
|
+
* }).extend(stackupPaymasterActions)
|
|
22
|
+
*
|
|
23
|
+
* await bundlerClient.sponsorUserOperation(bundlerClient, {
|
|
24
|
+
* userOperation: userOperationWithDummySignature,
|
|
25
|
+
* entryPoint: entryPoint
|
|
26
|
+
* }})
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
sponsorUserOperation: (args: Omit<SponsorUserOperationParameters<entryPoint>, "entrypoint">) => Promise<SponsorUserOperationReturnType<entryPoint>>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns all the Paymaster addresses associated with an EntryPoint that’s owned by this service.
|
|
32
|
+
*
|
|
33
|
+
* https://docs.stackup.sh/docs/paymaster-api-rpc-methods#pm_accounts
|
|
34
|
+
*
|
|
35
|
+
* @param args {@link AccountsParameters} entryPoint for which you want to get list of supported paymasters.
|
|
36
|
+
* @returns paymaster addresses
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* import { createClient } from "viem"
|
|
40
|
+
* import { stackupPaymasterActions } from "permissionless/actions/stackup"
|
|
41
|
+
*
|
|
42
|
+
* const bundlerClient = createClient({
|
|
43
|
+
* chain: goerli,
|
|
44
|
+
* transport: http("https://api.stackup.sh/v1/paymaster/YOUR_API_KEY_HERE")
|
|
45
|
+
* }).extend(stackupPaymasterActions)
|
|
46
|
+
*
|
|
47
|
+
* await bundlerClient.accounts(bundlerClient, {
|
|
48
|
+
* entryPoint: entryPoint
|
|
49
|
+
* }})
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
accounts: (args: AccountsParameters<entryPoint>) => Promise<Address[]>;
|
|
53
|
+
};
|
|
54
|
+
export declare const stackupPaymasterActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => StackupPaymasterClientActions<entryPoint>;
|
|
55
|
+
//# sourceMappingURL=stackup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackup.d.ts","sourceRoot":"","sources":["../../../clients/decorators/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACH,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EAEtC,MAAM,4CAA4C,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,MAAM,6BAA6B,CAAC,UAAU,SAAS,UAAU,IAAI;IACvE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oBAAoB,EAAE,CAClB,IAAI,EAAE,IAAI,CAAC,8BAA8B,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,KACnE,OAAO,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAA;IAExD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;CACzE,CAAA;AAED,eAAO,MAAM,uBAAuB,qDACmB,UAAU,cACpD,MAAM,KAAG,8BAA8B,UAAU,CAQxD,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
3
|
+
import type { PimlicoBundlerRpcSchema, PimlicoPaymasterRpcSchema } from "../types/pimlico";
|
|
4
|
+
import { type BundlerActions } from "./decorators/bundler";
|
|
5
|
+
import { type PimlicoBundlerActions, type PimlicoPaymasterClientActions } from "./decorators/pimlico";
|
|
6
|
+
export type PimlicoBundlerClient<entryPoint extends EntryPoint> = Client<Transport, Chain | undefined, Account | undefined, PimlicoBundlerRpcSchema, PimlicoBundlerActions & BundlerActions<entryPoint>>;
|
|
7
|
+
export type PimlicoPaymasterClient<entryPoint extends EntryPoint> = Client<Transport, Chain | undefined, Account | undefined, PimlicoPaymasterRpcSchema<entryPoint>, PimlicoPaymasterClientActions<entryPoint>>;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a pimlico specific Bundler Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
10
|
+
*
|
|
11
|
+
* - Docs: https://docs.pimlico.io/permissionless/reference/clients/pimlicoBundlerClient
|
|
12
|
+
*
|
|
13
|
+
* A Pimlico Client is an interface to "pimlico endpoints" [JSON-RPC API](https://docs.pimlico.io/reference/bundler/endpoints) methods such as getting current blockchain gas prices, getting user operation status, etc through [Pimlico Bundler Actions](TODO://Add bundler action documentation link).
|
|
14
|
+
*
|
|
15
|
+
* @param config - {@link PublicClientConfig}
|
|
16
|
+
* @returns A Pimlico Bundler Client. {@link PimlicoBundlerClient}
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* import { createPublicClient, http } from 'viem'
|
|
20
|
+
* import { mainnet } from 'viem/chains'
|
|
21
|
+
*
|
|
22
|
+
* const pimlicoBundlerClient = createPimlicoBundlerClient({
|
|
23
|
+
* chain: mainnet,
|
|
24
|
+
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
25
|
+
* })
|
|
26
|
+
*/
|
|
27
|
+
export declare const createPimlicoBundlerClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: PublicClientConfig<transport, chain> & {
|
|
28
|
+
entryPoint: entryPoint;
|
|
29
|
+
}) => PimlicoBundlerClient<entryPoint>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a pimlico specific Paymaster Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
32
|
+
*
|
|
33
|
+
* - Docs: https://docs.pimlico.io/permissionless/reference/clients/pimlicoPaymasterClient
|
|
34
|
+
*
|
|
35
|
+
* A Pimlico Paymaster Client is an interface to "pimlico paymaster endpoints" [JSON-RPC API](https://docs.pimlico.io/reference/verifying-paymaster/endpoints) methods such as sponsoring user operation, etc through Pimlico Paymaster Actions.
|
|
36
|
+
*
|
|
37
|
+
* @param config - {@link PublicClientConfig}
|
|
38
|
+
* @returns A Pimlico Paymaster Client. {@link PimlicoPaymasterClient}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* import { createPublicClient, http } from 'viem'
|
|
42
|
+
* import { mainnet } from 'viem/chains'
|
|
43
|
+
*
|
|
44
|
+
* const pimlicoPaymasterClient = createPimlicoPaymasterClient({
|
|
45
|
+
* chain: mainnet,
|
|
46
|
+
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
export declare const createPimlicoPaymasterClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: PublicClientConfig<transport, chain> & {
|
|
50
|
+
entryPoint: entryPoint;
|
|
51
|
+
}) => PimlicoPaymasterClient<entryPoint>;
|
|
52
|
+
//# sourceMappingURL=pimlico.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../clients/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,kBAAkB,EAClB,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EACR,uBAAuB,EACvB,yBAAyB,EAC5B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAGrC,MAAM,sBAAsB,CAAA;AAE7B,MAAM,MAAM,oBAAoB,CAAC,UAAU,SAAS,UAAU,IAAI,MAAM,CACpE,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,uBAAuB,EACvB,qBAAqB,GAAG,cAAc,CAAC,UAAU,CAAC,CACrD,CAAA;AAED,MAAM,MAAM,sBAAsB,CAAC,UAAU,SAAS,UAAU,IAAI,MAAM,CACtE,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,yBAAyB,CAAC,UAAU,CAAC,EACrC,6BAA6B,CAAC,UAAU,CAAC,CAC5C,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B,oIAKvB,mBAAmB,SAAS,EAAE,KAAK,CAAC,GAAG;IAC/C,YAAY,UAAU,CAAA;CACzB,KACF,qBAAqB,UAAU,CAWjC,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,4BAA4B,oIAKzB,mBAAmB,SAAS,EAAE,KAAK,CAAC,GAAG;IAC/C,YAAY,UAAU,CAAA;CACzB,KACF,uBAAuB,UAAU,CASnC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Account, type Chain, type Client, type PublicClientConfig, type Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
3
|
+
import type { StackupPaymasterRpcSchema } from "../types/stackup";
|
|
4
|
+
import { type BundlerActions } from "./decorators/bundler";
|
|
5
|
+
import { type StackupPaymasterClientActions } from "./decorators/stackup";
|
|
6
|
+
export type StackupPaymasterClient<entryPoint extends EntryPoint> = Client<Transport, Chain | undefined, Account | undefined, StackupPaymasterRpcSchema<entryPoint>, StackupPaymasterClientActions<entryPoint> & BundlerActions<entryPoint>>;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a Stackup specific Paymaster Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
9
|
+
*
|
|
10
|
+
* - Docs: https://docs.pimlico.io/permissionless/reference/clients/stackupPaymasterClient
|
|
11
|
+
*
|
|
12
|
+
* A Stackup Paymaster Client is an interface to "stackup paymaster endpoints" [JSON-RPC API](https://docs.stackup.sh/docs/paymaster-api-rpc-methods) methods such as sponsoring user operation, etc through Stackup Paymaster Actions.
|
|
13
|
+
*
|
|
14
|
+
* @param config - {@link PublicClientConfig}
|
|
15
|
+
* @returns A Stackup Paymaster Client. {@link StackupPaymasterClient}
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* import { createPublicClient, http } from 'viem'
|
|
19
|
+
* import { mainnet } from 'viem/chains'
|
|
20
|
+
*
|
|
21
|
+
* const stackupPaymasterClient = createStackupPaymasterClient({
|
|
22
|
+
* chain: mainnet,
|
|
23
|
+
* transport: http("https://api.stackup.sh/v2/paymaster/YOUR_API_KEY_HERE"),
|
|
24
|
+
* })
|
|
25
|
+
*/
|
|
26
|
+
export declare const createStackupPaymasterClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: PublicClientConfig<transport, chain> & {
|
|
27
|
+
entryPoint: entryPoint;
|
|
28
|
+
}) => StackupPaymasterClient<entryPoint>;
|
|
29
|
+
//# sourceMappingURL=stackup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackup.d.ts","sourceRoot":"","sources":["../../clients/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAEjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EACH,KAAK,6BAA6B,EAErC,MAAM,sBAAsB,CAAA;AAE7B,MAAM,MAAM,sBAAsB,CAAC,UAAU,SAAS,UAAU,IAAI,MAAM,CACtE,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,yBAAyB,CAAC,UAAU,CAAC,EACrC,6BAA6B,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,UAAU,CAAC,CACzE,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,4BAA4B,oIAKzB,mBAAmB,SAAS,EAAE,KAAK,CAAC,GAAG;IAC/C,YAAY,UAAU,CAAA;CACzB,KACF,uBAAuB,UAAU,CAWnC,CAAA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type Address, BaseError } from "viem";
|
|
2
|
+
export type SenderAlreadyDeployedErrorType = SenderAlreadyDeployedError & {
|
|
3
|
+
name: "SenderAlreadyDeployedError";
|
|
4
|
+
};
|
|
5
|
+
export declare class SenderAlreadyDeployedError extends BaseError {
|
|
6
|
+
static message: RegExp;
|
|
7
|
+
name: "SenderAlreadyDeployedError";
|
|
8
|
+
constructor({ cause, sender, docsPath }?: {
|
|
9
|
+
cause?: BaseError;
|
|
10
|
+
sender?: Address;
|
|
11
|
+
docsPath?: string;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export type InitCodeRevertedErrorType = InitCodeRevertedError & {
|
|
15
|
+
name: "InitCodeRevertedError";
|
|
16
|
+
};
|
|
17
|
+
export declare class InitCodeRevertedError extends BaseError {
|
|
18
|
+
static message: RegExp;
|
|
19
|
+
name: "InitCodeRevertedError";
|
|
20
|
+
constructor({ cause, docsPath }?: {
|
|
21
|
+
cause?: BaseError;
|
|
22
|
+
docsPath?: string;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export type SenderAddressMismatchErrorType = SenderAddressMismatchError & {
|
|
26
|
+
name: "SenderAddressMismatchError";
|
|
27
|
+
};
|
|
28
|
+
export declare class SenderAddressMismatchError extends BaseError {
|
|
29
|
+
static message: RegExp;
|
|
30
|
+
name: "SenderAddressMismatchError";
|
|
31
|
+
constructor({ cause, sender, docsPath }: {
|
|
32
|
+
cause?: BaseError;
|
|
33
|
+
sender: Address;
|
|
34
|
+
docsPath?: string;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export type InitCodeDidNotDeploySenderErrorType = InitCodeDidNotDeploySenderError & {
|
|
38
|
+
name: "InitCodeDidNotDeploySenderError";
|
|
39
|
+
};
|
|
40
|
+
export declare class InitCodeDidNotDeploySenderError extends BaseError {
|
|
41
|
+
static message: RegExp;
|
|
42
|
+
name: "InitCodeDidNotDeploySenderError";
|
|
43
|
+
constructor({ cause, sender, docsPath }: {
|
|
44
|
+
cause?: BaseError;
|
|
45
|
+
sender: Address;
|
|
46
|
+
docsPath?: string;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export type SenderNotDeployedErrorType = SenderNotDeployedError & {
|
|
50
|
+
name: "SenderNotDeployedError";
|
|
51
|
+
};
|
|
52
|
+
export declare class SenderNotDeployedError extends BaseError {
|
|
53
|
+
static message: RegExp;
|
|
54
|
+
name: "SenderNotDeployedError";
|
|
55
|
+
constructor({ cause, sender, docsPath }: {
|
|
56
|
+
cause?: BaseError;
|
|
57
|
+
sender: Address;
|
|
58
|
+
docsPath?: string;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export type SmartAccountInsufficientFundsErrorType = SmartAccountInsufficientFundsError & {
|
|
62
|
+
name: "SmartAccountInsufficientFundsError";
|
|
63
|
+
};
|
|
64
|
+
export declare class SmartAccountInsufficientFundsError extends BaseError {
|
|
65
|
+
static message: RegExp;
|
|
66
|
+
name: "SmartAccountInsufficientFundsError";
|
|
67
|
+
constructor({ cause, sender, docsPath }: {
|
|
68
|
+
cause?: BaseError;
|
|
69
|
+
sender: Address;
|
|
70
|
+
docsPath?: string;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
export type SmartAccountSignatureValidityPeriodErrorType = SmartAccountSignatureValidityPeriodError & {
|
|
74
|
+
name: "SmartAccountSignatureValidityPeriodError";
|
|
75
|
+
};
|
|
76
|
+
export declare class SmartAccountSignatureValidityPeriodError extends BaseError {
|
|
77
|
+
static message: RegExp;
|
|
78
|
+
name: "SmartAccountSignatureValidityPeriodError";
|
|
79
|
+
constructor({ cause, docsPath }: {
|
|
80
|
+
cause?: BaseError;
|
|
81
|
+
docsPath?: string;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
export type SmartAccountValidationRevertedErrorType = SmartAccountValidationRevertedError & {
|
|
85
|
+
name: "SmartAccountValidationRevertedError";
|
|
86
|
+
};
|
|
87
|
+
export declare class SmartAccountValidationRevertedError extends BaseError {
|
|
88
|
+
static message: RegExp;
|
|
89
|
+
name: "SmartAccountValidationRevertedError";
|
|
90
|
+
constructor({ cause, sender, docsPath }: {
|
|
91
|
+
cause?: BaseError;
|
|
92
|
+
sender: Address;
|
|
93
|
+
docsPath?: string;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export type InvalidSmartAccountSignatureErrorType = InvalidSmartAccountSignatureError & {
|
|
97
|
+
name: "InvalidSmartAccountSignatureError";
|
|
98
|
+
};
|
|
99
|
+
export declare class InvalidSmartAccountSignatureError extends BaseError {
|
|
100
|
+
static message: RegExp;
|
|
101
|
+
name: "InvalidSmartAccountSignatureError";
|
|
102
|
+
constructor({ cause, sender, docsPath }: {
|
|
103
|
+
cause?: BaseError;
|
|
104
|
+
sender: Address;
|
|
105
|
+
docsPath?: string;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export type InvalidSmartAccountNonceErrorType = InvalidSmartAccountNonceError & {
|
|
109
|
+
name: "InvalidSmartAccountNonceError";
|
|
110
|
+
};
|
|
111
|
+
export declare class InvalidSmartAccountNonceError extends BaseError {
|
|
112
|
+
static message: RegExp;
|
|
113
|
+
name: "InvalidSmartAccountNonceError";
|
|
114
|
+
constructor({ cause, sender, nonce, docsPath }: {
|
|
115
|
+
cause?: BaseError;
|
|
116
|
+
sender: Address;
|
|
117
|
+
docsPath?: string;
|
|
118
|
+
nonce: bigint;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../errors/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE9C,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,GAAG;IACtE,IAAI,EAAE,4BAA4B,CAAA;CACrC,CAAA;AACD,qBAAa,0BAA2B,SAAQ,SAAS;IACrD,MAAM,CAAC,OAAO,SAAS;IACd,IAAI,+BAAwC;gBACzC,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACX,GAAE;QAAE,KAAK,CAAC,EAAE,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;CAerE;AAED,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,GAAG;IAC5D,IAAI,EAAE,uBAAuB,CAAA;CAChC,CAAA;AACD,qBAAa,qBAAsB,SAAQ,SAAS;IAChD,MAAM,CAAC,OAAO,SAAS;IACd,IAAI,0BAAmC;gBACpC,EACR,KAAK,EACL,QAAQ,EACX,GAAE;QAAE,KAAK,CAAC,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;CAqBnD;AAED,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,GAAG;IACtE,IAAI,EAAE,4BAA4B,CAAA;CACrC,CAAA;AACD,qBAAa,0BAA2B,SAAQ,SAAS;IACrD,MAAM,CAAC,OAAO,SAAS;IACd,IAAI,+BAAwC;gBACzC,EACR,KAAK,EACL,MAAM,EACN,QAAQ,EACX,EAAE;QACC,KAAK,CAAC,EAAE,SA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AAE,MAAM,CAAA;KAChB;CAoBJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseError } from "viem";
|
|
2
|
+
export type InvalidBeneficiaryAddressErrorType = InvalidBeneficiaryAddressError & {
|
|
3
|
+
name: "InvalidBeneficiaryAddressError";
|
|
4
|
+
};
|
|
5
|
+
export declare class InvalidBeneficiaryAddressError extends BaseError {
|
|
6
|
+
static message: RegExp;
|
|
7
|
+
name: string;
|
|
8
|
+
constructor({ cause, docsPath }: {
|
|
9
|
+
cause?: BaseError;
|
|
10
|
+
docsPath?: string;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export type InvalidAggregatorErrorType = InvalidAggregatorError & {
|
|
14
|
+
name: "InvalidAggregatorError";
|
|
15
|
+
};
|
|
16
|
+
export declare class InvalidAggregatorError extends BaseError {
|
|
17
|
+
static message: RegExp;
|
|
18
|
+
name: string;
|
|
19
|
+
constructor({ cause, docsPath }: {
|
|
20
|
+
cause?: BaseError;
|
|
21
|
+
docsPath?: string;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=bundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../errors/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEhC,MAAM,MAAM,kCAAkC,GAC1C,8BAA8B,GAAG;IAC7B,IAAI,EAAE,gCAAgC,CAAA;CACzC,CAAA;AACL,qBAAa,8BAA+B,SAAQ,SAAS;IACzD,MAAM,CAAC,OAAO,SAAY;IACjB,IAAI,SAAmC;gBACpC,EACR,KAAK,EACL,QAAQ,EACX,EAAE;QACC,KAAK,CAAC,EAAE,SAAS,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB;CAgBJ;AAED,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,GAAG;IAC9D,IAAI,EAAE,wBAAwB,CAAA;CACjC,CAAA;AACD,qBAAa,sBAAuB,SAAQ,SAAS;IACjD,MAAM,CAAC,OAAO,SAAS;IACd,IAAI,SAA2B;gBAC5B,EACR,KAAK,EACL,QAAQ,EACX,EAAE;QACC,KAAK,CAAC,EAAE,SAAS,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB;CAgBJ"}
|