permissionless 0.3.6 → 0.4.0

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 (229) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/_cjs/accounts/biconomy/toBiconomySmartAccount.js +9 -5
  3. package/_cjs/accounts/biconomy/toBiconomySmartAccount.js.map +1 -1
  4. package/_cjs/accounts/kernel/toKernelSmartAccount.js +4 -0
  5. package/_cjs/accounts/kernel/toKernelSmartAccount.js.map +1 -1
  6. package/_cjs/accounts/light/toLightSmartAccount.js +9 -5
  7. package/_cjs/accounts/light/toLightSmartAccount.js.map +1 -1
  8. package/_cjs/accounts/nexus/toNexusSmartAccount.js +3 -2
  9. package/_cjs/accounts/nexus/toNexusSmartAccount.js.map +1 -1
  10. package/_cjs/accounts/safe/signUserOperation.js +14 -1
  11. package/_cjs/accounts/safe/signUserOperation.js.map +1 -1
  12. package/_cjs/accounts/safe/toSafeSmartAccount.js +6 -4
  13. package/_cjs/accounts/safe/toSafeSmartAccount.js.map +1 -1
  14. package/_cjs/accounts/simple/toSimpleSmartAccount.js +15 -10
  15. package/_cjs/accounts/simple/toSimpleSmartAccount.js.map +1 -1
  16. package/_cjs/accounts/thirdweb/utils/decodeCallData.js +7 -5
  17. package/_cjs/accounts/thirdweb/utils/decodeCallData.js.map +1 -1
  18. package/_cjs/accounts/trust/utils/decodeCallData.js +7 -5
  19. package/_cjs/accounts/trust/utils/decodeCallData.js.map +1 -1
  20. package/_cjs/actions/{erc7579.js → erc7579/index.js} +9 -9
  21. package/_cjs/actions/erc7579/index.js.map +1 -0
  22. package/_cjs/actions/{etherspot.js → etherspot/index.js} +2 -2
  23. package/_cjs/actions/etherspot/index.js.map +1 -0
  24. package/_cjs/actions/{passkeyServer.js → passkeyServer/index.js} +4 -4
  25. package/_cjs/actions/passkeyServer/index.js.map +1 -0
  26. package/_cjs/actions/pimlico/estimateErc20PaymasterCost.js +7 -3
  27. package/_cjs/actions/pimlico/estimateErc20PaymasterCost.js.map +1 -1
  28. package/_cjs/actions/{pimlico.js → pimlico/index.js} +8 -8
  29. package/_cjs/actions/pimlico/index.js.map +1 -0
  30. package/_cjs/actions/{smartAccount.js → smartAccount/index.js} +5 -5
  31. package/_cjs/actions/smartAccount/index.js.map +1 -0
  32. package/_cjs/clients/createSmartAccountClient.js.map +1 -1
  33. package/_cjs/clients/decorators/pimlico.js +4 -4
  34. package/_cjs/clients/decorators/pimlico.js.map +1 -1
  35. package/_cjs/clients/{passkeyServer.js → passkeyServer/index.js} +2 -2
  36. package/_cjs/clients/passkeyServer/index.js.map +1 -0
  37. package/_cjs/clients/{pimlico.js → pimlico/index.js} +2 -2
  38. package/_cjs/clients/pimlico/index.js.map +1 -0
  39. package/_cjs/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js +6 -5
  40. package/_cjs/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js.map +1 -1
  41. package/_cjs/utils/index.js +3 -1
  42. package/_cjs/utils/index.js.map +1 -1
  43. package/_cjs/utils/sortAddresses.js +16 -0
  44. package/_cjs/utils/sortAddresses.js.map +1 -0
  45. package/_esm/accounts/biconomy/toBiconomySmartAccount.js +9 -5
  46. package/_esm/accounts/biconomy/toBiconomySmartAccount.js.map +1 -1
  47. package/_esm/accounts/kernel/toKernelSmartAccount.js +4 -0
  48. package/_esm/accounts/kernel/toKernelSmartAccount.js.map +1 -1
  49. package/_esm/accounts/light/toLightSmartAccount.js +9 -5
  50. package/_esm/accounts/light/toLightSmartAccount.js.map +1 -1
  51. package/_esm/accounts/nexus/toNexusSmartAccount.js +3 -2
  52. package/_esm/accounts/nexus/toNexusSmartAccount.js.map +1 -1
  53. package/_esm/accounts/safe/signUserOperation.js +14 -1
  54. package/_esm/accounts/safe/signUserOperation.js.map +1 -1
  55. package/_esm/accounts/safe/toSafeSmartAccount.js +6 -4
  56. package/_esm/accounts/safe/toSafeSmartAccount.js.map +1 -1
  57. package/_esm/accounts/simple/toSimpleSmartAccount.js +15 -10
  58. package/_esm/accounts/simple/toSimpleSmartAccount.js.map +1 -1
  59. package/_esm/accounts/thirdweb/utils/decodeCallData.js +7 -5
  60. package/_esm/accounts/thirdweb/utils/decodeCallData.js.map +1 -1
  61. package/_esm/accounts/trust/utils/decodeCallData.js +7 -5
  62. package/_esm/accounts/trust/utils/decodeCallData.js.map +1 -1
  63. package/_esm/actions/{erc7579.js → erc7579/index.js} +9 -9
  64. package/_esm/actions/erc7579/index.js.map +1 -0
  65. package/_esm/actions/etherspot/index.js +2 -0
  66. package/_esm/actions/etherspot/index.js.map +1 -0
  67. package/_esm/actions/passkeyServer/index.js +4 -0
  68. package/_esm/actions/passkeyServer/index.js.map +1 -0
  69. package/_esm/actions/pimlico/estimateErc20PaymasterCost.js +7 -3
  70. package/_esm/actions/pimlico/estimateErc20PaymasterCost.js.map +1 -1
  71. package/_esm/actions/pimlico/index.js +8 -0
  72. package/_esm/actions/pimlico/index.js.map +1 -0
  73. package/_esm/actions/smartAccount/index.js +5 -0
  74. package/_esm/actions/smartAccount/index.js.map +1 -0
  75. package/_esm/clients/createSmartAccountClient.js.map +1 -1
  76. package/_esm/clients/decorators/pimlico.js +1 -1
  77. package/_esm/clients/decorators/pimlico.js.map +1 -1
  78. package/_esm/clients/{passkeyServer.js → passkeyServer/index.js} +2 -2
  79. package/_esm/clients/passkeyServer/index.js.map +1 -0
  80. package/_esm/clients/{pimlico.js → pimlico/index.js} +2 -2
  81. package/_esm/clients/pimlico/index.js.map +1 -0
  82. package/_esm/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js +5 -4
  83. package/_esm/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js.map +1 -1
  84. package/_esm/utils/index.js +1 -0
  85. package/_esm/utils/index.js.map +1 -1
  86. package/_esm/utils/sortAddresses.js +19 -0
  87. package/_esm/utils/sortAddresses.js.map +1 -0
  88. package/_types/accounts/biconomy/toBiconomySmartAccount.d.ts.map +1 -1
  89. package/_types/accounts/kernel/toKernelSmartAccount.d.ts.map +1 -1
  90. package/_types/accounts/light/toLightSmartAccount.d.ts.map +1 -1
  91. package/_types/accounts/nexus/toNexusSmartAccount.d.ts.map +1 -1
  92. package/_types/accounts/safe/signUserOperation.d.ts.map +1 -1
  93. package/_types/accounts/safe/toSafeSmartAccount.d.ts.map +1 -1
  94. package/_types/accounts/simple/toSimpleSmartAccount.d.ts.map +1 -1
  95. package/_types/accounts/thirdweb/utils/decodeCallData.d.ts.map +1 -1
  96. package/_types/accounts/trust/utils/decodeCallData.d.ts.map +1 -1
  97. package/_types/actions/{erc7579.d.ts → erc7579/index.d.ts} +11 -11
  98. package/_types/actions/erc7579/index.d.ts.map +1 -0
  99. package/_types/actions/etherspot/index.d.ts +2 -0
  100. package/_types/actions/etherspot/index.d.ts.map +1 -0
  101. package/_types/actions/passkeyServer/index.d.ts +4 -0
  102. package/_types/actions/passkeyServer/index.d.ts.map +1 -0
  103. package/_types/actions/pimlico/estimateErc20PaymasterCost.d.ts.map +1 -1
  104. package/_types/actions/pimlico/index.d.ts +8 -0
  105. package/_types/actions/pimlico/index.d.ts.map +1 -0
  106. package/_types/actions/smartAccount/index.d.ts +5 -0
  107. package/_types/actions/smartAccount/index.d.ts.map +1 -0
  108. package/_types/clients/createSmartAccountClient.d.ts +9 -1
  109. package/_types/clients/createSmartAccountClient.d.ts.map +1 -1
  110. package/_types/clients/decorators/pimlico.d.ts +1 -1
  111. package/_types/clients/decorators/pimlico.d.ts.map +1 -1
  112. package/_types/clients/{passkeyServer.d.ts → passkeyServer/index.d.ts} +8 -4
  113. package/_types/clients/passkeyServer/index.d.ts.map +1 -0
  114. package/_types/clients/pimlico/index.d.ts +21 -0
  115. package/_types/clients/pimlico/index.d.ts.map +1 -0
  116. package/_types/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.d.ts.map +1 -1
  117. package/_types/utils/index.d.ts +1 -0
  118. package/_types/utils/index.d.ts.map +1 -1
  119. package/_types/utils/sortAddresses.d.ts +9 -0
  120. package/_types/utils/sortAddresses.d.ts.map +1 -0
  121. package/accounts/biconomy/package.json +6 -0
  122. package/accounts/biconomy/toBiconomySmartAccount.ts +13 -5
  123. package/accounts/etherspot/package.json +6 -0
  124. package/accounts/kernel/package.json +6 -0
  125. package/accounts/kernel/toKernelSmartAccount.ts +7 -0
  126. package/accounts/light/package.json +6 -0
  127. package/accounts/light/toLightSmartAccount.ts +13 -5
  128. package/accounts/nexus/package.json +6 -0
  129. package/accounts/nexus/toNexusSmartAccount.ts +3 -6
  130. package/accounts/package.json +6 -0
  131. package/accounts/safe/package.json +6 -0
  132. package/accounts/safe/signUserOperation.ts +15 -3
  133. package/accounts/safe/toSafeSmartAccount.ts +7 -6
  134. package/accounts/simple/package.json +6 -0
  135. package/accounts/simple/toSimpleSmartAccount.ts +21 -10
  136. package/accounts/thirdweb/package.json +6 -0
  137. package/accounts/thirdweb/utils/decodeCallData.ts +9 -5
  138. package/accounts/trust/package.json +6 -0
  139. package/accounts/trust/utils/decodeCallData.ts +9 -5
  140. package/actions/{erc7579.ts → erc7579/index.ts} +10 -16
  141. package/actions/erc7579/package.json +6 -0
  142. package/actions/{etherspot.ts → etherspot/index.ts} +1 -1
  143. package/actions/etherspot/package.json +6 -0
  144. package/actions/{passkeyServer.ts → passkeyServer/index.ts} +3 -3
  145. package/actions/passkeyServer/package.json +6 -0
  146. package/actions/pimlico/estimateErc20PaymasterCost.ts +9 -3
  147. package/actions/{pimlico.ts → pimlico/index.ts} +7 -7
  148. package/actions/pimlico/package.json +6 -0
  149. package/actions/smartAccount/index.ts +7 -0
  150. package/actions/smartAccount/package.json +6 -0
  151. package/clients/createSmartAccountClient.ts +45 -20
  152. package/clients/decorators/pimlico.ts +10 -10
  153. package/clients/package.json +6 -0
  154. package/clients/{passkeyServer.ts → passkeyServer/index.ts} +15 -13
  155. package/clients/passkeyServer/package.json +6 -0
  156. package/clients/{pimlico.ts → pimlico/index.ts} +50 -23
  157. package/clients/pimlico/package.json +6 -0
  158. package/errors/package.json +6 -0
  159. package/experimental/pimlico/package.json +6 -0
  160. package/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts +6 -4
  161. package/package.json +34 -29
  162. package/utils/index.ts +1 -0
  163. package/utils/package.json +6 -0
  164. package/utils/sortAddresses.ts +21 -0
  165. package/_cjs/actions/erc7579.js.map +0 -1
  166. package/_cjs/actions/etherspot.js.map +0 -1
  167. package/_cjs/actions/passkeyServer.js.map +0 -1
  168. package/_cjs/actions/pimlico.js.map +0 -1
  169. package/_cjs/actions/smartAccount.js.map +0 -1
  170. package/_cjs/clients/passkeyServer.js.map +0 -1
  171. package/_cjs/clients/pimlico.js.map +0 -1
  172. package/_esm/actions/erc7579.js.map +0 -1
  173. package/_esm/actions/etherspot.js +0 -2
  174. package/_esm/actions/etherspot.js.map +0 -1
  175. package/_esm/actions/passkeyServer.js +0 -4
  176. package/_esm/actions/passkeyServer.js.map +0 -1
  177. package/_esm/actions/pimlico.js +0 -8
  178. package/_esm/actions/pimlico.js.map +0 -1
  179. package/_esm/actions/smartAccount.js +0 -5
  180. package/_esm/actions/smartAccount.js.map +0 -1
  181. package/_esm/clients/passkeyServer.js.map +0 -1
  182. package/_esm/clients/pimlico.js.map +0 -1
  183. package/_types/actions/erc7579.d.ts.map +0 -1
  184. package/_types/actions/etherspot.d.ts +0 -2
  185. package/_types/actions/etherspot.d.ts.map +0 -1
  186. package/_types/actions/passkeyServer.d.ts +0 -4
  187. package/_types/actions/passkeyServer.d.ts.map +0 -1
  188. package/_types/actions/pimlico.d.ts +0 -8
  189. package/_types/actions/pimlico.d.ts.map +0 -1
  190. package/_types/actions/smartAccount.d.ts +0 -5
  191. package/_types/actions/smartAccount.d.ts.map +0 -1
  192. package/_types/clients/passkeyServer.d.ts.map +0 -1
  193. package/_types/clients/pimlico.d.ts +0 -13
  194. package/_types/clients/pimlico.d.ts.map +0 -1
  195. package/accounts/decodeCalls.test.ts +0 -505
  196. package/accounts/safe/signUserOperation.test.ts +0 -275
  197. package/actions/erc7579/accountId.test.ts +0 -39
  198. package/actions/erc7579/installModule.test.ts +0 -214
  199. package/actions/erc7579/installModules.test.ts +0 -235
  200. package/actions/erc7579/isModuleInstalled.test.ts +0 -72
  201. package/actions/erc7579/supportsExecutionMode.test.ts +0 -108
  202. package/actions/erc7579/supportsModule.test.ts +0 -35
  203. package/actions/erc7579/uninstallModule.test.ts +0 -128
  204. package/actions/erc7579/uninstallModules.test.ts +0 -117
  205. package/actions/pimlico/getTokenQuotes.test.ts +0 -90
  206. package/actions/pimlico/getUserOperationGasPrice.test.ts +0 -82
  207. package/actions/pimlico/getUserOperationStatus.test.ts +0 -223
  208. package/actions/pimlico/sponsorUserOperation.test.ts +0 -236
  209. package/actions/pimlico/validateSponsorshipPolicies.test.ts +0 -153
  210. package/actions/public/getAccountNonce.test.ts +0 -96
  211. package/actions/public/getSenderAddress.test.ts +0 -154
  212. package/actions/smartAccount/getCallsStatus.test.ts +0 -253
  213. package/actions/smartAccount/sendCalls.test.ts +0 -569
  214. package/actions/smartAccount/sendTransaction.test.ts +0 -414
  215. package/actions/smartAccount/signMessage.test.ts +0 -217
  216. package/actions/smartAccount/signTypedData.test.ts +0 -226
  217. package/actions/smartAccount.ts +0 -7
  218. package/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.test.ts +0 -574
  219. package/types/package.json +0 -6
  220. package/utils/decodeNonce.test.ts +0 -40
  221. package/utils/deepHexlify.test.ts +0 -57
  222. package/utils/encode7579Calls.test.ts +0 -69
  223. package/utils/encodeNonce.test.ts +0 -38
  224. package/utils/erc20AllowanceOverride.test.ts +0 -59
  225. package/utils/erc20BalanceOverride.test.ts +0 -57
  226. package/utils/getAddressFromInitCodeOrPaymasterAndData.test.ts +0 -31
  227. package/utils/getPackedUserOperation.test.ts +0 -204
  228. package/utils/getRequiredPrefund.test.ts +0 -90
  229. package/vitest.config.ts +0 -41
