permissionless 0.0.32 → 0.0.34

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 (339) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js +2 -2
  3. package/_cjs/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
  4. package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js +16 -16
  5. package/_cjs/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
  6. package/_cjs/accounts/index.js +16 -16
  7. package/_cjs/accounts/index.js.map +1 -1
  8. package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js +16 -16
  9. package/_cjs/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
  10. package/_cjs/accounts/privateKeyToSafeSmartAccount.js +2 -2
  11. package/_cjs/accounts/privateKeyToSafeSmartAccount.js.map +1 -1
  12. package/_cjs/accounts/privateKeyToSimpleSmartAccount.js +2 -2
  13. package/_cjs/accounts/privateKeyToSimpleSmartAccount.js.map +1 -1
  14. package/_cjs/accounts/signerToSafeSmartAccount.js +8 -8
  15. package/_cjs/accounts/signerToSafeSmartAccount.js.map +1 -1
  16. package/_cjs/accounts/signerToSimpleSmartAccount.js +12 -12
  17. package/_cjs/accounts/signerToSimpleSmartAccount.js.map +1 -1
  18. package/_cjs/actions/bundler/estimateUserOperationGas.js +5 -5
  19. package/_cjs/actions/bundler/estimateUserOperationGas.js.map +1 -1
  20. package/_cjs/actions/bundler/getUserOperationReceipt.js +2 -2
  21. package/_cjs/actions/bundler/getUserOperationReceipt.js.map +1 -1
  22. package/_cjs/actions/bundler/sendUserOperation.js +4 -4
  23. package/_cjs/actions/bundler/sendUserOperation.js.map +1 -1
  24. package/_cjs/actions/bundler/waitForUserOperationReceipt.js +5 -5
  25. package/_cjs/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
  26. package/_cjs/actions/index.js +21 -21
  27. package/_cjs/actions/index.js.map +1 -1
  28. package/_cjs/actions/pimlico/sponsorUserOperation.js +3 -3
  29. package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
  30. package/_cjs/actions/pimlico/validateSponsorshipPolicies.js +2 -2
  31. package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
  32. package/_cjs/actions/pimlico.js +13 -13
  33. package/_cjs/actions/pimlico.js.map +1 -1
  34. package/_cjs/actions/public/getAccountNonce.js +2 -2
  35. package/_cjs/actions/public/getAccountNonce.js.map +1 -1
  36. package/_cjs/actions/public/getSenderAddress.js +2 -2
  37. package/_cjs/actions/public/getSenderAddress.js.map +1 -1
  38. package/_cjs/actions/smartAccount/deployContract.js +9 -9
  39. package/_cjs/actions/smartAccount/deployContract.js.map +1 -1
  40. package/_cjs/actions/smartAccount/prepareUserOperationRequest.js +6 -6
  41. package/_cjs/actions/smartAccount/prepareUserOperationRequest.js.map +1 -1
  42. package/_cjs/actions/smartAccount/sendTransaction.js +8 -8
  43. package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -1
  44. package/_cjs/actions/smartAccount/sendTransactions.js +8 -8
  45. package/_cjs/actions/smartAccount/sendTransactions.js.map +1 -1
  46. package/_cjs/actions/smartAccount/sendUserOperation.js +8 -8
  47. package/_cjs/actions/smartAccount/sendUserOperation.js.map +1 -1
  48. package/_cjs/actions/smartAccount/signMessage.js +3 -3
  49. package/_cjs/actions/smartAccount/signMessage.js.map +1 -1
  50. package/_cjs/actions/smartAccount/signTypedData.js +3 -3
  51. package/_cjs/actions/smartAccount/signTypedData.js.map +1 -1
  52. package/_cjs/actions/smartAccount/writeContract.js +3 -3
  53. package/_cjs/actions/smartAccount/writeContract.js.map +1 -1
  54. package/_cjs/actions/smartAccount.js +16 -16
  55. package/_cjs/actions/smartAccount.js.map +1 -1
  56. package/_cjs/actions/stackup/sponsorUserOperation.js +2 -2
  57. package/_cjs/actions/stackup/sponsorUserOperation.js.map +1 -1
  58. package/_cjs/actions/stackup.js +6 -6
  59. package/_cjs/actions/stackup.js.map +1 -1
  60. package/_cjs/clients/createBundlerClient.js +2 -2
  61. package/_cjs/clients/createBundlerClient.js.map +1 -1
  62. package/_cjs/clients/createSmartAccountClient.js +2 -2
  63. package/_cjs/clients/createSmartAccountClient.js.map +1 -1
  64. package/_cjs/clients/decorators/bundler.js +14 -14
  65. package/_cjs/clients/decorators/bundler.js.map +1 -1
  66. package/_cjs/clients/decorators/pimlico.js +9 -9
  67. package/_cjs/clients/decorators/pimlico.js.map +1 -1
  68. package/_cjs/clients/decorators/smartAccount.js +16 -16
  69. package/_cjs/clients/decorators/smartAccount.js.map +1 -1
  70. package/_cjs/clients/decorators/stackup.js +4 -4
  71. package/_cjs/clients/decorators/stackup.js.map +1 -1
  72. package/_cjs/clients/pimlico.js +4 -4
  73. package/_cjs/clients/pimlico.js.map +1 -1
  74. package/_cjs/clients/stackup.js +3 -3
  75. package/_cjs/clients/stackup.js.map +1 -1
  76. package/_cjs/errors/estimateUserOperationGas.js +2 -2
  77. package/_cjs/errors/estimateUserOperationGas.js.map +1 -1
  78. package/_cjs/errors/index.js +31 -31
  79. package/_cjs/errors/index.js.map +1 -1
  80. package/_cjs/errors/paymaster.js +7 -7
  81. package/_cjs/errors/paymaster.js.map +1 -1
  82. package/_cjs/errors/sendUserOperation.js +2 -2
  83. package/_cjs/errors/sendUserOperation.js.map +1 -1
  84. package/_cjs/index.js +30 -30
  85. package/_cjs/index.js.map +1 -1
  86. package/_cjs/utils/errors/getBundlerError.js +3 -3
  87. package/_cjs/utils/errors/getEstimateUserOperationGasError.js +2 -2
  88. package/_cjs/utils/errors/getSendUserOperationError.js +2 -2
  89. package/_cjs/utils/index.js +21 -19
  90. package/_cjs/utils/index.js.map +1 -1
  91. package/_cjs/utils/providerToSmartAccountSigner.js +22 -0
  92. package/_cjs/utils/providerToSmartAccountSigner.js.map +1 -0
  93. package/_cjs/utils/signUserOperationHashWithECDSA.js +4 -4
  94. package/_cjs/utils/signUserOperationHashWithECDSA.js.map +1 -1
  95. package/_cjs/utils/{walletClientToCustomSigner.js → walletClientToSmartAccountSigner.js} +4 -4
  96. package/_cjs/utils/walletClientToSmartAccountSigner.js.map +1 -0
  97. package/_esm/accounts/biconomy/privateKeyToBiconomySmartAccount.js.map +1 -1
  98. package/_esm/accounts/biconomy/signerToBiconomySmartAccount.js.map +1 -1
  99. package/_esm/accounts/index.js.map +1 -1
  100. package/_esm/accounts/kernel/signerToEcdsaKernelSmartAccount.js.map +1 -1
  101. package/_esm/accounts/privateKeyToSafeSmartAccount.js.map +1 -1
  102. package/_esm/accounts/privateKeyToSimpleSmartAccount.js.map +1 -1
  103. package/_esm/accounts/signerToSafeSmartAccount.js.map +1 -1
  104. package/_esm/accounts/signerToSimpleSmartAccount.js.map +1 -1
  105. package/_esm/accounts/types.js.map +1 -1
  106. package/_esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
  107. package/_esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
  108. package/_esm/actions/bundler/sendUserOperation.js.map +1 -1
  109. package/_esm/actions/bundler/waitForUserOperationReceipt.js.map +1 -1
  110. package/_esm/actions/index.js.map +1 -1
  111. package/_esm/actions/pimlico/sendCompressedUserOperation.js.map +1 -1
  112. package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
  113. package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
  114. package/_esm/actions/pimlico.js.map +1 -1
  115. package/_esm/actions/public/getAccountNonce.js.map +1 -1
  116. package/_esm/actions/public/getSenderAddress.js.map +1 -1
  117. package/_esm/actions/smartAccount/deployContract.js +1 -1
  118. package/_esm/actions/smartAccount/deployContract.js.map +1 -1
  119. package/_esm/actions/smartAccount/prepareUserOperationRequest.js +1 -1
  120. package/_esm/actions/smartAccount/prepareUserOperationRequest.js.map +1 -1
  121. package/_esm/actions/smartAccount/sendTransaction.js +1 -1
  122. package/_esm/actions/smartAccount/sendTransaction.js.map +1 -1
  123. package/_esm/actions/smartAccount/sendTransactions.js +1 -1
  124. package/_esm/actions/smartAccount/sendTransactions.js.map +1 -1
  125. package/_esm/actions/smartAccount/sendUserOperation.js +1 -1
  126. package/_esm/actions/smartAccount/sendUserOperation.js.map +1 -1
  127. package/_esm/actions/smartAccount/signMessage.js.map +1 -1
  128. package/_esm/actions/smartAccount/signTypedData.js.map +1 -1
  129. package/_esm/actions/smartAccount/writeContract.js.map +1 -1
  130. package/_esm/actions/smartAccount.js.map +1 -1
  131. package/_esm/actions/stackup/sponsorUserOperation.js.map +1 -1
  132. package/_esm/actions/stackup.js.map +1 -1
  133. package/_esm/clients/createBundlerClient.js.map +1 -1
  134. package/_esm/clients/createSmartAccountClient.js.map +1 -1
  135. package/_esm/clients/decorators/bundler.js.map +1 -1
  136. package/_esm/clients/decorators/pimlico.js.map +1 -1
  137. package/_esm/clients/decorators/smartAccount.js.map +1 -1
  138. package/_esm/clients/decorators/stackup.js.map +1 -1
  139. package/_esm/clients/pimlico.js.map +1 -1
  140. package/_esm/clients/stackup.js.map +1 -1
  141. package/_esm/errors/estimateUserOperationGas.js.map +1 -1
  142. package/_esm/errors/index.js.map +1 -1
  143. package/_esm/errors/paymaster.js.map +1 -1
  144. package/_esm/errors/sendUserOperation.js.map +1 -1
  145. package/_esm/index.js.map +1 -1
  146. package/_esm/utils/errors/getBundlerError.js +3 -3
  147. package/_esm/utils/errors/getEstimateUserOperationGasError.js +3 -3
  148. package/_esm/utils/errors/getSendUserOperationError.js +2 -2
  149. package/_esm/utils/index.js +3 -2
  150. package/_esm/utils/index.js.map +1 -1
  151. package/_esm/utils/providerToSmartAccountSigner.js +18 -0
  152. package/_esm/utils/providerToSmartAccountSigner.js.map +1 -0
  153. package/_esm/utils/signUserOperationHashWithECDSA.js +1 -1
  154. package/_esm/utils/signUserOperationHashWithECDSA.js.map +1 -1
  155. package/_esm/utils/{walletClientToCustomSigner.js → walletClientToSmartAccountSigner.js} +2 -2
  156. package/_esm/utils/walletClientToSmartAccountSigner.js.map +1 -0
  157. package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts +1 -1
  158. package/_types/accounts/biconomy/privateKeyToBiconomySmartAccount.d.ts.map +1 -1
  159. package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts +1 -1
  160. package/_types/accounts/biconomy/signerToBiconomySmartAccount.d.ts.map +1 -1
  161. package/_types/accounts/index.d.ts +8 -8
  162. package/_types/accounts/index.d.ts.map +1 -1
  163. package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts +2 -2
  164. package/_types/accounts/kernel/signerToEcdsaKernelSmartAccount.d.ts.map +1 -1
  165. package/_types/accounts/privateKeyToSafeSmartAccount.d.ts +1 -1
  166. package/_types/accounts/privateKeyToSafeSmartAccount.d.ts.map +1 -1
  167. package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts +1 -1
  168. package/_types/accounts/privateKeyToSimpleSmartAccount.d.ts.map +1 -1
  169. package/_types/accounts/signerToSafeSmartAccount.d.ts +1 -1
  170. package/_types/accounts/signerToSafeSmartAccount.d.ts.map +1 -1
  171. package/_types/accounts/signerToSimpleSmartAccount.d.ts +1 -1
  172. package/_types/accounts/signerToSimpleSmartAccount.d.ts.map +1 -1
  173. package/_types/accounts/types.d.ts +1 -1
  174. package/_types/accounts/types.d.ts.map +1 -1
  175. package/_types/actions/bundler/chainId.d.ts +1 -1
  176. package/_types/actions/bundler/chainId.d.ts.map +1 -1
  177. package/_types/actions/bundler/estimateUserOperationGas.d.ts +4 -4
  178. package/_types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
  179. package/_types/actions/bundler/getUserOperationByHash.d.ts +3 -3
  180. package/_types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
  181. package/_types/actions/bundler/getUserOperationReceipt.d.ts +3 -3
  182. package/_types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
  183. package/_types/actions/bundler/sendUserOperation.d.ts +3 -3
  184. package/_types/actions/bundler/sendUserOperation.d.ts.map +1 -1
  185. package/_types/actions/bundler/supportedEntryPoints.d.ts +1 -1
  186. package/_types/actions/bundler/supportedEntryPoints.d.ts.map +1 -1
  187. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts +2 -2
  188. package/_types/actions/bundler/waitForUserOperationReceipt.d.ts.map +1 -1
  189. package/_types/actions/index.d.ts +17 -17
  190. package/_types/actions/index.d.ts.map +1 -1
  191. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +2 -2
  192. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
  193. package/_types/actions/pimlico/getUserOperationStatus.d.ts +2 -2
  194. package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -1
  195. package/_types/actions/pimlico/sendCompressedUserOperation.d.ts +2 -2
  196. package/_types/actions/pimlico/sendCompressedUserOperation.d.ts.map +1 -1
  197. package/_types/actions/pimlico/sponsorUserOperation.d.ts +3 -3
  198. package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -1
  199. package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +3 -3
  200. package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -1
  201. package/_types/actions/pimlico.d.ts +7 -7
  202. package/_types/actions/pimlico.d.ts.map +1 -1
  203. package/_types/actions/public/getAccountNonce.d.ts +1 -1
  204. package/_types/actions/public/getAccountNonce.d.ts.map +1 -1
  205. package/_types/actions/public/getSenderAddress.d.ts +1 -1
  206. package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
  207. package/_types/actions/smartAccount/deployContract.d.ts +3 -3
  208. package/_types/actions/smartAccount/deployContract.d.ts.map +1 -1
  209. package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts +3 -3
  210. package/_types/actions/smartAccount/prepareUserOperationRequest.d.ts.map +1 -1
  211. package/_types/actions/smartAccount/sendTransaction.d.ts +3 -3
  212. package/_types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
  213. package/_types/actions/smartAccount/sendTransactions.d.ts +3 -3
  214. package/_types/actions/smartAccount/sendTransactions.d.ts.map +1 -1
  215. package/_types/actions/smartAccount/sendUserOperation.d.ts +3 -3
  216. package/_types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
  217. package/_types/actions/smartAccount/signMessage.d.ts +1 -1
  218. package/_types/actions/smartAccount/signMessage.d.ts.map +1 -1
  219. package/_types/actions/smartAccount/signTypedData.d.ts +1 -1
  220. package/_types/actions/smartAccount/signTypedData.d.ts.map +1 -1
  221. package/_types/actions/smartAccount/writeContract.d.ts +2 -2
  222. package/_types/actions/smartAccount/writeContract.d.ts.map +1 -1
  223. package/_types/actions/smartAccount.d.ts +8 -8
  224. package/_types/actions/smartAccount.d.ts.map +1 -1
  225. package/_types/actions/stackup/accounts.d.ts +1 -1
  226. package/_types/actions/stackup/accounts.d.ts.map +1 -1
  227. package/_types/actions/stackup/sponsorUserOperation.d.ts +3 -3
  228. package/_types/actions/stackup/sponsorUserOperation.d.ts.map +1 -1
  229. package/_types/actions/stackup.d.ts +4 -4
  230. package/_types/actions/stackup.d.ts.map +1 -1
  231. package/_types/clients/createBundlerClient.d.ts +2 -2
  232. package/_types/clients/createBundlerClient.d.ts.map +1 -1
  233. package/_types/clients/createSmartAccountClient.d.ts +5 -5
  234. package/_types/clients/createSmartAccountClient.d.ts.map +1 -1
  235. package/_types/clients/decorators/bundler.d.ts +8 -8
  236. package/_types/clients/decorators/bundler.d.ts.map +1 -1
  237. package/_types/clients/decorators/pimlico.d.ts +5 -5
  238. package/_types/clients/decorators/pimlico.d.ts.map +1 -1
  239. package/_types/clients/decorators/smartAccount.d.ts +11 -11
  240. package/_types/clients/decorators/smartAccount.d.ts.map +1 -1
  241. package/_types/clients/decorators/stackup.d.ts +2 -2
  242. package/_types/clients/decorators/stackup.d.ts.map +1 -1
  243. package/_types/clients/pimlico.d.ts +3 -3
  244. package/_types/clients/pimlico.d.ts.map +1 -1
  245. package/_types/clients/stackup.d.ts +3 -3
  246. package/_types/clients/stackup.d.ts.map +1 -1
  247. package/_types/errors/estimateUserOperationGas.d.ts +1 -1
  248. package/_types/errors/estimateUserOperationGas.d.ts.map +1 -1
  249. package/_types/errors/index.d.ts +6 -6
  250. package/_types/errors/index.d.ts.map +1 -1
  251. package/_types/errors/sendUserOperation.d.ts +1 -1
  252. package/_types/errors/sendUserOperation.d.ts.map +1 -1
  253. package/_types/index.d.ts +28 -28
  254. package/_types/index.d.ts.map +1 -1
  255. package/_types/types/bundler.d.ts +1 -1
  256. package/_types/types/bundler.d.ts.map +1 -1
  257. package/_types/types/index.d.ts +2 -2
  258. package/_types/types/index.d.ts.map +1 -1
  259. package/_types/types/pimlico.d.ts +1 -1
  260. package/_types/types/pimlico.d.ts.map +1 -1
  261. package/_types/types/stackup.d.ts +1 -1
  262. package/_types/types/stackup.d.ts.map +1 -1
  263. package/_types/types/userOperation.d.ts +1 -1
  264. package/_types/types/userOperation.d.ts.map +1 -1
  265. package/_types/utils/getUserOperationHash.d.ts +1 -1
  266. package/_types/utils/getUserOperationHash.d.ts.map +1 -1
  267. package/_types/utils/index.d.ts +10 -9
  268. package/_types/utils/index.d.ts.map +1 -1
  269. package/_types/utils/providerToSmartAccountSigner.d.ts +3 -0
  270. package/_types/utils/providerToSmartAccountSigner.d.ts.map +1 -0
  271. package/_types/utils/signUserOperationHashWithECDSA.d.ts +2 -2
  272. package/_types/utils/signUserOperationHashWithECDSA.d.ts.map +1 -1
  273. package/_types/utils/walletClientToSmartAccountSigner.d.ts +4 -0
  274. package/_types/utils/walletClientToSmartAccountSigner.d.ts.map +1 -0
  275. package/accounts/biconomy/privateKeyToBiconomySmartAccount.ts +1 -1
  276. package/accounts/biconomy/signerToBiconomySmartAccount.ts +6 -6
  277. package/accounts/index.ts +8 -8
  278. package/accounts/kernel/signerToEcdsaKernelSmartAccount.ts +8 -8
  279. package/accounts/privateKeyToSafeSmartAccount.ts +1 -1
  280. package/accounts/privateKeyToSimpleSmartAccount.ts +1 -1
  281. package/accounts/signerToSafeSmartAccount.ts +3 -3
  282. package/accounts/signerToSimpleSmartAccount.ts +6 -6
  283. package/accounts/types.ts +1 -1
  284. package/actions/bundler/chainId.ts +2 -2
  285. package/actions/bundler/estimateUserOperationGas.ts +6 -6
  286. package/actions/bundler/getUserOperationByHash.ts +4 -4
  287. package/actions/bundler/getUserOperationReceipt.ts +5 -5
  288. package/actions/bundler/sendUserOperation.ts +6 -6
  289. package/actions/bundler/supportedEntryPoints.ts +2 -2
  290. package/actions/bundler/waitForUserOperationReceipt.ts +4 -4
  291. package/actions/index.ts +17 -17
  292. package/actions/pimlico/getUserOperationGasPrice.ts +2 -2
  293. package/actions/pimlico/getUserOperationStatus.ts +3 -3
  294. package/actions/pimlico/sendCompressedUserOperation.ts +2 -2
  295. package/actions/pimlico/sponsorUserOperation.ts +4 -4
  296. package/actions/pimlico/validateSponsorshipPolicies.ts +4 -4
  297. package/actions/pimlico.ts +7 -7
  298. package/actions/public/getAccountNonce.ts +2 -2
  299. package/actions/public/getSenderAddress.ts +2 -2
  300. package/actions/smartAccount/deployContract.ts +8 -8
  301. package/actions/smartAccount/prepareUserOperationRequest.ts +6 -9
  302. package/actions/smartAccount/sendTransaction.ts +7 -10
  303. package/actions/smartAccount/sendTransactions.ts +7 -10
  304. package/actions/smartAccount/sendUserOperation.ts +6 -9
  305. package/actions/smartAccount/signMessage.ts +2 -5
  306. package/actions/smartAccount/signTypedData.ts +2 -5
  307. package/actions/smartAccount/writeContract.ts +4 -4
  308. package/actions/smartAccount.ts +8 -8
  309. package/actions/stackup/accounts.ts +1 -1
  310. package/actions/stackup/sponsorUserOperation.ts +4 -4
  311. package/actions/stackup.ts +4 -4
  312. package/clients/createBundlerClient.ts +2 -2
  313. package/clients/createSmartAccountClient.ts +5 -5
  314. package/clients/decorators/bundler.ts +11 -11
  315. package/clients/decorators/pimlico.ts +6 -9
  316. package/clients/decorators/smartAccount.ts +11 -11
  317. package/clients/decorators/stackup.ts +3 -3
  318. package/clients/pimlico.ts +3 -3
  319. package/clients/stackup.ts +3 -3
  320. package/errors/estimateUserOperationGas.ts +2 -2
  321. package/errors/index.ts +6 -6
  322. package/errors/paymaster.ts +1 -1
  323. package/errors/sendUserOperation.ts +2 -2
  324. package/index.ts +28 -28
  325. package/package.json +1 -1
  326. package/types/bundler.ts +1 -1
  327. package/types/index.ts +2 -2
  328. package/types/pimlico.ts +1 -1
  329. package/types/stackup.ts +1 -1
  330. package/types/userOperation.ts +1 -1
  331. package/utils/getUserOperationHash.ts +1 -1
  332. package/utils/index.ts +11 -9
  333. package/utils/providerToSmartAccountSigner.ts +24 -0
  334. package/utils/signUserOperationHashWithECDSA.ts +4 -4
  335. package/utils/{walletClientToCustomSigner.ts → walletClientToSmartAccountSigner.ts} +2 -2
  336. package/_cjs/utils/walletClientToCustomSigner.js.map +0 -1
  337. package/_esm/utils/walletClientToCustomSigner.js.map +0 -1
  338. package/_types/utils/walletClientToCustomSigner.d.ts +0 -4
  339. package/_types/utils/walletClientToCustomSigner.d.ts.map +0 -1
