permissionless 0.0.6 → 0.0.8

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 (235) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/_cjs/actions/bundler/chainId.js +11 -0
  3. package/_cjs/actions/bundler/chainId.js.map +1 -0
  4. package/_cjs/actions/bundler/estimateUserOperationGas.js +18 -0
  5. package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -0
  6. package/_cjs/actions/bundler/getUserOperationByHash.js +30 -0
  7. package/_cjs/actions/bundler/getUserOperationByHash.js.map +1 -0
  8. package/_cjs/actions/bundler/getUserOperationReceipt.js +48 -0
  9. package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -0
  10. package/_cjs/actions/bundler/sendUserOperation.js +13 -0
  11. package/_cjs/actions/bundler/sendUserOperation.js.map +1 -0
  12. package/_cjs/actions/bundler/supportedEntryPoints.js +11 -0
  13. package/_cjs/actions/bundler/supportedEntryPoints.js.map +1 -0
  14. package/_cjs/actions/bundler/waitForUserOperationReceipt.js +46 -0
  15. package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -0
  16. package/_cjs/actions/index.js +22 -12
  17. package/_cjs/actions/index.js.map +1 -1
  18. package/_cjs/actions/pimlico/getUserOperationGasPrice.js +25 -0
  19. package/_cjs/actions/pimlico/getUserOperationGasPrice.js.map +1 -0
  20. package/_cjs/actions/pimlico/getUserOperationStatus.js +11 -0
  21. package/_cjs/actions/pimlico/getUserOperationStatus.js.map +1 -0
  22. package/_cjs/actions/pimlico/sponsorUserOperation.js +18 -0
  23. package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -0
  24. package/_cjs/actions/pimlico.js +10 -52
  25. package/_cjs/actions/pimlico.js.map +1 -1
  26. package/_cjs/actions/public/getAccountNonce.js +35 -0
  27. package/_cjs/actions/public/getAccountNonce.js.map +1 -0
  28. package/_cjs/actions/{public.js → public/getSenderAddress.js} +2 -33
  29. package/_cjs/actions/public/getSenderAddress.js.map +1 -0
  30. package/_cjs/actions/stackup/accounts.js +12 -0
  31. package/_cjs/actions/stackup/accounts.js.map +1 -0
  32. package/_cjs/actions/stackup/sponsorUserOperation.js +18 -0
  33. package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -0
  34. package/_cjs/actions/stackup.js +10 -0
  35. package/_cjs/actions/stackup.js.map +1 -0
  36. package/_cjs/clients/bundler.js +2 -2
  37. package/_cjs/clients/bundler.js.map +1 -1
  38. package/_cjs/clients/decorators/bundler.js +21 -0
  39. package/_cjs/clients/decorators/bundler.js.map +1 -0
  40. package/_cjs/clients/decorators/pimlico.js +16 -0
  41. package/_cjs/clients/decorators/pimlico.js.map +1 -0
  42. package/_cjs/clients/decorators/stackup.js +11 -0
  43. package/_cjs/clients/decorators/stackup.js.map +1 -0
  44. package/_cjs/clients/pimlico.js +4 -4
  45. package/_cjs/clients/pimlico.js.map +1 -1
  46. package/_cjs/clients/stackup.js +18 -0
  47. package/_cjs/clients/stackup.js.map +1 -0
  48. package/_cjs/index.js +28 -4
  49. package/_cjs/index.js.map +1 -1
  50. package/_cjs/types/stackup.js +3 -0
  51. package/_cjs/types/stackup.js.map +1 -0
  52. package/_cjs/{actions/utils.js → utils/deepHexlify.js} +1 -1
  53. package/_cjs/utils/deepHexlify.js.map +1 -0
  54. package/_cjs/utils/getUserOperationHash.js +38 -0
  55. package/_cjs/utils/getUserOperationHash.js.map +1 -0
  56. package/_cjs/utils/index.js +2 -34
  57. package/_cjs/utils/index.js.map +1 -1
  58. package/_cjs/utils/observe.js +39 -0
  59. package/_cjs/utils/observe.js.map +1 -0
  60. package/_esm/actions/bundler/chainId.js +29 -0
  61. package/_esm/actions/bundler/chainId.js.map +1 -0
  62. package/_esm/actions/bundler/estimateUserOperationGas.js +41 -0
  63. package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -0
  64. package/_esm/actions/bundler/getUserOperationByHash.js +48 -0
  65. package/_esm/actions/bundler/getUserOperationByHash.js.map +1 -0
  66. package/_esm/actions/bundler/getUserOperationReceipt.js +66 -0
  67. package/_esm/actions/bundler/getUserOperationReceipt.js.map +1 -0
  68. package/_esm/actions/bundler/sendUserOperation.js +36 -0
  69. package/_esm/actions/bundler/sendUserOperation.js.map +1 -0
  70. package/_esm/actions/bundler/supportedEntryPoints.js +29 -0
  71. package/_esm/actions/bundler/supportedEntryPoints.js.map +1 -0
  72. package/_esm/actions/bundler/waitForUserOperationReceipt.js +63 -0
  73. package/_esm/actions/bundler/waitForUserOperationReceipt.js.map +1 -0
  74. package/_esm/actions/index.js +11 -3
  75. package/_esm/actions/index.js.map +1 -1
  76. package/_esm/actions/pimlico/getUserOperationGasPrice.js +42 -0
  77. package/_esm/actions/pimlico/getUserOperationGasPrice.js.map +1 -0
  78. package/_esm/actions/pimlico/getUserOperationStatus.js +29 -0
  79. package/_esm/actions/pimlico/getUserOperationStatus.js.map +1 -0
  80. package/_esm/actions/pimlico/sponsorUserOperation.js +39 -0
  81. package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -0
  82. package/_esm/actions/pimlico.js +5 -123
  83. package/_esm/actions/pimlico.js.map +1 -1
  84. package/_esm/actions/public/getAccountNonce.js +57 -0
  85. package/_esm/actions/public/getAccountNonce.js.map +1 -0
  86. package/_esm/actions/{public.js → public/getSenderAddress.js} +1 -57
  87. package/_esm/actions/public/getSenderAddress.js.map +1 -0
  88. package/_esm/actions/stackup/accounts.js +30 -0
  89. package/_esm/actions/stackup/accounts.js.map +1 -0
  90. package/_esm/actions/stackup/sponsorUserOperation.js +40 -0
  91. package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -0
  92. package/_esm/actions/stackup.js +5 -0
  93. package/_esm/actions/stackup.js.map +1 -0
  94. package/_esm/clients/bundler.js +1 -1
  95. package/_esm/clients/bundler.js.map +1 -1
  96. package/_esm/clients/decorators/bundler.js +18 -0
  97. package/_esm/clients/decorators/bundler.js.map +1 -0
  98. package/_esm/clients/decorators/pimlico.js +20 -0
  99. package/_esm/clients/decorators/pimlico.js.map +1 -0
  100. package/_esm/clients/decorators/stackup.js +8 -0
  101. package/_esm/clients/decorators/stackup.js.map +1 -0
  102. package/_esm/clients/pimlico.js +2 -2
  103. package/_esm/clients/pimlico.js.map +1 -1
  104. package/_esm/clients/stackup.js +33 -0
  105. package/_esm/clients/stackup.js.map +1 -0
  106. package/_esm/index.js +17 -4
  107. package/_esm/index.js.map +1 -1
  108. package/_esm/types/stackup.js +2 -0
  109. package/_esm/types/stackup.js.map +1 -0
  110. package/_esm/{actions/utils.js → utils/deepHexlify.js} +1 -1
  111. package/_esm/utils/deepHexlify.js.map +1 -0
  112. package/_esm/utils/getUserOperationHash.js +55 -0
  113. package/_esm/utils/getUserOperationHash.js.map +1 -0
  114. package/_esm/utils/index.js +1 -54
  115. package/_esm/utils/index.js.map +1 -1
  116. package/_esm/utils/observe.js +42 -0
  117. package/_esm/utils/observe.js.map +1 -0
  118. package/_types/actions/bundler/chainId.d.ts +25 -0
  119. package/_types/actions/bundler/chainId.d.ts.map +1 -0
  120. package/_types/actions/bundler/estimateUserOperationGas.d.ts +42 -0
  121. package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -0
  122. package/_types/actions/bundler/getUserOperationByHash.d.ts +37 -0
  123. package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -0
  124. package/_types/actions/bundler/getUserOperationReceipt.d.ts +62 -0
  125. package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -0
  126. package/_types/actions/bundler/sendUserOperation.d.ts +36 -0
  127. package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -0
  128. package/_types/actions/bundler/supportedEntryPoints.d.ts +26 -0
  129. package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -0
  130. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +43 -0
  131. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -0
  132. package/_types/actions/index.d.ts +19 -6
  133. package/_types/actions/index.d.ts.map +1 -1
  134. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +38 -0
  135. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -0
  136. package/_types/actions/pimlico/getUserOperationStatus.d.ts +31 -0
  137. package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -0
  138. package/_types/actions/pimlico/sponsorUserOperation.d.ts +41 -0
  139. package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -0
  140. package/_types/actions/pimlico.d.ts +7 -177
  141. package/_types/actions/pimlico.d.ts.map +1 -1
  142. package/_types/actions/public/getAccountNonce.d.ts +34 -0
  143. package/_types/actions/public/getAccountNonce.d.ts.map +1 -0
  144. package/_types/actions/{public.d.ts → public/getSenderAddress.d.ts} +2 -35
  145. package/_types/actions/public/getSenderAddress.d.ts.map +1 -0
  146. package/_types/actions/stackup/accounts.d.ts +29 -0
  147. package/_types/actions/stackup/accounts.d.ts.map +1 -0
  148. package/_types/actions/stackup/sponsorUserOperation.d.ts +43 -0
  149. package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -0
  150. package/_types/actions/stackup.d.ts +7 -0
  151. package/_types/actions/stackup.d.ts.map +1 -0
  152. package/_types/clients/bundler.d.ts +3 -3
  153. package/_types/clients/bundler.d.ts.map +1 -1
  154. package/_types/clients/decorators/bundler.d.ts +173 -0
  155. package/_types/clients/decorators/bundler.d.ts.map +1 -0
  156. package/_types/clients/decorators/pimlico.d.ts +78 -0
  157. package/_types/clients/decorators/pimlico.d.ts.map +1 -0
  158. package/_types/clients/decorators/stackup.d.ts +54 -0
  159. package/_types/clients/decorators/stackup.d.ts.map +1 -0
  160. package/_types/clients/pimlico.d.ts +3 -3
  161. package/_types/clients/pimlico.d.ts.map +1 -1
  162. package/_types/clients/stackup.d.ts +39 -0
  163. package/_types/clients/stackup.d.ts.map +1 -0
  164. package/_types/index.d.ts +28 -4
  165. package/_types/index.d.ts.map +1 -1
  166. package/_types/types/bundler.d.ts +1 -1
  167. package/_types/types/bundler.d.ts.map +1 -1
  168. package/_types/types/index.d.ts +1 -1
  169. package/_types/types/index.d.ts.map +1 -1
  170. package/_types/types/pimlico.d.ts +1 -1
  171. package/_types/types/pimlico.d.ts.map +1 -1
  172. package/_types/types/stackup.d.ts +35 -0
  173. package/_types/types/stackup.d.ts.map +1 -0
  174. package/_types/{actions/utils.d.ts → utils/deepHexlify.d.ts} +1 -1
  175. package/_types/utils/deepHexlify.d.ts.map +1 -0
  176. package/_types/utils/getUserOperationHash.d.ts +30 -0
  177. package/_types/utils/getUserOperationHash.d.ts.map +1 -0
  178. package/_types/utils/index.d.ts +2 -30
  179. package/_types/utils/index.d.ts.map +1 -1
  180. package/_types/utils/observe.d.ts +17 -0
  181. package/_types/utils/observe.d.ts.map +1 -0
  182. package/actions/bundler/chainId.ts +32 -0
  183. package/actions/bundler/estimateUserOperationGas.ts +62 -0
  184. package/actions/bundler/getUserOperationByHash.ts +69 -0
  185. package/actions/bundler/getUserOperationReceipt.ts +112 -0
  186. package/actions/bundler/sendUserOperation.ts +45 -0
  187. package/actions/bundler/supportedEntryPoints.ts +31 -0
  188. package/actions/bundler/waitForUserOperationReceipt.ts +80 -0
  189. package/actions/index.ts +30 -21
  190. package/actions/pimlico/getUserOperationGasPrice.ts +61 -0
  191. package/actions/pimlico/getUserOperationStatus.ts +41 -0
  192. package/actions/pimlico/sponsorUserOperation.ts +62 -0
  193. package/actions/pimlico.ts +34 -251
  194. package/actions/public/getAccountNonce.ts +63 -0
  195. package/actions/{public.ts → public/getSenderAddress.ts} +7 -68
  196. package/actions/stackup/accounts.ts +40 -0
  197. package/actions/stackup/sponsorUserOperation.ts +64 -0
  198. package/actions/stackup.ts +17 -0
  199. package/clients/bundler.ts +9 -4
  200. package/clients/decorators/bundler.ts +211 -0
  201. package/clients/decorators/pimlico.ts +107 -0
  202. package/clients/decorators/stackup.ts +65 -0
  203. package/clients/pimlico.ts +3 -4
  204. package/clients/stackup.ts +44 -0
  205. package/index.ts +70 -4
  206. package/package.json +11 -1
  207. package/tsconfig.build.tsbuildinfo +1 -1
  208. package/types/bundler.ts +1 -1
  209. package/types/index.ts +1 -1
  210. package/types/pimlico.ts +1 -1
  211. package/types/stackup.ts +36 -0
  212. package/utils/getUserOperationHash.ts +68 -0
  213. package/utils/index.ts +2 -69
  214. package/utils/observe.ts +61 -0
  215. package/_cjs/actions/bundler.js +0 -118
  216. package/_cjs/actions/bundler.js.map +0 -1
  217. package/_cjs/actions/public.js.map +0 -1
  218. package/_cjs/actions/utils.js.map +0 -1
  219. package/_cjs/clients/index.js +0 -6
  220. package/_cjs/clients/index.js.map +0 -1
  221. package/_esm/actions/bundler.js +0 -251
  222. package/_esm/actions/bundler.js.map +0 -1
  223. package/_esm/actions/public.js.map +0 -1
  224. package/_esm/actions/utils.js.map +0 -1
  225. package/_esm/clients/index.js +0 -3
  226. package/_esm/clients/index.js.map +0 -1
  227. package/_types/actions/bundler.d.ts +0 -393
  228. package/_types/actions/bundler.d.ts.map +0 -1
  229. package/_types/actions/public.d.ts.map +0 -1
  230. package/_types/actions/utils.d.ts.map +0 -1
  231. package/_types/clients/index.d.ts +0 -3
  232. package/_types/clients/index.d.ts.map +0 -1
  233. package/actions/bundler.ts +0 -498
  234. package/clients/index.ts +0 -3
  235. /package/{actions/utils.ts → utils/deepHexlify.ts} +0 -0
