@account-kit/wallet-client 0.1.0-alpha.0 → 0.1.0-alpha.10

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 (264) hide show
  1. package/dist/esm/abi/index.d.ts +8 -8
  2. package/dist/esm/abi/index.js +8 -8
  3. package/dist/esm/abi/index.js.map +1 -1
  4. package/dist/esm/client/actions/createAccount.d.ts +27 -2
  5. package/dist/esm/client/actions/createAccount.js +25 -0
  6. package/dist/esm/client/actions/createAccount.js.map +1 -1
  7. package/dist/esm/client/actions/formatSign.d.ts +28 -0
  8. package/dist/esm/client/actions/formatSign.js +30 -0
  9. package/dist/esm/client/actions/formatSign.js.map +1 -0
  10. package/dist/esm/client/actions/getCallsStatus.d.ts +22 -4
  11. package/dist/esm/client/actions/getCallsStatus.js +19 -0
  12. package/dist/esm/client/actions/getCallsStatus.js.map +1 -1
  13. package/dist/esm/client/actions/grantPermissions.d.ts +63 -6
  14. package/dist/esm/client/actions/grantPermissions.js +63 -3
  15. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  16. package/dist/esm/client/actions/listAccounts.d.ts +32 -4
  17. package/dist/esm/client/actions/listAccounts.js +35 -2
  18. package/dist/esm/client/actions/listAccounts.js.map +1 -1
  19. package/dist/esm/client/actions/prepareCalls.d.ts +32 -6
  20. package/dist/esm/client/actions/prepareCalls.js +39 -5
  21. package/dist/esm/client/actions/prepareCalls.js.map +1 -1
  22. package/dist/esm/client/actions/prepareSign.d.ts +25 -0
  23. package/dist/esm/client/actions/prepareSign.js +28 -0
  24. package/dist/esm/client/actions/prepareSign.js.map +1 -0
  25. package/dist/esm/client/actions/requestAccount.d.ts +25 -7
  26. package/dist/esm/client/actions/requestAccount.js +39 -8
  27. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  28. package/dist/esm/client/actions/sendPreparedCalls.d.ts +33 -4
  29. package/dist/esm/client/actions/sendPreparedCalls.js +37 -1
  30. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
  31. package/dist/esm/client/actions/signMessage.d.ts +25 -5
  32. package/dist/esm/client/actions/signMessage.js +23 -3
  33. package/dist/esm/client/actions/signMessage.js.map +1 -1
  34. package/dist/esm/client/actions/signPreparedCalls.d.ts +14 -0
  35. package/dist/esm/client/actions/signPreparedCalls.js +43 -0
  36. package/dist/esm/client/actions/signPreparedCalls.js.map +1 -0
  37. package/dist/esm/client/actions/signSignatureRequest.d.ts +39 -5
  38. package/dist/esm/client/actions/signSignatureRequest.js +70 -12
  39. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  40. package/dist/esm/client/actions/signTypedData.d.ts +37 -4
  41. package/dist/esm/client/actions/signTypedData.js +35 -2
  42. package/dist/esm/client/actions/signTypedData.js.map +1 -1
  43. package/dist/esm/client/client.e2e-test.js +211 -46
  44. package/dist/esm/client/client.e2e-test.js.map +1 -1
  45. package/dist/esm/client/decorator.d.ts +19 -15
  46. package/dist/esm/client/decorator.js +13 -11
  47. package/dist/esm/client/decorator.js.map +1 -1
  48. package/dist/esm/client/index.d.ts +39 -13
  49. package/dist/esm/client/index.js +3 -6
  50. package/dist/esm/client/index.js.map +1 -1
  51. package/dist/esm/exports/index.d.ts +12 -13
  52. package/dist/esm/exports/index.js +12 -14
  53. package/dist/esm/exports/index.js.map +1 -1
  54. package/dist/esm/exports/internal.d.ts +4 -13
  55. package/dist/esm/exports/internal.js +2 -14
  56. package/dist/esm/exports/internal.js.map +1 -1
  57. package/dist/esm/internal/decorator.d.ts +2 -0
  58. package/dist/esm/internal/decorator.js +10 -0
  59. package/dist/esm/internal/decorator.js.map +1 -0
  60. package/dist/esm/isomorphic/actions/createSession.d.ts +2 -3
  61. package/dist/esm/isomorphic/actions/createSession.js +41 -12
  62. package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
  63. package/dist/esm/isomorphic/actions/formatSign.d.ts +8 -0
  64. package/dist/esm/isomorphic/actions/formatSign.js +42 -0
  65. package/dist/esm/isomorphic/actions/formatSign.js.map +1 -0
  66. package/dist/esm/isomorphic/actions/getCallsStatus.d.ts +1 -15
  67. package/dist/esm/isomorphic/actions/getCallsStatus.js +39 -28
  68. package/dist/esm/isomorphic/actions/getCallsStatus.js.map +1 -1
  69. package/dist/esm/isomorphic/actions/prepareCalls.d.ts +1 -2
  70. package/dist/esm/isomorphic/actions/prepareCalls.js +80 -22
  71. package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
  72. package/dist/esm/isomorphic/actions/prepareSign.d.ts +7 -0
  73. package/dist/esm/isomorphic/actions/prepareSign.js +49 -0
  74. package/dist/esm/isomorphic/actions/prepareSign.js.map +1 -0
  75. package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +3 -4
  76. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +138 -25
  77. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
  78. package/dist/esm/isomorphic/client.d.ts +209 -32
  79. package/dist/esm/isomorphic/client.js +10 -6
  80. package/dist/esm/isomorphic/client.js.map +1 -1
  81. package/dist/esm/isomorphic/utils/7702.d.ts +19 -0
  82. package/dist/esm/isomorphic/utils/7702.js +70 -0
  83. package/dist/esm/isomorphic/utils/7702.js.map +1 -0
  84. package/dist/esm/isomorphic/utils/createAccount.d.ts +5 -4
  85. package/dist/esm/isomorphic/utils/createAccount.js +85 -11
  86. package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
  87. package/dist/esm/isomorphic/utils/createDummySigner.js +3 -3
  88. package/dist/esm/isomorphic/utils/createDummySigner.js.map +1 -1
  89. package/dist/esm/isomorphic/utils/decodeSignature.d.ts +3 -0
  90. package/dist/esm/isomorphic/utils/decodeSignature.js +15 -0
  91. package/dist/esm/isomorphic/utils/decodeSignature.js.map +1 -0
  92. package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +6 -5
  93. package/dist/esm/isomorphic/utils/parsePermissionsContext.js +19 -6
  94. package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +1 -1
  95. package/dist/esm/isomorphic/utils/supportsFeature.d.ts +4 -0
  96. package/dist/esm/isomorphic/utils/supportsFeature.js +21 -0
  97. package/dist/esm/isomorphic/utils/supportsFeature.js.map +1 -0
  98. package/dist/esm/local/client.d.ts +3 -3
  99. package/dist/esm/local/client.js +14 -7
  100. package/dist/esm/local/client.js.map +1 -1
  101. package/dist/esm/remote/client.d.ts +9 -3
  102. package/dist/esm/remote/client.js +11 -12
  103. package/dist/esm/remote/client.js.map +1 -1
  104. package/dist/esm/types.d.ts +27 -13
  105. package/dist/esm/types.js.map +1 -1
  106. package/dist/esm/utils.d.ts +1 -0
  107. package/dist/esm/utils.js.map +1 -1
  108. package/dist/types/abi/index.d.ts +8 -8
  109. package/dist/types/abi/index.d.ts.map +1 -1
  110. package/dist/types/client/actions/createAccount.d.ts +27 -2
  111. package/dist/types/client/actions/createAccount.d.ts.map +1 -1
  112. package/dist/types/client/actions/formatSign.d.ts +29 -0
  113. package/dist/types/client/actions/formatSign.d.ts.map +1 -0
  114. package/dist/types/client/actions/getCallsStatus.d.ts +22 -4
  115. package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -1
  116. package/dist/types/client/actions/grantPermissions.d.ts +63 -6
  117. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  118. package/dist/types/client/actions/listAccounts.d.ts +32 -4
  119. package/dist/types/client/actions/listAccounts.d.ts.map +1 -1
  120. package/dist/types/client/actions/prepareCalls.d.ts +32 -6
  121. package/dist/types/client/actions/prepareCalls.d.ts.map +1 -1
  122. package/dist/types/client/actions/prepareSign.d.ts +26 -0
  123. package/dist/types/client/actions/prepareSign.d.ts.map +1 -0
  124. package/dist/types/client/actions/requestAccount.d.ts +25 -7
  125. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  126. package/dist/types/client/actions/sendPreparedCalls.d.ts +33 -4
  127. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
  128. package/dist/types/client/actions/signMessage.d.ts +25 -5
  129. package/dist/types/client/actions/signMessage.d.ts.map +1 -1
  130. package/dist/types/client/actions/signPreparedCalls.d.ts +15 -0
  131. package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -0
  132. package/dist/types/client/actions/signSignatureRequest.d.ts +39 -5
  133. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  134. package/dist/types/client/actions/signTypedData.d.ts +37 -4
  135. package/dist/types/client/actions/signTypedData.d.ts.map +1 -1
  136. package/dist/types/client/decorator.d.ts +19 -15
  137. package/dist/types/client/decorator.d.ts.map +1 -1
  138. package/dist/types/client/index.d.ts +39 -13
  139. package/dist/types/client/index.d.ts.map +1 -1
  140. package/dist/types/exports/index.d.ts +12 -13
  141. package/dist/types/exports/index.d.ts.map +1 -1
  142. package/dist/types/exports/internal.d.ts +4 -13
  143. package/dist/types/exports/internal.d.ts.map +1 -1
  144. package/dist/types/internal/decorator.d.ts +3 -0
  145. package/dist/types/internal/decorator.d.ts.map +1 -0
  146. package/dist/types/isomorphic/actions/createSession.d.ts +2 -3
  147. package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
  148. package/dist/types/isomorphic/actions/formatSign.d.ts +9 -0
  149. package/dist/types/isomorphic/actions/formatSign.d.ts.map +1 -0
  150. package/dist/types/isomorphic/actions/getCallsStatus.d.ts +1 -15
  151. package/dist/types/isomorphic/actions/getCallsStatus.d.ts.map +1 -1
  152. package/dist/types/isomorphic/actions/prepareCalls.d.ts +1 -2
  153. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
  154. package/dist/types/isomorphic/actions/prepareSign.d.ts +8 -0
  155. package/dist/types/isomorphic/actions/prepareSign.d.ts.map +1 -0
  156. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +3 -4
  157. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
  158. package/dist/types/isomorphic/client.d.ts +209 -32
  159. package/dist/types/isomorphic/client.d.ts.map +1 -1
  160. package/dist/types/isomorphic/utils/7702.d.ts +20 -0
  161. package/dist/types/isomorphic/utils/7702.d.ts.map +1 -0
  162. package/dist/types/isomorphic/utils/createAccount.d.ts +5 -4
  163. package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
  164. package/dist/types/isomorphic/utils/createDummySigner.d.ts.map +1 -1
  165. package/dist/types/isomorphic/utils/decodeSignature.d.ts +4 -0
  166. package/dist/types/isomorphic/utils/decodeSignature.d.ts.map +1 -0
  167. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts +6 -5
  168. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +1 -1
  169. package/dist/types/isomorphic/utils/supportsFeature.d.ts +5 -0
  170. package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +1 -0
  171. package/dist/types/local/client.d.ts +3 -3
  172. package/dist/types/local/client.d.ts.map +1 -1
  173. package/dist/types/remote/client.d.ts +9 -3
  174. package/dist/types/remote/client.d.ts.map +1 -1
  175. package/dist/types/types.d.ts +27 -13
  176. package/dist/types/types.d.ts.map +1 -1
  177. package/dist/types/utils.d.ts +1 -0
  178. package/dist/types/utils.d.ts.map +1 -1
  179. package/package.json +15 -7
  180. package/src/abi/index.ts +8 -8
  181. package/src/client/actions/createAccount.ts +27 -2
  182. package/src/client/actions/formatSign.ts +53 -0
  183. package/src/client/actions/getCallsStatus.ts +21 -12
  184. package/src/client/actions/grantPermissions.ts +69 -26
  185. package/src/client/actions/listAccounts.ts +44 -6
  186. package/src/client/actions/prepareCalls.ts +46 -26
  187. package/src/client/actions/prepareSign.ts +46 -0
  188. package/src/client/actions/requestAccount.ts +62 -43
  189. package/src/client/actions/sendPreparedCalls.ts +44 -7
  190. package/src/client/actions/signMessage.ts +27 -22
  191. package/src/client/actions/signPreparedCalls.ts +67 -0
  192. package/src/client/actions/signSignatureRequest.ts +85 -21
  193. package/src/client/actions/signTypedData.ts +41 -20
  194. package/src/client/client.e2e-test.ts +257 -55
  195. package/src/client/decorator.ts +41 -39
  196. package/src/client/index.ts +55 -42
  197. package/src/exports/index.ts +13 -21
  198. package/src/exports/internal.ts +5 -13
  199. package/src/internal/decorator.ts +12 -0
  200. package/src/isomorphic/actions/createSession.ts +65 -22
  201. package/src/isomorphic/actions/formatSign.ts +76 -0
  202. package/src/isomorphic/actions/getCallsStatus.ts +49 -35
  203. package/src/isomorphic/actions/prepareCalls.ts +97 -25
  204. package/src/isomorphic/actions/prepareSign.ts +91 -0
  205. package/src/isomorphic/actions/sendPreparedCalls.ts +181 -42
  206. package/src/isomorphic/client.ts +17 -6
  207. package/src/isomorphic/utils/7702.ts +135 -0
  208. package/src/isomorphic/utils/createAccount.ts +102 -14
  209. package/src/isomorphic/utils/createDummySigner.ts +3 -2
  210. package/src/isomorphic/utils/decodeSignature.ts +21 -0
  211. package/src/isomorphic/utils/parsePermissionsContext.ts +29 -11
  212. package/src/isomorphic/utils/supportsFeature.ts +34 -0
  213. package/src/local/client.ts +61 -58
  214. package/src/remote/client.ts +20 -20
  215. package/src/types.ts +29 -23
  216. package/src/utils.ts +2 -0
  217. package/dist/esm/capabilities/index.d.ts +0 -31
  218. package/dist/esm/capabilities/index.js +0 -10
  219. package/dist/esm/capabilities/index.js.map +0 -1
  220. package/dist/esm/capabilities/overrides.d.ts +0 -26
  221. package/dist/esm/capabilities/overrides.js +0 -14
  222. package/dist/esm/capabilities/overrides.js.map +0 -1
  223. package/dist/esm/capabilities/paymaster.d.ts +0 -3
  224. package/dist/esm/capabilities/paymaster.js +0 -5
  225. package/dist/esm/capabilities/paymaster.js.map +0 -1
  226. package/dist/esm/capabilities/permissions/index.d.ts +0 -138
  227. package/dist/esm/capabilities/permissions/index.js +0 -71
  228. package/dist/esm/capabilities/permissions/index.js.map +0 -1
  229. package/dist/esm/capabilities/permissions/mav2.d.ts +0 -36
  230. package/dist/esm/capabilities/permissions/mav2.js +0 -79
  231. package/dist/esm/capabilities/permissions/mav2.js.map +0 -1
  232. package/dist/esm/rpc/request.d.ts +0 -352
  233. package/dist/esm/rpc/request.js +0 -204
  234. package/dist/esm/rpc/request.js.map +0 -1
  235. package/dist/esm/rpc/schema.d.ts +0 -342
  236. package/dist/esm/rpc/schema.js +0 -5
  237. package/dist/esm/rpc/schema.js.map +0 -1
  238. package/dist/esm/schemas.d.ts +0 -216
  239. package/dist/esm/schemas.js +0 -211
  240. package/dist/esm/schemas.js.map +0 -1
  241. package/dist/types/capabilities/index.d.ts +0 -32
  242. package/dist/types/capabilities/index.d.ts.map +0 -1
  243. package/dist/types/capabilities/overrides.d.ts +0 -27
  244. package/dist/types/capabilities/overrides.d.ts.map +0 -1
  245. package/dist/types/capabilities/paymaster.d.ts +0 -4
  246. package/dist/types/capabilities/paymaster.d.ts.map +0 -1
  247. package/dist/types/capabilities/permissions/index.d.ts +0 -139
  248. package/dist/types/capabilities/permissions/index.d.ts.map +0 -1
  249. package/dist/types/capabilities/permissions/mav2.d.ts +0 -37
  250. package/dist/types/capabilities/permissions/mav2.d.ts.map +0 -1
  251. package/dist/types/rpc/request.d.ts +0 -353
  252. package/dist/types/rpc/request.d.ts.map +0 -1
  253. package/dist/types/rpc/schema.d.ts +0 -343
  254. package/dist/types/rpc/schema.d.ts.map +0 -1
  255. package/dist/types/schemas.d.ts +0 -217
  256. package/dist/types/schemas.d.ts.map +0 -1
  257. package/src/capabilities/index.ts +0 -13
  258. package/src/capabilities/overrides.ts +0 -20
  259. package/src/capabilities/paymaster.ts +0 -5
  260. package/src/capabilities/permissions/index.ts +0 -142
  261. package/src/capabilities/permissions/mav2.ts +0 -127
  262. package/src/rpc/request.ts +0 -273
  263. package/src/rpc/schema.ts +0 -40
  264. package/src/schemas.ts +0 -257