@@ -1,9 +1,9 @@
1
1
  import type { Chain, Client, Hash, Prettify, Transport } from "viem";
2
2
  import type { EntryPointVersion } from "viem/account-abstraction";
3
- import { type GetTokenQuotesParameters, type GetTokenQuotesReturnType, type SendCompressedUserOperationParameters, type ValidateSponsorshipPolicies, type ValidateSponsorshipPoliciesParameters } from "../../actions/pimlico.js";
4
3
  import { type EstimateErc20PaymasterCostParameters, type EstimateErc20PaymasterCostReturnType } from "../../actions/pimlico/estimateErc20PaymasterCost.js";
5
4
  import { type GetUserOperationGasPriceReturnType } from "../../actions/pimlico/getUserOperationGasPrice.js";
6
5
  import { type GetUserOperationStatusParameters, type GetUserOperationStatusReturnType } from "../../actions/pimlico/getUserOperationStatus.js";
6
+ import { type GetTokenQuotesParameters, type GetTokenQuotesReturnType, type SendCompressedUserOperationParameters, type ValidateSponsorshipPolicies, type ValidateSponsorshipPoliciesParameters } from "../../actions/pimlico/index.js";
7
7
  import { type PimlicoSponsorUserOperationParameters, type SponsorUserOperationReturnType } from "../../actions/pimlico/sponsorUserOperation.js";