@@ -1,7 +1,20 @@
1
- import type { EstimateUserOperationGasParameters, EstimateUserOperationGasReturnType, GetUserOperationByHashParameters, GetUserOperationByHashReturnType, GetUserOperationReceiptParameters, GetUserOperationReceiptReturnType, SendUserOperationParameters } from "./bundler";
2
- import { bundlerActions, chainId, estimateUserOperationGas, getUserOperationByHash, getUserOperationReceipt, sendUserOperation, supportedEntryPoints } from "./bundler";
3
- import type { GetSenderAddressParams } from "./public";
4
- import { getAccountNonce, getSenderAddress } from "./public";
5
- export type { SendUserOperationParameters, EstimateUserOperationGasParameters, EstimateUserOperationGasReturnType, GetUserOperationByHashParameters, GetUserOperationByHashReturnType, GetUserOperationReceiptParameters, GetUserOperationReceiptReturnType, GetSenderAddressParams };
6
- export { bundlerActions, sendUserOperation, estimateUserOperationGas, supportedEntryPoints, chainId, getUserOperationByHash, getUserOperationReceipt, getSenderAddress, getAccountNonce };
1
+ import type { EstimateUserOperationGasParameters, EstimateUserOperationGasReturnType } from "./bundler/estimateUserOperationGas.js";
2
+ import type { GetUserOperationByHashParameters } from "./bundler/getUserOperationByHash.js";
3
+ import type { GetUserOperationByHashReturnType } from "./bundler/getUserOperationByHash.js";
4
+ import type { GetUserOperationReceiptParameters, GetUserOperationReceiptReturnType } from "./bundler/getUserOperationReceipt.js";
5
+ import type { SendUserOperationParameters } from "./bundler/sendUserOperation.js";
6
+ import type { GetSenderAddressParams } from "./public/getSenderAddress.js";
7
+ import { InvalidEntryPointError, getSenderAddress } from "./public/getSenderAddress.js";
8
+ import { chainId } from "./bundler/chainId.js";
9
+ import { estimateUserOperationGas } from "./bundler/estimateUserOperationGas.js";
10
+ import { getUserOperationByHash } from "./bundler/getUserOperationByHash.js";
11
+ import { getUserOperationReceipt } from "./bundler/getUserOperationReceipt.js";
12
+ import { sendUserOperation } from "./bundler/sendUserOperation.js";
13
+ import { supportedEntryPoints } from "./bundler/supportedEntryPoints.js";
14
+ import { waitForUserOperationReceipt } from "./bundler/waitForUserOperationReceipt.js";
15
+ import { type WaitForUserOperationReceiptParameters, WaitForUserOperationReceiptTimeoutError } from "./bundler/waitForUserOperationReceipt.js";
16
+ import type { GetAccountNonceParams } from "./public/getAccountNonce.js";
17
+ import { getAccountNonce } from "./public/getAccountNonce.js";
18
+ export type { SendUserOperationParameters, EstimateUserOperationGasParameters, EstimateUserOperationGasReturnType, GetUserOperationByHashParameters, GetUserOperationByHashReturnType, GetUserOperationReceiptParameters, GetUserOperationReceiptReturnType, GetSenderAddressParams, GetAccountNonceParams, WaitForUserOperationReceiptParameters };
19
+ export { sendUserOperation, estimateUserOperationGas, supportedEntryPoints, chainId, getUserOperationByHash, getUserOperationReceipt, getSenderAddress, getAccountNonce, InvalidEntryPointError, waitForUserOperationReceipt, WaitForUserOperationReceiptTimeoutError };
7
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,EACH,cAAc,EACd,OAAO,EACP,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACvB,MAAM,WAAW,CAAA;AAElB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEtD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE5D,YAAY,EACR,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,iCAAiC,EACjC,sBAAsB,EACzB,CAAA;AAED,OAAO,EACH,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,OAAO,EACP,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,kCAAkC,EAClC,kCAAkC,EACrC,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qCAAqC,CAAA;AAC3F,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,qCAAqC,CAAA;AAC3F,OAAO,KAAK,EACR,iCAAiC,EACjC,iCAAiC,EACpC,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAEjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAEvF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAA;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAA;AACtF,OAAO,EACH,KAAK,qCAAqC,EAC1C,uCAAuC,EAC1C,MAAM,0CAA0C,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAE7D,YAAY,EACR,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,iCAAiC,EACjC,iCAAiC,EACjC,sBAAsB,EACtB,qBAAqB,EACrB,qCAAqC,EACxC,CAAA;AAED,OAAO,EACH,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,OAAO,EACP,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,uCAAuC,EAC1C,CAAA"}
@@ -0,0 +1,38 @@
1
+ import type { PimlicoBundlerClient } from "../../clients/pimlico.js";
2
+ export type GetUserOperationGasPriceReturnType = {
3
+ slow: {
4
+ maxFeePerGas: bigint;
5
+ maxPriorityFeePerGas: bigint;
6
+ };
7
+ standard: {
8
+ maxFeePerGas: bigint;
9
+ maxPriorityFeePerGas: bigint;
10
+ };
11
+ fast: {
12
+ maxFeePerGas: bigint;
13
+ maxPriorityFeePerGas: bigint;
14
+ };
15
+ };
16
+ /**
17
+ * Returns the live gas prices that you can use to send a user operation.
18
+ *
19
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationGasPrice
20
+ *
21
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
22
+ * @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas
23
+ *
24
+ *
25
+ * @example
26
+ * import { createClient } from "viem"
27
+ * import { getUserOperationGasPrice } from "permissionless/actions/pimlico"
28
+ *
29
+ * const bundlerClient = createClient({
30
+ * chain: goerli,
31
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
32
+ * })
33
+ *
34
+ * await getUserOperationGasPrice(bundlerClient)
35
+ *
36
+ */
37
+ export declare const getUserOperationGasPrice: (client: PimlicoBundlerClient) => Promise<GetUserOperationGasPriceReturnType>;
38
+ //# sourceMappingURL=getUserOperationGasPrice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUserOperationGasPrice.d.ts","sourceRoot":"","sources":["../../../actions/pimlico/getUserOperationGasPrice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAEpE,MAAM,MAAM,kCAAkC,GAAG;IAC7C,IAAI,EAAE;QACF,YAAY,EAAE,MAAM,CAAA;QACpB,oBAAoB,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,QAAQ,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;QACpB,oBAAoB,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,IAAI,EAAE;QACF,YAAY,EAAE,MAAM,CAAA;QACpB,oBAAoB,EAAE,MAAM,CAAA;KAC/B,CAAA;CACJ,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,WACzB,oBAAoB,KAC7B,QAAQ,kCAAkC,CAoB5C,CAAA"}
@@ -0,0 +1,31 @@
1
+ import type { Hash } from "viem";
2
+ import type { PimlicoBundlerClient } from "../../clients/pimlico.js";
3
+ import type { PimlicoUserOperationStatus } from "../../types/pimlico.js";
4
+ export type GetUserOperationStatusParameters = {
5
+ hash: Hash;
6
+ };
7
+ export type GetUserOperationStatusReturnType = PimlicoUserOperationStatus;
8
+ /**
9
+ * Returns the status of the userOperation that is pending in the mempool.
10
+ *
11
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationStatus
12
+ *
13
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
14
+ * @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
15
+ * @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
16
+ *
17
+ *
18
+ * @example
19
+ * import { createClient } from "viem"
20
+ * import { getUserOperationStatus } from "permissionless/actions/pimlico"
21
+ *
22
+ * const bundlerClient = createClient({
23
+ * chain: goerli,
24
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
25
+ * })
26
+ *
27
+ * await getUserOperationStatus(bundlerClient, { hash: userOpHash })
28
+ *
29
+ */
30
+ export declare const getUserOperationStatus: (client: PimlicoBundlerClient, { hash }: GetUserOperationStatusParameters) => Promise<GetUserOperationStatusReturnType>;
31
+ //# sourceMappingURL=getUserOperationStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUserOperationStatus.d.ts","sourceRoot":"","sources":["../../../actions/pimlico/getUserOperationStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAExE,MAAM,MAAM,gCAAgC,GAAG;IAC3C,IAAI,EAAE,IAAI,CAAA;CACb,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,WACvB,oBAAoB,YAClB,gCAAgC,KAC3C,QAAQ,gCAAgC,CAK1C,CAAA"}
@@ -0,0 +1,41 @@
1
+ import type { Address, Hex } from "viem";
2
+ import type { PartialBy } from "viem/types/utils";
3
+ import type { PimlicoPaymasterClient } from "../../clients/pimlico.js";
4
+ import type { UserOperation } from "../../types/userOperation.js";
5
+ export type SponsorUserOperationParameters = {
6
+ userOperation: PartialBy<UserOperation, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterAndData">;
7
+ entryPoint: Address;
8
+ };
9
+ export type SponsorUserOperationReturnType = {
10
+ paymasterAndData: Hex;
11
+ preVerificationGas: bigint;
12
+ verificationGasLimit: bigint;
13
+ callGasLimit: bigint;
14
+ };
15
+ /**
16
+ * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
17
+ *
18
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-paymaster-actions/sponsorUserOperation
19
+ *
20
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
21
+ * @param args {@link sponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
22
+ * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
23
+ *
24
+ *
25
+ * @example
26
+ * import { createClient } from "viem"
27
+ * import { sponsorUserOperation } from "permissionless/actions/pimlico"
28
+ *
29
+ * const bundlerClient = createClient({
30
+ * chain: goerli,
31
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
32
+ * })
33
+ *
34
+ * await sponsorUserOperation(bundlerClient, {
35
+ * userOperation: userOperationWithDummySignature,
36
+ * entryPoint: entryPoint
37
+ * }})
38
+ *
39
+ */
40
+ export declare const sponsorUserOperation: (client: PimlicoPaymasterClient, args: SponsorUserOperationParameters) => Promise<SponsorUserOperationReturnType>;
41
+ //# sourceMappingURL=sponsorUserOperation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/pimlico/sponsorUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,8BAA8B,CAAA;AAG/F,MAAM,MAAM,8BAA8B,GAAG;IACzC,aAAa,EAAE,SAAS,CACpB,aAAa,EACb,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,kBAAkB,CACtF,CAAA;IACD,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IACzC,gBAAgB,EAAE,GAAG,CAAA;IACrB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,WACrB,sBAAsB,QACxB,8BAA8B,KACrC,QAAQ,8BAA8B,CAYxC,CAAA"}
@@ -1,178 +1,8 @@
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 } from "../types/userOperation";
6
- export type SponsorUserOperationParameters = {
7
- userOperation: PartialBy<UserOperation, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterAndData">;
8
- entryPoint: Address;
9
- };
10
- export type SponsorUserOperationReturnType = {
11
- paymasterAndData: Hex;
12
- preVerificationGas: bigint;
13
- verificationGasLimit: bigint;
14
- callGasLimit: bigint;
15
- };
16
- export type GetUserOperationGasPriceReturnType = {
17
- slow: {
18
- maxFeePerGas: bigint;
19
- maxPriorityFeePerGas: bigint;
20
- };
21
- standard: {
22
- maxFeePerGas: bigint;
23
- maxPriorityFeePerGas: bigint;
24
- };
25
- fast: {
26
- maxFeePerGas: bigint;
27
- maxPriorityFeePerGas: bigint;
28
- };
29
- };
30
- export type GetUserOperationStatusParameters = {
31
- hash: Hash;
32
- };
33
- export type GetUserOperationStatusReturnType = PimlicoUserOperationStatus;
34
- /**
35
- * Returns the live gas prices that you can use to send a user operation.
36
- *
37
- * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationGasPrice
38
- *
39
- * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
40
- * @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas
41
- *
42
- *
43
- * @example
44
- * import { createClient } from "viem"
45
- * import { getUserOperationGasPrice } from "permissionless/actions"
46
- *
47
- * const bundlerClient = createClient({
48
- * chain: goerli,
49
- * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
50
- * })
51
- *
52
- * await getUserOperationGasPrice(bundlerClient)
53
- *
54
- */
55
- export declare const getUserOperationGasPrice: (client: PimlicoBundlerClient) => Promise<GetUserOperationGasPriceReturnType>;
56
- /**
57
- * Returns the status of the userOperation that is pending in the mempool.
58
- *
59
- * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationStatus
60
- *
61
- * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
62
- * @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
63
- * @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
64
- *
65
- *
66
- * @example
67
- * import { createClient } from "viem"
68
- * import { getUserOperationStatus } from "permissionless/actions"
69
- *
70
- * const bundlerClient = createClient({
71
- * chain: goerli,
72
- * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
73
- * })
74
- *
75
- * await getUserOperationStatus(bundlerClient, { hash: userOpHash })
76
- *
77
- */
78
- export declare const getUserOperationStatus: (client: PimlicoBundlerClient, { hash }: GetUserOperationStatusParameters) => Promise<GetUserOperationStatusReturnType>;
79
- export type PimlicoBundlerActions = {
80
- /**
81
- * Returns the live gas prices that you can use to send a user operation.
82
- *
83
- * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationGasPrice
84
- *
85
- * @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas {@link GetUserOperationGasPriceReturnType}
86
- *
87
- * @example
88
- *
89
- * import { createClient } from "viem"
90
- * import { pimlicoBundlerActions } from "permissionless/actions"
91
- *
92
- * const bundlerClient = createClient({
93
- * chain: goerli,
94
- * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
95
- * }).extend(pimlicoBundlerActions)
96
- *
97
- * await bundlerClient.getUserOperationGasPrice()
98
- */
99
- getUserOperationGasPrice: () => Promise<GetUserOperationGasPriceReturnType>;
100
- /**
101
- * Returns the status of the userOperation that is pending in the mempool.
102
- *
103
- * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationStatus
104
- *
105
- * @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
106
- * @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
107
- *
108
- * @example
109
- * import { createClient } from "viem"
110
- * import { pimlicoBundlerActions } from "permissionless/actions"
111
- *
112
- * const bundlerClient = createClient({
113
- * chain: goerli,
114
- * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
115
- * }).extend(pimlicoBundlerActions)
116
- *
117
- * await bundlerClient.getUserOperationStatus({ hash: userOpHash })
118
- */
119
- getUserOperationStatus: (args: GetUserOperationStatusParameters) => Promise<GetUserOperationStatusReturnType>;
120
- };
121
- export declare const pimlicoBundlerActions: (client: Client) => PimlicoBundlerActions;
122
- /**
123
- * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
124
- *
125
- * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-paymaster-actions/sponsorUserOperation
126
- *
127
- * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
128
- * @param args {@link sponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
129
- * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
130
- *
131
- *
132
- * @example
133
- * import { createClient } from "viem"
134
- * import { sponsorUserOperation } from "permissionless/actions"
135
- *
136
- * const bundlerClient = createClient({
137
- * chain: goerli,
138
- * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
139
- * })
140
- *
141
- * await sponsorUserOperation(bundlerClient, {
142
- * userOperation: userOperationWithDummySignature,
143
- * entryPoint: entryPoint
144
- * }})
145
- *
146
- */
147
- export declare const sponsorUserOperation: (client: PimlicoPaymasterClient, args: SponsorUserOperationParameters) => Promise<SponsorUserOperationReturnType>;
148
- export type PimlicoPaymasterClientActions = {
149
- /**
150
- * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
151
- *
152
- * https://docs.pimlico.io/permissionless/reference/pimlico-paymaster-actions/sponsorUserOperation
153
- *
154
- * @param args {@link SponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
155
- * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
156
- *
157
- * @example
158
- * import { createClient } from "viem"
159
- * import { sponsorUserOperation } from "permissionless/actions"
160
- *
161
- * const bundlerClient = createClient({
162
- * chain: goerli,
163
- * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
164
- * }).extend(pimlicoPaymasterActions)
165
- *
166
- * await bundlerClient.sponsorUserOperation(bundlerClient, {
167
- * userOperation: userOperationWithDummySignature,
168
- * entryPoint: entryPoint
169
- * }})
170
- *
171
- */
172
- sponsorUserOperation: (args: SponsorUserOperationParameters) => Promise<SponsorUserOperationReturnType>;
173
- };
174
- export declare const pimlicoPaymasterActions: (client: Client) => PimlicoPaymasterClientActions;
175
- /**
176
- * TODO: Add support for pimlicoActions after we support all the actions of v1 in v2 of the Pimlico API.
177
- */
1
+ import { type GetUserOperationGasPriceReturnType, getUserOperationGasPrice } from "./pimlico/getUserOperationGasPrice.js";
2
+ import { type GetUserOperationStatusParameters, type GetUserOperationStatusReturnType, getUserOperationStatus } from "./pimlico/getUserOperationStatus.js";
3
+ import { type SponsorUserOperationParameters, type SponsorUserOperationReturnType, sponsorUserOperation } from "./pimlico/sponsorUserOperation.js";
4
+ import type { PimlicoBundlerActions, PimlicoPaymasterClientActions } from "../clients/decorators/pimlico.js";
5
+ import { pimlicoBundlerActions, pimlicoPaymasterActions } from "../clients/decorators/pimlico.js";
6
+ export type { GetUserOperationGasPriceReturnType, GetUserOperationStatusParameters, GetUserOperationStatusReturnType, SponsorUserOperationParameters, SponsorUserOperationReturnType, PimlicoBundlerActions, PimlicoPaymasterClientActions };
7
+ export { getUserOperationGasPrice, getUserOperationStatus, sponsorUserOperation, pimlicoBundlerActions, pimlicoPaymasterActions };
178
8
  //# sourceMappingURL=pimlico.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../actions/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AACtF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,wBAAwB,CAAA;AAGzF,MAAM,MAAM,8BAA8B,GAAG;IACzC,aAAa,EAAE,SAAS,CACpB,aAAa,EACb,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,kBAAkB,CACtF,CAAA;IACD,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IACzC,gBAAgB,EAAE,GAAG,CAAA;IACrB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC7C,IAAI,EAAE;QACF,YAAY,EAAE,MAAM,CAAA;QACpB,oBAAoB,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,QAAQ,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;QACpB,oBAAoB,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,IAAI,EAAE;QACF,YAAY,EAAE,MAAM,CAAA;QACpB,oBAAoB,EAAE,MAAM,CAAA;KAC/B,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC3C,IAAI,EAAE,IAAI,CAAA;CACb,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,WACzB,oBAAoB,KAC7B,QAAQ,kCAAkC,CAoB5C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,WACvB,oBAAoB,YAClB,gCAAgC,KAC3C,QAAQ,gCAAgC,CAK1C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAChC;;;;;;;;;;;;;;;;;;OAkBG;IACH,wBAAwB,EAAE,MAAM,OAAO,CAAC,kCAAkC,CAAC,CAAA;IAC3E;;;;;;;;;;;;;;;;;;OAkBG;IACH,sBAAsB,EAAE,CAAC,IAAI,EAAE,gCAAgC,KAAK,OAAO,CAAC,gCAAgC,CAAC,CAAA;CAChH,CAAA;AAED,eAAO,MAAM,qBAAqB,WAAY,MAAM,KAAG,qBAIrD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,WACrB,sBAAsB,QACxB,8BAA8B,KACrC,QAAQ,8BAA8B,CAYxC,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IACxC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oBAAoB,EAAE,CAAC,IAAI,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAA;CAC1G,CAAA;AAED,eAAO,MAAM,uBAAuB,WAAY,MAAM,KAAG,6BAGvD,CAAA;AAEF;;GAEG"}
