permissionless 0.1.48 → 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 @@
|
|
|
1
|
+
{"version":3,"file":"getNonceKey.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/utils/getNonceKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAoC,MAAM,MAAM,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGvE,eAAO,MAAM,uBAAuB,kBACjB,cAAc,UAAU,CAAC,oBACtB,OAAO,8BAyB5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isKernelV2.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/utils/isKernelV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,eAAO,MAAM,UAAU,YAAa,cAAc,UAAU,CAAC,KAAG,OAG/D,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Account, type Chain, type Client, type SignMessageParameters, type SignMessageReturnType, type Transport } from "viem";
|
|
2
|
+
import { type WrapMessageHashParams } from "./wrapMessageHash";
|
|
3
|
+
export declare function signMessage<TChain extends Chain | undefined, TAccount extends Account | undefined>(client: Client<Transport, TChain, TAccount>, { account: account_, message, accountAddress, accountVersion }: SignMessageParameters<TAccount> & WrapMessageHashParams): Promise<SignMessageReturnType>;
|
|
4
|
+
//# sourceMappingURL=signMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/utils/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAEX,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EAGjB,MAAM,MAAM,CAAA;AAGb,OAAO,EAAE,KAAK,qBAAqB,EAAmB,MAAM,mBAAmB,CAAA;AAE/E,wBAAsB,WAAW,CAC7B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,EAEpC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EACI,OAAO,EAAE,QAAyB,EAClC,OAAO,EACP,cAAc,EACd,cAAc,EACjB,EAAE,qBAAqB,CAAC,QAAQ,CAAC,GAAG,qBAAqB,GAC3D,OAAO,CAAC,qBAAqB,CAAC,CAsBhC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Account, type Chain, type Client, type SignTypedDataParameters, type SignTypedDataReturnType, type Transport, type TypedData } from "viem";
|
|
2
|
+
import { type WrapMessageHashParams } from "./wrapMessageHash";
|
|
3
|
+
export declare function signTypedData<const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain", chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: SignTypedDataParameters<typedData, primaryType, account> & WrapMessageHashParams): Promise<SignTypedDataReturnType>;
|
|
4
|
+
//# sourceMappingURL=signTypedData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/utils/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAEX,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AAOb,OAAO,EAAE,KAAK,qBAAqB,EAAmB,MAAM,mBAAmB,CAAA;AAE/E,wBAAsB,aAAa,CAC/B,KAAK,CAAC,SAAS,SAAS,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,WAAW,SAAS,MAAM,SAAS,GAAG,cAAc,EACpD,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,OAAO,GAAG,SAAS,EAEnC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,UAAU,EAAE,uBAAuB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,GAChE,qBAAqB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Hex } from "viem";
|
|
2
|
+
import { type Address } from "viem";
|
|
3
|
+
import type { EntryPoint } from "../../../types";
|
|
4
|
+
import type { KernelVersion } from "../signerToEcdsaKernelSmartAccount";
|
|
5
|
+
export type WrapMessageHashParams = {
|
|
6
|
+
accountVersion: KernelVersion<EntryPoint>;
|
|
7
|
+
accountAddress: Address;
|
|
8
|
+
chainId?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const wrapMessageHash: (messageHash: Hex, { accountAddress, accountVersion, chainId }: WrapMessageHashParams) => `0x${string}`;
|
|
11
|
+
//# sourceMappingURL=wrapMessageHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapMessageHash.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/utils/wrapMessageHash.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EAKX,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,KAAK,OAAO,EAAmB,MAAM,MAAM,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,MAAM,MAAM,qBAAqB,GAAG;IAChC,cAAc,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IACzC,cAAc,EAAE,OAAO,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,eAAe,gBACX,GAAG,+CAC6B,qBAAqB,kBAoBrE,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, PublicActions, PublicRpcSchema, Transport } from "viem";
|
|
2
|
+
import type { Prettify } from "../../types";
|
|
3
|
+
import type { EntryPoint } from "../../types";
|
|
4
|
+
import { type LightSmartAccount, type SignerToLightSmartAccountParameters } from "./signerToLightSmartAccount";
|
|
5
|
+
export type PrivateKeyToLightSmartAccountParameters<entryPoint extends EntryPoint> = Prettify<{
|
|
6
|
+
privateKey: Hex;
|
|
7
|
+
} & Omit<SignerToLightSmartAccountParameters<entryPoint>, "signer">>;
|
|
8
|
+
/**
|
|
9
|
+
* @description Creates an Light Account from a private key.
|
|
10
|
+
*
|
|
11
|
+
* @returns A Private Key Light Account.
|
|
12
|
+
*/
|
|
13
|
+
export declare function privateKeyToLightSmartAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { privateKey, ...rest }: PrivateKeyToLightSmartAccountParameters<entryPoint>): Promise<LightSmartAccount<entryPoint, TTransport, TChain>>;
|
|
14
|
+
//# sourceMappingURL=privateKeyToLightSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateKeyToLightSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/light/privateKeyToLightSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,KAAK,EACL,MAAM,EACN,GAAG,EACH,aAAa,EACb,eAAe,EACf,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EAE3C,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,uCAAuC,CAC/C,UAAU,SAAS,UAAU,IAC7B,QAAQ,CACR;IACI,UAAU,EAAE,GAAG,CAAA;CAClB,GAAG,IAAI,CAAC,mCAAmC,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CACtE,CAAA;AAED;;;;GAIG;AACH,wBAAsB,6BAA6B,CAC/C,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CACpC,EACD,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,uCAAuC,CAAC,UAAU,CAAC,GAC7E,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAO5D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
|
|
2
|
+
import type { Prettify } from "../../types";
|
|
3
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
4
|
+
import { type SmartAccount, type SmartAccountSigner } from "../types";
|
|
5
|
+
export type LightSmartAccount<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = SmartAccount<entryPoint, "LightSmartAccount", transport, chain>;
|
|
6
|
+
export type LightAccountVersion = "1.1.0";
|
|
7
|
+
export type SignerToLightSmartAccountParameters<entryPoint extends EntryPoint, TSource extends string = string, TAddress extends Address = Address> = Prettify<{
|
|
8
|
+
signer: SmartAccountSigner<TSource, TAddress>;
|
|
9
|
+
lightAccountVersion: LightAccountVersion;
|
|
10
|
+
entryPoint: entryPoint;
|
|
11
|
+
factoryAddress?: Address;
|
|
12
|
+
index?: bigint;
|
|
13
|
+
address?: Address;
|
|
14
|
+
nonceKey?: bigint;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* @description Creates an Light Account from a private key.
|
|
18
|
+
*
|
|
19
|
+
* @returns A Private Key Light Account.
|
|
20
|
+
*/
|
|
21
|
+
export declare function signerToLightSmartAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = string, TAddress extends Address = Address>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { signer, address, lightAccountVersion, entryPoint: entryPointAddress, index, factoryAddress: _factoryAddress, nonceKey }: SignerToLightSmartAccountParameters<entryPoint, TSource, TAddress>): Promise<LightSmartAccount<entryPoint, TTransport, TChain>>;
|
|
22
|
+
//# sourceMappingURL=signerToLightSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerToLightSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/light/signerToLightSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,EAOjB,MAAM,MAAM,CAAA;AAIb,OAAO,KAAK,EAGR,QAAQ,EACX,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKxD,OAAO,EAEH,KAAK,YAAY,EACjB,K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AmC,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,GACtE,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CA6M5D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, PublicActions, PublicRpcSchema, Transport } from "viem";
|
|
2
|
+
import type { EntryPoint, Prettify } from "../../types";
|
|
3
|
+
import { type SafeSmartAccount, type SignerToSafeSmartAccountParameters } from "./signerToSafeSmartAccount";
|
|
4
|
+
export type PrivateKeyToSafeSmartAccountParameters<entryPoint extends EntryPoint> = Prettify<{
|
|
5
|
+
privateKey: Hex;
|
|
6
|
+
} & Omit<SignerToSafeSmartAccountParameters<entryPoint>, "signer">>;
|
|
7
|
+
/**
|
|
8
|
+
* @description Creates an Simple Account from a private key.
|
|
9
|
+
*
|
|
10
|
+
* @returns A Private Key Simple Account.
|
|
11
|
+
*/
|
|
12
|
+
export declare function privateKeyToSafeSmartAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { privateKey, ...rest }: PrivateKeyToSafeSmartAccountParameters<entryPoint>): Promise<SafeSmartAccount<entryPoint, TTransport, TChain>>;
|
|
13
|
+
//# sourceMappingURL=privateKeyToSafeSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateKeyToSafeSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/safe/privateKeyToSafeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,KAAK,EACL,MAAM,EACN,GAAG,EACH,aAAa,EACb,eAAe,EACf,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAA;AAEnC,MAAM,MAAM,sCAAsC,CAC9C,UAAU,SAAS,UAAU,IAC7B,QAAQ,CACR;IACI,UAAU,EAAE,GAAG,CAAA;CAClB,GAAG,IAAI,CAAC,kCAAkC,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CACrE,CAAA;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAC9C,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CACpC,EACD,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,sCAAsC,CAAC,UAAU,CAAC,GAC5E,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAO3D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../../types";
|
|
3
|
+
import { type SmartAccount, type SmartAccountSigner } from "../types";
|
|
4
|
+
export type SafeVersion = "1.4.1";
|
|
5
|
+
export type SafeSmartAccount<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = SmartAccount<entryPoint, "SafeSmartAccount", transport, chain>;
|
|
6
|
+
type GetErc7579Params<TErc7579 extends Address | undefined> = TErc7579 extends undefined ? {
|
|
7
|
+
safeModuleSetupAddress?: Address;
|
|
8
|
+
multiSendAddress?: Address;
|
|
9
|
+
multiSendCallOnlyAddress?: Address;
|
|
10
|
+
setupTransactions?: {
|
|
11
|
+
to: Address;
|
|
12
|
+
data: Address;
|
|
13
|
+
value: bigint;
|
|
14
|
+
}[];
|
|
15
|
+
safeModules?: Address[];
|
|
16
|
+
} : {
|
|
17
|
+
validators?: {
|
|
18
|
+
address: Address;
|
|
19
|
+
context: Address;
|
|
20
|
+
}[];
|
|
21
|
+
executors?: {
|
|
22
|
+
address: Address;
|
|
23
|
+
context: Address;
|
|
24
|
+
}[];
|
|
25
|
+
fallbacks?: {
|
|
26
|
+
address: Address;
|
|
27
|
+
context: Address;
|
|
28
|
+
}[];
|
|
29
|
+
hooks?: {
|
|
30
|
+
address: Address;
|
|
31
|
+
context: Address;
|
|
32
|
+
}[];
|
|
33
|
+
attesters?: Address[];
|
|
34
|
+
attestersThreshold?: number;
|
|
35
|
+
};
|
|
36
|
+
export type SignerToSafeSmartAccountParameters<entryPoint extends EntryPoint, TSource extends string = string, TAddress extends Address = Address, TErc7579 extends Address | undefined = Address | undefined> = {
|
|
37
|
+
signer: SmartAccountSigner<TSource, TAddress>;
|
|
38
|
+
safeVersion: SafeVersion;
|
|
39
|
+
entryPoint: entryPoint;
|
|
40
|
+
safe4337ModuleAddress?: Address;
|
|
41
|
+
erc7569LaunchpadAddress?: Address;
|
|
42
|
+
erc7579LaunchpadAddress?: TErc7579;
|
|
43
|
+
safeProxyFactoryAddress?: Address;
|
|
44
|
+
safeSingletonAddress?: Address;
|
|
45
|
+
address?: Address;
|
|
46
|
+
saltNonce?: bigint;
|
|
47
|
+
validUntil?: number;
|
|
48
|
+
validAfter?: number;
|
|
49
|
+
nonceKey?: bigint;
|
|
50
|
+
paymentToken?: Address;
|
|
51
|
+
payment?: bigint;
|
|
52
|
+
paymentReceiver?: Address;
|
|
53
|
+
} & GetErc7579Params<TErc7579>;
|
|
54
|
+
/**
|
|
55
|
+
* @description Creates an Simple Account from a private key.
|
|
56
|
+
*
|
|
57
|
+
* @returns A Private Key Simple Account.
|
|
58
|
+
*/
|
|
59
|
+
export declare function signerToSafeSmartAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = string, TAddress extends Address = Address, TErc7579 extends Address | undefined = undefined>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, args: SignerToSafeSmartAccountParameters<entryPoint, TSource, TAddress, TErc7579>): Promise<SafeSmartAccount<entryPoint, TTransport, TChain>>;
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=signerToSafeSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerToSafeSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/safe/signerToSafeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,aAAa,EAClB,KAAK,eAAe,EAEpB,KAAK,SAAS,EAiBjB,MAAM,MAAM,CAAA;AASb,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,aAAa,CAAA;AAS5D,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,UAAU,CAAA;AAEjB,MAAM,MAAM,WAAW,GAAG,OAAO,CAAA;AA8ejC,MAAM,MAAM,gBAAgB,CACxB,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AA8elE,KAAK,gBAAgB,CAAC,QAAQ,SAAS,OAAO,GAAG,SAAS,IACtD,QAAQ,SAAS,SAAS,GACpB;IACI,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,iBAAiB,CAAC,EAAE;QAChB,EAAE,EAAE,OAAO,CAAA;QACX,IAAI,EAAE,OAAO,CAAA;QACb,KAAK,EAAE,MAAM,C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AA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC5B,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AAkB9B;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC1C,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,QAAQ,SAAS,OAAO,GAAG,OAAO,EAClC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAEhD,MAAM,EAAE,MAAM,CACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CACpC,EACD,IAAI,EAAE,kCAAkC,CACpC,UAAU,EACV,OAAO,EACP,QAAQ,EACR,QAAQ,CACX,GACF,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CA8Z3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, PublicActions, PublicRpcSchema, Transport } from "viem";
|
|
2
|
+
import type { EntryPoint, Prettify } from "../../types";
|
|
3
|
+
import { type SignerToSimpleSmartAccountParameters, type SimpleSmartAccount } from "./signerToSimpleSmartAccount";
|
|
4
|
+
export type PrivateKeyToSimpleSmartAccountParameters<entryPoint extends EntryPoint> = Prettify<{
|
|
5
|
+
privateKey: Hex;
|
|
6
|
+
} & Omit<SignerToSimpleSmartAccountParameters<entryPoint>, "signer">>;
|
|
7
|
+
/**
|
|
8
|
+
* @description Creates an Simple Account from a private key.
|
|
9
|
+
*
|
|
10
|
+
* @returns A Private Key Simple Account.
|
|
11
|
+
*/
|
|
12
|
+
export declare function privateKeyToSimpleSmartAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { privateKey, ...rest }: PrivateKeyToSimpleSmartAccountParameters<entryPoint>): Promise<SimpleSmartAccount<entryPoint, TTransport, TChain>>;
|
|
13
|
+
//# sourceMappingURL=privateKeyToSimpleSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateKeyToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/simple/privateKeyToSimpleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,KAAK,EACL,MAAM,EACN,GAAG,EACH,aAAa,EACb,eAAe,EACf,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EACH,KAAK,oCAAoC,EACzC,KAAK,kBAAkB,EAE1B,MAAM,8BAA8B,CAAA;AAErC,MAAM,MAAM,wCAAwC,CAChD,UAAU,SAAS,UAAU,IAC7B,QAAQ,CACR;IACI,UAAU,EAAE,GAAG,CAAA;CAClB,GAAG,IAAI,CAAC,oCAAoC,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CACvE,CAAA;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAChD,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CACpC,EACD,EACI,UAAU,EACV,GAAG,IAAI,EACV,EAAE,wCAAwC,CAAC,UAAU,CAAC,GACxD,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAa7D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
|
|
2
|
+
import type { Prettify } from "../../types";
|
|
3
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
4
|
+
import { type SmartAccount, type SmartAccountSigner } from "../types";
|
|
5
|
+
export type SimpleSmartAccount<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = SmartAccount<entryPoint, "SimpleSmartAccount", transport, chain>;
|
|
6
|
+
export type SignerToSimpleSmartAccountParameters<entryPoint extends EntryPoint, TSource extends string = string, TAddress extends Address = Address> = Prettify<{
|
|
7
|
+
signer: SmartAccountSigner<TSource, TAddress>;
|
|
8
|
+
factoryAddress?: Address;
|
|
9
|
+
entryPoint: entryPoint;
|
|
10
|
+
index?: bigint;
|
|
11
|
+
address?: Address;
|
|
12
|
+
nonceKey?: bigint;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* @description Creates an Simple Account from a private key.
|
|
16
|
+
*
|
|
17
|
+
* @returns A Private Key Simple Account.
|
|
18
|
+
*/
|
|
19
|
+
export declare function signerToSimpleSmartAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = string, TAddress extends Address = Address>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { signer, factoryAddress: _factoryAddress, entryPoint: entryPointAddress, index, address, nonceKey }: SignerToSimpleSmartAccountParameters<entryPoint, TSource, TAddress>): Promise<SimpleSmartAccount<entryPoint, TTransport, TChain>>;
|
|
20
|
+
//# sourceMappingURL=signerToSimpleSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/simple/signerToSimpleSmartAccount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,MAAM,CACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CACpC,EACD,EACI,MAAM,EACN,cAAc,EAAE,eAAe,EAC/B,UAAU,EAAE,iBAAiB,EAC7B,KAAiB,EACjB,OAAO,EACP,QAAQ,EACX,EAAE,oCAAoC,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,GACvE,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAmN7D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Abi, type Address, type Chain, type Client, type CustomSource, type EncodeDeployDataParameters, type Hex, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
|
|
2
|
+
import type { UserOperation } from "../types";
|
|
3
|
+
import type { EntryPoint, GetEntryPointVersion } from "../types/entrypoint";
|
|
4
|
+
import { type SmartAccount } from "./types";
|
|
5
|
+
export declare function toSmartAccount<TAccountSource extends CustomSource, TEntryPoint extends EntryPoint, TSource extends string = string, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, TAbi extends Abi | readonly unknown[] = Abi>({ address, client, source, entryPoint, getNonce, getInitCode, getFactory, getFactoryData, encodeCallData, getDummySignature, encodeDeployCallData, signUserOperation, signMessage, signTypedData }: TAccountSource & {
|
|
6
|
+
source: TSource;
|
|
7
|
+
client: Client<transport, chain, undefined, PublicRpcSchema, PublicActions<transport, chain>>;
|
|
8
|
+
entryPoint: TEntryPoint;
|
|
9
|
+
getNonce: (key?: bigint) => Promise<bigint>;
|
|
10
|
+
getInitCode: () => Promise<Hex>;
|
|
11
|
+
getFactory: () => Promise<Address | undefined>;
|
|
12
|
+
getFactoryData: () => Promise<Hex | undefined>;
|
|
13
|
+
encodeCallData: (args: {
|
|
14
|
+
to: Address;
|
|
15
|
+
value: bigint;
|
|
16
|
+
data: Hex;
|
|
17
|
+
} | {
|
|
18
|
+
to: Address;
|
|
19
|
+
value: bigint;
|
|
20
|
+
data: Hex;
|
|
21
|
+
}[]) => Promise<Hex>;
|
|
22
|
+
getDummySignature(userOperation: UserOperation<GetEntryPointVersion<TEntryPoint>>): Promise<Hex>;
|
|
23
|
+
encodeDeployCallData: ({ abi, args, bytecode }: EncodeDeployDataParameters<TAbi>) => Promise<Hex>;
|
|
24
|
+
signUserOperation: (userOperation: UserOperation<GetEntryPointVersion<TEntryPoint>>) => Promise<Hex>;
|
|
25
|
+
}): SmartAccount<TEntryPoint, TSource, transport, chain, TAbi>;
|
|
26
|
+
//# sourceMappingURL=toSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/toSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,0BAA0B,EAC/B,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,KAAK,eAAe,EAEpB,KAAK,SAAS,EAIjB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,OAAO,EAEH,KAAK,YAAY,EACpB,MAAM,SAAS,CAAA;AAKhB,wBAAgB,cAAc,CAC1B,cAAc,SAAS,YAAY,EACnC,WAAW,SAAS,UAAU,EAC9B,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAC7C,EACE,OAAO,EACP,MAAM,EACN,MAAM,EACN,UAAU,EACV,QAAQ,EACR,WAAW,E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AAW,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAsF7D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Chain, Client, Hex, PublicActions, PublicRpcSchema, Transport } from "viem";
|
|
2
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE, Prettify } from "../../types";
|
|
3
|
+
import { type SignerToTrustSmartAccountParameters, type TrustSmartAccount } from "./signerToTrustSmartAccount";
|
|
4
|
+
export type PrivateKeyToTrustSmartAccountParameters<entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE> = Prettify<{
|
|
5
|
+
privateKey: Hex;
|
|
6
|
+
} & Omit<SignerToTrustSmartAccountParameters<entryPoint>, "signer">>;
|
|
7
|
+
/**
|
|
8
|
+
* @description Creates an Trust Account from a private key.
|
|
9
|
+
*
|
|
10
|
+
* @returns A Private Key Trust Account.
|
|
11
|
+
*/
|
|
12
|
+
export declare function privateKeyToTrustSmartAccount<entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { privateKey, ...rest }: PrivateKeyToTrustSmartAccountParameters<entryPoint>): Promise<TrustSmartAccount<entryPoint, TTransport, TChain>>;
|
|
13
|
+
//# sourceMappingURL=privateKeyToTrustSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateKeyToTrustSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/trust/privateKeyToTrustSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,KAAK,EACL,MAAM,EACN,GAAG,EACH,aAAa,EACb,eAAe,EACf,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACxE,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EAEzB,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,uCAAuC,CAC/C,UAAU,SAAS,2BAA2B,IAC9C,QAAQ,CACR;IACI,UAAU,EAAE,GAAG,CAAA;CAClB,GAAG,IAAI,CAAC,mCAAmC,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CACtE,CAAA;AAED;;;;GAIG;AACH,wBAAsB,6BAA6B,CAC/C,UAAU,SAAS,2BAA2B,EAC9C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CACV,UAAU,EACV,MAAM,EACN,SAAS,EACT,eAAe,EACf,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,CACpC,EACD,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,uCAAuC,CAAC,UAAU,CAAC,GAC7E,OAAO,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAO5D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type PublicActions, type PublicRpcSchema, type Transport } from "viem";
|
|
2
|
+
import { type SmartAccount, type SmartAccountSigner } from "../types";
|
|
3
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE } from "../../types";
|
|
4
|
+
/**
|
|
5
|
+
* Default addresses for Trust Smart Account
|
|
6
|
+
*/
|
|
7
|
+
export declare const TRUST_ADDRESSES: {
|
|
8
|
+
secp256k1VerificationFacetAddress: Address;
|
|
9
|
+
factoryAddress: Address;
|
|
10
|
+
};
|
|
11
|
+
export type TrustSmartAccount<entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = SmartAccount<entryPoint, "TrustSmartAccount", transport, chain>;
|
|
12
|
+
export type SignerToTrustSmartAccountParameters<entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE, TSource extends string = string, TAddress extends Address = Address> = {
|
|
13
|
+
signer: SmartAccountSigner<TSource, TAddress>;
|
|
14
|
+
factoryAddress?: Address;
|
|
15
|
+
entryPoint: entryPoint;
|
|
16
|
+
index?: bigint;
|
|
17
|
+
address?: Address;
|
|
18
|
+
secp256k1VerificationFacetAddress?: Address;
|
|
19
|
+
nonceKey?: bigint;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @description Creates an Trust Smart Account from a private key.
|
|
23
|
+
*
|
|
24
|
+
* @returns A Private Key Trust Smart Account.
|
|
25
|
+
*/
|
|
26
|
+
export declare function signerToTrustSmartAccount<entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSource extends string = string, TAddress extends Address = Address>(client: Client<TTransport, TChain, undefined, PublicRpcSchema, PublicActions<TTransport, TChain>>, { signer, factoryAddress, entryPoint: entryPointAddress, index, secp256k1VerificationFacetAddress, address, nonceKey }: SignerToTrustSmartAccountParameters<entryPoint, TSource, TAddress>): Promise<TrustSmartAccount<entryPoint, TTransport, TChain>>;
|
|
27
|
+
//# sourceMappingURL=signerToTrustSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerToTrustSmartAccount.d.ts","sourceRoot":"","sources":["../../../accounts/trust/signerToTrustSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,EAMjB,MAAM,MAAM,CAAA;AAKb,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAoC9D;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE;IAC1B,iCAAiC,EAAE,OAA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O,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAwH5D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const encodeCallData: ({ args }: {
|
|
2
|
+
args: {
|
|
3
|
+
to: `0x${string}`;
|
|
4
|
+
value: bigint;
|
|
5
|
+
data: `0x${string}`;
|
|
6
|
+
} | {
|
|
7
|
+
to: `0x${string}`;
|
|
8
|
+
value: bigint;
|
|
9
|
+
data: `0x${string}`;
|
|
10
|
+
}[];
|
|
11
|
+
}) => Promise<`0x${string}`>;
|
|
12
|
+
//# sourceMappingURL=encodeCallData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeCallData.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/encodeCallData.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,aAExB;IACC,IAAI,EACE;QACI,EAAE,EAAE,KAAK,MAAM,EAAE,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;KACtB,GACD;QACI,EAAE,EAAE,KAAK,MAAM,EAAE,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;KACtB,EAAE,CAAA;CACZ,2BA8EA,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../../../types";
|
|
3
|
+
export declare const getAccountAddress: <entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { factoryAddress, entryPoint: entryPointAddress, bytes, secp256k1VerificationFacetAddress, index }: {
|
|
4
|
+
factoryAddress: Address;
|
|
5
|
+
bytes: `0x${string}`;
|
|
6
|
+
entryPoint: entryPoint;
|
|
7
|
+
secp256k1VerificationFacetAddress: Address;
|
|
8
|
+
index?: bigint;
|
|
9
|
+
}) => Promise<Address>;
|
|
10
|
+
//# sourceMappingURL=getAccountAddress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAccountAddress.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/getAccountAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,SAAS,EAEjB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAA+B,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAG7E,eAAO,MAAM,iBAAiB,0IAKlB,OAAO,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,sGAO1C;IACC,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,KAAK,MAAM,EAAE,CAAA;IACpB,YAAY,UAAU,CAAA;IACtB,iCAAiC,EAAE,OAAO,CAAA;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,KACF,QAAQ,OAAO,CAWjB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { EntryPoint, GetEntryPointVersion, UserOperation } from "../../../types";
|
|
2
|
+
export declare const getDummySignature: <entryPoint extends EntryPoint>(_userOperation: UserOperation<GetEntryPointVersion<entryPoint>>) => Promise<`0x${string}`>;
|
|
3
|
+
//# sourceMappingURL=getDummySignature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDummySignature.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/getDummySignature.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,UAAU,EACV,oBAAoB,EACpB,aAAa,EAChB,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,iBAAiB,kDACV,cAAc,qBAAqB,UAAU,CAAC,CAAC,2BAGlE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Wrapped this function to minimize the call to check if account is deployed
|
|
4
|
+
*/
|
|
5
|
+
export declare const getFactoryData: ({ bytes, index, secp256k1VerificationFacetAddress }: {
|
|
6
|
+
bytes: `0x${string}`;
|
|
7
|
+
index: bigint;
|
|
8
|
+
secp256k1VerificationFacetAddress: Address;
|
|
9
|
+
}) => Promise<`0x${string}`>;
|
|
10
|
+
//# sourceMappingURL=getFactoryData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFactoryData.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/getFactoryData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAGnC;;GAEG;AACH,eAAO,MAAM,cAAc,wDAIxB;IACC,KAAK,EAAE,KAAK,MAAM,EAAE,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC,EAAE,OAAO,CAAA;CAC7C,2BAoCA,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { SignMessageParameters } from "viem";
|
|
3
|
+
export declare const signMessage: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { account, message }: SignMessageParameters<undefined>) => Promise<`0x${string}`>;
|
|
4
|
+
//# sourceMappingURL=signMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAA;AAGjD,eAAO,MAAM,WAAW,2GAIZ,OAAO,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,wBACvB,sBAAsB,SAAS,CAAC,2BAGzD,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SerializeTransactionFn, TransactionSerializable } from "viem";
|
|
2
|
+
export declare const signTransaction: <serializer extends SerializeTransactionFn<TransactionSerializable> = SerializeTransactionFn<TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(_transaction: transaction, _args?: {
|
|
3
|
+
serializer?: serializer;
|
|
4
|
+
}) => never;
|
|
5
|
+
//# sourceMappingURL=signTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signTransaction.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/signTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,MAAM,CAAA;AAG3E,eAAO,MAAM,eAAe,kNAKV,WAAW,UACjB;IACJ,UAAU,CAAC,EAAE,UAAU,CAAA;CAC1B,UAGJ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Account, Address, Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { EntryPoint, GetEntryPointVersion, UserOperation } from "../../../types";
|
|
3
|
+
export declare const signUserOperation: <entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { account, userOperation, entryPoint: entryPointAddress, chainId }: {
|
|
4
|
+
account: Account | Address;
|
|
5
|
+
userOperation: UserOperation<GetEntryPointVersion<entryPoint>>;
|
|
6
|
+
entryPoint: entryPoint;
|
|
7
|
+
chainId: number;
|
|
8
|
+
}) => Promise<`0x${string}`>;
|
|
9
|
+
//# sourceMappingURL=signUserOperation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signUserOperation.d.ts","sourceRoot":"","sources":["../../../../accounts/trust/utils/signUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACtE,OAAO,KAAK,EACR,UAAU,EACV,oBAAoB,EACpB,aAAa,EAChB,MAAM,gBAAgB,CAAA;AAIvB,eAAO,MAAM,iBAAiB,0IAKlB,OAAO,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,sEAM1C;IACC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAA;IAC1B,aAAa,EAAE,cAAc,qBAAqB,UAAU,CAAC,CAAC,CAAA;IAC9D,YAAY,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;CAClB,2BAYJ,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Abi, type Address, BaseError, type Client, type Hex, type LocalAccount } from "viem";
|
|
2
|
+
import type { Chain, EncodeDeployDataParameters, PublicActions, PublicRpcSchema, Transport } from "viem";
|
|
3
|
+
import type { UserOperation } from "../types";
|
|
4
|
+
import type { EntryPoint, GetEntryPointVersion } from "../types/entrypoint";
|
|
5
|
+
export declare class SignTransactionNotSupportedBySmartAccount extends BaseError {
|
|
6
|
+
name: string;
|
|
7
|
+
constructor({ docsPath }?: {
|
|
8
|
+
docsPath?: string;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export type SmartAccount<entryPoint extends EntryPoint, TSource extends string, transport extends Transport, chain extends Chain | undefined, TAbi extends Abi | readonly unknown[] = Abi> = LocalAccount<TSource> & {
|
|
12
|
+
client: Client<transport, chain, undefined, PublicRpcSchema, PublicActions<transport, chain>>;
|
|
13
|
+
entryPoint: entryPoint;
|
|
14
|
+
getNonce: (key?: bigint) => Promise<bigint>;
|
|
15
|
+
getInitCode: () => Promise<Hex>;
|
|
16
|
+
getFactory: () => Promise<Address | undefined>;
|
|
17
|
+
getFactoryData: () => Promise<Hex | undefined>;
|
|
18
|
+
encodeCallData: (args: {
|
|
19
|
+
to: Address;
|
|
20
|
+
value: bigint;
|
|
21
|
+
data: Hex;
|
|
22
|
+
} | {
|
|
23
|
+
to: Address;
|
|
24
|
+
value: bigint;
|
|
25
|
+
data: Hex;
|
|
26
|
+
}[]) => Promise<Hex>;
|
|
27
|
+
getDummySignature(userOperation: UserOperation<GetEntryPointVersion<entryPoint>>): Promise<Hex>;
|
|
28
|
+
encodeDeployCallData: ({ abi, args, bytecode }: EncodeDeployDataParameters<TAbi>) => Promise<Hex>;
|
|
29
|
+
signUserOperation: (userOperation: UserOperation<GetEntryPointVersion<entryPoint>>) => Promise<Hex>;
|
|
30
|
+
};
|
|
31
|
+
export type SmartAccountSigner<TSource extends string = string, TAddress extends Address = Address> = Omit<LocalAccount<TSource, TAddress>, "signTransaction">;
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../accounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,SAAS,EACT,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,YAAY,EACpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,KAAK,EACL,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,SAAS,EACZ,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,qBAAa,yCAA0C,SAAQ,SAAS;IAC3D,IAAI,SAA8C;gBAC/C,EAAE,QAAQ,EAAE,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;CAYvD;AAED,MAAM,MAAM,YAAY,CACpB,UAAU,SAAS,UAAU,EAC7B,OAAO,SAAS,MAAM,EACtB,SAAS,SAAS,SAAS,EAC3B,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,IAA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Q,SAAS,OAAO,GAAG,OAAO,IAClC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Account, Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../../types";
|
|
3
|
+
import type { BundlerRpcSchema } from "../../types/bundler";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the supported chain id by the bundler service
|
|
6
|
+
*
|
|
7
|
+
* - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/chainId
|
|
8
|
+
*
|
|
9
|
+
* @param client {@link BundlerClient} that you created using viem's createClient and extended it with bundlerActions.
|
|
10
|
+
* @returns Supported chain id
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { createClient } from "viem"
|
|
15
|
+
* import { chainId } from "permissionless/actions"
|
|
16
|
+
*
|
|
17
|
+
* const bundlerClient = createClient({
|
|
18
|
+
* chain: goerli,
|
|
19
|
+
* transport: http(BUNDLER_URL)
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* const bundlerChainId = chainId(bundlerClient)
|
|
23
|
+
* // Return 5n for Goerli
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare const chainId: <entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema<entryPoint>>) => Promise<number>;
|
|
27
|
+
//# sourceMappingURL=chainId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainId.d.ts","sourceRoot":"","sources":["../../../actions/bundler/chainId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO,sMAMR,OAAO,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,UAAU,CAAC,CAAC,oBAQ7E,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Account, Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { PartialBy } from "viem/chains";
|
|
3
|
+
import type { Prettify } from "../../types";
|
|
4
|
+
import type { BundlerRpcSchema, StateOverrides } from "../../types/bundler";
|
|
5
|
+
import type { EntryPoint, GetEntryPointVersion } from "../../types/entrypoint";
|
|
6
|
+
import type { UserOperation } from "../../types/userOperation";
|
|
7
|
+
import { type GetEstimateUserOperationGasErrorReturnType } from "../../utils/errors/getEstimateUserOperationGasError";
|
|
8
|
+
export type EstimateUserOperationGasParameters<entryPoint extends EntryPoint> = {
|
|
9
|
+
userOperation: GetEntryPointVersion<entryPoint> extends "v0.6" ? PartialBy<UserOperation<"v0.6">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<UserOperation<"v0.7">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">;
|
|
10
|
+
entryPoint: entryPoint;
|
|
11
|
+
};
|
|
12
|
+
export type EstimateUserOperationGasReturnType<entryPoint extends EntryPoint> = GetEntryPointVersion<entryPoint> extends "v0.6" ? {
|
|
13
|
+
preVerificationGas: bigint;
|
|
14
|
+
verificationGasLimit: bigint;
|
|
15
|
+
callGasLimit: bigint;
|
|
16
|
+
} : {
|
|
17
|
+
preVerificationGas: bigint;
|
|
18
|
+
verificationGasLimit: bigint;
|
|
19
|
+
callGasLimit: bigint;
|
|
20
|
+
paymasterVerificationGasLimit?: bigint;
|
|
21
|
+
paymasterPostOpGasLimit?: bigint;
|
|
22
|
+
};
|
|
23
|
+
export type EstimateUserOperationErrorType<entryPoint extends EntryPoint> = GetEstimateUserOperationGasErrorReturnType<entryPoint>;
|
|
24
|
+
/**
|
|
25
|
+
* Estimates preVerificationGas, verificationGasLimit and callGasLimit for user operation
|
|
26
|
+
*
|
|
27
|
+
* - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/estimateUserOperationGas
|
|
28
|
+
*
|
|
29
|
+
* @param client {@link BundlerClient} that you created using viem's createClient and extended it with bundlerActions.
|
|
30
|
+
* @param args {@link EstimateUserOperationGasParameters}
|
|
31
|
+
* @returns preVerificationGas, verificationGasLimit and callGasLimit as {@link EstimateUserOperationGasReturnType}
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* import { createClient } from "viem"
|
|
36
|
+
* import { estimateUserOperationGas } from "permissionless/actions"
|
|
37
|
+
*
|
|
38
|
+
* const bundlerClient = createClient({
|
|
39
|
+
* chain: goerli,
|
|
40
|
+
* transport: http(BUNDLER_URL)
|
|
41
|
+
* })
|
|
42
|
+
*
|
|
43
|
+
* const gasParameters = estimateUserOperationGas(bundlerClient, {
|
|
44
|
+
* serOperation: signedUserOperation,
|
|
45
|
+
* entryPoint: entryPoint
|
|
46
|
+
* })
|
|
47
|
+
*
|
|
48
|
+
* // Return {preVerificationGas: 43492n, verificationGasLimit: 59436n, callGasLimit: 9000n}
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export declare const estimateUserOperationGas: <entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema<entryPoint>>, args: {
|
|
52
|
+
userOperation: GetEntryPointVersion<entryPoint> extends "v0.6" ? PartialBy<{
|
|
53
|
+
sender: `0x${string}`;
|
|
54
|
+
nonce: bigint;
|
|
55
|
+
initCode: `0x${string}`;
|
|
56
|
+
callData: `0x${string}`;
|
|
57
|
+
callGasLimit: bigint;
|
|
58
|
+
verificationGasLimit: bigint;
|
|
59
|
+
preVerificationGas: bigint;
|
|
60
|
+
maxFeePerGas: bigint;
|
|
61
|
+
maxPriorityFeePerGas: bigint;
|
|
62
|
+
paymasterAndData: `0x${string}`;
|
|
63
|
+
signature: `0x${string}`;
|
|
64
|
+
factory?: undefined;
|
|
65
|
+
factoryData?: undefined;
|
|
66
|
+
paymaster?: undefined;
|
|
67
|
+
paymasterVerificationGasLimit?: undefined;
|
|
68
|
+
paymasterPostOpGasLimit?: undefined;
|
|
69
|
+
paymasterData?: undefined;
|
|
70
|
+
}, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<{
|
|
71
|
+
sender: `0x${string}`;
|
|
72
|
+
nonce: bigint;
|
|
73
|
+
factory?: `0x${string}` | undefined;
|
|
74
|
+
factoryData?: `0x${string}` | undefined;
|
|
75
|
+
callData: `0x${string}`;
|
|
76
|
+
callGasLimit: bigint;
|
|
77
|
+
verificationGasLimit: bigint;
|
|
78
|
+
preVerificationGas: bigint;
|
|
79
|
+
maxFeePerGas: bigint;
|
|
80
|
+
maxPriorityFeePerGas: bigint;
|
|
81
|
+
paymaster?: `0x${string}` | undefined;
|
|
82
|
+
paymasterVerificationGasLimit?: bigint | undefined;
|
|
83
|
+
paymasterPostOpGasLimit?: bigint | undefined;
|
|
84
|
+
paymasterData?: `0x${string}` | undefined;
|
|
85
|
+
signature: `0x${string}`;
|
|
86
|
+
initCode?: undefined;
|
|
87
|
+
paymasterAndData?: undefined;
|
|
88
|
+
}, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">;
|
|
89
|
+
entryPoint: entryPoint;
|
|
90
|
+
}, stateOverrides?: StateOverrides) => Promise<EstimateUserOperationGasReturnType<entryPoint>>;
|
|
91
|
+
//# sourceMappingURL=estimateUserOperationGas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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