8
8
  export type PimlicoActions<TChain extends Chain | undefined, entryPointVersion extends EntryPointVersion = EntryPointVersion> = {
9
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pimlico.d.ts","sourceRoot":"","sources":["../../../clients/decorators/pimlico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,qCAAqC,EAC1C,KAAK,2BAA2B,EAChC,KAAK,qCAAqC,EAI7C,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACH,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EAE5C,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EACH,KAAK,gCAAgC,E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,oBACV,MAAM,gIAmCR,CAAA"}
@@ -1,7 +1,11 @@
1
1
  import type { Account, Chain, Client, ClientConfig, Prettify, RpcSchema, Transport } from "viem";
2
- import type { PasskeyServerRpcSchema } from "../types/passkeyServer.js";
3
- import { type PasskeyServerActions } from "./decorators/passkeyServer.js";
4
- export type PasskeyServerClient<rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Client<Transport, Chain | undefined, Account | undefined, rpcSchema extends RpcSchema ? [...PasskeyServerRpcSchema, ...rpcSchema] : [...PasskeyServerRpcSchema], PasskeyServerActions>>;
2
+ import type { PasskeyServerRpcSchema } from "../../types/passkeyServer.js";
3
+ import { type PasskeyServerActions } from "../decorators/passkeyServer.js";
4
+ type PasskeyServerClientInner<rpcSchema extends RpcSchema | undefined> = Client<Transport, Chain | undefined, Account | undefined, rpcSchema extends RpcSchema ? [...PasskeyServerRpcSchema, ...rpcSchema] : [...PasskeyServerRpcSchema], PasskeyServerActions>;
5
+ export type PasskeyServerClient<rpcSchema extends RpcSchema | undefined = undefined> = {
6
+ [key in keyof PasskeyServerClientInner<rpcSchema>]: PasskeyServerClientInner<rpcSchema>[key];
7
+ };
5
8
  export type PasskeyServerClientConfig<rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<Transport, Chain | undefined, Account | undefined, rpcSchema>, "account" | "cacheTime" | "chain" | "key" | "name" | "pollingInterval" | "rpcSchema" | "transport">>;
6
9
  export declare function createPasskeyServerClient<rpcSchema extends RpcSchema | undefined = undefined>(parameters: PasskeyServerClientConfig<rpcSchema>): PasskeyServerClient<rpcSchema>;
7
- //# sourceMappingURL=passkeyServer.d.ts.map
10
+ export {};
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../clients/passkeyServer/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,KAAK,EACL,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EACH,KAAK,oBAAoB,EAE5B,MAAM,gCAAgC,CAAA;AAEvC,KAAK,wBAAwB,CAAC,SAAS,SAAS,SAAS,GAAG,SAAS,IAAI,MAAM,CAC3E,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,SAAS,SAAS,SAAS,GACrB,CAAC,GAAG,sBAAsB,EAAE,GAAG,SAAS,CAAC,GACzC,CAAC,GAAG,sBAAsB,CAAC,EACjC,oBAAoB,CACvB,CAAA;AAED,MAAM,MAAM,mBAAmB,CAC3B,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IACnD;KACC,GAAG,IAAI,MAAM,wBAAwB,CAAC,SAAS,CAAC,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC;CAC/F,CAAA;AAED,MAAM,MAAM,yBAAyB,CACjC,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,IACnD,QAAQ,CACR,IAAI,CACA,YAAY,CACR,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,SAAS,CACZ,EACC,SAAS,GACT,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,iBAAiB,GACjB,WAAW,GACX,WAAW,CAChB,CACJ,CAAA;AAED,wBAAgB,yBAAyB,CACrC,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,EAEnD,UAAU,EAAE,yBAAyB,CAAC,SAAS,CAAC,GACjD,mBAAmB,CAAC,SAAS,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { Address, BundlerRpcSchema, Chain, Client, ClientConfig, Prettify, RpcSchema, Transport } from "viem";
2
+ import { type BundlerActions, type EntryPointVersion, type PaymasterActions, type SmartAccount } from "viem/account-abstraction";
3
+ import type { PimlicoRpcSchema } from "../../types/pimlico.js";
4
+ import { type PimlicoActions } from "../decorators/pimlico.js";
5
+ type PimlicoClientInner<entryPointVersion extends EntryPointVersion, transport extends Transport, chain extends Chain | undefined, account extends SmartAccount | undefined, client extends Client | undefined, rpcSchema extends RpcSchema | undefined> = Client<transport, chain extends Chain ? chain : client extends Client<any, infer chain> ? chain : undefined, account, rpcSchema extends RpcSchema ? [...BundlerRpcSchema, ...PimlicoRpcSchema, ...rpcSchema] : [...BundlerRpcSchema, ...PimlicoRpcSchema], BundlerActions<account> & PaymasterActions & PimlicoActions<chain, entryPointVersion>>;
6
+ export type PimlicoClient<
7
+ /** @ts-expect-error cast variance */
8
+ out entryPointVersion extends EntryPointVersion = EntryPointVersion, out transport extends Transport = Transport,
9
+ /** @ts-expect-error cast variance */
10
+ out chain extends Chain | undefined = Chain | undefined, out account extends SmartAccount | undefined = SmartAccount | undefined, out client extends Client | undefined = Client | undefined, rpcSchema extends RpcSchema | undefined = undefined> = {
11
+ [key in keyof PimlicoClientInner<entryPointVersion, transport, chain, account, client, rpcSchema>]: PimlicoClientInner<entryPointVersion, transport, chain, account, client, rpcSchema>[key];
12
+ };
13
+ export type PimlicoClientConfig<entryPointVersion extends EntryPointVersion = EntryPointVersion, transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartAccount | undefined = SmartAccount | undefined, rpcSchema extends RpcSchema | undefined = undefined> = Prettify<Pick<ClientConfig<transport, chain, account, rpcSchema>, "account" | "cacheTime" | "chain" | "key" | "name" | "pollingInterval" | "rpcSchema" | "transport">> & {
14
+ entryPoint?: {
15
+ address: Address;
16
+ version: entryPointVersion;
17
+ };
18
+ };
19
+ export declare function createPimlicoClient<entryPointVersion extends EntryPointVersion = "0.7", transport extends Transport = Transport, chain extends Chain | undefined = undefined, account extends SmartAccount | undefined = SmartAccount | undefined, client extends Client | undefined = undefined, rpcSchema extends RpcSchema | undefined = undefined>(parameters: PimlicoClientConfig<entryPointVersion, transport, chain, account, rpcSchema>): PimlicoClient<entryPointVersion, transport, chain, account, client, rpcSchema>;
20
+ export {};
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../clients/pimlico/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,OAAO,EACP,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACZ,MAAM,MAAM,CAAA;AAEb,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAIpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,0BAA0B,CAAA;AAE9E,KAAK,kBAAkB,CACnB,iBAAiB,SAAS,iBAAiB,EAC3C,SAAS,SAAS,SAAS,EAC3B,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,YAAY,GAAG,SAAS,EACxC,MAAM,SAAS,MAAM,GAAG,SAAS,EACjC,SAAS,SAAS,SAAS,GAAG,SAAS,IACvC,MAAM,CACN,SAAS,EACT,KAAK,SAAS,KAAK,GACb,KAAK,GAEL,MAAM,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,GACrC,KAAK,GACL,SAAS,EACjB,OAAO,EACP,SAAS,SAAS,SAAS,GACrB,CAAC,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,GAAG,SAAS,CAAC,GACxD,CAAC,GAAG,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,EAChD,cAAc,CAAC,OAAO,CAAC,GACnB,gBAAgB,GAChB,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAC/C,CAAA;AAID,MAAM,MAAM,aAAa;AACrB,qCAAqC;AACrC,GAAG,CAAC,iBAAiB,S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KAAK,EACnD,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,SAAS,EAC3C,OAAO,SAAS,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EACnE,MAAM,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EAC7C,SAAS,SAAS,SAAS,GAAG,SAAS,GAAG,SAAS,EAEnD,UAAU,EAAE,mBAAmB,CAC3B,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,OAAO,EACP,SAAS,CACZ,GACF,aAAa,CACZ,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,CACZ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prepareUserOperationForErc20Paymaster.d.ts","sourceRoot":"","sources":["../../../../experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,MAAM,EAIX,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AACb,OAAO,EAIH,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAEhC,KAAK,YAAY,EAIpB,MAAM,0BAA0B,CAAA;AAUjC,eAAO,MAAM,qCAAqC;;;OAY1C,OAAO,yCACD,KAAK,mCACL,OAAO,uEAKb,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDA2TlB,CAAA"}
1
+ {"version":3,"file":"prepareUserOperationForErc20Paymaster.d.ts","sourceRoot":"","sources":["../../../../experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,MAAM,EAIX,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AACb,OAAO,EAIH,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAEhC,KAAK,YAAY,EAIpB,MAAM,0BAA0B,CAAA;AAUjC,eAAO,MAAM,qCAAqC;;;OAY1C,OAAO,yCACD,KAAK,mCACL,OAAO,uEAKb,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDA6TlB,CAAA"}
@@ -2,6 +2,7 @@ export { deepHexlify, transactionReceiptStatus } from "./deepHexlify.js";
2
2
  export { getAddressFromInitCodeOrPaymasterAndData } from "./getAddressFromInitCodeOrPaymasterAndData.js";
3
3
  export { type GetRequiredPrefundReturnType, getRequiredPrefund } from "./getRequiredPrefund.js";
4
4
  export { isSmartAccountDeployed } from "./isSmartAccountDeployed.js";
5
+ export { sortAddresses } from "./sortAddresses.js";
5
6
  export { toOwner } from "./toOwner.js";
6
7
  export { decodeNonce } from "./decodeNonce.js";
7
8
  export { encodeNonce } from "./encodeNonce.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAE,wCAAwC,EAAE,MAAM,+CAA+C,CAAA;AACxG,OAAO,EACH,KAAK,4BAA4B,EACjC,kBAAkB,EACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EACH,KAAK,6BAA6B,EAClC,mBAAmB,EACtB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACH,KAAK,+BAA+B,EACpC,qBAAqB,EACxB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,EACH,KAA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EACzB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACH,KAAK,8BAA8B,EACnC,oBAAoB,EACvB,MAAM,2BAA2B,CAAA;AAGlC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Sorts addresses in ascending byte-wise (code unit) order, independent of
3
+ * the host's locale. Using String.prototype.localeCompare without an explicit
4
+ * locale makes the order depend on the ICU default locale (e.g. under
5
+ * da_DK the "aa" digraph sorts after "z"), which would make CREATE2
6
+ * counterfactual address derivation non-deterministic across hosts.
7
+ */
8
+ export declare const sortAddresses: (addresses: `0x${string}`[]) => `0x${string}`[];
9
+ //# sourceMappingURL=sortAddresses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortAddresses.d.ts","sourceRoot":"","sources":["../../utils/sortAddresses.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,iDAWpB,CAAA"}
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/biconomy/index.d.ts",
4
+ "module": "../../_esm/accounts/biconomy/index.js",
5
+ "main": "../../_cjs/accounts/biconomy/index.js"
6
+ }
@@ -288,11 +288,19 @@ export async function toBiconomySmartAccount(
288
288
  const calls: { to: Address; value: bigint; data: Hex }[] = []
289
289
 
290
290
  for (let i = 0; i < decoded.args[0].length; i++) {
291
- calls.push({
292
- to: decoded.args[0][i],
293
- value: decoded.args[1][i],
294
- data: decoded.args[2][i]
295
- })
291
+ const to = decoded.args[0][i]
292
+ const value = decoded.args[1][i]
293
+ const data = decoded.args[2][i]
294
+
295
+ if (
296
+ to === undefined ||
297
+ value === undefined ||
298
+ data === undefined
299
+ ) {
300
+ throw new Error("Invalid batch call data")
301
+ }
302
+
303
+ calls.push({ to, value, data })
296
304
  }
297
305
 
298
306
  return calls
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/etherspot/index.d.ts",
4
+ "module": "../../_esm/accounts/etherspot/index.js",
5
+ "main": "../../_cjs/accounts/etherspot/index.js"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/kernel/index.d.ts",
4
+ "module": "../../_esm/accounts/kernel/index.js",
5
+ "main": "../../_cjs/accounts/kernel/index.js"
6
+ }
@@ -774,6 +774,13 @@ export async function toKernelSmartAccount<
774
774
  ]