1
+ {"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../actions/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,kCAAkC,EACvC,wBAAwB,EAC3B,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACrC,sBAAsB,EACzB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACH,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,oBAAoB,EACvB,MAAM,mCAAmC,CAAA;AAE1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAA;AAC5G,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAEjG,YAAY,EACR,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,qBAAqB,EACrB,6BAA6B,EAChC,CAAA;AAED,OAAO,EACH,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EAC1B,CAAA"}
@@ -0,0 +1,34 @@
1
+ import type { Address, PublicClient } from "viem";
2
+ export type GetAccountNonceParams = {
3
+ sender: Address;
4
+ entryPoint: Address;
5
+ key?: bigint;
6
+ };
7
+ /**
8
+ * Returns the nonce of the account with the entry point.
9
+ *
10
+ * - Docs: https://docs.pimlico.io/permissionless/reference/public-actions/getAccountNonce
11
+ *
12
+ * @param publicClient {@link PublicClient} that you created using viem's createPublicClient.
13
+ * @param args {@link GetAccountNonceParams} address, entryPoint & key
14
+ * @returns bigint nonce
15
+ *
16
+ * @example
17
+ * import { createPublicClient } from "viem"
18
+ * import { getAccountNonce } from "permissionless/actions"
19
+ *
20
+ * const publicClient = createPublicClient({
21
+ * chain: goerli,
22
+ * transport: http("https://goerli.infura.io/v3/your-infura-key")
23
+ * })
24
+ *
25
+ * const nonce = await getAccountNonce(publicClient, {
26
+ * address,
27
+ * entryPoint,
28
+ * key
29
+ * })
30
+ *
31
+ * // Return 0n
32
+ */
33
+ export declare const getAccountNonce: (publicClient: PublicClient, { sender, entryPoint, key }: GetAccountNonceParams) => Promise<bigint>;
34
+ //# sourceMappingURL=getAccountNonce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAccountNonce.d.ts","sourceRoot":"","sources":["../../../actions/public/getAccountNonce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,eAAe,iBACV,YAAY,+BACe,qBAAqB,KAC/D,QAAQ,MAAM,CA6BhB,CAAA"}
@@ -1,14 +1,8 @@
1
- import type { Address, Hex, PublicClient } from "viem";
2
- import { BaseError } from "viem";
1
+ import { type Address, BaseError, type Hex, type PublicClient } from "viem";
3
2
  export type GetSenderAddressParams = {
4
3
  initCode: Hex;
5
4
  entryPoint: Address;
6
5
  };
