permissionless 0.0.11 → 0.0.13
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 +16 -0
- package/_cjs/accounts/index.js +14 -0
- package/_cjs/accounts/index.js.map +1 -0
- package/_cjs/accounts/privateKeyToSafeSmartAccount.js +24 -0
- package/_cjs/accounts/privateKeyToSafeSmartAccount.js.map +1 -0
- package/_cjs/accounts/privateKeyToSimpleSmartAccount.js +16 -0
- package/_cjs/accounts/privateKeyToSimpleSmartAccount.js.map +1 -0
- package/_cjs/accounts/signerToSafeSmartAccount.js +492 -0
- package/_cjs/accounts/signerToSafeSmartAccount.js.map +1 -0
- package/_cjs/accounts/signerToSimpleSmartAccount.js +190 -0
- package/_cjs/accounts/signerToSimpleSmartAccount.js.map +1 -0
- package/_cjs/accounts/types.js +23 -0
- package/_cjs/accounts/types.js.map +1 -0
- package/_cjs/actions/bundler/chainId.js.map +1 -1
- package/_cjs/actions/bundler/estimateUserOperationGas.js +4 -1
- package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_cjs/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/_cjs/actions/bundler/sendUserOperation.js +4 -1
- package/_cjs/actions/bundler/sendUserOperation.js.map +1 -1
- package/_cjs/actions/bundler/supportedEntryPoints.js.map +1 -1
- package/_cjs/actions/bundler/waitForUserOperationReceipt.js +7 -2
- package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/pimlico/getUserOperationGasPrice.js.map +1 -1
- package/_cjs/actions/pimlico/getUserOperationStatus.js.map +1 -1
- package/_cjs/actions/pimlico/sponsorUserOperation.js +4 -1
- package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_cjs/actions/pimlico.js.map +1 -1
- package/_cjs/actions/public/getAccountNonce.js +4 -2
- package/_cjs/actions/public/getAccountNonce.js.map +1 -1
- package/_cjs/actions/public/getSenderAddress.js +7 -3
- package/_cjs/actions/public/getSenderAddress.js.map +1 -1
- package/_cjs/actions/smartAccount/deployContract.js +38 -0
- package/_cjs/actions/smartAccount/deployContract.js.map +1 -0
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +73 -0
- package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
- package/_cjs/actions/smartAccount/sendTransaction.js +44 -0
- package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -0
- package/_cjs/actions/smartAccount/sendTransactions.js +46 -0
- package/_cjs/actions/smartAccount/sendTransactions.js.map +1 -0
- package/_cjs/actions/smartAccount/sendUserOperation.js +22 -0
- package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -0
- package/_cjs/actions/smartAccount/signMessage.js +16 -0
- package/_cjs/actions/smartAccount/signMessage.js.map +1 -0
- package/_cjs/actions/smartAccount/signTypedData.js +34 -0
- package/_cjs/actions/smartAccount/signTypedData.js.map +1 -0
- package/_cjs/actions/smartAccount/writeContract.js +21 -0
- package/_cjs/actions/smartAccount/writeContract.js.map +1 -0
- package/_cjs/actions/smartAccount.js +18 -0
- package/_cjs/actions/smartAccount.js.map +1 -0
- package/_cjs/actions/stackup/sponsorUserOperation.js +5 -1
- package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -1
- package/_cjs/clients/{bundler.js → createBundlerClient.js} +1 -1
- package/_cjs/clients/createBundlerClient.js.map +1 -0
- package/_cjs/clients/createSmartAccountClient.js +20 -0
- package/_cjs/clients/createSmartAccountClient.js.map +1 -0
- package/_cjs/clients/decorators/bundler.js.map +1 -1
- package/_cjs/clients/decorators/pimlico.js.map +1 -1
- package/_cjs/clients/decorators/smartAccount.js +33 -0
- package/_cjs/clients/decorators/smartAccount.js.map +1 -0
- package/_cjs/clients/decorators/stackup.js.map +1 -1
- package/_cjs/clients/pimlico.js.map +1 -1
- package/_cjs/clients/stackup.js.map +1 -1
- package/_cjs/index.js +9 -5
- package/_cjs/index.js.map +1 -1
- package/_cjs/utils/deepHexlify.js +4 -4
- package/_cjs/utils/deepHexlify.js.map +1 -1
- package/_cjs/utils/getAction.js +8 -0
- package/_cjs/utils/getAction.js.map +1 -0
- package/_cjs/utils/getUserOperationHash.js.map +1 -1
- package/_cjs/utils/index.js +7 -1
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/observe.js +7 -2
- package/_cjs/utils/observe.js.map +1 -1
- package/_cjs/utils/signUserOperationHashWithECDSA.js +7 -7
- package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -1
- package/_esm/accounts/index.js +7 -0
- package/_esm/accounts/index.js.map +1 -0
- package/_esm/accounts/privateKeyToSafeSmartAccount.js +26 -0
- package/_esm/accounts/privateKeyToSafeSmartAccount.js.map +1 -0
- package/_esm/accounts/privateKeyToSimpleSmartAccount.js +18 -0
- package/_esm/accounts/privateKeyToSimpleSmartAccount.js.map +1 -0
- package/_esm/accounts/signerToSafeSmartAccount.js +499 -0
- package/_esm/accounts/signerToSafeSmartAccount.js.map +1 -0
- package/_esm/accounts/signerToSimpleSmartAccount.js +191 -0
- package/_esm/accounts/signerToSimpleSmartAccount.js.map +1 -0
- package/_esm/accounts/types.js +20 -0
- package/_esm/accounts/types.js.map +1 -0
- package/_esm/actions/bundler/chainId.js.map +1 -1
- package/_esm/actions/bundler/estimateUserOperationGas.js +4 -1
- package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_esm/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/_esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/_esm/actions/bundler/sendUserOperation.js +4 -3
- package/_esm/actions/bundler/sendUserOperation.js.map +1 -1
- package/_esm/actions/bundler/supportedEntryPoints.js.map +1 -1
- package/_esm/actions/bundler/waitForUserOperationReceipt.js +7 -2
- package/_esm/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/pimlico/getUserOperationGasPrice.js +2 -2
- package/_esm/actions/pimlico/getUserOperationGasPrice.js.map +1 -1
- package/_esm/actions/pimlico/getUserOperationStatus.js +1 -1
- package/_esm/actions/pimlico/getUserOperationStatus.js.map +1 -1
- package/_esm/actions/pimlico/sponsorUserOperation.js +4 -1
- package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
- package/_esm/actions/pimlico.js.map +1 -1
- package/_esm/actions/public/getAccountNonce.js +7 -5
- package/_esm/actions/public/getAccountNonce.js.map +1 -1
- package/_esm/actions/public/getSenderAddress.js +8 -5
- package/_esm/actions/public/getSenderAddress.js.map +1 -1
- package/_esm/actions/smartAccount/deployContract.js +64 -0
- package/_esm/actions/smartAccount/deployContract.js.map +1 -0
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js +69 -0
- package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
- package/_esm/actions/smartAccount/sendTransaction.js +88 -0
- package/_esm/actions/smartAccount/sendTransaction.js.map +1 -0
- package/_esm/actions/smartAccount/sendTransactions.js +90 -0
- package/_esm/actions/smartAccount/sendTransactions.js.map +1 -0
- package/_esm/actions/smartAccount/sendUserOperation.js +18 -0
- package/_esm/actions/smartAccount/sendUserOperation.js.map +1 -0
- package/_esm/actions/smartAccount/signMessage.js +59 -0
- package/_esm/actions/smartAccount/signMessage.js.map +1 -0
- package/_esm/actions/smartAccount/signTypedData.js +129 -0
- package/_esm/actions/smartAccount/signTypedData.js.map +1 -0
- package/_esm/actions/smartAccount/writeContract.js +19 -0
- package/_esm/actions/smartAccount/writeContract.js.map +1 -0
- package/_esm/actions/smartAccount.js +9 -0
- package/_esm/actions/smartAccount.js.map +1 -0
- package/_esm/actions/stackup/accounts.js +1 -1
- package/_esm/actions/stackup/sponsorUserOperation.js +6 -2
- package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -1
- package/_esm/clients/{bundler.js → createBundlerClient.js} +1 -1
- package/_esm/clients/createBundlerClient.js.map +1 -0
- package/_esm/clients/createSmartAccountClient.js +38 -0
- package/_esm/clients/createSmartAccountClient.js.map +1 -0
- package/_esm/clients/decorators/bundler.js.map +1 -1
- package/_esm/clients/decorators/pimlico.js +1 -1
- package/_esm/clients/decorators/pimlico.js.map +1 -1
- package/_esm/clients/decorators/smartAccount.js +29 -0
- package/_esm/clients/decorators/smartAccount.js.map +1 -0
- package/_esm/clients/decorators/stackup.js.map +1 -1
- package/_esm/clients/pimlico.js +1 -1
- package/_esm/clients/pimlico.js.map +1 -1
- package/_esm/clients/stackup.js +1 -1
- package/_esm/clients/stackup.js.map +1 -1
- package/_esm/index.js +5 -2
- package/_esm/index.js.map +1 -1
- package/_esm/utils/deepHexlify.js +6 -4
- package/_esm/utils/deepHexlify.js.map +1 -1
- package/_esm/utils/getAction.js +6 -0
- package/_esm/utils/getAction.js.map +1 -0
- package/_esm/utils/getUserOperationHash.js.map +1 -1
- package/_esm/utils/index.js +5 -0
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/observe.js +7 -2
- package/_esm/utils/observe.js.map +1 -1
- package/_esm/utils/signUserOperationHashWithECDSA.js +7 -6
- package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -1
- package/_types/accounts/index.d.ts +7 -0
- package/_types/accounts/index.d.ts.map +1 -0
- package/_types/accounts/privateKeyToSafeSmartAccount.d.ts +26 -0
- package/_types/accounts/privateKeyToSafeSmartAccount.d.ts.map +1 -0
- package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts +14 -0
- package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts.map +1 -0
- package/_types/accounts/signerToSafeSmartAccount.d.ts +28 -0
- package/_types/accounts/signerToSafeSmartAccount.d.ts.map +1 -0
- package/_types/accounts/signerToSimpleSmartAccount.d.ts +15 -0
- package/_types/accounts/signerToSimpleSmartAccount.d.ts.map +1 -0
- package/_types/accounts/types.d.ts +32 -0
- package/_types/accounts/types.d.ts.map +1 -0
- package/_types/actions/bundler/chainId.d.ts +3 -2
- package/_types/actions/bundler/chainId.d.ts.map +1 -1
- package/_types/actions/bundler/estimateUserOperationGas.d.ts +3 -3
- 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 -5
- package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -1
- package/_types/actions/bundler/supportedEntryPoints.d.ts +3 -3
- package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -1
- package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +2 -3
- package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -1
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +5 -4
- package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
- package/_types/actions/pimlico/getUserOperationStatus.d.ts +4 -5
- package/_types/actions/pimlico/getUserOperationStatus.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.d.ts.map +1 -1
- package/_types/actions/public/getAccountNonce.d.ts +5 -5
- package/_types/actions/public/getAccountNonce.d.ts.map +1 -1
- package/_types/actions/public/getSenderAddress.d.ts +3 -4
- package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
- package/_types/actions/smartAccount/deployContract.d.ts +34 -0
- package/_types/actions/smartAccount/deployContract.d.ts.map +1 -0
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +20 -0
- package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -0
- package/_types/actions/smartAccount/sendTransaction.d.ts +52 -0
- package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -0
- package/_types/actions/smartAccount/sendTransactions.d.ts +63 -0
- package/_types/actions/smartAccount/sendTransactions.d.ts.map +1 -0
- package/_types/actions/smartAccount/sendUserOperation.d.ts +10 -0
- package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -0
- package/_types/actions/smartAccount/signMessage.d.ts +50 -0
- package/_types/actions/smartAccount/signMessage.d.ts.map +1 -0
- package/_types/actions/smartAccount/signTypedData.d.ts +104 -0
- package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -0
- package/_types/actions/smartAccount/writeContract.d.ts +57 -0
- package/_types/actions/smartAccount/writeContract.d.ts.map +1 -0
- package/_types/actions/smartAccount.d.ts +9 -0
- package/_types/actions/smartAccount.d.ts.map +1 -0
- package/_types/actions/stackup/accounts.d.ts +1 -1
- package/_types/actions/stackup/sponsorUserOperation.d.ts +1 -1
- package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -1
- package/_types/clients/{bundler.d.ts → createBundlerClient.d.ts} +1 -1
- package/_types/clients/createBundlerClient.d.ts.map +1 -0
- package/_types/clients/createSmartAccountClient.d.ts +282 -0
- package/_types/clients/createSmartAccountClient.d.ts.map +1 -0
- package/_types/clients/decorators/bundler.d.ts +1 -1
- package/_types/clients/decorators/bundler.d.ts.map +1 -1
- package/_types/clients/decorators/pimlico.d.ts +3 -3
- package/_types/clients/decorators/pimlico.d.ts.map +1 -1
- package/_types/clients/decorators/smartAccount.d.ts +327 -0
- package/_types/clients/decorators/smartAccount.d.ts.map +1 -0
- package/_types/clients/decorators/stackup.d.ts.map +1 -1
- package/_types/clients/pimlico.d.ts +1 -1
- package/_types/clients/pimlico.d.ts.map +1 -1
- package/_types/clients/stackup.d.ts +1 -1
- package/_types/clients/stackup.d.ts.map +1 -1
- package/_types/index.d.ts +6 -3
- package/_types/index.d.ts.map +1 -1
- package/_types/types/bundler.d.ts +4 -1
- package/_types/types/bundler.d.ts.map +1 -1
- package/_types/types/index.d.ts +20 -0
- package/_types/types/index.d.ts.map +1 -1
- package/_types/types/pimlico.d.ts.map +1 -1
- package/_types/types/stackup.d.ts.map +1 -1
- package/_types/utils/deepHexlify.d.ts.map +1 -1
- package/_types/utils/getAction.d.ts +3 -0
- package/_types/utils/getAction.d.ts.map +1 -0
- package/_types/utils/getUserOperationHash.d.ts.map +1 -1
- package/_types/utils/index.d.ts +2 -0
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/observe.d.ts.map +1 -1
- package/_types/utils/signUserOperationHashWithECDSA.d.ts +3 -11
- package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -1
- package/accounts/index.ts +33 -0
- package/accounts/privateKeyToSafeSmartAccount.ts +73 -0
- package/accounts/privateKeyToSimpleSmartAccount.ts +44 -0
- package/accounts/signerToSafeSmartAccount.ts +775 -0
- package/accounts/signerToSimpleSmartAccount.ts +267 -0
- package/accounts/types.ts +64 -0
- package/actions/bundler/chainId.ts +10 -2
- package/actions/bundler/estimateUserOperationGas.ts +17 -6
- package/actions/bundler/getUserOperationByHash.ts +16 -5
- package/actions/bundler/getUserOperationReceipt.ts +17 -4
- package/actions/bundler/sendUserOperation.ts +19 -7
- package/actions/bundler/supportedEntryPoints.ts +10 -3
- package/actions/bundler/waitForUserOperationReceipt.ts +64 -26
- package/actions/index.ts +4 -1
- package/actions/pimlico/getUserOperationGasPrice.ts +13 -6
- package/actions/pimlico/getUserOperationStatus.ts +12 -5
- package/actions/pimlico/sponsorUserOperation.ts +20 -7
- package/actions/pimlico.ts +8 -2
- package/actions/public/getAccountNonce.ts +20 -8
- package/actions/public/getSenderAddress.ts +25 -8
- package/actions/smartAccount/deployContract.ts +110 -0
- package/actions/smartAccount/prepareUserOperationRequest.ts +140 -0
- package/actions/smartAccount/sendTransaction.ts +138 -0
- package/actions/smartAccount/sendTransactions.ts +141 -0
- package/actions/smartAccount/sendUserOperation.ts +70 -0
- package/actions/smartAccount/signMessage.ts +79 -0
- package/actions/smartAccount/signTypedData.ts +161 -0
- package/actions/smartAccount/writeContract.ts +126 -0
- package/actions/smartAccount.ts +49 -0
- package/actions/stackup/accounts.ts +1 -1
- package/actions/stackup/sponsorUserOperation.ts +14 -4
- package/clients/{bundler.ts → createBundlerClient.ts} +14 -3
- package/clients/createSmartAccountClient.ts +95 -0
- package/clients/decorators/bundler.ts +20 -10
- package/clients/decorators/pimlico.ts +21 -9
- package/clients/decorators/smartAccount.ts +451 -0
- package/clients/decorators/stackup.ts +12 -4
- package/clients/pimlico.ts +20 -5
- package/clients/stackup.ts +17 -4
- package/index.ts +20 -3
- package/package.json +12 -2
- package/types/bundler.ts +4 -1
- package/types/index.ts +29 -0
- package/types/pimlico.ts +12 -2
- package/types/stackup.ts +4 -1
- package/utils/deepHexlify.test.ts +13 -7
- package/utils/deepHexlify.ts +5 -4
- package/utils/getAction.ts +15 -0
- package/utils/getUserOperationHash.ts +10 -2
- package/utils/index.ts +15 -2
- package/utils/observe.ts +18 -5
- package/utils/signUserOperationHashWithECDSA.ts +17 -20
- package/_cjs/clients/bundler.js.map +0 -1
- package/_esm/clients/bundler.js.map +0 -1
- package/_types/clients/bundler.d.ts.map +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../../clients/decorators/pimlico.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,wBAAwB,EAC3B,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAGH,sBAAsB,EACzB,MAAM,iDAAiD,CAAA;AACxD,OAAO,EAGH,oBAAoB,EACvB,MAAM,+CAA+C,CAAA;
|
|
1
|
+
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../../clients/decorators/pimlico.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,wBAAwB,EAC3B,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAGH,sBAAsB,EACzB,MAAM,iDAAiD,CAAA;AACxD,OAAO,EAGH,oBAAoB,EACvB,MAAM,+CAA+C,CAAA;AAmDtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,MAAc,EACO,EAAE,CAAC,CAAC;IACzB,wBAAwB,EAAE,KAAK,IAAI,EAAE,CACjC,wBAAwB,CAAC,MAA8B,CAAC;IAC5D,sBAAsB,EAAE,KAAK,EAAE,IAAsC,EAAE,EAAE,CACrE,sBAAsB,CAAC,MAA8B,EAAE,IAAI,CAAC;CACnE,CAAC,CAAA;AA+BF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACnC,MAAc,EACe,EAAE,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,EAAE,IAAoC,EAAE,EAAE,CACjE,oBAAoB,CAAC,MAAgC,EAAE,IAAI,CAAC;CACnE,CAAC,CAAA;AAEF;;GAEG;AACH,sDAAsD;AACtD,eAAe;AACf,4CAA4C;AAC5C,6CAA6C;AAC7C,QAAQ;AACR,IAAI"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { sendTransactions } from "../../actions/smartAccount.js";
|
|
2
|
+
import { deployContract } from "../../actions/smartAccount/deployContract.js";
|
|
3
|
+
import { prepareUserOperationRequest } from "../../actions/smartAccount/prepareUserOperationRequest.js";
|
|
4
|
+
import { sendTransaction } from "../../actions/smartAccount/sendTransaction.js";
|
|
5
|
+
import { signMessage } from "../../actions/smartAccount/signMessage.js";
|
|
6
|
+
import { signTypedData } from "../../actions/smartAccount/signTypedData.js";
|
|
7
|
+
import { writeContract } from "../../actions/smartAccount/writeContract.js";
|
|
8
|
+
export const smartAccountActions = ({ sponsorUserOperation }) => (client) => ({
|
|
9
|
+
prepareUserOperationRequest: (args) => prepareUserOperationRequest(client, args),
|
|
10
|
+
deployContract: (args) => deployContract(client, {
|
|
11
|
+
...args,
|
|
12
|
+
sponsorUserOperation
|
|
13
|
+
}),
|
|
14
|
+
sendTransaction: (args) => sendTransaction(client, {
|
|
15
|
+
...args,
|
|
16
|
+
sponsorUserOperation
|
|
17
|
+
}),
|
|
18
|
+
sendTransactions: (args) => sendTransactions(client, {
|
|
19
|
+
...args,
|
|
20
|
+
sponsorUserOperation
|
|
21
|
+
}),
|
|
22
|
+
signMessage: (args) => signMessage(client, args),
|
|
23
|
+
signTypedData: (args) => signTypedData(client, args),
|
|
24
|
+
writeContract: (args) => writeContract(client, {
|
|
25
|
+
...args,
|
|
26
|
+
sponsorUserOperation
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=smartAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartAccount.js","sourceRoot":"","sources":["../../../clients/decorators/smartAccount.ts"],"names":[],"mappings":"AAWA,OAAO,EAEH,gBAAgB,EACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAEH,cAAc,EACjB,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAGH,2BAA2B,EAC9B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAEH,eAAe,EAClB,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAEH,aAAa,EAChB,MAAM,6CAA6C,CAAA;AA8XpD,MAAM,CAAC,MAAM,mBAAmB,GAC5B,CAAC,EAAE,oBAAoB,EAAkC,EAAE,EAAE,CAC7D,CAOI,MAAiD,EACP,EAAE,CAAC,CAAC;IAC9C,2BAA2B,EAAE,CAAC,IAAI,EAAE,EAAE,CAClC,2BAA2B,CAAC,MAAM,EAAE,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CACrB,cAAc,CAAC,MAAM,EAAE;QACnB,GAAG,IAAI;QACP,oBAAoB;KACkB,CAAC;IAC/C,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CACtB,eAAe,CAAC,MAAM,EAAE;QACpB,GAAG,IAAI;QACP,oBAAoB;KACmB,CAAC;IAChD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CACvB,gBAAgB,CAAC,MAAM,EAAE;QACrB,GAAG,IAAI;QACP,oBAAoB;KACoB,CAAC;IACjD,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC;IAChD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC;IACpD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CACpB,aAAa,CAAC,MAAM,EAAE;QAClB,GAAG,IAAI;QACP,oBAAoB;KACiB,CAAC;CACjD,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackup.js","sourceRoot":"","sources":["../../../clients/decorators/stackup.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"stackup.js","sourceRoot":"","sources":["../../../clients/decorators/stackup.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,QAAQ,EACX,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAGH,oBAAoB,EACvB,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAA+B,MAAM,eAAe,CAAA;AAuD3D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACnC,MAAc,EACe,EAAE,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,EAAE,IAAoC,EAAE,EAAE,CACjE,oBAAoB,CAAC,MAAgC,EAAE,IAAI,CAAC;IAChE,QAAQ,EAAE,KAAK,EAAE,IAAwB,EAAE,EAAE,CACzC,QAAQ,CAAC,MAAgC,EAAE,IAAI,CAAC;CACvD,CAAC,CAAA"}
|
package/_esm/clients/pimlico.js
CHANGED
|
@@ -17,7 +17,7 @@ import { pimlicoBundlerActions, pimlicoPaymasterActions } from "./decorators/pim
|
|
|
17
17
|
*
|
|
18
18
|
* const pimlicoBundlerClient = createPimlicoBundlerClient({
|
|
19
19
|
* chain: mainnet,
|
|
20
|
-
* transport: http("https://api.pimlico.io/
|
|
20
|
+
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
21
21
|
* })
|
|
22
22
|
*/
|
|
23
23
|
export const createPimlicoBundlerClient = (parameters) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../clients/pimlico.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../clients/pimlico.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAKnC,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7E,OAAO,EAGH,qBAAqB,EACrB,uBAAuB,EAC1B,MAAM,yBAAyB,CAAA;AAkBhC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAItC,UAAgD,EAC5B,EAAE;IACtB,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,IAAI,GAAG,wBAAwB,EAAE,GAAG,UAAU,CAAA;IACtE,MAAM,MAAM,GAAG,YAAY,CAAC;QACxB,GAAG,UAAU;QACb,GAAG;QACH,IAAI;QACJ,IAAI,EAAE,sBAAsB;KAC/B,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAA;AACtE,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAIxC,UAAgD,EAC1B,EAAE;IACxB,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,IAAI,GAAG,0BAA0B,EAAE,GAAG,UAAU,CAAA;IACxE,MAAM,MAAM,GAAG,YAAY,CAAC;QACxB,GAAG,UAAU;QACb,GAAG;QACH,IAAI;QACJ,IAAI,EAAE,wBAAwB;KACjC,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA;AACjD,CAAC,CAAA"}
|
package/_esm/clients/stackup.js
CHANGED
|
@@ -17,7 +17,7 @@ import { stackupPaymasterActions } from "./decorators/stackup.js";
|
|
|
17
17
|
*
|
|
18
18
|
* const stackupPaymasterClient = createStackupPaymasterClient({
|
|
19
19
|
* chain: mainnet,
|
|
20
|
-
* transport: http("https://api.stackup.sh/
|
|
20
|
+
* transport: http("https://api.stackup.sh/v2/paymaster/YOUR_API_KEY_HERE"),
|
|
21
21
|
* })
|
|
22
22
|
*/
|
|
23
23
|
export const createStackupPaymasterClient = (parameters) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackup.js","sourceRoot":"","sources":["../../clients/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"stackup.js","sourceRoot":"","sources":["../../clients/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,EAMH,YAAY,EACf,MAAM,MAAM,CAAA;AAEb,OAAO,EAAuB,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7E,OAAO,EAEH,uBAAuB,EAC1B,MAAM,yBAAyB,CAAA;AAUhC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAIxC,UAAgD,EAC1B,EAAE;IACxB,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,IAAI,GAAG,0BAA0B,EAAE,GAAG,UAAU,CAAA;IACxE,MAAM,MAAM,GAAG,YAAY,CAAC;QACxB,GAAG,UAAU;QACb,GAAG;QACH,IAAI;QACJ,IAAI,EAAE,wBAAwB;KACjC,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA;AACxE,CAAC,CAAA"}
|
package/_esm/index.js
CHANGED
|
@@ -8,9 +8,12 @@ import { supportedEntryPoints } from "./actions/bundler/supportedEntryPoints.js"
|
|
|
8
8
|
import { waitForUserOperationReceipt } from "./actions/bundler/waitForUserOperationReceipt.js";
|
|
9
9
|
import { WaitForUserOperationReceiptTimeoutError } from "./actions/bundler/waitForUserOperationReceipt.js";
|
|
10
10
|
import { getAccountNonce } from "./actions/public/getAccountNonce.js";
|
|
11
|
-
import { createBundlerClient } from "./clients/
|
|
11
|
+
import { createBundlerClient } from "./clients/createBundlerClient.js";
|
|
12
|
+
import { createSmartAccountClient } from "./clients/createSmartAccountClient.js";
|
|
13
|
+
import {} from "./clients/createSmartAccountClient.js";
|
|
12
14
|
import { bundlerActions } from "./clients/decorators/bundler.js";
|
|
13
|
-
|
|
15
|
+
import { smartAccountActions } from "./clients/decorators/smartAccount.js";
|
|
16
|
+
export { sendUserOperation, estimateUserOperationGas, supportedEntryPoints, chainId, getUserOperationByHash, getUserOperationReceipt, getSenderAddress, getAccountNonce, waitForUserOperationReceipt, createBundlerClient, bundlerActions, WaitForUserOperationReceiptTimeoutError, createSmartAccountClient, smartAccountActions };
|
|
14
17
|
export {};
|
|
15
18
|
import { getUserOperationHash } from "./utils/getUserOperationHash.js";
|
|
16
19
|
export { getUserOperationHash };
|
package/_esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAA;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAA;AAC9F,OAAO,EAEH,uCAAuC,EAC1C,MAAM,kDAAkD,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAA;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAA;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAA;AAC9F,OAAO,EAEH,uCAAuC,EAC1C,MAAM,kDAAkD,CAAA;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAEH,mBAAmB,EACtB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAA;AAChF,OAAO,EAGN,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAEH,mBAAmB,EACtB,MAAM,sCAAsC,CAAA;AAoB7C,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,OAAO,EACP,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,cAAc,EACd,uCAAuC,EACvC,wBAAwB,EACxB,mBAAmB,EACtB,CAAA;AAGD,OAAO,EAAsB,CAAA;AAG7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEtE,OAAO,EAAE,oBAAoB,EAAmC,CAAA;AAChE,cAAc,kBAAkB,CAAA"}
|
|
@@ -20,9 +20,11 @@ export function deepHexlify(obj) {
|
|
|
20
20
|
if (Array.isArray(obj)) {
|
|
21
21
|
return obj.map((member) => deepHexlify(member));
|
|
22
22
|
}
|
|
23
|
-
return Object.keys(obj).reduce(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
return Object.keys(obj).reduce(
|
|
24
|
+
// biome-ignore lint/suspicious/noExplicitAny: it's a recursive function, so it's hard to type
|
|
25
|
+
(set, key) => {
|
|
26
|
+
set[key] = deepHexlify(obj[key]);
|
|
27
|
+
return set;
|
|
28
|
+
}, {});
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=deepHexlify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepHexlify.js","sourceRoot":"","sources":["../../utils/deepHexlify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAE5B,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,SAAS;CACV,CAAA;AAEV,8FAA8F;AAC9F,MAAM,UAAU,WAAW,CAAC,GAAQ;IAChC,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC3B,OAAO,SAAS,CAAA;KACnB;IACD,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE;QACpE,OAAO,GAAG,CAAA;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAChC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;KACpB;SAAM,IAAI,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KAC1C;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAA;KAClD;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"deepHexlify.js","sourceRoot":"","sources":["../../utils/deepHexlify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAE5B,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,SAAS;CACV,CAAA;AAEV,8FAA8F;AAC9F,MAAM,UAAU,WAAW,CAAC,GAAQ;IAChC,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC3B,OAAO,SAAS,CAAA;KACnB;IACD,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE;QACpE,OAAO,GAAG,CAAA;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAChC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAA;KACpB;SAAM,IAAI,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KAC1C;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAA;KAClD;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM;IAC1B,8FAA8F;IAC9F,CAAC,GAAQ,EAAE,GAAW,EAAE,EAAE;QACtB,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QAChC,OAAO,GAAG,CAAA;IACd,CAAC,EACD,EAAE,CACL,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function getAction(client,
|
|
2
|
+
// biome-ignore lint/suspicious/noExplicitAny: it's a recursive function, so it's hard to type
|
|
3
|
+
action, actionName = action.name) {
|
|
4
|
+
return (params) => client[actionName]?.(params) ?? action(client, params);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=getAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAction.js","sourceRoot":"","sources":["../../utils/getAction.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,SAAS,CACrB,MAAc;AACd,8FAA8F;AAC9F,MAA8C,EAC9C,aAAqB,MAAM,CAAC,IAAI;IAEhC,OAAO,CAAC,MAAc,EAAc,EAAE,CAE9B,MAGH,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationHash.js","sourceRoot":"","sources":["../../utils/getUserOperationHash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAGrD,SAAS,UAAU,CAAC,EAAE,aAAa,EAAoC;IACnE,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IACxD,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IACxD,MAAM,sBAAsB,GAAG,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;IAExE,OAAO,mBAAmB,CACtB;QACI,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;KACtB,EACD;QACI,aAAa,CAAC,MAAiB;QAC/B,aAAa,CAAC,KAAK;QACnB,cAAc;QACd,cAAc;QACd,aAAa,CAAC,YAAY;QAC1B,aAAa,CAAC,oBAAoB;QAClC,aAAa,CAAC,kBAAkB;QAChC,aAAa,CAAC,YAAY;QAC1B,aAAa,CAAC,oBAAoB;QAClC,sBAAsB;KACzB,CACJ,CAAA;AACL,CAAC;
|
|
1
|
+
{"version":3,"file":"getUserOperationHash.js","sourceRoot":"","sources":["../../utils/getUserOperationHash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAGrD,SAAS,UAAU,CAAC,EAAE,aAAa,EAAoC;IACnE,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IACxD,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IACxD,MAAM,sBAAsB,GAAG,SAAS,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;IAExE,OAAO,mBAAmB,CACtB;QACI,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,EAAE,IAAI,EAAE,SAAS,EAAE;KACtB,EACD;QACI,aAAa,CAAC,MAAiB;QAC/B,aAAa,CAAC,KAAK;QACnB,cAAc;QACd,cAAc;QACd,aAAa,CAAC,YAAY;QAC1B,aAAa,CAAC,oBAAoB;QAClC,aAAa,CAAC,kBAAkB;QAChC,aAAa,CAAC,YAAY;QAC1B,aAAa,CAAC,oBAAoB;QAClC,sBAAsB;KACzB,CACJ,CAAA;AACL,CAAC;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACjC,aAAa,EACb,UAAU,EACV,OAAO,EACkB,EAAQ,EAAE;IACnC,MAAM,OAAO,GAAG,mBAAmB,CAC/B,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAC/D,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CACzD,CAAA;IAElB,OAAO,SAAS,CAAC,OAAO,CAAC,CAAA;AAC7B,CAAC,CAAA"}
|
package/_esm/utils/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { getUserOperationHash } from "./getUserOperationHash.js";
|
|
2
2
|
import { AccountOrClientNotFoundError, signUserOperationHashWithECDSA } from "./signUserOperationHashWithECDSA.js";
|
|
3
|
+
export function parseAccount(account) {
|
|
4
|
+
if (typeof account === "string")
|
|
5
|
+
return { address: account, type: "json-rpc" };
|
|
6
|
+
return account;
|
|
7
|
+
}
|
|
3
8
|
export { getUserOperationHash, signUserOperationHashWithECDSA, AccountOrClientNotFoundError };
|
|
4
9
|
//# sourceMappingURL=index.js.map
|
package/_esm/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,oBAAoB,EACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACH,4BAA4B,EAC5B,8BAA8B,EACjC,MAAM,qCAAqC,CAAA;AAE5C,MAAM,UAAU,YAAY,CAAC,OAA0B;IACnD,IAAI,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;IACjD,OAAO,OAAO,CAAA;AAClB,CAAC;AAED,OAAO,EACH,oBAAoB,EAEpB,8BAA8B,EAC9B,4BAA4B,EAC/B,CAAA"}
|
package/_esm/utils/observe.js
CHANGED
|
@@ -22,7 +22,10 @@ export function observe(observerId, callbacks, fn) {
|
|
|
22
22
|
unsubscribe();
|
|
23
23
|
};
|
|
24
24
|
const listeners = getListeners();
|
|
25
|
-
listenersCache.set(observerId, [
|
|
25
|
+
listenersCache.set(observerId, [
|
|
26
|
+
...listeners,
|
|
27
|
+
{ id: callbackId, fns: callbacks }
|
|
28
|
+
]);
|
|
26
29
|
if (listeners && listeners.length > 0)
|
|
27
30
|
return unwatch;
|
|
28
31
|
const emit = {};
|
|
@@ -31,7 +34,9 @@ export function observe(observerId, callbacks, fn) {
|
|
|
31
34
|
const listeners = getListeners();
|
|
32
35
|
if (listeners.length === 0)
|
|
33
36
|
return;
|
|
34
|
-
|
|
37
|
+
for (const listener of listeners) {
|
|
38
|
+
listener.fns[key]?.(...args);
|
|
39
|
+
}
|
|
35
40
|
});
|
|
36
41
|
}
|
|
37
42
|
const cleanup = fn(emit);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../../utils/observe.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../../utils/observe.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,GAAG,EAGhD,CAAA;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,GAAG,EAAsB,CAAA;AAOvE,IAAI,aAAa,GAAG,CAAC,CAAA;AAErB;;;;GAIG;AACH,MAAM,UAAU,OAAO,CACnB,UAAkB,EAClB,SAAqB,EACrB,EAA4B;IAE5B,MAAM,UAAU,GAAG,EAAE,aAAa,CAAA;IAElC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;IAE/D,MAAM,WAAW,GAAG,GAAG,EAAE;QACrB,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;QAChC,cAAc,CAAC,GAAG,CACd,UAAU;QACV,8FAA8F;QAC9F,SAAS,CAAC,MAAM,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,UAAU,CAAC,CACtD,CAAA;IACL,CAAC,CAAA;IAED,MAAM,OAAO,GAAG,GAAG,EAAE;QACjB,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC5C,IAAI,YAAY,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO;YAAE,OAAO,EAAE,CAAA;QACrD,WAAW,EAAE,CAAA;IACjB,CAAC,CAAA;IAED,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE;QAC3B,GAAG,SAAS;QACZ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE;KACrC,CAAC,CAAA;IAEF,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,OAAO,CAAA;IAErD,MAAM,IAAI,GAAe,EAAgB,CAAA;IACzC,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;QACzB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CACT,GAAG,IAA2D,EAChE,EAAE;YACA,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;YAChC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAM;YAClC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;gBAC9B,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC/B;QACL,CAAC,CAAkD,CAAA;KACtD;IAED,MAAM,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;IACxB,IAAI,OAAO,OAAO,KAAK,UAAU;QAAE,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IAExE,OAAO,OAAO,CAAA;AAClB,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BaseError } from "viem";
|
|
2
|
+
import {} from "../types/index.js";
|
|
2
3
|
import { getUserOperationHash } from "./getUserOperationHash.js";
|
|
3
|
-
|
|
4
|
-
if (typeof account === "string")
|
|
5
|
-
return { address: account, type: "json-rpc" };
|
|
6
|
-
return account;
|
|
7
|
-
}
|
|
4
|
+
import { parseAccount } from "./index.js";
|
|
8
5
|
export class AccountOrClientNotFoundError extends BaseError {
|
|
9
6
|
constructor({ docsPath } = {}) {
|
|
10
7
|
super([
|
|
@@ -55,7 +52,11 @@ export const signUserOperationHashWithECDSA = async ({ client, account: account_
|
|
|
55
52
|
userOperationHash = hash;
|
|
56
53
|
}
|
|
57
54
|
else {
|
|
58
|
-
userOperationHash = getUserOperationHash({
|
|
55
|
+
userOperationHash = getUserOperationHash({
|
|
56
|
+
userOperation,
|
|
57
|
+
chainId,
|
|
58
|
+
entryPoint
|
|
59
|
+
});
|
|
59
60
|
}
|
|
60
61
|
const account = parseAccount(account_);
|
|
61
62
|
if (account.type === "local")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperationHashWithECDSA.js","sourceRoot":"","sources":["../../utils/signUserOperationHashWithECDSA.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,SAAS,EAMZ,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"signUserOperationHashWithECDSA.js","sourceRoot":"","sources":["../../utils/signUserOperationHashWithECDSA.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,SAAS,EAMZ,MAAM,MAAM,CAAA;AACb,OAAO,EAAsC,MAAM,mBAAmB,CAAA;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAsBzC,MAAM,OAAO,4BAA6B,SAAQ,SAAS;IAEvD,YAAY,EAAE,QAAQ,KAA4B,EAAE;QAChD,KAAK,CACD;YACI,wDAAwD;YACxD,wHAAwH;SAC3H,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACI,QAAQ;YACR,QAAQ,EAAE,SAAS;SACtB,CACJ,CAAA;QAXI;;;;mBAAO,8BAA8B;WAAA;IAY9C,CAAC;CACJ;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EAIjD,EACE,MAAM,EACN,OAAO,EAAE,QAAQ,GAAG,MAAM,EAAE,OAAO,EACnC,IAAI,EACJ,aAAa,EACb,OAAO,EACP,UAAU,EAKb,EAAgB,EAAE;IACf,IAAI,CAAC,QAAQ;QACT,MAAM,IAAI,4BAA4B,CAAC;YACnC,QAAQ,EACJ,gEAAgE;SACvE,CAAC,CAAA;IAEN,IAAI,iBAAuB,CAAA;IAE3B,IAAI,IAAI,EAAE;QACN,iBAAiB,GAAG,IAAI,CAAA;KAC3B;SAAM;QACH,iBAAiB,GAAG,oBAAoB,CAAC;YACrC,aAAa;YACb,OAAO;YACP,UAAU;SACb,CAAC,CAAA;KACL;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;IAEtC,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO;QACxB,OAAO,OAAO,CAAC,WAAW,CAAC;YACvB,OAAO,EAAE;gBACL,GAAG,EAAE,iBAAiB;aACzB;SACJ,CAAC,CAAA;IAEN,IAAI,CAAC,MAAM;QACP,MAAM,IAAI,4BAA4B,CAAC;YACnC,QAAQ,EACJ,gEAAgE;SACvE,CAAC,CAAA;IAEN,OAAO,MAAM,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,CAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC;KAC/C,CAAC,CAAA;AACN,CAAC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { privateKeyToSimpleSmartAccount } from "./privateKeyToSimpleSmartAccount.js";
|
|
2
|
+
import { type SimpleSmartAccount, signerToSimpleSmartAccount } from "./signerToSimpleSmartAccount.js";
|
|
3
|
+
import { privateKeyToSafeSmartAccount } from "./privateKeyToSafeSmartAccount.js";
|
|
4
|
+
import { type SafeSmartAccount, type SafeVersion, signerToSafeSmartAccount } from "./signerToSafeSmartAccount.js";
|
|
5
|
+
import { SignTransactionNotSupportedBySmartAccount, type SmartAccount, type SmartAccountSigner } from "./types.js";
|
|
6
|
+
export { type SafeVersion, type SmartAccountSigner, type SafeSmartAccount, signerToSafeSmartAccount, type SimpleSmartAccount, signerToSimpleSmartAccount, SignTransactionNotSupportedBySmartAccount, privateKeyToSimpleSmartAccount, type SmartAccount, privateKeyToSafeSmartAccount };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../accounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAA;AAEpF,OAAO,EACH,KAAK,kBAAkB,EACvB,0BAA0B,EAC7B,MAAM,iCAAiC,CAAA;AAExC,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,wBAAwB,EAC3B,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EACH,yCAAyC,EACzC,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,YAAY,CAAA;AAEnB,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,0BAA0B,EAC1B,yCAAyC,EACzC,8BAA8B,EAC9B,KAAK,YAAY,EACjB,4BAA4B,EAC/B,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type Hex, type Transport } from "viem";
|
|
2
|
+
import { type SafeSmartAccount, type SafeVersion } from "./signerToSafeSmartAccount.js";
|
|
3
|
+
/**
|
|
4
|
+
* @description Creates an Simple Account from a private key.
|
|
5
|
+
*
|
|
6
|
+
* @returns A Private Key Simple Account.
|
|
7
|
+
*/
|
|
8
|
+
export declare function privateKeyToSafeSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain>, { privateKey, safeVersion, entryPoint, addModuleLibAddress: _addModuleLibAddress, safe4337ModuleAddress: _safe4337ModuleAddress, safeProxyFactoryAddress: _safeProxyFactoryAddress, safeSingletonAddress: _safeSingletonAddress, multiSendAddress: _multiSendAddress, multiSendCallOnlyAddress: _multiSendCallOnlyAddress, saltNonce, safeModules, setupTransactions }: {
|
|
9
|
+
safeVersion: SafeVersion;
|
|
10
|
+
privateKey: Hex;
|
|
11
|
+
entryPoint: Address;
|
|
12
|
+
addModuleLibAddress?: Address;
|
|
13
|
+
safe4337ModuleAddress?: Address;
|
|
14
|
+
safeProxyFactoryAddress?: Address;
|
|
15
|
+
safeSingletonAddress?: Address;
|
|
16
|
+
multiSendAddress?: Address;
|
|
17
|
+
multiSendCallOnlyAddress?: Address;
|
|
18
|
+
saltNonce?: bigint;
|
|
19
|
+
setupTransactions?: {
|
|
20
|
+
to: Address;
|
|
21
|
+
data: Address;
|
|
22
|
+
value: bigint;
|
|
23
|
+
}[];
|
|
24
|
+
safeModules?: Address[];
|
|
25
|
+
}): Promise<SafeSmartAccount<TTransport, TChain>>;
|
|
26
|
+
//# sourceMappingURL=privateKeyToSafeSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateKeyToSafeSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/privateKeyToSafeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEnB,MAAM,+BAA+B,CAAA;AAEtC;;;;GAIG;AACH,wBAAsB,4BAA4B,CAC9C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,EAClC,EACI,UAAU,EACV,WAAW,EACX,UAAU,EACV,mBAAmB,EAAE,oBAAoB,EACzC,qBAAqB,EAAE,sBAAsB,EAC7C,uBAAuB,EAAE,wBAAwB,EACjD,oBAAoB,EAAE,qBAAqB,EAC3C,gBAAgB,EAAE,iBAAiB,EACnC,wBAAwB,EAAE,yBAAyB,EACnD,SAAc,EACd,WAAgB,EAChB,iBAAsB,EACzB,EAAE;IACC,WAAW,EAAE,WAAW,CAAA;IACxB,UAAU,EAAE,GAAG,CAAA;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE;QAChB,EAAE,EAAE,OAAO,CAAA;QACX,IAAI,EAAE,OAAO,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;IACH,WAAW,CAAC,EAAE,OAAO,EAAE,CAAA;CAC1B,GACF,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAiB/C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type Hex, type Transport } from "viem";
|
|
2
|
+
import { type SimpleSmartAccount } from "./signerToSimpleSmartAccount.js";
|
|
3
|
+
/**
|
|
4
|
+
* @description Creates an Simple Account from a private key.
|
|
5
|
+
*
|
|
6
|
+
* @returns A Private Key Simple Account.
|
|
7
|
+
*/
|
|
8
|
+
export declare function privateKeyToSimpleSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain>, { privateKey, factoryAddress, entryPoint, index }: {
|
|
9
|
+
privateKey: Hex;
|
|
10
|
+
factoryAddress: Address;
|
|
11
|
+
entryPoint: Address;
|
|
12
|
+
index?: bigint;
|
|
13
|
+
}): Promise<SimpleSmartAccount<TTransport, TChain>>;
|
|
14
|
+
//# sourceMappingURL=privateKeyToSimpleSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privateKeyToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/privateKeyToSimpleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EACjB,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,iCAAiC,CAAA;AAExC;;;;GAIG;AACH,wBAAsB,8BAA8B,CAChD,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,EAClC,EACI,UAAU,EACV,cAAc,EACd,UAAU,EACV,KAAU,EACb,EAAE;IACC,UAAU,EAAE,GAAG,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,GACF,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CASjD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type Transport } from "viem";
|
|
2
|
+
import { type SmartAccount, type SmartAccountSigner } from "./types.js";
|
|
3
|
+
export type SafeVersion = "1.4.1";
|
|
4
|
+
export type SafeSmartAccount<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = SmartAccount<"SafeSmartAccount", transport, chain>;
|
|
5
|
+
/**
|
|
6
|
+
* @description Creates an Simple Account from a private key.
|
|
7
|
+
*
|
|
8
|
+
* @returns A Private Key Simple Account.
|
|
9
|
+
*/
|
|
10
|
+
export declare function signerToSafeSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain>, { signer, safeVersion, entryPoint, addModuleLibAddress: _addModuleLibAddress, safe4337ModuleAddress: _safe4337ModuleAddress, safeProxyFactoryAddress: _safeProxyFactoryAddress, safeSingletonAddress: _safeSingletonAddress, multiSendAddress: _multiSendAddress, multiSendCallOnlyAddress: _multiSendCallOnlyAddress, saltNonce, safeModules, setupTransactions }: {
|
|
11
|
+
safeVersion: SafeVersion;
|
|
12
|
+
signer: SmartAccountSigner;
|
|
13
|
+
entryPoint: Address;
|
|
14
|
+
addModuleLibAddress?: Address;
|
|
15
|
+
safe4337ModuleAddress?: Address;
|
|
16
|
+
safeProxyFactoryAddress?: Address;
|
|
17
|
+
safeSingletonAddress?: Address;
|
|
18
|
+
multiSendAddress?: Address;
|
|
19
|
+
multiSendCallOnlyAddress?: Address;
|
|
20
|
+
saltNonce?: bigint;
|
|
21
|
+
setupTransactions?: {
|
|
22
|
+
to: Address;
|
|
23
|
+
data: Address;
|
|
24
|
+
value: bigint;
|
|
25
|
+
}[];
|
|
26
|
+
safeModules?: Address[];
|
|
27
|
+
}): Promise<SafeSmartAccount<TTransport, TChain>>;
|
|
28
|
+
//# sourceMappingURL=signerToSafeSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerToSafeSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/signerToSafeSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,SAAS,EAajB,MAAM,MAAM,CAAA;AAUb,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,WAAW,GAAG,OAAO,CAAA;AAmIjC,MAAM,MAAM,gBAAgB,CACxB,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,kBAAkB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AA2TtD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC1C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,EAClC,EACI,MAAM,EACN,WAAW,EACX,UAAU,EACV,mBAAmB,EAAE,oBAAoB,EACzC,qBAAqB,EAAE,sBAAsB,EAC7C,uBAAuB,EAAE,wBAAwB,EACjD,oBAAoB,EAAE,qBAAqB,EAC3C,gBAAgB,EAAE,iBAAiB,EACnC,wBAAwB,EAAE,yBAAyB,EACnD,SAAc,EACd,WAAgB,EAChB,iBAAsB,EACzB,EAAE;IACC,WAAW,EAAE,WAAW,CAAA;IACxB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,UAAU,EAAE,OAAO,CAAA;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE;QAChB,EAAE,EAAE,OAAO,CAAA;QACX,IAAI,EAAE,OAAO,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KAChB,EAAE,CAAA;IACH,WAAW,CAAC,EAAE,OAAO,EAAE,CAAA;CAC1B,GACF,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAwP/C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Address, type Chain, type Client, type Transport } from "viem";
|
|
2
|
+
import { type SmartAccount, type SmartAccountSigner } from "./types.js";
|
|
3
|
+
export type SimpleSmartAccount<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = SmartAccount<"SimpleSmartAccount", transport, chain>;
|
|
4
|
+
/**
|
|
5
|
+
* @description Creates an Simple Account from a private key.
|
|
6
|
+
*
|
|
7
|
+
* @returns A Private Key Simple Account.
|
|
8
|
+
*/
|
|
9
|
+
export declare function signerToSimpleSmartAccount<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain>, { signer, factoryAddress, entryPoint, index }: {
|
|
10
|
+
signer: SmartAccountSigner;
|
|
11
|
+
factoryAddress: Address;
|
|
12
|
+
entryPoint: Address;
|
|
13
|
+
index?: bigint;
|
|
14
|
+
}): Promise<SimpleSmartAccount<TTransport, TChain>>;
|
|
15
|
+
//# sourceMappingURL=signerToSimpleSmartAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signerToSimpleSmartAccount.d.ts","sourceRoot":"","sources":["../../accounts/signerToSimpleSmartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAEX,KAAK,SAAS,EAGjB,MAAM,MAAM,CAAA;AAWb,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,kBAAkB,CAC1B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,oBAAoB,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AAoExD;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC5C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,EAClC,EACI,MAAM,EACN,cAAc,EACd,UAAU,EACV,KAAU,EACb,EAAE;IACC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,cAAc,EAAE,OAAO,CAAA;IACvB,UAAU,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,GACF,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAoJjD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Abi, type Account, type Address, BaseError, type Client, type GetConstructorArgs, type Hex, type LocalAccount } from "viem";
|
|
2
|
+
import type { Chain, Transport } from "viem";
|
|
3
|
+
import { type UserOperation } from "../types/index.js";
|
|
4
|
+
export declare class SignTransactionNotSupportedBySmartAccount extends BaseError {
|
|
5
|
+
name: string;
|
|
6
|
+
constructor({ docsPath }?: {
|
|
7
|
+
docsPath?: string;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export type SmartAccount<Name extends string = string, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined> = LocalAccount<Name> & {
|
|
11
|
+
client: Client<transport, chain>;
|
|
12
|
+
entryPoint: Address;
|
|
13
|
+
getNonce: () => Promise<bigint>;
|
|
14
|
+
getInitCode: () => Promise<Hex>;
|
|
15
|
+
encodeCallData: (args: {
|
|
16
|
+
to: Address;
|
|
17
|
+
value: bigint;
|
|
18
|
+
data: Hex;
|
|
19
|
+
} | {
|
|
20
|
+
to: Address;
|
|
21
|
+
value: bigint;
|
|
22
|
+
data: Hex;
|
|
23
|
+
}[]) => Promise<Hex>;
|
|
24
|
+
getDummySignature(): Promise<Hex>;
|
|
25
|
+
encodeDeployCallData: <TAbi extends Abi | readonly unknown[] = Abi>({ abi, args, bytecode }: {
|
|
26
|
+
abi: TAbi;
|
|
27
|
+
bytecode: Hex;
|
|
28
|
+
} & GetConstructorArgs<TAbi>) => Promise<Hex>;
|
|
29
|
+
signUserOperation: (UserOperation: UserOperation) => Promise<Hex>;
|
|
30
|
+
};
|
|
31
|
+
export type SmartAccountSigner<TAddress extends Address = Address> = Omit<Account<TAddress>, "signTransaction">;
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../accounts/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,SAAS,EACT,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,GAAG,EACR,KAAK,YAAY,EACpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,qBAAa,yCAA0C,SAAQ,SAAS;IAC3D,IAAI,SAA8C;gBAC/C,EAAE,QAAQ,EAAE,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO;CAYvD;AAED,MAAM,MAAM,YAAY,CACpB,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,IAAI,CAAC,GAAG;IACrB,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;IAChC,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/B,WAAW,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;IAC/B,cAAc,EAAE,CACZ,IAAI,EACE;QACI,EAAE,EAAE,OAAO,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,GAAG,CAAA;KACZ,GACD;QACI,EAAE,EAAE,OAAO,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,GAAG,CAAA;KACZ,EAAE,KACR,OAAO,CAAC,GAAG,CAAC,CAAA;IACjB,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;IACjC,oBAAoB,EAAE,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,EAAE,EAChE,GAAG,EACH,IAAI,EACJ,QAAQ,EACX,EAAE;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,QAAQ,EAAE,GAAG,CAAA;KAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3E,iBAAiB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACpE,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO,IAAI,IAAI,CACrE,OAAO,CAAC,QAAQ,CAAC,EACjB,iBAAiB,CACpB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Account, Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { BundlerRpcSchema } from "../../types/bundler.js";
|
|
2
3
|
/**
|
|
3
4
|
* Returns the supported chain id by the bundler service
|
|
4
5
|
*
|
|
@@ -21,5 +22,5 @@ import type { BundlerClient } from "../../clients/bundler.js";
|
|
|
21
22
|
* // Return 5n for Goerli
|
|
22
23
|
*
|
|
23
24
|
*/
|
|
24
|
-
export declare const chainId: (client:
|
|
25
|
+
export declare const chainId: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema>) => Promise<number>;
|
|
25
26
|
//# sourceMappingURL=chainId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainId.d.ts","sourceRoot":"","sources":["../../../actions/bundler/chainId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"chainId.d.ts","sourceRoot":"","sources":["../../../actions/bundler/chainId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO,iPAanB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
1
|
+
import type { Account, Address, Chain, Client, Transport } from "viem";
|
|
2
2
|
import type { PartialBy } from "viem/types/utils";
|
|
3
|
-
import type {
|
|
3
|
+
import type { BundlerRpcSchema } from "../../types/bundler.js";
|
|
4
4
|
import type { UserOperation } from "../../types/userOperation.js";
|
|
5
5
|
export type EstimateUserOperationGasParameters = {
|
|
6
6
|
userOperation: PartialBy<UserOperation, "callGasLimit" | "preVerificationGas" | "verificationGasLimit">;
|
|
@@ -38,5 +38,5 @@ export type EstimateUserOperationGasReturnType = {
|
|
|
38
38
|
* // Return {preVerificationGas: 43492n, verificationGasLimit: 59436n, callGasLimit: 9000n}
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
|
-
export declare const estimateUserOperationGas: (client:
|
|
41
|
+
export declare const estimateUserOperationGas: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema>, args: EstimateUserOperationGasParameters) => Promise<EstimateUserOperationGasReturnType>;
|
|
42
42
|
//# sourceMappingURL=estimateUserOperationGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateUserOperationGas.d.ts","sourceRoot":"","sources":["../../../actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"estimateUserOperationGas.d.ts","sourceRoot":"","sources":["../../../actions/bundler/estimateUserOperationGas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAIjE,MAAM,MAAM,kCAAkC,GAAG;IAC7C,aAAa,EAAE,SAAS,CACpB,aAAa,EACb,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,CACjE,CAAA;IACD,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC7C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,wBAAwB,qOAM3B,kCAAkC,KACzC,QAAQ,kCAAkC,CAgB5C,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Address, Hash } from "viem";
|
|
2
|
-
import type {
|
|
1
|
+
import type { Account, Address, Chain, Client, Hash, Transport } from "viem";
|
|
2
|
+
import type { BundlerRpcSchema } from "../../types/bundler.js";
|
|
3
3
|
import type { UserOperation } from "../../types/userOperation.js";
|
|
4
4
|
export type GetUserOperationByHashParameters = {
|
|
5
5
|
hash: Hash;
|
|
@@ -33,5 +33,5 @@ export type GetUserOperationByHashReturnType = {
|
|
|
33
33
|
* getUserOperationByHash(bundlerClient, {hash: userOpHash})
|
|
34
34
|
*
|
|
35
35
|
*/
|
|
36
|
-
export declare const getUserOperationByHash: (client:
|
|
36
|
+
export declare const getUserOperationByHash: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema>, { hash }: GetUserOperationByHashParameters) => Promise<GetUserOperationByHashReturnType>;
|
|
37
37
|
//# sourceMappingURL=getUserOperationByHash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationByHash.d.ts","sourceRoot":"","sources":["../../../actions/bundler/getUserOperationByHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"getUserOperationByHash.d.ts","sourceRoot":"","sources":["../../../actions/bundler/getUserOperationByHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,MAAM,MAAM,gCAAgC,GAAG;IAC3C,IAAI,EAAE,IAAI,CAAA;CACb,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC3C,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,IAAI,CAAA;IACrB,SAAS,EAAE,IAAI,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;CACtB,GAAG,IAAI,CAAA;AAER;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,yOAMrB,gCAAgC,KAC3C,QAAQ,gCAAgC,CAiC1C,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Address, Hash, Hex } from "viem";
|
|
2
|
-
import type {
|
|
1
|
+
import type { Account, Address, Chain, Client, Hash, Hex, Transport } from "viem";
|
|
2
|
+
import type { BundlerRpcSchema } from "../../types/bundler.js";
|
|
3
3
|
import type { TStatus } from "../../types/userOperation.js";
|
|
4
4
|
export type GetUserOperationReceiptParameters = {
|
|
5
5
|
hash: Hash;
|
|
@@ -58,5 +58,5 @@ export type GetUserOperationReceiptReturnType = {
|
|
|
58
58
|
* getUserOperationReceipt(bundlerClient, {hash: userOpHash})
|
|
59
59
|
*
|
|
60
60
|
*/
|
|
61
|
-
export declare const getUserOperationReceipt: (client:
|
|
61
|
+
export declare const getUserOperationReceipt: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema>, { hash }: GetUserOperationReceiptParameters) => Promise<GetUserOperationReceiptReturnType | null>;
|
|
62
62
|
//# sourceMappingURL=getUserOperationReceipt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"getUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,EACJ,GAAG,EACH,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAG3D,MAAM,MAAM,iCAAiC,GAAG;IAC5C,IAAI,EAAE,IAAI,CAAA;CACb,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC5C,UAAU,EAAE,IAAI,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE;QACL,eAAe,EAAE,GAAG,CAAA;QACpB,gBAAgB,EAAE,MAAM,CAAA;QACxB,SAAS,EAAE,IAAI,CAAA;QACf,WAAW,EAAE,MAAM,CAAA;QACnB,IAAI,EAAE,OAAO,CAAA;QACb,EAAE,EAAE,OAAO,GAAG,IAAI,CAAA;QAClB,iBAAiB,EAAE,MAAM,CAAA;QACzB,MAAM,EAAE,OAAO,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,eAAe,EAAE,OAAO,GAAG,IAAI,CAAA;QAC/B,SAAS,EAAE,GAAG,CAAA;QACd,iBAAiB,EAAE,MAAM,CAAA;KAC5B,CAAA;IACD,IAAI,EAAE;QACF,IAAI,EAAE,GAAG,CAAA;QACT,WAAW,EAAE,MAAM,CAAA;QACnB,SAAS,EAAE,IAAI,CAAA;QACf,eAAe,EAAE,IAAI,CAAA;QACrB,QAAQ,EAAE,MAAM,CAAA;QAChB,gBAAgB,EAAE,MAAM,CAAA;QACxB,OAAO,EAAE,OAAO,CAAA;QAChB,MAAM,EAAE,GAAG,EAAE,CAAA;KAChB,EAAE,CAAA;CACN,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,uBAAuB,yOAMtB,iCAAiC,KAC5C,QAAQ,iCAAiC,GAAG,IAAI,CA4ClD,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Address, Hash } from "viem";
|
|
2
|
-
import type {
|
|
1
|
+
import type { Account, Address, Chain, Client, Hash, Transport } from "viem";
|
|
2
|
+
import type { BundlerRpcSchema } from "../../types/bundler.js";
|
|
3
3
|
import type { UserOperation } from "../../types/userOperation.js";
|
|
4
4
|
export type SendUserOperationParameters = {
|
|
5
5
|
userOperation: UserOperation;
|
|
@@ -14,7 +14,6 @@ export type SendUserOperationParameters = {
|
|
|
14
14
|
* @param args {@link SendUserOperationParameters}.
|
|
15
15
|
* @returns UserOpHash that you can use to track user operation as {@link Hash}.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
17
|
* @example
|
|
19
18
|
* import { createClient } from "viem"
|
|
20
19
|
* import { sendUserOperation } from "permissionless/actions"
|
|
@@ -30,7 +29,6 @@ export type SendUserOperationParameters = {
|
|
|
30
29
|
* })
|
|
31
30
|
*
|
|
32
31
|
* // Return '0xe9fad2cd67f9ca1d0b7a6513b2a42066784c8df938518da2b51bb8cc9a89ea34'
|
|
33
|
-
*
|
|
34
32
|
*/
|
|
35
|
-
export declare const sendUserOperation: (client:
|
|
33
|
+
export declare const sendUserOperation: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema>, args: SendUserOperationParameters) => Promise<Hash>;
|
|
36
34
|
//# sourceMappingURL=sendUserOperation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/bundler/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"sendUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/bundler/sendUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EACR,aAAa,EAEhB,MAAM,8BAA8B,CAAA;AAGrC,MAAM,MAAM,2BAA2B,GAAG;IACtC,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,iBAAiB,qOAMpB,2BAA2B,KAClC,QAAQ,IAAI,CAUd,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
import type {
|
|
1
|
+
import type { Account, Address, Chain, Client, Transport } from "viem";
|
|
2
|
+
import type { BundlerRpcSchema } from "../../types/bundler.js";
|
|
3
3
|
/**
|
|
4
4
|
* Returns the supported entrypoints by the bundler service
|
|
5
5
|
*
|
|
@@ -22,5 +22,5 @@ import type { BundlerClient } from "../../clients/bundler.js";
|
|
|
22
22
|
* // Return ['0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789']
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
|
-
export declare const supportedEntryPoints: (client:
|
|
25
|
+
export declare const supportedEntryPoints: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(client: Client<TTransport, TChain, TAccount, BundlerRpcSchema>) => Promise<Address[]>;
|
|
26
26
|
//# sourceMappingURL=supportedEntryPoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportedEntryPoints.d.ts","sourceRoot":"","sources":["../../../actions/bundler/supportedEntryPoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"supportedEntryPoints.d.ts","sourceRoot":"","sources":["../../../actions/bundler/supportedEntryPoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,kOAM9B,QAAQ,OAAO,EAAE,CAKnB,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseError, type Chain, type Hash } from "viem";
|
|
2
|
-
import type { BundlerClient } from "../../clients/bundler.js";
|
|
1
|
+
import { type Account, BaseError, type Chain, type Client, type Hash, type Transport } from "viem";
|
|
3
2
|
import { type GetUserOperationReceiptReturnType } from "./getUserOperationReceipt.js";
|
|
4
3
|
export declare class WaitForUserOperationReceiptTimeoutError extends BaseError {
|
|
5
4
|
name: string;
|
|
@@ -39,5 +38,5 @@ export type WaitForUserOperationReceiptParameters = {
|
|
|
39
38
|
* hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
|
|
40
39
|
* })
|
|
41
40
|
*/
|
|
42
|
-
export declare const waitForUserOperationReceipt: <TChain extends Chain | undefined>(bundlerClient:
|
|
41
|
+
export declare const waitForUserOperationReceipt: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends Account | undefined = Account | undefined>(bundlerClient: Client<TTransport, TChain, TAccount>, { hash, pollingInterval, timeout }: WaitForUserOperationReceiptParameters) => Promise<GetUserOperationReceiptReturnType>;
|
|
43
42
|
//# sourceMappingURL=waitForUserOperationReceipt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitForUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../actions/bundler/waitForUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"waitForUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../actions/bundler/waitForUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,SAAS,EACT,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,SAAS,EAEjB,MAAM,MAAM,CAAA;AAGb,OAAO,EACH,KAAK,iCAAiC,EAEzC,MAAM,8BAA8B,CAAA;AAErC,qBAAa,uCAAwC,SAAQ,SAAS;IACzD,IAAI,SAA4C;gBAC7C,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;CAKvC;AAED,MAAM,MAAM,qCAAqC,GAAG;IAChD,mCAAmC;IACnC,IAAI,EAAE,IAAI,CAAA;IACV;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,2BAA2B,wPAUjC,qCAAqC,KACzC,QAAQ,iCAAiC,CAgD3C,CAAA"}
|