permissionless 0.0.32 → 0.0.34
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 +2 -2
- package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js +16 -16
- package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
- package/_cjs/accounts/index.js +16 -16
- package/_cjs/accounts/index.js.map +1 -1
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js +16 -16
- package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
- package/_cjs/accounts/privateKeyToSafeSmartAccount.js +2 -2
- package/_cjs/accounts/privateKeyToSafeSmartAccount.js.map +1 -1
- package/_cjs/accounts/privateKeyToSimpleSmartAccount.js +2 -2
- package/_cjs/accounts/privateKeyToSimpleSmartAccount.js.map +1 -1
- package/_cjs/accounts/signerToSafeSmartAccount.js +8 -8
- package/_cjs/accounts/signerToSafeSmartAccount.js.map +1 -1
- package/_cjs/accounts/signerToSimpleSmartAccount.js +12 -12
- package/_cjs/accounts/signerToSimpleSmartAccount.js.map +1 -1
- package/_cjs/actions/bundler/estimateUserOperationGas.js +5 -5
- package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_cjs/actions/bundler/getUserOperationReceipt.js +2 -2
- package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/_cjs/actions/bundler/sendUserOperation.js +4 -4
- package/_cjs/actions/bundler/sendUserOperation.js.map +1 -1
- package/_cjs/actions/bundler/waitForUserOperationReceipt.js +5 -5
- package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
- package/_cjs/actions/index.js +21 -21
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/pimlico/sponsorUserOperation.js +3 -3
- package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js +2 -2
- package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
- package/_cjs/actions/pimlico.js +13 -13
- package/_cjs/actions/pimlico.js.map +1 -1
- package/_cjs/actions/public/getAccountNonce.js +2 -2
- package/_cjs/actions/public/getAccountNonce.js.map +1 -1
- package/_cjs/actions/public/getSenderAddress.js +2 -2
- package/_cjs/actions/public/getSenderAddress.js.map +1 -1
- package/_cjs/actions/smartAccount/deployContract.js +9 -9
- package/_cjs/actions/smartAccount/deployContract.js.map +1 -1
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +6 -6
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -1
- package/_cjs/actions/smartAccount/sendTransaction.js +8 -8
- package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -1
- package/_cjs/actions/smartAccount/sendTransactions.js +8 -8
- package/_cjs/actions/smartAccount/sendTransactions.js.map +1 -1
- package/_cjs/actions/smartAccount/sendUserOperation.js +8 -8
- package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/_cjs/actions/smartAccount/signMessage.js +3 -3
- package/_cjs/actions/smartAccount/signMessage.js.map +1 -1
- package/_cjs/actions/smartAccount/signTypedData.js +3 -3
- package/_cjs/actions/smartAccount/signTypedData.js.map +1 -1
- package/_cjs/actions/smartAccount/writeContract.js +3 -3
- package/_cjs/actions/smartAccount/writeContract.js.map +1 -1
- package/_cjs/actions/smartAccount.js +16 -16
- package/_cjs/actions/smartAccount.js.map +1 -1
- package/_cjs/actions/stackup/sponsorUserOperation.js +2 -2
- package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -1
- package/_cjs/actions/stackup.js +6 -6
- package/_cjs/actions/stackup.js.map +1 -1
- package/_cjs/clients/createBundlerClient.js +2 -2
- package/_cjs/clients/createBundlerClient.js.map +1 -1
- package/_cjs/clients/createSmartAccountClient.js +2 -2
- package/_cjs/clients/createSmartAccountClient.js.map +1 -1
- package/_cjs/clients/decorators/bundler.js +14 -14
- package/_cjs/clients/decorators/bundler.js.map +1 -1
- package/_cjs/clients/decorators/pimlico.js +9 -9
- package/_cjs/clients/decorators/pimlico.js.map +1 -1
- package/_cjs/clients/decorators/smartAccount.js +16 -16
- package/_cjs/clients/decorators/smartAccount.js.map +1 -1
- package/_cjs/clients/decorators/stackup.js +4 -4
- package/_cjs/clients/decorators/stackup.js.map +1 -1
- package/_cjs/clients/pimlico.js +4 -4
- package/_cjs/clients/pimlico.js.map +1 -1
- package/_cjs/clients/stackup.js +3 -3
- package/_cjs/clients/stackup.js.map +1 -1
- package/_cjs/errors/estimateUserOperationGas.js +2 -2
- package/_cjs/errors/estimateUserOperationGas.js.map +1 -1
- package/_cjs/errors/index.js +31 -31
- package/_cjs/errors/index.js.map +1 -1
- package/_cjs/errors/paymaster.js +7 -7
- package/_cjs/errors/paymaster.js.map +1 -1
- package/_cjs/errors/sendUserOperation.js +2 -2
- package/_cjs/errors/sendUserOperation.js.map +1 -1
- package/_cjs/index.js +30 -30
- package/_cjs/index.js.map +1 -1
- package/_cjs/utils/errors/getBundlerError.js +3 -3
- package/_cjs/utils/errors/getEstimateUserOperationGasError.js +2 -2
- package/_cjs/utils/errors/getSendUserOperationError.js +2 -2
- package/_cjs/utils/index.js +21 -19
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/providerToSmartAccountSigner.js +22 -0
- package/_cjs/utils/providerToSmartAccountSigner.js.map +1 -0
- package/_cjs/utils/signUserOperationHashWithECDSA.js +4 -4
- package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -1
- package/_cjs/utils/{walletClientToCustomSigner.js → walletClientToSmartAccountSigner.js} +4 -4
- package/_cjs/utils/walletClientToSmartAccountSigner.js.map +1 -0
- package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
- package/_esm/accounts/index.js.map +1 -1
- package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
- package/_esm/accounts/privateKeyToSafeSmartAccount.js.map +1 -1
- package/_esm/accounts/privateKeyToSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/signerToSafeSmartAccount.js.map +1 -1
- package/_esm/accounts/signerToSimpleSmartAccount.js.map +1 -1
- package/_esm/accounts/types.js.map +1 -1
- package/_esm/actions/bundler/estimateUserOperationGas.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/waitForUserOperationReceipt.js.map +1 -1
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/pimlico/sendCompressedUserOperation.js.map +1 -1
- package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
- package/_esm/actions/pimlico.js.map +1 -1
- package/_esm/actions/public/getAccountNonce.js.map +1 -1
- package/_esm/actions/public/getSenderAddress.js.map +1 -1
- package/_esm/actions/smartAccount/deployContract.js +1 -1
- package/_esm/actions/smartAccount/deployContract.js.map +1 -1
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js +1 -1
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -1
- package/_esm/actions/smartAccount/sendTransaction.js +1 -1
- package/_esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/_esm/actions/smartAccount/sendTransactions.js +1 -1
- 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/smartAccount.js.map +1 -1
- package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -1
- package/_esm/actions/stackup.js.map +1 -1
- package/_esm/clients/createBundlerClient.js.map +1 -1
- package/_esm/clients/createSmartAccountClient.js.map +1 -1
- package/_esm/clients/decorators/bundler.js.map +1 -1
- package/_esm/clients/decorators/pimlico.js.map +1 -1
- package/_esm/clients/decorators/smartAccount.js.map +1 -1
- package/_esm/clients/decorators/stackup.js.map +1 -1
- package/_esm/clients/pimlico.js.map +1 -1
- package/_esm/clients/stackup.js.map +1 -1
- package/_esm/errors/estimateUserOperationGas.js.map +1 -1
- package/_esm/errors/index.js.map +1 -1
- package/_esm/errors/paymaster.js.map +1 -1
- package/_esm/errors/sendUserOperation.js.map +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/utils/errors/getBundlerError.js +3 -3
- package/_esm/utils/errors/getEstimateUserOperationGasError.js +3 -3
- package/_esm/utils/errors/getSendUserOperationError.js +2 -2
- package/_esm/utils/index.js +3 -2
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/providerToSmartAccountSigner.js +18 -0
- package/_esm/utils/providerToSmartAccountSigner.js.map +1 -0
- package/_esm/utils/signUserOperationHashWithECDSA.js +1 -1
- package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -1
- package/_esm/utils/{walletClientToCustomSigner.js → walletClientToSmartAccountSigner.js} +2 -2
- package/_esm/utils/walletClientToSmartAccountSigner.js.map +1 -0
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts +1 -1
- package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts +1 -1
- package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts.map +1 -1
- package/_types/accounts/index.d.ts +8 -8
- package/_types/accounts/index.d.ts.map +1 -1
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts +2 -2
- package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts.map +1 -1
- package/_types/accounts/privateKeyToSafeSmartAccount.d.ts +1 -1
- package/_types/accounts/privateKeyToSafeSmartAccount.d.ts.map +1 -1
- package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts +1 -1
- package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/signerToSafeSmartAccount.d.ts +1 -1
- package/_types/accounts/signerToSafeSmartAccount.d.ts.map +1 -1
- package/_types/accounts/signerToSimpleSmartAccount.d.ts +1 -1
- package/_types/accounts/signerToSimpleSmartAccount.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +1 -1
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/actions/bundler/chainId.d.ts +1 -1
- package/_types/actions/bundler/chainId.d.ts.map +1 -1
- package/_types/actions/bundler/estimateUserOperationGas.d.ts +4 -4
- package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/_types/actions/bundler/getUserOperationByHash.d.ts +3 -3
- package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
- package/_types/actions/bundler/getUserOperationReceipt.d.ts +3 -3
- package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
- package/_types/actions/bundler/sendUserOperation.d.ts +3 -3
- package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/bundler/supportedEntryPoints.d.ts +1 -1
- package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -1
- package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +2 -2
- package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -1
- package/_types/actions/index.d.ts +17 -17
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +2 -2
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationStatus.d.ts +2 -2
- package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -1
- package/_types/actions/pimlico/sendCompressedUserOperation.d.ts +2 -2
- package/_types/actions/pimlico/sendCompressedUserOperation.d.ts.map +1 -1
- package/_types/actions/pimlico/sponsorUserOperation.d.ts +3 -3
- package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -1
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +3 -3
- package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -1
- package/_types/actions/pimlico.d.ts +7 -7
- package/_types/actions/pimlico.d.ts.map +1 -1
- package/_types/actions/public/getAccountNonce.d.ts +1 -1
- package/_types/actions/public/getAccountNonce.d.ts.map +1 -1
- package/_types/actions/public/getSenderAddress.d.ts +1 -1
- package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
- package/_types/actions/smartAccount/deployContract.d.ts +3 -3
- package/_types/actions/smartAccount/deployContract.d.ts.map +1 -1
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +3 -3
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -1
- package/_types/actions/smartAccount/sendTransaction.d.ts +3 -3
- package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
- package/_types/actions/smartAccount/sendTransactions.d.ts +3 -3
- package/_types/actions/smartAccount/sendTransactions.d.ts.map +1 -1
- package/_types/actions/smartAccount/sendUserOperation.d.ts +3 -3
- package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/smartAccount/signMessage.d.ts +1 -1
- package/_types/actions/smartAccount/signMessage.d.ts.map +1 -1
- package/_types/actions/smartAccount/signTypedData.d.ts +1 -1
- package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -1
- package/_types/actions/smartAccount/writeContract.d.ts +2 -2
- package/_types/actions/smartAccount/writeContract.d.ts.map +1 -1
- package/_types/actions/smartAccount.d.ts +8 -8
- package/_types/actions/smartAccount.d.ts.map +1 -1
- package/_types/actions/stackup/accounts.d.ts +1 -1
- package/_types/actions/stackup/accounts.d.ts.map +1 -1
- package/_types/actions/stackup/sponsorUserOperation.d.ts +3 -3
- package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -1
- package/_types/actions/stackup.d.ts +4 -4
- package/_types/actions/stackup.d.ts.map +1 -1
- package/_types/clients/createBundlerClient.d.ts +2 -2
- package/_types/clients/createBundlerClient.d.ts.map +1 -1
- package/_types/clients/createSmartAccountClient.d.ts +5 -5
- package/_types/clients/createSmartAccountClient.d.ts.map +1 -1
- package/_types/clients/decorators/bundler.d.ts +8 -8
- package/_types/clients/decorators/bundler.d.ts.map +1 -1
- package/_types/clients/decorators/pimlico.d.ts +5 -5
- package/_types/clients/decorators/pimlico.d.ts.map +1 -1
- package/_types/clients/decorators/smartAccount.d.ts +11 -11
- package/_types/clients/decorators/smartAccount.d.ts.map +1 -1
- package/_types/clients/decorators/stackup.d.ts +2 -2
- package/_types/clients/decorators/stackup.d.ts.map +1 -1
- package/_types/clients/pimlico.d.ts +3 -3
- package/_types/clients/pimlico.d.ts.map +1 -1
- package/_types/clients/stackup.d.ts +3 -3
- package/_types/clients/stackup.d.ts.map +1 -1
- package/_types/errors/estimateUserOperationGas.d.ts +1 -1
- package/_types/errors/estimateUserOperationGas.d.ts.map +1 -1
- package/_types/errors/index.d.ts +6 -6
- package/_types/errors/index.d.ts.map +1 -1
- package/_types/errors/sendUserOperation.d.ts +1 -1
- package/_types/errors/sendUserOperation.d.ts.map +1 -1
- package/_types/index.d.ts +28 -28
- package/_types/index.d.ts.map +1 -1
- package/_types/types/bundler.d.ts +1 -1
- package/_types/types/bundler.d.ts.map +1 -1
- package/_types/types/index.d.ts +2 -2
- package/_types/types/index.d.ts.map +1 -1
- package/_types/types/pimlico.d.ts +1 -1
- package/_types/types/pimlico.d.ts.map +1 -1
- package/_types/types/stackup.d.ts +1 -1
- package/_types/types/stackup.d.ts.map +1 -1
- package/_types/types/userOperation.d.ts +1 -1
- package/_types/types/userOperation.d.ts.map +1 -1
- package/_types/utils/getUserOperationHash.d.ts +1 -1
- package/_types/utils/getUserOperationHash.d.ts.map +1 -1
- package/_types/utils/index.d.ts +10 -9
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/providerToSmartAccountSigner.d.ts +3 -0
- package/_types/utils/providerToSmartAccountSigner.d.ts.map +1 -0
- package/_types/utils/signUserOperationHashWithECDSA.d.ts +2 -2
- package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -1
- package/_types/utils/walletClientToSmartAccountSigner.d.ts +4 -0
- package/_types/utils/walletClientToSmartAccountSigner.d.ts.map +1 -0
- package/accounts/biconomy/privateKeyToBiconomySmartAccount.ts +1 -1
- package/accounts/biconomy/signerToBiconomySmartAccount.ts +6 -6
- package/accounts/index.ts +8 -8
- package/accounts/kernel/signerToEcdsaKernelSmartAccount.ts +8 -8
- package/accounts/privateKeyToSafeSmartAccount.ts +1 -1
- package/accounts/privateKeyToSimpleSmartAccount.ts +1 -1
- package/accounts/signerToSafeSmartAccount.ts +3 -3
- package/accounts/signerToSimpleSmartAccount.ts +6 -6
- package/accounts/types.ts +1 -1
- package/actions/bundler/chainId.ts +2 -2
- package/actions/bundler/estimateUserOperationGas.ts +6 -6
- package/actions/bundler/getUserOperationByHash.ts +4 -4
- package/actions/bundler/getUserOperationReceipt.ts +5 -5
- package/actions/bundler/sendUserOperation.ts +6 -6
- package/actions/bundler/supportedEntryPoints.ts +2 -2
- package/actions/bundler/waitForUserOperationReceipt.ts +4 -4
- package/actions/index.ts +17 -17
- package/actions/pimlico/getUserOperationGasPrice.ts +2 -2
- package/actions/pimlico/getUserOperationStatus.ts +3 -3
- package/actions/pimlico/sendCompressedUserOperation.ts +2 -2
- package/actions/pimlico/sponsorUserOperation.ts +4 -4
- package/actions/pimlico/validateSponsorshipPolicies.ts +4 -4
- package/actions/pimlico.ts +7 -7
- package/actions/public/getAccountNonce.ts +2 -2
- package/actions/public/getSenderAddress.ts +2 -2
- package/actions/smartAccount/deployContract.ts +8 -8
- package/actions/smartAccount/prepareUserOperationRequest.ts +6 -9
- package/actions/smartAccount/sendTransaction.ts +7 -10
- package/actions/smartAccount/sendTransactions.ts +7 -10
- package/actions/smartAccount/sendUserOperation.ts +6 -9
- package/actions/smartAccount/signMessage.ts +2 -5
- package/actions/smartAccount/signTypedData.ts +2 -5
- package/actions/smartAccount/writeContract.ts +4 -4
- package/actions/smartAccount.ts +8 -8
- package/actions/stackup/accounts.ts +1 -1
- package/actions/stackup/sponsorUserOperation.ts +4 -4
- package/actions/stackup.ts +4 -4
- package/clients/createBundlerClient.ts +2 -2
- package/clients/createSmartAccountClient.ts +5 -5
- package/clients/decorators/bundler.ts +11 -11
- package/clients/decorators/pimlico.ts +6 -9
- package/clients/decorators/smartAccount.ts +11 -11
- package/clients/decorators/stackup.ts +3 -3
- package/clients/pimlico.ts +3 -3
- package/clients/stackup.ts +3 -3
- package/errors/estimateUserOperationGas.ts +2 -2
- package/errors/index.ts +6 -6
- package/errors/paymaster.ts +1 -1
- package/errors/sendUserOperation.ts +2 -2
- package/index.ts +28 -28
- package/package.json +1 -1
- package/types/bundler.ts +1 -1
- package/types/index.ts +2 -2
- package/types/pimlico.ts +1 -1
- package/types/stackup.ts +1 -1
- package/types/userOperation.ts +1 -1
- package/utils/getUserOperationHash.ts +1 -1
- package/utils/index.ts +11 -9
- package/utils/providerToSmartAccountSigner.ts +24 -0
- package/utils/signUserOperationHashWithECDSA.ts +4 -4
- package/utils/{walletClientToCustomSigner.ts → walletClientToSmartAccountSigner.ts} +2 -2
- package/_cjs/utils/walletClientToCustomSigner.js.map +0 -1
- package/_esm/utils/walletClientToCustomSigner.js.map +0 -1
- package/_types/utils/walletClientToCustomSigner.d.ts +0 -4
- package/_types/utils/walletClientToCustomSigner.d.ts.map +0 -1
package/actions/index.ts
CHANGED
|
@@ -2,34 +2,34 @@ import type {
|
|
|
2
2
|
EstimateUserOperationErrorType,
|
|
3
3
|
EstimateUserOperationGasParameters,
|
|
4
4
|
EstimateUserOperationGasReturnType
|
|
5
|
-
} from "./bundler/estimateUserOperationGas
|
|
6
|
-
import type { GetUserOperationByHashParameters } from "./bundler/getUserOperationByHash
|
|
7
|
-
import type { GetUserOperationByHashReturnType } from "./bundler/getUserOperationByHash
|
|
5
|
+
} from "./bundler/estimateUserOperationGas"
|
|
6
|
+
import type { GetUserOperationByHashParameters } from "./bundler/getUserOperationByHash"
|
|
7
|
+
import type { GetUserOperationByHashReturnType } from "./bundler/getUserOperationByHash"
|
|
8
8
|
import type {
|
|
9
9
|
GetUserOperationReceiptParameters,
|
|
10
10
|
GetUserOperationReceiptReturnType
|
|
11
|
-
} from "./bundler/getUserOperationReceipt
|
|
12
|
-
import type { SendUserOperationParameters } from "./bundler/sendUserOperation
|
|
11
|
+
} from "./bundler/getUserOperationReceipt"
|
|
12
|
+
import type { SendUserOperationParameters } from "./bundler/sendUserOperation"
|
|
13
13
|
|
|
14
|
-
import type { GetSenderAddressParams } from "./public/getSenderAddress
|
|
14
|
+
import type { GetSenderAddressParams } from "./public/getSenderAddress"
|
|
15
15
|
import {
|
|
16
16
|
InvalidEntryPointError,
|
|
17
17
|
getSenderAddress
|
|
18
|
-
} from "./public/getSenderAddress
|
|
18
|
+
} from "./public/getSenderAddress"
|
|
19
19
|
|
|
20
|
-
import { chainId } from "./bundler/chainId
|
|
21
|
-
import { estimateUserOperationGas } from "./bundler/estimateUserOperationGas
|
|
22
|
-
import { getUserOperationByHash } from "./bundler/getUserOperationByHash
|
|
23
|
-
import { getUserOperationReceipt } from "./bundler/getUserOperationReceipt
|
|
24
|
-
import { sendUserOperation } from "./bundler/sendUserOperation
|
|
25
|
-
import { supportedEntryPoints } from "./bundler/supportedEntryPoints
|
|
26
|
-
import { waitForUserOperationReceipt } from "./bundler/waitForUserOperationReceipt
|
|
20
|
+
import { chainId } from "./bundler/chainId"
|
|
21
|
+
import { estimateUserOperationGas } from "./bundler/estimateUserOperationGas"
|
|
22
|
+
import { getUserOperationByHash } from "./bundler/getUserOperationByHash"
|
|
23
|
+
import { getUserOperationReceipt } from "./bundler/getUserOperationReceipt"
|
|
24
|
+
import { sendUserOperation } from "./bundler/sendUserOperation"
|
|
25
|
+
import { supportedEntryPoints } from "./bundler/supportedEntryPoints"
|
|
26
|
+
import { waitForUserOperationReceipt } from "./bundler/waitForUserOperationReceipt"
|
|
27
27
|
import {
|
|
28
28
|
type WaitForUserOperationReceiptParameters,
|
|
29
29
|
WaitForUserOperationReceiptTimeoutError
|
|
30
|
-
} from "./bundler/waitForUserOperationReceipt
|
|
31
|
-
import type { GetAccountNonceParams } from "./public/getAccountNonce
|
|
32
|
-
import { getAccountNonce } from "./public/getAccountNonce
|
|
30
|
+
} from "./bundler/waitForUserOperationReceipt"
|
|
31
|
+
import type { GetAccountNonceParams } from "./public/getAccountNonce"
|
|
32
|
+
import { getAccountNonce } from "./public/getAccountNonce"
|
|
33
33
|
|
|
34
34
|
export type {
|
|
35
35
|
SendUserOperationParameters,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Account, Chain, Client, Transport } from "viem"
|
|
2
|
-
import type { Prettify } from "../../types/
|
|
3
|
-
import type { PimlicoBundlerRpcSchema } from "../../types/pimlico
|
|
2
|
+
import type { Prettify } from "../../types/"
|
|
3
|
+
import type { PimlicoBundlerRpcSchema } from "../../types/pimlico"
|
|
4
4
|
|
|
5
5
|
export type GetUserOperationGasPriceReturnType = {
|
|
6
6
|
slow: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Account, Chain, Client, Hash, Transport } from "viem"
|
|
2
|
-
import type { PimlicoBundlerClient } from "../../clients/pimlico
|
|
3
|
-
import type { Prettify } from "../../types/
|
|
2
|
+
import type { PimlicoBundlerClient } from "../../clients/pimlico"
|
|
3
|
+
import type { Prettify } from "../../types/"
|
|
4
4
|
import type {
|
|
5
5
|
PimlicoBundlerRpcSchema,
|
|
6
6
|
PimlicoUserOperationStatus
|
|
7
|
-
} from "../../types/pimlico
|
|
7
|
+
} from "../../types/pimlico"
|
|
8
8
|
|
|
9
9
|
export type GetUserOperationStatusParameters = {
|
|
10
10
|
hash: Hash
|
|
@@ -7,8 +7,8 @@ import type {
|
|
|
7
7
|
Hex,
|
|
8
8
|
Transport
|
|
9
9
|
} from "viem"
|
|
10
|
-
import type { Prettify } from "../../types/
|
|
11
|
-
import { type PimlicoBundlerRpcSchema } from "../../types/pimlico
|
|
10
|
+
import type { Prettify } from "../../types/"
|
|
11
|
+
import { type PimlicoBundlerRpcSchema } from "../../types/pimlico"
|
|
12
12
|
|
|
13
13
|
export type SendCompressedUserOperationParameters = {
|
|
14
14
|
compressedUserOperation: Hex
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Client, Transport } from "viem"
|
|
2
2
|
import type { PartialBy } from "viem/types/utils"
|
|
3
|
-
import type { Prettify } from "../../types/
|
|
4
|
-
import type { PimlicoPaymasterRpcSchema } from "../../types/pimlico
|
|
3
|
+
import type { Prettify } from "../../types/"
|
|
4
|
+
import type { PimlicoPaymasterRpcSchema } from "../../types/pimlico"
|
|
5
5
|
import type {
|
|
6
6
|
UserOperation,
|
|
7
7
|
UserOperationWithBigIntAsHex
|
|
8
|
-
} from "../../types/userOperation
|
|
9
|
-
import { deepHexlify } from "../../utils/deepHexlify
|
|
8
|
+
} from "../../types/userOperation"
|
|
9
|
+
import { deepHexlify } from "../../utils/deepHexlify"
|
|
10
10
|
|
|
11
11
|
export type PimlicoSponsorUserOperationParameters = {
|
|
12
12
|
userOperation: PartialBy<
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Account, Address, Chain, Client, Transport } from "viem"
|
|
2
|
-
import type { Prettify } from "../../types/
|
|
3
|
-
import type { PimlicoPaymasterRpcSchema } from "../../types/pimlico
|
|
2
|
+
import type { Prettify } from "../../types/"
|
|
3
|
+
import type { PimlicoPaymasterRpcSchema } from "../../types/pimlico"
|
|
4
4
|
import type {
|
|
5
5
|
UserOperation,
|
|
6
6
|
UserOperationWithBigIntAsHex
|
|
7
|
-
} from "../../types/userOperation
|
|
8
|
-
import { deepHexlify } from "../../utils/deepHexlify
|
|
7
|
+
} from "../../types/userOperation"
|
|
8
|
+
import { deepHexlify } from "../../utils/deepHexlify"
|
|
9
9
|
|
|
10
10
|
export type ValidateSponsorshipPoliciesParameters = {
|
|
11
11
|
userOperation: UserOperation
|
package/actions/pimlico.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type GetUserOperationGasPriceReturnType,
|
|
3
3
|
getUserOperationGasPrice
|
|
4
|
-
} from "./pimlico/getUserOperationGasPrice
|
|
4
|
+
} from "./pimlico/getUserOperationGasPrice"
|
|
5
5
|
import {
|
|
6
6
|
type GetUserOperationStatusParameters,
|
|
7
7
|
type GetUserOperationStatusReturnType,
|
|
8
8
|
getUserOperationStatus
|
|
9
|
-
} from "./pimlico/getUserOperationStatus
|
|
9
|
+
} from "./pimlico/getUserOperationStatus"
|
|
10
10
|
import {
|
|
11
11
|
type SendCompressedUserOperationParameters,
|
|
12
12
|
sendCompressedUserOperation
|
|
13
|
-
} from "./pimlico/sendCompressedUserOperation
|
|
13
|
+
} from "./pimlico/sendCompressedUserOperation"
|
|
14
14
|
import {
|
|
15
15
|
type PimlicoSponsorUserOperationParameters,
|
|
16
16
|
type SponsorUserOperationReturnType,
|
|
17
17
|
sponsorUserOperation
|
|
18
|
-
} from "./pimlico/sponsorUserOperation
|
|
18
|
+
} from "./pimlico/sponsorUserOperation"
|
|
19
19
|
|
|
20
20
|
import type {
|
|
21
21
|
PimlicoBundlerActions,
|
|
22
22
|
PimlicoPaymasterClientActions
|
|
23
|
-
} from "../clients/decorators/pimlico
|
|
23
|
+
} from "../clients/decorators/pimlico"
|
|
24
24
|
import {
|
|
25
25
|
pimlicoBundlerActions,
|
|
26
26
|
pimlicoPaymasterActions
|
|
27
|
-
} from "../clients/decorators/pimlico
|
|
27
|
+
} from "../clients/decorators/pimlico"
|
|
28
28
|
|
|
29
29
|
import {
|
|
30
30
|
type ValidateSponsorshipPolicies,
|
|
31
31
|
type ValidateSponsorshipPoliciesParameters,
|
|
32
32
|
validateSponsorshipPolicies
|
|
33
|
-
} from "./pimlico/validateSponsorshipPolicies
|
|
33
|
+
} from "./pimlico/validateSponsorshipPolicies"
|
|
34
34
|
|
|
35
35
|
export type {
|
|
36
36
|
GetUserOperationGasPriceReturnType,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, Chain, Client, Transport } from "viem"
|
|
2
2
|
import { readContract } from "viem/actions"
|
|
3
|
-
import type { Prettify } from "../../types/
|
|
4
|
-
import { getAction } from "../../utils/getAction
|
|
3
|
+
import type { Prettify } from "../../types/"
|
|
4
|
+
import { getAction } from "../../utils/getAction"
|
|
5
5
|
|
|
6
6
|
export type GetAccountNonceParams = {
|
|
7
7
|
sender: Address
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
} from "viem"
|
|
11
11
|
|
|
12
12
|
import { simulateContract } from "viem/actions"
|
|
13
|
-
import type { Prettify } from "../../types/
|
|
14
|
-
import { getAction } from "../../utils/getAction
|
|
13
|
+
import type { Prettify } from "../../types/"
|
|
14
|
+
import { getAction } from "../../utils/getAction"
|
|
15
15
|
|
|
16
16
|
export type GetSenderAddressParams = { initCode: Hex; entryPoint: Address }
|
|
17
17
|
|
|
@@ -7,14 +7,14 @@ import type {
|
|
|
7
7
|
Hash,
|
|
8
8
|
Transport
|
|
9
9
|
} from "viem"
|
|
10
|
-
import type { SmartAccount } from "../../accounts/types
|
|
11
|
-
import type { Prettify } from "../../types/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { AccountOrClientNotFoundError } from "../../utils/signUserOperationHashWithECDSA
|
|
15
|
-
import { waitForUserOperationReceipt } from "../bundler/waitForUserOperationReceipt
|
|
16
|
-
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest
|
|
17
|
-
import { sendUserOperation } from "./sendUserOperation
|
|
10
|
+
import type { SmartAccount } from "../../accounts/types"
|
|
11
|
+
import type { Prettify } from "../../types/"
|
|
12
|
+
import { parseAccount } from "../../utils/"
|
|
13
|
+
import { getAction } from "../../utils/getAction"
|
|
14
|
+
import { AccountOrClientNotFoundError } from "../../utils/signUserOperationHashWithECDSA"
|
|
15
|
+
import { waitForUserOperationReceipt } from "../bundler/waitForUserOperationReceipt"
|
|
16
|
+
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest"
|
|
17
|
+
import { sendUserOperation } from "./sendUserOperation"
|
|
18
18
|
|
|
19
19
|
export type DeployContractParametersWithPaymaster<
|
|
20
20
|
TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[],
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import type { Address, Chain, Client, Transport } from "viem"
|
|
2
2
|
import { estimateFeesPerGas } from "viem/actions"
|
|
3
|
-
import type { SmartAccount } from "../../accounts/types
|
|
4
|
-
import type { StateOverrides } from "../../types/bundler.js"
|
|
3
|
+
import type { SmartAccount } from "../../accounts/types"
|
|
5
4
|
import type {
|
|
6
5
|
GetAccountParameter,
|
|
7
6
|
PartialBy,
|
|
8
7
|
Prettify,
|
|
9
8
|
UserOperation
|
|
10
|
-
} from "../../types/
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "../../utils/index.js"
|
|
16
|
-
import { estimateUserOperationGas } from "../bundler/estimateUserOperationGas.js"
|
|
9
|
+
} from "../../types/"
|
|
10
|
+
import type { StateOverrides } from "../../types/bundler"
|
|
11
|
+
import { AccountOrClientNotFoundError, parseAccount } from "../../utils/"
|
|
12
|
+
import { getAction } from "../../utils/getAction"
|
|
13
|
+
import { estimateUserOperationGas } from "../bundler/estimateUserOperationGas"
|
|
17
14
|
|
|
18
15
|
export type SponsorUserOperationMiddleware = {
|
|
19
16
|
sponsorUserOperation?: (args: {
|
|
@@ -5,16 +5,13 @@ import type {
|
|
|
5
5
|
SendTransactionParameters,
|
|
6
6
|
Transport
|
|
7
7
|
} from "viem"
|
|
8
|
-
import { type SmartAccount } from "../../accounts/types
|
|
9
|
-
import type { Prettify } from "../../types/
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "
|
|
15
|
-
import { waitForUserOperationReceipt } from "../bundler/waitForUserOperationReceipt.js"
|
|
16
|
-
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest.js"
|
|
17
|
-
import { sendUserOperation } from "./sendUserOperation.js"
|
|
8
|
+
import { type SmartAccount } from "../../accounts/types"
|
|
9
|
+
import type { Prettify } from "../../types/"
|
|
10
|
+
import { AccountOrClientNotFoundError, parseAccount } from "../../utils/"
|
|
11
|
+
import { getAction } from "../../utils/getAction"
|
|
12
|
+
import { waitForUserOperationReceipt } from "../bundler/waitForUserOperationReceipt"
|
|
13
|
+
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest"
|
|
14
|
+
import { sendUserOperation } from "./sendUserOperation"
|
|
18
15
|
|
|
19
16
|
export type SendTransactionWithPaymasterParameters<
|
|
20
17
|
TChain extends Chain | undefined = Chain | undefined,
|
|
@@ -7,16 +7,13 @@ import type {
|
|
|
7
7
|
SendTransactionParameters,
|
|
8
8
|
Transport
|
|
9
9
|
} from "viem"
|
|
10
|
-
import { type SmartAccount } from "../../accounts/types
|
|
11
|
-
import type { GetAccountParameter, Prettify } from "../../types/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "
|
|
17
|
-
import { waitForUserOperationReceipt } from "../bundler/waitForUserOperationReceipt.js"
|
|
18
|
-
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest.js"
|
|
19
|
-
import { sendUserOperation } from "./sendUserOperation.js"
|
|
10
|
+
import { type SmartAccount } from "../../accounts/types"
|
|
11
|
+
import type { GetAccountParameter, Prettify } from "../../types/"
|
|
12
|
+
import { AccountOrClientNotFoundError, parseAccount } from "../../utils/"
|
|
13
|
+
import { getAction } from "../../utils/getAction"
|
|
14
|
+
import { waitForUserOperationReceipt } from "../bundler/waitForUserOperationReceipt"
|
|
15
|
+
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest"
|
|
16
|
+
import { sendUserOperation } from "./sendUserOperation"
|
|
20
17
|
|
|
21
18
|
export type SendTransactionsWithPaymasterParameters<
|
|
22
19
|
TAccount extends SmartAccount | undefined = SmartAccount | undefined
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import type { Chain, Client, Hash, Transport } from "viem"
|
|
2
|
-
import type { SmartAccount } from "../../accounts/types
|
|
2
|
+
import type { SmartAccount } from "../../accounts/types"
|
|
3
3
|
import type {
|
|
4
4
|
GetAccountParameter,
|
|
5
5
|
PartialBy,
|
|
6
6
|
Prettify,
|
|
7
7
|
UserOperation
|
|
8
|
-
} from "../../types/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
parseAccount
|
|
13
|
-
} from "../../utils/index.js"
|
|
14
|
-
import { sendUserOperation as sendUserOperationBundler } from "../bundler/sendUserOperation.js"
|
|
8
|
+
} from "../../types/"
|
|
9
|
+
import { AccountOrClientNotFoundError, parseAccount } from "../../utils/"
|
|
10
|
+
import { getAction } from "../../utils/getAction"
|
|
11
|
+
import { sendUserOperation as sendUserOperationBundler } from "../bundler/sendUserOperation"
|
|
15
12
|
import {
|
|
16
13
|
type SponsorUserOperationMiddleware,
|
|
17
14
|
prepareUserOperationRequest
|
|
18
|
-
} from "./prepareUserOperationRequest
|
|
15
|
+
} from "./prepareUserOperationRequest"
|
|
19
16
|
|
|
20
17
|
export type SendUserOperationParameters<
|
|
21
18
|
TAccount extends SmartAccount | undefined = SmartAccount | undefined
|
|
@@ -5,11 +5,8 @@ import type {
|
|
|
5
5
|
SignMessageReturnType,
|
|
6
6
|
Transport
|
|
7
7
|
} from "viem"
|
|
8
|
-
import { type SmartAccount } from "../../accounts/types
|
|
9
|
-
import {
|
|
10
|
-
AccountOrClientNotFoundError,
|
|
11
|
-
parseAccount
|
|
12
|
-
} from "../../utils/index.js"
|
|
8
|
+
import { type SmartAccount } from "../../accounts/types"
|
|
9
|
+
import { AccountOrClientNotFoundError, parseAccount } from "../../utils/"
|
|
13
10
|
|
|
14
11
|
/**
|
|
15
12
|
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
@@ -9,11 +9,8 @@ import {
|
|
|
9
9
|
getTypesForEIP712Domain,
|
|
10
10
|
validateTypedData
|
|
11
11
|
} from "viem"
|
|
12
|
-
import { type SmartAccount } from "../../accounts/types
|
|
13
|
-
import {
|
|
14
|
-
AccountOrClientNotFoundError,
|
|
15
|
-
parseAccount
|
|
16
|
-
} from "../../utils/index.js"
|
|
12
|
+
import { type SmartAccount } from "../../accounts/types"
|
|
13
|
+
import { AccountOrClientNotFoundError, parseAccount } from "../../utils/"
|
|
17
14
|
|
|
18
15
|
/**
|
|
19
16
|
* Signs typed data and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
type WriteContractParameters,
|
|
11
11
|
encodeFunctionData
|
|
12
12
|
} from "viem"
|
|
13
|
-
import { type SmartAccount } from "../../accounts/types
|
|
14
|
-
import { getAction } from "../../utils/getAction
|
|
15
|
-
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest
|
|
13
|
+
import { type SmartAccount } from "../../accounts/types"
|
|
14
|
+
import { getAction } from "../../utils/getAction"
|
|
15
|
+
import { type SponsorUserOperationMiddleware } from "./prepareUserOperationRequest"
|
|
16
16
|
import {
|
|
17
17
|
type SendTransactionWithPaymasterParameters,
|
|
18
18
|
sendTransaction
|
|
19
|
-
} from "./sendTransaction
|
|
19
|
+
} from "./sendTransaction"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Executes a write function on a contract.
|
package/actions/smartAccount.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type DeployContractParametersWithPaymaster,
|
|
3
3
|
deployContract
|
|
4
|
-
} from "./smartAccount/deployContract
|
|
4
|
+
} from "./smartAccount/deployContract"
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
type PrepareUserOperationRequestParameters,
|
|
8
8
|
type PrepareUserOperationRequestReturnType,
|
|
9
9
|
type SponsorUserOperationMiddleware,
|
|
10
10
|
prepareUserOperationRequest
|
|
11
|
-
} from "./smartAccount/prepareUserOperationRequest
|
|
11
|
+
} from "./smartAccount/prepareUserOperationRequest"
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
14
|
type SendTransactionWithPaymasterParameters,
|
|
15
15
|
sendTransaction
|
|
16
|
-
} from "./smartAccount/sendTransaction
|
|
16
|
+
} from "./smartAccount/sendTransaction"
|
|
17
17
|
|
|
18
18
|
import {
|
|
19
19
|
type SendUserOperationParameters,
|
|
20
20
|
sendUserOperation
|
|
21
|
-
} from "./smartAccount/sendUserOperation
|
|
21
|
+
} from "./smartAccount/sendUserOperation"
|
|
22
22
|
|
|
23
|
-
import { signMessage } from "./smartAccount/signMessage
|
|
23
|
+
import { signMessage } from "./smartAccount/signMessage"
|
|
24
24
|
|
|
25
|
-
import { signTypedData } from "./smartAccount/signTypedData
|
|
25
|
+
import { signTypedData } from "./smartAccount/signTypedData"
|
|
26
26
|
|
|
27
27
|
import {
|
|
28
28
|
type SendTransactionsWithPaymasterParameters,
|
|
29
29
|
sendTransactions
|
|
30
|
-
} from "./smartAccount/sendTransactions
|
|
30
|
+
} from "./smartAccount/sendTransactions"
|
|
31
31
|
|
|
32
32
|
import {
|
|
33
33
|
type WriteContractWithPaymasterParameters,
|
|
34
34
|
writeContract
|
|
35
|
-
} from "./smartAccount/writeContract
|
|
35
|
+
} from "./smartAccount/writeContract"
|
|
36
36
|
|
|
37
37
|
export {
|
|
38
38
|
deployContract,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Address } from "viem"
|
|
2
2
|
import type { PartialBy } from "viem/types/utils"
|
|
3
|
-
import { type StackupPaymasterClient } from "../../clients/stackup
|
|
4
|
-
import type { StackupPaymasterContext } from "../../types/stackup
|
|
3
|
+
import { type StackupPaymasterClient } from "../../clients/stackup"
|
|
4
|
+
import type { StackupPaymasterContext } from "../../types/stackup"
|
|
5
5
|
import type {
|
|
6
6
|
UserOperation,
|
|
7
7
|
UserOperationWithBigIntAsHex
|
|
8
|
-
} from "../../types/userOperation
|
|
9
|
-
import { deepHexlify } from "../../utils/deepHexlify
|
|
8
|
+
} from "../../types/userOperation"
|
|
9
|
+
import { deepHexlify } from "../../utils/deepHexlify"
|
|
10
10
|
|
|
11
11
|
export type SponsorUserOperationParameters = {
|
|
12
12
|
userOperation: PartialBy<
|
package/actions/stackup.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { StackupPaymasterClientActions } from "../clients/decorators/stackup
|
|
2
|
-
import { stackupPaymasterActions } from "../clients/decorators/stackup
|
|
3
|
-
import { type AccountsParameters, accounts } from "./stackup/accounts
|
|
1
|
+
import type { StackupPaymasterClientActions } from "../clients/decorators/stackup"
|
|
2
|
+
import { stackupPaymasterActions } from "../clients/decorators/stackup"
|
|
3
|
+
import { type AccountsParameters, accounts } from "./stackup/accounts"
|
|
4
4
|
import {
|
|
5
5
|
type SponsorUserOperationParameters,
|
|
6
6
|
type SponsorUserOperationReturnType,
|
|
7
7
|
sponsorUserOperation
|
|
8
|
-
} from "./stackup/sponsorUserOperation
|
|
8
|
+
} from "./stackup/sponsorUserOperation"
|
|
9
9
|
|
|
10
10
|
export type {
|
|
11
11
|
SponsorUserOperationParameters,
|
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
Transport
|
|
7
7
|
} from "viem"
|
|
8
8
|
import { createClient } from "viem"
|
|
9
|
-
import type { BundlerRpcSchema } from "../types/bundler
|
|
10
|
-
import { type BundlerActions, bundlerActions } from "./decorators/bundler
|
|
9
|
+
import type { BundlerRpcSchema } from "../types/bundler"
|
|
10
|
+
import { type BundlerActions, bundlerActions } from "./decorators/bundler"
|
|
11
11
|
|
|
12
12
|
export type BundlerClient<
|
|
13
13
|
TChain extends Chain | undefined = Chain | undefined
|
|
@@ -6,14 +6,14 @@ import type {
|
|
|
6
6
|
WalletClientConfig
|
|
7
7
|
} from "viem"
|
|
8
8
|
import { createClient } from "viem"
|
|
9
|
-
import { type SmartAccount } from "../accounts/types
|
|
10
|
-
import { type SponsorUserOperationMiddleware } from "../actions/smartAccount/prepareUserOperationRequest
|
|
11
|
-
import {
|
|
12
|
-
import type
|
|
9
|
+
import { type SmartAccount } from "../accounts/types"
|
|
10
|
+
import { type SponsorUserOperationMiddleware } from "../actions/smartAccount/prepareUserOperationRequest"
|
|
11
|
+
import type { Prettify } from "../types/"
|
|
12
|
+
import { type BundlerRpcSchema } from "../types/bundler"
|
|
13
13
|
import {
|
|
14
14
|
type SmartAccountActions,
|
|
15
15
|
smartAccountActions
|
|
16
|
-
} from "./decorators/smartAccount
|
|
16
|
+
} from "./decorators/smartAccount"
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* TODO:
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import type { Address } from "
|
|
1
|
+
import type { Address } from "viem"
|
|
2
2
|
import type { Client, Hash } from "viem"
|
|
3
|
-
import { chainId } from "../../actions/bundler/chainId
|
|
3
|
+
import { chainId } from "../../actions/bundler/chainId"
|
|
4
4
|
import {
|
|
5
5
|
type EstimateUserOperationGasParameters,
|
|
6
6
|
type EstimateUserOperationGasReturnType,
|
|
7
7
|
estimateUserOperationGas
|
|
8
|
-
} from "../../actions/bundler/estimateUserOperationGas
|
|
8
|
+
} from "../../actions/bundler/estimateUserOperationGas"
|
|
9
9
|
import {
|
|
10
10
|
type GetUserOperationByHashParameters,
|
|
11
11
|
type GetUserOperationByHashReturnType,
|
|
12
12
|
getUserOperationByHash
|
|
13
|
-
} from "../../actions/bundler/getUserOperationByHash
|
|
13
|
+
} from "../../actions/bundler/getUserOperationByHash"
|
|
14
14
|
import {
|
|
15
15
|
type GetUserOperationReceiptParameters,
|
|
16
16
|
type GetUserOperationReceiptReturnType,
|
|
17
17
|
getUserOperationReceipt
|
|
18
|
-
} from "../../actions/bundler/getUserOperationReceipt
|
|
18
|
+
} from "../../actions/bundler/getUserOperationReceipt"
|
|
19
19
|
import {
|
|
20
20
|
type SendUserOperationParameters,
|
|
21
21
|
sendUserOperation
|
|
22
|
-
} from "../../actions/bundler/sendUserOperation
|
|
23
|
-
import { supportedEntryPoints } from "../../actions/bundler/supportedEntryPoints
|
|
22
|
+
} from "../../actions/bundler/sendUserOperation"
|
|
23
|
+
import { supportedEntryPoints } from "../../actions/bundler/supportedEntryPoints"
|
|
24
24
|
import {
|
|
25
25
|
type WaitForUserOperationReceiptParameters,
|
|
26
26
|
waitForUserOperationReceipt
|
|
27
|
-
} from "../../actions/bundler/waitForUserOperationReceipt
|
|
28
|
-
import type {
|
|
29
|
-
import type {
|
|
30
|
-
import type { BundlerClient } from "../createBundlerClient
|
|
27
|
+
} from "../../actions/bundler/waitForUserOperationReceipt"
|
|
28
|
+
import type { Prettify } from "../../types/"
|
|
29
|
+
import type { StateOverrides } from "../../types/bundler"
|
|
30
|
+
import type { BundlerClient } from "../createBundlerClient"
|
|
31
31
|
|
|
32
32
|
export type BundlerActions = {
|
|
33
33
|
/**
|
|
@@ -5,26 +5,23 @@ import {
|
|
|
5
5
|
type ValidateSponsorshipPoliciesParameters,
|
|
6
6
|
sendCompressedUserOperation,
|
|
7
7
|
validateSponsorshipPolicies
|
|
8
|
-
} from "../../actions/pimlico
|
|
8
|
+
} from "../../actions/pimlico"
|
|
9
9
|
import {
|
|
10
10
|
type GetUserOperationGasPriceReturnType,
|
|
11
11
|
getUserOperationGasPrice
|
|
12
|
-
} from "../../actions/pimlico/getUserOperationGasPrice
|
|
12
|
+
} from "../../actions/pimlico/getUserOperationGasPrice"
|
|
13
13
|
import {
|
|
14
14
|
type GetUserOperationStatusParameters,
|
|
15
15
|
type GetUserOperationStatusReturnType,
|
|
16
16
|
getUserOperationStatus
|
|
17
|
-
} from "../../actions/pimlico/getUserOperationStatus
|
|
17
|
+
} from "../../actions/pimlico/getUserOperationStatus"
|
|
18
18
|
import {
|
|
19
19
|
type PimlicoSponsorUserOperationParameters,
|
|
20
20
|
type SponsorUserOperationReturnType,
|
|
21
21
|
sponsorUserOperation
|
|
22
|
-
} from "../../actions/pimlico/sponsorUserOperation
|
|
23
|
-
import type { Prettify } from "../../types/
|
|
24
|
-
import type {
|
|
25
|
-
PimlicoBundlerClient,
|
|
26
|
-
PimlicoPaymasterClient
|
|
27
|
-
} from "../pimlico.js"
|
|
22
|
+
} from "../../actions/pimlico/sponsorUserOperation"
|
|
23
|
+
import type { Prettify } from "../../types/"
|
|
24
|
+
import type { PimlicoBundlerClient, PimlicoPaymasterClient } from "../pimlico"
|
|
28
25
|
|
|
29
26
|
export type PimlicoBundlerActions = {
|
|
30
27
|
/**
|
|
@@ -11,36 +11,36 @@ import type {
|
|
|
11
11
|
TypedData,
|
|
12
12
|
WriteContractParameters
|
|
13
13
|
} from "viem"
|
|
14
|
-
import type { SmartAccount } from "../../accounts/types
|
|
14
|
+
import type { SmartAccount } from "../../accounts/types"
|
|
15
15
|
import {
|
|
16
16
|
type SendTransactionsWithPaymasterParameters,
|
|
17
17
|
sendTransactions
|
|
18
|
-
} from "../../actions/smartAccount
|
|
18
|
+
} from "../../actions/smartAccount"
|
|
19
19
|
import {
|
|
20
20
|
type DeployContractParametersWithPaymaster,
|
|
21
21
|
deployContract
|
|
22
|
-
} from "../../actions/smartAccount/deployContract
|
|
22
|
+
} from "../../actions/smartAccount/deployContract"
|
|
23
23
|
import {
|
|
24
24
|
type PrepareUserOperationRequestReturnType,
|
|
25
25
|
type SponsorUserOperationMiddleware,
|
|
26
26
|
prepareUserOperationRequest
|
|
27
|
-
} from "../../actions/smartAccount/prepareUserOperationRequest
|
|
27
|
+
} from "../../actions/smartAccount/prepareUserOperationRequest"
|
|
28
28
|
import {
|
|
29
29
|
type SendTransactionWithPaymasterParameters,
|
|
30
30
|
sendTransaction
|
|
31
|
-
} from "../../actions/smartAccount/sendTransaction
|
|
31
|
+
} from "../../actions/smartAccount/sendTransaction"
|
|
32
32
|
import {
|
|
33
33
|
type SendUserOperationParameters,
|
|
34
34
|
sendUserOperation
|
|
35
|
-
} from "../../actions/smartAccount/sendUserOperation
|
|
36
|
-
import { signMessage } from "../../actions/smartAccount/signMessage
|
|
37
|
-
import { signTypedData } from "../../actions/smartAccount/signTypedData
|
|
35
|
+
} from "../../actions/smartAccount/sendUserOperation"
|
|
36
|
+
import { signMessage } from "../../actions/smartAccount/signMessage"
|
|
37
|
+
import { signTypedData } from "../../actions/smartAccount/signTypedData"
|
|
38
38
|
import {
|
|
39
39
|
type WriteContractWithPaymasterParameters,
|
|
40
40
|
writeContract
|
|
41
|
-
} from "../../actions/smartAccount/writeContract
|
|
42
|
-
import type {
|
|
43
|
-
import type {
|
|
41
|
+
} from "../../actions/smartAccount/writeContract"
|
|
42
|
+
import type { Prettify } from "../../types/"
|
|
43
|
+
import type { StateOverrides } from "../../types/bundler"
|
|
44
44
|
|
|
45
45
|
export type SmartAccountActions<
|
|
46
46
|
TChain extends Chain | undefined = Chain | undefined,
|