775
775
  })
776
776
 
777
+ if (
778
+ installFallbackCall === undefined ||
779
+ uninstallFallbackCall === undefined
780
+ ) {
781
+ throw new Error("Failed to encode fallback module calls")
782
+ }
783
+
777
784
  const executeCallData = encodeCallData({
778
785
  calls,
779
786
  kernelVersion
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/light/index.d.ts",
4
+ "module": "../../_esm/accounts/light/index.js",
5
+ "main": "../../_cjs/accounts/light/index.js"
6
+ }
@@ -355,11 +355,19 @@ export async function toLightSmartAccount<
355
355
  }[] = []
356
356
 
357
357
  for (let i = 0; i < decoded.args[0].length; i++) {
358
- calls.push({
359
- to: decoded.args[0][i],
360
- value: decoded.args[1][i],
361
- data: decoded.args[2][i]
362
- })
358
+ const to = decoded.args[0][i]
359
+ const value = decoded.args[1][i]
360
+ const data = decoded.args[2][i]
361
+
362
+ if (
363
+ to === undefined ||
364
+ value === undefined ||
365
+ data === undefined
366
+ ) {
367
+ throw new Error("Invalid batch call data")
368
+ }
369
+
370
+ calls.push({ to, value, data })
363
371
  }
364
372
 
