permissionless 0.0.1 → 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.
Files changed (92) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/_cjs/actions/bundler.js +118 -0
  3. package/_cjs/actions/bundler.js.map +1 -0
  4. package/_cjs/actions/index.js +12 -0
  5. package/_cjs/actions/index.js.map +1 -0
  6. package/_cjs/actions/pimlico.js +55 -0
  7. package/_cjs/actions/pimlico.js.map +1 -0
  8. package/_cjs/actions/utils.js +31 -0
  9. package/_cjs/actions/utils.js.map +1 -0
  10. package/_cjs/clients/bundler.js +17 -0
  11. package/_cjs/clients/bundler.js.map +1 -0
  12. package/_cjs/clients/index.js +6 -0
  13. package/_cjs/clients/index.js.map +1 -0
  14. package/_cjs/clients/pimlico.js +29 -0
  15. package/_cjs/clients/pimlico.js.map +1 -0
  16. package/_cjs/index.js +7 -0
  17. package/_cjs/index.js.map +1 -0
  18. package/_cjs/package.json +1 -0
  19. package/_cjs/types/bundler.js +3 -0
  20. package/_cjs/types/bundler.js.map +1 -0
  21. package/_cjs/types/index.js +3 -0
  22. package/_cjs/types/index.js.map +1 -0
  23. package/_cjs/types/pimlico.js +3 -0
  24. package/_cjs/types/pimlico.js.map +1 -0
  25. package/_cjs/types/userOperation.js +3 -0
  26. package/_cjs/types/userOperation.js.map +1 -0
  27. package/_esm/actions/bundler.js +251 -0
  28. package/_esm/actions/bundler.js.map +1 -0
  29. package/_esm/actions/index.js +3 -0
  30. package/_esm/actions/index.js.map +1 -0
  31. package/_esm/actions/pimlico.js +127 -0
  32. package/_esm/actions/pimlico.js.map +1 -0
  33. package/_esm/actions/utils.js +28 -0
  34. package/_esm/actions/utils.js.map +1 -0
  35. package/_esm/clients/bundler.js +33 -0
  36. package/_esm/clients/bundler.js.map +1 -0
  37. package/_esm/clients/index.js +3 -0
  38. package/_esm/clients/index.js.map +1 -0
  39. package/_esm/clients/pimlico.js +64 -0
  40. package/_esm/clients/pimlico.js.map +1 -0
  41. package/_esm/index.js +4 -0
  42. package/_esm/index.js.map +1 -0
  43. package/_esm/package.json +1 -0
  44. package/_esm/types/bundler.js +2 -0
  45. package/_esm/types/bundler.js.map +1 -0
  46. package/_esm/types/index.js +2 -0
  47. package/_esm/types/index.js.map +1 -0
  48. package/_esm/types/pimlico.js +2 -0
  49. package/_esm/types/pimlico.js.map +1 -0
  50. package/_esm/types/userOperation.js +2 -0
  51. package/_esm/types/userOperation.js.map +1 -0
  52. package/_types/actions/bundler.d.ts +393 -0
  53. package/_types/actions/bundler.d.ts.map +1 -0
  54. package/_types/actions/index.d.ts +5 -0
  55. package/_types/actions/index.d.ts.map +1 -0
  56. package/_types/actions/pimlico.d.ts +184 -0
  57. package/_types/actions/pimlico.d.ts.map +1 -0
  58. package/_types/actions/utils.d.ts +6 -0
  59. package/_types/actions/utils.d.ts.map +1 -0
  60. package/_types/clients/bundler.d.ts +39 -0
  61. package/_types/clients/bundler.d.ts.map +1 -0
  62. package/_types/clients/index.d.ts +3 -0
  63. package/_types/clients/index.d.ts.map +1 -0
  64. package/_types/clients/pimlico.d.ts +75 -0
  65. package/_types/clients/pimlico.d.ts.map +1 -0
  66. package/_types/index.d.ts +4 -0
  67. package/_types/index.d.ts.map +1 -0
  68. package/_types/types/bundler.d.ts +82 -0
  69. package/_types/types/bundler.d.ts.map +1 -0
  70. package/_types/types/index.d.ts +3 -0
  71. package/_types/types/index.d.ts.map +1 -0
  72. package/_types/types/pimlico.d.ts +50 -0
  73. package/_types/types/pimlico.d.ts.map +1 -0
  74. package/_types/types/userOperation.d.ts +30 -0
  75. package/_types/types/userOperation.d.ts.map +1 -0
  76. package/actions/bundler.ts +498 -0
  77. package/actions/index.ts +38 -0
  78. package/actions/package.json +6 -0
  79. package/actions/pimlico.ts +258 -0
  80. package/actions/utils.ts +30 -0
  81. package/clients/bundler.ts +39 -0
  82. package/clients/index.ts +3 -0
  83. package/clients/pimlico.ts +93 -0
  84. package/index.ts +3 -0
  85. package/package.json +49 -11
  86. package/tsconfig.build.tsbuildinfo +1 -0
  87. package/types/bundler.ts +85 -0
  88. package/types/index.ts +3 -0
  89. package/types/package.json +6 -0
  90. package/types/pimlico.ts +55 -0
  91. package/types/userOperation.ts +32 -0
  92. package/LICENSE +0 -21
