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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../types/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAEnE,MAAM,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../types/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC9C,OAAO,KAAK,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QACd,iBAAiB,EAAE,GAAG,CAAA;KACzB,CAAA;IACD,IAAI,EAAE;QACF,IAAI,EAAE,GAAG,CAAA;QACT,WAAW,EAAE,GAAG,CAAA;QAChB,SAAS,EAAE,IAAI,CAAA;QACf,eAAe,EAAE,IAAI,CAAA;QACrB,QAAQ,EAAE,GAAG,CAAA;QACb,gBAAgB,EAAE,GAAG,CAAA;QACrB,OAAO,EAAE,OAAO,CAAA;QAChB,MAAM,EAAE,GAAG,EAAE,CAAA;KAChB,EAAE,CAAA;CACN,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,CAAC,CAAC,EAAE,MAAM,GAAG;QACT,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;QACnC,IAAI,CAAC,EAAE,GAAG,GAAG,SAAS,CAAA;QACtB,KAAK,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAA;SAChB,CAAA;QACD,SAAS,CAAC,EAAE;YACR,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAA;SAChB,CAAA;KACJ,CAAA;CACJ,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type EntryPointVersion = "v0.6" | "v0.7";
|
|
2
|
+
export type ENTRYPOINT_ADDRESS_V06_TYPE = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
|
|
3
|
+
export type ENTRYPOINT_ADDRESS_V07_TYPE = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
4
|
+
export type GetEntryPointVersion<entryPoint extends EntryPoint> = entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? "v0.6" : "v0.7";
|
|
5
|
+
export type EntryPoint = ENTRYPOINT_ADDRESS_V06_TYPE | ENTRYPOINT_ADDRESS_V07_TYPE;
|
|
6
|
+
//# sourceMappingURL=entrypoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../types/entrypoint.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAA;AAE/C,MAAM,MAAM,2BAA2B,GACnC,4CAA4C,CAAA;AAChD,MAAM,MAAM,2BAA2B,GACnC,4CAA4C,CAAA;AAEhD,MAAM,MAAM,oBAAoB,CAAC,UAAU,SAAS,UAAU,IAC1D,UAAU,SAAS,2BAA2B,GAAG,MAAM,GAAG,MAAM,CAAA;AAEpE,MAAM,MAAM,UAAU,GAChB,2BAA2B,GAC3B,2BAA2B,CAAA"}
|
package/_types/types/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Account, Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { IsUndefined } from "viem/types/utils";
|
|
2
3
|
import type { SmartAccount } from "../accounts/types";
|
|
4
|
+
import type { EntryPoint } from "./entrypoint";
|
|
3
5
|
import type { UserOperation } from "./userOperation";
|
|
4
6
|
export type { UserOperation };
|
|
5
|
-
export type
|
|
7
|
+
export type { EntryPointVersion, ENTRYPOINT_ADDRESS_V06_TYPE, ENTRYPOINT_ADDRESS_V07_TYPE, GetEntryPointVersion, EntryPoint } from "./entrypoint";
|
|
6
8
|
export type GetAccountParameterWithClient<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined> = IsUndefined<TAccount> extends true ? {
|
|
7
9
|
account: Account;
|
|
8
10
|
client?: Client<TTransport, TChain, TAccount>;
|
|
@@ -10,10 +12,10 @@ export type GetAccountParameterWithClient<TTransport extends Transport = Transpo
|
|
|
10
12
|
client: Client<TTransport, TChain, TAccount>;
|
|
11
13
|
account?: Account;
|
|
12
14
|
};
|
|
13
|
-
export type GetAccountParameter<TAccount extends SmartAccount | undefined = SmartAccount | undefined> = IsUndefined<TAccount> extends true ? {
|
|
14
|
-
account: SmartAccount
|
|
15
|
+
export type GetAccountParameter<entryPoint extends EntryPoint, TAccount extends SmartAccount<entryPoint> | undefined = SmartAccount<entryPoint> | undefined> = IsUndefined<TAccount> extends true ? {
|
|
16
|
+
account: SmartAccount<entryPoint>;
|
|
15
17
|
} : {
|
|
16
|
-
account?: SmartAccount
|
|
18
|
+
account?: SmartAccount<entryPoint>;
|
|
17
19
|
};
|
|
18
20
|
export type Prettify<T> = {
|
|
19
21
|
[K in keyof T]: T[K];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,YAAY,EAAE,aAAa,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,YAAY,EAAE,aAAa,EAAE,CAAA;AAC7B,YAAY,EACR,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,UAAU,EACb,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,6BAA6B,CACrC,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAA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, 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
5
|
type PimlicoUserOperationGasPriceWithBigIntAsHex = {
|
|
5
6
|
slow: {
|
|
@@ -40,28 +41,41 @@ export type PimlicoBundlerRpcSchema = [
|
|
|
40
41
|
ReturnType: Hash;
|
|
41
42
|
}
|
|
42
43
|
];
|
|
43
|
-
export type PimlicoPaymasterRpcSchema = [
|
|
44
|
+
export type PimlicoPaymasterRpcSchema<entryPoint extends EntryPoint> = [
|
|
44
45
|
{
|
|
45
46
|
Method: "pm_sponsorUserOperation";
|
|
46
47
|
Parameters: [
|
|
47
|
-
userOperation: PartialBy<UserOperationWithBigIntAsHex
|
|
48
|
-
entryPoint:
|
|
48
|
+
userOperation: GetEntryPointVersion<entryPoint> extends "v0.6" ? PartialBy<UserOperationWithBigIntAsHex<"v0.6">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<UserOperationWithBigIntAsHex<"v0.7">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">,
|
|
49
|
+
entryPoint: entryPoint,
|
|
49
50
|
metadata?: {
|
|
50
51
|
sponsorshipPolicyId?: string;
|
|
51
52
|
}
|
|
52
53
|
];
|
|
53
|
-
ReturnType: {
|
|
54
|
+
ReturnType: GetEntryPointVersion<entryPoint> extends "v0.6" ? {
|
|
54
55
|
paymasterAndData: Hex;
|
|
55
56
|
preVerificationGas: Hex;
|
|
56
57
|
verificationGasLimit: Hex;
|
|
57
58
|
callGasLimit: Hex;
|
|
59
|
+
paymaster?: never;
|
|
60
|
+
paymasterVerificationGasLimit?: never;
|
|
61
|
+
paymasterPostOpGasLimit?: never;
|
|
62
|
+
paymasterData?: never;
|
|
63
|
+
} : {
|
|
64
|
+
preVerificationGas: Hex;
|
|
65
|
+
verificationGasLimit: Hex;
|
|
66
|
+
callGasLimit: Hex;
|
|
67
|
+
paymaster: Address;
|
|
68
|
+
paymasterVerificationGasLimit: Hex;
|
|
69
|
+
paymasterPostOpGasLimit: Hex;
|
|
70
|
+
paymasterData: Hex;
|
|
71
|
+
paymasterAndData?: never;
|
|
58
72
|
};
|
|
59
73
|
},
|
|
60
74
|
{
|
|
61
75
|
Method: "pm_validateSponsorshipPolicies";
|
|
62
76
|
Parameters: [
|
|
63
|
-
userOperation: UserOperationWithBigIntAsHex
|
|
64
|
-
entryPoint:
|
|
77
|
+
userOperation: UserOperationWithBigIntAsHex<GetEntryPointVersion<entryPoint>>,
|
|
78
|
+
entryPoint: entryPoint,
|
|
65
79
|
sponsorshipPolicyIds: string[]
|
|
66
80
|
];
|
|
67
81
|
ReturnType: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../types/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAEnE,KAAK,2CAA2C,GAAG;IAC/C,IAAI,EAAE;QACF,YAAY,EAAE,GAAG,CAAA;QACjB,oBAAoB,EAAE,GAAG,CAAA;KAC5B,CAAA;IACD,QAAQ,EAAE;QACN,YAAY,EAAE,GAAG,CAAA;QACjB,oBAAoB,EAAE,GAAG,CAAA;KAC5B,CAAA;IACD,IAAI,EAAE;QACF,YAAY,EAAE,GAAG,CAAA;QACjB,oBAAoB,EAAE,GAAG,CAAA;KAC5B,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACrC,MAAM,EACA,WAAW,GACX,eAAe,GACf,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAA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vB,oBAAoB,EAAE,GAAG,CAAA;YACzB,YAAY,EAAE,GAAG,CAAA;YACjB,SAAS,CAAC,EAAE,KAAK,CAAA;YACjB,6BAA6B,CAAC,EAAE,KAAK,CAAA;YACrC,uBAAuB,CAAC,EAAE,KAAK,CAAA;YAC/B,aAAa,CAAC,EAAE,KAAK,CAAA;SACxB,GACD;YACI,kBAAkB,EAAE,GAAG,CAAA;YACvB,oBAAoB,EAAE,GAAG,CAAA;YACzB,YAAY,EAAE,GAAG,CAAA;YACjB,SAAS,EAAE,OAAO,CAAA;YAClB,6BAA6B,EAAE,GAAG,CAAA;YAClC,uBAAuB,EAAE,GAAG,CAAA;YAC5B,aAAa,EAAE,GAAG,CAAA;YAClB,gBAAgB,CAAC,EAAE,KAAK,CAAA;SAC3B,CAAA;KACV;IACD;QACI,MAAM,EAAE,gCAAgC,CAAA;QACxC,UAAU,EAAE;YACR,aAAa,EAAE,4BAA4B,CACvC,oBAAoB,CAAC,UAAU,CAAC,CACnC;YACD,UAAU,EAAE,UAAU;YACtB,oBAAoB,EAAE,MAAM,EAAE;SACjC,CAAA;QACD,UAAU,EAAE;YACR,mBAAmB,EAAE,MAAM,CAAA;YAC3B,IAAI,EAAE;gBACF,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;gBACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;gBACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;gBACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;aAC7B,CAAA;SACJ,EAAE,CAAA;KACN;CACJ,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Address, Hex } from "viem";
|
|
2
2
|
import type { PartialBy } from "viem/types/utils";
|
|
3
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE, EntryPoint } from "./entrypoint";
|
|
3
4
|
import type { UserOperationWithBigIntAsHex } from "./userOperation";
|
|
4
5
|
interface StackupPaymasterContextType {
|
|
5
6
|
type: "erc20token" | "payg";
|
|
@@ -10,19 +11,32 @@ export type StackupPaymasterContext = (StackupPaymasterContextType & {
|
|
|
10
11
|
}) | (StackupPaymasterContextType & {
|
|
11
12
|
type: "payg";
|
|
12
13
|
});
|
|
13
|
-
export type StackupPaymasterRpcSchema = [
|
|
14
|
+
export type StackupPaymasterRpcSchema<entryPoint extends EntryPoint> = [
|
|
14
15
|
{
|
|
15
16
|
Method: "pm_sponsorUserOperation";
|
|
16
17
|
Parameters: [
|
|
17
|
-
userOperation: PartialBy<UserOperationWithBigIntAsHex
|
|
18
|
-
entryPoint:
|
|
18
|
+
userOperation: entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? PartialBy<UserOperationWithBigIntAsHex<"v0.6">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<UserOperationWithBigIntAsHex<"v0.7">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">,
|
|
19
|
+
entryPoint: entryPoint,
|
|
19
20
|
context: StackupPaymasterContext
|
|
20
21
|
];
|
|
21
|
-
ReturnType: {
|
|
22
|
+
ReturnType: entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? {
|
|
22
23
|
paymasterAndData: Hex;
|
|
23
24
|
preVerificationGas: Hex;
|
|
24
25
|
verificationGasLimit: Hex;
|
|
25
26
|
callGasLimit: Hex;
|
|
27
|
+
paymaster?: never;
|
|
28
|
+
paymasterVerificationGasLimit?: never;
|
|
29
|
+
paymasterPostOpGasLimit?: never;
|
|
30
|
+
paymasterData?: never;
|
|
31
|
+
} : {
|
|
32
|
+
preVerificationGas: Hex;
|
|
33
|
+
verificationGasLimit: Hex;
|
|
34
|
+
callGasLimit: Hex;
|
|
35
|
+
paymaster: Address;
|
|
36
|
+
paymasterVerificationGasLimit: Hex;
|
|
37
|
+
paymasterPostOpGasLimit: Hex;
|
|
38
|
+
paymasterData: Hex;
|
|
39
|
+
paymasterAndData?: never;
|
|
26
40
|
};
|
|
27
41
|
},
|
|
28
42
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackup.d.ts","sourceRoot":"","sources":["../../types/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAEnE,UAAU,2BAA2B;IACjC,IAAI,EAAE,YAAY,GAAG,MAAM,CAAA;CAC9B;AAED,MAAM,MAAM,uBAAuB,GAC7B,CAAC,2BAA2B,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GACrE,CAAC,2BAA2B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEtD,MAAM,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"stackup.d.ts","sourceRoot":"","sources":["../../types/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAEnE,UAAU,2BAA2B;IACjC,IAAI,EAAE,YAAY,GAAG,MAAM,CAAA;CAC9B;AAED,MAAM,MAAM,uBAAuB,GAC7B,CAAC,2BAA2B,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GACrE,CAAC,2BAA2B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEtD,MAAM,MAAM,y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
|
|
3
|
+
import type { EntryPointVersion } from "./entrypoint";
|
|
3
4
|
export type TStatus = "success" | "reverted";
|
|
4
|
-
export type UserOperationWithBigIntAsHex = {
|
|
5
|
+
export type UserOperationWithBigIntAsHex<entryPointVersion extends EntryPointVersion> = entryPointVersion extends "v0.6" ? {
|
|
5
6
|
sender: Address;
|
|
6
7
|
nonce: Hex;
|
|
7
8
|
initCode: Hex;
|
|
@@ -13,8 +14,32 @@ export type UserOperationWithBigIntAsHex = {
|
|
|
13
14
|
maxPriorityFeePerGas: Hex;
|
|
14
15
|
paymasterAndData: Hex;
|
|
15
16
|
signature: Hex;
|
|
17
|
+
factory?: never;
|
|
18
|
+
factoryData?: never;
|
|
19
|
+
paymaster?: never;
|
|
20
|
+
paymasterVerificationGasLimit?: never;
|
|
21
|
+
paymasterPostOpGasLimit?: never;
|
|
22
|
+
paymasterData?: never;
|
|
23
|
+
} : {
|
|
24
|
+
sender: Address;
|
|
25
|
+
nonce: Hex;
|
|
26
|
+
factory: Address;
|
|
27
|
+
factoryData: Hex;
|
|
28
|
+
callData: Hex;
|
|
29
|
+
callGasLimit: Hex;
|
|
30
|
+
verificationGasLimit: Hex;
|
|
31
|
+
preVerificationGas: Hex;
|
|
32
|
+
maxFeePerGas: Hex;
|
|
33
|
+
maxPriorityFeePerGas: Hex;
|
|
34
|
+
paymaster: Address;
|
|
35
|
+
paymasterVerificationGasLimit: Hex;
|
|
36
|
+
paymasterPostOpGasLimit: Hex;
|
|
37
|
+
paymasterData: Hex;
|
|
38
|
+
signature: Hex;
|
|
39
|
+
initCode?: never;
|
|
40
|
+
paymasterAndData?: never;
|
|
16
41
|
};
|
|
17
|
-
export type UserOperation = {
|
|
42
|
+
export type UserOperation<entryPointVersion extends EntryPointVersion> = entryPointVersion extends "v0.6" ? {
|
|
18
43
|
sender: Address;
|
|
19
44
|
nonce: bigint;
|
|
20
45
|
initCode: Hex;
|
|
@@ -26,5 +51,29 @@ export type UserOperation = {
|
|
|
26
51
|
maxPriorityFeePerGas: bigint;
|
|
27
52
|
paymasterAndData: Hex;
|
|
28
53
|
signature: Hex;
|
|
54
|
+
factory?: never;
|
|
55
|
+
factoryData?: never;
|
|
56
|
+
paymaster?: never;
|
|
57
|
+
paymasterVerificationGasLimit?: never;
|
|
58
|
+
paymasterPostOpGasLimit?: never;
|
|
59
|
+
paymasterData?: never;
|
|
60
|
+
} : {
|
|
61
|
+
sender: Address;
|
|
62
|
+
nonce: bigint;
|
|
63
|
+
factory: Address | undefined;
|
|
64
|
+
factoryData: Hex | undefined;
|
|
65
|
+
callData: Hex;
|
|
66
|
+
callGasLimit: bigint;
|
|
67
|
+
verificationGasLimit: bigint;
|
|
68
|
+
preVerificationGas: bigint;
|
|
69
|
+
maxFeePerGas: bigint;
|
|
70
|
+
maxPriorityFeePerGas: bigint;
|
|
71
|
+
paymaster: Address | undefined;
|
|
72
|
+
paymasterVerificationGasLimit: bigint | undefined;
|
|
73
|
+
paymasterPostOpGasLimit: bigint | undefined;
|
|
74
|
+
paymasterData: Hex | undefined;
|
|
75
|
+
signature: Hex;
|
|
76
|
+
initCode?: never;
|
|
77
|
+
paymasterAndData?: never;
|
|
29
78
|
};
|
|
30
79
|
//# sourceMappingURL=userOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userOperation.d.ts","sourceRoot":"","sources":["../../types/userOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"userOperation.d.ts","sourceRoot":"","sources":["../../types/userOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD,M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,CAAC,EAAE,KAAK,CAAA;IAChB,gBAAgB,CAAC,EAAE,KAAK,CAAA;CAC3B,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Address, BaseError, type ExecutionRevertedErrorType, UnknownNodeError, type UnknownNodeErrorType } from "viem";
|
|
2
2
|
import { type InitCodeDidNotDeploySenderErrorType, type InitCodeRevertedErrorType, type InvalidSmartAccountNonceErrorType, type SenderAddressMismatchErrorType, type SenderAlreadyDeployedErrorType, type SenderNotDeployedErrorType, type SmartAccountInsufficientFundsErrorType, type SmartAccountSignatureValidityPeriodErrorType, type SmartAccountValidationRevertedErrorType } from "../../errors/account";
|
|
3
3
|
import { type PaymasterDataRejectedErrorType, type PaymasterDepositTooLowErrorType, type PaymasterNotDeployedErrorType, type PaymasterValidationRevertedErrorType, type PaymasterValidityPeriodErrorType } from "../../errors/paymaster";
|
|
4
|
-
import type { UserOperation } from "../../types";
|
|
5
|
-
export type GetBundlerErrorParameters = {
|
|
6
|
-
userOperation: Partial<UserOperation
|
|
4
|
+
import type { EntryPoint, GetEntryPointVersion, UserOperation } from "../../types";
|
|
5
|
+
export type GetBundlerErrorParameters<entryPoint extends EntryPoint> = {
|
|
6
|
+
userOperation: Partial<UserOperation<GetEntryPointVersion<entryPoint>>>;
|
|
7
7
|
entryPoint: Address;
|
|
8
8
|
};
|
|
9
9
|
export type GetBundlerErrorReturnType = ExecutionRevertedErrorType | UnknownNodeErrorType | SenderAlreadyDeployedErrorType | InitCodeRevertedErrorType | SenderAddressMismatchErrorType | InitCodeDidNotDeploySenderErrorType | SenderNotDeployedErrorType | SmartAccountInsufficientFundsErrorType | SmartAccountSignatureValidityPeriodErrorType | SmartAccountValidationRevertedErrorType | InvalidSmartAccountNonceErrorType | PaymasterNotDeployedErrorType | PaymasterDepositTooLowErrorType | PaymasterValidityPeriodErrorType | PaymasterValidationRevertedErrorType | PaymasterDataRejectedErrorType;
|
|
10
|
-
export declare function getBundlerError(err: BaseError, args: GetBundlerErrorParameters): UnknownNodeError;
|
|
10
|
+
export declare function getBundlerError<entryPoint extends EntryPoint>(err: BaseError, args: GetBundlerErrorParameters<entryPoint>): UnknownNodeError;
|
|
11
11
|
//# sourceMappingURL=getBundlerError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBundlerError.d.ts","sourceRoot":"","sources":["../../../utils/errors/getBundlerError.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,SAAS,EAET,KAAK,0BAA0B,EAC/B,gBAAgB,EAChB,KAAK,oBAAoB,EAC5B,MAAM,MAAM,CAAA;AAEb,OAAO,EAEH,KAAK,mCAAmC,EAExC,KAAK,yBAAyB,EAE9B,KAAK,iCAAiC,EAEtC,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EAEnC,KAAK,0BAA0B,EAE/B,KAAK,sCAAsC,EAE3C,KAAK,4CAA4C,EAEjD,KAAK,uCAAuC,EAC/C,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEH,KAAK,8BAA8B,EAEnC,KAAK,+BAA+B,EAEpC,KAAK,6BAA6B,EAElC,KAAK,oCAAoC,EAEzC,KAAK,gCAAgC,EACxC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"getBundlerError.d.ts","sourceRoot":"","sources":["../../../utils/errors/getBundlerError.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,SAAS,EAET,KAAK,0BAA0B,EAC/B,gBAAgB,EAChB,KAAK,oBAAoB,EAC5B,MAAM,MAAM,CAAA;AAEb,OAAO,EAEH,KAAK,mCAAmC,EAExC,KAAK,yBAAyB,EAE9B,KAAK,iCAAiC,EAEtC,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EAEnC,KAAK,0BAA0B,EAE/B,KAAK,sCAAsC,EAE3C,KAAK,4CAA4C,EAEjD,KAAK,uCAAuC,EAC/C,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEH,KAAK,8BAA8B,EAEnC,KAAK,+BAA+B,EAEpC,KAAK,6BAA6B,EAElC,KAAK,oCAAoC,EAEzC,KAAK,gCAAgC,EACxC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EACR,UAAU,EACV,oBAAoB,EACpB,aAAa,EAChB,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,yBAAyB,CAAC,UAAU,SAAS,UAAU,IAAI;IACnE,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IACvE,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAC/B,0BAA0B,GAC1B,oBAAoB,GACpB,8BAA8B,GAC9B,yBAAyB,GACzB,8BAA8B,GAC9B,mCAAmC,GACnC,0BAA0B,GAC1B,sCAAsC,GACtC,4CAA4C,GAC5C,uCAAuC,GACvC,iCAAiC,GACjC,6BAA6B,GAC7B,+BAA+B,GAC/B,gCAAgC,GAChC,oCAAoC,GACpC,8BAA8B,CAAA;AAEpC,wBAAgB,eAAe,CAAC,UAAU,SAAS,UAAU,EACzD,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,yBAAyB,CAAC,UAAU,CAAC,oBAwJ9C"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { EstimateUserOperationGasParameters } from "../../actions/bundler/estimateUserOperationGas";
|
|
2
2
|
import { type EstimateUserOperationGasErrorType } from "../../errors/estimateUserOperationGas";
|
|
3
3
|
import { type ErrorType } from "../../errors/utils";
|
|
4
|
+
import type { EntryPoint } from "../../types/entrypoint";
|
|
4
5
|
import { type GetBundlerErrorReturnType } from "./getBundlerError";
|
|
5
|
-
export type GetEstimateUserOperationGasErrorReturnType<cause = ErrorType> = Omit<EstimateUserOperationGasErrorType
|
|
6
|
+
export type GetEstimateUserOperationGasErrorReturnType<entryPoint extends EntryPoint, cause = ErrorType> = Omit<EstimateUserOperationGasErrorType<entryPoint>, "cause"> & {
|
|
6
7
|
cause: cause | GetBundlerErrorReturnType;
|
|
7
8
|
};
|
|
8
|
-
export declare function getEstimateUserOperationGasError<err extends ErrorType<string
|
|
9
|
+
export declare function getEstimateUserOperationGasError<err extends ErrorType<string>, entryPoint extends EntryPoint>(error: err, args: EstimateUserOperationGasParameters<entryPoint>): void;
|
|
9
10
|
//# sourceMappingURL=getEstimateUserOperationGasError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEstimateUserOperationGasError.d.ts","sourceRoot":"","sources":["../../../utils/errors/getEstimateUserOperationGasError.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAA;AACxG,OAAO,EAEH,KAAK,iCAAiC,EACzC,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAEH,KAAK,yBAAyB,EAEjC,MAAM,mBAAmB,CAAA;AAE1B,MAAM,MAAM,0CAA0C,
|
|
1
|
+
{"version":3,"file":"getEstimateUserOperationGasError.d.ts","sourceRoot":"","sources":["../../../utils/errors/getEstimateUserOperationGasError.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAA;AACxG,OAAO,EAEH,KAAK,iCAAiC,EACzC,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAEH,KAAK,yBAAyB,EAEjC,MAAM,mBAAmB,CAAA;AAE1B,MAAM,MAAM,0CAA0C,CAClD,UAAU,SAAS,UAAU,EAC7B,KAAK,GAAG,SAAS,IACjB,IAAI,CAAC,iCAAiC,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,GAAG;IAC/D,KAAK,EAAE,KAAK,GAAG,yBAAyB,CAAA;CAC3C,CAAA;AAED,wBAAgB,gCAAgC,CAC5C,GAAG,SAAS,SAAS,CAAC,MAAM,CAAC,EAC7B,UAAU,SAAS,UAAU,EAC/B,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,kCAAkC,CAAC,UAAU,CAAC,QAejE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
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 declare function getSendUserOperationError<entryPoint extends EntryPoint>(err: BaseError, args: SendUserOperationParameters<entryPoint>): void;
|
|
4
5
|
//# sourceMappingURL=getSendUserOperationError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSendUserOperationError.d.ts","sourceRoot":"","sources":["../../../utils/errors/getSendUserOperationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,MAAM,CAAA;AAClD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAA;
|
|
1
|
+
{"version":3,"file":"getSendUserOperationError.d.ts","sourceRoot":"","sources":["../../../utils/errors/getSendUserOperationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,MAAM,CAAA;AAClD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAA;AAE1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAMxD,wBAAgB,yBAAyB,CAAC,UAAU,SAAS,UAAU,EACnE,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,2BAA2B,CAAC,UAAU,CAAC,QAchD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE, ENTRYPOINT_ADDRESS_V07_TYPE } from "../types";
|
|
2
|
+
import type { EntryPoint, GetEntryPointVersion } from "../types/entrypoint";
|
|
3
|
+
export declare const ENTRYPOINT_ADDRESS_V06: ENTRYPOINT_ADDRESS_V06_TYPE;
|
|
4
|
+
export declare const ENTRYPOINT_ADDRESS_V07: ENTRYPOINT_ADDRESS_V07_TYPE;
|
|
5
|
+
export declare const getEntryPointVersion: (entryPoint: EntryPoint) => GetEntryPointVersion<EntryPoint>;
|
|
6
|
+
//# sourceMappingURL=getEntryPointVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEntryPointVersion.d.ts","sourceRoot":"","sources":["../../utils/getEntryPointVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC3B,2BAA2B,EAC9B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,eAAO,MAAM,sBAAsB,EAAE,2BACW,CAAA;AAChD,eAAO,MAAM,sBAAsB,EAAE,2BACW,CAAA;AAEhD,eAAO,MAAM,oBAAoB,eACjB,UAAU,KACvB,qBAAqB,UAAU,CACyB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { UserOperation } from "../types";
|
|
2
|
-
export type GetRequiredPrefundReturnType = {
|
|
3
|
-
userOperation: UserOperation
|
|
1
|
+
import type { EntryPoint, GetEntryPointVersion, UserOperation } from "../types";
|
|
2
|
+
export type GetRequiredPrefundReturnType<entryPoint extends EntryPoint> = {
|
|
3
|
+
userOperation: UserOperation<GetEntryPointVersion<entryPoint>>;
|
|
4
|
+
entryPoint: entryPoint;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
@@ -16,5 +17,5 @@ export type GetRequiredPrefundReturnType = {
|
|
|
16
17
|
* userOperation
|
|
17
18
|
* })
|
|
18
19
|
*/
|
|
19
|
-
export declare const getRequiredPrefund: ({ userOperation }: GetRequiredPrefundReturnType) => bigint;
|
|
20
|
+
export declare const getRequiredPrefund: <entryPoint extends EntryPoint>({ userOperation, entryPoint: entryPointAddress }: GetRequiredPrefundReturnType<entryPoint>) => bigint;
|
|
20
21
|
//# sourceMappingURL=getRequiredPrefund.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRequiredPrefund.d.ts","sourceRoot":"","sources":["../../utils/getRequiredPrefund.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"getRequiredPrefund.d.ts","sourceRoot":"","sources":["../../utils/getRequiredPrefund.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAG/E,MAAM,MAAM,4BAA4B,CAAC,UAAU,SAAS,UAAU,IAAI;IACtE,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAA;IAC9D,UAAU,EAAE,UAAU,CAAA;CACzB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,iIAGe,MA6B7C,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Hash } from "viem";
|
|
2
|
+
import type { EntryPoint, GetEntryPointVersion } from "../types";
|
|
2
3
|
import type { UserOperation } from "../types/userOperation";
|
|
3
|
-
export type GetUserOperationHashParams = {
|
|
4
|
-
userOperation: UserOperation
|
|
5
|
-
entryPoint:
|
|
4
|
+
export type GetUserOperationHashParams<entryPoint extends EntryPoint> = {
|
|
5
|
+
userOperation: UserOperation<GetEntryPointVersion<entryPoint>>;
|
|
6
|
+
entryPoint: entryPoint;
|
|
6
7
|
chainId: number;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
@@ -26,5 +27,5 @@ export type GetUserOperationHashParams = {
|
|
|
26
27
|
* // Returns "0xe9fad2cd67f9ca1d0b7a6513b2a42066784c8df938518da2b51bb8cc9a89ea34"
|
|
27
28
|
*
|
|
28
29
|
*/
|
|
29
|
-
export declare const getUserOperationHash: ({ userOperation, entryPoint, chainId }: GetUserOperationHashParams) => Hash;
|
|
30
|
+
export declare const getUserOperationHash: <entryPoint extends EntryPoint>({ userOperation, entryPoint: entryPointAddress, chainId }: GetUserOperationHashParams<entryPoint>) => Hash;
|
|
30
31
|
//# sourceMappingURL=getUserOperationHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationHash.d.ts","sourceRoot":"","sources":["../../utils/getUserOperationHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"getUserOperationHash.d.ts","sourceRoot":"","sources":["../../utils/getUserOperationHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAO,MAAM,MAAM,CAAA;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAmH3D,MAAM,MAAM,0BAA0B,CAAC,UAAU,SAAS,UAAU,IAAI;IACpE,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAA;IAC9D,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB,wIAIW,IAgB3C,CAAA"}
|
package/_types/utils/index.d.ts
CHANGED
|
@@ -9,5 +9,6 @@ import { providerToSmartAccountSigner } from "./providerToSmartAccountSigner";
|
|
|
9
9
|
import { AccountOrClientNotFoundError, type SignUserOperationHashWithECDSAParams, signUserOperationHashWithECDSA } from "./signUserOperationHashWithECDSA";
|
|
10
10
|
import { walletClientToSmartAccountSigner } from "./walletClientToSmartAccountSigner";
|
|
11
11
|
export declare function parseAccount(account: Address | Account): Account;
|
|
12
|
-
|
|
12
|
+
import { ENTRYPOINT_ADDRESS_V06, ENTRYPOINT_ADDRESS_V07, getEntryPointVersion } from "./getEntryPointVersion";
|
|
13
|
+
export { transactionReceiptStatus, deepHexlify, getAction, getUserOperationHash, getRequiredPrefund, walletClientToSmartAccountSigner, type GetRequiredPrefundReturnType, type GetUserOperationHashParams, signUserOperationHashWithECDSA, type SignUserOperationHashWithECDSAParams, AccountOrClientNotFoundError, isSmartAccountDeployed, providerToSmartAccountSigner, getAddressFromInitCodeOrPaymasterAndData, getEntryPointVersion, ENTRYPOINT_ADDRESS_V06, ENTRYPOINT_ADDRESS_V07 };
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,wCAAwC,EAAE,MAAM,4CAA4C,CAAA;AACrG,OAAO,EACH,KAAK,4BAA4B,EACjC,kBAAkB,EACrB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,KAAK,0BAA0B,EAC/B,oBAAoB,EACvB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EACH,4BAA4B,EAC5B,KAAK,oCAAoC,EACzC,8BAA8B,EACjC,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AAErF,wBAAgB,YAAY,CAAC,OAAO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EIP1193Provider, type Hex } from "viem";
|
|
2
|
-
export declare const providerToSmartAccountSigner: (provider
|
|
2
|
+
export declare const providerToSmartAccountSigner: ({ provider, signerAddress }: {
|
|
3
|
+
provider: EIP1193Provider;
|
|
4
|
+
signerAddress?: `0x${string}` | undefined;
|
|
5
|
+
}) => Promise<import("../accounts").SmartAccountSigner<"custom", `0x${string}`>>;
|
|
3
6
|
//# sourceMappingURL=providerToSmartAccountSigner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerToSmartAccountSigner.d.ts","sourceRoot":"","sources":["../../utils/providerToSmartAccountSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,GAAG,EAGX,MAAM,MAAM,CAAA;AAGb,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"providerToSmartAccountSigner.d.ts","sourceRoot":"","sources":["../../utils/providerToSmartAccountSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,GAAG,EAGX,MAAM,MAAM,CAAA;AAGb,eAAO,MAAM,4BAA4B;cAI3B,eAAe;;gFAc5B,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type Account,
|
|
2
|
-
import {
|
|
1
|
+
import { type Account, BaseError, type Chain, type Hash, type Hex, type Transport } from "viem";
|
|
2
|
+
import type { EntryPoint, GetAccountParameterWithClient, GetEntryPointVersion } from "../types";
|
|
3
3
|
import type { UserOperation } from "../types/userOperation";
|
|
4
|
-
export type SignUserOperationHashWithECDSAParams<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined> = GetAccountParameterWithClient<TTransport, TChain, TAccount> & ({
|
|
4
|
+
export type SignUserOperationHashWithECDSAParams<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined> = GetAccountParameterWithClient<TTransport, TChain, TAccount> & ({
|
|
5
5
|
hash: Hash;
|
|
6
6
|
userOperation?: undefined;
|
|
7
7
|
entryPoint?: undefined;
|
|
8
8
|
chainId?: undefined;
|
|
9
9
|
} | {
|
|
10
10
|
hash?: undefined;
|
|
11
|
-
userOperation: UserOperation
|
|
12
|
-
entryPoint:
|
|
11
|
+
userOperation: UserOperation<GetEntryPointVersion<entryPoint>>;
|
|
12
|
+
entryPoint: entryPoint;
|
|
13
13
|
chainId: number;
|
|
14
14
|
});
|
|
15
15
|
export declare class AccountOrClientNotFoundError extends BaseError {
|
|
@@ -41,5 +41,5 @@ export declare class AccountOrClientNotFoundError extends BaseError {
|
|
|
41
41
|
* // Returns "0x7d9ae17d5e617e4bf3221dfcb69d64d824959e5ae2ef7078c6ddc3a4fe26c8301ab39277c61160dca68ca90071eb449d9fb2fbbc78b3614d9d7282c860270e291c"
|
|
42
42
|
*
|
|
43
43
|
*/
|
|
44
|
-
export declare const signUserOperationHashWithECDSA: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>({ client, account: account_, hash, userOperation, chainId, entryPoint }: SignUserOperationHashWithECDSAParams<TTransport, TChain, TAccount>) => Promise<Hex>;
|
|
44
|
+
export declare const signUserOperationHashWithECDSA: <entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>({ client, account: account_, hash, userOperation, chainId, entryPoint: entryPointAddress }: SignUserOperationHashWithECDSAParams<entryPoint, TTransport, TChain, TAccount>) => Promise<Hex>;
|
|
45
45
|
//# sourceMappingURL=signUserOperationHashWithECDSA.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperationHashWithECDSA.d.ts","sourceRoot":"","sources":["../../utils/signUserOperationHashWithECDSA.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,
|
|
1
|
+
{"version":3,"file":"signUserOperationH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
import { type Chain, type Client, type Hex, type Transport } from "viem"
|
|
2
2
|
import { privateKeyToAccount } from "viem/accounts"
|
|
3
|
-
import type { Prettify } from "../../types"
|
|
3
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE, Prettify } from "../../types"
|
|
4
4
|
import {
|
|
5
5
|
type BiconomySmartAccount,
|
|
6
6
|
type SignerToBiconomySmartAccountParameters,
|
|
7
7
|
signerToBiconomySmartAccount
|
|
8
8
|
} from "./signerToBiconomySmartAccount"
|
|
9
9
|
|
|
10
|
-
export type PrivateKeyToBiconomySmartAccountParameters
|
|
10
|
+
export type PrivateKeyToBiconomySmartAccountParameters<
|
|
11
|
+
entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE
|
|
12
|
+
> = Prettify<
|
|
11
13
|
{
|
|
12
14
|
privateKey: Hex
|
|
13
|
-
} & Omit<SignerToBiconomySmartAccountParameters
|
|
15
|
+
} & Omit<SignerToBiconomySmartAccountParameters<entryPoint>, "signer">
|
|
14
16
|
>
|
|
15
17
|
|
|
16
18
|
/**
|
|
@@ -19,14 +21,23 @@ export type PrivateKeyToBiconomySmartAccountParameters = Prettify<
|
|
|
19
21
|
* @returns A Private Key Biconomy Smart Account using ECDSA as default validation module.
|
|
20
22
|
*/
|
|
21
23
|
export async function privateKeyToBiconomySmartAccount<
|
|
24
|
+
entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE,
|
|
22
25
|
TTransport extends Transport = Transport,
|
|
23
26
|
TChain extends Chain | undefined = Chain | undefined
|
|
24
27
|
>(
|
|
25
28
|
client: Client<TTransport, TChain, undefined>,
|
|
26
|
-
{
|
|
27
|
-
|
|
29
|
+
{
|
|
30
|
+
privateKey,
|
|
31
|
+
...rest
|
|
32
|
+
}: PrivateKeyToBiconomySmartAccountParameters<entryPoint>
|
|
33
|
+
): Promise<BiconomySmartAccount<entryPoint, TTransport, TChain>> {
|
|
28
34
|
const privateKeyAccount = privateKeyToAccount(privateKey)
|
|
29
|
-
return signerToBiconomySmartAccount
|
|
35
|
+
return signerToBiconomySmartAccount<
|
|
36
|
+
entryPoint,
|
|
37
|
+
TTransport,
|
|
38
|
+
TChain,
|
|
39
|
+
"privateKey"
|
|
40
|
+
>(client, {
|
|
30
41
|
signer: privateKeyAccount,
|
|
31
42
|
...rest
|
|
32
43
|
})
|