365
373
  return calls
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/nexus/index.d.ts",
4
+ "module": "../../_esm/accounts/nexus/index.js",
5
+ "main": "../../_cjs/accounts/nexus/index.js"
6
+ }
@@ -39,6 +39,7 @@ import { getAction } from "viem/utils"
39
39
  import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
40
40
  import { decode7579Calls } from "../../utils/decode7579Calls.js"
41
41
  import { encode7579Calls } from "../../utils/encode7579Calls.js"
42
+ import { sortAddresses } from "../../utils/sortAddresses.js"
42
43
  import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
43
44
 
44
45
  const wrapMessageHash = (
@@ -170,9 +171,7 @@ export async function toNexusSmartAccount(
170
171
  args: [
171
172
  localOwner.address,
172
173
  index,
173
- attesters.sort((left, right) =>
174
- left.toLowerCase().localeCompare(right.toLowerCase())
175
- ),
174
+ sortAddresses(attesters),
176
175
  threshold
177
176
  ]
178
177
  })
@@ -215,9 +214,7 @@ export async function toNexusSmartAccount(
215
214
  args: [
216
215
  localOwner.address,
217
216
  index,
218
- attesters.sort((left, right) =>
219
- left.toLowerCase().localeCompare(right.toLowerCase())
220
- ),
217
+ sortAddresses(attesters),
221
218
  threshold
222
219
  ]
223
220
  })
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../_types/accounts/index.d.ts",
4
+ "module": "../_esm/accounts/index.js",
5
+ "main": "../_cjs/accounts/index.js"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/safe/index.d.ts",
4
+ "module": "../../_esm/accounts/safe/index.js",
5
+ "main": "../../_cjs/accounts/safe/index.js"
6
+ }
@@ -30,9 +30,17 @@ import {
30
30
  export const concatSignatures = (
31
31
  signatures: { signer: Address; data: Hex; dynamic: boolean }[]
32
32
  ) => {
33
- signatures.sort((left, right) =>
34
- left.signer.toLowerCase().localeCompare(right.signer.toLowerCase())
35
- )
33
+ signatures.sort((left, right) => {
34
+ const leftSigner = left.signer.toLowerCase()
35
+ const rightSigner = right.signer.toLowerCase()
36
+ if (leftSigner < rightSigner) {
37
+ return -1
38
+ }
39
+ if (leftSigner > rightSigner) {
40
+ return 1
41
+ }
42
+ return 0
43
+ })
36
44
 
37
45
  const SIGNATURE_LENGTH_BYTES = 65
38
46
  let signatureBytes = "0x"
@@ -97,6 +105,10 @@ export const getWebAuthnSignature = async ({
97
105
 
98
106
  const [, fields] = match
99
107
 
108
+ if (fields === undefined) {
109
+ throw new Error("challenge not found in client data JSON")
110
+ }
111
+
100
112
  return encodeAbiParameters(
101
113
  [
102
114
  { name: "authenticatorData", type: "bytes" },
@@ -48,6 +48,7 @@ import { decode7579Calls } from "../../utils/decode7579Calls.js"
48
48
  import { encode7579Calls } from "../../utils/encode7579Calls.js"
49
49
  import { isSmartAccountDeployed } from "../../utils/isSmartAccountDeployed.js"
50
50
  import { getOxExports } from "../../utils/ox.js"
51
+ import { sortAddresses } from "../../utils/sortAddresses.js"
51
52
  import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
52
53
  import {
53
54
  concatSignatures,
@@ -673,9 +674,7 @@ const get7579LaunchPadInitData = ({
673
674
  module: hook.address,
674
675
  initData: hook.context
675
676
  })),
676
- attesters.sort((left, right) =>
677
- left.toLowerCase().localeCompare(right.toLowerCase())
678
- ),
677
+ sortAddresses(attesters),
679
678
  attestersThreshold
680
679
  ]
681
680
  }),
@@ -904,15 +903,17 @@ const getInitializerCode = async ({
904
903
  })
905
904
  }
906
905
 
907
- if (!useMultiSendForSetup && multiCalls.length === 1) {
906
+ const firstMultiCall = multiCalls[0]
907
+
908
+ if (!useMultiSendForSetup && multiCalls.length === 1 && firstMultiCall) {
908
909
  return encodeFunctionData({
909
910
  abi: setupAbi,
910
911
  functionName: "setup",
911
912
  args: [
912
913
  ownerAddresses,
913
914
  threshold,
914
- multiCalls[0].to,
915
- multiCalls[0].data,
915
+ firstMultiCall.to,
916
+ firstMultiCall.data,
916
917
  safe4337ModuleAddress,
917
918
  paymentToken,
918
919
  payment,
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/simple/index.d.ts",
4
+ "module": "../../_esm/accounts/simple/index.js",
5
+ "main": "../../_cjs/accounts/simple/index.js"
6
+ }
@@ -374,11 +374,19 @@ export async function toSimpleSmartAccount<
374
374
  const datas = decodedV7.args[2]
375
375
 
376
376
  for (let i = 0; i < destinations.length; i++) {
377
- calls.push({
378
- to: destinations[i],
379
- data: datas[i],
380
- value: values[i]
381
- })
377
+ const to = destinations[i]
378
+ const data = datas[i]
379
+ const value = values[i]
380
+
381
+ if (
382
+ to === undefined ||
383
+ data === undefined ||
384
+ value === undefined
385
+ ) {
386
+ throw new Error("Invalid batch call data")
387
+ }
388
+
389
+ calls.push({ to, data, value })
382
390
  }
383
391
 
384
392
  return calls
@@ -394,11 +402,14 @@ export async function toSimpleSmartAccount<
394
402
  const datas = decodedV6.args[1]
395
403
 
396
404
  for (let i = 0; i < destinations.length; i++) {
397
- calls.push({
398
- to: destinations[i],
399
- data: datas[i],
400
- value: 0n
401
- })
405
+ const to = destinations[i]
406
+ const data = datas[i]
407
+
408
+ if (to === undefined || data === undefined) {
409
+ throw new Error("Invalid batch call data")
410
+ }
411
+
412
+ calls.push({ to, data, value: 0n })
402
413
  }
403
414
 
404
415
  return calls
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/thirdweb/index.d.ts",
4
+ "module": "../../_esm/accounts/thirdweb/index.js",
5
+ "main": "../../_cjs/accounts/thirdweb/index.js"
6
+ }
@@ -38,11 +38,15 @@ export const decodeCallData = async (callData: Hex) => {
38
38
  }[] = []
39
39
 
40
40
  for (let i = 0; i < decodedBatch.args[0].length; i++) {
41
- calls.push({
42
- to: decodedBatch.args[0][i],
43
- value: decodedBatch.args[1][i],
44
- data: decodedBatch.args[2][i]
45
- })
41
+ const to = decodedBatch.args[0][i]
42
+ const value = decodedBatch.args[1][i]
43
+ const data = decodedBatch.args[2][i]
44
+
45
+ if (to === undefined || data === undefined) {
46
+ throw new Error("Invalid batch call data")
47
+ }
48
+
49
+ calls.push({ to, value, data })
46
50
  }
47
51
 
48
52
  return calls
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/accounts/trust/index.d.ts",
4
+ "module": "../../_esm/accounts/trust/index.js",
5
+ "main": "../../_cjs/accounts/trust/index.js"
6
+ }
@@ -38,11 +38,15 @@ export const decodeCallData = async (callData: Hex) => {
38
38
  }[] = []
39
39
 
40
40
  for (let i = 0; i < decodedBatch.args[0].length; i++) {
41
- calls.push({
42
- to: decodedBatch.args[0][i],
43
- value: decodedBatch.args[1][i],
44
- data: decodedBatch.args[2][i]
45
- })
41
+ const to = decodedBatch.args[0][i]
42
+ const value = decodedBatch.args[1][i]
43
+ const data = decodedBatch.args[2][i]
44
+
45
+ if (to === undefined || data === undefined) {
46
+ throw new Error("Invalid batch call data")
47
+ }
48
+
49
+ calls.push({ to, value, data })
46
50
  }
47
51
 
48
52
  return calls
@@ -3,40 +3,34 @@ import type {
3
3
  GetSmartAccountParameter,
4
4
  SmartAccount
5
5
  } from "viem/account-abstraction"
6
- import { accountId } from "./erc7579/accountId.js"
7
- import {
8
- type InstallModuleParameters,
9
- installModule
10
- } from "./erc7579/installModule.js"
6
+ import { accountId } from "./accountId.js"
7
+ import { type InstallModuleParameters, installModule } from "./installModule.js"
11
8
  import {
12
9
  type InstallModulesParameters,
13
10
  installModules
14
- } from "./erc7579/installModules.js"
11
+ } from "./installModules.js"
15
12
  import {
16
13
  type IsModuleInstalledParameters,
17
14
  isModuleInstalled
18
- } from "./erc7579/isModuleInstalled.js"
15
+ } from "./isModuleInstalled.js"
19
16
  import {
20
17
  type SupportsExecutionModeParameters,
21
18
  supportsExecutionMode
22
- } from "./erc7579/supportsExecutionMode.js"
23
- import type {
24
- CallType,
25
- ExecutionMode
26
- } from "./erc7579/supportsExecutionMode.js"
19
+ } from "./supportsExecutionMode.js"
20
+ import type { CallType, ExecutionMode } from "./supportsExecutionMode.js"
27
21
  import {
28
22
  type SupportsModuleParameters,
29
23
  supportsModule
30
- } from "./erc7579/supportsModule.js"
31
- import type { ModuleType } from "./erc7579/supportsModule.js"
24
+ } from "./supportsModule.js"
25
+ import type { ModuleType } from "./supportsModule.js"
32
26
  import {
33
27
  type UninstallModuleParameters,
34
28
  uninstallModule
35
- } from "./erc7579/uninstallModule.js"
29
+ } from "./uninstallModule.js"
36
30
  import {
37
31
  type UninstallModulesParameters,
38
32
  uninstallModules
39
- } from "./erc7579/uninstallModules.js"
33
+ } from "./uninstallModules.js"
40
34
 
