permissionless 0.1.48 → 0.1.49

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 (711) hide show
  1. package/_cjs/accounts/biconomy/abi/BiconomySmartAccountAbi.js +102 -0
  2. package/_cjs/accounts/biconomy/abi/BiconomySmartAccountAbi.js.map +1 -0
  3. package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js +14 -0
  4. package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -0
  5. package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js +233 -0
  6. package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -0
  7. package/_cjs/accounts/index.js +30 -0
  8. package/_cjs/accounts/index.js.map +1 -0
  9. package/_cjs/accounts/kernel/abi/KernelAccountAbi.js +84 -0
  10. package/_cjs/accounts/kernel/abi/KernelAccountAbi.js.map +1 -0
  11. package/_cjs/accounts/kernel/abi/KernelV3AccountAbi.js +110 -0
  12. package/_cjs/accounts/kernel/abi/KernelV3AccountAbi.js.map +1 -0
  13. package/_cjs/accounts/kernel/abi/KernelV3MetaFactoryAbi.js +21 -0
  14. package/_cjs/accounts/kernel/abi/KernelV3MetaFactoryAbi.js.map +1 -0
  15. package/_cjs/accounts/kernel/constants.js +27 -0
  16. package/_cjs/accounts/kernel/constants.js.map +1 -0
  17. package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js +332 -0
  18. package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -0
  19. package/_cjs/accounts/kernel/utils/encodeCallData.js +90 -0
  20. package/_cjs/accounts/kernel/utils/encodeCallData.js.map +1 -0
  21. package/_cjs/accounts/kernel/utils/getExecMode.js +15 -0
  22. package/_cjs/accounts/kernel/utils/getExecMode.js.map +1 -0
  23. package/_cjs/accounts/kernel/utils/getNonceKey.js +25 -0
  24. package/_cjs/accounts/kernel/utils/getNonceKey.js.map +1 -0
  25. package/_cjs/accounts/kernel/utils/isKernelV2.js +9 -0
  26. package/_cjs/accounts/kernel/utils/isKernelV2.js.map +1 -0
  27. package/_cjs/accounts/kernel/utils/signMessage.js +29 -0
  28. package/_cjs/accounts/kernel/utils/signMessage.js.map +1 -0
  29. package/_cjs/accounts/kernel/utils/signTypedData.js +41 -0
  30. package/_cjs/accounts/kernel/utils/signTypedData.js.map +1 -0
  31. package/_cjs/accounts/kernel/utils/wrapMessageHash.js +20 -0
  32. package/_cjs/accounts/kernel/utils/wrapMessageHash.js.map +1 -0
  33. package/_cjs/accounts/light/privateKeyToLightSmartAccount.js +14 -0
  34. package/_cjs/accounts/light/privateKeyToLightSmartAccount.js.map +1 -0
  35. package/_cjs/accounts/light/signerToLightSmartAccount.js +256 -0
  36. package/_cjs/accounts/light/signerToLightSmartAccount.js.map +1 -0
  37. package/_cjs/accounts/safe/privateKeyToSafeSmartAccount.js +14 -0
  38. package/_cjs/accounts/safe/privateKeyToSafeSmartAccount.js.map +1 -0
  39. package/_cjs/accounts/safe/signerToSafeSmartAccount.js +1012 -0
  40. package/_cjs/accounts/safe/signerToSafeSmartAccount.js.map +1 -0
  41. package/_cjs/accounts/simple/privateKeyToSimpleSmartAccount.js +14 -0
  42. package/_cjs/accounts/simple/privateKeyToSimpleSmartAccount.js.map +1 -0
  43. package/_cjs/accounts/simple/signerToSimpleSmartAccount.js +259 -0
  44. package/_cjs/accounts/simple/signerToSimpleSmartAccount.js.map +1 -0
  45. package/_cjs/accounts/toSmartAccount.js +84 -0
  46. package/_cjs/accounts/toSmartAccount.js.map +1 -0
  47. package/_cjs/accounts/trust/privateKeyToTrustSmartAccount.js +14 -0
  48. package/_cjs/accounts/trust/privateKeyToTrustSmartAccount.js.map +1 -0
  49. package/_cjs/accounts/trust/signerToTrustSmartAccount.js +134 -0
  50. package/_cjs/accounts/trust/signerToTrustSmartAccount.js.map +1 -0
  51. package/_cjs/accounts/trust/utils/encodeCallData.js +74 -0
  52. package/_cjs/accounts/trust/utils/encodeCallData.js.map +1 -0
  53. package/_cjs/accounts/trust/utils/getAccountAddress.js +19 -0
  54. package/_cjs/accounts/trust/utils/getAccountAddress.js.map +1 -0
  55. package/_cjs/accounts/trust/utils/getDummySignature.js +8 -0
  56. package/_cjs/accounts/trust/utils/getDummySignature.js.map +1 -0
  57. package/_cjs/accounts/trust/utils/getFactoryData.js +43 -0
  58. package/_cjs/accounts/trust/utils/getFactoryData.js.map +1 -0
  59. package/_cjs/accounts/trust/utils/signMessage.js +9 -0
  60. package/_cjs/accounts/trust/utils/signMessage.js.map +1 -0
  61. package/_cjs/accounts/trust/utils/signTransaction.js +9 -0
  62. package/_cjs/accounts/trust/utils/signTransaction.js.map +1 -0
  63. package/_cjs/accounts/trust/utils/signUserOperation.js +19 -0
  64. package/_cjs/accounts/trust/utils/signUserOperation.js.map +1 -0
  65. package/_cjs/accounts/types.js +23 -0
  66. package/_cjs/accounts/types.js.map +1 -0
  67. package/_cjs/actions/bundler/chainId.js +11 -0
  68. package/_cjs/actions/bundler/chainId.js.map +1 -0
  69. package/_cjs/actions/bundler/estimateUserOperationGas.js +49 -0
  70. package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -0
  71. package/_cjs/actions/bundler/getUserOperationByHash.js +47 -0
  72. package/_cjs/actions/bundler/getUserOperationByHash.js.map +1 -0
  73. package/_cjs/actions/bundler/getUserOperationReceipt.js +52 -0
  74. package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -0
  75. package/_cjs/actions/bundler/sendUserOperation.js +23 -0
  76. package/_cjs/actions/bundler/sendUserOperation.js.map +1 -0
  77. package/_cjs/actions/bundler/supportedEntryPoints.js +11 -0
  78. package/_cjs/actions/bundler/supportedEntryPoints.js.map +1 -0
  79. package/_cjs/actions/bundler/waitForUserOperationReceipt.js +67 -0
  80. package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -0
  81. package/_cjs/actions/erc7579/accountId.js +66 -0
  82. package/_cjs/actions/erc7579/accountId.js.map +1 -0
  83. package/_cjs/actions/erc7579/installModule.js +65 -0
  84. package/_cjs/actions/erc7579/installModule.js.map +1 -0
  85. package/_cjs/actions/erc7579/installModules.js +65 -0
  86. package/_cjs/actions/erc7579/installModules.js.map +1 -0
  87. package/_cjs/actions/erc7579/isModuleInstalled.js +86 -0
  88. package/_cjs/actions/erc7579/isModuleInstalled.js.map +1 -0
  89. package/_cjs/actions/erc7579/supportsExecutionMode.js +95 -0
  90. package/_cjs/actions/erc7579/supportsExecutionMode.js.map +1 -0
  91. package/_cjs/actions/erc7579/supportsModule.js +84 -0
  92. package/_cjs/actions/erc7579/supportsModule.js.map +1 -0
  93. package/_cjs/actions/erc7579/uninstallModule.js +65 -0
  94. package/_cjs/actions/erc7579/uninstallModule.js.map +1 -0
  95. package/_cjs/actions/erc7579/uninstallModules.js +65 -0
  96. package/_cjs/actions/erc7579/uninstallModules.js.map +1 -0
  97. package/_cjs/actions/erc7579.js +33 -0
  98. package/_cjs/actions/erc7579.js.map +1 -0
  99. package/_cjs/actions/index.js +25 -0
  100. package/_cjs/actions/index.js.map +1 -0
  101. package/_cjs/actions/pimlico/getUserOperationGasPrice.js +25 -0
  102. package/_cjs/actions/pimlico/getUserOperationGasPrice.js.map +1 -0
  103. package/_cjs/actions/pimlico/getUserOperationStatus.js +11 -0
  104. package/_cjs/actions/pimlico/getUserOperationStatus.js.map +1 -0
  105. package/_cjs/actions/pimlico/sendCompressedUserOperation.js +16 -0
  106. package/_cjs/actions/pimlico/sendCompressedUserOperation.js.map +1 -0
  107. package/_cjs/actions/pimlico/sponsorUserOperation.js +43 -0
  108. package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -0
  109. package/_cjs/actions/pimlico/validateSponsorshipPolicies.js +16 -0
  110. package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -0
  111. package/_cjs/actions/pimlico.js +17 -0
  112. package/_cjs/actions/pimlico.js.map +1 -0
  113. package/_cjs/actions/public/getAccountNonce.js +38 -0
  114. package/_cjs/actions/public/getAccountNonce.js.map +1 -0
  115. package/_cjs/actions/public/getSenderAddress.js +59 -0
  116. package/_cjs/actions/public/getSenderAddress.js.map +1 -0
  117. package/_cjs/actions/smartAccount/deployContract.js +38 -0
  118. package/_cjs/actions/smartAccount/deployContract.js.map +1 -0
  119. package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +195 -0
  120. package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
  121. package/_cjs/actions/smartAccount/sendTransaction.js +43 -0
  122. package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -0
  123. package/_cjs/actions/smartAccount/sendTransactions.js +45 -0
  124. package/_cjs/actions/smartAccount/sendTransactions.js.map +1 -0
  125. package/_cjs/actions/smartAccount/sendUserOperation.js +21 -0
  126. package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -0
  127. package/_cjs/actions/smartAccount/signMessage.js +16 -0
  128. package/_cjs/actions/smartAccount/signMessage.js.map +1 -0
  129. package/_cjs/actions/smartAccount/signTypedData.js +34 -0
  130. package/_cjs/actions/smartAccount/signTypedData.js.map +1 -0
  131. package/_cjs/actions/smartAccount/writeContract.js +21 -0
  132. package/_cjs/actions/smartAccount/writeContract.js.map +1 -0
  133. package/_cjs/actions/smartAccount.js +20 -0
  134. package/_cjs/actions/smartAccount.js.map +1 -0
  135. package/_cjs/actions/stackup/accounts.js +12 -0
  136. package/_cjs/actions/stackup/accounts.js.map +1 -0
  137. package/_cjs/actions/stackup/sponsorUserOperation.js +32 -0
  138. package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -0
  139. package/_cjs/actions/stackup.js +10 -0
  140. package/_cjs/actions/stackup.js.map +1 -0
  141. package/_cjs/clients/createBundlerClient.js +17 -0
  142. package/_cjs/clients/createBundlerClient.js.map +1 -0
  143. package/_cjs/clients/createSmartAccountClient.js +20 -0
  144. package/_cjs/clients/createSmartAccountClient.js.map +1 -0
  145. package/_cjs/clients/decorators/bundler.js +24 -0
  146. package/_cjs/clients/decorators/bundler.js.map +1 -0
  147. package/_cjs/clients/decorators/pimlico.js +25 -0
  148. package/_cjs/clients/decorators/pimlico.js.map +1 -0
  149. package/_cjs/clients/decorators/smartAccount.js +43 -0
  150. package/_cjs/clients/decorators/smartAccount.js.map +1 -0
  151. package/_cjs/clients/decorators/stackup.js +14 -0
  152. package/_cjs/clients/decorators/stackup.js.map +1 -0
  153. package/_cjs/clients/pimlico.js +31 -0
  154. package/_cjs/clients/pimlico.js.map +1 -0
  155. package/_cjs/clients/stackup.js +20 -0
  156. package/_cjs/clients/stackup.js.map +1 -0
  157. package/_cjs/errors/account.js +311 -0
  158. package/_cjs/errors/account.js.map +1 -0
  159. package/_cjs/errors/bundler.js +61 -0
  160. package/_cjs/errors/bundler.js.map +1 -0
  161. package/_cjs/errors/estimateUserOperationGas.js +53 -0
  162. package/_cjs/errors/estimateUserOperationGas.js.map +1 -0
  163. package/_cjs/errors/gas.js +113 -0
  164. package/_cjs/errors/gas.js.map +1 -0
  165. package/_cjs/errors/index.js +35 -0
  166. package/_cjs/errors/index.js.map +1 -0
  167. package/_cjs/errors/paymaster.js +228 -0
  168. package/_cjs/errors/paymaster.js.map +1 -0
  169. package/_cjs/errors/sendUserOperation.js +37 -0
  170. package/_cjs/errors/sendUserOperation.js.map +1 -0
  171. package/_cjs/errors/utils.js +18 -0
  172. package/_cjs/errors/utils.js.map +1 -0
  173. package/_cjs/experimental/eip7677/actions/getPaymasterData.js +41 -0
  174. package/_cjs/experimental/eip7677/actions/getPaymasterData.js.map +1 -0
  175. package/_cjs/experimental/eip7677/actions/getPaymasterStubData.js +51 -0
  176. package/_cjs/experimental/eip7677/actions/getPaymasterStubData.js.map +1 -0
  177. package/_cjs/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js +21 -0
  178. package/_cjs/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js.map +1 -0
  179. package/_cjs/experimental/eip7677/index.js +10 -0
  180. package/_cjs/experimental/eip7677/index.js.map +1 -0
  181. package/_cjs/experimental/eip7677/types/paymaster.js +3 -0
  182. package/_cjs/experimental/eip7677/types/paymaster.js.map +1 -0
  183. package/_cjs/experimental/index.js +5 -0
  184. package/_cjs/experimental/index.js.map +1 -0
  185. package/_cjs/index.js +37 -0
  186. package/_cjs/index.js.map +1 -0
  187. package/_cjs/package.json +1 -0
  188. package/_cjs/types/bundler.js +3 -0
  189. package/_cjs/types/bundler.js.map +1 -0
  190. package/_cjs/types/entrypoint.js +3 -0
  191. package/_cjs/types/entrypoint.js.map +1 -0
  192. package/_cjs/types/index.js +3 -0
  193. package/_cjs/types/index.js.map +1 -0
  194. package/_cjs/types/pimlico.js +3 -0
  195. package/_cjs/types/pimlico.js.map +1 -0
  196. package/_cjs/types/stackup.js +3 -0
  197. package/_cjs/types/stackup.js.map +1 -0
  198. package/_cjs/types/userOperation.js +3 -0
  199. package/_cjs/types/userOperation.js.map +1 -0
  200. package/_cjs/utils/decodeNonce.js +12 -0
  201. package/_cjs/utils/decodeNonce.js.map +1 -0
  202. package/_cjs/utils/deepHexlify.js +31 -0
  203. package/_cjs/utils/deepHexlify.js.map +1 -0
  204. package/_cjs/utils/encode7579CallData.js +81 -0
  205. package/_cjs/utils/encode7579CallData.js.map +1 -0
  206. package/_cjs/utils/encodeNonce.js +11 -0
  207. package/_cjs/utils/encodeNonce.js.map +1 -0
  208. package/_cjs/utils/errors/getBundlerError.js +124 -0
  209. package/_cjs/utils/errors/getBundlerError.js.map +1 -0
  210. package/_cjs/utils/errors/getEstimateUserOperationGasError.js +19 -0
  211. package/_cjs/utils/errors/getEstimateUserOperationGasError.js.map +1 -0
  212. package/_cjs/utils/errors/getSendUserOperationError.js +19 -0
  213. package/_cjs/utils/errors/getSendUserOperationError.js.map +1 -0
  214. package/_cjs/utils/getAddressFromInitCodeOrPaymasterAndData.js +15 -0
  215. package/_cjs/utils/getAddressFromInitCodeOrPaymasterAndData.js.map +1 -0
  216. package/_cjs/utils/getEntryPointVersion.js +16 -0
  217. package/_cjs/utils/getEntryPointVersion.js.map +1 -0
  218. package/_cjs/utils/getPackedUserOperation.js +106 -0
  219. package/_cjs/utils/getPackedUserOperation.js.map +1 -0
  220. package/_cjs/utils/getRequiredPrefund.js +27 -0
  221. package/_cjs/utils/getRequiredPrefund.js.map +1 -0
  222. package/_cjs/utils/getUserOperationHash.js +94 -0
  223. package/_cjs/utils/getUserOperationHash.js.map +1 -0
  224. package/_cjs/utils/index.js +38 -0
  225. package/_cjs/utils/index.js.map +1 -0
  226. package/_cjs/utils/isSmartAccountDeployed.js +15 -0
  227. package/_cjs/utils/isSmartAccountDeployed.js.map +1 -0
  228. package/_cjs/utils/observe.js +44 -0
  229. package/_cjs/utils/observe.js.map +1 -0
  230. package/_cjs/utils/providerToSmartAccountSigner.js +32 -0
  231. package/_cjs/utils/providerToSmartAccountSigner.js.map +1 -0
  232. package/_cjs/utils/signUserOperationHashWithECDSA.js +58 -0
  233. package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -0
  234. package/_cjs/utils/walletClientToSmartAccountSigner.js +23 -0
  235. package/_cjs/utils/walletClientToSmartAccountSigner.js.map +1 -0
  236. package/_cjs/vitest.config.js +31 -0
  237. package/_cjs/vitest.config.js.map +1 -0
  238. package/_esm/accounts/biconomy/abi/BiconomySmartAccountAbi.js +105 -0
  239. package/_esm/accounts/biconomy/abi/BiconomySmartAccountAbi.js.map +1 -0
  240. package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js +15 -0
  241. package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -0
  242. package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js +268 -0
  243. package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -0
  244. package/_esm/accounts/index.js +15 -0
  245. package/_esm/accounts/index.js.map +1 -0
  246. package/_esm/accounts/kernel/abi/KernelAccountAbi.js +87 -0
  247. package/_esm/accounts/kernel/abi/KernelAccountAbi.js.map +1 -0
  248. package/_esm/accounts/kernel/abi/KernelV3AccountAbi.js +107 -0
  249. package/_esm/accounts/kernel/abi/KernelV3AccountAbi.js.map +1 -0
  250. package/_esm/accounts/kernel/abi/KernelV3MetaFactoryAbi.js +18 -0
  251. package/_esm/accounts/kernel/abi/KernelV3MetaFactoryAbi.js.map +1 -0
  252. package/_esm/accounts/kernel/constants.js +24 -0
  253. package/_esm/accounts/kernel/constants.js.map +1 -0
  254. package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js +395 -0
  255. package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -0
  256. package/_esm/accounts/kernel/utils/encodeCallData.js +89 -0
  257. package/_esm/accounts/kernel/utils/encodeCallData.js.map +1 -0
  258. package/_esm/accounts/kernel/utils/getExecMode.js +11 -0
  259. package/_esm/accounts/kernel/utils/getExecMode.js.map +1 -0
  260. package/_esm/accounts/kernel/utils/getNonceKey.js +21 -0
  261. package/_esm/accounts/kernel/utils/getNonceKey.js.map +1 -0
  262. package/_esm/accounts/kernel/utils/isKernelV2.js +5 -0
  263. package/_esm/accounts/kernel/utils/isKernelV2.js.map +1 -0
  264. package/_esm/accounts/kernel/utils/signMessage.js +25 -0
  265. package/_esm/accounts/kernel/utils/signMessage.js.map +1 -0
  266. package/_esm/accounts/kernel/utils/signTypedData.js +39 -0
  267. package/_esm/accounts/kernel/utils/signTypedData.js.map +1 -0
  268. package/_esm/accounts/kernel/utils/wrapMessageHash.js +16 -0
  269. package/_esm/accounts/kernel/utils/wrapMessageHash.js.map +1 -0
  270. package/_esm/accounts/light/privateKeyToLightSmartAccount.js +15 -0
  271. package/_esm/accounts/light/privateKeyToLightSmartAccount.js.map +1 -0
  272. package/_esm/accounts/light/signerToLightSmartAccount.js +258 -0
  273. package/_esm/accounts/light/signerToLightSmartAccount.js.map +1 -0
  274. package/_esm/accounts/safe/privateKeyToSafeSmartAccount.js +15 -0
  275. package/_esm/accounts/safe/privateKeyToSafeSmartAccount.js.map +1 -0
  276. package/_esm/accounts/safe/signerToSafeSmartAccount.js +1014 -0
  277. package/_esm/accounts/safe/signerToSafeSmartAccount.js.map +1 -0
  278. package/_esm/accounts/simple/privateKeyToSimpleSmartAccount.js +15 -0
  279. package/_esm/accounts/simple/privateKeyToSimpleSmartAccount.js.map +1 -0
  280. package/_esm/accounts/simple/signerToSimpleSmartAccount.js +261 -0
  281. package/_esm/accounts/simple/signerToSimpleSmartAccount.js.map +1 -0
  282. package/_esm/accounts/toSmartAccount.js +80 -0
  283. package/_esm/accounts/toSmartAccount.js.map +1 -0
  284. package/_esm/accounts/trust/privateKeyToTrustSmartAccount.js +15 -0
  285. package/_esm/accounts/trust/privateKeyToTrustSmartAccount.js.map +1 -0
  286. package/_esm/accounts/trust/signerToTrustSmartAccount.js +138 -0
  287. package/_esm/accounts/trust/signerToTrustSmartAccount.js.map +1 -0
  288. package/_esm/accounts/trust/utils/encodeCallData.js +70 -0
  289. package/_esm/accounts/trust/utils/encodeCallData.js.map +1 -0
  290. package/_esm/accounts/trust/utils/getAccountAddress.js +15 -0
  291. package/_esm/accounts/trust/utils/getAccountAddress.js.map +1 -0
  292. package/_esm/accounts/trust/utils/getDummySignature.js +4 -0
  293. package/_esm/accounts/trust/utils/getDummySignature.js.map +1 -0
  294. package/_esm/accounts/trust/utils/getFactoryData.js +42 -0
  295. package/_esm/accounts/trust/utils/getFactoryData.js.map +1 -0
  296. package/_esm/accounts/trust/utils/signMessage.js +5 -0
  297. package/_esm/accounts/trust/utils/signMessage.js.map +1 -0
  298. package/_esm/accounts/trust/utils/signTransaction.js +5 -0
  299. package/_esm/accounts/trust/utils/signTransaction.js.map +1 -0
  300. package/_esm/accounts/trust/utils/signUserOperation.js +15 -0
  301. package/_esm/accounts/trust/utils/signUserOperation.js.map +1 -0
  302. package/_esm/accounts/types.js +19 -0
  303. package/_esm/accounts/types.js.map +1 -0
  304. package/_esm/actions/bundler/chainId.js +29 -0
  305. package/_esm/actions/bundler/chainId.js.map +1 -0
  306. package/_esm/actions/bundler/estimateUserOperationGas.js +72 -0
  307. package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -0
  308. package/_esm/actions/bundler/getUserOperationByHash.js +65 -0
  309. package/_esm/actions/bundler/getUserOperationByHash.js.map +1 -0
  310. package/_esm/actions/bundler/getUserOperationReceipt.js +70 -0
  311. package/_esm/actions/bundler/getUserOperationReceipt.js.map +1 -0
  312. package/_esm/actions/bundler/sendUserOperation.js +44 -0
  313. package/_esm/actions/bundler/sendUserOperation.js.map +1 -0
  314. package/_esm/actions/bundler/supportedEntryPoints.js +29 -0
  315. package/_esm/actions/bundler/supportedEntryPoints.js.map +1 -0
  316. package/_esm/actions/bundler/waitForUserOperationReceipt.js +83 -0
  317. package/_esm/actions/bundler/waitForUserOperationReceipt.js.map +1 -0
  318. package/_esm/actions/erc7579/accountId.js +62 -0
  319. package/_esm/actions/erc7579/accountId.js.map +1 -0
  320. package/_esm/actions/erc7579/installModule.js +61 -0
  321. package/_esm/actions/erc7579/installModule.js.map +1 -0
  322. package/_esm/actions/erc7579/installModules.js +61 -0
  323. package/_esm/actions/erc7579/installModules.js.map +1 -0
  324. package/_esm/actions/erc7579/isModuleInstalled.js +82 -0
  325. package/_esm/actions/erc7579/isModuleInstalled.js.map +1 -0
  326. package/_esm/actions/erc7579/supportsExecutionMode.js +90 -0
  327. package/_esm/actions/erc7579/supportsExecutionMode.js.map +1 -0
  328. package/_esm/actions/erc7579/supportsModule.js +79 -0
  329. package/_esm/actions/erc7579/supportsModule.js.map +1 -0
  330. package/_esm/actions/erc7579/uninstallModule.js +61 -0
  331. package/_esm/actions/erc7579/uninstallModule.js.map +1 -0
  332. package/_esm/actions/erc7579/uninstallModules.js +61 -0
  333. package/_esm/actions/erc7579/uninstallModules.js.map +1 -0
  334. package/_esm/actions/erc7579.js +22 -0
  335. package/_esm/actions/erc7579.js.map +1 -0
  336. package/_esm/actions/index.js +12 -0
  337. package/_esm/actions/index.js.map +1 -0
  338. package/_esm/actions/pimlico/getUserOperationGasPrice.js +42 -0
  339. package/_esm/actions/pimlico/getUserOperationGasPrice.js.map +1 -0
  340. package/_esm/actions/pimlico/getUserOperationStatus.js +30 -0
  341. package/_esm/actions/pimlico/getUserOperationStatus.js.map +1 -0
  342. package/_esm/actions/pimlico/sendCompressedUserOperation.js +37 -0
  343. package/_esm/actions/pimlico/sendCompressedUserOperation.js.map +1 -0
  344. package/_esm/actions/pimlico/sponsorUserOperation.js +64 -0
  345. package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -0
  346. package/_esm/actions/pimlico/validateSponsorshipPolicies.js +47 -0
  347. package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -0
  348. package/_esm/actions/pimlico.js +8 -0
  349. package/_esm/actions/pimlico.js.map +1 -0
  350. package/_esm/actions/public/getAccountNonce.js +60 -0
  351. package/_esm/actions/public/getAccountNonce.js.map +1 -0
  352. package/_esm/actions/public/getSenderAddress.js +80 -0
  353. package/_esm/actions/public/getSenderAddress.js.map +1 -0
  354. package/_esm/actions/smartAccount/deployContract.js +62 -0
  355. package/_esm/actions/smartAccount/deployContract.js.map +1 -0
  356. package/_esm/actions/smartAccount/prepareUserOperationRequest.js +195 -0
  357. package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -0
  358. package/_esm/actions/smartAccount/sendTransaction.js +85 -0
  359. package/_esm/actions/smartAccount/sendTransaction.js.map +1 -0
  360. package/_esm/actions/smartAccount/sendTransactions.js +87 -0
  361. package/_esm/actions/smartAccount/sendTransactions.js.map +1 -0
  362. package/_esm/actions/smartAccount/sendUserOperation.js +17 -0
  363. package/_esm/actions/smartAccount/sendUserOperation.js.map +1 -0
  364. package/_esm/actions/smartAccount/signMessage.js +58 -0
  365. package/_esm/actions/smartAccount/signMessage.js.map +1 -0
  366. package/_esm/actions/smartAccount/signTypedData.js +128 -0
  367. package/_esm/actions/smartAccount/signTypedData.js.map +1 -0
  368. package/_esm/actions/smartAccount/writeContract.js +17 -0
  369. package/_esm/actions/smartAccount/writeContract.js.map +1 -0
  370. package/_esm/actions/smartAccount.js +10 -0
  371. package/_esm/actions/smartAccount.js.map +1 -0
  372. package/_esm/actions/stackup/accounts.js +30 -0
  373. package/_esm/actions/stackup/accounts.js.map +1 -0
  374. package/_esm/actions/stackup/sponsorUserOperation.js +53 -0
  375. package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -0
  376. package/_esm/actions/stackup.js +5 -0
  377. package/_esm/actions/stackup.js.map +1 -0
  378. package/_esm/clients/createBundlerClient.js +32 -0
  379. package/_esm/clients/createBundlerClient.js.map +1 -0
  380. package/_esm/clients/createSmartAccountClient.js +35 -0
  381. package/_esm/clients/createSmartAccountClient.js.map +1 -0
  382. package/_esm/clients/decorators/bundler.js +21 -0
  383. package/_esm/clients/decorators/bundler.js.map +1 -0
  384. package/_esm/clients/decorators/pimlico.js +64 -0
  385. package/_esm/clients/decorators/pimlico.js.map +1 -0
  386. package/_esm/clients/decorators/smartAccount.js +39 -0
  387. package/_esm/clients/decorators/smartAccount.js.map +1 -0
  388. package/_esm/clients/decorators/stackup.js +10 -0
  389. package/_esm/clients/decorators/stackup.js.map +1 -0
  390. package/_esm/clients/pimlico.js +64 -0
  391. package/_esm/clients/pimlico.js.map +1 -0
  392. package/_esm/clients/stackup.js +35 -0
  393. package/_esm/clients/stackup.js.map +1 -0
  394. package/_esm/errors/account.js +298 -0
  395. package/_esm/errors/account.js.map +1 -0
  396. package/_esm/errors/bundler.js +56 -0
  397. package/_esm/errors/bundler.js.map +1 -0
  398. package/_esm/errors/estimateUserOperationGas.js +49 -0
  399. package/_esm/errors/estimateUserOperationGas.js.map +1 -0
  400. package/_esm/errors/gas.js +106 -0
  401. package/_esm/errors/gas.js.map +1 -0
  402. package/_esm/errors/index.js +8 -0
  403. package/_esm/errors/index.js.map +1 -0
  404. package/_esm/errors/paymaster.js +218 -0
  405. package/_esm/errors/paymaster.js.map +1 -0
  406. package/_esm/errors/sendUserOperation.js +33 -0
  407. package/_esm/errors/sendUserOperation.js.map +1 -0
  408. package/_esm/errors/utils.js +14 -0
  409. package/_esm/errors/utils.js.map +1 -0
  410. package/_esm/experimental/eip7677/actions/getPaymasterData.js +37 -0
  411. package/_esm/experimental/eip7677/actions/getPaymasterData.js.map +1 -0
  412. package/_esm/experimental/eip7677/actions/getPaymasterStubData.js +47 -0
  413. package/_esm/experimental/eip7677/actions/getPaymasterStubData.js.map +1 -0
  414. package/_esm/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js +18 -0
  415. package/_esm/experimental/eip7677/clients/decorators/paymasterActionsEip7677.js.map +1 -0
  416. package/_esm/experimental/eip7677/index.js +5 -0
  417. package/_esm/experimental/eip7677/index.js.map +1 -0
  418. package/_esm/experimental/eip7677/types/paymaster.js +2 -0
  419. package/_esm/experimental/eip7677/types/paymaster.js.map +1 -0
  420. package/_esm/experimental/index.js +2 -0
  421. package/_esm/experimental/index.js.map +1 -0
  422. package/_esm/index.js +20 -0
  423. package/_esm/index.js.map +1 -0
  424. package/_esm/package.json +1 -0
  425. package/_esm/types/bundler.js +2 -0
  426. package/_esm/types/bundler.js.map +1 -0
  427. package/_esm/types/entrypoint.js +2 -0
  428. package/_esm/types/entrypoint.js.map +1 -0
  429. package/_esm/types/index.js +2 -0
  430. package/_esm/types/index.js.map +1 -0
  431. package/_esm/types/pimlico.js +2 -0
  432. package/_esm/types/pimlico.js.map +1 -0
  433. package/_esm/types/stackup.js +2 -0
  434. package/_esm/types/stackup.js.map +1 -0
  435. package/_esm/types/userOperation.js +2 -0
  436. package/_esm/types/userOperation.js.map +1 -0
  437. package/_esm/utils/decodeNonce.js +8 -0
  438. package/_esm/utils/decodeNonce.js.map +1 -0
  439. package/_esm/utils/deepHexlify.js +30 -0
  440. package/_esm/utils/deepHexlify.js.map +1 -0
  441. package/_esm/utils/encode7579CallData.js +77 -0
  442. package/_esm/utils/encode7579CallData.js.map +1 -0
  443. package/_esm/utils/encodeNonce.js +7 -0
  444. package/_esm/utils/encodeNonce.js.map +1 -0
  445. package/_esm/utils/errors/getBundlerError.js +121 -0
  446. package/_esm/utils/errors/getBundlerError.js.map +1 -0
  447. package/_esm/utils/errors/getEstimateUserOperationGasError.js +18 -0
  448. package/_esm/utils/errors/getEstimateUserOperationGasError.js.map +1 -0
  449. package/_esm/utils/errors/getSendUserOperationError.js +15 -0
  450. package/_esm/utils/errors/getSendUserOperationError.js.map +1 -0
  451. package/_esm/utils/getAddressFromInitCodeOrPaymasterAndData.js +11 -0
  452. package/_esm/utils/getAddressFromInitCodeOrPaymasterAndData.js.map +1 -0
  453. package/_esm/utils/getEntryPointVersion.js +11 -0
  454. package/_esm/utils/getEntryPointVersion.js.map +1 -0
  455. package/_esm/utils/getPackedUserOperation.js +94 -0
  456. package/_esm/utils/getPackedUserOperation.js.map +1 -0
  457. package/_esm/utils/getRequiredPrefund.js +37 -0
  458. package/_esm/utils/getRequiredPrefund.js.map +1 -0
  459. package/_esm/utils/getUserOperationHash.js +111 -0
  460. package/_esm/utils/getUserOperationHash.js.map +1 -0
  461. package/_esm/utils/index.js +19 -0
  462. package/_esm/utils/index.js.map +1 -0
  463. package/_esm/utils/isSmartAccountDeployed.js +11 -0
  464. package/_esm/utils/isSmartAccountDeployed.js.map +1 -0
  465. package/_esm/utils/observe.js +47 -0
  466. package/_esm/utils/observe.js.map +1 -0
  467. package/_esm/utils/providerToSmartAccountSigner.js +28 -0
  468. package/_esm/utils/providerToSmartAccountSigner.js.map +1 -0
  469. package/_esm/utils/signUserOperationHashWithECDSA.js +76 -0
  470. package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -0
  471. package/_esm/utils/walletClientToSmartAccountSigner.js +19 -0
  472. package/_esm/utils/walletClientToSmartAccountSigner.js.map +1 -0
  473. package/_esm/vitest.config.js +29 -0
  474. package/_esm/vitest.config.js.map +1 -0
  475. package/_types/accounts/biconomy/abi/BiconomySmartAccountAbi.d.ts +59 -0
  476. package/_types/accounts/biconomy/abi/BiconomySmartAccountAbi.d.ts.map +1 -0
  477. package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts +13 -0
  478. package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts.map +1 -0
  479. package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts +29 -0
  480. package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts.map +1 -0
  481. package/_types/accounts/index.d.ts +15 -0
  482. package/_types/accounts/index.d.ts.map +1 -0
  483. package/_types/accounts/kernel/abi/KernelAccountAbi.d.ts +68 -0
  484. package/_types/accounts/kernel/abi/KernelAccountAbi.d.ts.map +1 -0
  485. package/_types/accounts/kernel/abi/KernelV3AccountAbi.d.ts +135 -0
  486. package/_types/accounts/kernel/abi/KernelV3AccountAbi.d.ts.map +1 -0
  487. package/_types/accounts/kernel/abi/KernelV3MetaFactoryAbi.d.ts +24 -0
  488. package/_types/accounts/kernel/abi/KernelV3MetaFactoryAbi.d.ts.map +1 -0
  489. package/_types/accounts/kernel/constants.d.ts +21 -0
  490. package/_types/accounts/kernel/constants.d.ts.map +1 -0
  491. package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts +44 -0
  492. package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts.map +1 -0
  493. package/_types/accounts/kernel/utils/encodeCallData.d.ts +13 -0
  494. package/_types/accounts/kernel/utils/encodeCallData.d.ts.map +1 -0
  495. package/_types/accounts/kernel/utils/getExecMode.d.ts +7 -0
  496. package/_types/accounts/kernel/utils/getExecMode.d.ts.map +1 -0
  497. package/_types/accounts/kernel/utils/getNonceKey.d.ts +5 -0
  498. package/_types/accounts/kernel/utils/getNonceKey.d.ts.map +1 -0
  499. package/_types/accounts/kernel/utils/isKernelV2.d.ts +4 -0
  500. package/_types/accounts/kernel/utils/isKernelV2.d.ts.map +1 -0
  501. package/_types/accounts/kernel/utils/signMessage.d.ts +4 -0
  502. package/_types/accounts/kernel/utils/signMessage.d.ts.map +1 -0
  503. package/_types/accounts/kernel/utils/signTypedData.d.ts +4 -0
  504. package/_types/accounts/kernel/utils/signTypedData.d.ts.map +1 -0
  505. package/_types/accounts/kernel/utils/wrapMessageHash.d.ts +11 -0
  506. package/_types/accounts/kernel/utils/wrapMessageHash.d.ts.map +1 -0
  507. package/_types/accounts/light/privateKeyToLightSmartAccount.d.ts +14 -0
  508. package/_types/accounts/light/privateKeyToLightSmartAccount.d.ts.map +1 -0
  509. package/_types/accounts/light/signerToLightSmartAccount.d.ts +22 -0
  510. package/_types/accounts/light/signerToLightSmartAccount.d.ts.map +1 -0
  511. package/_types/accounts/safe/privateKeyToSafeSmartAccount.d.ts +13 -0
  512. package/_types/accounts/safe/privateKeyToSafeSmartAccount.d.ts.map +1 -0
  513. package/_types/accounts/safe/signerToSafeSmartAccount.d.ts +61 -0
  514. package/_types/accounts/safe/signerToSafeSmartAccount.d.ts.map +1 -0
  515. package/_types/accounts/simple/privateKeyToSimpleSmartAccount.d.ts +13 -0
  516. package/_types/accounts/simple/privateKeyToSimpleSmartAccount.d.ts.map +1 -0
  517. package/_types/accounts/simple/signerToSimpleSmartAccount.d.ts +20 -0
  518. package/_types/accounts/simple/signerToSimpleSmartAccount.d.ts.map +1 -0
  519. package/_types/accounts/toSmartAccount.d.ts +26 -0
  520. package/_types/accounts/toSmartAccount.d.ts.map +1 -0
  521. package/_types/accounts/trust/privateKeyToTrustSmartAccount.d.ts +13 -0
  522. package/_types/accounts/trust/privateKeyToTrustSmartAccount.d.ts.map +1 -0
  523. package/_types/accounts/trust/signerToTrustSmartAccount.d.ts +27 -0
  524. package/_types/accounts/trust/signerToTrustSmartAccount.d.ts.map +1 -0
  525. package/_types/accounts/trust/utils/encodeCallData.d.ts +12 -0
  526. package/_types/accounts/trust/utils/encodeCallData.d.ts.map +1 -0
  527. package/_types/accounts/trust/utils/getAccountAddress.d.ts +10 -0
  528. package/_types/accounts/trust/utils/getAccountAddress.d.ts.map +1 -0
  529. package/_types/accounts/trust/utils/getDummySignature.d.ts +3 -0
  530. package/_types/accounts/trust/utils/getDummySignature.d.ts.map +1 -0
  531. package/_types/accounts/trust/utils/getFactoryData.d.ts +10 -0
  532. package/_types/accounts/trust/utils/getFactoryData.d.ts.map +1 -0
  533. package/_types/accounts/trust/utils/signMessage.d.ts +4 -0
  534. package/_types/accounts/trust/utils/signMessage.d.ts.map +1 -0
  535. package/_types/accounts/trust/utils/signTransaction.d.ts +5 -0
  536. package/_types/accounts/trust/utils/signTransaction.d.ts.map +1 -0
  537. package/_types/accounts/trust/utils/signUserOperation.d.ts +9 -0
  538. package/_types/accounts/trust/utils/signUserOperation.d.ts.map +1 -0
  539. package/_types/accounts/types.d.ts +32 -0
  540. package/_types/accounts/types.d.ts.map +1 -0
  541. package/_types/actions/bundler/chainId.d.ts +27 -0
  542. package/_types/actions/bundler/chainId.d.ts.map +1 -0
  543. package/_types/actions/bundler/estimateUserOperationGas.d.ts +91 -0
  544. package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -0
  545. package/_types/actions/bundler/getUserOperationByHash.d.ts +39 -0
  546. package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -0
  547. package/_types/actions/bundler/getUserOperationReceipt.d.ts +58 -0
  548. package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -0
  549. package/_types/actions/bundler/sendUserOperation.d.ts +39 -0
  550. package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -0
  551. package/_types/actions/bundler/supportedEntryPoints.d.ts +27 -0
  552. package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -0
  553. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +43 -0
  554. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -0
  555. package/_types/actions/erc7579/accountId.d.ts +6 -0
  556. package/_types/actions/erc7579/accountId.d.ts.map +1 -0
  557. package/_types/actions/erc7579/installModule.d.ts +16 -0
  558. package/_types/actions/erc7579/installModule.d.ts.map +1 -0
  559. package/_types/actions/erc7579/installModules.d.ts +18 -0
  560. package/_types/actions/erc7579/installModules.d.ts.map +1 -0
  561. package/_types/actions/erc7579/isModuleInstalled.d.ts +12 -0
  562. package/_types/actions/erc7579/isModuleInstalled.d.ts.map +1 -0
  563. package/_types/actions/erc7579/supportsExecutionMode.d.ts +15 -0
  564. package/_types/actions/erc7579/supportsExecutionMode.d.ts.map +1 -0
  565. package/_types/actions/erc7579/supportsModule.d.ts +11 -0
  566. package/_types/actions/erc7579/supportsModule.d.ts.map +1 -0
  567. package/_types/actions/erc7579/uninstallModule.d.ts +16 -0
  568. package/_types/actions/erc7579/uninstallModule.d.ts.map +1 -0
  569. package/_types/actions/erc7579/uninstallModules.d.ts +20 -0
  570. package/_types/actions/erc7579/uninstallModules.d.ts.map +1 -0
  571. package/_types/actions/erc7579.d.ts +30 -0
  572. package/_types/actions/erc7579.d.ts.map +1 -0
  573. package/_types/actions/index.d.ts +20 -0
  574. package/_types/actions/index.d.ts.map +1 -0
  575. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +40 -0
  576. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -0
  577. package/_types/actions/pimlico/getUserOperationStatus.d.ts +32 -0
  578. package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -0
  579. package/_types/actions/pimlico/sendCompressedUserOperation.d.ts +35 -0
  580. package/_types/actions/pimlico/sendCompressedUserOperation.d.ts.map +1 -0
  581. package/_types/actions/pimlico/sponsorUserOperation.d.ts +52 -0
  582. package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -0
  583. package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +56 -0
  584. package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -0
  585. package/_types/actions/pimlico.d.ts +10 -0
  586. package/_types/actions/pimlico.d.ts.map +1 -0
  587. package/_types/actions/public/getAccountNonce.d.ts +36 -0
  588. package/_types/actions/public/getAccountNonce.d.ts.map +1 -0
  589. package/_types/actions/public/getSenderAddress.d.ts +48 -0
  590. package/_types/actions/public/getSenderAddress.d.ts.map +1 -0
  591. package/_types/actions/smartAccount/deployContract.d.ts +36 -0
  592. package/_types/actions/smartAccount/deployContract.d.ts.map +1 -0
  593. package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +28 -0
  594. package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -0
  595. package/_types/actions/smartAccount/sendTransaction.d.ts +54 -0
  596. package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -0
  597. package/_types/actions/smartAccount/sendTransactions.d.ts +64 -0
  598. package/_types/actions/smartAccount/sendTransactions.d.ts.map +1 -0
  599. package/_types/actions/smartAccount/sendUserOperation.d.ts +10 -0
  600. package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -0
  601. package/_types/actions/smartAccount/signMessage.d.ts +51 -0
  602. package/_types/actions/smartAccount/signMessage.d.ts.map +1 -0
  603. package/_types/actions/smartAccount/signTypedData.d.ts +105 -0
  604. package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -0
  605. package/_types/actions/smartAccount/writeContract.d.ts +58 -0
  606. package/_types/actions/smartAccount/writeContract.d.ts.map +1 -0
  607. package/_types/actions/smartAccount.d.ts +10 -0
  608. package/_types/actions/smartAccount.d.ts.map +1 -0
  609. package/_types/actions/stackup/accounts.d.ts +30 -0
  610. package/_types/actions/stackup/accounts.d.ts.map +1 -0
  611. package/_types/actions/stackup/sponsorUserOperation.d.ts +38 -0
  612. package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -0
  613. package/_types/actions/stackup.d.ts +7 -0
  614. package/_types/actions/stackup.d.ts.map +1 -0
  615. package/_types/clients/createBundlerClient.d.ts +28 -0
  616. package/_types/clients/createBundlerClient.d.ts.map +1 -0
  617. package/_types/clients/createSmartAccountClient.d.ts +40 -0
  618. package/_types/clients/createSmartAccountClient.d.ts.map +1 -0
  619. package/_types/clients/decorators/bundler.d.ts +175 -0
  620. package/_types/clients/decorators/bundler.d.ts.map +1 -0
  621. package/_types/clients/decorators/pimlico.d.ts +142 -0
  622. package/_types/clients/decorators/pimlico.d.ts.map +1 -0
  623. package/_types/clients/decorators/smartAccount.d.ts +330 -0
  624. package/_types/clients/decorators/smartAccount.d.ts.map +1 -0
  625. package/_types/clients/decorators/stackup.d.ts +55 -0
  626. package/_types/clients/decorators/stackup.d.ts.map +1 -0
  627. package/_types/clients/pimlico.d.ts +52 -0
  628. package/_types/clients/pimlico.d.ts.map +1 -0
  629. package/_types/clients/stackup.d.ts +29 -0
  630. package/_types/clients/stackup.d.ts.map +1 -0
  631. package/_types/errors/account.d.ts +121 -0
  632. package/_types/errors/account.d.ts.map +1 -0
  633. package/_types/errors/bundler.d.ts +24 -0
  634. package/_types/errors/bundler.d.ts.map +1 -0
  635. package/_types/errors/estimateUserOperationGas.d.ts +14 -0
  636. package/_types/errors/estimateUserOperationGas.d.ts.map +1 -0
  637. package/_types/errors/gas.d.ts +47 -0
  638. package/_types/errors/gas.d.ts.map +1 -0
  639. package/_types/errors/index.d.ts +8 -0
  640. package/_types/errors/index.d.ts.map +1 -0
  641. package/_types/errors/paymaster.d.ts +85 -0
  642. package/_types/errors/paymaster.d.ts.map +1 -0
  643. package/_types/errors/sendUserOperation.d.ts +14 -0
  644. package/_types/errors/sendUserOperation.d.ts.map +1 -0
  645. package/_types/errors/utils.d.ts +5 -0
  646. package/_types/errors/utils.d.ts.map +1 -0
  647. package/_types/experimental/eip7677/actions/getPaymasterData.d.ts +51 -0
  648. package/_types/experimental/eip7677/actions/getPaymasterData.d.ts.map +1 -0
  649. package/_types/experimental/eip7677/actions/getPaymasterStubData.d.ts +63 -0
  650. package/_types/experimental/eip7677/actions/getPaymasterStubData.d.ts.map +1 -0
  651. package/_types/experimental/eip7677/clients/decorators/paymasterActionsEip7677.d.ts +11 -0
  652. package/_types/experimental/eip7677/clients/decorators/paymasterActionsEip7677.d.ts.map +1 -0
  653. package/_types/experimental/eip7677/index.d.ts +6 -0
  654. package/_types/experimental/eip7677/index.d.ts.map +1 -0
  655. package/_types/experimental/eip7677/types/paymaster.d.ts +52 -0
  656. package/_types/experimental/eip7677/types/paymaster.d.ts.map +1 -0
  657. package/_types/experimental/index.d.ts +2 -0
  658. package/_types/experimental/index.d.ts.map +1 -0
  659. package/_types/index.d.ts +33 -0
  660. package/_types/index.d.ts.map +1 -0
  661. package/_types/types/bundler.d.ts +110 -0
  662. package/_types/types/bundler.d.ts.map +1 -0
  663. package/_types/types/entrypoint.d.ts +6 -0
  664. package/_types/types/entrypoint.d.ts.map +1 -0
  665. package/_types/types/index.d.ts +27 -0
  666. package/_types/types/index.d.ts.map +1 -0
  667. package/_types/types/pimlico.d.ts +93 -0
  668. package/_types/types/pimlico.d.ts.map +1 -0
  669. package/_types/types/stackup.d.ts +49 -0
  670. package/_types/types/stackup.d.ts.map +1 -0
  671. package/_types/types/userOperation.d.ts +93 -0
  672. package/_types/types/userOperation.d.ts.map +1 -0
  673. package/_types/utils/decodeNonce.d.ts +5 -0
  674. package/_types/utils/decodeNonce.d.ts.map +1 -0
  675. package/_types/utils/deepHexlify.d.ts +6 -0
  676. package/_types/utils/deepHexlify.d.ts.map +1 -0
  677. package/_types/utils/encode7579CallData.d.ts +16 -0
  678. package/_types/utils/encode7579CallData.d.ts.map +1 -0
  679. package/_types/utils/encodeNonce.d.ts +5 -0
  680. package/_types/utils/encodeNonce.d.ts.map +1 -0
  681. package/_types/utils/errors/getBundlerError.d.ts +11 -0
  682. package/_types/utils/errors/getBundlerError.d.ts.map +1 -0
  683. package/_types/utils/errors/getEstimateUserOperationGasError.d.ts +10 -0
  684. package/_types/utils/errors/getEstimateUserOperationGasError.d.ts.map +1 -0
  685. package/_types/utils/errors/getSendUserOperationError.d.ts +5 -0
  686. package/_types/utils/errors/getSendUserOperationError.d.ts.map +1 -0
  687. package/_types/utils/getAddressFromInitCodeOrPaymasterAndData.d.ts +3 -0
  688. package/_types/utils/getAddressFromInitCodeOrPaymasterAndData.d.ts.map +1 -0
  689. package/_types/utils/getEntryPointVersion.d.ts +8 -0
  690. package/_types/utils/getEntryPointVersion.d.ts.map +1 -0
  691. package/_types/utils/getPackedUserOperation.d.ts +39 -0
  692. package/_types/utils/getPackedUserOperation.d.ts.map +1 -0
  693. package/_types/utils/getRequiredPrefund.d.ts +21 -0
  694. package/_types/utils/getRequiredPrefund.d.ts.map +1 -0
  695. package/_types/utils/getUserOperationHash.d.ts +31 -0
  696. package/_types/utils/getUserOperationHash.d.ts.map +1 -0
  697. package/_types/utils/index.d.ts +16 -0
  698. package/_types/utils/index.d.ts.map +1 -0
  699. package/_types/utils/isSmartAccountDeployed.d.ts +3 -0
  700. package/_types/utils/isSmartAccountDeployed.d.ts.map +1 -0
  701. package/_types/utils/observe.d.ts +17 -0
  702. package/_types/utils/observe.d.ts.map +1 -0
  703. package/_types/utils/providerToSmartAccountSigner.d.ts +5 -0
  704. package/_types/utils/providerToSmartAccountSigner.d.ts.map +1 -0
  705. package/_types/utils/signUserOperationHashWithECDSA.d.ts +45 -0
  706. package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -0
  707. package/_types/utils/walletClientToSmartAccountSigner.d.ts +4 -0
  708. package/_types/utils/walletClientToSmartAccountSigner.d.ts.map +1 -0
  709. package/_types/vitest.config.d.ts +3 -0
  710. package/_types/vitest.config.d.ts.map +1 -0
  711. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../actions/smartAccount/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;AACH,wBAAsB,aAAa,CAC/B,UAAU,SAAS,UAAU,EAC7B,KAAK,CAAC,UAAU,SAAS,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,EAC/D,YAAY,SAAS,MAAM,EAC3B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SACF,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACpD,SAAS,GACT,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACpD,SAAS,EAEf,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EACI,OAAO,EAAE,QAAyB,EAClC,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EAAE,MAAM,EAChB,EAAE,uBAAuB,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC,GAC/D,OAAO,CAAC,uBAAuB,CAAC,CAgClC"}