@@ -1,7 +1,27 @@
1
- import { type Address, type Hex, type JsonRpcAccount, type SignableMessage } from "viem";
2
- import type { InnerWalletApiClient } from "../../types";
3
- import type { SmartAccountSigner } from "@aa-sdk/core";
4
- export type SignMessageParams = SignableMessage;
1
+ import { type SmartAccountSigner } from "@aa-sdk/core";
2
+ import { type Address, type Hex, type SignableMessage } from "viem";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
+ export type SignMessageParams = {
5
+ message: SignableMessage;
6
+ account?: Address;
7
+ };
5
8
  export type SignMessageResult = Hex;
6
- export declare function signMessage<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params: SignMessageParams): Promise<SignMessageResult>;
9
+ /**
10
+ * Signs a message using the smart account.
11
+ * This method requests the account associated with the signer and uses it to sign the message.
12
+ *
13
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
14
+ * @param {SmartAccountSigner} signer - The signer of the smart account
15
+ * @param {SignableMessage} message - The message to sign
16
+ * @returns {Promise<SignMessageResult>} A Promise that resolves to the signed message as a hex string
17
+ *
18
+ * @example
19
+ * // Sign a simple text message
20
+ * const signature = await client.signMessage("Hello, world!");
21
+ *
22
+ * @example
23
+ * // Sign a raw hex message
24
+ * const signature = await client.signMessage({ raw: "0x48656c6c6f2c20776f726c6421" });
25
+ */
26
+ export declare function signMessage(client: InnerWalletApiClient, signer: SmartAccountSigner, params: SignMessageParams): Promise<SignMessageResult>;
7
27
  //# sourceMappingURL=signMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC,wBAAsB,WAAW,CAC/B,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,MAAM,MAAM,iBAAiB,GAAG;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAM5B"}
