@account-kit/wallet-client 0.1.0-alpha.9 → 4.50.1

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 (276) hide show
  1. package/LICENSE +21 -0
  2. package/dist/esm/client/actions/formatSign.d.ts +30 -0
  3. package/dist/esm/client/actions/formatSign.js +32 -0
  4. package/dist/esm/client/actions/formatSign.js.map +1 -0
  5. package/dist/esm/client/actions/getCallsStatus.d.ts +6 -3
  6. package/dist/esm/client/actions/getCallsStatus.js +3 -0
  7. package/dist/esm/client/actions/getCallsStatus.js.map +1 -1
  8. package/dist/esm/client/actions/grantPermissions.d.ts +10 -11
  9. package/dist/esm/client/actions/grantPermissions.js +26 -12
  10. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  11. package/dist/esm/client/actions/listAccounts.d.ts +10 -3
  12. package/dist/esm/client/actions/listAccounts.js +14 -2
  13. package/dist/esm/client/actions/listAccounts.js.map +1 -1
  14. package/dist/esm/client/actions/prepareCalls.d.ts +6 -3
  15. package/dist/esm/client/actions/prepareCalls.js +12 -8
  16. package/dist/esm/client/actions/prepareCalls.js.map +1 -1
  17. package/dist/esm/client/actions/prepareSign.d.ts +28 -0
  18. package/dist/esm/client/actions/prepareSign.js +31 -0
  19. package/dist/esm/client/actions/prepareSign.js.map +1 -0
  20. package/dist/esm/client/actions/requestAccount.d.ts +3 -1
  21. package/dist/esm/client/actions/requestAccount.js +5 -3
  22. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  23. package/dist/esm/client/actions/sendPreparedCalls.d.ts +3 -1
  24. package/dist/esm/client/actions/sendPreparedCalls.js +2 -0
  25. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
  26. package/dist/esm/client/actions/signMessage.d.ts +5 -2
  27. package/dist/esm/client/actions/signMessage.js +5 -2
  28. package/dist/esm/client/actions/signMessage.js.map +1 -1
  29. package/dist/esm/client/actions/signPreparedCalls.d.ts +2 -2
  30. package/dist/esm/client/actions/signPreparedCalls.js +3 -3
  31. package/dist/esm/client/actions/signPreparedCalls.js.map +1 -1
  32. package/dist/esm/client/actions/signSignatureRequest.d.ts +6 -10
  33. package/dist/esm/client/actions/signSignatureRequest.js +4 -7
  34. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  35. package/dist/esm/client/actions/signTypedData.d.ts +2 -0
  36. package/dist/esm/client/actions/signTypedData.js +2 -0
  37. package/dist/esm/client/actions/signTypedData.js.map +1 -1
  38. package/dist/esm/client/decorator.d.ts +0 -2
  39. package/dist/esm/client/decorator.js +1 -3
  40. package/dist/esm/client/decorator.js.map +1 -1
  41. package/dist/esm/client/index.d.ts +10 -6
  42. package/dist/esm/client/index.js +18 -21
  43. package/dist/esm/client/index.js.map +1 -1
  44. package/dist/esm/exports/index.d.ts +1 -5
  45. package/dist/esm/exports/index.js +1 -6
  46. package/dist/esm/exports/index.js.map +1 -1
  47. package/dist/esm/internal/account.d.ts +33 -0
  48. package/dist/esm/{isomorphic/utils/createAccount.js → internal/account.js} +25 -49
  49. package/dist/esm/internal/account.js.map +1 -0
  50. package/dist/esm/types.d.ts +5 -11
  51. package/dist/esm/types.js.map +1 -1
  52. package/dist/esm/utils.d.ts +13 -1
  53. package/dist/esm/utils.js +13 -1
  54. package/dist/esm/utils.js.map +1 -1
  55. package/dist/esm/version.d.ts +1 -0
  56. package/dist/esm/version.js +4 -0
  57. package/dist/esm/version.js.map +1 -0
  58. package/dist/types/client/actions/formatSign.d.ts +31 -0
  59. package/dist/types/client/actions/formatSign.d.ts.map +1 -0
  60. package/dist/types/client/actions/getCallsStatus.d.ts +6 -3
  61. package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -1
  62. package/dist/types/client/actions/grantPermissions.d.ts +10 -11
  63. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  64. package/dist/types/client/actions/listAccounts.d.ts +10 -3
  65. package/dist/types/client/actions/listAccounts.d.ts.map +1 -1
  66. package/dist/types/client/actions/prepareCalls.d.ts +6 -3
  67. package/dist/types/client/actions/prepareCalls.d.ts.map +1 -1
  68. package/dist/types/client/actions/prepareSign.d.ts +29 -0
  69. package/dist/types/client/actions/prepareSign.d.ts.map +1 -0
  70. package/dist/types/client/actions/requestAccount.d.ts +3 -1
  71. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  72. package/dist/types/client/actions/sendPreparedCalls.d.ts +3 -1
  73. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
  74. package/dist/types/client/actions/signMessage.d.ts +5 -2
  75. package/dist/types/client/actions/signMessage.d.ts.map +1 -1
  76. package/dist/types/client/actions/signPreparedCalls.d.ts +2 -2
  77. package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -1
  78. package/dist/types/client/actions/signSignatureRequest.d.ts +6 -10
  79. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  80. package/dist/types/client/actions/signTypedData.d.ts +2 -0
  81. package/dist/types/client/actions/signTypedData.d.ts.map +1 -1
  82. package/dist/types/client/decorator.d.ts +0 -2
  83. package/dist/types/client/decorator.d.ts.map +1 -1
  84. package/dist/types/client/index.d.ts +10 -6
  85. package/dist/types/client/index.d.ts.map +1 -1
  86. package/dist/types/exports/index.d.ts +1 -5
  87. package/dist/types/exports/index.d.ts.map +1 -1
  88. package/dist/types/internal/account.d.ts +34 -0
  89. package/dist/types/internal/account.d.ts.map +1 -0
  90. package/dist/types/types.d.ts +5 -11
  91. package/dist/types/types.d.ts.map +1 -1
  92. package/dist/types/utils.d.ts +13 -1
  93. package/dist/types/utils.d.ts.map +1 -1
  94. package/dist/types/version.d.ts +2 -0
  95. package/dist/types/version.d.ts.map +1 -0
  96. package/package.json +32 -28
  97. package/src/client/actions/formatSign.ts +55 -0
  98. package/src/client/actions/getCallsStatus.ts +10 -6
  99. package/src/client/actions/grantPermissions.ts +46 -18
  100. package/src/client/actions/listAccounts.ts +22 -5
  101. package/src/client/actions/prepareCalls.ts +22 -16
  102. package/src/client/actions/prepareSign.ts +51 -0
  103. package/src/client/actions/requestAccount.ts +6 -4
  104. package/src/client/actions/sendPreparedCalls.ts +3 -1
  105. package/src/client/actions/signMessage.ts +5 -2
  106. package/src/client/actions/signPreparedCalls.ts +8 -12
  107. package/src/client/actions/signSignatureRequest.ts +12 -15
  108. package/src/client/actions/signTypedData.ts +2 -0
  109. package/src/client/decorator.ts +1 -8
  110. package/src/client/index.ts +41 -33
  111. package/src/exports/index.ts +1 -13
  112. package/src/internal/account.ts +120 -0
  113. package/src/types.ts +7 -18
  114. package/src/utils.ts +13 -1
  115. package/src/version.ts +3 -0
  116. package/dist/esm/capabilities/eip7702Auth.d.ts +0 -4
  117. package/dist/esm/capabilities/eip7702Auth.js +0 -18
  118. package/dist/esm/capabilities/eip7702Auth.js.map +0 -1
  119. package/dist/esm/capabilities/index.d.ts +0 -41
  120. package/dist/esm/capabilities/index.js +0 -14
  121. package/dist/esm/capabilities/index.js.map +0 -1
  122. package/dist/esm/capabilities/multiDimensionalNonce.d.ts +0 -3
  123. package/dist/esm/capabilities/multiDimensionalNonce.js +0 -7
  124. package/dist/esm/capabilities/multiDimensionalNonce.js.map +0 -1
  125. package/dist/esm/capabilities/overrides.d.ts +0 -26
  126. package/dist/esm/capabilities/overrides.js +0 -14
  127. package/dist/esm/capabilities/overrides.js.map +0 -1
  128. package/dist/esm/capabilities/paymaster.d.ts +0 -3
  129. package/dist/esm/capabilities/paymaster.js +0 -5
  130. package/dist/esm/capabilities/paymaster.js.map +0 -1
  131. package/dist/esm/capabilities/permissions/index.d.ts +0 -145
  132. package/dist/esm/capabilities/permissions/index.js +0 -83
  133. package/dist/esm/capabilities/permissions/index.js.map +0 -1
  134. package/dist/esm/capabilities/permissions/mav2.d.ts +0 -36
  135. package/dist/esm/capabilities/permissions/mav2.js +0 -88
  136. package/dist/esm/capabilities/permissions/mav2.js.map +0 -1
  137. package/dist/esm/client/actions/createAccount.d.ts +0 -35
  138. package/dist/esm/client/actions/createAccount.js +0 -32
  139. package/dist/esm/client/actions/createAccount.js.map +0 -1
  140. package/dist/esm/client/client.e2e-test.d.ts +0 -1
  141. package/dist/esm/client/client.e2e-test.js +0 -375
  142. package/dist/esm/client/client.e2e-test.js.map +0 -1
  143. package/dist/esm/exports/internal.d.ts +0 -14
  144. package/dist/esm/exports/internal.js +0 -16
  145. package/dist/esm/exports/internal.js.map +0 -1
  146. package/dist/esm/isomorphic/actions/createSession.d.ts +0 -14
  147. package/dist/esm/isomorphic/actions/createSession.js +0 -95
  148. package/dist/esm/isomorphic/actions/createSession.js.map +0 -1
  149. package/dist/esm/isomorphic/actions/getCallsStatus.d.ts +0 -21
  150. package/dist/esm/isomorphic/actions/getCallsStatus.js +0 -113
  151. package/dist/esm/isomorphic/actions/getCallsStatus.js.map +0 -1
  152. package/dist/esm/isomorphic/actions/prepareCalls.d.ts +0 -8
  153. package/dist/esm/isomorphic/actions/prepareCalls.js +0 -116
  154. package/dist/esm/isomorphic/actions/prepareCalls.js.map +0 -1
  155. package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +0 -8
  156. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +0 -157
  157. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +0 -1
  158. package/dist/esm/isomorphic/client.d.ts +0 -239
  159. package/dist/esm/isomorphic/client.js +0 -37
  160. package/dist/esm/isomorphic/client.js.map +0 -1
  161. package/dist/esm/isomorphic/utils/7702.d.ts +0 -23
  162. package/dist/esm/isomorphic/utils/7702.js +0 -75
  163. package/dist/esm/isomorphic/utils/7702.js.map +0 -1
  164. package/dist/esm/isomorphic/utils/createAccount.d.ts +0 -24
  165. package/dist/esm/isomorphic/utils/createAccount.js.map +0 -1
  166. package/dist/esm/isomorphic/utils/createDummySigner.d.ts +0 -3
  167. package/dist/esm/isomorphic/utils/createDummySigner.js +0 -17
  168. package/dist/esm/isomorphic/utils/createDummySigner.js.map +0 -1
  169. package/dist/esm/isomorphic/utils/decodeSignature.d.ts +0 -3
  170. package/dist/esm/isomorphic/utils/decodeSignature.js +0 -13
  171. package/dist/esm/isomorphic/utils/decodeSignature.js.map +0 -1
  172. package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +0 -21
  173. package/dist/esm/isomorphic/utils/parsePermissionsContext.js +0 -34
  174. package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +0 -1
  175. package/dist/esm/isomorphic/utils/supportsFeature.d.ts +0 -4
  176. package/dist/esm/isomorphic/utils/supportsFeature.js +0 -21
  177. package/dist/esm/isomorphic/utils/supportsFeature.js.map +0 -1
  178. package/dist/esm/local/client.d.ts +0 -3
  179. package/dist/esm/local/client.js +0 -97
  180. package/dist/esm/local/client.js.map +0 -1
  181. package/dist/esm/remote/client.d.ts +0 -9
  182. package/dist/esm/remote/client.js +0 -41
  183. package/dist/esm/remote/client.js.map +0 -1
  184. package/dist/esm/rpc/examples.d.ts +0 -230
  185. package/dist/esm/rpc/examples.js +0 -314
  186. package/dist/esm/rpc/examples.js.map +0 -1
  187. package/dist/esm/rpc/request.d.ts +0 -755
  188. package/dist/esm/rpc/request.js +0 -214
  189. package/dist/esm/rpc/request.js.map +0 -1
  190. package/dist/esm/rpc/schema.d.ts +0 -703
  191. package/dist/esm/rpc/schema.js +0 -5
  192. package/dist/esm/rpc/schema.js.map +0 -1
  193. package/dist/esm/schemas.d.ts +0 -712
  194. package/dist/esm/schemas.js +0 -463
  195. package/dist/esm/schemas.js.map +0 -1
  196. package/dist/types/capabilities/eip7702Auth.d.ts +0 -5
  197. package/dist/types/capabilities/eip7702Auth.d.ts.map +0 -1
  198. package/dist/types/capabilities/index.d.ts +0 -42
  199. package/dist/types/capabilities/index.d.ts.map +0 -1
  200. package/dist/types/capabilities/multiDimensionalNonce.d.ts +0 -4
  201. package/dist/types/capabilities/multiDimensionalNonce.d.ts.map +0 -1
  202. package/dist/types/capabilities/overrides.d.ts +0 -27
  203. package/dist/types/capabilities/overrides.d.ts.map +0 -1
  204. package/dist/types/capabilities/paymaster.d.ts +0 -4
  205. package/dist/types/capabilities/paymaster.d.ts.map +0 -1
  206. package/dist/types/capabilities/permissions/index.d.ts +0 -146
  207. package/dist/types/capabilities/permissions/index.d.ts.map +0 -1
  208. package/dist/types/capabilities/permissions/mav2.d.ts +0 -37
  209. package/dist/types/capabilities/permissions/mav2.d.ts.map +0 -1
  210. package/dist/types/client/actions/createAccount.d.ts +0 -36
  211. package/dist/types/client/actions/createAccount.d.ts.map +0 -1
  212. package/dist/types/client/client.e2e-test.d.ts +0 -2
  213. package/dist/types/client/client.e2e-test.d.ts.map +0 -1
  214. package/dist/types/exports/internal.d.ts +0 -15
  215. package/dist/types/exports/internal.d.ts.map +0 -1
  216. package/dist/types/isomorphic/actions/createSession.d.ts +0 -15
  217. package/dist/types/isomorphic/actions/createSession.d.ts.map +0 -1
  218. package/dist/types/isomorphic/actions/getCallsStatus.d.ts +0 -22
  219. package/dist/types/isomorphic/actions/getCallsStatus.d.ts.map +0 -1
  220. package/dist/types/isomorphic/actions/prepareCalls.d.ts +0 -9
  221. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +0 -1
  222. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +0 -9
  223. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +0 -1
  224. package/dist/types/isomorphic/client.d.ts +0 -240
  225. package/dist/types/isomorphic/client.d.ts.map +0 -1
  226. package/dist/types/isomorphic/utils/7702.d.ts +0 -24
  227. package/dist/types/isomorphic/utils/7702.d.ts.map +0 -1
  228. package/dist/types/isomorphic/utils/createAccount.d.ts +0 -25
  229. package/dist/types/isomorphic/utils/createAccount.d.ts.map +0 -1
  230. package/dist/types/isomorphic/utils/createDummySigner.d.ts +0 -4
  231. package/dist/types/isomorphic/utils/createDummySigner.d.ts.map +0 -1
  232. package/dist/types/isomorphic/utils/decodeSignature.d.ts +0 -4
  233. package/dist/types/isomorphic/utils/decodeSignature.d.ts.map +0 -1
  234. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts +0 -22
  235. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +0 -1
  236. package/dist/types/isomorphic/utils/supportsFeature.d.ts +0 -5
  237. package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +0 -1
  238. package/dist/types/local/client.d.ts +0 -4
  239. package/dist/types/local/client.d.ts.map +0 -1
  240. package/dist/types/remote/client.d.ts +0 -10
  241. package/dist/types/remote/client.d.ts.map +0 -1
  242. package/dist/types/rpc/examples.d.ts +0 -231
  243. package/dist/types/rpc/examples.d.ts.map +0 -1
  244. package/dist/types/rpc/request.d.ts +0 -756
  245. package/dist/types/rpc/request.d.ts.map +0 -1
  246. package/dist/types/rpc/schema.d.ts +0 -704
  247. package/dist/types/rpc/schema.d.ts.map +0 -1
  248. package/dist/types/schemas.d.ts +0 -713
  249. package/dist/types/schemas.d.ts.map +0 -1
  250. package/src/capabilities/eip7702Auth.ts +0 -26
  251. package/src/capabilities/index.ts +0 -14
  252. package/src/capabilities/multiDimensionalNonce.ts +0 -7
  253. package/src/capabilities/overrides.ts +0 -35
  254. package/src/capabilities/paymaster.ts +0 -5
  255. package/src/capabilities/permissions/index.ts +0 -163
  256. package/src/capabilities/permissions/mav2.ts +0 -138
  257. package/src/client/actions/createAccount.ts +0 -53
  258. package/src/client/client.e2e-test.ts +0 -463
  259. package/src/exports/internal.ts +0 -17
  260. package/src/isomorphic/actions/createSession.ts +0 -159
  261. package/src/isomorphic/actions/getCallsStatus.ts +0 -170
  262. package/src/isomorphic/actions/prepareCalls.ts +0 -170
  263. package/src/isomorphic/actions/sendPreparedCalls.ts +0 -232
  264. package/src/isomorphic/client.ts +0 -94
  265. package/src/isomorphic/utils/7702.ts +0 -143
  266. package/src/isomorphic/utils/createAccount.ts +0 -170
  267. package/src/isomorphic/utils/createDummySigner.ts +0 -27
  268. package/src/isomorphic/utils/decodeSignature.ts +0 -18
  269. package/src/isomorphic/utils/parsePermissionsContext.ts +0 -49
  270. package/src/isomorphic/utils/supportsFeature.ts +0 -34
  271. package/src/local/client.ts +0 -136
  272. package/src/remote/client.ts +0 -67
  273. package/src/rpc/examples.ts +0 -342
  274. package/src/rpc/request.ts +0 -300
  275. package/src/rpc/schema.ts +0 -40
  276. package/src/schemas.ts +0 -657