41
35
  export type Erc7579Actions<TSmartAccount extends SmartAccount | undefined> = {
42
36
  accountId: (
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/actions/erc7579/index.d.ts",
4
+ "module": "../../_esm/actions/erc7579/index.js",
5
+ "main": "../../_cjs/actions/erc7579/index.js"
6
+ }
@@ -1,4 +1,4 @@
1
1
  export {
2
2
  type GetGasPriceResponseReturnType,
3
3
  getUserOperationGasPrice
4
- } from "./etherspot/getUserOperationGasPrice.js"
4
+ } from "./getUserOperationGasPrice.js"
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/actions/etherspot/index.d.ts",
4
+ "module": "../../_esm/actions/etherspot/index.js",
5
+ "main": "../../_cjs/actions/etherspot/index.js"
6
+ }
@@ -2,16 +2,16 @@ export {
2
2
  type StartRegistrationParameters,
3
3
  type StartRegistrationReturnType,
4
4
  startRegistration
5
- } from "./passkeyServer/startRegistration.js"
5
+ } from "./startRegistration.js"
6
6
 
7
7
  export {
8
8
  type VerifyRegistrationParameters,
9
9
  type VerifyRegistrationReturnType,
10
10
  verifyRegistration
11
- } from "./passkeyServer/verifyRegistration.js"
11
+ } from "./verifyRegistration.js"
12
12
 