@@ -0,0 +1,15 @@
1
+ import type { PrepareCallsResult } from "./prepareCalls.ts";
2
+ import type { SmartAccountSigner } from "@aa-sdk/core";
3
+ import type { Static } from "@sinclair/typebox";
4
+ import { wallet_sendPreparedCalls } from "@alchemy/wallet-api-types/rpc";
5
+ export type SignPreparedCallsParams = PrepareCallsResult;
6
+ export type SignPreparedCallsResult = Static<(typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]>[0];
7
+ /**
8
+ * Signs prepared calls using the provided signer.
9
+ *
10
+ * @param {SmartAccountSigner} signer - The signer to use
11
+ * @param {SignPreparedCallsParams} params - The prepared calls with signature requests
12
+ * @returns {Promise<SignPreparedCallsResult>} A Promise that resolves to the signed calls
13
+ **/
14
+ export declare function signPreparedCalls(signer: SmartAccountSigner, params: SignPreparedCallsParams): Promise<SignPreparedCallsResult>;
15
+ //# sourceMappingURL=signPreparedCalls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAOzE,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CAAC;AAEL;;;;;;IAMI;AACJ,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAuClC"}
@@ -1,11 +1,45 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
- import type { Static } from "@sinclair/typebox";
3
2
  import { type Hex } from "viem";