@@ -0,0 +1,58 @@
1
+ import { type Abi, type Chain, type Client, type ContractFunctionArgs, type ContractFunctionName, type Hash, type Transport, type WriteContractParameters } from "viem";
2
+ import type { SmartAccount } from "../../accounts/types";
3
+ import type { EntryPoint } from "../../types/entrypoint";
4
+ import type { Middleware } from "./prepareUserOperationRequest";
5
+ /**
6
+ * Executes a write function on a contract.
7
+ * This function also allows you to sponsor this transaction if sender is a smartAccount
8
+ *
9
+ * - Docs: https://viem.sh/docs/contract/writeContract.html
10
+ * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts
11
+ *
12
+ * A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
13
+ *
14
+ * Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).
15
+ *
16
+ * __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__
17
+ *
18
+ * @param client - Client to use
19
+ * @param parameters - {@link WriteContractParameters}
20
+ * @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash).
21
+ *
22
+ * @example
23
+ * import { createWalletClient, custom, parseAbi } from 'viem'
24
+ * import { mainnet } from 'viem/chains'
25
+ * import { writeContract } from 'viem/contract'
26
+ *
27
+ * const client = createWalletClient({
28
+ * chain: mainnet,
29
+ * transport: custom(window.ethereum),
30
+ * })
31
+ * const hash = await writeContract(client, {
32
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
33
+ * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
34
+ * functionName: 'mint',
35
+ * args: [69420],
36
+ * })
37
+ *
38
+ * @example
39
+ * // With Validation
40
+ * import { createWalletClient, http, parseAbi } from 'viem'
41
+ * import { mainnet } from 'viem/chains'
42
+ * import { simulateContract, writeContract } from 'viem/contract'
43
+ *
44
+ * const client = createWalletClient({
45
+ * chain: mainnet,
46
+ * transport: http(),
47
+ * })
48
+ * const { request } = await simulateContract(client, {
49
+ * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',
50
+ * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),
51
+ * functionName: 'mint',
52
+ * args: [69420],
53
+ * }
54
+ * const hash = await writeContract(client, request)
55
+ */
56
+ export type WriteContractWithPaymasterParameters<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartAccount<entryPoint, string, TTransport, TChain> | undefined = SmartAccount<entryPoint, string, TTransport, TChain> | undefined, TAbi extends Abi | readonly unknown[] = Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined> = WriteContractParameters<TAbi, TFunctionName, TArgs, TChain, TAccount, TChainOverride> & Middleware<entryPoint>;
57
+ export declare function writeContract<entryPoint extends EntryPoint, TTransport extends Transport, TChain extends Chain | undefined, TAccount extends SmartAccount<entryPoint, string, TTransport, TChain> | undefined, const TAbi extends Abi | readonly unknown[], TFunctionName extends ContractFunctionName<TAbi, "nonpayable" | "payable"> = ContractFunctionName<TAbi, "nonpayable" | "payable">, TArgs extends ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName> = ContractFunctionArgs<TAbi, "nonpayable" | "payable", TFunctionName>, TChainOverride extends Chain | undefined = undefined>(client: Client<Transport, TChain, TAccount>, { abi, address, args, dataSuffix, functionName, ...request }: WriteContractWithPaymasterParameters<entryPoint, TTransport, TChain, TAccount, TAbi, TFunctionName, TArgs, TChainOverride>): Promise<Hash>;
58
+ //# sourceMappingURL=writeContract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeContract.d.ts","sourceRoot":"","sources":["../../../actions/smartAccount/writeContract.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,GAAG,EACR,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAEzB,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,uBAAuB,EAE/B,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAM/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,MAAM,oCAAoC,CAC5C,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SACF,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACpD,SAAS,GACT,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACpD,SAAS,EACf,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,GAAG,GAAG,GAAG,SAAS,OAAO,EAAE,EAChE,aAAa,SAAS,oBAAoB,CACtC,IAAI,EACJ,YAAY,GAAG,SAAS,CAC3B,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC,EACxD,KAAK,SAAS,oBAAoB,CAC9B,IAAI,EACJ,YAAY,GAAG,SAAS,EACxB,aAAa,CAChB,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,aAAa,CAAC,EACvE,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,IACpD,uBAAuB,CACvB,IAAI,EACJ,aAAa,EACb,KAAK,EACL,MAAM,EACN,QAAQ,EACR,cAAc,CACjB,GACG,UAAU,CAAC,UAAU,CAAC,CAAA;AAE1B,wBAAsB,aAAa,CAC/B,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,EAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,QAAQ,SACF,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACpD,SAAS,EACf,KAAK,CAAC,IAAI,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC3C,aAAa,SAAS,oBAAoB,CACtC,IAAI,EACJ,YAAY,GAAG,SAAS,CAC3B,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC,EACxD,KAAK,SAAS,oBAAoB,CAC9B,IAAI,EACJ,YAAY,GAAG,SAAS,EACxB,aAAa,CAChB,GAAG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,EAAE,aAAa,CAAC,EACvE,cAAc,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC3C,EACI,GAAG,EACH,OAAO,EACP,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,GAAG,OAAO,EACb,EAAE,oCAAoC,CACnC,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,KAAK,EACL,cAAc,CACjB,GACF,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
@@ -0,0 +1,10 @@
1
+ import { type DeployContractParametersWithPaymaster, deployContract } from "./smartAccount/deployContract";
2
+ import { type Middleware, type PrepareUserOperationRequestParameters, type PrepareUserOperationRequestReturnType, type SponsorUserOperationReturnType, prepareUserOperationRequest } from "./smartAccount/prepareUserOperationRequest";
3
+ import { type SendTransactionWithPaymasterParameters, sendTransaction } from "./smartAccount/sendTransaction";
4
+ import { type SendUserOperationParameters, sendUserOperation } from "./smartAccount/sendUserOperation";
5
+ import { signMessage } from "./smartAccount/signMessage";
6
+ import { signTypedData } from "./smartAccount/signTypedData";
7
+ import { type SendTransactionsWithPaymasterParameters, sendTransactions } from "./smartAccount/sendTransactions";
8
+ import { type WriteContractWithPaymasterParameters, writeContract } from "./smartAccount/writeContract";
9
+ export { deployContract, type DeployContractParametersWithPaymaster, prepareUserOperationRequest, type PrepareUserOperationRequestParameters, type PrepareUserOperationRequestReturnType, type SponsorUserOperationReturnType, sendTransaction, sendUserOperation, type SendUserOperationParameters, signMessage, signTypedData, type SendTransactionWithPaymasterParameters, type Middleware, sendTransactions, type SendTransactionsWithPaymasterParameters, type WriteContractWithPaymasterParameters, writeContract };
10
+ //# sourceMappingURL=smartAccount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartAccount.d.ts","sourceRoot":"","sources":["../../actions/smartAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,qCAAqC,EAC1C,cAAc,EACjB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EACH,KAAK,UAAU,EACf,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EACnC,2BAA2B,EAC9B,MAAM,4CAA4C,CAAA;AAEnD,OAAO,EACH,KAAK,sCAAsC,EAC3C,eAAe,EAClB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACH,KAAK,2BAA2B,EAChC,iBAAiB,EACpB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EACH,KAAK,uCAAuC,EAC5C,gBAAgB,EACnB,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACH,KAAK,oCAAoC,EACzC,aAAa,EAChB,MAAM,8BAA8B,CAAA;AAErC,OAAO,EACH,cAAc,EACd,KAAK,qCAAqC,EAC1C,2BAA2B,EAC3B,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EACnC,eAAe,EACf,iBAAiB,EACjB,KAAK,2BAA2B,EAChC,WAAW,EACX,aAAa,EACb,KAAK,sCAAsC,EAC3C,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,uCAAuC,EAC5C,KAAK,oCAAoC,EACzC,aAAa,EAChB,CAAA"}
@@ -0,0 +1,30 @@
1
+ import type { Address } from "viem";
2
+ import type { StackupPaymasterClient } from "../../clients/stackup";
3
+ import type { EntryPoint } from "../../types";
4
+ export type AccountsParameters<entryPoint extends EntryPoint> = {
5
+ entryPoint: entryPoint;
6
+ };
7
+ /**
8
+ * Returns all the Paymaster addresses associated with an EntryPoint that’s owned by this service.
9
+ *
10
+ * https://docs.stackup.sh/docs/paymaster-api-rpc-methods#pm_accounts
11
+ *
12
+ * @param args {@link AccountsParameters} entryPoint for which you want to get list of supported paymasters.
13
+ * @returns paymaster addresses
14
+ *
15
+ * @example
16
+ * import { createClient } from "viem"
17
+ * import { accounts } from "permissionless/actions/stackup"
18
+ *
19
+ * const bundlerClient = createClient({
20
+ * chain: goerli,
21
+ * transport: http("https://api.stackup.sh/v2/paymaster/YOUR_API_KEY_HERE")
22
+ * })
23
+ *
24
+ * await accounts(bundlerClient, {
25
+ * entryPoint: entryPoint
26
+ * }})
27
+ *
28
+ */
29
+ export declare const accounts: <entryPoint extends EntryPoint>(client: StackupPaymasterClient<entryPoint>, { entryPoint: entryPointAddress }: AccountsParameters<entryPoint>) => Promise<Address[]>;
30
+ //# 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,uBAAuB,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,MAAM,kBAAkB,CAAC,UAAU,SAAS,UAAU,IAAI;IAC5D,UAAU,EAAE,UAAU,CAAA;CACzB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,0CACT,uBAAuB,UAAU,CAAC,qCACP,mBAAmB,UAAU,CAAC,KAClE,QAAQ,OAAO,EAAE,CAOnB,CAAA"}
@@ -0,0 +1,38 @@
1
+ import type { PartialBy } from "viem/types/utils";
2
+ import type { StackupPaymasterClient } from "../../clients/stackup";
3
+ import type { ENTRYPOINT_ADDRESS_V06_TYPE, EntryPoint } from "../../types/entrypoint";
4
+ import type { StackupPaymasterContext } from "../../types/stackup";
5
+ import type { UserOperation } from "../../types/userOperation";
6
+ export type SponsorUserOperationParameters<entryPoint extends EntryPoint> = {
7
+ userOperation: entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? PartialBy<UserOperation<"v0.6">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit"> : PartialBy<UserOperation<"v0.7">, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit">;
8
+ entryPoint: entryPoint;
9
+ context: StackupPaymasterContext;
10
+ };
11
+ export type SponsorUserOperationReturnType<entryPoint extends EntryPoint> = entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? Pick<UserOperation<"v0.6">, "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData"> : Pick<UserOperation<"v0.7">, "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymaster" | "paymasterVerificationGasLimit" | "paymasterPostOpGasLimit" | "paymasterData">;
12
+ /**
13
+ * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
14
+ *
15
+ * - Docs: https://docs.pimlico.io/permissionless/reference/stackup-paymaster-actions/sponsorUserOperation
16
+ *
17
+ * @param client {@link PimlicoBundlerClient} that you created using viem's createClient whose transport url is pointing to the Pimlico's bundler.
18
+ * @param args {@link sponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
19
+ * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
20
+ *
21
+ *
22
+ * @example
23
+ * import { createClient } from "viem"
24
+ * import { sponsorUserOperation } from "permissionless/actions/stackup"
25
+ *
26
+ * const bundlerClient = createClient({
27
+ * chain: goerli,
28
+ * transport: http("https://api.stackup.sh/v2/paymaster/YOUR_API_KEY_HERE")
29
+ * })
30
+ *
31
+ * await sponsorUserOperation(bundlerClient, {
32
+ * userOperation: userOperationWithDummySignature,
33
+ * entryPoint: entryPoint
34
+ * }})
35
+ *
36
+ */
37
+ export declare const sponsorUserOperation: <entryPoint extends EntryPoint>(client: StackupPaymasterClient<entryPoint>, args: SponsorUserOperationParameters<entryPoint>) => Promise<SponsorUserOperationReturnType<entryPoint>>;
38
+ //# sourceMappingURL=sponsorUserOperation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/stackup/sponsorUserOperation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,EACR,2BAA2B,EAC3B,UAAU,EACb,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAI9D,MAAM,MAAM,8BAA8B,CAAC,UAAU,SAAS,UAAU,IAAI;IACxE,aAAa,EAAE,UAAU,SAAS,2BAA2B,GACvD,SAAS,CACL,aAAa,CAAC,MAAM,CAAC,EACrB,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,CACjE,GACD,SAAS,CACL,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,oBAAoB,GACpB,sBAAsB,GACtB,+BAA+B,GAC/B,yBAAyB,CAC9B,CAAA;IACP,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,uBAAuB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,8BAA8B,CAAC,UAAU,SAAS,UAAU,IACpE,UAAU,SAAS,2BAA2B,GACxC,IAAI,CACA,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,kBAAkB,CACvB,GACD,IAAI,CACA,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,WAAW,GACX,+BAA+B,GAC/B,yBAAyB,GACzB,eAAe,CACpB,CAAA;AAEX;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,oBAAoB,0CACrB,uBAAuB,UAAU,CAAC,QACpC,+BAA+B,UAAU,CAAC,KACjD,QAAQ,+BAA+B,UAAU,CAAC,CA+CpD,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { StackupPaymasterClientActions } from "../clients/decorators/stackup";
2
+ import { stackupPaymasterActions } from "../clients/decorators/stackup";
3
+ import { type AccountsParameters, accounts } from "./stackup/accounts";
4
+ import { type SponsorUserOperationParameters, type SponsorUserOperationReturnType, sponsorUserOperation } from "./stackup/sponsorUserOperation";
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,+BAA+B,CAAA;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AACvE,OAAO,EAAE,KAAK,kBAAkB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EACH,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,oBAAoB,EACvB,MAAM,gCAAgC,CAAA;AAEvC,YAAY,EACR,8BAA8B,EAC9B,8BAA8B,EAC9B,kBAAkB,EAClB,6BAA6B,EAChC,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,CAAA"}
@@ -0,0 +1,28 @@
1
+ import type { Account, Chain, Client, PublicClientConfig, Transport } from "viem";
2
+ import type { BundlerRpcSchema } from "../types/bundler";
3
+ import type { EntryPoint } from "../types/entrypoint";
4
+ import { type BundlerActions } from "./decorators/bundler";
5
+ export type BundlerClient<entryPoint extends EntryPoint, TChain extends Chain | undefined = Chain | undefined> = Client<Transport, TChain, Account | undefined, BundlerRpcSchema<entryPoint>, BundlerActions<entryPoint>>;
6
+ /**
7
+ * 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).
8
+ *
9
+ * - Docs: https://docs.pimlico.io/permissionless/reference/clients/bundlerClient
10
+ *
11
+ * 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.
12
+ *
13
+ * @param config - {@link PublicClientConfig}
14
+ * @returns A Bundler Client. {@link BundlerClient}
15
+ *
16
+ * @example
17
+ * import { createPublicClient, http } from 'viem'
18
+ * import { mainnet } from 'viem/chains'
19
+ *
20
+ * const bundlerClient = createBundlerClient({
21
+ * chain: mainnet,
22
+ * transport: http(BUNDLER_URL),
23
+ * })
24
+ */
25
+ export declare const createBundlerClient: <entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = undefined>(parameters: PublicClientConfig<transport, chain> & {
26
+ entryPoint: entryPoint;
27
+ }) => BundlerClient<entryPoint>;
28
+ //# sourceMappingURL=createBundlerClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createBundlerClient.d.ts","sourceRoot":"","sources":["../../clients/createBundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,kBAAkB,EAClB,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,sBAAsB,CAAA;AAE1E,MAAM,MAAM,aAAa,CACrB,UAAU,SAAS,UAAU,EAC7B,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACpD,MAAM,CACN,SAAS,EACT,MAAM,EACN,OAAO,GAAG,SAAS,EACnB,gBAAgB,CAAC,UAAU,CAAC,EAC5B,cAAc,CAAC,UAAU,CAAC,CAC7B,CAAA;AACD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,oIAKhB,mBAAmB,SAAS,EAAE,KAAK,CAAC,GAAG;IAC/C,YAAY,UAAU,CAAA;CACzB,KACF,cAAc,UAAU,CAS1B,CAAA"}
@@ -0,0 +1,40 @@
1
+ import type { Chain, Client, ClientConfig, Transport } from "viem";
2
+ import type { SmartAccount } from "../accounts/types";
3
+ import type { Middleware } from "../actions/smartAccount/prepareUserOperationRequest";
4
+ import type { Prettify } from "../types";
5
+ import type { BundlerRpcSchema } from "../types/bundler";
6
+ import type { EntryPoint } from "../types/entrypoint";
7
+ import { type SmartAccountActions } from "./decorators/smartAccount";
8
+ /**
9
+ * TODO:
10
+ * - Add docs
11
+ * - Fix typing, 'accounts' is required to signMessage, signTypedData, signTransaction, but not needed here, since account is embedded in the client
12
+ */
13
+ export type SmartAccountClient<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount<entryPoint, string, transport, chain> | undefined = SmartAccount<entryPoint, string, transport, chain> | undefined> = Prettify<Client<transport, chain, account, BundlerRpcSchema<entryPoint>, SmartAccountActions<entryPoint, transport, chain, account>>>;
14
+ export type SmartAccountClientConfig<entryPoint extends EntryPoint, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount<entryPoint, string, transport, chain> | undefined = SmartAccount<entryPoint, string, transport, chain> | undefined | undefined> = Prettify<Pick<ClientConfig<transport, chain>, "cacheTime" | "chain" | "key" | "name" | "pollingInterval"> & Middleware<entryPoint> & {
15
+ account: account;
16
+ bundlerTransport: Transport;
17
+ } & {
18
+ entryPoint?: entryPoint;
19
+ }>;
20
+ /**
21
+ * 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).
22
+ *
23
+ * - Docs: https://docs.pimlico.io/permissionless/reference/clients/smartAccountClient
24
+ *
25
+ * 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.
26
+ *
27
+ * @param parameters - {@link WalletClientConfig}
28
+ * @returns A Bundler Client. {@link SmartAccountClient}
29
+ *
30
+ * @example
31
+ * import { createPublicClient, http } from 'viem'
32
+ * import { mainnet } from 'viem/chains'
33
+ *
34
+ * const smartAccountClient = createSmartAccountClient({
35
+ * chain: mainnet,
36
+ * transport: http(BUNDLER_URL),
37
+ * })
38
+ */
39
+ export declare function createSmartAccountClient<TTransport extends Transport, TChain extends Chain | undefined, TEntryPoint extends EntryPoint, TSmartAccount extends SmartAccount<TEntryPoint, string, TTransport, TChain> | undefined = SmartAccount<TEntryPoint, string, TTransport, TChain> | undefined>(parameters: SmartAccountClientConfig<TEntryPoint, TTransport, TChain, TSmartAccount>): SmartAccountClient<TEntryPoint, TTransport, TChain, TSmartAccount>;
40
+ //# sourceMappingURL=createSmartAccountClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSmartAccountClient.d.ts","sourceRoot":"","sources":["../../clients/createSmartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EAEZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAA;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EACH,KAAK,mBAAmB,EAE3B,MAAM,2BAA2B,CAAA;AAElC;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAC1B,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SACD,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GAClD,SAAS,GACT,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GAClD,SAAS,IACf,QAAQ,CACR,MAAM,CACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,gBAAgB,CAAC,UAAU,CAAC,EAC5B,mBAAmB,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAC7D,CACJ,CAAA;AAED,MAAM,MAAM,wBAAwB,CAChC,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SACD,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GAClD,SAAS,GACT,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GAClD,SAAS,GACT,SAAS,IACf,QAAQ,CACR,IAAI,CACA,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,EAC9B,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,iBAAiB,CAC7D,GACG,UAAU,CAAC,UAAU,CAAC,GAAG;IACrB,OAAO,EAAE,OAAO,CAAA;IAChB,gBAAgB,EAAE,SAAS,CAAA;CAC9B,GAAG;IACA,UAAU,CAAC,EAAE,UAAU,CAAA;CAC1B,CACR,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,wBAAwB,CACpC,UAAU,SAAS,SAAS,EAC5B,MAAM,SAAS,KAAK,GAAG,SAAS,EAChC,WAAW,SAAS,UAAU,EAC9B,aAAa,SACP,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACrD,SAAS,GACT,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,GACrD,SAAS,EAEf,UAAU,EAAE,wBAAwB,CAChC,WAAW,EACX,UAAU,EACV,MAAM,EACN,aAAa,CAChB,GACF,kBAAkB,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,CAmBpE"}
@@ -0,0 +1,175 @@
1
+ import type { Client, Hash } from "viem";
2
+ import { type EstimateUserOperationGasParameters, type EstimateUserOperationGasReturnType } from "../../actions/bundler/estimateUserOperationGas";
3
+ import { type GetUserOperationByHashParameters, type GetUserOperationByHashReturnType } from "../../actions/bundler/getUserOperationByHash";
4
+ import { type GetUserOperationReceiptParameters, type GetUserOperationReceiptReturnType } from "../../actions/bundler/getUserOperationReceipt";
5
+ import { type SendUserOperationParameters } from "../../actions/bundler/sendUserOperation";
6
+ import { type WaitForUserOperationReceiptParameters } from "../../actions/bundler/waitForUserOperationReceipt";
7
+ import type { Prettify } from "../../types";
8
+ import type { StateOverrides } from "../../types/bundler";
9
+ import type { EntryPoint } from "../../types/entrypoint";
10
+ export type BundlerActions<entryPoint extends EntryPoint> = {
11
+ /**
12
+ *
13
+ * Sends user operation to the bundler
14
+ *
15
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/sendUserOperation
16
+ *
17
+ * @param args {@link SendUserOperationParameters}.
18
+ * @returns UserOpHash that you can use to track user operation as {@link Hash}.
19
+ *
20
+ * @example
21
+ * import { createClient } from "viem"
22
+ * import { bundlerActions } from "permissionless"
23
+ *
24
+ * const bundlerClient = createClient({
25
+ * chain: goerli,
26
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
27
+ * }).extend(bundlerActions)
28
+ *
29
+ * const userOpHash = await bundlerClient.sendUserOperation({
30
+ * userOperation: signedUserOperation,
31
+ * entryPoint: entryPoint
32
+ * })
33
+ *
34
+ * // Return '0xe9fad2cd67f9ca1d0b7a6513b2a42066784c8df938518da2b51bb8cc9a89ea34'
35
+ */
36
+ sendUserOperation: (args: Prettify<Omit<SendUserOperationParameters<entryPoint>, "entryPoint">>) => Promise<Hash>;
37
+ /**
38
+ *
39
+ * Estimates preVerificationGas, verificationGasLimit and callGasLimit for user operation
40
+ *
41
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/estimateUserOperationGas
42
+ *
43
+ * @param args {@link EstimateUserOperationGasParameters}
44
+ * @returns preVerificationGas, verificationGasLimit and callGasLimit as {@link EstimateUserOperationGasReturnType}
45
+ *
46
+ * @example
47
+ * import { createClient } from "viem"
48
+ * import { bundlerActions } from "permissionless"
49
+ *
50
+ * const bundlerClient = createClient({
51
+ * chain: goerli,
52
+ * transport: http(BUNDLER_URL)
53
+ * }).extend(bundlerActions)
54
+ *
55
+ * const gasParameters = await bundlerClient.estimateUserOperationGas({
56
+ * userOperation: signedUserOperation,
57
+ * entryPoint: entryPoint
58
+ * })
59
+ *
60
+ * // Return {preVerificationGas: 43492n, verificationGasLimit: 59436n, callGasLimit: 9000n}
61
+ */
62
+ estimateUserOperationGas: (args: Prettify<Omit<EstimateUserOperationGasParameters<entryPoint>, "entryPoint">>, stateOverrides?: StateOverrides) => Promise<Prettify<EstimateUserOperationGasReturnType<entryPoint>>>;
63
+ /**
64
+ *
65
+ * Returns the supported entrypoints by the bundler service
66
+ *
67
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/supportedEntryPoints
68
+ *
69
+ * @returns Supported entryPoints
70
+ *
71
+ * @example
72
+ * import { createClient } from "viem"
73
+ * import { bundlerActions } from "permissionless"
74
+ *
75
+ * const bundlerClient = createClient({
76
+ * chain: goerli,
77
+ * transport: http(BUNDLER_URL)
78
+ * }).extend(bundlerActions)
79
+ *
80
+ * const supportedEntryPoints = await bundlerClient.supportedEntryPoints()
81
+ *
82
+ * // Return ['0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789']
83
+ */
84
+ supportedEntryPoints: () => Promise<EntryPoint[]>;
85
+ /**
86
+ *
87
+ * Returns the supported chain id by the bundler service
88
+ *
89
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/chainId
90
+ *
91
+ * @returns Supported chain id
92
+ *
93
+ * @example
94
+ * import { createClient } from "viem"
95
+ * import { bundlerActions } from "permissionless"
96
+ *
97
+ * const bundlerClient = createClient({
98
+ * chain: goerli,
99
+ * transport: http(BUNDLER_URL)
100
+ * }).extend(bundlerActions)
101
+ *
102
+ * const chainId = await bundlerClient.chainId()
103
+ * // Return 5n for Goerli
104
+ */
105
+ chainId: () => Promise<number>;
106
+ /**
107
+ *
108
+ * Returns the user operation from userOpHash
109
+ *
110
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/getUserOperationByHash
111
+ *
112
+ * @param args {@link GetUserOperationByHash} UserOpHash that was returned by {@link sendUserOperation}
113
+ * @returns userOperation along with entryPoint, transactionHash, blockHash, blockNumber if found or null
114
+ *
115
+ * @example
116
+ * import { createClient } from "viem"
117
+ * import { bundlerActions } from "permissionless"
118
+ *
119
+ * const bundlerClient = createClient({
120
+ * chain: goerli,
121
+ * transport: http(BUNDLER_URL)
122
+ * }).extend(bundlerActions)
123
+ *
124
+ * await bundlerClient.getUserOperationByHash(userOpHash)
125
+ *
126
+ */
127
+ getUserOperationByHash: (args: Prettify<GetUserOperationByHashParameters>) => Promise<Prettify<GetUserOperationByHashReturnType<entryPoint>> | null>;
128
+ /**
129
+ *
130
+ * Returns the user operation receipt from userOpHash
131
+ *
132
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/getUserOperationReceipt
133
+ *
134
+ * @param args {@link GetUserOperationReceiptParameters} UserOpHash that was returned by {@link sendUserOperation}
135
+ * @returns user operation receipt {@link GetUserOperationReceiptReturnType} if found or null
136
+ *
137
+ * @example
138
+ * import { createClient } from "viem"
139
+ * import { bundlerActions } from "permissionless"
140
+ *
141
+ * const bundlerClient = createClient({
142
+ * chain: goerli,
143
+ * transport: http(BUNDLER_URL)
144
+ * }).extend(bundlerActions)
145
+ *
146
+ * await bundlerClient.getUserOperationReceipt({hash: userOpHash})
147
+ *
148
+ */
149
+ getUserOperationReceipt: (args: Prettify<GetUserOperationReceiptParameters>) => Promise<Prettify<GetUserOperationReceiptReturnType> | null>;
150
+ /**
151
+ * Waits for the User Operation to be included on a [Block](https://viem.sh/docs/glossary/terms.html#block) (one confirmation), and then returns the [User Operation Receipt](https://docs.pimlico.io/permissionless/reference/bundler-actions/getUserOperationReceipt).
152
+ *
153
+ * - Docs: https://docs.pimlico.io/permissionless/reference/bundler-actions/waitForUserOperationReceipt
154
+ *
155
+ * @param client - Bundler Client to use
156
+ * @param parameters - {@link WaitForUserOperationReceiptParameters}
157
+ * @returns The transaction receipt. {@link GetUserOperationReceiptReturnType}
158
+ *
159
+ * @example
160
+ * import { createBundlerClient, waitForUserOperationReceipt, http } from 'viem'
161
+ * import { mainnet } from 'viem/chains'
162
+ *
163
+ * const bundlerClient = createBundlerClient({
164
+ * chain: mainnet,
165
+ * transport: http(),
166
+ * })
167
+ * const userOperationReceipt = await bundlerClient.waitForUserOperationReceipt({
168
+ * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',
169
+ * })
170
+ */
171
+ waitForUserOperationReceipt: (args: Prettify<WaitForUserOperationReceiptParameters>) => Promise<Prettify<GetUserOperationReceiptReturnType>>;
172
+ };
173
+ declare const bundlerActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => BundlerActions<entryPoint>;
174
+ export { bundlerActions };
175
+ //# sourceMappingURL=bundler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../clients/decorators/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,EACH,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EAE1C,MAAM,gDAAgD,CAAA;AACvD,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EAExC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EAEzC,MAAM,+CAA+C,CAAA;AACtD,OAAO,EACH,KAAK,2BAA2B,EAEnC,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EACH,KAAK,qCAAqC,EAE7C,MAAM,mDAAmD,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,UAAU,IAAI;IACxD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,iBAAiB,EAAE,CACf,IAAI,EAAE,QAAQ,CACV,IAAI,CAAC,2BAA2B,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAC9D,KACA,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,wBAAwB,EAAE,CACtB,IAAI,EAAE,QAAQ,CACV,IAAI,CAAC,kCAAkC,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CACrE,EACD,cAAc,CAAC,EAAE,cAAc,KAC9B,OAAO,CAAC,QAAQ,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IACtE;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,oBAAoB,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACjD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC9B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,sBAAsB,EAAE,CACpB,IAAI,EAAE,QAAQ,CAAC,gCAAgC,CAAC,KAC/C,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IAC3E;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,uBAAuB,EAAE,CACrB,IAAI,EAAE,QAAQ,CAAC,iCAAiC,CAAC,KAChD,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAC,GAAG,IAAI,CAAC,CAAA;IAEhE;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,2BAA2B,EAAE,CACzB,IAAI,EAAE,QAAQ,CAAC,qCAAqC,CAAC,KACpD,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,CAAA;CAC5D,CAAA;AAED,QAAA,MAAM,cAAc,qDACmC,UAAU,cACpD,MAAM,KAAG,eAAe,UAAU,CAqCzC,CAAA;AAEN,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,142 @@
1
+ import type { Client, Hash } from "viem";
2
+ import { type SendCompressedUserOperationParameters, type ValidateSponsorshipPolicies, type ValidateSponsorshipPoliciesParameters } from "../../actions/pimlico";
3
+ import { type GetUserOperationGasPriceReturnType } from "../../actions/pimlico/getUserOperationGasPrice";
4
+ import { type GetUserOperationStatusParameters, type GetUserOperationStatusReturnType } from "../../actions/pimlico/getUserOperationStatus";
5
+ import { type PimlicoSponsorUserOperationParameters, type SponsorUserOperationReturnType } from "../../actions/pimlico/sponsorUserOperation";
6
+ import type { Prettify } from "../../types";
7
+ import type { EntryPoint } from "../../types/entrypoint";
8
+ export type PimlicoBundlerActions = {
9
+ /**
10
+ * Returns the live gas prices that you can use to send a user operation.
11
+ *
12
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationGasPrice
13
+ *
14
+ * @returns slow, standard & fast values for maxFeePerGas & maxPriorityFeePerGas {@link GetUserOperationGasPriceReturnType}
15
+ *
16
+ * @example
17
+ *
18
+ * import { createClient } from "viem"
19
+ * import { pimlicoBundlerActions } from "permissionless/actions/pimlico"
20
+ *
21
+ * const bundlerClient = createClient({
22
+ * chain: goerli,
23
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
24
+ * }).extend(pimlicoBundlerActions)
25
+ *
26
+ * await bundlerClient.getUserOperationGasPrice()
27
+ */
28
+ getUserOperationGasPrice: () => Promise<Prettify<GetUserOperationGasPriceReturnType>>;
29
+ /**
30
+ * Returns the status of the userOperation that is pending in the mempool.
31
+ *
32
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/getUserOperationStatus
33
+ *
34
+ * @param hash {@link Hash} UserOpHash that you must have received from sendUserOperation.
35
+ * @returns status & transaction hash if included {@link GetUserOperationStatusReturnType}
36
+ *
37
+ * @example
38
+ * import { createClient } from "viem"
39
+ * import { pimlicoBundlerActions } from "permissionless/actions/pimlico"
40
+ *
41
+ * const bundlerClient = createClient({
42
+ * chain: goerli,
43
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
44
+ * }).extend(pimlicoBundlerActions)
45
+ *
46
+ * await bundlerClient.getUserOperationStatus({ hash: userOpHash })
47
+ */
48
+ getUserOperationStatus: (args: Prettify<GetUserOperationStatusParameters>) => Promise<Prettify<GetUserOperationStatusReturnType>>;
49
+ /**
50
+ * Sends a compressed user operation to the bundler
51
+ *
52
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-bundler-actions/sendCompressedUserOperation
53
+ *
54
+ * @param args {@link SendCompressedUserOperationParameters}.
55
+ * @returns UserOpHash that you can use to track user operation as {@link Hash}.
56
+ *
57
+ * @example
58
+ * import { createClient } from "viem"
59
+ * import { pimlicoBundlerActions } from "permissionless/actions/pimlico"
60
+ *
61
+ * const bundlerClient = createClient({
62
+ * chain: goerli,
63
+ * transport: http("https://api.pimlico.io/v1/goerli/rpc?apikey=YOUR_API_KEY_HERE")
64
+ * }).extend(pimlicoBundlerActions)
65
+ *
66
+ * const userOpHash = await bundlerClient.sendCompressedUserOperation({
67
+ * compressedUserOperation,
68
+ * inflatorAddress,
69
+ * entryPoint
70
+ * })
71
+ * // Return '0xe9fad2cd67f9ca1d0b7a6513b2a42066784c8df938518da2b51bb8cc9a89ea34'
72
+ */
73
+ sendCompressedUserOperation: (args: Prettify<Omit<SendCompressedUserOperationParameters, "entryPoint">>) => Promise<Hash>;
74
+ };
75
+ export declare const pimlicoBundlerActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => PimlicoBundlerActions;
76
+ export type PimlicoPaymasterClientActions<entryPoint extends EntryPoint> = {
77
+ /**
78
+ * Returns paymasterAndData & updated gas parameters required to sponsor a userOperation.
79
+ *
80
+ * https://docs.pimlico.io/permissionless/reference/pimlico-paymaster-actions/sponsorUserOperation
81
+ *
82
+ * @param args {@link PimlicoSponsorUserOperationParameters} UserOperation you want to sponsor & entryPoint.
83
+ * @returns paymasterAndData & updated gas parameters, see {@link SponsorUserOperationReturnType}
84
+ *
85
+ * @example
86
+ * import { createClient } from "viem"
87
+ * import { sponsorUserOperation } from "permissionless/actions/pimlico"
88
+ *
89
+ * const bundlerClient = createClient({
90
+ * chain: goerli,
91
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
92
+ * }).extend(pimlicoPaymasterActions)
93
+ *
94
+ * await bundlerClient.sponsorUserOperation(bundlerClient, {
95
+ * userOperation: userOperationWithDummySignature,
96
+ * entryPoint: entryPoint
97
+ * }})
98
+ *
99
+ */
100
+ sponsorUserOperation: (args: Omit<PimlicoSponsorUserOperationParameters<entryPoint>, "entryPoint">) => Promise<Prettify<SponsorUserOperationReturnType<entryPoint>>>;
101
+ validateSponsorshipPolicies: (args: Prettify<Omit<ValidateSponsorshipPoliciesParameters<entryPoint>, "entryPoint">>) => Promise<Prettify<ValidateSponsorshipPolicies>[]>;
102
+ };
103
+ /**
104
+ * Returns valid sponsorship policies for a userOperation from the list of ids passed
105
+ * - Docs: https://docs.pimlico.io/permissionless/reference/pimlico-paymaster-actions/ValidateSponsorshipPolicies
106
+ *
107
+ * @param args {@link ValidateSponsorshipPoliciesParameters} UserOperation you want to sponsor & entryPoint.
108
+ * @returns valid sponsorship policies, see {@link ValidateSponsorshipPolicies}
109
+ *
110
+ * @example
111
+ * import { createClient } from "viem"
112
+ * import { validateSponsorshipPolicies } from "permissionless/actions/pimlico"
113
+ *
114
+ * const bundlerClient = createClient({
115
+ * chain: goerli,
116
+ * transport: http("https://api.pimlico.io/v2/goerli/rpc?apikey=YOUR_API_KEY_HERE")
117
+ * }).extend(pimlicoPaymasterActions)
118
+
119
+ *
120
+ * await bundlerClient.validateSponsorshipPolicies({
121
+ * userOperation: userOperationWithDummySignature,
122
+ * entryPoint: entryPoint,
123
+ * sponsorshipPolicyIds: ["sp_shiny_puma"]
124
+ * })
125
+ * Returns
126
+ * [
127
+ * {
128
+ * sponsorshipPolicyId: "sp_shiny_puma",
129
+ * data: {
130
+ * name: "Shiny Puma",
131
+ * author: "Pimlico",
132
+ * icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4...",
133
+ * description: "This policy is for testing purposes only"
134
+ * }
135
+ * }
136
+ * ]
137
+ */
138
+ export declare const pimlicoPaymasterActions: <entryPoint extends EntryPoint>(entryPointAddress: entryPoint) => (client: Client) => PimlicoPaymasterClientActions<entryPoint>;
139
+ /**
140
+ * TODO: Add support for pimlicoActions after we support all the actions of v2 of the Pimlico API.
141
+ */
142
+ //# sourceMappingURL=pimlico.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../../clients/decorators/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,2BAA2B,EAChC,KAAK,qCAAqC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,gDAAgD,CAAA;AACvD,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EAExC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,8BAA8B,EAEtC,MAAM,4CAA4C,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,MAAM,MAAM,qBAAqB,GAAG;IAChC;;;;;;;;;;;;;;;;;;OAkBG;IACH,wBAAwB,EAAE,MAAM,OAAO,CACnC,QAAQ,CAAC,kCAAkC,CAAC,CAC/C,CAAA;IACD;;;;;;;;;;;;;;;;;;OAkBG;IACH,sBAAsB,EAAE,CACpB,IAAI,EAAE,QAAQ,CAAC,gCAAgC,CAAC,KAC/C,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC,CAAA;IACxD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,2BAA2B,EAAE,CACzB,IAAI,EAAE,QAAQ,CACV,IAAI,CAAC,qCAAqC,EAAE,YAAY,CAAC,CAC5D,KACA,OAAO,CAAC,IAAI,CAAC,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,qBAAqB,qDACqB,UAAU,cACpD,MAAM,KAAG,qBAsBhB,CAAA;AAEN,MAAM,MAAM,6BAA6B,CAAC,UAAU,SAAS,UAAU,IAAI;IACvE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oBAAoB,EAAE,CAClB,IAAI,EAAE,IAAI,CACN,qCAAqC,CAAC,UAAU,CAAC,EACjD,YAAY,CACf,KACA,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAElE,2BAA2B,EAAE,CACzB,IAAI,EAAE,QAAQ,CACV,IAAI,CACA,qCAAqC,CAAC,UAAU,CAAC,EACjD,YAAY,CACf,CACJ,KACA,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAA;CACxD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,uBAAuB,qDACmB,UAAU,cACpD,MAAM,KAAG,8BAA8B,UAAU,CAwBxD,CAAA;AAEN;;GAEG"}