@@ -2,13 +2,13 @@ import type { Address, Client } from "viem"
2
2
  import {
3
3
  type AccountsParameters,
4
4
  accounts
5
- } from "../../actions/stackup/accounts.js"
5
+ } from "../../actions/stackup/accounts"
6
6
  import {
7
7
  type SponsorUserOperationParameters,
8
8
  type SponsorUserOperationReturnType,
9
9
  sponsorUserOperation
10
- } from "../../actions/stackup/sponsorUserOperation.js"
11
- import { type StackupPaymasterClient } from "../stackup.js"
10
+ } from "../../actions/stackup/sponsorUserOperation"
11
+ import { type StackupPaymasterClient } from "../stackup"
12
12
 
13
13
  export type StackupPaymasterClientActions = {
14
14
  /**
@@ -9,14 +9,14 @@ import { createClient } from "viem"
9
9
  import type {
10
10
  PimlicoBundlerRpcSchema,
11
11
  PimlicoPaymasterRpcSchema
12
- } from "../types/pimlico.js"
13
- import { type BundlerActions, bundlerActions } from "./decorators/bundler.js"
12
+ } from "../types/pimlico"
13
+ import { type BundlerActions, bundlerActions } from "./decorators/bundler"
14
14
  import {
15
15
  type PimlicoBundlerActions,
16
16
  type PimlicoPaymasterClientActions,
17
17
  pimlicoBundlerActions,
18
18
  pimlicoPaymasterActions
19
- } from "./decorators/pimlico.js"
19
+ } from "./decorators/pimlico"
20
20
 
21
21
  export type PimlicoBundlerClient = Client<
22
22
  Transport,
@@ -6,12 +6,12 @@ import {
6
6
  type Transport,
7
7
  createClient
8
8
  } from "viem"
9
- import type { StackupPaymasterRpcSchema } from "../types/stackup.js"
10
- import { type BundlerActions, bundlerActions } from "./decorators/bundler.js"
9
+ import type { StackupPaymasterRpcSchema } from "../types/stackup"
10
+ import { type BundlerActions, bundlerActions } from "./decorators/bundler"
11
11
  import {
12
12
  type StackupPaymasterClientActions,
13
13
  stackupPaymasterActions
14
- } from "./decorators/stackup.js"
14
+ } from "./decorators/stackup"
15
15
 
16
16
  export type StackupPaymasterClient = Client<
17
17
  Transport,
@@ -1,6 +1,6 @@
1
1
  import { BaseError } from "viem"
2
- import type { EstimateUserOperationGasParameters } from "../actions/bundler/estimateUserOperationGas.js"
3
- import { prettyPrint } from "./utils.js"
2
+ import type { EstimateUserOperationGasParameters } from "../actions/bundler/estimateUserOperationGas"
3
+ import { prettyPrint } from "./utils"
4
4
 
5
5
  export type EstimateUserOperationGasErrorType =
6
6
  EstimateUserOperationGasError & {
package/errors/index.ts CHANGED
@@ -19,15 +19,15 @@ import {
19
19
  type SmartAccountSignatureValidityPeriodErrorType,
20
20
  SmartAccountValidationRevertedError,
21
21
  type SmartAccountValidationRevertedErrorType
22
- } from "./account.js"
22
+ } from "./account"
23
23
  import {
24
24
  EstimateUserOperationGasError,
25
25
  type EstimateUserOperationGasErrorType
26
- } from "./estimateUserOperationGas.js"
26
+ } from "./estimateUserOperationGas"
27
27
  import {
28
28
  SendUserOperationError,
29
29
  type SendUserOperationErrorType
30
- } from "./sendUserOperation.js"
30
+ } from "./sendUserOperation"
31
31
 
32
32
  import {
33
33
  InvalidPaymasterAndDataError,
@@ -44,14 +44,14 @@ import {
44
44
  type PaymasterValidationRevertedErrorType,
45
45
  PaymasterValidityPeriodError,
46
46
  type PaymasterValidityPeriodErrorType
47
- } from "./paymaster.js"
47
+ } from "./paymaster"
48
48
 
49
49
  import {
50
50
  InvalidAggregatorError,
51
51
  type InvalidAggregatorErrorType,
52
52
  InvalidBeneficiaryAddressError,
53
53
  type InvalidBeneficiaryAddressErrorType
54
- } from "./bundler.js"
54
+ } from "./bundler"
55
55
 
56
56
  import {
57
57
  ActualGasCostTooHighError,
@@ -62,7 +62,7 @@ import {
62
62
  type GasValuesOverflowErrorType,
63
63
  VerificationGasLimitTooLowError,
64
64
  type VerificationGasLimitTooLowErrorType
65
- } from "./gas.js"
65
+ } from "./gas"
66
66
 
67
67
  export {
68
68
  type InitCodeDidNotDeploySenderErrorType,
@@ -1,5 +1,5 @@
1
1
  import { BaseError, type Hex } from "viem"
2
- import { getAddressFromInitCodeOrPaymasterAndData } from "../utils/index.js"
2
+ import { getAddressFromInitCodeOrPaymasterAndData } from "../utils/"
3
3
 
4
4
  export type PaymasterNotDeployedErrorType = PaymasterNotDeployedError & {
5
5
  name: "PaymasterNotDeployedError"
@@ -1,6 +1,6 @@
1
1
  import { BaseError } from "viem"
2
- import { type SendUserOperationParameters } from "../actions/bundler/sendUserOperation.js"
3
- import { prettyPrint } from "./utils.js"
2
+ import { type SendUserOperationParameters } from "../actions/bundler/sendUserOperation"
3
+ import { prettyPrint } from "./utils"
4
4
 
5
5
  export type SendUserOperationErrorType = SendUserOperationError & {
6
6
  name: "SendUserOperationError"
package/index.ts CHANGED
@@ -1,46 +1,46 @@
1
1
  import type {
2
2
  EstimateUserOperationGasParameters,
3
3
  EstimateUserOperationGasReturnType
4
- } from "./actions/bundler/estimateUserOperationGas.js"
5
- import type { GetUserOperationByHashParameters } from "./actions/bundler/getUserOperationByHash.js"
6
- import type { GetUserOperationByHashReturnType } from "./actions/bundler/getUserOperationByHash.js"
4
+ } from "./actions/bundler/estimateUserOperationGas"
5
+ import type { GetUserOperationByHashParameters } from "./actions/bundler/getUserOperationByHash"
6
+ import type { GetUserOperationByHashReturnType } from "./actions/bundler/getUserOperationByHash"
7
7
  import type {
8
8
  GetUserOperationReceiptParameters,
9
9
  GetUserOperationReceiptReturnType
10
- } from "./actions/bundler/getUserOperationReceipt.js"
11
- import type { SendUserOperationParameters } from "./actions/bundler/sendUserOperation.js"
10
+ } from "./actions/bundler/getUserOperationReceipt"
11
+ import type { SendUserOperationParameters } from "./actions/bundler/sendUserOperation"
12
12
 
13
- import type { GetSenderAddressParams } from "./actions/public/getSenderAddress.js"
14
- import { getSenderAddress } from "./actions/public/getSenderAddress.js"
13
+ import type { GetSenderAddressParams } from "./actions/public/getSenderAddress"
14
+ import { getSenderAddress } from "./actions/public/getSenderAddress"
15
15
 
16
- import { chainId } from "./actions/bundler/chainId.js"
17
- import { estimateUserOperationGas } from "./actions/bundler/estimateUserOperationGas.js"
18
- import { getUserOperationByHash } from "./actions/bundler/getUserOperationByHash.js"
19
- import { getUserOperationReceipt } from "./actions/bundler/getUserOperationReceipt.js"
20
- import { sendUserOperation } from "./actions/bundler/sendUserOperation.js"
21
- import { supportedEntryPoints } from "./actions/bundler/supportedEntryPoints.js"
22
- import { waitForUserOperationReceipt } from "./actions/bundler/waitForUserOperationReceipt.js"
16
+ import { chainId } from "./actions/bundler/chainId"
17
+ import { estimateUserOperationGas } from "./actions/bundler/estimateUserOperationGas"
18
+ import { getUserOperationByHash } from "./actions/bundler/getUserOperationByHash"
19
+ import { getUserOperationReceipt } from "./actions/bundler/getUserOperationReceipt"
20
+ import { sendUserOperation } from "./actions/bundler/sendUserOperation"
21
+ import { supportedEntryPoints } from "./actions/bundler/supportedEntryPoints"
22
+ import { waitForUserOperationReceipt } from "./actions/bundler/waitForUserOperationReceipt"
23
23
  import {
24
24
  type WaitForUserOperationReceiptParameters,
25
25
  WaitForUserOperationReceiptTimeoutError
26
- } from "./actions/bundler/waitForUserOperationReceipt.js"
27
- import type { GetAccountNonceParams } from "./actions/public/getAccountNonce.js"
28
- import { getAccountNonce } from "./actions/public/getAccountNonce.js"
26
+ } from "./actions/bundler/waitForUserOperationReceipt"
27
+ import type { GetAccountNonceParams } from "./actions/public/getAccountNonce"
28
+ import { getAccountNonce } from "./actions/public/getAccountNonce"
29
29
  import {
30
30
  type BundlerClient,
31
31
  createBundlerClient
32
- } from "./clients/createBundlerClient.js"
33
- import { createSmartAccountClient } from "./clients/createSmartAccountClient.js"
32
+ } from "./clients/createBundlerClient"
33
+ import { createSmartAccountClient } from "./clients/createSmartAccountClient"
34
34
  import {
35
35
  type SmartAccountClient,
36
36
  type SmartAccountClientConfig
37
- } from "./clients/createSmartAccountClient.js"
38
- import type { BundlerActions } from "./clients/decorators/bundler.js"
39
- import { bundlerActions } from "./clients/decorators/bundler.js"
37
+ } from "./clients/createSmartAccountClient"
38
+ import type { BundlerActions } from "./clients/decorators/bundler"
39
+ import { bundlerActions } from "./clients/decorators/bundler"
40
40
  import {
41
41
  type SmartAccountActions,
42
42
  smartAccountActions
43
- } from "./clients/decorators/smartAccount.js"
43
+ } from "./clients/decorators/smartAccount"
44
44
 
45
45
  export type {
46
46
  SendUserOperationParameters,
@@ -76,13 +76,13 @@ export {
76
76
  createSmartAccountClient,
77
77
  smartAccountActions
78
78
  }
79
- import type { UserOperation } from "./types/userOperation.js"
79
+ import type { UserOperation } from "./types/userOperation"
80
80
 
81
81
  export { type UserOperation }
82
82
 
83
- import type { GetUserOperationHashParams } from "./utils/getUserOperationHash.js"
84
- import { getUserOperationHash } from "./utils/getUserOperationHash.js"
83
+ import type { GetUserOperationHashParams } from "./utils/getUserOperationHash"
84
+ import { getUserOperationHash } from "./utils/getUserOperationHash"
85
85
 
86
86
  export { getUserOperationHash, type GetUserOperationHashParams }
87
- export * from "./utils/index.js"
88
- export * from "./errors/index.js"
87
+ export * from "./utils/"
88
+ export * from "./errors/"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "permissionless",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "author": "Pimlico",
5
5
  "homepage": "https://docs.pimlico.io/permissionless",
6
6
  "repository": "github:pimlicolabs/permissionless.js",
package/types/bundler.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hash, Hex } from "viem"
2
2
  import type { PartialBy } from "viem/types/utils"
3
- import type { UserOperationWithBigIntAsHex } from "./userOperation.js"
3
+ import type { UserOperationWithBigIntAsHex } from "./userOperation"
4
4
 
5
5
  export type BundlerRpcSchema = [
6
6
  {
package/types/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Account, Chain, Client, Transport } from "viem"
2
- import type { SmartAccount } from "../accounts/types.js"
3
- import type { UserOperation } from "./userOperation.js"
2
+ import type { SmartAccount } from "../accounts/types"
3
+ import type { UserOperation } from "./userOperation"
4
4
  export type { UserOperation }
5
5
 
6
6
  type IsUndefined<T> = [undefined] extends [T] ? true : false
package/types/pimlico.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hash, Hex } from "viem"
2
2
  import type { PartialBy } from "viem/types/utils"
3
- import type { UserOperationWithBigIntAsHex } from "./userOperation.js"
3
+ import type { UserOperationWithBigIntAsHex } from "./userOperation"
4
4
 
5
5
  type PimlicoUserOperationGasPriceWithBigIntAsHex = {
6
6
  slow: {
package/types/stackup.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hex } from "viem"
2
2
  import type { PartialBy } from "viem/types/utils"
3
- import type { UserOperationWithBigIntAsHex } from "./userOperation.js"
3
+ import type { UserOperationWithBigIntAsHex } from "./userOperation"
4
4
 
5
5
  interface StackupPaymasterContextType {
6
6
  type: "erc20token" | "payg"
@@ -1,4 +1,4 @@
1
- import type { Address } from "abitype"
1
+ import type { Address } from "viem"
2
2
  import type { Hex } from "viem"
3
3
 
4
4
  export type TStatus = "success" | "reverted"
@@ -1,6 +1,6 @@
1
1
  import type { Address, Hash, Hex } from "viem"
2
2
  import { encodeAbiParameters, keccak256 } from "viem"
3
- import type { UserOperation } from "../types/userOperation.js"
3
+ import type { UserOperation } from "../types/userOperation"
4
4
 
5
5
  function packUserOp({ userOperation }: { userOperation: UserOperation }): Hex {
6
6
  const hashedInitCode = keccak256(userOperation.initCode)
package/utils/index.ts CHANGED
@@ -1,22 +1,23 @@
1
1
  import type { Account, Address } from "viem"
2
- import { deepHexlify, transactionReceiptStatus } from "./deepHexlify.js"
3
- import { getAction } from "./getAction.js"
4
- import { getAddressFromInitCodeOrPaymasterAndData } from "./getAddressFromInitCodeOrPaymasterAndData.js"
2
+ import { deepHexlify, transactionReceiptStatus } from "./deepHexlify"
3
+ import { getAction } from "./getAction"
4
+ import { getAddressFromInitCodeOrPaymasterAndData } from "./getAddressFromInitCodeOrPaymasterAndData"
5
5
  import {
6
6
  type GetRequiredPrefundReturnType,
7
7
  getRequiredPrefund
8
- } from "./getRequiredPrefund.js"
8
+ } from "./getRequiredPrefund"
9
9
  import {
10
10
  type GetUserOperationHashParams,
11
11
  getUserOperationHash
12
- } from "./getUserOperationHash.js"
13
- import { isSmartAccountDeployed } from "./isSmartAccountDeployed.js"
12
+ } from "./getUserOperationHash"
13
+ import { isSmartAccountDeployed } from "./isSmartAccountDeployed"
14
+ import { providerToSmartAccountSigner } from "./providerToSmartAccountSigner"
14
15
  import {
15
16
  AccountOrClientNotFoundError,
16
17
  type SignUserOperationHashWithECDSAParams,
17
18
  signUserOperationHashWithECDSA
18
- } from "./signUserOperationHashWithECDSA.js"
19
- import { walletClientToCustomSigner } from "./walletClientToCustomSigner.js"
19
+ } from "./signUserOperationHashWithECDSA"
20
+ import { walletClientToSmartAccountSigner } from "./walletClientToSmartAccountSigner"
20
21
 
21
22
  export function parseAccount(account: Address | Account): Account {
22
23
  if (typeof account === "string")
@@ -30,12 +31,13 @@ export {
30
31
  getAction,
31
32
  getUserOperationHash,
32
33
  getRequiredPrefund,
33
- walletClientToCustomSigner,
34
+ walletClientToSmartAccountSigner,
34
35
  type GetRequiredPrefundReturnType,
35
36
  type GetUserOperationHashParams,
36
37
  signUserOperationHashWithECDSA,
37
38
  type SignUserOperationHashWithECDSAParams,
38
39
  AccountOrClientNotFoundError,
39
40
  isSmartAccountDeployed,
41
+ providerToSmartAccountSigner,
40
42
  getAddressFromInitCodeOrPaymasterAndData
41
43
  }
@@ -0,0 +1,24 @@
1
+ import {
2
+ type EIP1193Provider,
3
+ type Hex,
4
+ createWalletClient,
5
+ custom
6
+ } from "viem"
7
+ import { walletClientToSmartAccountSigner } from "./walletClientToSmartAccountSigner"
8
+
9
+ export const providerToSmartAccountSigner = async (
10
+ provider: EIP1193Provider,
11
+ signerAddress?: Hex
12
+ ) => {
13
+ let account: Hex
14
+ if (!signerAddress) {
15
+ ;[account] = await provider.request({ method: "eth_requestAccounts" })
16
+ } else {
17
+ account = signerAddress
18
+ }
19
+ const walletClient = createWalletClient({
20
+ account: account as Hex,
21
+ transport: custom(provider)
22
+ })
23
+ return walletClientToSmartAccountSigner(walletClient)
24
+ }
@@ -8,10 +8,10 @@ import {
8
8
  type Hex,
9
9
  type Transport
10
10
  } from "viem"
11
- import { type GetAccountParameterWithClient } from "../types/index.js"
12
- import type { UserOperation } from "../types/userOperation.js"
13
- import { getUserOperationHash } from "./getUserOperationHash.js"
14
- import { parseAccount } from "./index.js"
11
+ import { type GetAccountParameterWithClient } from "../types/"
12
+ import type { UserOperation } from "../types/userOperation"
13
+ import { parseAccount } from "./"
14
+ import { getUserOperationHash } from "./getUserOperationHash"
15
15
 
16
16
  export type SignUserOperationHashWithECDSAParams<
17
17
  TTransport extends Transport = Transport,
@@ -11,9 +11,9 @@ import type {
11
11
  } from "viem"
12
12
 
13
13
  import { signTypedData } from "viem/actions"
14
- import type { SmartAccountSigner } from "../accounts/types.js"
14
+ import type { SmartAccountSigner } from "../accounts/types"
15
15
 
16
- export function walletClientToCustomSigner<
16
+ export function walletClientToSmartAccountSigner<
17
17
  TChain extends Chain | undefined = Chain | undefined
18
18
  >(
19
19
  walletClient: WalletClient<Transport, TChain, Account>
@@ -1 +0,0 @@
1
- {"version":3,"file":"walletClientToCustomSigner.js","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":";;;AAYA,0CAA4C;AAG5C,SAAgB,0BAA0B,CAGtC,YAAsD;IAEtD,OAAO;QACH,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO;QACrC,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO;QACvC,WAAW,EAAE,KAAK,EAAE,EAChB,OAAO,EACoB,EAAgB,EAAE;YAC7C,OAAO,YAAY,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAChD,CAAC;QACD,KAAK,CAAC,aAAa,CAKjB,SAAwD;YACtD,OAAO,IAAA,uBAAa,EAChB,YAAY,EACZ;gBACI,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,GAAG,SAAS;aACf,CACJ,CAAA;QACL,CAAC;KACJ,CAAA;AACL,CAAC;AA9BD,gEA8BC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"walletClientToCustomSigner.js","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAG5C,MAAM,UAAU,0BAA0B,CAGtC,YAAsD;IAEtD,OAAO;QACH,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO;QACrC,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO;QACvC,WAAW,EAAE,KAAK,EAAE,EAChB,OAAO,EACoB,EAAgB,EAAE;YAC7C,OAAO,YAAY,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAChD,CAAC;QACD,KAAK,CAAC,aAAa,CAKjB,SAAwD;YACtD,OAAO,aAAa,CAChB,YAAY,EACZ;gBACI,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,GAAG,SAAS;aACf,CACJ,CAAA;QACL,CAAC;KACJ,CAAA;AACL,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { Account, Address, Chain, Transport, WalletClient } from "viem";
2
- import type { SmartAccountSigner } from "../accounts/types.js";
3
- export declare function walletClientToCustomSigner<TChain extends Chain | undefined = Chain | undefined>(walletClient: WalletClient<Transport, TChain, Account>): SmartAccountSigner<"custom", Address>;
4
- //# sourceMappingURL=walletClientToCustomSigner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walletClientToCustomSigner.d.ts","sourceRoot":"","sources":["../../utils/walletClientToCustomSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,OAAO,EACP,KAAK,EAGL,SAAS,EAGT,YAAY,EACf,MAAM,MAAM,CAAA;AAGb,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,wBAAgB,0BAA0B,CACtC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,YAAY,EAAE,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,GACvD,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CA0BvC"}