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.
Files changed (75) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/_cjs/actions/bundler.js +4 -3
  3. package/_cjs/actions/bundler.js.map +1 -1
  4. package/_cjs/actions/index.js +2 -1
  5. package/_cjs/actions/index.js.map +1 -1
  6. package/_cjs/actions/pimlico.js +55 -0
  7. package/_cjs/actions/pimlico.js.map +1 -0
  8. package/_cjs/actions/utils.js +5 -1
  9. package/_cjs/actions/utils.js.map +1 -1
  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 +1 -0
  17. package/_cjs/index.js.map +1 -1
  18. package/_cjs/types/pimlico.js +3 -0
  19. package/_cjs/types/pimlico.js.map +1 -0
  20. package/_esm/actions/bundler.js +12 -145
  21. package/_esm/actions/bundler.js.map +1 -1
  22. package/_esm/actions/index.js +2 -2
  23. package/_esm/actions/index.js.map +1 -1
  24. package/_esm/actions/pimlico.js +127 -0
  25. package/_esm/actions/pimlico.js.map +1 -0
  26. package/_esm/actions/utils.js +4 -0
  27. package/_esm/actions/utils.js.map +1 -1
  28. package/_esm/clients/bundler.js +33 -0
  29. package/_esm/clients/bundler.js.map +1 -0
  30. package/_esm/clients/index.js +3 -0
  31. package/_esm/clients/index.js.map +1 -0
  32. package/_esm/clients/pimlico.js +64 -0
  33. package/_esm/clients/pimlico.js.map +1 -0
  34. package/_esm/index.js +1 -0
  35. package/_esm/index.js.map +1 -1
  36. package/_esm/types/pimlico.js +2 -0
  37. package/_esm/types/pimlico.js.map +1 -0
  38. package/_types/actions/bundler.d.ts +113 -24
  39. package/_types/actions/bundler.d.ts.map +1 -1
  40. package/_types/actions/index.d.ts +4 -2
  41. package/_types/actions/index.d.ts.map +1 -1
  42. package/_types/actions/pimlico.d.ts +184 -0
  43. package/_types/actions/pimlico.d.ts.map +1 -0
  44. package/_types/actions/utils.d.ts +4 -0
  45. package/_types/actions/utils.d.ts.map +1 -1
  46. package/_types/clients/bundler.d.ts +39 -0
  47. package/_types/clients/bundler.d.ts.map +1 -0
  48. package/_types/clients/index.d.ts +3 -0
  49. package/_types/clients/index.d.ts.map +1 -0
  50. package/_types/clients/pimlico.d.ts +75 -0
  51. package/_types/clients/pimlico.d.ts.map +1 -0
  52. package/_types/index.d.ts +1 -0
  53. package/_types/index.d.ts.map +1 -1
  54. package/_types/types/bundler.d.ts +4 -37
  55. package/_types/types/bundler.d.ts.map +1 -1
  56. package/_types/types/index.d.ts +1 -2
  57. package/_types/types/index.d.ts.map +1 -1
  58. package/_types/types/pimlico.d.ts +50 -0
  59. package/_types/types/pimlico.d.ts.map +1 -0
  60. package/_types/types/userOperation.d.ts +1 -0
  61. package/_types/types/userOperation.d.ts.map +1 -1
  62. package/actions/bundler.ts +85 -33
  63. package/actions/index.ts +23 -7
  64. package/actions/pimlico.ts +258 -0
  65. package/actions/utils.ts +5 -0
  66. package/clients/bundler.ts +39 -0
  67. package/clients/index.ts +3 -0
  68. package/clients/pimlico.ts +93 -0
  69. package/index.ts +1 -0
  70. package/package.json +18 -3
  71. package/tsconfig.build.tsbuildinfo +1 -1
  72. package/types/bundler.ts +4 -39
  73. package/types/index.ts +1 -2
  74. package/types/pimlico.ts +55 -0
  75. package/types/userOperation.ts +2 -0
package/types/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { UserOperationReceipt } from "./bundler"
2
1
  import type { UserOperation } from "./userOperation"
3
2
 
4
- export type { UserOperationReceipt, UserOperation }
3
+ export type { UserOperation }
@@ -0,0 +1,55 @@
1
+ import type { Address, Hash, Hex } from "viem"
2
+ import type { PartialBy } from "viem/types/utils"
3
+ import type { UserOperationWithBigIntAsHex } from "./userOperation"
4
+
5
+ type PimlicoUserOperationGasPriceWithBigIntAsHex = {
6
+ slow: {
7
+ maxFeePerGas: Hex
8
+ maxPriorityFeePerGas: Hex
9
+ }
10
+ standard: {
11
+ maxFeePerGas: Hex
12
+ maxPriorityFeePerGas: Hex
13
+ }
14
+ fast: {
15
+ maxFeePerGas: Hex
16
+ maxPriorityFeePerGas: Hex
17
+ }
18
+ }
19
+
20
+ export type PimlicoUserOperationStatus = {
21
+ status: "not_found" | "not_submitted" | "submitted" | "rejected" | "reverted" | "included" | "failed"
22
+ transactionHash: Hash | null
23
+ }
24
+
25
+ export type PimlicoBundlerRpcSchema = [
26
+ {
27
+ Method: "pimlico_getUserOperationGasPrice"
28
+ Parameters: []
29
+ ReturnType: PimlicoUserOperationGasPriceWithBigIntAsHex
30
+ },
31
+ {
32
+ Method: "pimlico_getUserOperationStatus"
33
+ Parameters: [hash: Hash]
34
+ ReturnType: PimlicoUserOperationStatus
35
+ }
36
+ ]
37
+
38
+ export type PimlicoPaymasterRpcSchema = [
39
+ {
40
+ Method: "pm_sponsorUserOperation"
41
+ Parameters: [
42
+ userOperation: PartialBy<
43
+ UserOperationWithBigIntAsHex,
44
+ "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterAndData"
45
+ >,
46
+ entryPoint: Address
47
+ ]
48
+ ReturnType: {
49
+ paymasterAndData: Hex
50
+ preVerificationGas: Hex
51
+ verificationGasLimit: Hex
52
+ callGasLimit: Hex
53
+ }
54
+ }
55
+ ]
@@ -1,6 +1,8 @@
1
1
  import type { Address } from "abitype"
2
2
  import type { Hex } from "viem"
3
3
 
4
+ export type TStatus = "success" | "reverted"
5
+
4
6
  export type UserOperationWithBigIntAsHex = {
5
7
  sender: Address
6
8
  nonce: Hex