4
- import { TypeSignatureRequest } from "../../schemas";
5
- export type SignSignatureRequestParams = Static<typeof TypeSignatureRequest>;
3
+ import { type TypePersonalSignSignatureRequest, type TypeTypedDataSignatureRequest, type TypeAuthorizationSignatureRequest, type TypeEip7702UnsignedAuth } from "@alchemy/wallet-api-types";
4
+ import type { WithoutRawPayload } from "../../types.ts";
5
+ export type SignSignatureRequestParams = WithoutRawPayload<TypePersonalSignSignatureRequest | TypeTypedDataSignatureRequest | (TypeAuthorizationSignatureRequest & {
6
+ data: TypeEip7702UnsignedAuth;
7
+ })>;
6
8
  export type SignSignatureRequestResult = {
7
- type: "ecdsa";
8
- signature: Hex;
9
+ type: "secp256k1";
10
+ data: Hex;
9
11
  };
12
+ /**
13
+ * Signs a signature request using the provided signer.
14
+ * This method handles different types of signature requests including personal_sign, eth_signTypedData_v4, and authorization.
15
+ *
16
+ * @param {SmartAccountSigner} signer - The signer to use for signing the request
17
+ * @param {SignSignatureRequestParams} params - The signature request parameters
18
+ * @param {string} params.type - The type of signature request ('personal_sign', 'eth_signTypedData_v4', or 'signature_with_authorization')
19
+ * @param {any} params.data - The data to sign, format depends on the signature type
20
+ * @returns {Promise<SignSignatureRequestResult>} A Promise that resolves to the signature result
21
+ * @returns {string} result.type - The signature type (currently only 'secp256k1' is supported)
22
+ * @returns {Hex} result.signature - The hex-encoded signature
23
+ * @returns {Eip7702ExtendedFields["eip7702Auth"]} result.signedAuthorization - The signed EIP-7702 authorization, if applicable
24
+ *
25
+ * @example
26
+ * // Sign a personal message
27
+ * const result = await client.signSignatureRequest({
28
+ * type: 'personal_sign',
29
+ * data: 'Hello, world!'
30
+ * });
31
+ *
32
+ * @example
33
+ * // Sign typed data (EIP-712)
34
+ * const result = await client.signSignatureRequest({
35
+ * type: 'eth_signTypedData_v4',
36
+ * data: {
37
+ * domain: { ... },
38
+ * types: { ... },
39
+ * primaryType: '...',
40
+ * message: { ... }
41
+ * }
42
+ * });
43
+ */
10
44
  export declare function signSignatureRequest(signer: SmartAccountSigner, params: SignSignatureRequestParams): Promise<SignSignatureRequestResult>;