13
13
  export {
14
14
  type GetCredentialsParameters,
15
15
  type GetCredentialsReturnType,
16
16
  getCredentials
17
- } from "./passkeyServer/getCredentials.js"
17
+ } from "./getCredentials.js"
@@ -0,0 +1,6 @@
1
+ {
2
+ "type": "module",
3
+ "types": "../../_types/actions/passkeyServer/index.d.ts",
4
+ "module": "../../_esm/actions/passkeyServer/index.js",
5
+ "main": "../../_cjs/actions/passkeyServer/index.js"
6
+ }
@@ -76,9 +76,15 @@ export const estimateErc20PaymasterCost = async <
76
76
  chain
77
77
  })
78
78
 
79
- const postOpGas = quotes[0].postOpGas
80
- const exchangeRate = quotes[0].exchangeRate
81
- const exchangeRateNativeToUsd = quotes[0].exchangeRateNativeToUsd
79
+ const quote = quotes[0]
80
+
81
+ if (quote === undefined) {
82
+ throw new Error(`No token quote found for ${token}`)
83
+ }
84
+
85
+ const postOpGas = quote.postOpGas
86
+ const exchangeRate = quote.exchangeRate
87
+ const exchangeRateNativeToUsd = quote.exchangeRateNativeToUsd
82
88
 
