permissionless 0.0.2 → 0.0.3
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 +10 -0
- package/_cjs/actions/bundler.js +4 -3
- package/_cjs/actions/bundler.js.map +1 -1
- package/_cjs/actions/index.js +2 -1
- package/_cjs/actions/index.js.map +1 -1
- package/_cjs/actions/pimlico.js +55 -0
- package/_cjs/actions/pimlico.js.map +1 -0
- package/_cjs/actions/utils.js +5 -1
- package/_cjs/actions/utils.js.map +1 -1
- package/_cjs/clients/bundler.js +17 -0
- package/_cjs/clients/bundler.js.map +1 -0
- package/_cjs/clients/index.js +6 -0
- package/_cjs/clients/index.js.map +1 -0
- package/_cjs/clients/pimlico.js +29 -0
- package/_cjs/clients/pimlico.js.map +1 -0
- package/_cjs/index.js +1 -0
- package/_cjs/index.js.map +1 -1
- package/_cjs/types/pimlico.js +3 -0
- package/_cjs/types/pimlico.js.map +1 -0
- package/_esm/actions/bundler.js +12 -145
- package/_esm/actions/bundler.js.map +1 -1
- package/_esm/actions/index.js +2 -2
- package/_esm/actions/index.js.map +1 -1
- package/_esm/actions/pimlico.js +127 -0
- package/_esm/actions/pimlico.js.map +1 -0
- package/_esm/actions/utils.js +4 -0
- package/_esm/actions/utils.js.map +1 -1
- package/_esm/clients/bundler.js +33 -0
- package/_esm/clients/bundler.js.map +1 -0
- package/_esm/clients/index.js +3 -0
- package/_esm/clients/index.js.map +1 -0
- package/_esm/clients/pimlico.js +64 -0
- package/_esm/clients/pimlico.js.map +1 -0
- package/_esm/index.js +1 -0
- package/_esm/index.js.map +1 -1
- package/_esm/types/pimlico.js +2 -0
- package/_esm/types/pimlico.js.map +1 -0
- package/_types/actions/bundler.d.ts +113 -24
- package/_types/actions/bundler.d.ts.map +1 -1
- package/_types/actions/index.d.ts +4 -2
- package/_types/actions/index.d.ts.map +1 -1
- package/_types/actions/pimlico.d.ts +184 -0
- package/_types/actions/pimlico.d.ts.map +1 -0
- package/_types/actions/utils.d.ts +4 -0
- package/_types/actions/utils.d.ts.map +1 -1
- package/_types/clients/bundler.d.ts +39 -0
- package/_types/clients/bundler.d.ts.map +1 -0
- package/_types/clients/index.d.ts +3 -0
- package/_types/clients/index.d.ts.map +1 -0
- package/_types/clients/pimlico.d.ts +75 -0
- package/_types/clients/pimlico.d.ts.map +1 -0
- package/_types/index.d.ts +1 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/types/bundler.d.ts +4 -37
- package/_types/types/bundler.d.ts.map +1 -1
- package/_types/types/index.d.ts +1 -2
- package/_types/types/index.d.ts.map +1 -1
- package/_types/types/pimlico.d.ts +50 -0
- package/_types/types/pimlico.d.ts.map +1 -0
- package/_types/types/userOperation.d.ts +1 -0
- package/_types/types/userOperation.d.ts.map +1 -1
- package/actions/bundler.ts +85 -33
- package/actions/index.ts +23 -7
- package/actions/pimlico.ts +258 -0
- package/actions/utils.ts +5 -0
- package/clients/bundler.ts +39 -0
- package/clients/index.ts +3 -0
- package/clients/pimlico.ts +93 -0
- package/index.ts +1 -0
- package/package.json +18 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/bundler.ts +4 -39
- package/types/index.ts +1 -2
- package/types/pimlico.ts +55 -0
- package/types/userOperation.ts +2 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { deepHexlify } from "./utils";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the live gas prices that you can use to send a user operation.
|
|
4
|
+
*
|
|
5
|
+
* - Docs: [TODO://add link]
|
|
6
|
+
* - Example: [TODO://add link]
|
|
7
|
+
*
|
|
8
|
+
* @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
|
|
9
|
+
* @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas
|
|
10
|
+
*
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { createClient } from "viem"
|
|
14
|
+
* import { getUserOperationGasPrice } from "permissionless/actions"
|
|
15
|
+
*
|
|
16
|
+
* const bundlerClient = createClient({
|
|
17
|
+
* chain: goerli,
|
|
18
|
+
* transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
|
|
19
|
+
* })
|
|
20
|
+
*
|
|
21
|
+
* await getUserOperationGasPrice(bundlerClient)
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export const getUserOperationGasPrice = async (client) => {
|
|
25
|
+
const gasPrices = await client.request({
|
|
26
|
+
method: "pimlico_getUserOperationGasPrice",
|
|
27
|
+
params: []
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
slow: {
|
|
31
|
+
maxFeePerGas: BigInt(gasPrices.slow.maxFeePerGas),
|
|
32
|
+
maxPriorityFeePerGas: BigInt(gasPrices.slow.maxPriorityFeePerGas)
|
|
33
|
+
},
|
|
34
|
+
standard: {
|
|
35
|
+
maxFeePerGas: BigInt(gasPrices.standard.maxFeePerGas),
|
|
36
|
+
maxPriorityFeePerGas: BigInt(gasPrices.standard.maxPriorityFeePerGas)
|
|
37
|
+
},
|
|
38
|
+
fast: {
|
|
39
|
+
maxFeePerGas: BigInt(gasPrices.fast.maxFeePerGas),
|
|
40
|
+
maxPriorityFeePerGas: BigInt(gasPrices.fast.maxPriorityFeePerGas)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Returns the status of the userOperation that is pending in the mempool.
|
|
46
|
+
*
|
|
47
|
+
* - Docs: [TODO://add link]
|
|
48
|
+
* - Example: [TODO://add link]
|
|
49
|
+
*
|
|
50
|
+
* @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
|
|
51
|
+
* @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
|
|
52
|
+
* @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
|
|
53
|
+
*
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* import { createClient } from "viem"
|
|
57
|
+
* import { getUserOperationStatus } from "permissionless/actions"
|
|
58
|
+
*
|
|
59
|
+
* const bundlerClient = createClient({
|
|
60
|
+
* chain: goerli,
|
|
61
|
+
* transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
|
|
62
|
+
* })
|
|
63
|
+
*
|
|
64
|
+
* await getUserOperationStatus(bundlerClient, { hash: userOpHash })
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export const getUserOperationStatus = async (client, { hash }) => {
|
|
68
|
+
return client.request({
|
|
69
|
+
method: "pimlico_getUserOperationStatus",
|
|
70
|
+
params: [hash]
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export const pimlicoBundlerActions = (client) => ({
|
|
74
|
+
getUserOperationGasPrice: async () => getUserOperationGasPrice(client),
|
|
75
|
+
getUserOperationStatus: async (args) => getUserOperationStatus(client, args)
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
|
|
79
|
+
*
|
|
80
|
+
* - Docs: [TODO://add link]
|
|
81
|
+
* - Example: [TODO://add link]
|
|
82
|
+
*
|
|
83
|
+
* @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
|
|
84
|
+
* @param args {@link sponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
|
|
85
|
+
* @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
|
|
86
|
+
*
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* import { createClient } from "viem"
|
|
90
|
+
* import { sponsorUserOperation } from "permissionless/actions"
|
|
91
|
+
*
|
|
92
|
+
* const bundlerClient = createClient({
|
|
93
|
+
* chain: goerli,
|
|
94
|
+
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
|
|
95
|
+
* })
|
|
96
|
+
*
|
|
97
|
+
* await sponsorUserOperation(bundlerClient, {
|
|
98
|
+
* userOperation: userOperationWithDummySignature,
|
|
99
|
+
* entryPoint: entryPoint
|
|
100
|
+
* }})
|
|
101
|
+
*
|
|
102
|
+
*/
|
|
103
|
+
export const sponsorUserOperation = async (client, args) => {
|
|
104
|
+
const response = await client.request({
|
|
105
|
+
method: "pm_sponsorUserOperation",
|
|
106
|
+
params: [deepHexlify(args.userOperation), args.entryPoint]
|
|
107
|
+
});
|
|
108
|
+
return {
|
|
109
|
+
paymasterAndData: response.paymasterAndData,
|
|
110
|
+
preVerificationGas: BigInt(response.preVerificationGas),
|
|
111
|
+
verificationGasLimit: BigInt(response.verificationGasLimit),
|
|
112
|
+
callGasLimit: BigInt(response.callGasLimit)
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export const pimlicoPaymasterActions = (client) => ({
|
|
116
|
+
sponsorUserOperation: async (args) => sponsorUserOperation(client, args)
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* TODO: Add support for pimlicoActions after we support all the actions of v1 in v2 of the Pimlico API.
|
|
120
|
+
*/
|
|
121
|
+
// export const pimlicoActions = (client: Client) => {
|
|
122
|
+
// return {
|
|
123
|
+
// ...pimlicoBundlerActions(client),
|
|
124
|
+
// ...pimlicoPaymasterActions(client)
|
|
125
|
+
// }
|
|
126
|
+
// }
|
|
127
|
+
//# sourceMappingURL=pimlico.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../actions/pimlico.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAsCrC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EACzC,MAA4B,EACe,EAAE;IAC7C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC;QACnC,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE,EAAE;KACb,CA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AAO,CAAC;QAClC,MAAM,EAAE,yBAAyB;QACjC,MAAM,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAiC,EAAE,IAAI,CAAC,UAAU,CAAC;KAC7F,CAAC,CAAA;IAEF,OAAO;QACH,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;QAC3C,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACvD,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAC3D,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;KAC9C,CAAA;AACL,CAAC,CAAA;AA8BD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAc,EAAiC,EAAE,CAAC,CAAC;IACvF,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"}
|
package/_esm/actions/utils.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { toHex } from "viem";
|
|
2
|
+
export const transactionReceiptStatus = {
|
|
3
|
+
"0x0": "reverted",
|
|
4
|
+
"0x1": "success"
|
|
5
|
+
};
|
|
2
6
|
// biome-ignore lint/suspicious/noExplicitAny: it's a recursive function, so it's hard to type
|
|
3
7
|
export function deepHexlify(obj) {
|
|
4
8
|
if (typeof obj === "function") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../actions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAE5B,8FAA8F;AAC9F,MAAM,UAAU,WAAW,CAAC,GAAQ;IAChC,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC3B,OAA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,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,CAC1B,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QACX,GAAG,GAAG;QACN,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;KAC/B,CAAC,EACF,EAAE,CACL,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createClient } from "viem";
|
|
2
|
+
import { bundlerActions } from "../actions";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a EIP-4337 compliant Bundler Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
5
|
+
*
|
|
6
|
+
* - Docs: [TODO://add link]
|
|
7
|
+
* - Example: [TODO://add link]
|
|
8
|
+
*
|
|
9
|
+
* A Bundler Client is an interface to "erc 4337" [JSON-RPC API](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace) methods such as sending user operation, estimating gas for a user operation, get user operation receipt, etc through [Bundler Actions](TODO://Add bundler action documentation link).
|
|
10
|
+
*
|
|
11
|
+
* @param config - {@link PublicClientConfig}
|
|
12
|
+
* @returns A Bundler Client. {@link BundlerClient}
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { createPublicClient, http } from 'viem'
|
|
16
|
+
* import { mainnet } from 'viem/chains'
|
|
17
|
+
*
|
|
18
|
+
* const bundlerClient = createBundlerClient({
|
|
19
|
+
* chain: mainnet,
|
|
20
|
+
* transport: http(BUNDLER_URL),
|
|
21
|
+
* })
|
|
22
|
+
*/
|
|
23
|
+
export const createBundlerClient = (parameters) => {
|
|
24
|
+
const { key = "public", name = "Bundler Client" } = parameters;
|
|
25
|
+
const client = createClient({
|
|
26
|
+
...parameters,
|
|
27
|
+
key,
|
|
28
|
+
name,
|
|
29
|
+
type: "bundlerClient"
|
|
30
|
+
});
|
|
31
|
+
return client.extend(bundlerActions);
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=bundler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.js","sourceRoot":"","sources":["../../clients/bundler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAK3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAC/B,UAAgD,EACnC,EAAE;IACf,MAAM,EAAE,GAAG,GAAG,QAAQ,EAAE,IAAI,GAAG,gBAAgB,EAAE,GAAG,UAAU,CAAA;IAC9D,MAAM,MAAM,GAAG,YAAY,CAAC;QACxB,GAAG,UAAU;QACb,GAAG;QACH,IAAI;QACJ,IAAI,EAAE,eAAe;KACxB,CAAC,CAAA;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;AACxC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAsB,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createClient } from "viem";
|
|
2
|
+
import { bundlerActions } from "../actions";
|
|
3
|
+
import { pimlicoBundlerActions, pimlicoPaymasterActions } from "../actions/pimlico";
|
|
4
|
+
/**
|
|
5
|
+
* Creates a pimlico specific Bundler Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
6
|
+
*
|
|
7
|
+
* - Docs: [TODO://add link]
|
|
8
|
+
* - Example: [TODO://add link]
|
|
9
|
+
*
|
|
10
|
+
* A Pimlico Client is an interface to "pimlico endpoints" [JSON-RPC API](https://docs.pimlico.io/reference/bundler/endpoints) methods such as getting current blockchain gas prices, getting user operation status, etc through [Pimlico Bundler Actions](TODO://Add bundler action documentation link).
|
|
11
|
+
*
|
|
12
|
+
* @param config - {@link PublicClientConfig}
|
|
13
|
+
* @returns A Pimlico Bundler Client. {@link PimlicoBundlerClient}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { createPublicClient, http } from 'viem'
|
|
17
|
+
* import { mainnet } from 'viem/chains'
|
|
18
|
+
*
|
|
19
|
+
* const pimlicoBundlerClient = createPimlicoBundlerClient({
|
|
20
|
+
* chain: mainnet,
|
|
21
|
+
* transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
22
|
+
* })
|
|
23
|
+
*/
|
|
24
|
+
export const createPimlicoBundlerClient = (parameters) => {
|
|
25
|
+
const { key = "public", name = "Pimlico Bundler Client" } = parameters;
|
|
26
|
+
const client = createClient({
|
|
27
|
+
...parameters,
|
|
28
|
+
key,
|
|
29
|
+
name,
|
|
30
|
+
type: "pimlicoBundlerClient"
|
|
31
|
+
});
|
|
32
|
+
return client.extend(bundlerActions).extend(pimlicoBundlerActions);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Creates a pimlico specific Paymaster Client with a given [Transport](https://viem.sh/docs/clients/intro.html) configured for a [Chain](https://viem.sh/docs/clients/chains.html).
|
|
36
|
+
*
|
|
37
|
+
* - Docs: [TODO://add link]
|
|
38
|
+
* - Example: [TODO://add link]
|
|
39
|
+
*
|
|
40
|
+
* A Pimlico Paymaster Client is an interface to "pimlico paymaster endpoints" [JSON-RPC API](https://docs.pimlico.io/reference/verifying-paymaster/endpoints) methods such as sponsoring user operation, etc through [Pimlico Paymaster Actions](TODO://Add bundler action documentation link).
|
|
41
|
+
*
|
|
42
|
+
* @param config - {@link PublicClientConfig}
|
|
43
|
+
* @returns A Pimlico Paymaster Client. {@link PimlicoPaymasterClient}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* import { createPublicClient, http } from 'viem'
|
|
47
|
+
* import { mainnet } from 'viem/chains'
|
|
48
|
+
*
|
|
49
|
+
* const pimlicoPaymasterClient = createPimlicoPaymasterClient({
|
|
50
|
+
* chain: mainnet,
|
|
51
|
+
* transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
export const createPimlicoPaymasterClient = (parameters) => {
|
|
55
|
+
const { key = "public", name = "Pimlico Paymaster Client" } = parameters;
|
|
56
|
+
const client = createClient({
|
|
57
|
+
...parameters,
|
|
58
|
+
key,
|
|
59
|
+
name,
|
|
60
|
+
type: "pimlicoPaymasterClient"
|
|
61
|
+
});
|
|
62
|
+
return client.extend(pimlicoPaymasterActions);
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=pimlico.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../clients/pimlico.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3C,OAAO,EAGH,qBAAqB,EACrB,uBAAuB,EAC1B,MAAM,oBAAoB,CAAA;AAmB3B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACtC,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;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CACxC,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/index.js
CHANGED
package/_esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pimlico.js","sourceRoot":"","sources":["../../types/pimlico.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Address } from "abitype";
|
|
2
|
-
import type { Client, Hash } from "viem";
|
|
2
|
+
import type { Client, Hash, Hex } from "viem";
|
|
3
3
|
import type { PartialBy } from "viem/types/utils";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
4
|
+
import type { BundlerClient } from "../clients/bundler";
|
|
5
|
+
import type { UserOperation } from "../types";
|
|
6
|
+
import type { TStatus } from "../types/userOperation";
|
|
6
7
|
export type SendUserOperationParameters = {
|
|
7
8
|
userOperation: UserOperation;
|
|
8
9
|
entryPoint: Address;
|
|
@@ -16,12 +17,51 @@ export type EstimateUserOperationGasReturnType = {
|
|
|
16
17
|
verificationGasLimit: bigint;
|
|
17
18
|
callGasLimit: bigint;
|
|
18
19
|
};
|
|
19
|
-
export type
|
|
20
|
+
export type GetUserOperationByHashParameters = {
|
|
20
21
|
hash: Hash;
|
|
21
22
|
};
|
|
22
|
-
export type
|
|
23
|
+
export type GetUserOperationByHashReturnType = {
|
|
24
|
+
userOperation: UserOperation;
|
|
25
|
+
entryPoint: Address;
|
|
26
|
+
transactionHash: Hash;
|
|
27
|
+
blockHash: Hash;
|
|
28
|
+
blockNumber: bigint;
|
|
29
|
+
} | null;
|
|
30
|
+
export type GetUserOperationReceiptParameters = {
|
|
23
31
|
hash: Hash;
|
|
24
32
|
};
|
|
33
|
+
export type GetUserOperationReceiptReturnType = {
|
|
34
|
+
userOpHash: Hash;
|
|
35
|
+
sender: Address;
|
|
36
|
+
nonce: bigint;
|
|
37
|
+
actualGasUsed: bigint;
|
|
38
|
+
actualGasCost: bigint;
|
|
39
|
+
success: boolean;
|
|
40
|
+
receipt: {
|
|
41
|
+
transactionHash: Hex;
|
|
42
|
+
transactionIndex: bigint;
|
|
43
|
+
blockHash: Hash;
|
|
44
|
+
blockNumber: bigint;
|
|
45
|
+
from: Address;
|
|
46
|
+
to: Address | null;
|
|
47
|
+
cumulativeGasUsed: bigint;
|
|
48
|
+
status: TStatus;
|
|
49
|
+
gasUsed: bigint;
|
|
50
|
+
contractAddress: Address | null;
|
|
51
|
+
logsBloom: Hex;
|
|
52
|
+
effectiveGasPrice: bigint;
|
|
53
|
+
};
|
|
54
|
+
logs: {
|
|
55
|
+
data: Hex;
|
|
56
|
+
blockNumber: bigint;
|
|
57
|
+
blockHash: Hash;
|
|
58
|
+
transactionHash: Hash;
|
|
59
|
+
logIndex: bigint;
|
|
60
|
+
transactionIndex: bigint;
|
|
61
|
+
address: Address;
|
|
62
|
+
topics: Hex[];
|
|
63
|
+
}[];
|
|
64
|
+
} | null;
|
|
25
65
|
/**
|
|
26
66
|
* Sends user operation to the bundler
|
|
27
67
|
*
|
|
@@ -62,7 +102,7 @@ export declare const sendUserOperation: (client: BundlerClient, args: SendUserOp
|
|
|
62
102
|
*
|
|
63
103
|
* @example
|
|
64
104
|
* import { createClient } from "viem"
|
|
65
|
-
* import {
|
|
105
|
+
* import { estimateUserOperationGas } from "permissionless/actions"
|
|
66
106
|
*
|
|
67
107
|
* const bundlerClient = createClient({
|
|
68
108
|
* chain: goerli,
|
|
@@ -89,7 +129,7 @@ export declare const estimateUserOperationGas: (client: BundlerClient, args: Est
|
|
|
89
129
|
*
|
|
90
130
|
* @example
|
|
91
131
|
* import { createClient } from "viem"
|
|
92
|
-
* import {
|
|
132
|
+
* import { supportedEntryPoints } from "permissionless/actions"
|
|
93
133
|
*
|
|
94
134
|
* const bundlerClient = createClient({
|
|
95
135
|
* chain: goerli,
|
|
@@ -112,14 +152,14 @@ export declare const supportedEntryPoints: (client: BundlerClient) => Promise<Ad
|
|
|
112
152
|
*
|
|
113
153
|
* @example
|
|
114
154
|
* import { createClient } from "viem"
|
|
115
|
-
* import {
|
|
155
|
+
* import { chainId } from "permissionless/actions"
|
|
116
156
|
*
|
|
117
157
|
* const bundlerClient = createClient({
|
|
118
158
|
* chain: goerli,
|
|
119
159
|
* transport: http(BUNDLER_URL)
|
|
120
160
|
* })
|
|
121
161
|
*
|
|
122
|
-
* const
|
|
162
|
+
* const bundlerChainId = chainId(bundlerClient)
|
|
123
163
|
* // Return 5n for Goerli
|
|
124
164
|
*
|
|
125
165
|
*/
|
|
@@ -130,13 +170,13 @@ export declare const chainId: (client: BundlerClient) => Promise<bigint>;
|
|
|
130
170
|
* - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/getUserOperationByHash
|
|
131
171
|
*
|
|
132
172
|
* @param client {@link BundlerClient} that you created using viem's createClient and extended it with bundlerActions.
|
|
133
|
-
* @param args {@link
|
|
173
|
+
* @param args {@link GetUserOperationByHashParameters} UserOpHash that was returned by {@link sendUserOperation}
|
|
134
174
|
* @returns userOperation along with entryPoint, transactionHash, blockHash, blockNumber if found or null
|
|
135
175
|
*
|
|
136
176
|
*
|
|
137
177
|
* @example
|
|
138
178
|
* import { createClient } from "viem"
|
|
139
|
-
* import {
|
|
179
|
+
* import { getUserOperationByHash } from "permissionless/actions"
|
|
140
180
|
*
|
|
141
181
|
* const bundlerClient = createClient({
|
|
142
182
|
* chain: goerli,
|
|
@@ -146,14 +186,68 @@ export declare const chainId: (client: BundlerClient) => Promise<bigint>;
|
|
|
146
186
|
* getUserOperationByHash(bundlerClient, {hash: userOpHash})
|
|
147
187
|
*
|
|
148
188
|
*/
|
|
149
|
-
export declare const getUserOperationByHash: (client: BundlerClient, { hash }:
|
|
189
|
+
export declare const getUserOperationByHash: (client: BundlerClient, { hash }: GetUserOperationByHashParameters) => Promise<{
|
|
150
190
|
userOperation: UserOperation;
|
|
151
191
|
entryPoint: Address;
|
|
152
192
|
transactionHash: Hash;
|
|
153
193
|
blockHash: Hash;
|
|
154
194
|
blockNumber: bigint;
|
|
155
195
|
} | null>;
|
|
156
|
-
|
|
196
|
+
/**
|
|
197
|
+
* Returns the user operation receipt from userOpHash
|
|
198
|
+
*
|
|
199
|
+
* - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/getUserOperationReceipt
|
|
200
|
+
*
|
|
201
|
+
* @param client {@link BundlerClient} that you created using viem's createClient and extended it with bundlerActions.
|
|
202
|
+
* @param args {@link GetUserOperationReceiptParameters} UserOpHash that was returned by {@link sendUserOperation}
|
|
203
|
+
* @returns user operation receipt {@link GetUserOperationReceiptReturnType} if found or null
|
|
204
|
+
*
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* import { createClient } from "viem"
|
|
208
|
+
* import { getUserOperationReceipt } from "permissionless/actions"
|
|
209
|
+
*
|
|
210
|
+
* const bundlerClient = createClient({
|
|
211
|
+
* chain: goerli,
|
|
212
|
+
* transport: http(BUNDLER_URL)
|
|
213
|
+
* })
|
|
214
|
+
*
|
|
215
|
+
* getUserOperationReceipt(bundlerClient, {hash: userOpHash})
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
export declare const getUserOperationReceipt: (client: BundlerClient, { hash }: GetUserOperationReceiptParameters) => Promise<{
|
|
219
|
+
userOpHash: Hash;
|
|
220
|
+
sender: Address;
|
|
221
|
+
nonce: bigint;
|
|
222
|
+
actualGasUsed: bigint;
|
|
223
|
+
actualGasCost: bigint;
|
|
224
|
+
success: boolean;
|
|
225
|
+
receipt: {
|
|
226
|
+
transactionHash: Hex;
|
|
227
|
+
transactionIndex: bigint;
|
|
228
|
+
blockHash: Hash;
|
|
229
|
+
blockNumber: bigint;
|
|
230
|
+
from: Address;
|
|
231
|
+
to: Address | null;
|
|
232
|
+
cumulativeGasUsed: bigint;
|
|
233
|
+
status: TStatus;
|
|
234
|
+
gasUsed: bigint;
|
|
235
|
+
contractAddress: Address | null;
|
|
236
|
+
logsBloom: Hex;
|
|
237
|
+
effectiveGasPrice: bigint;
|
|
238
|
+
};
|
|
239
|
+
logs: {
|
|
240
|
+
data: Hex;
|
|
241
|
+
blockNumber: bigint;
|
|
242
|
+
blockHash: Hash;
|
|
243
|
+
transactionHash: Hash;
|
|
244
|
+
logIndex: bigint;
|
|
245
|
+
transactionIndex: bigint;
|
|
246
|
+
address: Address;
|
|
247
|
+
topics: Hex[];
|
|
248
|
+
}[];
|
|
249
|
+
} | null>;
|
|
250
|
+
export type BundlerActions = {
|
|
157
251
|
/**
|
|
158
252
|
*
|
|
159
253
|
* Sends user operation to the bundler
|
|
@@ -169,7 +263,7 @@ declare const bundlerActions: (client: Client) => {
|
|
|
169
263
|
*
|
|
170
264
|
* const bundlerClient = createClient({
|
|
171
265
|
* chain: goerli,
|
|
172
|
-
* transport: http(
|
|
266
|
+
* transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
|
|
173
267
|
* }).extend(bundlerActions)
|
|
174
268
|
*
|
|
175
269
|
* const userOpHash = await bundlerClient.sendUserOperation({
|
|
@@ -270,21 +364,15 @@ declare const bundlerActions: (client: Client) => {
|
|
|
270
364
|
* await bundlerClient.getUserOperationByHash(userOpHash)
|
|
271
365
|
*
|
|
272
366
|
*/
|
|
273
|
-
getUserOperationByHash: (args:
|
|
274
|
-
userOperation: UserOperation;
|
|
275
|
-
entryPoint: Address;
|
|
276
|
-
transactionHash: Hash;
|
|
277
|
-
blockHash: Hash;
|
|
278
|
-
blockNumber: bigint;
|
|
279
|
-
} | null>;
|
|
367
|
+
getUserOperationByHash: (args: GetUserOperationByHashParameters) => Promise<GetUserOperationByHashReturnType>;
|
|
280
368
|
/**
|
|
281
369
|
*
|
|
282
370
|
* Returns the user operation receipt from userOpHash
|
|
283
371
|
*
|
|
284
372
|
* - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/getUserOperationReceipt
|
|
285
373
|
*
|
|
286
|
-
* @param args {@link
|
|
287
|
-
* @returns user operation receipt {@link
|
|
374
|
+
* @param args {@link GetUserOperationReceiptParameters} UserOpHash that was returned by {@link sendUserOperation}
|
|
375
|
+
* @returns user operation receipt {@link GetUserOperationReceiptReturnType} if found or null
|
|
288
376
|
*
|
|
289
377
|
* @example
|
|
290
378
|
* import { createClient } from "viem"
|
|
@@ -298,7 +386,8 @@ declare const bundlerActions: (client: Client) => {
|
|
|
298
386
|
* await bundlerClient.getUserOperationReceipt({hash: userOpHash})
|
|
299
387
|
*
|
|
300
388
|
*/
|
|
301
|
-
getUserOperationReceipt: (args:
|
|
389
|
+
getUserOperationReceipt: (args: GetUserOperationReceiptParameters) => Promise<GetUserOperationReceiptReturnType>;
|
|
302
390
|
};
|
|
391
|
+
declare const bundlerActions: (client: Client) => BundlerActions;
|
|
303
392
|
export default bundlerActions;
|
|
304
393
|
//# sourceMappingURL=bundler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../actions/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../actions/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAgC,MAAM,wBAAwB,CAAA;AAGnF,MAAM,MAAM,2BAA2B,GAAG;IACtC,aAAa,EAAE,aAAa,CAAA;IAC5B,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC7C,aAAa,EAAE,SAAS,CAAC,aAAa,EAAE,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,CAAC,CAAA;IACvG,U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Ae,cAAc,CAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import type { EstimateUserOperationGasParameters, EstimateUserOperationGasReturnType, GetUserOperationByHashParameters, GetUserOperationByHashReturnType, GetUserOperationReceiptParameters, GetUserOperationReceiptReturnType, SendUserOperationParameters } from "./bundler";
|
|
2
|
+
import bundlerActions, { chainId, estimateUserOperationGas, getUserOperationByHash, getUserOperationReceipt, sendUserOperation, supportedEntryPoints } from "./bundler";
|
|
3
|
+
export type { SendUserOperationParameters, EstimateUserOperationGasParameters, EstimateUserOperationGasReturnType, GetUserOperationByHashParameters, GetUserOperationByHashReturnType, GetUserOperationReceiptParameters, GetUserOperationReceiptReturnType };
|
|
4
|
+
export { bundlerActions, sendUserOperation, estimateUserOperationGas, supportedEntryPoints, chainId, getUserOperationByHash, getUserOperationReceipt };
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,kCAAkC,EAClC,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,iCAAiC,EACjC,2BAA2B,EAC9B,MAAM,WAAW,CAAA;AAElB,OAAO,cAAc,EAAE,EACnB,OAAO,EACP,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACvB,MAAM,WAAW,CAAA;AAElB,YAAY,EACR,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,iCAAiC,EACpC,CAAA;AAED,OAAO,EACH,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,OAAO,EACP,sBAAsB,EACtB,uBAAuB,EAC1B,CAAA"}
|