11
45
  //# sourceMappingURL=signSignatureRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,EACL,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EACtC,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACtD,gCAAgC,GAChC,6BAA6B,GAC7B,CAAC,iCAAiC,GAAG;IACnC,IAAI,EAAE,uBAAuB,CAAC;CAC/B,CAAC,CACL,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAoCrC"}
@@ -1,7 +1,40 @@
1
- import { type Address, type Hex, type JsonRpcAccount, type TypedDataDefinition } from "viem";
2
- import type { InnerWalletApiClient } from "../../types";
3
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
4
- export type SignTypedDataParams = TypedDataDefinition;
2
+ import { type Address, type Hex, type TypedDataDefinition } from "viem";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
+ export type SignTypedDataParams = TypedDataDefinition & {
5
+ account?: Address;
6
+ };
5
7
  export type SignTypedDataResult = Hex;
6
- export declare function signTypedData<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params: SignTypedDataParams): Promise<SignTypedDataResult>;
8
+ /**
9
+ * Signs typed data (EIP-712) using the smart account.
10
+ * This method requests the account associated with the signer and uses it to sign the typed data.
11
+ *
12
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
13
+ * @param {SmartAccountSigner} signer - The signer of the smart account
14
+ * @param {TypedDataDefinition} params - The typed data to sign, following EIP-712 format
15
+ * @returns {Promise<SignTypedDataResult>} A Promise that resolves to the signature as a hex string
16
+ *
17
+ * @example
18
+ * // Sign typed data
19
+ * const signature = await client.signTypedData({
20
+ * domain: {
21
+ * name: 'Example DApp',
22
+ * version: '1',
23
+ * chainId: 1,
24
+ * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'
25
+ * },
26
+ * types: {
27
+ * Person: [
28
+ * { name: 'name', type: 'string' },
29
+ * { name: 'wallet', type: 'address' }
30
+ * ]
31
+ * },
32
+ * primaryType: 'Person',
33
+ * message: {
34
+ * name: 'John Doe',
35
+ * wallet: '0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa'
36
+ * }
37
+ * });
38
+ */
39
+ export declare function signTypedData(client: InnerWalletApiClient, signer: SmartAccountSigner, params: SignTypedDataParams): Promise<SignTypedDataResult>;
7
40
  //# sourceMappingURL=signTypedData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEtC,wBAAsB,aAAa,CACjC,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,mBAAmB,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAM9B"}