@@ -1,5 +1,5 @@
1
1
  import type { Static } from "@sinclair/typebox";
2
- import type { wallet_sendPreparedCalls } from "../../rpc/request.ts";
2
+ import type { wallet_sendPreparedCalls } from "@alchemy/wallet-api-types/rpc";
3
3
  import type { InnerWalletApiClient, WithoutChainId } from "../../types.ts";
4
4
  export type SendPreparedCallsParams = WithoutChainId<Static<(typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]>[0]>;
5
5
  export type SendPreparedCallsResult = Static<typeof wallet_sendPreparedCalls>["ReturnType"];
@@ -12,6 +12,7 @@ export type SendPreparedCallsResult = Static<typeof wallet_sendPreparedCalls>["R
12
12
  * @returns {Promise<SendPreparedCallsResult>} A Promise that resolves to the result containing the prepared call IDs
13
13
  *
14
14
  * @example
15
+ * ```ts
15
16
  * // First prepare the calls
16
17
  * const preparedCalls = await client.prepareCalls({
17
18
  * calls: [{
@@ -31,6 +32,7 @@ export type SendPreparedCallsResult = Static<typeof wallet_sendPreparedCalls>["R
31
32
  * const result = await client.sendPreparedCalls({
32
33
  * signedCalls,
33
34
  * });
35
+ * ```
34
36
  */
35
37
  export declare function sendPreparedCalls(client: InnerWalletApiClient, params: SendPreparedCallsParams): Promise<SendPreparedCallsResult>;
36
38
  //# sourceMappingURL=sendPreparedCalls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3E,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAClD,MAAM,CACJ,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CACL,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,wBAAwB,CAChC,CAAC,YAAY,CAAC,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAYlC"}
1
+ {"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3E,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAClD,MAAM,CACJ,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CACL,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,wBAAwB,CAChC,CAAC,YAAY,CAAC,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAYlC"}
@@ -12,16 +12,19 @@ export type SignMessageResult = Hex;
12
12
  *
13
13
  * @param {InnerWalletApiClient} client - The wallet API client to use for the request
14
14
  * @param {SmartAccountSigner} signer - The signer of the smart account
15
- * @param {SignableMessage} message - The message to sign
15
+ * @param {SignMessageParams} params - Parameters for signing the message
16
+ * @param {SignableMessage} params.message - The message to sign using EIP-191. Can be a string, or object with raw bytes.
17
+ * @param {Address} [params.account] - Optional account address to use for signing. If not provided, uses the client's current account.
16
18
  * @returns {Promise<SignMessageResult>} A Promise that resolves to the signed message as a hex string
17
19
  *
18
20
  * @example
21
+ * ```ts
19
22
  * // Sign a simple text message
20
23
  * const signature = await client.signMessage("Hello, world!");
21
24
  *
22
- * @example
23
25
  * // Sign a raw hex message
24
26
  * const signature = await client.signMessage({ raw: "0x48656c6c6f2c20776f726c6421" });
27
+ * ```
25
28
  */
26
29
  export declare function signMessage(client: InnerWalletApiClient, signer: SmartAccountSigner, params: SignMessageParams): Promise<SignMessageResult>;
27
30
  //# 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,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"}
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;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAM5B"}
@@ -1,7 +1,7 @@
1
1
  import type { PrepareCallsResult } from "./prepareCalls.ts";
2
2
  import type { SmartAccountSigner } from "@aa-sdk/core";
3
3
  import type { Static } from "@sinclair/typebox";
4
- import { wallet_sendPreparedCalls } from "../../rpc/request.js";
4
+ import { wallet_sendPreparedCalls } from "@alchemy/wallet-api-types/rpc";
5
5
  export type SignPreparedCallsParams = PrepareCallsResult;
6
6
  export type SignPreparedCallsResult = Static<(typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]>[0];
7
7
  /**
@@ -10,6 +10,6 @@ export type SignPreparedCallsResult = Static<(typeof wallet_sendPreparedCalls)["
10
10
  * @param {SmartAccountSigner} signer - The signer to use
11
11
  * @param {SignPreparedCallsParams} params - The prepared calls with signature requests
12
12
  * @returns {Promise<SignPreparedCallsResult>} A Promise that resolves to the signed calls
13
- **/
13
+ */
14
14
  export declare function signPreparedCalls(signer: SmartAccountSigner, params: SignPreparedCallsParams): Promise<SignPreparedCallsResult>;
15
15
  //# sourceMappingURL=signPreparedCalls.d.ts.map
@@ -1 +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,sBAAsB,CAAC;AAOhE,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,CA2ClC"}
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;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAuClC"}
@@ -1,11 +1,9 @@
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 { TypeAuthorizationSignatureRequest, TypePersonalSignSignatureRequest, TypeTypedDataSignatureRequest } from "../../schemas.js";
5
- import { TypeEip7702UnsignedAuth } from "../../schemas.js";
3
+ import { type PersonalSignSignatureRequest, type TypedDataSignatureRequest, type AuthorizationSignatureRequest, type Eip7702UnsignedAuth } from "@alchemy/wallet-api-types";
6
4
  import type { WithoutRawPayload } from "../../types.ts";
7
- export type SignSignatureRequestParams = WithoutRawPayload<Static<typeof TypePersonalSignSignatureRequest> | Static<typeof TypeTypedDataSignatureRequest> | (Static<typeof TypeAuthorizationSignatureRequest> & {
8
- data: Static<typeof TypeEip7702UnsignedAuth>;
5
+ export type SignSignatureRequestParams = WithoutRawPayload<PersonalSignSignatureRequest | TypedDataSignatureRequest | (AuthorizationSignatureRequest & {
6
+ data: Eip7702UnsignedAuth;
9
7
  })>;
10
8
  export type SignSignatureRequestResult = {
11
9
  type: "secp256k1";
@@ -18,20 +16,17 @@ export type SignSignatureRequestResult = {
18
16
  * @param {SmartAccountSigner} signer - The signer to use for signing the request
19
17
  * @param {SignSignatureRequestParams} params - The signature request parameters
20
18
  * @param {string} params.type - The type of signature request ('personal_sign', 'eth_signTypedData_v4', or 'signature_with_authorization')
21
- * @param {any} params.data - The data to sign, format depends on the signature type
19
+ * @param {SignSignatureRequestParams["data"]} params.data - The data to sign, format depends on the signature type
22
20
  * @returns {Promise<SignSignatureRequestResult>} A Promise that resolves to the signature result
23
- * @returns {string} result.type - The signature type (currently only 'secp256k1' is supported)
24
- * @returns {Hex} result.signature - The hex-encoded signature
25
- * @returns {Eip7702ExtendedFields["eip7702Auth"]} result.signedAuthorization - The signed EIP-7702 authorization, if applicable
26
21
  *
27
22
  * @example
23
+ * ```ts
28
24
  * // Sign a personal message
29
25
  * const result = await client.signSignatureRequest({
30
26
  * type: 'personal_sign',
31
27
  * data: 'Hello, world!'
32
28
  * });
33
29
  *
34
- * @example
35
30
  * // Sign typed data (EIP-712)
36
31
  * const result = await client.signSignatureRequest({
37
32
  * type: 'eth_signTypedData_v4',
@@ -42,6 +37,7 @@ export type SignSignatureRequestResult = {
42
37
  * message: { ... }
43
38
  * }
44
39
  * });
40
+ * ```
45
41
  */
46
42
  export declare function signSignatureRequest(signer: SmartAccountSigner, params: SignSignatureRequestParams): Promise<SignSignatureRequestResult>;
47
43
  //# 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,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACtD,MAAM,CAAC,OAAO,gCAAgC,CAAC,GAC/C,MAAM,CAAC,OAAO,6BAA6B,CAAC,GAC5C,CAAC,MAAM,CAAC,OAAO,iCAAiC,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;CAC9C,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
+ {"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,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACtD,4BAA4B,GAC5B,yBAAyB,GACzB,CAAC,6BAA6B,GAAG;IAC/B,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC,CACL,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAoCrC"}
@@ -15,6 +15,7 @@ export type SignTypedDataResult = Hex;
15
15
  * @returns {Promise<SignTypedDataResult>} A Promise that resolves to the signature as a hex string
16
16
  *
17
17
  * @example
18
+ * ```ts
18
19
  * // Sign typed data
19
20
  * const signature = await client.signTypedData({
20
21
  * domain: {
@@ -35,6 +36,7 @@ export type SignTypedDataResult = Hex;
35
36
  * wallet: '0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa'
36
37
  * }
37
38
  * });
39
+ * ```
38
40
  */
39
41
  export declare function signTypedData(client: InnerWalletApiClient, signer: SmartAccountSigner, params: SignTypedDataParams): Promise<SignTypedDataResult>;
40
42
  //# 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,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
+ {"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAM9B"}
@@ -1,7 +1,6 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
2
  import type { Address, Hex } from "viem";
3
3
  import type { InnerWalletApiClient } from "../types.ts";
4
- import { type CreateAccountParams, type CreateAccountResult } from "./actions/createAccount.js";
5
4
  import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus.js";
6
5
  import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions.js";
7
6
  import { type ListAccountsParams, type ListAccountsResult } from "./actions/listAccounts.js";
@@ -16,7 +15,6 @@ export type SmartWalletActions<TAccount extends Address | undefined = Address |
16
15
  requestAccount: (params?: RequestAccountParams) => Promise<RequestAccountResult>;
17
16
  prepareCalls: (params: PrepareCallsParams<TAccount>) => Promise<PrepareCallsResult>;
18
17
  sendPreparedCalls: (params: SendPreparedCallsParams) => Promise<SendPreparedCallsResult>;
19
- createAccount: (params: CreateAccountParams) => Promise<CreateAccountResult>;
20
18
  listAccounts: (params: ListAccountsParams) => Promise<ListAccountsResult>;
21
19
  getCallsStatus: (params: GetCallsStatusParams) => Promise<GetCallsStatusResult>;
22
20
  signSignatureRequest: (params: SignSignatureRequestParams) => Promise<SignSignatureRequestResult>;
@@ -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,K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AAc,EAAE,CACd,MAAM,EAAE,oBAAoB,KACzB,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,oBAAoB,EAAE,CACpB,MAAM,EAAE,0BAA0B,KAC/B,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,CAa9B"}
@@ -1,16 +1,20 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
2
  import type { AlchemyTransport } from "@account-kit/infra";
3
- import type { Address, Chain, Prettify } from "viem";
3
+ import { type Address, type Chain, type Prettify } from "viem";
4
4
  import type { InnerWalletApiClient } from "../types.ts";
5
5
  import { type SmartWalletActions } from "./decorator.js";
6
6
  export type SmartWalletClientParams<TAccount extends Address | undefined = Address | undefined> = Prettify<{
7
7
  transport: AlchemyTransport;
8
8
  chain: Chain;
9
9
  signer: SmartAccountSigner;
10
- mode: "local" | "remote";
11
- policyId?: string;
12
10
  account?: TAccount | Address | undefined;
13
- }>;
11
+ } & ({
12
+ policyId?: string;
13
+ policyIds?: never;
14
+ } | {
15
+ policyIds?: string[];
16
+ policyId?: never;
17
+ })>;
14
18
  export type SmartWalletClient<TAccount extends Address | undefined = Address | undefined> = InnerWalletApiClient & SmartWalletActions<TAccount>;
15
19
  /**
16
20
  * Creates a smart wallet client that can be used to interact with a smart account.
@@ -19,12 +23,12 @@ export type SmartWalletClient<TAccount extends Address | undefined = Address | u
19
23
  * @param {AlchemyTransport} params.transport - The Alchemy transport to use
20
24
  * @param {Chain} params.chain - The chain to use
21
25
  * @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
26
  * @param {string} [params.policyId] - The policy ID for gas sponsorship (optional)
24
27
  * @param {Address} [params.account] - The smart account address to use (optional)
25
28
  * @returns {SmartWalletClient} - A viem-compatible client
26
29
  *
27
30
  * @example
31
+ * ```ts
28
32
  * import { LocalAccountSigner } from "@aa-sdk/core";
29
33
  * import { alchemy, arbitrumSepolia } from "@account-kit/infra";
30
34
  * import { generatePrivateKey } from "viem/accounts";
@@ -37,9 +41,9 @@ export type SmartWalletClient<TAccount extends Address | undefined = Address | u
37
41
  * const client = createSmartWalletClient({
38
42
  * transport,
39
43
  * chain: arbitrumSepolia,
40
- * mode: "remote",
41
44
  * signer,
42
45
  * });
46
+ * ```
43
47
  */
44
48
  export declare function createSmartWalletClient<TAccount extends Address | undefined = undefined>(params: SmartWalletClientParams<TAccount>): SmartWalletClient<TAccount>;
45
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAGrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,C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AAgB,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;CAC1C,GAAG,CACA;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,KAAK,CAAA;CAAE,GACxC;IAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,CAC7C,CACF,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAC3B,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACxD,oBAAoB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAChD,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,9 +1,5 @@
1
1
  export { createSmartWalletClient, type SmartWalletClient, type SmartWalletClientParams, } from "../client/index.js";
2
- export { WalletServerRpcSchema, type WalletServerRpcSchemaType, type WalletServerViemRpcSchema, } from "../rpc/schema.js";
3
- export { Capabilities } from "../capabilities/index.js";
4
- export { PaymasterCapability } from "../capabilities/paymaster.js";
5
- export { PermissionsArray, PermissionsCapability, PermissionsContext, PermissionsData, } from "../capabilities/permissions/index.js";
6
- export { createAccount } from "../client/actions/createAccount.js";
2
+ export { WalletServerRpcSchema, type WalletServerRpcSchemaType, } from "@alchemy/wallet-api-types/rpc";
7
3
  export { getCallsStatus } from "../client/actions/getCallsStatus.js";
8
4
  export { grantPermissions } from "../client/actions/grantPermissions.js";
9
5
  export { listAccounts } from "../client/actions/listAccounts.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GAC/B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAChB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,GAC/B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,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"}
@@ -0,0 +1,34 @@
1
+ import type { SmartAccountSigner, SmartContractAccount } from "@aa-sdk/core";
2
+ import { type Chain, type Transport, type Address } from "viem";
3
+ import type { StaticDecode } from "@sinclair/typebox";
4
+ import { SerializedInitcode } from "@alchemy/wallet-api-types";
5
+ type CreateAccountParams = {
6
+ chain: Chain;
7
+ transport: Transport;
8
+ signer: SmartAccountSigner;
9
+ accountAddress: Address;
10
+ counterfactualInfo?: StaticDecode<typeof SerializedInitcode>;
11
+ delegation?: Address;
12
+ };
13
+ /**
14
+ * Creates a smart account instance from the given parameters.
15
+ *
16
+ * @param {CreateAccountParams} params - The parameters for creating a smart account.
17
+ * @returns {Promise<SmartContractAccount>} A promise that resolves to the created smart account.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * // Create a smart account
22
+ * const account = await createAccount({
23
+ * chain: arbitrumSepolia,
24
+ * transport: alchemy({
25
+ * apiKey: "your-alchemy-api-key",
26
+ * }),
27
+ * signer: signer,
28
+ * accountAddress: "0x1234...",
29
+ * });
30
+ * ```
31
+ */
32
+ export declare function createAccount(params: CreateAccountParams): Promise<SmartContractAccount>;
33
+ export {};
34
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/internal/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAO7E,OAAO,EAAa,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAK/D,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CA2E/B"}
@@ -1,13 +1,12 @@
1
- import type { SmartAccountSigner, SmartContractAccount } from "@aa-sdk/core";
1
+ import type { SmartContractAccount } from "@aa-sdk/core";
2
2
  import type { AlchemyTransport } from "@account-kit/infra";
3
3
  import type { Address, Chain, Client, Hex, JsonRpcAccount, Transport } from "viem";
4
- import type { GrantPermissionsParams, GrantPermissionsResult } from "./client/actions/grantPermissions.ts";
5
4
  import type { RequestAccountParams } from "./client/actions/requestAccount.ts";
6
- import type { WalletServerViemRpcSchema } from "./rpc/schema.ts";
5
+ import type { WalletServerViemRpcSchema } from "@alchemy/wallet-api-types/rpc";
7
6
  export type CreateInnerClientParams<TAccount extends Address | undefined = Address | undefined> = {
8
7
  chain: Chain;
9
8
  transport: AlchemyTransport;
10
- policyId?: string;
9
+ policyIds?: string[];
11
10
  account?: TAccount | Address | undefined;
12
11
  };
13
12
  export type InnerWalletApiClientBase<TExtend extends {
@@ -15,13 +14,8 @@ export type InnerWalletApiClientBase<TExtend extends {
15
14
  } | undefined = {
16
15
  [key: string]: unknown;
17
16
  } | undefined> = Client<Transport, Chain, JsonRpcAccount<Address> | undefined, WalletServerViemRpcSchema, {
18
- policyId?: string;
17
+ policyIds?: string[];
19
18
  } & TExtend>;
20
- export type InnerClientActions = {
21
- grantPermissions: (signer: SmartAccountSigner, params: GrantPermissionsParams & {
22
- chainId: Hex;
23
- }) => Promise<GrantPermissionsResult>;
24
- };
25
19
  export type CachedAccount = {
26
20
  account: SmartContractAccount;
27
21
  requestParams: RequestAccountParams;
@@ -30,7 +24,7 @@ export type InternalState = {
30
24
  setAccount: (account: CachedAccount) => void;
31
25
  getAccount: () => CachedAccount | undefined;
32
26
  };
33
- export type InnerWalletApiClient = InnerWalletApiClientBase<InnerClientActions & {
27
+ export type InnerWalletApiClient = InnerWalletApiClientBase<{
34
28
  internal: InternalState;
35
29
  }>;
36
30
  export type WithoutChainId<T> = T extends {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,MAAM,EACN,GAAG,EACH,cAAc,EACd,SAAS,EACV,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACxD;IACF,KAAK,EAAE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,oBAAoB,CAAC;IAC9B,aAAa,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,MAAM,aAAa,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;IAC1D,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC,CAAC;AAEH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACtD,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,GAClB,CAAC,CAAC;AAEN,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,UAAU,EAAE,GAAG,CAAA;CAAE,GAC5D,IAAI,CAAC,CAAC,EAAE,YAAY,CAAC,GACrB,CAAC,CAAC"}
@@ -1,6 +1,18 @@
1
1
  import { type Hex } from "viem";
2
2
  export type Expect<T extends true> = T;
3
3
  export declare const assertNever: (_val: never, msg: string) => never;
4
- /** If the value is already Hex, it is returned unchanged. If it's a string, number or bigint, it's converted. */
4
+ /**
5
+ * If the value is already Hex, it is returned unchanged. If it's a string, number or bigint, it's converted.
6
+ *
7
+ * @param {string | number | bigint | Hex} val - The value to convert to Hex.
8
+ * @returns {Hex} The Hex value.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const hex = castToHex("0x1234");
13
+ * const hex2 = castToHex(1234);
14
+ * const hex3 = castToHex(BigInt(1234));
15
+ * ```
16
+ */
5
17
  export declare const castToHex: (val: string | number | bigint | Hex) => Hex;
6
18
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAE9C,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;AAEvC,eAAO,MAAM,WAAW,GAAI,MAAM,KAAK,EAAE,KAAK,MAAM,KAAG,KAEtD,CAAC;AAEF,iHAAiH;AACjH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,GAAG,KAAG,GAK/D,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAE9C,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;AAEvC,eAAO,MAAM,WAAW,GAAI,MAAM,KAAK,EAAE,KAAK,MAAM,KAAG,KAEtD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,GAAG,KAAG,GAK/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const VERSION = "4.50.1";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@account-kit/wallet-client",
3
+ "version": "4.50.1",
4
+ "description": "Wallet Client for Alchemy Account Kit",
5
+ "author": "Alchemy",
6
+ "license": "MIT",
3
7
  "private": false,
4
8
  "type": "module",
5
- "version": "0.1.0-alpha.9",
6
9
  "main": "./dist/esm/exports/index.js",
7
10
  "module": "./dist/esm/exports/index.js",
8
11
  "types": "./dist/types/exports/index.d.ts",
@@ -12,7 +15,6 @@
12
15
  "dist",
13
16
  "src/**/*.ts",
14
17
  "package.json",
15
- "!eslint.config.js",
16
18
  "!dist/**/*.tsbuildinfo",
17
19
  "!vitest.config.ts",
18
20
  "!.env",
@@ -26,11 +28,6 @@
26
28
  "require": "./dist/esm/exports/index.js",
27
29
  "import": "./dist/esm/exports/index.js"
28
30
  },
29
- "./internal": {
30
- "types": "./dist/types/exports/internal.d.ts",
31
- "require": "./dist/esm/exports/internal.js",
32
- "import": "./dist/esm/exports/internal.js"
33
- },
34
31
  "./abi": {
35
32
  "types": "./dist/types/abi/index.d.ts",
36
33
  "require": "./dist/esm/abi/index.js",
@@ -39,36 +36,43 @@
39
36
  "./package.json": "./package.json"
40
37
  },
41
38
  "scripts": {
42
- "clean": "rm -rf dist",
43
- "compile": "bun clean && bun compile:esm && bun compile:types",
44
- "compile:esm": "bunx tsc --project tsconfig.build.json --outDir ./dist/esm",
45
- "lint": "eslint .",
46
- "lint:fix": "eslint --fix .",
47
- "format": "prettier --check .",
48
- "format:fix": "prettier --log-level warn --write --ignore-unknown .",
49
- "compile:types": "bunx tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
50
- "test:e2e": "bun test ./src/**/*.e2e-test.*"
39
+ "prebuild": "tsx ./inject-version.ts",
40
+ "build": "yarn clean && yarn build:esm && yarn build:types",
41
+ "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm",
42
+ "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
43
+ "clean": "rm -rf ./dist",
44
+ "fern:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/exports/index.ts --out ../../docs/pages/reference/account-kit/wallet-client",
45
+ "test:e2e": "bun test ./src/**/*.e2e.test.*"
46
+ },
47
+ "dependencies": {
48
+ "@aa-sdk/core": "^4.50.1",
49
+ "@account-kit/infra": "^4.50.1",
50
+ "@account-kit/smart-contracts": "^4.50.1",
51
+ "@alchemy/wallet-api-types": "0.1.0-alpha.13",
52
+ "@sinclair/typebox": "^0.34.33",
53
+ "deep-equal": "^2.2.3",
54
+ "ox": "^0.6.12"
51
55
  },
52
56
  "devDependencies": {
53
- "@repo/configs": "workspace:*",
54
57
  "@types/deep-equal": "^1.0.4",
55
- "eslint-plugin-import": "^2.31.0"
58
+ "@types/node": "^24.0.11",
59
+ "bun": "^1.2.18",
60
+ "bun-types": "^1.2.18"
56
61
  },
57
62
  "peerDependencies": {
58
- "typescript": "^5.8.2"
59
- },
60
- "dependencies": {
61
- "@aa-sdk/core": "^4.43.1",
62
- "@account-kit/infra": "^4.43.1",
63
- "@account-kit/smart-contracts": "^4.43.1",
64
- "@sinclair/typebox": "^0.34.33",
65
- "deep-equal": "^2.2.3",
66
- "ox": "^0.6.12",
67
63
  "viem": "2.29.2"
68
64
  },
69
65
  "publishConfig": {
70
66
  "access": "public",
71
67
  "registry": "https://registry.npmjs.org/"
72
68
  },
73
- "gitHead": "899de86e079a719b9e4ce484a9d5dca6bdfd6186"
69
+ "repository": {
70
+ "type": "git",
71
+ "url": "git+https://github.com/alchemyplatform/aa-sdk.git"
72
+ },
73
+ "bugs": {
74
+ "url": "https://github.com/alchemyplatform/aa-sdk/issues"
75
+ },
76
+ "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
77
+ "gitHead": "6e5c194d5950f548724f2498da8efb79c3bc25c5"
74
78
  }
@@ -0,0 +1,55 @@
1
+ import type { Static } from "@sinclair/typebox";
2
+ import type { wallet_formatSign } from "@alchemy/wallet-api-types/rpc";
3
+ import type { InnerWalletApiClient, WithoutChainId } from "../../types.ts";
4
+ import { toHex, type Address, type IsUndefined } from "viem";
5
+ import { AccountNotFoundError } from "@aa-sdk/core";
6
+
7
+ export type FormatSignParams<
8
+ TAccount extends Address | undefined = Address | undefined,
9
+ > = Omit<
10
+ WithoutChainId<
11
+ Static<
12
+ (typeof wallet_formatSign)["properties"]["Request"]["properties"]["params"]
13
+ >[0]
14
+ >,
15
+ "from"
16
+ > &
17
+ (IsUndefined<TAccount> extends true ? { from: Address } : { from?: never });
18
+
19
+ export type FormatSignResult = Static<typeof wallet_formatSign>["ReturnType"];
20
+
21
+ /**
22
+ * Formats a signature request for signing messages or transactions.
23
+ *
24
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
25
+ * @param {FormatSignParams} params - Parameters for formatting the signature
26
+ * @returns {Promise<FormatSignResult>} A Promise that resolves to the formatSign result containing the formatted signature.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * // Formats a signature
31
+ * const result = await client.formatSign({
32
+ * from: "0x1234...",
33
+ * signature: {
34
+ * type: "ecdsa",
35
+ * data: "0xabcd..."
36
+ * },
37
+ * });
38
+ * ```
39
+ */
40
+ export async function formatSign<
41
+ TAccount extends Address | undefined = Address | undefined,
42
+ >(
43
+ client: InnerWalletApiClient,
44
+ params: FormatSignParams<TAccount>,
45
+ ): Promise<FormatSignResult> {
46
+ const from = params.from ?? client.account?.address;
47
+ if (!from) {
48
+ throw new AccountNotFoundError();
49
+ }
50
+
51
+ return client.request({
52
+ method: "wallet_formatSign",
53
+ params: [{ ...params, from, chainId: toHex(client.chain.id) }],
54
+ });
55
+ }
@@ -1,12 +1,14 @@
1
- import type {
2
- GetCallsStatusParams as IsomorphicGetCallsStatusParams,
3
- GetCallsStatusResponse as IsomorphicGetCallsStatusResult,
4
- } from "../../isomorphic/actions/getCallsStatus.ts";
5
1
  import type { InnerWalletApiClient } from "../../types.ts";
2
+ import type { Static } from "@sinclair/typebox";
3
+ import { wallet_getCallsStatus } from "@alchemy/wallet-api-types/rpc";
6
4
 
7
- export type GetCallsStatusParams = IsomorphicGetCallsStatusParams;
5
+ export type GetCallsStatusParams = Static<
6
+ typeof wallet_getCallsStatus
7
+ >["Request"]["params"][0];
8
8
 
9
- export type GetCallsStatusResult = IsomorphicGetCallsStatusResult;
9
+ export type GetCallsStatusResult = Static<
10
+ typeof wallet_getCallsStatus
11
+ >["ReturnType"];
10
12
 
11
13
  /**
12
14
  * Gets the status of a prepared call by its ID.
@@ -21,11 +23,13 @@ export type GetCallsStatusResult = IsomorphicGetCallsStatusResult;
21
23
  * - receipts: Optional array of transaction receipts if the batch has been executed
22
24
  *
23
25
  * @example
26
+ * ```ts
24
27
  * // After sending prepared calls
25
28
  * const sendResult = await client.sendPreparedCalls({...});
26
29
  *
27
30
  * // Check the status of the first call ID
28
31
  * const status = await client.getCallsStatus(sendResult.preparedCallIds[0]);
32
+ * ```
29
33
  */
30
34
  export async function getCallsStatus(
31
35
  client: InnerWalletApiClient,