@@ -0,0 +1,258 @@
1
+ import type { Address, Client, Hash, Hex } from "viem"
2
+ import type { PartialBy } from "viem/types/utils"
3
+ import type { PimlicoBundlerClient, PimlicoPaymasterClient } from "../clients/pimlico"
4
+ import type { PimlicoUserOperationStatus } from "../types/pimlico"
5
+ import type { UserOperation, UserOperationWithBigIntAsHex } from "../types/userOperation"
6
+ import { deepHexlify } from "./utils"
7
+
8
+ export type SponsorUserOperationParameters = {
9
+ userOperation: PartialBy<
10
+ UserOperation,
11
+ "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterAndData"
12
+ >
13
+ entryPoint: Address
14
+ }
15
+
16
+ export type SponsorUserOperationReturnType = {
17
+ paymasterAndData: Hex
18
+ preVerificationGas: bigint
19
+ verificationGasLimit: bigint
20
+ callGasLimit: bigint
21
+ }
22
+
23
+ export type GetUserOperationGasPriceReturnType = {
24
+ slow: {
25
+ maxFeePerGas: bigint
26
+ maxPriorityFeePerGas: bigint
27
+ }
28
+ standard: {
29
+ maxFeePerGas: bigint
30
+ maxPriorityFeePerGas: bigint
31
+ }
32
+ fast: {
33
+ maxFeePerGas: bigint
34
+ maxPriorityFeePerGas: bigint
35
+ }
36
+ }
37
+
38
+ export type GetUserOperationStatusParameters = {
39
+ hash: Hash
40
+ }
41
+
42
+ export type GetUserOperationStatusReturnType = PimlicoUserOperationStatus
43
+
44
+ /**
45
+ * Returns the live gas prices that you can use to send a user operation.
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
+ * @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas
52
+ *
53
+ *
54
+ * @example
55
+ * import { createClient } from "viem"
56
+ * import { getUserOperationGasPrice } from "permissionless/actions"
57
+ *
58
+ * const bundlerClient = createClient({
59
+ * chain: goerli,
60
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
61
+ * })
62
+ *
63
+ * await getUserOperationGasPrice(bundlerClient)
64
+ *
65
+ */
66
+ export const getUserOperationGasPrice = async (
67
+ client: PimlicoBundlerClient
68
+ ): Promise<GetUserOperationGasPriceReturnType> => {
69
+ const gasPrices = await client.request({
70
+ method: "pimlico_getUserOperationGasPrice",
71
+ params: []
72
+ })
73
+
74
+ return {
75
+ slow: {
76
+ maxFeePerGas: BigInt(gasPrices.slow.maxFeePerGas),
77
+ maxPriorityFeePerGas: BigInt(gasPrices.slow.maxPriorityFeePerGas)
78
+ },
79
+ standard: {
80
+ maxFeePerGas: BigInt(gasPrices.standard.maxFeePerGas),
81
+ maxPriorityFeePerGas: BigInt(gasPrices.standard.maxPriorityFeePerGas)
82
+ },
83
+ fast: {
84
+ maxFeePerGas: BigInt(gasPrices.fast.maxFeePerGas),
85
+ maxPriorityFeePerGas: BigInt(gasPrices.fast.maxPriorityFeePerGas)
86
+ }
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Returns the status of the userOperation that is pending in the mempool.
92
+ *
93
+ * - Docs: [TODO://add link]
94
+ * - Example: [TODO://add link]
95
+ *
96
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
97
+ * @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
98
+ * @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
99
+ *
100
+ *
101
+ * @example
102
+ * import { createClient } from "viem"
103
+ * import { getUserOperationStatus } from "permissionless/actions"
104
+ *
105
+ * const bundlerClient = createClient({
106
+ * chain: goerli,
107
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
108
+ * })
109
+ *
110
+ * await getUserOperationStatus(bundlerClient, { hash: userOpHash })
111
+ *
112
+ */
113
+ export const getUserOperationStatus = async (
114
+ client: PimlicoBundlerClient,
115
+ { hash }: GetUserOperationStatusParameters
116
+ ): Promise<GetUserOperationStatusReturnType> => {
117
+ return client.request({
118
+ method: "pimlico_getUserOperationStatus",
119
+ params: [hash]
120
+ })
121
+ }
122
+
123
+ export type PimlicoBundlerActions = {
124
+ /**
125
+ * Returns the live gas prices that you can use to send a user operation.
126
+ *
127
+ * - Docs: [TODO://add link]
128
+ * - Example: [TODO://add link]
129
+ *
130
+ * @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas {@link GetUserOperationGasPriceReturnType}
131
+ *
132
+ * @example
133
+ *
134
+ * import { createClient } from "viem"
135
+ * import { pimlicoBundlerActions } from "permissionless/actions"
136
+ *
137
+ * const bundlerClient = createClient({
138
+ * chain: goerli,
139
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
140
+ * }).extend(pimlicoBundlerActions)
141
+ *
142
+ * await bundlerClient.getUserOperationGasPrice()
143
+ */
144
+ getUserOperationGasPrice: () => Promise<GetUserOperationGasPriceReturnType>
145
+ /**
146
+ * Returns the status of the userOperation that is pending in the mempool.
147
+ *
148
+ * - Docs: [TODO://add link]
149
+ * - Example: [TODO://add link]
150
+ *
151
+ * @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
152
+ * @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
153
+ *
154
+ * @example
155
+ * import { createClient } from "viem"
156
+ * import { pimlicoBundlerActions } from "permissionless/actions"
157
+ *
158
+ * const bundlerClient = createClient({
159
+ * chain: goerli,
160
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
161
+ * }).extend(pimlicoBundlerActions)
162
+ *
163
+ * await bundlerClient.getUserOperationStatus({ hash: userOpHash })
164
+ */
165
+ getUserOperationStatus: (args: GetUserOperationStatusParameters) => Promise<GetUserOperationStatusReturnType>
166
+ }
167
+
168
+ export const pimlicoBundlerActions = (client: Client): PimlicoBundlerActions => ({
169
+ getUserOperationGasPrice: async () => getUserOperationGasPrice(client as PimlicoBundlerClient),
170
+ getUserOperationStatus: async (args: GetUserOperationStatusParameters) =>
171
+ getUserOperationStatus(client as PimlicoBundlerClient, args)
172
+ })
173
+
174
+ /**
175
+ * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
176
+ *
177
+ * - Docs: [TODO://add link]
178
+ * - Example: [TODO://add link]
179
+ *
180
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
181
+ * @param args {@link sponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
182
+ * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
183
+ *
184
+ *
185
+ * @example
186
+ * import { createClient } from "viem"
187
+ * import { sponsorUserOperation } from "permissionless/actions"
188
+ *
189
+ * const bundlerClient = createClient({
190
+ * chain: goerli,
191
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
192
+ * })
193
+ *
194
+ * await sponsorUserOperation(bundlerClient, {
195
+ * userOperation: userOperationWithDummySignature,
196
+ * entryPoint: entryPoint
197
+ * }})
198
+ *
199
+ */
200
+ export const sponsorUserOperation = async (
201
+ client: PimlicoPaymasterClient,
202
+ args: SponsorUserOperationParameters
203
+ ): Promise<SponsorUserOperationReturnType> => {
204
+ const response = await client.request({
205
+ method: "pm_sponsorUserOperation",
206
+ params: [deepHexlify(args.userOperation) as UserOperationWithBigIntAsHex, args.entryPoint]
207
+ })
208
+
209
+ return {
210
+ paymasterAndData: response.paymasterAndData,
211
+ preVerificationGas: BigInt(response.preVerificationGas),
212
+ verificationGasLimit: BigInt(response.verificationGasLimit),
213
+ callGasLimit: BigInt(response.callGasLimit)
214
+ }
215
+ }
216
+
217
+ export type PimlicoPaymasterClientActions = {
218
+ /**
219
+ * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
220
+ *
221
+ * - Docs: [TODO://add link]
222
+ * - Example: [TODO://add link]
223
+ *
224
+ * @param args {@link SponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
225
+ * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
226
+ *
227
+ * @example
228
+ * import { createClient } from "viem"
229
+ * import { sponsorUserOperation } from "permissionless/actions"
230
+ *
231
+ * const bundlerClient = createClient({
232
+ * chain: goerli,
233
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
234
+ * }).extend(pimlicoPaymasterActions)
235
+ *
236
+ * await bundlerClient.sponsorUserOperation(bundlerClient, {
237
+ * userOperation: userOperationWithDummySignature,
238
+ * entryPoint: entryPoint
239
+ * }})
240
+ *
241
+ */
242
+ sponsorUserOperation: (args: SponsorUserOperationParameters) => Promise<SponsorUserOperationReturnType>
243
+ }
244
+
245
+ export const pimlicoPaymasterActions = (client: Client): PimlicoPaymasterClientActions => ({
246
+ sponsorUserOperation: async (args: SponsorUserOperationParameters) =>
247
+ sponsorUserOperation(client as PimlicoPaymasterClient, args)
248
+ })
249
+
250
+ /**
251
+ * TODO: Add support for pimlicoActions after we support all the actions of v1 in v2 of the Pimlico API.
252
+ */
253
+ // export const pimlicoActions = (client: Client) => {
254
+ // return {
255
+ // ...pimlicoBundlerActions(client),
256
+ // ...pimlicoPaymasterActions(client)
257
+ // }
258
+ // }
@@ -0,0 +1,30 @@
1
+ import { toHex } from "viem"
2
+
3
+ export const transactionReceiptStatus = {
4
+ "0x0": "reverted",
5
+ "0x1": "success"
6
+ } as const
7
+
8
+ // biome-ignore lint/suspicious/noExplicitAny: it's a recursive function, so it's hard to type
9
+ export function deepHexlify(obj: any): any {
10
+ if (typeof obj === "function") {
11
+ return undefined
12
+ }
13
+ if (obj == null || typeof obj === "string" || typeof obj === "boolean") {
14
+ return obj
15
+ } else if (typeof obj === "bigint") {
16
+ return toHex(obj)
17
+ } else if (obj._isBigNumber != null || typeof obj !== "object") {
18
+ return toHex(obj).replace(/^0x0/, "0x")
19
+ }
20
+ if (Array.isArray(obj)) {
21
+ return obj.map((member) => deepHexlify(member))
22
+ }
23
+ return Object.keys(obj).reduce(
24
+ (set, key) => ({
25
+ ...set,
26
+ [key]: deepHexlify(obj[key])
27
+ }),
28
+ {}
29
+ )
30
+ }
@@ -0,0 +1,39 @@
1
+ import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem"
2
+ import { createClient } from "viem"
3
+ import { bundlerActions } from "../actions"
4
+ import type { BundlerActions } from "../actions/bundler"
5
+ import type { BundlerRpcSchema } from "../types/bundler"
6
+
7
+ export type BundlerClient = Client<Transport, Chain | undefined, Account | undefined, BundlerRpcSchema, BundlerActions>
8
+ /**
9
+ * 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).
10
+ *
11
+ * - Docs: [TODO://add link]
12
+ * - Example: [TODO://add link]
13
+ *
14
+ * 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).
15
+ *
16
+ * @param config - {@link PublicClientConfig}
17
+ * @returns A Bundler Client. {@link BundlerClient}
18
+ *
19
+ * @example
20
+ * import { createPublicClient, http } from 'viem'
21
+ * import { mainnet } from 'viem/chains'
22
+ *
23
+ * const bundlerClient = createBundlerClient({
24
+ * chain: mainnet,
25
+ * transport: http(BUNDLER_URL),
26
+ * })
27
+ */
28
+ export const createBundlerClient = <transport extends Transport, chain extends Chain | undefined = undefined>(
29
+ parameters: PublicClientConfig<transport, chain>
30
+ ): BundlerClient => {
31
+ const { key = "public", name = "Bundler Client" } = parameters
32
+ const client = createClient({
33
+ ...parameters,
34
+ key,
35
+ name,
36
+ type: "bundlerClient"
37
+ })
38
+ return client.extend(bundlerActions)
39
+ }
@@ -0,0 +1,3 @@
1
+ import { type BundlerClient, createBundlerClient } from "./bundler"
2
+
3
+ export { createBundlerClient, type BundlerClient }
@@ -0,0 +1,93 @@
1
+ import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem"
2
+ import { createClient } from "viem"
3
+ import { bundlerActions } from "../actions"
4
+ import type { BundlerActions } from "../actions/bundler"
5
+ import {
6
+ type PimlicoBundlerActions,
7
+ type PimlicoPaymasterClientActions,
8
+ pimlicoBundlerActions,
9
+ pimlicoPaymasterActions
10
+ } from "../actions/pimlico"
11
+ import type { PimlicoBundlerRpcSchema, PimlicoPaymasterRpcSchema } from "../types/pimlico"
12
+
13
+ export type PimlicoBundlerClient = Client<
14
+ Transport,
15
+ Chain | undefined,
16
+ Account | undefined,
17
+ PimlicoBundlerRpcSchema,
18
+ PimlicoBundlerActions & BundlerActions
19
+ >
20
+
21
+ export type PimlicoPaymasterClient = Client<
22
+ Transport,
23
+ Chain | undefined,
24
+ Account | undefined,
25
+ PimlicoPaymasterRpcSchema,
26
+ PimlicoPaymasterClientActions
27
+ >
28
+
29
+ /**
30
+ * 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).
31
+ *
32
+ * - Docs: [TODO://add link]
33
+ * - Example: [TODO://add link]
34
+ *
35
+ * 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).
36
+ *
37
+ * @param config - {@link PublicClientConfig}
38
+ * @returns A Pimlico Bundler Client. {@link PimlicoBundlerClient}
39
+ *
40
+ * @example
41
+ * import { createPublicClient, http } from 'viem'
42
+ * import { mainnet } from 'viem/chains'
43
+ *
44
+ * const pimlicoBundlerClient = createPimlicoBundlerClient({
45
+ * chain: mainnet,
46
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
47
+ * })
48
+ */
49
+ export const createPimlicoBundlerClient = <transport extends Transport, chain extends Chain | undefined = undefined>(
50
+ parameters: PublicClientConfig<transport, chain>
51
+ ): PimlicoBundlerClient => {
52
+ const { key = "public", name = "Pimlico Bundler Client" } = parameters
53
+ const client = createClient({
54
+ ...parameters,
55
+ key,
56
+ name,
57
+ type: "pimlicoBundlerClient"
58
+ })
59
+ return client.extend(bundlerActions).extend(pimlicoBundlerActions)
60
+ }
61
+
62
+ /**
63
+ * 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).
64
+ *
65
+ * - Docs: [TODO://add link]
66
+ * - Example: [TODO://add link]
67
+ *
68
+ * 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).
69
+ *
70
+ * @param config - {@link PublicClientConfig}
71
+ * @returns A Pimlico Paymaster Client. {@link PimlicoPaymasterClient}
72
+ *
73
+ * @example
74
+ * import { createPublicClient, http } from 'viem'
75
+ * import { mainnet } from 'viem/chains'
76
+ *
77
+ * const pimlicoPaymasterClient = createPimlicoPaymasterClient({
78
+ * chain: mainnet,
79
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE"),
80
+ * })
81
+ */
82
+ export const createPimlicoPaymasterClient = <transport extends Transport, chain extends Chain | undefined = undefined>(
83
+ parameters: PublicClientConfig<transport, chain>
84
+ ): PimlicoPaymasterClient => {
85
+ const { key = "public", name = "Pimlico Paymaster Client" } = parameters
86
+ const client = createClient({
87
+ ...parameters,
88
+ key,
89
+ name,
90
+ type: "pimlicoPaymasterClient"
91
+ })
92
+ return client.extend(pimlicoPaymasterActions)
93
+ }
package/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./actions"
2
+ export * from "./clients"
3
+ export * from "./types"
package/package.json CHANGED
@@ -1,12 +1,50 @@
1
1
  {
2
- "name": "permissionless",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "index.js",
6
- "keywords": [],
7
- "author": "Pimlico",
8
- "license": "MIT",
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
11
- }
12
- }
2
+ "name": "permissionless",
3
+ "version": "0.0.3",
4
+ "author": "Pimlico",
5
+ "main": "./_cjs/index.js",
6
+ "module": "./_esm/index.js",
7
+ "types": "./_types/index.d.ts",
8
+ "typings": "./_types/index.d.ts",
9
+ "type": "module",
10
+ "sideEffects": false,
11
+ "description": "A utility library for working with ERC-4337",
12
+ "keywords": [
13
+ "ethereum",
14
+ "erc-4337",
15
+ "eip-4337",
16
+ "paymaster",
17
+ "bundler"
18
+ ],
19
+ "license": "MIT",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./_types/index.d.ts",
23
+ "import": "./_esm/index.js",
24
+ "default": "./_cjs/index.js"
25
+ },
26
+ "./actions": {
27
+ "types": "./_types/actions/index.d.ts",
28
+ "import": "./_esm/actions/index.js",
29
+ "default": "./_cjs/actions/index.js"
30
+ },
31
+ "./actions/pimlico": {
32
+ "types": "./_types/actions/pimlico.d.ts",
33
+ "import": "./_esm/actions/pimlico.js",
34
+ "default": "./_cjs/actions/pimlico.js"
35
+ },
36
+ "./clients": {
37
+ "types": "./_types/clients/index.d.ts",
38
+ "import": "./_esm/clients/index.js",
39
+ "default": "./_cjs/clients/index.js"
40
+ },
41
+ "./clients/pimlico": {
42
+ "types": "./_types/clients/pimlico.d.ts",
43
+ "import": "./_esm/clients/pimlico.js",
44
+ "default": "./_cjs/clients/pimlico.js"
45
+ }
46
+ },
47
+ "peerDependencies": {
48
+ "viem": "^1.10.10"
49
+ }
50
+ }