@@ -1,25 +1,29 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
- import type { Hex, JsonRpcAccount, SignableMessage, TypedDataDefinition } from "viem";
3
- import type { SendPreparedCallsParams, SendPreparedCallsResult } from "../isomorphic/actions/sendPreparedCalls";
4
- import type { InnerWalletApiClient } from "../types";
5
- import { type CreateAccountParams, type CreateAccountResult } from "./actions/createAccount";
6
- import { type ListAccountsParams, type ListAccountsResult } from "./actions/listAccounts";
7
- import { type PrepareCallsParams, type PrepareCallsResult } from "./actions/prepareCalls";
8
- import { type RequestAccountParams, type RequestAccountResult } from "./actions/requestAccount";
9
- import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus";
10
- import { type SignSignatureRequestParams, type SignSignatureRequestResult } from "./actions/signSignatureRequest";
11
- import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions";
12
- export type SmartWalletActions<TAccount extends JsonRpcAccount | undefined = JsonRpcAccount | undefined> = {
13
- requestAccount: (params?: RequestAccountParams<TAccount>) => Promise<RequestAccountResult>;
2
+ import type { Address, Hex } from "viem";
3
+ import type { InnerWalletApiClient } from "../types.ts";
4
+ import { type CreateAccountParams, type CreateAccountResult } from "./actions/createAccount.js";
5
+ import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus.js";
6
+ import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions.js";
7
+ import { type ListAccountsParams, type ListAccountsResult } from "./actions/listAccounts.js";
8
+ import { type PrepareCallsParams, type PrepareCallsResult } from "./actions/prepareCalls.js";
9
+ import { type RequestAccountParams, type RequestAccountResult } from "./actions/requestAccount.js";
10
+ import { type SendPreparedCallsParams, type SendPreparedCallsResult } from "./actions/sendPreparedCalls.js";
11
+ import { type SignMessageParams } from "./actions/signMessage.js";
12
+ import { type SignSignatureRequestParams, type SignSignatureRequestResult } from "./actions/signSignatureRequest.js";
13
+ import { type SignTypedDataParams } from "./actions/signTypedData.js";
14
+ import { type SignPreparedCallsParams, type SignPreparedCallsResult } from "./actions/signPreparedCalls.js";
15
+ export type SmartWalletActions<TAccount extends Address | undefined = Address | undefined> = {
16
+ requestAccount: (params?: RequestAccountParams) => Promise<RequestAccountResult>;
14
17
  prepareCalls: (params: PrepareCallsParams<TAccount>) => Promise<PrepareCallsResult>;
15
18
  sendPreparedCalls: (params: SendPreparedCallsParams) => Promise<SendPreparedCallsResult>;
16
19
  createAccount: (params: CreateAccountParams) => Promise<CreateAccountResult>;
17
20
  listAccounts: (params: ListAccountsParams) => Promise<ListAccountsResult>;
18
21
  getCallsStatus: (params: GetCallsStatusParams) => Promise<GetCallsStatusResult>;
19
22
  signSignatureRequest: (params: SignSignatureRequestParams) => Promise<SignSignatureRequestResult>;
20
- signMessage: (params: SignableMessage) => Promise<Hex>;
21
- signTypedData: (params: TypedDataDefinition) => Promise<Hex>;
23
+ signPreparedCalls: (params: SignPreparedCallsParams) => Promise<SignPreparedCallsResult>;
24
+ signMessage: (params: SignMessageParams) => Promise<Hex>;
25
+ signTypedData: (params: SignTypedDataParams) => Promise<Hex>;
22
26
  grantPermissions: (params: GrantPermissionsParams<TAccount>) => Promise<GrantPermissionsResult>;
23
27
  };
24
- export declare function smartWalletClientActions<TAccount extends JsonRpcAccount | undefined = JsonRpcAccount | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner): SmartWalletActions<TAccount>;
28
+ export declare function smartWalletClientActions<TAccount extends Address | undefined = Address | undefined>(client: InnerWalletApiClient, signer: SmartAccountSigner): SmartWalletActions<TAccount>;
25
29
  //# sourceMappingURL=decorator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/client/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EACV,GAAG,EACH,cAAc,EACd,eAAe,EACf,mBAA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,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,iBAAiB,EAAE,CACjB,MAAM,EAAE,uBAAuB,KAC5B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,WAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,aAAa,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,gBAAgB,EAAE,CAChB,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,KACrC,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EAE1D,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,GACzB,kBAAkB,CAAC,QAAQ,CAAC,CAc9B"}
