permissionless 0.0.35 → 0.1.0
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/CHANGELOG.md +14 -0
- package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js +32 -15
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js +38 -20
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
- package/_cjs/accounts/safe/privateKeyToSafeSmartAccount.js.map +1 -1
- package/_cjs/accounts/safe/signerToSafeSmartAccount.js +42 -11
- package/_cjs/accounts/safe/signerToSafeSmartAccount.js.map +1 -1
- package/_cjs/accounts/simple/privateKeyToSimpleSmartAccount.js.map +1 -1
- package/_cjs/accounts/simple/signerToSimpleSmartAccount.js +104 -44
- package/_cjs/accounts/simple/signerToSimpleSmartAccount.js.map +1 -1
- package/_cjs/accounts/types.js.map +1 -1
- package/_cjs/actions/bundler/chainId.js.map +1 -1
- package/_cjs/actions/bundler/estimateUserOperationGas.js +20 -3
- package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_cjs/actions/bundler/getUserOperationByHash.js +28 -11
- package/_cjs/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/_cjs/actions/bundler/sendUserOperation.js.map +1 -1
- package/_cjs/actions/bundler/supportedEntryPoints.js.map +1 -1
- package/_cjs/actions/pimlico/getUserOperationGasPrice.js +7 -7
- package/_cjs/actions/pimlico/getUserOperationGasPrice.js.map +1 -1
- package/_cjs/actions/pimlico/sponsorUserOperation.js +19 -7
- package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
- package/_cjs/actions/public/getAccountNonce.js.map +1 -1
- package/_cjs/actions/public/getSenderAddress.js +5 -2
- package/_cjs/actions/public/getSenderAddress.js.map +1 -1
- package/_cjs/actions/smartAccount/deployContract.js +3 -4
- package/_cjs/actions/smartAccount/deployContract.js.map +1 -1
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +142 -19
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -1
- package/_cjs/actions/smartAccount/sendTransaction.js +3 -4
- package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -1
- package/_cjs/actions/smartAccount/sendTransactions.js +3 -4
- package/_cjs/actions/smartAccount/sendTransactions.js.map +1 -1
- package/_cjs/actions/smartAccount/sendUserOperation.js +1 -1
- package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/_cjs/actions/smartAccount/signMessage.js.map +1 -1
- package/_cjs/actions/smartAccount/signTypedData.js.map +1 -1
- package/_cjs/actions/smartAccount/writeContract.js.map +1 -1
- package/_cjs/actions/stackup/accounts.js +2 -2
- package/_cjs/actions/stackup/accounts.js.map +1 -1
- package/_cjs/actions/stackup/sponsorUserOperation.js +20 -12
- package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -1
- package/_cjs/clients/createBundlerClient.js +1 -1
- package/_cjs/clients/createBundlerClient.js.map +1 -1
- package/_cjs/clients/createSmartAccountClient.js +3 -3
- package/_cjs/clients/createSmartAccountClient.js.map +1 -1
- package/_cjs/clients/decorators/bundler.js +6 -3
- package/_cjs/clients/decorators/bundler.js.map +1 -1
- package/_cjs/clients/decorators/pimlico.js +6 -3
- package/_cjs/clients/decorators/pimlico.js.map +1 -1
- package/_cjs/clients/decorators/smartAccount.js +7 -7
- package/_cjs/clients/decorators/smartAccount.js.map +1 -1
- package/_cjs/clients/decorators/stackup.js.map +1 -1
- package/_cjs/clients/pimlico.js +4 -2
- package/_cjs/clients/pimlico.js.map +1 -1
- package/_cjs/clients/stackup.js +3 -1
- package/_cjs/clients/stackup.js.map +1 -1
- package/_cjs/errors/estimateUserOperationGas.js.map +1 -1
- package/_cjs/errors/sendUserOperation.js.map +1 -1
- package/_cjs/types/entrypoint.js +3 -0
- package/_cjs/types/entrypoint.js.map +1 -0
- package/_cjs/utils/errors/getBundlerError.js.map +1 -1
- package/_cjs/utils/errors/getEstimateUserOperationGasError.js.map +1 -1
- package/_cjs/utils/errors/getSendUserOperationError.js.map +1 -1
- package/_cjs/utils/getEntryPointVersion.js +8 -0
- package/_cjs/utils/getEntryPointVersion.js.map +1 -0
- package/_cjs/utils/getRequiredPrefund.js +19 -6
- package/_cjs/utils/getRequiredPrefund.js.map +1 -1
- package/_cjs/utils/getUserOperationHash.js +81 -17
- package/_cjs/utils/getUserOperationHash.js.map +1 -1
- package/_cjs/utils/index.js +5 -1
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/providerToSmartAccountSigner.js +1 -1
- package/_cjs/utils/providerToSmartAccountSigner.js.map +1 -1
- package/_cjs/utils/signUserOperationHashWithECDSA.js +2 -2
- package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -1
- package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js +32 -15
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js +38 -21
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
- package/_esm/accounts/safe/privateKeyToSafeSmartAccount.js.map +1 -1
- package/_esm/accounts/safe/signerToSafeSmartAccount.js +42 -11
- package/_esm/accounts/safe/signerToSafeSmartAccount.js.map +1 -1
- package/_esm/accounts/simple/privateKeyToSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/simple/signerToSimpleSmartAccount.js +105 -44
- package/_esm/accounts/simple/signerToSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/types.js +0 -1
- package/_esm/accounts/types.js.map +1 -1
- package/_esm/actions/bundler/chainId.js.map +1 -1
- package/_esm/actions/bundler/estimateUserOperationGas.js +20 -3
- package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_esm/actions/bundler/getUserOperationByHash.js +28 -11
- package/_esm/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/_esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/_esm/actions/bundler/sendUserOperation.js.map +1 -1
- package/_esm/actions/bundler/supportedEntryPoints.js.map +1 -1
- package/_esm/actions/pimlico/getUserOperationGasPrice.js +7 -7
- package/_esm/actions/pimlico/getUserOperationGasPrice.js.map +1 -1
- package/_esm/actions/pimlico/sponsorUserOperation.js +19 -7
- package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
- package/_esm/actions/public/getAccountNonce.js.map +1 -1
- package/_esm/actions/public/getSenderAddress.js +6 -3
- package/_esm/actions/public/getSenderAddress.js.map +1 -1
- package/_esm/actions/smartAccount/deployContract.js +3 -4
- package/_esm/actions/smartAccount/deployContract.js.map +1 -1
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js +142 -19
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -1
- package/_esm/actions/smartAccount/sendTransaction.js +3 -4
- package/_esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/_esm/actions/smartAccount/sendTransactions.js +3 -4
- package/_esm/actions/smartAccount/sendTransactions.js.map +1 -1
- package/_esm/actions/smartAccount/sendUserOperation.js +1 -1
- package/_esm/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/_esm/actions/smartAccount/signMessage.js.map +1 -1
- package/_esm/actions/smartAccount/signTypedData.js.map +1 -1
- package/_esm/actions/smartAccount/writeContract.js.map +1 -1
- package/_esm/actions/stackup/accounts.js +2 -2
- package/_esm/actions/stackup/accounts.js.map +1 -1
- package/_esm/actions/stackup/sponsorUserOperation.js +20 -12
- package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -1
- package/_esm/clients/createBundlerClient.js +1 -1
- package/_esm/clients/createBundlerClient.js.map +1 -1
- package/_esm/clients/createSmartAccountClient.js +22 -3
- package/_esm/clients/createSmartAccountClient.js.map +1 -1
- package/_esm/clients/decorators/bundler.js +6 -3
- package/_esm/clients/decorators/bundler.js.map +1 -1
- package/_esm/clients/decorators/pimlico.js +6 -3
- package/_esm/clients/decorators/pimlico.js.map +1 -1
- package/_esm/clients/decorators/smartAccount.js +7 -7
- package/_esm/clients/decorators/smartAccount.js.map +1 -1
- package/_esm/clients/decorators/stackup.js.map +1 -1
- package/_esm/clients/pimlico.js +4 -2
- package/_esm/clients/pimlico.js.map +1 -1
- package/_esm/clients/stackup.js +3 -1
- package/_esm/clients/stackup.js.map +1 -1
- package/_esm/errors/estimateUserOperationGas.js.map +1 -1
- package/_esm/errors/sendUserOperation.js.map +1 -1
- package/_esm/types/entrypoint.js +2 -0
- package/_esm/types/entrypoint.js.map +1 -0
- package/_esm/utils/errors/getBundlerError.js.map +1 -1
- package/_esm/utils/errors/getEstimateUserOperationGasError.js.map +1 -1
- package/_esm/utils/errors/getSendUserOperationError.js.map +1 -1
- package/_esm/utils/getEntryPointVersion.js +4 -0
- package/_esm/utils/getEntryPointVersion.js.map +1 -0
- package/_esm/utils/getRequiredPrefund.js +19 -6
- package/_esm/utils/getRequiredPrefund.js.map +1 -1
- package/_esm/utils/getUserOperationHash.js +82 -18
- package/_esm/utils/getUserOperationHash.js.map +1 -1
- package/_esm/utils/index.js +2 -1
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/providerToSmartAccountSigner.js +1 -1
- package/_esm/utils/providerToSmartAccountSigner.js.map +1 -1
- package/_esm/utils/signUserOperationHashWithECDSA.js +2 -3
- package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -1
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts +4 -4
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts +5 -4
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts +5 -4
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts.map +1 -1
- package/_types/accounts/safe/privateKeyToSafeSmartAccount.d.ts +4 -4
- package/_types/accounts/safe/privateKeyToSafeSmartAccount.d.ts.map +1 -1
- package/_types/accounts/safe/signerToSafeSmartAccount.d.ts +6 -5
- package/_types/accounts/safe/signerToSafeSmartAccount.d.ts.map +1 -1
- package/_types/accounts/simple/privateKeyToSimpleSmartAccount.d.ts +4 -4
- package/_types/accounts/simple/privateKeyToSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/simple/signerToSimpleSmartAccount.d.ts +5 -4
- package/_types/accounts/simple/signerToSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +8 -5
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/actions/bundler/chainId.d.ts +2 -1
- package/_types/actions/bundler/chainId.d.ts.map +1 -1
- package/_types/actions/bundler/estimateUserOperationGas.d.ts +14 -7
- package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/_types/actions/bundler/getUserOperationByHash.d.ts +10 -3
- package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
- package/_types/actions/bundler/getUserOperationReceipt.d.ts +2 -1
- package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
- package/_types/actions/bundler/sendUserOperation.d.ts +6 -5
- package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/bundler/supportedEntryPoints.d.ts +3 -2
- package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
- package/_types/actions/pimlico/sponsorUserOperation.d.ts +47 -6
- package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -1
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +10 -5
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -1
- package/_types/actions/public/getAccountNonce.d.ts +2 -1
- package/_types/actions/public/getAccountNonce.d.ts.map +1 -1
- package/_types/actions/public/getSenderAddress.d.ts +11 -3
- package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
- package/_types/actions/smartAccount/deployContract.d.ts +4 -3
- package/_types/actions/smartAccount/deployContract.d.ts.map +1 -1
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +21 -11
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -1
- package/_types/actions/smartAccount/sendTransaction.d.ts +4 -3
- package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
- package/_types/actions/smartAccount/sendTransactions.d.ts +5 -4
- package/_types/actions/smartAccount/sendTransactions.d.ts.map +1 -1
- package/_types/actions/smartAccount/sendUserOperation.d.ts +6 -5
- package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/smartAccount/signMessage.d.ts +2 -1
- package/_types/actions/smartAccount/signMessage.d.ts.map +1 -1
- package/_types/actions/smartAccount/signTypedData.d.ts +3 -2
- package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -1
- package/_types/actions/smartAccount/writeContract.d.ts +4 -3
- package/_types/actions/smartAccount/writeContract.d.ts.map +1 -1
- package/_types/actions/smartAccount.d.ts +2 -2
- package/_types/actions/smartAccount.d.ts.map +1 -1
- package/_types/actions/stackup/accounts.d.ts +4 -3
- package/_types/actions/stackup/accounts.d.ts.map +1 -1
- package/_types/actions/stackup/sponsorUserOperation.d.ts +6 -6
- package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -1
- package/_types/clients/createBundlerClient.d.ts +6 -3
- package/_types/clients/createBundlerClient.d.ts.map +1 -1
- package/_types/clients/createSmartAccountClient.d.ts +9 -5
- package/_types/clients/createSmartAccountClient.d.ts.map +1 -1
- package/_types/clients/decorators/bundler.d.ts +7 -7
- package/_types/clients/decorators/bundler.d.ts.map +1 -1
- package/_types/clients/decorators/pimlico.d.ts +6 -5
- package/_types/clients/decorators/pimlico.d.ts.map +1 -1
- package/_types/clients/decorators/smartAccount.d.ts +12 -12
- package/_types/clients/decorators/smartAccount.d.ts.map +1 -1
- package/_types/clients/decorators/stackup.d.ts +5 -4
- package/_types/clients/decorators/stackup.d.ts.map +1 -1
- package/_types/clients/pimlico.d.ts +11 -6
- package/_types/clients/pimlico.d.ts.map +1 -1
- package/_types/clients/stackup.d.ts +6 -3
- package/_types/clients/stackup.d.ts.map +1 -1
- package/_types/errors/estimateUserOperationGas.d.ts +4 -3
- package/_types/errors/estimateUserOperationGas.d.ts.map +1 -1
- package/_types/errors/sendUserOperation.d.ts +4 -3
- package/_types/errors/sendUserOperation.d.ts.map +1 -1
- package/_types/types/bundler.d.ts +16 -21
- package/_types/types/bundler.d.ts.map +1 -1
- package/_types/types/entrypoint.d.ts +6 -0
- package/_types/types/entrypoint.d.ts.map +1 -0
- package/_types/types/index.d.ts +6 -4
- package/_types/types/index.d.ts.map +1 -1
- package/_types/types/pimlico.d.ts +20 -6
- package/_types/types/pimlico.d.ts.map +1 -1
- package/_types/types/stackup.d.ts +18 -4
- package/_types/types/stackup.d.ts.map +1 -1
- package/_types/types/userOperation.d.ts +51 -2
- package/_types/types/userOperation.d.ts.map +1 -1
- package/_types/utils/errors/getBundlerError.d.ts +4 -4
- package/_types/utils/errors/getBundlerError.d.ts.map +1 -1
- package/_types/utils/errors/getEstimateUserOperationGasError.d.ts +3 -2
- package/_types/utils/errors/getEstimateUserOperationGasError.d.ts.map +1 -1
- package/_types/utils/errors/getSendUserOperationError.d.ts +2 -1
- package/_types/utils/errors/getSendUserOperationError.d.ts.map +1 -1
- package/_types/utils/getEntryPointVersion.d.ts +6 -0
- package/_types/utils/getEntryPointVersion.d.ts.map +1 -0
- package/_types/utils/getRequiredPrefund.d.ts +5 -4
- package/_types/utils/getRequiredPrefund.d.ts.map +1 -1
- package/_types/utils/getUserOperationHash.d.ts +6 -5
- package/_types/utils/getUserOperationHash.d.ts.map +1 -1
- package/_types/utils/index.d.ts +2 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/providerToSmartAccountSigner.d.ts +4 -1
- package/_types/utils/providerToSmartAccountSigner.d.ts.map +1 -1
- package/_types/utils/signUserOperationHashWithECDSA.d.ts +6 -6
- package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -1
- package/accounts/biconomy/privateKeyToBiconomySmartAccount.ts +17 -6
- package/accounts/biconomy/signerToBiconomySmartAccount.ts +50 -21
- package/accounts/kernel/signerToEcdsaKernelSmartAccount.ts +64 -30
- package/accounts/safe/privateKeyToSafeSmartAccount.ts +8 -5
- package/accounts/safe/signerToSafeSmartAccount.ts +57 -17
- package/accounts/simple/privateKeyToSimpleSmartAccount.ts +25 -7
- package/accounts/simple/signerToSimpleSmartAccount.ts +127 -56
- package/accounts/types.ts +12 -4
- package/actions/bundler/chainId.ts +3 -1
- package/actions/bundler/estimateUserOperationGas.ts +77 -22
- package/actions/bundler/getUserOperationByHash.ts +44 -15
- package/actions/bundler/getUserOperationReceipt.ts +3 -1
- package/actions/bundler/sendUserOperation.ts +13 -17
- package/actions/bundler/supportedEntryPoints.ts +5 -3
- package/actions/pimlico/getUserOperationGasPrice.ts +7 -9
- package/actions/pimlico/sponsorUserOperation.ts +97 -23
- package/actions/pimlico/validateSponsorshipPolicies.ts +18 -7
- package/actions/public/getAccountNonce.ts +2 -1
- package/actions/public/getSenderAddress.ts +30 -5
- package/actions/smartAccount/deployContract.ts +14 -10
- package/actions/smartAccount/prepareUserOperationRequest.ts +339 -49
- package/actions/smartAccount/sendTransaction.ts +20 -11
- package/actions/smartAccount/sendTransactions.ts +17 -11
- package/actions/smartAccount/sendUserOperation.ts +56 -23
- package/actions/smartAccount/signMessage.ts +3 -1
- package/actions/smartAccount/signTypedData.ts +3 -1
- package/actions/smartAccount/writeContract.ts +12 -5
- package/actions/smartAccount.ts +2 -2
- package/actions/stackup/accounts.ts +7 -6
- package/actions/stackup/sponsorUserOperation.ts +85 -31
- package/clients/createBundlerClient.ts +11 -6
- package/clients/createSmartAccountClient.ts +34 -20
- package/clients/decorators/bundler.ts +51 -27
- package/clients/decorators/pimlico.ts +43 -17
- package/clients/decorators/smartAccount.ts +115 -37
- package/clients/decorators/stackup.ts +14 -10
- package/clients/pimlico.ts +22 -13
- package/clients/stackup.ts +13 -7
- package/errors/estimateUserOperationGas.ts +7 -4
- package/errors/sendUserOperation.ts +9 -5
- package/package.json +1 -1
- package/types/bundler.ts +40 -28
- package/types/entrypoint.ts +13 -0
- package/types/index.ts +15 -5
- package/types/pimlico.ts +43 -17
- package/types/stackup.ts +39 -15
- package/types/userOperation.ts +82 -26
- package/utils/errors/getBundlerError.ts +10 -6
- package/utils/errors/getEstimateUserOperationGasError.ts +13 -10
- package/utils/errors/getSendUserOperationError.ts +4 -3
- package/utils/getEntryPointVersion.ts +15 -0
- package/utils/getRequiredPrefund.ts +35 -11
- package/utils/getUserOperationHash.ts +113 -23
- package/utils/index.ts +9 -1
- package/utils/providerToSmartAccountSigner.ts +6 -3
- package/utils/signUserOperationHashWithECDSA.ts +13 -7
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
1
|
import type { PartialBy } from "viem/types/utils";
|
|
3
2
|
import { type StackupPaymasterClient } from "../../clients/stackup";
|
|
3
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE, EntryPoint } from "../../types/entrypoint";
|
|
4
4
|
import type { StackupPaymasterContext } from "../../types/stackup";
|
|
5
5
|
import type { UserOperation } from "../../types/userOperation";
|
|
6
|
-
export type SponsorUserOperationParameters = {
|
|
7
|
-
userOperation: PartialBy<UserOperation
|
|
8
|
-
entryPoint:
|
|
6
|
+
export type SponsorUserOperationParameters<entryPoint extends EntryPoint> = {
|
|
7
|
+
userOperation: entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? PartialBy<UserOperation<"v0.6">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<UserOperation<"v0.7">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">;
|
|
8
|
+
entryPoint: entryPoint;
|
|
9
9
|
context: StackupPaymasterContext;
|
|
10
10
|
};
|
|
11
|
-
export type SponsorUserOperationReturnType = UserOperation
|
|
11
|
+
export type SponsorUserOperationReturnType<entryPoint extends EntryPoint> = entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? Pick<UserOperation<"v0.6">, "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData"> : Pick<UserOperation<"v0.7">, "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymaster" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit" | "paymasterData">;
|
|
12
12
|
/**
|
|
13
13
|
* Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
|
|
14
14
|
*
|
|
@@ -34,5 +34,5 @@ export type SponsorUserOperationReturnType = UserOperation;
|
|
|
34
34
|
* }})
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
|
-
export declare const sponsorUserOperation: (client: StackupPaymasterClient
|
|
37
|
+
export declare const sponsorUserOperation: <entryPoint extends EntryPoint>(client: StackupPaymasterClient<entryPoint>, args: SponsorUserOperationParameters<entryPoint>) => Promise<SponsorUserOperationReturnType<entryPoint>>;
|
|
38
38
|
//# sourceMappingURL=sponsorUserOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/stackup/sponsorUserOperation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/stackup/sponsorUserOperation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EACR,2BAA2B,EAC3B,UAAU,EACb,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAI9D,MAAM,MAAM,8BAA8B,CAAC,UAAU,SAAS,UAAU,IAAI;IACxE,aAAa,EAAE,UAAU,SAAS,2BAA2B,GACvD,SAAS,CACL,aAAa,CAAC,MAAM,CAAC,EACrB,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,CACjE,GACD,SAAS,CACL,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,oBAAoB,GACpB,sBAAsB,GACtB,+BAA+B,GAC/B,yBAAyB,CAC9B,CAAA;IACP,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,uBAAuB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,8BAA8B,CAAC,UAAU,SAAS,UAAU,IACpE,UAAU,SAAS,2BAA2B,GACxC,IAAI,CACA,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,kBAAkB,CACvB,GACD,IAAI,CACA,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,WAAW,GACX,+BAA+B,GAC/B,yBAAyB,GACzB,eAAe,CACpB,CAAA;AAEX;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,sLAkDhC,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem";
|
|
2
2
|
import type { BundlerRpcSchema } from "../types/bundler";
|
|
3
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
3
4
|
import { type BundlerActions } from "./decorators/bundler";
|
|
4
|
-
export type BundlerClient<TChain extends Chain | undefined = Chain | undefined> = Client<Transport, TChain, Account | undefined, BundlerRpcSchema
|
|
5
|
+
export type BundlerClient<entryPoint extends EntryPoint, TChain extends Chain | undefined = Chain | undefined> = Client<Transport, TChain, Account | undefined, BundlerRpcSchema<entryPoint>, BundlerActions<entryPoint>>;
|
|
5
6
|
/**
|
|
6
7
|
* Creates a EIP-4337 compliant Bundler Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
7
8
|
*
|
|
@@ -21,7 +22,7 @@ export type BundlerClient<TChain extends Chain | undefined = Chain | undefined>
|
|
|
21
22
|
* transport: http(BUNDLER_URL),
|
|
22
23
|
* })
|
|
23
24
|
*/
|
|
24
|
-
export declare const createBundlerClient: <transport extends Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
25
|
+
export declare const createBundlerClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
25
26
|
batch?: {
|
|
26
27
|
multicall?: boolean | {
|
|
27
28
|
batchSize?: number | undefined;
|
|
@@ -34,5 +35,7 @@ export declare const createBundlerClient: <transport extends Transport, chain ex
|
|
|
34
35
|
name?: string | undefined;
|
|
35
36
|
pollingInterval?: number | undefined;
|
|
36
37
|
transport: transport;
|
|
37
|
-
}
|
|
38
|
+
} & {
|
|
39
|
+
entryPoint: entryPoint;
|
|
40
|
+
}) => BundlerClient<entryPoint, Chain | undefined>;
|
|
38
41
|
//# sourceMappingURL=createBundlerClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBundlerClient.d.ts","sourceRoot":"","sources":["../../clients/createBundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,kBAAkB,EAClB,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,sBAAsB,CAAA;AAE1E,MAAM,MAAM,aAAa,CACrB,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACpD,MAAM,CACN,SAAS,EACT,MAAM,EACN,OAAO,GAAG,SAAS,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"createBundlerClient.d.ts","sourceRoot":"","sources":["../../clients/createBundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,kBAAkB,EAClB,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,sBAAsB,CAAA;AAE1E,MAAM,MAAM,aAAa,CACrB,UAAU,SAAS,UAAU,EAC7B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACpD,MAAM,CACN,SAAS,EACT,MAAM,EACN,OAAO,GAAG,SAAS,EACnB,gBAAgB,CAAC,UAAU,CAAC,EAC5B,cAAc,CAAC,UAAU,CAAC,CAC7B,CAAA;AACD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;kDAiB/B,CAAA"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import type { Chain, Client, ClientConfig, Transport } from "viem";
|
|
2
2
|
import { type SmartAccount } from "../accounts/types";
|
|
3
|
-
import { type
|
|
3
|
+
import { type Middleware } from "../actions/smartAccount/prepareUserOperationRequest";
|
|
4
4
|
import type { Prettify } from "../types";
|
|
5
5
|
import { type BundlerRpcSchema } from "../types/bundler";
|
|
6
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
6
7
|
import { type SmartAccountActions } from "./decorators/smartAccount";
|
|
7
8
|
/**
|
|
8
9
|
* TODO:
|
|
9
10
|
* - Add docs
|
|
10
11
|
* - Fix typing, 'accounts' is required to signMessage, signTypedData, signTransaction, but not needed here, since account is embedded in the client
|
|
11
12
|
*/
|
|
12
|
-
export type SmartAccountClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount | undefined = SmartAccount | undefined> = Prettify<Client<transport, chain, account, BundlerRpcSchema
|
|
13
|
-
export type SmartAccountClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount | undefined = SmartAccount | undefined> = Prettify<Pick<ClientConfig<transport, chain, account>, "cacheTime" | "chain" | "key" | "name" | "pollingInterval"
|
|
13
|
+
export type SmartAccountClient<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined> = Prettify<Client<transport, chain, account, BundlerRpcSchema<entryPoint>, SmartAccountActions<entryPoint, chain, account>>>;
|
|
14
|
+
export type SmartAccountClientConfig<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined> = Prettify<Pick<ClientConfig<transport, chain, account>, "cacheTime" | "chain" | "key" | "name" | "pollingInterval"> & {
|
|
14
15
|
account?: account;
|
|
15
|
-
|
|
16
|
+
bundlerTransport: Transport;
|
|
17
|
+
} & Middleware<entryPoint> & {
|
|
18
|
+
entryPoint: entryPoint;
|
|
19
|
+
}>;
|
|
16
20
|
/**
|
|
17
21
|
* Creates a EIP-4337 compliant Bundler Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
18
22
|
*
|
|
@@ -32,5 +36,5 @@ export type SmartAccountClientConfig<transport extends Transport = Transport, ch
|
|
|
32
36
|
* transport: http(BUNDLER_URL),
|
|
33
37
|
* })
|
|
34
38
|
*/
|
|
35
|
-
export declare function createSmartAccountClient<
|
|
39
|
+
export declare function createSmartAccountClient<entryPoint extends EntryPoint, TSmartAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined, TTransport extends Transport = Transport, TChain extends Chain | undefined = undefined>(parameters: SmartAccountClientConfig<entryPoint, TTransport, TChain, TSmartAccount>): SmartAccountClient<entryPoint, TTransport, TChain, TSmartAccount>;
|
|
36
40
|
//# sourceMappingURL=createSmartAccountClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSmartAccountClient.d.ts","sourceRoot":"","sources":["../../clients/createSmartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EAEZ,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"createSmartAccountClient.d.ts","sourceRoot":"","sources":["../../clients/createSmartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EAEZ,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qDAAqD,CAAA;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EACH,KAAK,mBAAmB,EAE3B,MAAM,2BAA2B,CAAA;AAElC;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAC1B,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC9C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,IACf,QAAQ,CACR,MAAM,CACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,gBAAgB,CAAC,UAAU,CAAC,EAC5B,mBAAmB,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAClD,CACJ,CAAA;AAED,MAAM,MAAM,wBAAwB,CAChC,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC9C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,IACf,QAAQ,CACR,IAAI,CACA,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACvC,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,iBAAiB,CAC7D,GAAG;IACA,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,SAAS,CAAA;CAC9B,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG;IACrB,UAAU,EAAE,UAAU,CAAA;CACzB,CACR,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,wBAAwB,CACpC,UAAU,SAAS,UAAU,EAC7B,aAAa,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GACpD,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,EACf,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAE5C,UAAU,EAAE,wBAAwB,CAChC,UAAU,EACV,UAAU,EACV,MAAM,EACN,aAAa,CAChB,GACF,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,CAmBnE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
1
|
import type { Client, Hash } from "viem";
|
|
3
2
|
import { type EstimateUserOperationGasParameters, type EstimateUserOperationGasReturnType } from "../../actions/bundler/estimateUserOperationGas";
|
|
4
3
|
import { type GetUserOperationByHashParameters, type GetUserOperationByHashReturnType } from "../../actions/bundler/getUserOperationByHash";
|
|
@@ -7,7 +6,8 @@ import { type SendUserOperationParameters } from "../../actions/bundler/sendUser
|
|
|
7
6
|
import { type WaitForUserOperationReceiptParameters } from "../../actions/bundler/waitForUserOperationReceipt";
|
|
8
7
|
import type { Prettify } from "../../types";
|
|
9
8
|
import type { StateOverrides } from "../../types/bundler";
|
|
10
|
-
|
|
9
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
10
|
+
export type BundlerActions<entryPoint extends EntryPoint> = {
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
* Sends user operation to the bundler
|
|
@@ -33,7 +33,7 @@ export type BundlerActions = {
|
|
|
33
33
|
*
|
|
34
34
|
* // Return '0xe9fad2cd67f9ca1d0b7a6513b2a42066784c8df938518da2b51bb8cc9a89ea34'
|
|
35
35
|
*/
|
|
36
|
-
sendUserOperation: (args: Prettify<SendUserOperationParameters
|
|
36
|
+
sendUserOperation: (args: Prettify<Omit<SendUserOperationParameters<entryPoint>, "entryPoint">>) => Promise<Hash>;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
39
|
* Estimates preVerificationGas, verificationGasLimit and callGasLimit for user operation
|
|
@@ -59,7 +59,7 @@ export type BundlerActions = {
|
|
|
59
59
|
*
|
|
60
60
|
* // Return {preVerificationGas: 43492n, verificationGasLimit: 59436n, callGasLimit: 9000n}
|
|
61
61
|
*/
|
|
62
|
-
estimateUserOperationGas: (args: Prettify<EstimateUserOperationGasParameters>, stateOverrides?: StateOverrides) => Promise<Prettify<EstimateUserOperationGasReturnType
|
|
62
|
+
estimateUserOperationGas: (args: Prettify<Omit<EstimateUserOperationGasParameters<entryPoint>, "entryPoint">>, stateOverrides?: StateOverrides) => Promise<Prettify<EstimateUserOperationGasReturnType<entryPoint>>>;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
65
|
* Returns the supported entrypoints by the bundler service
|
|
@@ -81,7 +81,7 @@ export type BundlerActions = {
|
|
|
81
81
|
*
|
|
82
82
|
* // Return ['0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789']
|
|
83
83
|
*/
|
|
84
|
-
supportedEntryPoints: () => Promise<
|
|
84
|
+
supportedEntryPoints: () => Promise<EntryPoint[]>;
|
|
85
85
|
/**
|
|
86
86
|
*
|
|
87
87
|
* Returns the supported chain id by the bundler service
|
|
@@ -124,7 +124,7 @@ export type BundlerActions = {
|
|
|
124
124
|
* await bundlerClient.getUserOperationByHash(userOpHash)
|
|
125
125
|
*
|
|
126
126
|
*/
|
|
127
|
-
getUserOperationByHash: (args: Prettify<GetUserOperationByHashParameters>) => Promise<Prettify<GetUserOperationByHashReturnType
|
|
127
|
+
getUserOperationByHash: (args: Prettify<GetUserOperationByHashParameters>) => Promise<Prettify<GetUserOperationByHashReturnType<entryPoint>> | null>;
|
|
128
128
|
/**
|
|
129
129
|
*
|
|
130
130
|
* Returns the user operation receipt from userOpHash
|
|
@@ -170,6 +170,6 @@ export type BundlerActions = {
|
|
|
170
170
|
*/
|
|
171
171
|
waitForUserOperationReceipt: (args: Prettify<WaitForUserOperationReceiptParameters>) => Promise<Prettify<GetUserOperationReceiptReturnType>>;
|
|
172
172
|
};
|
|
173
|
-
declare const bundlerActions: (client: Client) => BundlerActions
|
|
173
|
+
declare const bundlerActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => BundlerActions<entryPoint>;
|
|
174
174
|
export { bundlerActions };
|
|
175
175
|
//# sourceMappingURL=bundler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../clients/decorators/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../clients/decorators/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,EACH,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EAE1C,MAAM,gDAAgD,CAAA;AACvD,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EAExC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EAEzC,MAAM,+CAA+C,CAAA;AACtD,OAAO,EACH,KAAK,2BAA2B,EAEnC,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EACH,KAAK,qCAAqC,EAE7C,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,UAAU,IAAI;IACxD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,iBAAiB,EAAE,CACf,IAAI,EAAE,QAAQ,CACV,IAAI,CAAC,2BAA2B,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAC9D,KACA,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,wBAAwB,EAAE,CACtB,IAAI,EAAE,QAAQ,CACV,IAAI,CAAC,kCAAkC,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CACrE,EACD,cAAc,CAAC,EAAE,cAAc,KAC9B,OAAO,CAAC,QAAQ,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IACtE;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,oBAAoB,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACjD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,sBAAsB,EAAE,CACpB,IAAI,EAAE,QAAQ,CAAC,gCAAgC,CAAC,KAC/C,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IAC3E;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,uBAAuB,EAAE,CACrB,IAAI,EAAE,QAAQ,CAAC,iCAAiC,CAAC,KAChD,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAC,GAAG,IAAI,CAAC,CAAA;IAEhE;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2BAA2B,EAAE,CACzB,IAAI,EAAE,QAAQ,CAAC,qCAAqC,CAAC,KACpD,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,CAAA;CAC5D,CAAA;AAED,QAAA,MAAM,cAAc,6EAEP,MAAM,+BAqCb,CAAA;AAEN,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -4,6 +4,7 @@ import { type GetUserOperationGasPriceReturnType } from "../../actions/pimlico/g
|
|
|
4
4
|
import { type GetUserOperationStatusParameters, type GetUserOperationStatusReturnType } from "../../actions/pimlico/getUserOperationStatus";
|
|
5
5
|
import { type PimlicoSponsorUserOperationParameters, type SponsorUserOperationReturnType } from "../../actions/pimlico/sponsorUserOperation";
|
|
6
6
|
import type { Prettify } from "../../types";
|
|
7
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
7
8
|
export type PimlicoBundlerActions = {
|
|
8
9
|
/**
|
|
9
10
|
* Returns the live gas prices that you can use to send a user operation.
|
|
@@ -71,8 +72,8 @@ export type PimlicoBundlerActions = {
|
|
|
71
72
|
*/
|
|
72
73
|
sendCompressedUserOperation: (args: Prettify<SendCompressedUserOperationParameters>) => Promise<Hash>;
|
|
73
74
|
};
|
|
74
|
-
export declare const pimlicoBundlerActions: (client: Client) => PimlicoBundlerActions;
|
|
75
|
-
export type PimlicoPaymasterClientActions = {
|
|
75
|
+
export declare const pimlicoBundlerActions: <entryPoint extends EntryPoint>(client: Client) => PimlicoBundlerActions;
|
|
76
|
+
export type PimlicoPaymasterClientActions<entryPoint extends EntryPoint> = {
|
|
76
77
|
/**
|
|
77
78
|
* Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
|
|
78
79
|
*
|
|
@@ -96,8 +97,8 @@ export type PimlicoPaymasterClientActions = {
|
|
|
96
97
|
* }})
|
|
97
98
|
*
|
|
98
99
|
*/
|
|
99
|
-
sponsorUserOperation: (args: Prettify<PimlicoSponsorUserOperationParameters
|
|
100
|
-
validateSponsorshipPolicies: (args: Prettify<ValidateSponsorshipPoliciesParameters
|
|
100
|
+
sponsorUserOperation: (args: Prettify<PimlicoSponsorUserOperationParameters<entryPoint>>) => Promise<Prettify<SponsorUserOperationReturnType<entryPoint>>>;
|
|
101
|
+
validateSponsorshipPolicies: (args: Prettify<ValidateSponsorshipPoliciesParameters<entryPoint>>) => Promise<Prettify<ValidateSponsorshipPolicies>[]>;
|
|
101
102
|
};
|
|
102
103
|
/**
|
|
103
104
|
* Returns valid sponsorship policies for a userOperation from the list of ids passed
|
|
@@ -134,7 +135,7 @@ export type PimlicoPaymasterClientActions = {
|
|
|
134
135
|
* }
|
|
135
136
|
* ]
|
|
136
137
|
*/
|
|
137
|
-
export declare const pimlicoPaymasterActions: (client: Client) => PimlicoPaymasterClientActions
|
|
138
|
+
export declare const pimlicoPaymasterActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => PimlicoPaymasterClientActions<entryPoint>;
|
|
138
139
|
/**
|
|
139
140
|
* TODO: Add support for pimlicoActions after we support all the actions of v2 of the Pimlico API.
|
|
140
141
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../../clients/decorators/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,2BAA2B,EAChC,KAAK,qCAAqC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,gDAAgD,CAAA;AACvD,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EAExC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EAEtC,MAAM,4CAA4C,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../../clients/decorators/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,2BAA2B,EAChC,KAAK,qCAAqC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,gDAAgD,CAAA;AACvD,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EAExC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EAEtC,MAAM,4CAA4C,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,MAAM,qBAAqB,GAAG;IAChC;;;;;;;;;;;;;;;;;;OAkBG;IACH,wBAAwB,EAAE,MAAM,OAAO,CACnC,QAAQ,CAAC,kCAAkC,CAAC,CAC/C,CAAA;IACD;;;;;;;;;;;;;;;;;;OAkBG;IACH,sBAAsB,EAAE,CACpB,IAAI,EAAE,QAAQ,CAAC,gCAAgC,CAAC,KAC/C,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC,CAAA;IACxD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,2BAA2B,EAAE,CACzB,IAAI,EAAE,QAAQ,CAAC,qCAAqC,CAAC,KACpD,OAAO,CAAC,IAAI,CAAC,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,qBAAqB,0CACtB,MAAM,KACf,qBAeD,CAAA;AAEF,MAAM,MAAM,6BAA6B,CAAC,UAAU,SAAS,UAAU,IAAI;IACvE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oBAAoB,EAAE,CAClB,IAAI,EAAE,QAAQ,CAAC,qCAAqC,CAAC,UAAU,CAAC,CAAC,KAChE,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAElE,2BAA2B,EAAE,CACzB,IAAI,EAAE,QAAQ,CAAC,qCAAqC,CAAC,UAAU,CAAC,CAAC,KAChE,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAA;CACxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,uBAAuB,6EAEvB,MAAM,8CAwBb,CAAA;AAEN;;GAEG"}
|
|
@@ -2,15 +2,15 @@ import type { Abi, Chain, Client, ContractFunctionArgs, ContractFunctionName, De
|
|
|
2
2
|
import type { SmartAccount } from "../../accounts/types";
|
|
3
3
|
import { type SendTransactionsWithPaymasterParameters, sendTransactions } from "../../actions/smartAccount";
|
|
4
4
|
import { deployContract } from "../../actions/smartAccount/deployContract";
|
|
5
|
-
import { type
|
|
6
|
-
import { sendTransaction } from "../../actions/smartAccount/sendTransaction";
|
|
5
|
+
import { type Middleware, type PrepareUserOperationRequestReturnType, prepareUserOperationRequest } from "../../actions/smartAccount/prepareUserOperationRequest";
|
|
7
6
|
import { sendUserOperation } from "../../actions/smartAccount/sendUserOperation";
|
|
8
7
|
import { signMessage } from "../../actions/smartAccount/signMessage";
|
|
9
8
|
import { signTypedData } from "../../actions/smartAccount/signTypedData";
|
|
10
9
|
import { writeContract } from "../../actions/smartAccount/writeContract";
|
|
11
10
|
import type { Prettify } from "../../types";
|
|
12
11
|
import type { StateOverrides } from "../../types/bundler";
|
|
13
|
-
|
|
12
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
13
|
+
export type SmartAccountActions<entryPoint extends EntryPoint, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined> = {
|
|
14
14
|
/**
|
|
15
15
|
* Creates, signs, and sends a new transaction to the network.
|
|
16
16
|
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
@@ -54,7 +54,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
54
54
|
* value: 1000000000000000000n,
|
|
55
55
|
* })
|
|
56
56
|
*/
|
|
57
|
-
sendTransaction: <TChainOverride extends Chain | undefined>(args: SendTransactionParameters<TChain, TSmartAccount, TChainOverride>) =>
|
|
57
|
+
sendTransaction: <TChainOverride extends Chain | undefined>(args: SendTransactionParameters<TChain, TSmartAccount, TChainOverride>) => Promise<Hash>;
|
|
58
58
|
/**
|
|
59
59
|
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
60
60
|
*
|
|
@@ -98,7 +98,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
98
98
|
* message: 'hello world',
|
|
99
99
|
* })
|
|
100
100
|
*/
|
|
101
|
-
signMessage: (args: Parameters<typeof signMessage<TChain, TSmartAccount>>[1]) => ReturnType<typeof signMessage<TChain, TSmartAccount>>;
|
|
101
|
+
signMessage: (args: Parameters<typeof signMessage<entryPoint, TChain, TSmartAccount>>[1]) => ReturnType<typeof signMessage<entryPoint, TChain, TSmartAccount>>;
|
|
102
102
|
/**
|
|
103
103
|
* 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))`.
|
|
104
104
|
*
|
|
@@ -197,7 +197,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
197
197
|
*/
|
|
198
198
|
signTypedData: <const TTypedData extends TypedData | {
|
|
199
199
|
[key: string]: unknown;
|
|
200
|
-
}, TPrimaryType extends string>(args: Parameters<typeof signTypedData<TTypedData, TPrimaryType, TChain, TSmartAccount>>[1]) => ReturnType<typeof signTypedData<TTypedData, TPrimaryType, TChain, TSmartAccount>>;
|
|
200
|
+
}, TPrimaryType extends string>(args: Parameters<typeof signTypedData<entryPoint, TTypedData, TPrimaryType, TChain, TSmartAccount>>[1]) => ReturnType<typeof signTypedData<entryPoint, TTypedData, TPrimaryType, TChain, TSmartAccount>>;
|
|
201
201
|
/**
|
|
202
202
|
* Deploys a contract to the network, given bytecode and constructor arguments.
|
|
203
203
|
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
@@ -224,7 +224,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
224
224
|
* bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',
|
|
225
225
|
* })
|
|
226
226
|
*/
|
|
227
|
-
deployContract: <const TAbi extends Abi | readonly unknown[], TChainOverride extends Chain | undefined = undefined>(args: Prettify<DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride>>) => ReturnType<typeof deployContract<TChain, TSmartAccount>>;
|
|
227
|
+
deployContract: <const TAbi extends Abi | readonly unknown[], TChainOverride extends Chain | undefined = undefined>(args: Prettify<DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride>>) => ReturnType<typeof deployContract<entryPoint, TChain, TSmartAccount>>;
|
|
228
228
|
/**
|
|
229
229
|
* Executes a write function on a contract.
|
|
230
230
|
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
@@ -273,9 +273,9 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
273
273
|
* }
|
|
274
274
|
* const hash = await client.writeContract(request)
|
|
275
275
|
*/
|
|
276
|
-
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<TChain, TSmartAccount, TAbi, TFunctionName, TArgs, TChainOverride>>;
|
|
277
|
-
prepareUserOperationRequest: <TTransport extends Transport>(args: Prettify<Parameters<typeof prepareUserOperationRequest<TTransport, TChain, TSmartAccount>>[1]>, stateOverrides?: StateOverrides) => Promise<Prettify<PrepareUserOperationRequestReturnType
|
|
278
|
-
sendUserOperation: <TTransport extends Transport>(args: Prettify<Parameters<typeof sendUserOperation<TTransport, TChain, TSmartAccount>>[1]>) => Promise<Hash>;
|
|
276
|
+
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, TChain, TSmartAccount, TAbi, TFunctionName, TArgs, TChainOverride>>;
|
|
277
|
+
prepareUserOperationRequest: <TTransport extends Transport>(args: Prettify<Parameters<typeof prepareUserOperationRequest<entryPoint, TTransport, TChain, TSmartAccount>>[1]>, stateOverrides?: StateOverrides) => Promise<Prettify<PrepareUserOperationRequestReturnType<entryPoint>>>;
|
|
278
|
+
sendUserOperation: <TTransport extends Transport>(args: Prettify<Parameters<typeof sendUserOperation<entryPoint, TTransport, TChain, TSmartAccount>>[1]>) => Promise<Hash>;
|
|
279
279
|
/**
|
|
280
280
|
* Creates, signs, and sends a new transaction to the network.
|
|
281
281
|
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
@@ -325,7 +325,7 @@ export type SmartAccountActions<TChain extends Chain | undefined = Chain | undef
|
|
|
325
325
|
* value: 10000000000000000n
|
|
326
326
|
* }])
|
|
327
327
|
*/
|
|
328
|
-
sendTransactions: (args: Prettify<SendTransactionsWithPaymasterParameters<TSmartAccount>>) => ReturnType<typeof sendTransactions<TChain, TSmartAccount>>;
|
|
328
|
+
sendTransactions: (args: Prettify<SendTransactionsWithPaymasterParameters<entryPoint, TSmartAccount>>) => ReturnType<typeof sendTransactions<TChain, TSmartAccount, entryPoint>>;
|
|
329
329
|
};
|
|
330
|
-
export declare function smartAccountActions({
|
|
330
|
+
export declare function smartAccountActions<entryPoint extends EntryPoint>({ middleware }: Middleware<entryPoint>): <TTransport extends Transport, TChain extends Chain | undefined = Chain | undefined, TSmartAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined>(client: Client<TTransport, TChain, TSmartAccount>) => SmartAccountActions<entryPoint, TChain, TSmartAccount>;
|
|
331
331
|
//# sourceMappingURL=smartAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccount.d.ts","sourceRoot":"","sources":["../../../clients/decorators/smartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,GAAG,EACH,KAAK,EACL,MAAM,EACN,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,IAAI,EACJ,yBAAyB,EACzB,SAAS,EACT,SAAS,EACT,uBAAuB,EAC1B,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EACH,KAAK,uCAAuC,EAC5C,gBAAgB,EACnB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAEH,cAAc,EACjB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EACH,KAAK,
|
|
1
|
+
{"version":3,"file":"smartAccount.d.ts","sourceRoot":"","sources":["../../../clients/decorators/smartAccount.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Address, Client } from "viem";
|
|
2
2
|
import { type AccountsParameters } from "../../actions/stackup/accounts";
|
|
3
3
|
import { type SponsorUserOperationParameters, type SponsorUserOperationReturnType } from "../../actions/stackup/sponsorUserOperation";
|
|
4
|
-
|
|
4
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
5
|
+
export type StackupPaymasterClientActions<entryPoint extends EntryPoint> = {
|
|
5
6
|
/**
|
|
6
7
|
* Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
|
|
7
8
|
*
|
|
@@ -25,7 +26,7 @@ export type StackupPaymasterClientActions = {
|
|
|
25
26
|
* }})
|
|
26
27
|
*
|
|
27
28
|
*/
|
|
28
|
-
sponsorUserOperation: (args: SponsorUserOperationParameters) => Promise<SponsorUserOperationReturnType
|
|
29
|
+
sponsorUserOperation: (args: SponsorUserOperationParameters<entryPoint>) => Promise<SponsorUserOperationReturnType<entryPoint>>;
|
|
29
30
|
/**
|
|
30
31
|
* Returns all the Paymaster addresses associated with an EntryPoint that’s owned by this service.
|
|
31
32
|
*
|
|
@@ -48,7 +49,7 @@ export type StackupPaymasterClientActions = {
|
|
|
48
49
|
* }})
|
|
49
50
|
*
|
|
50
51
|
*/
|
|
51
|
-
accounts: (args: AccountsParameters) => Promise<Address[]>;
|
|
52
|
+
accounts: (args: AccountsParameters<entryPoint>) => Promise<Address[]>;
|
|
52
53
|
};
|
|
53
|
-
export declare const stackupPaymasterActions: (client: Client) => StackupPaymasterClientActions
|
|
54
|
+
export declare const stackupPaymasterActions: <entryPoint extends EntryPoint>(client: Client) => StackupPaymasterClientActions<entryPoint>;
|
|
54
55
|
//# sourceMappingURL=stackup.d.ts.map
|
|
@@ -1 +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;
|
|
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,8BAA8B,CAAC,UAAU,CAAC,KAC/C,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,0CACxB,MAAM,8CAShB,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
2
3
|
import type { PimlicoBundlerRpcSchema, PimlicoPaymasterRpcSchema } from "../types/pimlico";
|
|
3
4
|
import { type BundlerActions } from "./decorators/bundler";
|
|
4
5
|
import { type PimlicoBundlerActions, type PimlicoPaymasterClientActions } from "./decorators/pimlico";
|
|
5
|
-
export type PimlicoBundlerClient = Client<Transport, Chain | undefined, Account | undefined, PimlicoBundlerRpcSchema, PimlicoBundlerActions & BundlerActions
|
|
6
|
-
export type PimlicoPaymasterClient = Client<Transport, Chain | undefined, Account | undefined, PimlicoPaymasterRpcSchema
|
|
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>>;
|
|
7
8
|
/**
|
|
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).
|
|
9
10
|
*
|
|
@@ -23,7 +24,7 @@ export type PimlicoPaymasterClient = Client<Transport, Chain | undefined, Accoun
|
|
|
23
24
|
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
24
25
|
* })
|
|
25
26
|
*/
|
|
26
|
-
export declare const createPimlicoBundlerClient: <transport extends Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
27
|
+
export declare const createPimlicoBundlerClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
27
28
|
batch?: {
|
|
28
29
|
multicall?: boolean | {
|
|
29
30
|
batchSize?: number | undefined;
|
|
@@ -36,7 +37,9 @@ export declare const createPimlicoBundlerClient: <transport extends Transport, c
|
|
|
36
37
|
name?: string | undefined;
|
|
37
38
|
pollingInterval?: number | undefined;
|
|
38
39
|
transport: transport;
|
|
39
|
-
}
|
|
40
|
+
} & {
|
|
41
|
+
entryPoint: entryPoint;
|
|
42
|
+
}) => PimlicoBundlerClient<entryPoint>;
|
|
40
43
|
/**
|
|
41
44
|
* 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).
|
|
42
45
|
*
|
|
@@ -56,7 +59,7 @@ export declare const createPimlicoBundlerClient: <transport extends Transport, c
|
|
|
56
59
|
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
57
60
|
* })
|
|
58
61
|
*/
|
|
59
|
-
export declare const createPimlicoPaymasterClient: <transport extends Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
62
|
+
export declare const createPimlicoPaymasterClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
60
63
|
batch?: {
|
|
61
64
|
multicall?: boolean | {
|
|
62
65
|
batchSize?: number | undefined;
|
|
@@ -69,5 +72,7 @@ export declare const createPimlicoPaymasterClient: <transport extends Transport,
|
|
|
69
72
|
name?: string | undefined;
|
|
70
73
|
pollingInterval?: number | undefined;
|
|
71
74
|
transport: transport;
|
|
72
|
-
}
|
|
75
|
+
} & {
|
|
76
|
+
entryPoint: entryPoint;
|
|
77
|
+
}) => PimlicoPaymasterClient<entryPoint>;
|
|
73
78
|
//# sourceMappingURL=pimlico.d.ts.map
|
|
@@ -1 +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,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,
|
|
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;;;;;;;;;;;;;;;sCAmBtC,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;wCAiBxC,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type Account, type Chain, type Client, type PublicClientConfig, type Transport } from "viem";
|
|
2
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
2
3
|
import type { StackupPaymasterRpcSchema } from "../types/stackup";
|
|
3
4
|
import { type BundlerActions } from "./decorators/bundler";
|
|
4
5
|
import { type StackupPaymasterClientActions } from "./decorators/stackup";
|
|
5
|
-
export type StackupPaymasterClient = Client<Transport, Chain | undefined, Account | undefined, StackupPaymasterRpcSchema
|
|
6
|
+
export type StackupPaymasterClient<entryPoint extends EntryPoint> = Client<Transport, Chain | undefined, Account | undefined, StackupPaymasterRpcSchema<entryPoint>, StackupPaymasterClientActions<entryPoint> & BundlerActions<entryPoint>>;
|
|
6
7
|
/**
|
|
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).
|
|
8
9
|
*
|
|
@@ -22,7 +23,7 @@ export type StackupPaymasterClient = Client<Transport, Chain | undefined, Accoun
|
|
|
22
23
|
* transport: http("https://api.stackup.sh/v2/paymaster/YOUR_API_KEY_HERE"),
|
|
23
24
|
* })
|
|
24
25
|
*/
|
|
25
|
-
export declare const createStackupPaymasterClient: <transport extends Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
26
|
+
export declare const createStackupPaymasterClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: {
|
|
26
27
|
batch?: {
|
|
27
28
|
multicall?: boolean | {
|
|
28
29
|
batchSize?: number | undefined;
|
|
@@ -35,5 +36,7 @@ export declare const createStackupPaymasterClient: <transport extends Transport,
|
|
|
35
36
|
name?: string | undefined;
|
|
36
37
|
pollingInterval?: number | undefined;
|
|
37
38
|
transport: transport;
|
|
38
|
-
}
|
|
39
|
+
} & {
|
|
40
|
+
entryPoint: entryPoint;
|
|
41
|
+
}) => StackupPaymasterClient<entryPoint>;
|
|
39
42
|
//# sourceMappingURL=stackup.d.ts.map
|
|
@@ -1 +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,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,
|
|
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;;;;;;;;;;;;;;;wCAmBxC,CAAA"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { BaseError } from "viem";
|
|
2
2
|
import type { EstimateUserOperationGasParameters } from "../actions/bundler/estimateUserOperationGas";
|
|
3
|
-
|
|
3
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
4
|
+
export type EstimateUserOperationGasErrorType<entryPoint extends EntryPoint> = EstimateUserOperationGasError<entryPoint> & {
|
|
4
5
|
name: "EstimateUserOperationGasError";
|
|
5
6
|
};
|
|
6
|
-
export declare class EstimateUserOperationGasError extends BaseError {
|
|
7
|
+
export declare class EstimateUserOperationGasError<entryPoint extends EntryPoint> extends BaseError {
|
|
7
8
|
cause: BaseError;
|
|
8
9
|
name: string;
|
|
9
|
-
constructor(cause: BaseError, { userOperation, entryPoint, docsPath }: EstimateUserOperationGasParameters & {
|
|
10
|
+
constructor(cause: BaseError, { userOperation, entryPoint, docsPath }: EstimateUserOperationGasParameters<entryPoint> & {
|
|
10
11
|
docsPath?: string;
|
|
11
12
|
});
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateUserOperationGas.d.ts","sourceRoot":"","sources":["../../errors/estimateUserOperationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAA;
|
|
1
|
+
{"version":3,"file":"estimateUserOperationGas.d.ts","sourceRoot":"","sources":["../../errors/estimateUserOperationGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAA;AACrG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGrD,MAAM,MAAM,iCAAiC,CAAC,UAAU,SAAS,UAAU,IACvE,6BAA6B,CAAC,UAAU,CAAC,GAAG;IACxC,IAAI,EAAE,+BAA+B,CAAA;CACxC,CAAA;AACL,qBAAa,6BAA6B,CACtC,UAAU,SAAS,UAAU,CAC/B,SAAQ,SAAS;IACN,KAAK,EAAE,SAAS,CAAA;IAEhB,IAAI,SAAkC;gBAG3C,KAAK,EAAE,SAAS,EAChB,EACI,aAAa,EACb,UAAU,EACV,QAAQ,EACX,EAAE,kCAAkC,CAAC,UAAU,CAAC,GAAG;QAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB;CA4BR"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { BaseError } from "viem";
|
|
2
2
|
import { type SendUserOperationParameters } from "../actions/bundler/sendUserOperation";
|
|
3
|
-
|
|
3
|
+
import type { EntryPoint } from "../types/entrypoint";
|
|
4
|
+
export type SendUserOperationErrorType<entryPoint extends EntryPoint> = SendUserOperationError<entryPoint> & {
|
|
4
5
|
name: "SendUserOperationError";
|
|
5
6
|
};
|
|
6
|
-
export declare class SendUserOperationError extends BaseError {
|
|
7
|
+
export declare class SendUserOperationError<entryPoint extends EntryPoint> extends BaseError {
|
|
7
8
|
cause: BaseError;
|
|
8
9
|
name: string;
|
|
9
|
-
constructor(cause: BaseError, { userOperation, entryPoint, docsPath }: SendUserOperationParameters & {
|
|
10
|
+
constructor(cause: BaseError, { userOperation, entryPoint, docsPath }: SendUserOperationParameters<entryPoint> & {
|
|
10
11
|
docsPath?: string;
|
|
11
12
|
});
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../errors/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../errors/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGrD,MAAM,MAAM,0BAA0B,CAAC,UAAU,SAAS,UAAU,IAChE,sBAAsB,CAAC,UAAU,CAAC,GAAG;IACjC,IAAI,EAAE,wBAAwB,CAAA;CACjC,CAAA;AACL,qBAAa,sBAAsB,CAC/B,UAAU,SAAS,UAAU,CAC/B,SAAQ,SAAS;IACN,KAAK,EAAE,SAAS,CAAA;IAEhB,IAAI,SAA2B;gBAGpC,KAAK,EAAE,SAAS,EAChB,EACI,aAAa,EACb,UAAU,EACV,QAAQ,EACX,EAAE,2BAA2B,CAAC,UAAU,CAAC,GAAG;QACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB;CA4BR"}
|
|
@@ -1,38 +1,33 @@
|
|
|
1
1
|
import type { Address, Hash, Hex } from "viem";
|
|
2
2
|
import type { PartialBy } from "viem/types/utils";
|
|
3
|
+
import type { EntryPoint, GetEntryPointVersion } from "./entrypoint";
|
|
3
4
|
import type { UserOperationWithBigIntAsHex } from "./userOperation";
|
|
4
|
-
export type BundlerRpcSchema = [
|
|
5
|
+
export type BundlerRpcSchema<entryPoint extends EntryPoint> = [
|
|
5
6
|
{
|
|
6
7
|
Method: "eth_sendUserOperation";
|
|
7
8
|
Parameters: [
|
|
8
|
-
userOperation: UserOperationWithBigIntAsHex
|
|
9
|
-
entryPoint:
|
|
9
|
+
userOperation: UserOperationWithBigIntAsHex<GetEntryPointVersion<entryPoint>>,
|
|
10
|
+
entryPoint: entryPoint
|
|
10
11
|
];
|
|
11
12
|
ReturnType: Hash;
|
|
12
13
|
},
|
|
13
14
|
{
|
|
14
15
|
Method: "eth_estimateUserOperationGas";
|
|
15
16
|
Parameters: [
|
|
16
|
-
userOperation: PartialBy<UserOperationWithBigIntAsHex
|
|
17
|
-
entryPoint:
|
|
18
|
-
stateOverrides?:
|
|
19
|
-
[x: string]: {
|
|
20
|
-
balance?: Hex;
|
|
21
|
-
nonce?: Hex;
|
|
22
|
-
code?: Hex;
|
|
23
|
-
state?: {
|
|
24
|
-
[x: Hex]: Hex;
|
|
25
|
-
};
|
|
26
|
-
stateDiff?: {
|
|
27
|
-
[x: Hex]: Hex;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
}
|
|
17
|
+
userOperation: GetEntryPointVersion<entryPoint> extends "v0.6" ? PartialBy<UserOperationWithBigIntAsHex<"v0.6">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<UserOperationWithBigIntAsHex<"v0.7">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">,
|
|
18
|
+
entryPoint: entryPoint,
|
|
19
|
+
stateOverrides?: StateOverrides
|
|
31
20
|
];
|
|
32
|
-
ReturnType: {
|
|
21
|
+
ReturnType: GetEntryPointVersion<entryPoint> extends "v0.6" ? {
|
|
33
22
|
preVerificationGas: Hex;
|
|
34
23
|
verificationGasLimit: Hex;
|
|
35
24
|
callGasLimit: Hex;
|
|
25
|
+
} : {
|
|
26
|
+
preVerificationGas: Hex;
|
|
27
|
+
verificationGasLimit: Hex;
|
|
28
|
+
callGasLimit: Hex | null | undefined;
|
|
29
|
+
paymasterVerificationGasLimit: Hex | null | undefined;
|
|
30
|
+
paymasterPostOpGasLimit: Hex | null | undefined;
|
|
36
31
|
};
|
|
37
32
|
},
|
|
38
33
|
{
|
|
@@ -49,8 +44,8 @@ export type BundlerRpcSchema = [
|
|
|
49
44
|
Method: "eth_getUserOperationByHash";
|
|
50
45
|
Parameters: [hash: Hash];
|
|
51
46
|
ReturnType: {
|
|
52
|
-
userOperation: UserOperationWithBigIntAsHex
|
|
53
|
-
entryPoint:
|
|
47
|
+
userOperation: UserOperationWithBigIntAsHex<GetEntryPointVersion<entryPoint>>;
|
|
48
|
+
entryPoint: entryPoint;
|
|
54
49
|
transactionHash: Hash;
|
|
55
50
|
blockHash: Hash;
|
|
56
51
|
blockNumber: Hex;
|