permissionless 0.2.14 → 0.2.16

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 (279) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/_cjs/accounts/biconomy/toBiconomySmartAccount.js +11 -11
  3. package/_cjs/accounts/biconomy/toBiconomySmartAccount.js.map +1 -1
  4. package/_cjs/accounts/index.js +16 -16
  5. package/_cjs/accounts/index.js.map +1 -1
  6. package/_cjs/accounts/kernel/toEcdsaKernelSmartAccount.js +30 -30
  7. package/_cjs/accounts/kernel/toEcdsaKernelSmartAccount.js.map +1 -1
  8. package/_cjs/accounts/kernel/utils/encodeCallData.js +7 -7
  9. package/_cjs/accounts/kernel/utils/encodeCallData.js.map +1 -1
  10. package/_cjs/accounts/kernel/utils/getNonceKey.js +5 -5
  11. package/_cjs/accounts/kernel/utils/getNonceKey.js.map +1 -1
  12. package/_cjs/accounts/kernel/utils/signMessage.js +4 -4
  13. package/_cjs/accounts/kernel/utils/signMessage.js.map +1 -1
  14. package/_cjs/accounts/kernel/utils/signTypedData.js +4 -4
  15. package/_cjs/accounts/kernel/utils/signTypedData.js.map +1 -1
  16. package/_cjs/accounts/light/toLightSmartAccount.js +6 -6
  17. package/_cjs/accounts/light/toLightSmartAccount.js.map +1 -1
  18. package/_cjs/accounts/nexus/toNexusSmartAccount.js +6 -6
  19. package/_cjs/accounts/nexus/toNexusSmartAccount.js.map +1 -1
  20. package/_cjs/accounts/safe/toSafeSmartAccount.js +9 -8
  21. package/_cjs/accounts/safe/toSafeSmartAccount.js.map +1 -1
  22. package/_cjs/accounts/simple/toSimpleSmartAccount.js +6 -6
  23. package/_cjs/accounts/simple/toSimpleSmartAccount.js.map +1 -1
  24. package/_cjs/accounts/thirdweb/toThirdwebSmartAccount.js +14 -14
  25. package/_cjs/accounts/thirdweb/toThirdwebSmartAccount.js.map +1 -1
  26. package/_cjs/accounts/trust/toTrustSmartAccount.js +10 -10
  27. package/_cjs/accounts/trust/toTrustSmartAccount.js.map +1 -1
  28. package/_cjs/actions/erc7579/accountId.js +2 -2
  29. package/_cjs/actions/erc7579/accountId.js.map +1 -1
  30. package/_cjs/actions/erc7579/installModule.js +4 -4
  31. package/_cjs/actions/erc7579/installModule.js.map +1 -1
  32. package/_cjs/actions/erc7579/installModules.js +4 -4
  33. package/_cjs/actions/erc7579/installModules.js.map +1 -1
  34. package/_cjs/actions/erc7579/isModuleInstalled.js +5 -5
  35. package/_cjs/actions/erc7579/isModuleInstalled.js.map +1 -1
  36. package/_cjs/actions/erc7579/supportsExecutionMode.js +2 -2
  37. package/_cjs/actions/erc7579/supportsExecutionMode.js.map +1 -1
  38. package/_cjs/actions/erc7579/supportsModule.js +2 -2
  39. package/_cjs/actions/erc7579/supportsModule.js.map +1 -1
  40. package/_cjs/actions/erc7579/uninstallModule.js +4 -4
  41. package/_cjs/actions/erc7579/uninstallModule.js.map +1 -1
  42. package/_cjs/actions/erc7579/uninstallModules.js +4 -4
  43. package/_cjs/actions/erc7579/uninstallModules.js.map +1 -1
  44. package/_cjs/actions/erc7579.js +24 -24
  45. package/_cjs/actions/erc7579.js.map +1 -1
  46. package/_cjs/actions/index.js +5 -5
  47. package/_cjs/actions/index.js.map +1 -1
  48. package/_cjs/actions/pimlico/sponsorUserOperation.js +3 -3
  49. package/_cjs/actions/pimlico/sponsorUserOperation.js.map +1 -1
  50. package/_cjs/actions/pimlico/validateSponsorshipPolicies.js +2 -2
  51. package/_cjs/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
  52. package/_cjs/actions/pimlico.js +14 -14
  53. package/_cjs/actions/pimlico.js.map +1 -1
  54. package/_cjs/actions/public/getSenderAddress.js +30 -137
  55. package/_cjs/actions/public/getSenderAddress.js.map +1 -1
  56. package/_cjs/actions/smartAccount/sendTransaction.js +2 -2
  57. package/_cjs/actions/smartAccount/sendTransaction.js.map +1 -1
  58. package/_cjs/actions/smartAccount/signMessage.js +2 -2
  59. package/_cjs/actions/smartAccount/signMessage.js.map +1 -1
  60. package/_cjs/actions/smartAccount/signTypedData.js +2 -2
  61. package/_cjs/actions/smartAccount/signTypedData.js.map +1 -1
  62. package/_cjs/actions/smartAccount/writeContract.js +2 -2
  63. package/_cjs/actions/smartAccount/writeContract.js.map +1 -1
  64. package/_cjs/actions/smartAccount.js +8 -8
  65. package/_cjs/actions/smartAccount.js.map +1 -1
  66. package/_cjs/clients/createSmartAccountClient.js +3 -3
  67. package/_cjs/clients/createSmartAccountClient.js.map +1 -1
  68. package/_cjs/clients/decorators/pimlico.js +10 -10
  69. package/_cjs/clients/decorators/pimlico.js.map +1 -1
  70. package/_cjs/clients/decorators/smartAccount.js +11 -11
  71. package/_cjs/clients/decorators/smartAccount.js.map +1 -1
  72. package/_cjs/clients/index.js.map +1 -1
  73. package/_cjs/clients/pimlico.js +2 -2
  74. package/_cjs/clients/pimlico.js.map +1 -1
  75. package/_cjs/experimental/pimlico/index.js +2 -2
  76. package/_cjs/experimental/pimlico/index.js.map +1 -1
  77. package/_cjs/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js +6 -5
  78. package/_cjs/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js.map +1 -1
  79. package/_cjs/index.js.map +1 -1
  80. package/_cjs/utils/encode7579Calls.js +3 -3
  81. package/_cjs/utils/encode7579Calls.js.map +1 -1
  82. package/_cjs/utils/encodeInstallModule.js +4 -4
  83. package/_cjs/utils/encodeInstallModule.js.map +1 -1
  84. package/_cjs/utils/encodeUninstallModule.js +4 -4
  85. package/_cjs/utils/encodeUninstallModule.js.map +1 -1
  86. package/_cjs/utils/index.js +25 -25
  87. package/_cjs/utils/index.js.map +1 -1
  88. package/_cjs/utils/toOwner.js.map +1 -1
  89. package/_esm/accounts/biconomy/toBiconomySmartAccount.js.map +1 -1
  90. package/_esm/accounts/index.js.map +1 -1
  91. package/_esm/accounts/kernel/toEcdsaKernelSmartAccount.js.map +1 -1
  92. package/_esm/accounts/kernel/utils/encodeCallData.js.map +1 -1
  93. package/_esm/accounts/kernel/utils/getNonceKey.js.map +1 -1
  94. package/_esm/accounts/kernel/utils/signMessage.js.map +1 -1
  95. package/_esm/accounts/kernel/utils/signTypedData.js.map +1 -1
  96. package/_esm/accounts/light/toLightSmartAccount.js.map +1 -1
  97. package/_esm/accounts/nexus/toNexusSmartAccount.js +1 -1
  98. package/_esm/accounts/nexus/toNexusSmartAccount.js.map +1 -1
  99. package/_esm/accounts/safe/toSafeSmartAccount.js +2 -1
  100. package/_esm/accounts/safe/toSafeSmartAccount.js.map +1 -1
  101. package/_esm/accounts/simple/toSimpleSmartAccount.js.map +1 -1
  102. package/_esm/accounts/thirdweb/toThirdwebSmartAccount.js.map +1 -1
  103. package/_esm/accounts/trust/toTrustSmartAccount.js.map +1 -1
  104. package/_esm/actions/erc7579/accountId.js.map +1 -1
  105. package/_esm/actions/erc7579/installModule.js +1 -1
  106. package/_esm/actions/erc7579/installModule.js.map +1 -1
  107. package/_esm/actions/erc7579/installModules.js.map +1 -1
  108. package/_esm/actions/erc7579/isModuleInstalled.js.map +1 -1
  109. package/_esm/actions/erc7579/supportsExecutionMode.js.map +1 -1
  110. package/_esm/actions/erc7579/supportsModule.js.map +1 -1
  111. package/_esm/actions/erc7579/uninstallModule.js.map +1 -1
  112. package/_esm/actions/erc7579/uninstallModules.js.map +1 -1
  113. package/_esm/actions/erc7579.js.map +1 -1
  114. package/_esm/actions/index.js.map +1 -1
  115. package/_esm/actions/pimlico/sponsorUserOperation.js.map +1 -1
  116. package/_esm/actions/pimlico/validateSponsorshipPolicies.js.map +1 -1
  117. package/_esm/actions/pimlico.js.map +1 -1
  118. package/_esm/actions/public/getSenderAddress.js +33 -142
  119. package/_esm/actions/public/getSenderAddress.js.map +1 -1
  120. package/_esm/actions/smartAccount/sendTransaction.js.map +1 -1
  121. package/_esm/actions/smartAccount/signMessage.js.map +1 -1
  122. package/_esm/actions/smartAccount/signTypedData.js.map +1 -1
  123. package/_esm/actions/smartAccount/writeContract.js.map +1 -1
  124. package/_esm/actions/smartAccount.js.map +1 -1
  125. package/_esm/clients/createSmartAccountClient.js +2 -2
  126. package/_esm/clients/createSmartAccountClient.js.map +1 -1
  127. package/_esm/clients/decorators/pimlico.js.map +1 -1
  128. package/_esm/clients/decorators/smartAccount.js +3 -3
  129. package/_esm/clients/decorators/smartAccount.js.map +1 -1
  130. package/_esm/clients/index.js.map +1 -1
  131. package/_esm/clients/pimlico.js.map +1 -1
  132. package/_esm/experimental/pimlico/index.js.map +1 -1
  133. package/_esm/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js +2 -1
  134. package/_esm/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.js.map +1 -1
  135. package/_esm/index.js.map +1 -1
  136. package/_esm/utils/encode7579Calls.js.map +1 -1
  137. package/_esm/utils/encodeInstallModule.js.map +1 -1
  138. package/_esm/utils/encodeUninstallModule.js.map +1 -1
  139. package/_esm/utils/index.js.map +1 -1
  140. package/_esm/utils/toOwner.js.map +1 -1
  141. package/_types/accounts/biconomy/toBiconomySmartAccount.d.ts +3 -2
  142. package/_types/accounts/biconomy/toBiconomySmartAccount.d.ts.map +1 -1
  143. package/_types/accounts/index.d.ts +8 -8
  144. package/_types/accounts/index.d.ts.map +1 -1
  145. package/_types/accounts/kernel/toEcdsaKernelSmartAccount.d.ts +3 -2
  146. package/_types/accounts/kernel/toEcdsaKernelSmartAccount.d.ts.map +1 -1
  147. package/_types/accounts/kernel/utils/encodeCallData.d.ts +1 -1
  148. package/_types/accounts/kernel/utils/encodeCallData.d.ts.map +1 -1
  149. package/_types/accounts/kernel/utils/getNonceKey.d.ts +1 -1
  150. package/_types/accounts/kernel/utils/getNonceKey.d.ts.map +1 -1
  151. package/_types/accounts/kernel/utils/isKernelV2.d.ts +1 -1
  152. package/_types/accounts/kernel/utils/isKernelV2.d.ts.map +1 -1
  153. package/_types/accounts/kernel/utils/signMessage.d.ts +1 -1
  154. package/_types/accounts/kernel/utils/signMessage.d.ts.map +1 -1
  155. package/_types/accounts/kernel/utils/signTypedData.d.ts +1 -1
  156. package/_types/accounts/kernel/utils/signTypedData.d.ts.map +1 -1
  157. package/_types/accounts/kernel/utils/wrapMessageHash.d.ts +1 -1
  158. package/_types/accounts/kernel/utils/wrapMessageHash.d.ts.map +1 -1
  159. package/_types/accounts/light/toLightSmartAccount.d.ts +3 -2
  160. package/_types/accounts/light/toLightSmartAccount.d.ts.map +1 -1
  161. package/_types/accounts/nexus/toNexusSmartAccount.d.ts +3 -2
  162. package/_types/accounts/nexus/toNexusSmartAccount.d.ts.map +1 -1
  163. package/_types/accounts/safe/toSafeSmartAccount.d.ts +3 -2
  164. package/_types/accounts/safe/toSafeSmartAccount.d.ts.map +1 -1
  165. package/_types/accounts/simple/toSimpleSmartAccount.d.ts +3 -2
  166. package/_types/accounts/simple/toSimpleSmartAccount.d.ts.map +1 -1
  167. package/_types/accounts/thirdweb/toThirdwebSmartAccount.d.ts +3 -2
  168. package/_types/accounts/thirdweb/toThirdwebSmartAccount.d.ts.map +1 -1
  169. package/_types/accounts/trust/toTrustSmartAccount.d.ts +3 -2
  170. package/_types/accounts/trust/toTrustSmartAccount.d.ts.map +1 -1
  171. package/_types/actions/erc7579/installModule.d.ts +1 -1
  172. package/_types/actions/erc7579/installModule.d.ts.map +1 -1
  173. package/_types/actions/erc7579/installModules.d.ts +1 -1
  174. package/_types/actions/erc7579/installModules.d.ts.map +1 -1
  175. package/_types/actions/erc7579/isModuleInstalled.d.ts +1 -1
  176. package/_types/actions/erc7579/isModuleInstalled.d.ts.map +1 -1
  177. package/_types/actions/erc7579/uninstallModule.d.ts +1 -1
  178. package/_types/actions/erc7579/uninstallModule.d.ts.map +1 -1
  179. package/_types/actions/erc7579/uninstallModules.d.ts +1 -1
  180. package/_types/actions/erc7579/uninstallModules.d.ts.map +1 -1
  181. package/_types/actions/erc7579.d.ts +10 -10
  182. package/_types/actions/erc7579.d.ts.map +1 -1
  183. package/_types/actions/index.d.ts +4 -4
  184. package/_types/actions/index.d.ts.map +1 -1
  185. package/_types/actions/pimlico/getTokenQuotes.d.ts +1 -1
  186. package/_types/actions/pimlico/getTokenQuotes.d.ts.map +1 -1
  187. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts +1 -1
  188. package/_types/actions/pimlico/getUserOperationGasPrice.d.ts.map +1 -1
  189. package/_types/actions/pimlico/getUserOperationStatus.d.ts +1 -1
  190. package/_types/actions/pimlico/getUserOperationStatus.d.ts.map +1 -1
  191. package/_types/actions/pimlico/sendCompressedUserOperation.d.ts +1 -1
  192. package/_types/actions/pimlico/sendCompressedUserOperation.d.ts.map +1 -1
  193. package/_types/actions/pimlico/sponsorUserOperation.d.ts +1 -1
  194. package/_types/actions/pimlico/sponsorUserOperation.d.ts.map +1 -1
  195. package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts +1 -1
  196. package/_types/actions/pimlico/validateSponsorshipPolicies.d.ts.map +1 -1
  197. package/_types/actions/pimlico.d.ts +8 -8
  198. package/_types/actions/pimlico.d.ts.map +1 -1
  199. package/_types/actions/public/getSenderAddress.d.ts.map +1 -1
  200. package/_types/actions/smartAccount.d.ts +4 -4
  201. package/_types/actions/smartAccount.d.ts.map +1 -1
  202. package/_types/clients/createSmartAccountClient.d.ts +1 -1
  203. package/_types/clients/createSmartAccountClient.d.ts.map +1 -1
  204. package/_types/clients/decorators/pimlico.d.ts +4 -4
  205. package/_types/clients/decorators/pimlico.d.ts.map +1 -1
  206. package/_types/clients/decorators/smartAccount.d.ts +5 -51
  207. package/_types/clients/decorators/smartAccount.d.ts.map +1 -1
  208. package/_types/clients/index.d.ts +2 -2
  209. package/_types/clients/index.d.ts.map +1 -1
  210. package/_types/clients/pimlico.d.ts +2 -2
  211. package/_types/clients/pimlico.d.ts.map +1 -1
  212. package/_types/experimental/pimlico/index.d.ts +1 -1
  213. package/_types/experimental/pimlico/index.d.ts.map +1 -1
  214. package/_types/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.d.ts.map +1 -1
  215. package/_types/index.d.ts +3 -3
  216. package/_types/index.d.ts.map +1 -1
  217. package/_types/utils/encode7579Calls.d.ts +1 -1
  218. package/_types/utils/encode7579Calls.d.ts.map +1 -1
  219. package/_types/utils/encodeInstallModule.d.ts +1 -1
  220. package/_types/utils/encodeInstallModule.d.ts.map +1 -1
  221. package/_types/utils/encodeUninstallModule.d.ts +1 -1
  222. package/_types/utils/encodeUninstallModule.d.ts.map +1 -1
  223. package/_types/utils/index.d.ts +12 -12
  224. package/_types/utils/index.d.ts.map +1 -1
  225. package/_types/utils/toOwner.d.ts +6 -3
  226. package/_types/utils/toOwner.d.ts.map +1 -1
  227. package/accounts/biconomy/toBiconomySmartAccount.ts +4 -5
  228. package/accounts/index.ts +8 -8
  229. package/accounts/kernel/toEcdsaKernelSmartAccount.ts +16 -14
  230. package/accounts/kernel/utils/encodeCallData.ts +4 -4
  231. package/accounts/kernel/utils/getNonceKey.ts +3 -3
  232. package/accounts/kernel/utils/isKernelV2.ts +1 -1
  233. package/accounts/kernel/utils/signMessage.ts +5 -2
  234. package/accounts/kernel/utils/signTypedData.ts +5 -2
  235. package/accounts/kernel/utils/wrapMessageHash.ts +1 -1
  236. package/accounts/light/toLightSmartAccount.ts +4 -5
  237. package/accounts/nexus/toNexusSmartAccount.ts +4 -5
  238. package/accounts/safe/toSafeSmartAccount.ts +5 -5
  239. package/accounts/simple/toSimpleSmartAccount.ts +4 -5
  240. package/accounts/thirdweb/toThirdwebSmartAccount.ts +8 -9
  241. package/accounts/trust/toTrustSmartAccount.ts +6 -7
  242. package/actions/erc7579/accountId.ts +1 -1
  243. package/actions/erc7579/installModule.ts +3 -3
  244. package/actions/erc7579/installModules.ts +2 -2
  245. package/actions/erc7579/isModuleInstalled.ts +2 -2
  246. package/actions/erc7579/supportsExecutionMode.ts +1 -1
  247. package/actions/erc7579/supportsModule.ts +1 -1
  248. package/actions/erc7579/uninstallModule.ts +3 -3
  249. package/actions/erc7579/uninstallModules.ts +2 -2
  250. package/actions/erc7579.ts +13 -10
  251. package/actions/index.ts +4 -4
  252. package/actions/pimlico/getTokenQuotes.ts +1 -1
  253. package/actions/pimlico/getUserOperationGasPrice.ts +1 -1
  254. package/actions/pimlico/getUserOperationStatus.ts +1 -1
  255. package/actions/pimlico/sendCompressedUserOperation.ts +1 -1
  256. package/actions/pimlico/sponsorUserOperation.ts +2 -2
  257. package/actions/pimlico/validateSponsorshipPolicies.ts +2 -2
  258. package/actions/pimlico.ts +8 -8
  259. package/actions/public/getSenderAddress.test.ts +1 -1
  260. package/actions/public/getSenderAddress.ts +42 -186
  261. package/actions/smartAccount/sendTransaction.ts +1 -1
  262. package/actions/smartAccount/signMessage.ts +1 -1
  263. package/actions/smartAccount/signTypedData.ts +1 -1
  264. package/actions/smartAccount/writeContract.ts +1 -1
  265. package/actions/smartAccount.ts +4 -4
  266. package/clients/createSmartAccountClient.ts +3 -3
  267. package/clients/decorators/pimlico.ts +4 -4
  268. package/clients/decorators/smartAccount.ts +12 -14
  269. package/clients/index.ts +2 -2
  270. package/clients/pimlico.ts +2 -2
  271. package/experimental/pimlico/index.ts +1 -1
  272. package/experimental/pimlico/utils/prepareUserOperationForErc20Paymaster.ts +3 -2
  273. package/index.ts +3 -3
  274. package/package.json +1 -1
  275. package/utils/encode7579Calls.ts +1 -1
  276. package/utils/encodeInstallModule.ts +2 -2
  277. package/utils/encodeUninstallModule.ts +2 -2
  278. package/utils/index.ts +15 -12
  279. package/utils/toOwner.ts +7 -12