@@ -1,19 +1,45 @@
1
- import { type SmartAccountSigner } from "@aa-sdk/core";
2
- import { type AlchemyTransport } from "@account-kit/infra";
3
- import { type Address, type Chain, type IsUndefined, type JsonRpcAccount, type Prettify } from "viem";
4
- import type { InnerWalletApiClient } from "../types";
5
- import { type SmartWalletActions } from "./decorator";
6
- export type SmartWalletClientParams<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = Prettify<{
1
+ import type { SmartAccountSigner } from "@aa-sdk/core";
2
+ import type { AlchemyTransport } from "@account-kit/infra";
3
+ import type { Address, Chain, Prettify } from "viem";
4
+ import type { InnerWalletApiClient } from "../types.ts";
5
+ import { type SmartWalletActions } from "./decorator.js";
6
+ export type SmartWalletClientParams<TAccount extends Address | undefined = Address | undefined> = Prettify<{
7
7
  transport: AlchemyTransport;
8
8
  chain: Chain;
9
9
  signer: SmartAccountSigner;
10
10
  mode: "local" | "remote";
11
11
  policyId?: string;
12
- } & (IsUndefined<TAccount> extends true ? {
13
- account?: never;
14
- } : {
15
- account: Address;
16
- })>;
17
- export declare function createSmartWalletClient<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(params: SmartWalletClientParams<TAccount>): InnerWalletApiClient<TAccount> & SmartWalletActions<TAccount>;
18
- export declare function createSmartWalletClient<TAccount extends JsonRpcAccount<Address> = JsonRpcAccount<Address>>(params: SmartWalletClientParams<TAccount>): InnerWalletApiClient<TAccount> & SmartWalletActions<TAccount>;
12
+ account?: TAccount | Address | undefined;
13
+ }>;
14
+ export type SmartWalletClient<TAccount extends Address | undefined = Address | undefined> = InnerWalletApiClient & SmartWalletActions<TAccount>;
15
+ /**
16
+ * Creates a smart wallet client that can be used to interact with a smart account.
17
+ *
18
+ * @param {SmartWalletClientParams} params - The parameters for creating the smart wallet client
19
+ * @param {AlchemyTransport} params.transport - The Alchemy transport to use
20
+ * @param {Chain} params.chain - The chain to use
21
+ * @param {SmartAccountSigner} params.signer - The signer to use for the smart account
22
+ * @param {"local" | "remote"} params.mode - The client's mode (local or remote).
23
+ * @param {string} [params.policyId] - The policy ID for gas sponsorship (optional)
24
+ * @param {Address} [params.account] - The smart account address to use (optional)
25
+ * @returns {SmartWalletClient} - A viem-compatible client
26
+ *
27
+ * @example
28
+ * import { LocalAccountSigner } from "@aa-sdk/core";
29
+ * import { alchemy, arbitrumSepolia } from "@account-kit/infra";
30
+ * import { generatePrivateKey } from "viem/accounts";
31
+ * import { createSmartWalletClient } from "@account-kit/wallet-client";
32
+ *
33
+ * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());
34
+ * const transport = alchemy({
35
+ * apiKey: "your-alchemy-api-key",
36
+ * });
37
+ * const client = createSmartWalletClient({
38
+ * transport,
39
+ * chain: arbitrumSepolia,
40
+ * mode: "remote",
41
+ * signer,
42
+ * });
43
+ */
44
+ export declare function createSmartWalletClient<TAccount extends Address | undefined = undefined>(params: SmartWalletClientParams<TAccount>): SmartWalletClient<TAccount>;
19
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1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14 +1,13 @@
1
- export { createSmartWalletClient, type SmartWalletClientParams, } from "../client";
2
- export { WalletServerRpcSchema, type WalletServerRpcSchemaType, type WalletServerViemRpcSchema, } from "../rpc/schema";
3
- export { Capabilities } from "../capabilities";
4
- export { PaymasterCapability } from "../capabilities/paymaster";
5
- export { PermissionsArray, PermissionsCapability, PermissionsContext, PermissionsData, } from "../capabilities/permissions";
6
- export { createAccount } from "../client/actions/createAccount";
7
- export { listAccounts } from "../client/actions/listAccounts";
8
- export { prepareCalls } from "../client/actions/prepareCalls";
9
- export { requestAccount } from "../client/actions/requestAccount";
10
- export { getCallsStatus } from "../client/actions/getCallsStatus";
11
- export { signSignatureRequest } from "../client/actions/signSignatureRequest";
12
- export { signMessage } from "../client/actions/signMessage";
13
- export { signTypedData } from "../client/actions/signTypedData";
1
+ export { createSmartWalletClient, type SmartWalletClient, type SmartWalletClientParams, } from "../client/index.js";
2
+ export { WalletServerRpcSchema, type WalletServerRpcSchemaType, } from "@alchemy/wallet-api-types/rpc";
3
+ export { createAccount } from "../client/actions/createAccount.js";
4
+ export { getCallsStatus } from "../client/actions/getCallsStatus.js";
5
+ export { grantPermissions } from "../client/actions/grantPermissions.js";
6
+ export { listAccounts } from "../client/actions/listAccounts.js";
7
+ export { prepareCalls } from "../client/actions/prepareCalls.js";
8
+ export { requestAccount } from "../client/actions/requestAccount.js";
9
+ export { signSignatureRequest } from "../client/actions/signSignatureRequest.js";
10
+ export { signPreparedCalls } from "../client/actions/signPreparedCalls.js";
11
+ export { signMessage } from "../client/actions/signMessage.js";
12
+ export { signTypedData } from "../client/actions/signTypedData.js";
14
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC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AE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,14 +1,5 @@
1
- export * from "../capabilities";
2
- export * from "../capabilities/paymaster";
3
- export * from "../capabilities/permissions";
4
- export * from "../capabilities/permissions/mav2";
5
- export type * from "../isomorphic/client";
6
- export { createIsomorphicClient } from "../isomorphic/client";
7
- export { createDummySigner } from "../isomorphic/utils/createDummySigner";
8
- export * from "../rpc/request";
9
- export * as RpcSchemas from "../rpc/request";
10
- export * from "../rpc/schema";
11
- export * from "../schemas";
12
- export type * from "../types";
13
- export * from "../utils";
1
+ export type * from "../isomorphic/client.js";
2
+ export { createIsomorphicClient } from "../isomorphic/client.js";
3
+ export { createDummySigner } from "../isomorphic/utils/createDummySigner.js";
4
+ export type * from "../types.ts";
14
5
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/exports/internal.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,mBAAmB,sBAAsB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,mBAAmB,UAAU,CAAC;AAC9B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/exports/internal.ts"],"names":[],"mappings":"AAGA,mBAAmB,yBAAyB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,mBAAmB,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { InternalState } from "../types.ts";
2
+ export declare function internalStateDecorator(): InternalState;
3
+ //# sourceMappingURL=decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/internal/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,wBAAgB,sBAAsB,IAAI,aAAa,CAStD"}
@@ -1,8 +1,7 @@
1
1
  import { type SmartAccountClient, type SmartContractAccount } from "@aa-sdk/core";
2
- import { type Chain, type Transport, type Hex } from "viem";
3
- import type { wallet_createSession } from "../../rpc/request";
4
- import type { WalletServerViemRpcSchema } from "../../rpc/schema";
5
2
  import type { Static } from "@sinclair/typebox";