83
89
  const userOperationMaxCost = getRequiredPrefund({
84
90
  userOperation,
@@ -2,37 +2,37 @@ export {
2
2
  type GetTokenQuotesParameters,
3
3
  type GetTokenQuotesReturnType,
4
4
  getTokenQuotes
5
- } from "./pimlico/getTokenQuotes.js"
5
+ } from "./getTokenQuotes.js"
6
6
 
7
7
  export {
8
8
  type GetUserOperationGasPriceReturnType,
9
9
  getUserOperationGasPrice
10
- } from "./pimlico/getUserOperationGasPrice.js"
10
+ } from "./getUserOperationGasPrice.js"
11
11
 
12
12
  export {
13
13
  type GetUserOperationStatusParameters,
14
14
  type GetUserOperationStatusReturnType,
15
15
  getUserOperationStatus
16
- } from "./pimlico/getUserOperationStatus.js"
16
+ } from "./getUserOperationStatus.js"
17
17
 
18
18
  export {
19
19
  type SendCompressedUserOperationParameters,
20
20
  sendCompressedUserOperation
21
- } from "./pimlico/sendCompressedUserOperation.js"
21
+ } from "./sendCompressedUserOperation.js"
22
22
 
23
23
  export {
24
24
  type PimlicoSponsorUserOperationParameters,
25
25
  type SponsorUserOperationReturnType,
26
26
  sponsorUserOperation
27
- } from "./pimlico/sponsorUserOperation.js"
27
+ } from "./sponsorUserOperation.js"
28
28
 
29
29
  export {
30
30
  type PimlicoActions,
31
31
  pimlicoActions
32
- } from "../clients/decorators/pimlico.js"
32
+ } from "../../clients/decorators/pimlico.js"
33
33
 
34
34
  export {
35
35
  type ValidateSponsorshipPolicies,
36
36
  type ValidateSponsorshipPoliciesParameters,
37
37
  validateSponsorshipPolicies
38
- } from "./pimlico/validateSponsorshipPolicies.js"
38
+ } from "./validateSponsorshipPolicies.js"