@@ -4,7 +4,6 @@ import type {
4
4
  Assign,
5
5
  Chain,
6
6
  Client,
7
- EIP1193Provider,
8
7
  LocalAccount,
9
8
  OneOf,
10
9
  Transport,
@@ -12,7 +11,7 @@ import type {
12
11
  WalletClient
13
12
  } from "viem"
14
13
  import { getChainId } from "viem/actions"
15
- import { getAccountNonce } from "../../actions/public/getAccountNonce"
14
+ import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
16
15
 
17
16
  import {
18
17
  type SmartAccount,
@@ -25,12 +24,12 @@ import {
25
24
  toSmartAccount
26
25
  } from "viem/account-abstraction"
27
26
  import { getAction, toHex } from "viem/utils"
28
- import { toOwner } from "../../utils/toOwner"
29
- import { encodeCallData } from "./utils/encodeCallData"
30
- import { getAccountAddress } from "./utils/getAccountAddress"
31
- import { getFactoryData } from "./utils/getFactoryData"
32
- import { signMessage } from "./utils/signMessage"
33
- import { signTypedData } from "./utils/signTypedData"
27
+ import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
28
+ import { encodeCallData } from "./utils/encodeCallData.js"
29
+ import { getAccountAddress } from "./utils/getAccountAddress.js"
30
+ import { getFactoryData } from "./utils/getFactoryData.js"
31
+ import { signMessage } from "./utils/signMessage.js"
32
+ import { signTypedData } from "./utils/signTypedData.js"
34
33
 
35
34
  /**
36
35
  * Default addresses for Thirdweb Smart Account
@@ -49,7 +48,7 @@ export type ToThirdwebSmartAccountParameters<
49
48
  > = {
50
49
  client: Client
51
50
  owner: OneOf<
52
- | EIP1193Provider
51
+ | EthereumProvider
53
52
  | WalletClient<Transport, Chain | undefined, Account>
54
53
  | LocalAccount
55
54
  >
@@ -4,7 +4,6 @@ import {
4
4
  type Assign,
5
5
  type Chain,
6
6
  type Client,
7
- type EIP1193Provider,
8
7
  type Hex,
9
8
  type LocalAccount,
10
9
  type OneOf,
@@ -14,7 +13,7 @@ import {
14
13
  hashTypedData
15
14
  } from "viem"
16
15
  import { getChainId, signMessage } from "viem/actions"
17
- import { getAccountNonce } from "../../actions/public/getAccountNonce"
16
+ import { getAccountNonce } from "../../actions/public/getAccountNonce.js"
18
17
 
19
18
  import {
20
19
  type SmartAccount,
@@ -26,10 +25,10 @@ import {
26
25
  toSmartAccount
27
26
  } from "viem/account-abstraction"
28
27
  import { getAction } from "viem/utils"
29
- import { getSenderAddress } from "../../actions/public/getSenderAddress"
30
- import { toOwner } from "../../utils/toOwner"
31
- import { encodeCallData } from "./utils/encodeCallData"
32
- import { getFactoryData } from "./utils/getFactoryData"
28
+ import { getSenderAddress } from "../../actions/public/getSenderAddress.js"
29
+ import { type EthereumProvider, toOwner } from "../../utils/toOwner.js"
30
+ import { encodeCallData } from "./utils/encodeCallData.js"
31
+ import { getFactoryData } from "./utils/getFactoryData.js"
33
32
 
34
33
  async function _signTypedData(
35
34
  signer: LocalAccount,
@@ -69,7 +68,7 @@ export const TRUST_ADDRESSES: {
69
68
  export type ToTrustSmartAccountParameters = {
70
69
  client: Client
71
70
  owner: OneOf<
72
- | EIP1193Provider
71
+ | EthereumProvider
73
72
  | WalletClient<Transport, Chain | undefined, Account>
74
73
  | LocalAccount
75
74
  >
@@ -12,7 +12,7 @@ import type {
12
12
  } from "viem/account-abstraction"
13
13
  import { call, readContract } from "viem/actions"
14
14
  import { getAction } from "viem/utils"
15
- import { AccountNotFoundError } from "../../errors"
15
+ import { AccountNotFoundError } from "../../errors/index.js"
16
16
 
17
17
  export async function accountId<TSmartAccount extends SmartAccount | undefined>(
18
18
  client: Client<Transport, Chain | undefined, TSmartAccount>,
@@ -7,9 +7,9 @@ import {
7
7
  sendUserOperation
8
8
  } from "viem/account-abstraction"
9
9
  import { getAction, parseAccount } from "viem/utils"
10
- import { AccountNotFoundError } from "../../errors"
11
- import { encodeInstallModule } from "../../utils"
12
- import type { ModuleType } from "./supportsModule"
10
+ import { AccountNotFoundError } from "../../errors/index.js"
11
+ import { encodeInstallModule } from "../../utils/encodeInstallModule.js"
12
+ import type { ModuleType } from "./supportsModule.js"
13
13
 
14
14
  export type InstallModuleParameters<
15
15
  TSmartAccount extends SmartAccount | undefined,
@@ -6,11 +6,11 @@ import {
6
6
  sendUserOperation
7
7
  } from "viem/account-abstraction"
8
8
  import { getAction, parseAccount } from "viem/utils"
9
- import { AccountNotFoundError } from "../../errors"
9
+ import { AccountNotFoundError } from "../../errors/index.js"
10
10
  import {
11
11
  type EncodeInstallModuleParameters,
12
12
  encodeInstallModule
13
- } from "../../utils/encodeInstallModule"
13
+ } from "../../utils/encodeInstallModule.js"
14
14
 
15
15
  export type InstallModulesParameters<
16
16
  TSmartAccount extends SmartAccount | undefined,
@@ -16,8 +16,8 @@ import type {
16
16
  } from "viem/account-abstraction"
17
17
  import { call, readContract } from "viem/actions"
18
18
  import { getAction, parseAccount } from "viem/utils"
19
- import { AccountNotFoundError } from "../../errors"
20
- import { type ModuleType, parseModuleTypeId } from "./supportsModule"
19
+ import { AccountNotFoundError } from "../../errors/index.js"
20
+ import { type ModuleType, parseModuleTypeId } from "./supportsModule.js"
21
21
 
22
22
  export type IsModuleInstalledParameters<
23
23
  TSmartAccount extends SmartAccount | undefined
@@ -17,7 +17,7 @@ import type {
17
17
  import { call, readContract } from "viem/actions"
18
18
  import { getAction } from "viem/utils"
19
19
  import { parseAccount } from "viem/utils"
20
- import { AccountNotFoundError } from "../../errors"
20
+ import { AccountNotFoundError } from "../../errors/index.js"
21
21
 
22
22
  export type CallType = "call" | "delegatecall" | "batchcall"
23
23
 
@@ -13,7 +13,7 @@ import type {
13
13
  import { call, readContract } from "viem/actions"
14
14
  import { getAction } from "viem/utils"
15
15
  import { parseAccount } from "viem/utils"
16
- import { AccountNotFoundError } from "../../errors"
16
+ import { AccountNotFoundError } from "../../errors/index.js"
17
17
 
18
18
  export type ModuleType = "validator" | "executor" | "fallback" | "hook"
19
19
 
@@ -16,9 +16,9 @@ import {
16
16
  } from "viem/account-abstraction"
17
17
  import { getAction } from "viem/utils"
18
18
  import { parseAccount } from "viem/utils"
19
- import { AccountNotFoundError } from "../../errors"
20
- import { encodeUninstallModule } from "../../utils/encodeUninstallModule"
21
- import type { ModuleType } from "./supportsModule"
19
+ import { AccountNotFoundError } from "../../errors/index.js"
20
+ import { encodeUninstallModule } from "../../utils/encodeUninstallModule.js"
21
+ import type { ModuleType } from "./supportsModule.js"
22
22
 
23
23
  export type UninstallModuleParameters<
24
24
  TSmartAccount extends SmartAccount | undefined,
@@ -7,11 +7,11 @@ import {
7
7
  } from "viem/account-abstraction"
8
8
  import { getAction } from "viem/utils"
9
9
  import { parseAccount } from "viem/utils"
10
- import { AccountNotFoundError } from "../../errors"
10
+ import { AccountNotFoundError } from "../../errors/index.js"
11
11
  import {
12
12
  type EncodeUninstallModuleParameters,
13
13
  encodeUninstallModule
14
- } from "../../utils/encodeUninstallModule"
14
+ } from "../../utils/encodeUninstallModule.js"
15
15
 
16
16
  export type UninstallModulesParameters<
17
17
  TSmartAccount extends SmartAccount | undefined,
@@ -3,37 +3,40 @@ import type {
3
3
  GetSmartAccountParameter,
4
4
  SmartAccount
5
5
  } from "viem/account-abstraction"
6
- import { accountId } from "./erc7579/accountId"
6
+ import { accountId } from "./erc7579/accountId.js"
7
7
  import {
8
8
  type InstallModuleParameters,
9
9
  installModule
10
- } from "./erc7579/installModule"
10
+ } from "./erc7579/installModule.js"
11
11
  import {
12
12
  type InstallModulesParameters,
13
13
  installModules
14
- } from "./erc7579/installModules"
14
+ } from "./erc7579/installModules.js"
15
15
  import {
16
16
  type IsModuleInstalledParameters,
17
17
  isModuleInstalled
18
- } from "./erc7579/isModuleInstalled"
18
+ } from "./erc7579/isModuleInstalled.js"
19
19
  import {
20
20
  type SupportsExecutionModeParameters,
21
21
  supportsExecutionMode
22
- } from "./erc7579/supportsExecutionMode"
23
- import type { CallType, ExecutionMode } from "./erc7579/supportsExecutionMode"
22
+ } from "./erc7579/supportsExecutionMode.js"
23
+ import type {
24
+ CallType,
25
+ ExecutionMode
26
+ } from "./erc7579/supportsExecutionMode.js"
24
27
  import {
25
28
  type SupportsModuleParameters,
26
29
  supportsModule
27
- } from "./erc7579/supportsModule"
28
- import type { ModuleType } from "./erc7579/supportsModule"
30
+ } from "./erc7579/supportsModule.js"
31
+ import type { ModuleType } from "./erc7579/supportsModule.js"
29
32
  import {
30
33
  type UninstallModuleParameters,
31
34
  uninstallModule
32
- } from "./erc7579/uninstallModule"
35
+ } from "./erc7579/uninstallModule.js"
33
36
  import {
34
37
  type UninstallModulesParameters,
35
38
  uninstallModules
36
- } from "./erc7579/uninstallModules"
39
+ } from "./erc7579/uninstallModules.js"
37
40
 
38
41
  export type Erc7579Actions<TSmartAccount extends SmartAccount | undefined> = {
39
42
  accountId: (
package/actions/index.ts CHANGED
@@ -1,11 +1,11 @@
1
- import type { GetSenderAddressParams } from "./public/getSenderAddress"
1
+ import type { GetSenderAddressParams } from "./public/getSenderAddress.js"
2
2
  import {
3
3
  InvalidEntryPointError,
4
4
  getSenderAddress
5
- } from "./public/getSenderAddress"
5
+ } from "./public/getSenderAddress.js"
6
6
 
7
- import type { GetAccountNonceParams } from "./public/getAccountNonce"
8
- import { getAccountNonce } from "./public/getAccountNonce"
7
+ import type { GetAccountNonceParams } from "./public/getAccountNonce.js"
8
+ import { getAccountNonce } from "./public/getAccountNonce.js"
9
9
 
10
10
  export type { GetSenderAddressParams, GetAccountNonceParams }
11
11
 
@@ -9,7 +9,7 @@ import {
9
9
  hexToBigInt,
10
10
  numberToHex
11
11
  } from "viem"
12
- import type { PimlicoRpcSchema } from "../../types/pimlico"
12
+ import type { PimlicoRpcSchema } from "../../types/pimlico.js"
13
13
 
14
14
  export type GetTokenQuotesParameters<
15
15
  TChain extends Chain | undefined,
@@ -1,5 +1,5 @@
1
1
  import type { Account, Chain, Client, Transport } from "viem"
2
- import type { PimlicoRpcSchema } from "../../types/pimlico"
2
+ import type { PimlicoRpcSchema } from "../../types/pimlico.js"
3
3
 
4
4
  export type GetUserOperationGasPriceReturnType = {
5
5
  slow: {
@@ -2,7 +2,7 @@ import type { Account, Chain, Client, Hash, Transport } from "viem"
2
2
  import type {
3
3
  PimlicoRpcSchema,
4
4
  PimlicoUserOperationStatus
5
- } from "../../types/pimlico"
5
+ } from "../../types/pimlico.js"
6
6
 
7
7
  export type GetUserOperationStatusParameters = {
8
8
  hash: Hash
@@ -7,7 +7,7 @@ import type {
7
7
  Hex,
8
8
  Transport
9
9
  } from "viem"
10
- import type { PimlicoRpcSchema } from "../../types/pimlico"
10
+ import type { PimlicoRpcSchema } from "../../types/pimlico.js"
11
11
 
12
12
  export type SendCompressedUserOperationParameters = {
13
13
  compressedUserOperation: Hex
@@ -9,8 +9,8 @@ import type {
9
9
  Transport
10
10
  } from "viem"
11
11
  import type { UserOperation } from "viem/account-abstraction"
12
- import type { PimlicoRpcSchema } from "../../types/pimlico"
13
- import { deepHexlify } from "../../utils/deepHexlify"
12
+ import type { PimlicoRpcSchema } from "../../types/pimlico.js"
13
+ import { deepHexlify } from "../../utils/deepHexlify.js"
14
14
 
15
15
  export type PimlicoSponsorUserOperationParameters<
16
16
  entryPointVersion extends "0.6" | "0.7"
@@ -1,7 +1,7 @@
1
1
  import type { Account, Address, Chain, Client, Transport } from "viem"
2
2
  import type { UserOperation } from "viem/account-abstraction"
3
- import type { PimlicoRpcSchema } from "../../types/pimlico"
4
- import { deepHexlify } from "../../utils/deepHexlify"
3
+ import type { PimlicoRpcSchema } from "../../types/pimlico.js"
4
+ import { deepHexlify } from "../../utils/deepHexlify.js"
5
5
 
6
6
  export type ValidateSponsorshipPoliciesParameters = {
7
7
  userOperation: UserOperation
@@ -2,34 +2,34 @@ import {
2
2
  type GetTokenQuotesParameters,
3
3
  type GetTokenQuotesReturnType,
4
4
  getTokenQuotes
5
- } from "./pimlico/getTokenQuotes"
5
+ } from "./pimlico/getTokenQuotes.js"
6
6
  import {
7
7
  type GetUserOperationGasPriceReturnType,
8
8
  getUserOperationGasPrice
9
- } from "./pimlico/getUserOperationGasPrice"
9
+ } from "./pimlico/getUserOperationGasPrice.js"
10
10
  import {
11
11
  type GetUserOperationStatusParameters,
12
12
  type GetUserOperationStatusReturnType,
13
13
  getUserOperationStatus
14
- } from "./pimlico/getUserOperationStatus"
14
+ } from "./pimlico/getUserOperationStatus.js"
15
15
  import {
16
16
  type SendCompressedUserOperationParameters,
17
17
  sendCompressedUserOperation
18
- } from "./pimlico/sendCompressedUserOperation"
18
+ } from "./pimlico/sendCompressedUserOperation.js"
19
19
  import {
20
20
  type PimlicoSponsorUserOperationParameters,
21
21
  type SponsorUserOperationReturnType,
22
22
  sponsorUserOperation
23
- } from "./pimlico/sponsorUserOperation"
23
+ } from "./pimlico/sponsorUserOperation.js"
24
24
 
25
- import type { PimlicoActions } from "../clients/decorators/pimlico"
26
- import { pimlicoActions } from "../clients/decorators/pimlico"
25
+ import type { PimlicoActions } from "../clients/decorators/pimlico.js"
26
+ import { pimlicoActions } from "../clients/decorators/pimlico.js"
27
27
 
28
28
  import {
29
29
  type ValidateSponsorshipPolicies,
30
30
  type ValidateSponsorshipPoliciesParameters,
31
31
  validateSponsorshipPolicies
32
- } from "./pimlico/validateSponsorshipPolicies"
32
+ } from "./pimlico/validateSponsorshipPolicies.js"
33
33
 
34
34
  export type {
35
35
  GetUserOperationGasPriceReturnType,
@@ -78,7 +78,7 @@ describe("getSenderAddress", () => {
78
78
  entryPointAddress: "0x0000000000000000000000000000000000000000",
79
79
  initCode: concatHex([factory, factoryData])
80
80
  })
81
- ).rejects.toThrowError(/not a valid entry point/)
81
+ ).rejects.toThrowError()
82
82
  })
83
83
  testWithRpc("getSenderAddress_V07", async ({ rpc }) => {
84
84
  const { anvilRpc, altoRpc } = rpc
@@ -2,22 +2,40 @@ import {
2
2
  type Address,
3
3
  BaseError,
4
4
  type Client,
5
- type ContractFunctionExecutionErrorType,
6
- ContractFunctionRevertedError,
7
5
  type Hex,
8
- InvalidInputRpcError,
9
6
  type OneOf,
10
7
  type Prettify,
11
- RawContractError,
12
- RpcRequestError,
13
- UnknownRpcError,
14
8
  concat,
15
- decodeErrorResult
9
+ encodeDeployData,
10
+ getAddress
16
11
  } from "viem"
17
12
 
18
- import { simulateContract } from "viem/actions"
13
+ import { call } from "viem/actions"
19
14
  import { getAction } from "viem/utils"
20
15
 
16
+ // https://github.com/pimlicolabs/entrypoint-estimations/blob/main/src/GetSenderAddressHelper.sol
17
+ const GetSenderAddressHelperByteCode =
18
+ "0x608060405260405161058a38038061058a83398181016040528101906100259190610341565b5f808373ffffffffffffffffffffffffffffffffffffffff16639b249f6960e01b8460405160240161005791906103ed565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516100c19190610447565b5f604051808303815f865af19150503d805f81146100fa576040519150601f19603f3d011682016040523d82523d5f602084013e6100ff565b606091505b50915091505f8261015f576004825111156101245760248201519050805f526014600cf35b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610156906104dd565b60405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101919061056b565b60405180910390fd5b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101d4826101ab565b9050919050565b6101e4816101ca565b81146101ee575f80fd5b50565b5f815190506101ff816101db565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6102538261020d565b810181811067ffffffffffffffff821117156102725761027161021d565b5b80604052505050565b5f61028461019a565b9050610290828261024a565b919050565b5f67ffffffffffffffff8211156102af576102ae61021d565b5b6102b88261020d565b9050602081019050919050565b8281835e5f83830152505050565b5f6102e56102e084610295565b61027b565b90508281526020810184848401111561030157610300610209565b5b61030c8482856102c5565b509392505050565b5f82601f83011261032857610327610205565b5b81516103388482602086016102d3565b91505092915050565b5f8060408385031215610357576103566101a3565b5b5f610364858286016101f1565b925050602083015167ffffffffffffffff811115610385576103846101a7565b5b61039185828601610314565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f6103bf8261039b565b6103c981856103a5565b93506103d98185602086016102c5565b6103e28161020d565b840191505092915050565b5f6020820190508181035f83015261040581846103b5565b905092915050565b5f81905092915050565b5f6104218261039b565b61042b818561040d565b935061043b8185602086016102c5565b80840191505092915050565b5f6104528284610417565b915081905092915050565b5f82825260208201905092915050565b7f67657453656e64657241646472657373206661696c656420776974686f7574205f8201527f6461746100000000000000000000000000000000000000000000000000000000602082015250565b5f6104c760248361045d565b91506104d28261046d565b604082019050919050565b5f6020820190508181035f8301526104f4816104bb565b9050919050565b7f67657453656e6465724164647265737320646964206e6f7420726576657274205f8201527f6173206578706563746564000000000000000000000000000000000000000000602082015250565b5f610555602b8361045d565b9150610560826104fb565b604082019050919050565b5f6020820190508181035f83015261058281610549565b905091905056fe"
19
+
20
+ const GetSenderAddressHelperAbi = [
21
+ {
22
+ inputs: [
23
+ {
24
+ internalType: "address",
25
+ name: "_entryPoint",
26
+ type: "address"
27
+ },
28
+ {
29
+ internalType: "bytes",
30
+ name: "initCode",
31
+ type: "bytes"
32
+ }
33
+ ],
34
+ stateMutability: "payable",
35
+ type: "constructor"
36
+ }
37
+ ]
38
+
21
39
  export type GetSenderAddressParams = OneOf<
22
40
  | {
23
41
  initCode: Hex
@@ -88,186 +106,24 @@ export const getSenderAddress = async (
88
106
  )
89
107
  }
90
108
 
91
- try {
92
- await getAction(
93
- client,
94
- simulateContract,
95
- "simulateContract"
96
- )({
97
- address: entryPointAddress,
98
- abi: [
99
- {
100
- inputs: [
101
- {
102
- internalType: "address",
103
- name: "sender",
104
- type: "address"
105
- }
106
- ],
107
- name: "SenderAddressResult",
108
- type: "error"
109
- },
110
- {
111
- inputs: [
112
- {
113
- internalType: "bytes",
114
- name: "initCode",
115
- type: "bytes"
116
- }
117
- ],
118
- name: "getSenderAddress",
119
- outputs: [],
120
- stateMutability: "nonpayable",
121
- type: "function"
122
- }
123
- ],
124
- functionName: "getSenderAddress",
125
- args: [initCode || concat([factory as Hex, factoryData as Hex])]
109
+ const formattedInitCode =
110
+ initCode || concat([factory as Hex, factoryData as Hex])
111
+
112
+ const { data } = await getAction(
113
+ client,
114
+ call,
115
+ "call"
116
+ )({
117
+ data: encodeDeployData({
118
+ abi: GetSenderAddressHelperAbi,
119
+ bytecode: GetSenderAddressHelperByteCode,
120
+ args: [entryPointAddress, formattedInitCode]
126
121
  })
127
- } catch (e) {
128
- const revertError = (e as ContractFunctionExecutionErrorType).walk(
129
- (err) =>
130
- err instanceof ContractFunctionRevertedError ||
131
- err instanceof RpcRequestError ||
132
- err instanceof InvalidInputRpcError ||
133
- err instanceof UnknownRpcError
134
- )
135
-
136
- if (!revertError) {
137
- const cause = (e as ContractFunctionExecutionErrorType).cause as any
138
- const errorName = cause?.data?.errorName ?? ""
139
- if (
140
- errorName === "SenderAddressResult" &&
141
- cause?.data?.args &&
142
- cause?.data?.args[0]
143
- ) {
144
- return cause.data?.args[0] as Address
145
- }
146
- }
147
-
148
- if (revertError instanceof ContractFunctionRevertedError) {
149
- const errorName = revertError.data?.errorName ?? ""
150
- if (
151
- errorName === "SenderAddressResult" &&
152
- revertError.data?.args &&
153
- revertError.data?.args[0]
154
- ) {
155
- return revertError.data?.args[0] as Address
156
- }
157
- }
158
-
159
- if (revertError instanceof RpcRequestError) {
160
- const hexStringRegex = /0x[a-fA-F0-9]+/
161
- // biome-ignore lint/suspicious/noExplicitAny:
162
- const match = (revertError as unknown as any).cause.data.match(
163
- hexStringRegex
164
- )
165
-
166
- if (!match) {
167
- throw new Error(
168
- "Failed to parse revert bytes from RPC response"
169
- )
170
- }
171
-
172
- const data: Hex = match[0]
173
-
174
- const error = decodeErrorResult({
175
- abi: [
176
- {
177
- inputs: [
178
- {
179
- internalType: "address",
180
- name: "sender",
181
- type: "address"
182
- }
183
- ],
184
- name: "SenderAddressResult",
185
- type: "error"
186
- }
187
- ],
188
- data
189
- })
190
-
191
- return error.args[0] as Address
192
- }
193
-
194
- if (revertError instanceof InvalidInputRpcError) {
195
- const { data: data_ } = (
196
- e instanceof RawContractError
197
- ? e
198
- : e instanceof BaseError
199
- ? e.walk((err) => "data" in (err as Error)) || e.walk()
200
- : {}
201
- ) as RawContractError
202
-
203
- const data = typeof data_ === "string" ? data_ : data_?.data
204
-
205
- if (data === undefined) {
206
- throw new Error(
207
- "Failed to parse revert bytes from RPC response"
208
- )
209
- }
210
-
211
- const error = decodeErrorResult({
212
- abi: [
213
- {
214
- inputs: [
215
- {
216
- internalType: "address",
217
- name: "sender",
218
- type: "address"
219
- }
220
- ],
221
- name: "SenderAddressResult",
222
- type: "error"
223
- }
224
- ],
225
- data
226
- })
227
-
228
- return error.args[0] as Address
229
- }
230
-
231
- if (revertError instanceof UnknownRpcError) {
232
- const parsedBody = JSON.parse(
233
- // biome-ignore lint/suspicious/noExplicitAny:
234
- (revertError as unknown as any).cause.body
235
- )
236
- const revertData = parsedBody.error.data
237
-
238
- const hexStringRegex = /0x[a-fA-F0-9]+/
239
- const match = revertData.match(hexStringRegex)
240
-
241
- if (!match) {
242
- throw new Error(
243
- "Failed to parse revert bytes from RPC response"
244
- )
245
- }
246
-
247
- const data: Hex = match[0]
248
-
249
- const error = decodeErrorResult({
250
- abi: [
251
- {
252
- inputs: [
253
- {
254
- internalType: "address",
255
- name: "sender",
256
- type: "address"
257
- }
258
- ],
259
- name: "SenderAddressResult",
260
- type: "error"
261
- }
262
- ],
263
- data
264
- })
265
-
266
- return error.args[0] as Address
267
- }
122
+ })
268
123
 
269
- throw e
124
+ if (!data) {
125
+ throw new Error("Failed to get sender address")
270
126
  }
271
127
 
272
- throw new InvalidEntryPointError({ entryPointAddress })
128
+ return getAddress(data)
273
129
  }
@@ -12,7 +12,7 @@ import {
12
12
  waitForUserOperationReceipt
13
13
  } from "viem/account-abstraction"
14
14
  import { getAction, parseAccount } from "viem/utils"
15
- import { AccountNotFoundError } from "../../errors"
15
+ import { AccountNotFoundError } from "../../errors/index.js"
16
16
 
17
17
  /**
18
18
  * Creates, signs, and sends a new transaction to the network.
@@ -7,7 +7,7 @@ import type {
7
7
  } from "viem"
8
8
  import type { SmartAccount } from "viem/account-abstraction"
9
9
  import { parseAccount } from "viem/utils"
10
- import { AccountNotFoundError } from "../../errors"
10
+ import { AccountNotFoundError } from "../../errors/index.js"
11
11
 
12
12
  /**
13
13
  * Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
@@ -12,7 +12,7 @@ import {
12
12
  } from "viem"
13
13
  import type { SmartAccount } from "viem/account-abstraction"
14
14
  import { parseAccount } from "viem/utils"
15
- import { AccountNotFoundError } from "../../errors"
15
+ import { AccountNotFoundError } from "../../errors/index.js"
16
16
 
17
17
  /**
18
18
  * Signs typed data and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`