3
+ import { type Chain, type Hex, type Transport } from "viem";
4
+ import type { wallet_createSession, WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
6
5
  export type CreateSessionParams = Omit<Static<(typeof wallet_createSession)["properties"]["Request"]["properties"]["params"]>[0], "chainId"> & {
7
6
  entityId?: Hex;
8
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,SAAS,EAGd,KAAK,GAAG,EAET,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB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CACpC,MAAM,CACJ,CAAC,OAAO,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC/E,CAAC,CAAC,CAAC,EACJ,SAAS,CACV,GAAG;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,MAAM,CAAC,CAAC,OAAO,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC,EACjE,WAAW,CACZ,GAAG;IACF,SAAS,EAAE,GAAG,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC;IACd,oCAAoC,EAAE,GAAG,CAAC;CAC3C,CAAC;AAEF,wBAAsB,aAAa,CACjC,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAoG9B"}
@@ -0,0 +1,9 @@
1
+ import type { Static } from "@sinclair/typebox";
2
+ import type { wallet_formatSign } from "@alchemy/wallet-api-types/rpc";
3
+ import type { SmartAccountClient, SmartContractAccount } from "@aa-sdk/core";
4
+ import { type Chain, type Transport } from "viem";
5
+ import type { WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
6
+ export type FormatSignParams = Static<(typeof wallet_formatSign)["properties"]["Request"]["properties"]["params"]>[0];
7
+ export type FormatSignResult = Static<(typeof wallet_formatSign)["properties"]["ReturnType"]>;
8
+ export declare function formatSign(client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, params: FormatSignParams): Promise<FormatSignResult>;
9
+ //# sourceMappingURL=formatSign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatSign.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/formatSign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAML,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAK/E,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACnC,CAAC,OAAO,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC5E,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACnC,CAAC,OAAO,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CACvD,CAAC;AAEF,wBAAsB,UAAU,CAC9B,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAyC3B"}
@@ -1,22 +1,8 @@
1
1
  import { type SmartAccountClient, type SmartContractAccount } from "@aa-sdk/core";
2
2
  import type { Static } from "@sinclair/typebox";
3
3
  import { type Chain, type Transport } from "viem";
4
- import type { wallet_getCallsStatus } from "../../rpc/request";
5
- import type { WalletServerViemRpcSchema } from "../../rpc/schema";
4
+ import { type wallet_getCallsStatus, type WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
6
5
  export type GetCallsStatusParams = Static<(typeof wallet_getCallsStatus)["properties"]["Request"]["properties"]["params"]>[0];
7
6
  export type GetCallsStatusResponse = Static<(typeof wallet_getCallsStatus)["properties"]["ReturnType"]>;
8
- /** EIP-5792 call status codes */
9
- export declare const CallStatusCode: {
10
- /** Batch has been received by the wallet but has not completed execution onchain */
11
- readonly PENDING: 100;
12
- /** Batch has been included onchain without reverts, receipts array contains info of all calls */
13
- readonly CONFIRMED: 200;
14
- /** Batch has not been included onchain and wallet will not retry */
15
- readonly OFFCHAIN_FAILURE: 400;
16
- /** Batch reverted *completely* and only changes related to gas charge may have been included onchain */
17
- readonly CHAIN_RULES_FAILURE: 500;
18
- /** Batch reverted *partially* and some changes related to batch calls may have been included onchain */
19
- readonly PARTIAL_CHAIN_RULES_FAILURE: 600;
20
- };
21
7
  export declare function getCallsStatus(client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, callId: GetCallsStatusParams): Promise<GetCallsStatusResponse>;
22
8
  //# sourceMappingURL=getCallsStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCallsStatus.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/getCallsStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAEL,KAAK,KAAK,EAGV,KAAK,SAAS,EAEf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAKlE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CACvC,CAAC,OAAO,qBAAqB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAChF,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,s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AS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CA2CjC"}
@@ -1,8 +1,7 @@
1
1
  import { type SmartAccountClient, type SmartContractAccount } from "@aa-sdk/core";
2
2
  import type { Static } from "@sinclair/typebox";
3
3
  import { type Chain, type Transport } from "viem";
4
- import type { wallet_prepareCalls } from "../../rpc/request";
5
- import type { WalletServerViemRpcSchema } from "../../rpc/schema";
4
+ import type { wallet_prepareCalls, WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
6
5
  export type PrepareCallsParams = Omit<Static<(typeof wallet_prepareCalls)["properties"]["Request"]["properties"]["params"]>[0], "chainId">;
7
6
  export type PrepareCallsResult = Static<(typeof wallet_prepareCalls)["properties"]["ReturnType"]>;
8
7
  export declare function prepareCalls(client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, params: PrepareCallsParams): Promise<PrepareCallsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"prepareCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/prepareCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAML,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAIlE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,MAAM,CACJ,CAAC,OAAO,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC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CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA4H7B"}
@@ -0,0 +1,8 @@
1
+ import type { Static } from "@sinclair/typebox";
2
+ import type { SmartAccountClient, SmartContractAccount } from "@aa-sdk/core";
3
+ import { type Chain, type Transport } from "viem";
4
+ import type { wallet_prepareSign, WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
5
+ export type PrepareSignParams = Static<(typeof wallet_prepareSign)["properties"]["Request"]["properties"]["params"]>[0];
6
+ export type PrepareSignResult = Static<(typeof wallet_prepareSign)["properties"]["ReturnType"]>;
7
+ export declare function prepareSign(client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, params: PrepareSignParams): Promise<PrepareSignResult>;
8
+ //# sourceMappingURL=prepareSign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareSign.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/prepareSign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAEV,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AASvC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CACpC,CAAC,OAAO,kBAAkB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC7E,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG,MAAM,CACpC,CAAC,OAAO,kBAAkB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CACxD,CAAC;AAEF,wBAAsB,WAAW,CAC/B,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAgD5B"}
@@ -1,9 +1,8 @@
1
1
  import { type SmartAccountClient, type SmartContractAccount } from "@aa-sdk/core";
2
- import type { Static, StaticDecode } from "@sinclair/typebox";
3
2
  import { type Chain, type Transport } from "viem";
4
- import type { wallet_sendPreparedCalls } from "../../rpc/request";
5
- import type { WalletServerViemRpcSchema } from "../../rpc/schema";
6
- export type SendPreparedCallsParams = Omit<StaticDecode<(typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]>[0], "chainId">;
3
+ import type { wallet_sendPreparedCalls, WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
4
+ import type { Static } from "@sinclair/typebox";
5
+ export type SendPreparedCallsParams = Static<(typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]>[0];
7
6
  export type SendPreparedCallsResult = Static<(typeof wallet_sendPreparedCalls)["properties"]["ReturnType"]>;
8
7
  export declare function sendPreparedCalls(client: SmartAccountClient<Transport, Chain, SmartContractAccount | undefined, Record<string, unknown>, WalletServerViemRpcSchema>, params: SendPreparedCallsParams): Promise<SendPreparedCallsResult>;
9
8
  //# sourceMappingURL=sendPreparedCalls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAKL,KAAK,KAAK,EAEV,KAAK,SAAS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