7
- export type GetAccountNonceParams = {
8
- address: Address;
9
- entryPoint: Address;
10
- key?: bigint;
11
- };
12
6
  export declare class InvalidEntryPointError extends BaseError {
13
7
  name: string;
14
8
  constructor({ cause, entryPoint }?: {
@@ -43,31 +37,4 @@ export declare class InvalidEntryPointError extends BaseError {
43
37
  * // Return '0x7a88a206ba40b37a8c07a2b5688cf8b287318b63'
44
38
  */
45
39
  export declare const getSenderAddress: (publicClient: PublicClient, { initCode, entryPoint }: GetSenderAddressParams) => Promise<Address>;
46
- /**
47
- * Returns the nonce of the account with the entry point.
48
- *
49
- * - Docs: https://docs.pimlico.io/permissionless/reference/public-actions/getAccountNonce
50
- *
51
- * @param publicClient {@link PublicClient} that you created using viem's createPublicClient.
52
- * @param args {@link GetAccountNonceParams} address, entryPoint & key
53
- * @returns bigint nonce
54
- *
55
- * @example
56
- * import { createPublicClient } from "viem"
57
- * import { getAccountNonce } from "permissionless/actions"
58
- *
59
- * const publicClient = createPublicClient({
60
- * chain: goerli,
61
- * transport: http("https://goerli.infura.io/v3/your-infura-key")
62
- * })
63
- *
64
- * const nonce = await getAccountNonce(publicClient, {
65
- * address,
66
- * entryPoint,
67
- * key
68
- * })
69
- *
70
- * // Return 0n
71
- */
72
- export declare const getAccountNonce: (publicClient: PublicClient, { address, entryPoint, key }: GetAccountNonceParams) => Promise<bigint>;
73
- //# sourceMappingURL=public.d.ts.map
40
+ //# sourceMappingURL=getSenderAddress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSenderAddress.d.ts","sourceRoot":"","sources":["../../../actions/public/getSenderAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,SAAS,EAGT,KAAK,GAAG,EACR,KAAK,YAAY,EACpB,MAAM,MAAM,CAAA;AAEb,MAAM,MAAM,sBAAsB,GAAG;IAAE,QAAQ,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAA;AAE3E,qBAAa,sBAAuB,SAAQ,SAAS;IACxC,IAAI,SAA2B;gBAE5B,EAAE,KAAK,EAAE,UAAU,EAAE,GAAE;QAAE,KAAK,CAAC,EAAE,SAAS,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAO;CAUtF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,iBACX,YAAY,4BACA,sBAAsB,KACjD,QAAQ,OAAO,CAgDjB,CAAA"}
@@ -0,0 +1,29 @@
1
+ import type { Address } from "viem";
2
+ import type { StackupPaymasterClient } from "../../clients/stackup.js";
3
+ export type AccountsParameters = {
4
+ entryPoint: Address;
5
+ };
6
+ /**
7
+ * Returns all the Paymaster addresses associated with an EntryPoint that’s owned by this service.
8
+ *
9
+ * https://docs.stackup.sh/docs/paymaster-api-rpc-methods#pm_accounts
10
+ *
11
+ * @param args {@link AccountsParameters} entryPoint for which you want to get list of supported paymasters.
12
+ * @returns paymaster addresses
13
+ *
14
+ * @example
15
+ * import { createClient } from "viem"
16
+ * import { accounts } from "permissionless/actions/stackup"
17
+ *
18
+ * const bundlerClient = createClient({
19
+ * chain: goerli,
20
+ * transport: http("https://api.stackup.sh/v1/paymaster/YOUR_API_KEY_HERE")
21
+ * })
22
+ *
23
+ * await accounts(bundlerClient, {
24
+ * entryPoint: entryPoint
25
+ * }})
26
+ *
27
+ */
28
+ export declare const accounts: (client: StackupPaymasterClient, { entryPoint }: AccountsParameters) => Promise<Address[]>;
29
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../actions/stackup/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEtE,MAAM,MAAM,kBAAkB,GAAG;IAC7B,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,WACT,sBAAsB,kBACd,kBAAkB,KACnC,QAAQ,OAAO,EAAE,CAOnB,CAAA"}
@@ -0,0 +1,43 @@
1
+ import type { Address, Hex } from "viem";
2
+ import type { PartialBy } from "viem/types/utils";
3
+ import { type StackupPaymasterClient } from "../../clients/stackup.js";
4
+ import type { StackupPaymasterContext } from "../../types/stackup.js";
5
+ import type { UserOperation } from "../../types/userOperation.js";
6
+ export type SponsorUserOperationParameters = {
7
+ userOperation: PartialBy<UserOperation, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterAndData">;
8
+ entryPoint: Address;
9
+ context: StackupPaymasterContext;
10
+ };
11
+ export type SponsorUserOperationReturnType = {
12
+ paymasterAndData: Hex;
13
+ preVerificationGas: bigint;
14
+ verificationGasLimit: bigint;
15
+ callGasLimit: bigint;
16
+ };
17
+ /**
18
+ * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
19
+ *
20
+ * - Docs: https://docs.pimlico.io/permissionless/reference/stackup-paymaster-actions/sponsorUserOperation
21
+ *
22
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
23
+ * @param args {@link sponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
24
+ * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
25
+ *
26
+ *
27
+ * @example
28
+ * import { createClient } from "viem"
29
+ * import { sponsorUserOperation } from "permissionless/actions/stackup"
30
+ *
31
+ * const bundlerClient = createClient({
32
+ * chain: goerli,
33
+ * transport: http("https://api.stackup.sh/v1/paymaster/YOUR_API_KEY_HERE")
34
+ * })
35
+ *
36
+ * await sponsorUserOperation(bundlerClient, {
37
+ * userOperation: userOperationWithDummySignature,
38
+ * entryPoint: entryPoint
39
+ * }})
40
+ *
41
+ */
42
+ export declare const sponsorUserOperation: (client: StackupPaymasterClient, args: SponsorUserOperationParameters) => Promise<SponsorUserOperationReturnType>;
43
+ //# sourceMappingURL=sponsorUserOperation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/stackup/sponsorUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,8BAA8B,CAAA;AAG/F,MAAM,MAAM,8BAA8B,GAAG;IACzC,aAAa,EAAE,SAAS,CACpB,aAAa,EACb,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,kBAAkB,CACtF,CAAA;IACD,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,uBAAuB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IACzC,gBAAgB,EAAE,GAAG,CAAA;IACrB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,WACrB,sBAAsB,QACxB,8BAA8B,KACrC,QAAQ,8BAA8B,CAYxC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { StackupPaymasterClientActions } from "../clients/decorators/stackup.js";
2
+ import { stackupPaymasterActions } from "../clients/decorators/stackup.js";
3
+ import { type AccountsParameters, accounts } from "./stackup/accounts.js";
4
+ import { type SponsorUserOperationParameters, type SponsorUserOperationReturnType, sponsorUserOperation } from "./stackup/sponsorUserOperation.js";
5
+ export type { SponsorUserOperationParameters, SponsorUserOperationReturnType, AccountsParameters, StackupPaymasterClientActions };
6
+ export { sponsorUserOperation, accounts, stackupPaymasterActions };
7
+ //# sourceMappingURL=stackup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stackup.d.ts","sourceRoot":"","sources":["../../actions/stackup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,KAAK,kBAAkB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EACH,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,oBAAoB,EACvB,MAAM,mCAAmC,CAAA;AAE1C,YAAY,EACR,8BAA8B,EAC9B,8BAA8B,EAC9B,kBAAkB,EAClB,6BAA6B,EAChC,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem";
2
- import type { BundlerActions } from "../actions/bundler";
3
- import type { BundlerRpcSchema } from "../types/bundler";
4
- export type BundlerClient = Client<Transport, Chain | undefined, Account | undefined, BundlerRpcSchema, BundlerActions>;
2
+ import type { BundlerRpcSchema } from "../types/bundler.js";
3
+ import { type BundlerActions } from "./decorators/bundler.js";
4
+ export type BundlerClient<TChain extends Chain | undefined = Chain | undefined> = Client<Transport, TChain, Account | undefined, BundlerRpcSchema, BundlerActions>;
5
5
  /**
6
6
  * 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).
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../clients/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAGjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAA;AACvH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;MAE7B,aASF,CAAA"}
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../clients/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,yBAAyB,CAAA;AAE7E,MAAM,MAAM,aAAa,CAAC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IAAI,MAAM,CACpF,SAAS,EACT,MAAM,EACN,OAAO,GAAG,SAAS,EACnB,gBAAgB,EAChB,cAAc,CACjB,CAAA;AACD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;MAE7B,aASF,CAAA"}