@crossmint/wallets-sdk 0.21.0 → 1.0.0-beta.3

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 (402) hide show
  1. package/README.md +6 -6
  2. package/dist/api/__tests__/constants.cjs +1 -31
  3. package/dist/api/__tests__/constants.d.cts +9 -1
  4. package/dist/api/__tests__/constants.d.ts +9 -1
  5. package/dist/api/__tests__/constants.js +1 -31
  6. package/dist/api/__tests__/test-utils.cjs +1 -372
  7. package/dist/api/__tests__/test-utils.d.cts +10 -4
  8. package/dist/api/__tests__/test-utils.d.ts +10 -4
  9. package/dist/api/__tests__/test-utils.js +1 -372
  10. package/dist/api/client.cjs +1 -10
  11. package/dist/api/client.d.cts +14 -6
  12. package/dist/api/client.d.ts +14 -6
  13. package/dist/api/client.js +1 -10
  14. package/dist/api/gen/client.gen.cjs +1 -7
  15. package/dist/api/gen/client.gen.js +1 -7
  16. package/dist/api/gen/index.cjs +1 -79
  17. package/dist/api/gen/index.d.cts +2 -2
  18. package/dist/api/gen/index.d.ts +2 -2
  19. package/dist/api/gen/index.js +1 -79
  20. package/dist/api/gen/sdk.gen.cjs +1 -78
  21. package/dist/api/gen/sdk.gen.d.cts +2 -9
  22. package/dist/api/gen/sdk.gen.d.ts +2 -9
  23. package/dist/api/gen/sdk.gen.js +1 -78
  24. package/dist/api/gen/types.gen.d.cts +593 -92
  25. package/dist/api/gen/types.gen.d.ts +593 -92
  26. package/dist/api/gen/types.gen.js +1 -1
  27. package/dist/api/index.cjs +1 -12
  28. package/dist/api/index.d.cts +7 -1
  29. package/dist/api/index.d.ts +7 -1
  30. package/dist/api/index.js +1 -12
  31. package/dist/api/types.d.cts +11 -55
  32. package/dist/api/types.d.ts +11 -55
  33. package/dist/api/types.js +1 -1
  34. package/dist/chains/chains.cjs +1 -24
  35. package/dist/chains/chains.d.cts +2 -1
  36. package/dist/chains/chains.d.ts +2 -1
  37. package/dist/chains/chains.js +1 -24
  38. package/dist/chains/definitions/arcTestnet.cjs +1 -7
  39. package/dist/chains/definitions/arcTestnet.js +1 -7
  40. package/dist/chains/definitions/story.cjs +1 -7
  41. package/dist/chains/definitions/story.js +1 -7
  42. package/dist/chains/definitions/storyTestnet.cjs +1 -7
  43. package/dist/chains/definitions/storyTestnet.js +1 -7
  44. package/dist/chains/definitions/tempo.cjs +1 -7
  45. package/dist/chains/definitions/tempo.js +1 -7
  46. package/dist/chains/definitions/tempoTestnet.cjs +1 -7
  47. package/dist/chains/definitions/tempoTestnet.js +1 -7
  48. package/dist/chunk-24JKRXBH.js +1 -0
  49. package/dist/chunk-2C3AOHCT.cjs +1 -0
  50. package/dist/chunk-2GKPWQBQ.cjs +1 -0
  51. package/dist/chunk-2JW6HKFK.js +1 -0
  52. package/dist/chunk-2RNAWXXS.js +1 -0
  53. package/dist/chunk-2YLRFJ66.js +1 -0
  54. package/dist/chunk-36OMUNL3.js +1 -0
  55. package/dist/chunk-3OGAQBMG.cjs +1 -0
  56. package/dist/chunk-3VYGTPRF.cjs +1 -0
  57. package/dist/chunk-4ADZVYB5.cjs +1 -0
  58. package/dist/chunk-4GTMI5ZT.js +1 -0
  59. package/dist/chunk-4JWRQRKA.cjs +1 -0
  60. package/dist/chunk-575WRSRN.js +1 -0
  61. package/dist/chunk-576HP23H.cjs +1 -0
  62. package/dist/chunk-5M7IRODB.js +1 -0
  63. package/dist/chunk-5QIW67NU.cjs +1 -0
  64. package/dist/chunk-5X4EOJFG.cjs +1 -0
  65. package/dist/chunk-6EZCCLTK.cjs +1 -0
  66. package/dist/chunk-6FGJ3ICD.js +1 -0
  67. package/dist/chunk-6MGMZ3SI.cjs +1 -0
  68. package/dist/chunk-6TYV7ADO.js +1 -0
  69. package/dist/chunk-7VUOD7EI.cjs +1 -0
  70. package/dist/chunk-A33BEWR7.cjs +1 -0
  71. package/dist/chunk-CUHDOBKN.cjs +1 -0
  72. package/dist/chunk-DIGDDKSF.js +1 -0
  73. package/dist/chunk-E7B6R3GF.cjs +1 -0
  74. package/dist/chunk-EE4ITUGS.js +1 -0
  75. package/dist/chunk-EIHK5TYE.js +1 -0
  76. package/dist/chunk-ENU3EKBG.cjs +1 -0
  77. package/dist/chunk-EXC7TCGL.js +1 -0
  78. package/dist/chunk-F2KLBYRR.cjs +1 -0
  79. package/dist/chunk-FOINTZC5.cjs +1 -0
  80. package/dist/chunk-FT5EVMLB.js +1 -0
  81. package/dist/chunk-G5R6VQGJ.js +1 -0
  82. package/dist/chunk-GEY574TH.cjs +1 -0
  83. package/dist/chunk-GOXB2RBF.js +1 -0
  84. package/dist/chunk-HMELCNK6.js +1 -0
  85. package/dist/chunk-HRUMWG2F.cjs +1 -0
  86. package/dist/chunk-IOSADDL5.js +1 -0
  87. package/dist/chunk-IR5WN6FQ.cjs +1 -0
  88. package/dist/chunk-J33QM2ID.cjs +1 -0
  89. package/dist/chunk-J3R36SGJ.js +1 -0
  90. package/dist/chunk-JBP52JOH.cjs +1 -0
  91. package/dist/chunk-JDDMCB6P.js +1 -0
  92. package/dist/chunk-JDTKL2XR.js +1 -0
  93. package/dist/chunk-JINIR3YK.cjs +1 -0
  94. package/dist/chunk-JJ72GFYU.cjs +1 -0
  95. package/dist/chunk-JJMKQ5PK.cjs +1 -0
  96. package/dist/chunk-K5TQ4QU3.cjs +1 -0
  97. package/dist/chunk-KKQBZXFE.js +1 -0
  98. package/dist/chunk-KUP7H7X2.js +1 -0
  99. package/dist/chunk-LB4V5KKI.js +1 -0
  100. package/dist/chunk-LEALJLNK.js +1 -0
  101. package/dist/chunk-LZNQBJEK.cjs +1 -0
  102. package/dist/chunk-MMFZP54X.js +1 -0
  103. package/dist/chunk-MTK3HWXV.js +1 -0
  104. package/dist/chunk-N5WVT7QE.js +1 -0
  105. package/dist/chunk-NJWSHT2H.cjs +1 -0
  106. package/dist/chunk-NX256LAH.cjs +1 -0
  107. package/dist/chunk-O5D3H7CZ.cjs +1 -0
  108. package/dist/chunk-O6VBO7KG.js +1 -0
  109. package/dist/chunk-OQZTL6ZG.js +1 -0
  110. package/dist/chunk-PDHWPAGW.js +1 -0
  111. package/dist/chunk-PKYRYRX4.js +1 -0
  112. package/dist/chunk-QBS76CBT.cjs +1 -0
  113. package/dist/chunk-QY5OHQW4.cjs +1 -0
  114. package/dist/chunk-RBKG6QLZ.js +1 -0
  115. package/dist/chunk-RC6KDONJ.cjs +1 -0
  116. package/dist/chunk-RR6DWIRN.js +1 -0
  117. package/dist/chunk-RXRRXB74.cjs +1 -0
  118. package/dist/chunk-S3DYQVRD.js +1 -0
  119. package/dist/chunk-SCEPJO4Q.cjs +1 -0
  120. package/dist/chunk-SH7KRBXV.js +1 -0
  121. package/dist/chunk-SMADCELI.js +1 -0
  122. package/dist/chunk-SPTXAOFR.cjs +1 -0
  123. package/dist/chunk-STYSP6KL.cjs +1 -0
  124. package/dist/chunk-SVIKBM3S.js +1 -0
  125. package/dist/chunk-T3U46LK3.cjs +1 -0
  126. package/dist/chunk-TOAFCAVT.js +0 -0
  127. package/dist/chunk-TTSJFEM5.cjs +1 -0
  128. package/dist/chunk-UE3WVHTM.cjs +1 -0
  129. package/dist/chunk-USL4YOIR.cjs +1 -0
  130. package/dist/chunk-VA26VSUQ.cjs +1 -0
  131. package/dist/chunk-VV6374MW.cjs +1 -0
  132. package/dist/chunk-W5EH3HYF.cjs +1 -0
  133. package/dist/chunk-W6V7WGBL.js +1 -0
  134. package/dist/chunk-W7LJS32A.js +1 -0
  135. package/dist/chunk-WBIKVPHW.js +1 -0
  136. package/dist/chunk-WCGUGIGJ.js +1 -0
  137. package/dist/chunk-WP4V3OCS.cjs +1 -0
  138. package/dist/chunk-WT5MDUZY.js +1 -0
  139. package/dist/chunk-XNZLCUTY.js +1 -0
  140. package/dist/chunk-XS5B3TUE.js +1 -0
  141. package/dist/chunk-YGL4ITFK.cjs +1 -0
  142. package/dist/chunk-YIO5XXQ4.js +1 -0
  143. package/dist/chunk-YPHM2V2G.cjs +1 -0
  144. package/dist/chunk-ZE4NT3CJ.js +1 -0
  145. package/dist/chunk-ZIFTCPCX.cjs +1 -0
  146. package/dist/index.cjs +1 -69
  147. package/dist/index.d.cts +9 -7
  148. package/dist/index.d.ts +9 -7
  149. package/dist/index.js +1 -69
  150. package/dist/logger/index.cjs +1 -11
  151. package/dist/logger/index.js +1 -11
  152. package/dist/logger/init.cjs +1 -10
  153. package/dist/logger/init.js +1 -10
  154. package/dist/sdk.cjs +1 -48
  155. package/dist/sdk.d.cts +21 -19
  156. package/dist/sdk.d.ts +21 -19
  157. package/dist/sdk.js +1 -48
  158. package/dist/signers/device.cjs +1 -0
  159. package/dist/signers/device.d.cts +23 -0
  160. package/dist/signers/device.d.ts +23 -0
  161. package/dist/signers/device.js +1 -0
  162. package/dist/signers/evm-api-key.cjs +1 -7
  163. package/dist/signers/evm-api-key.d.cts +7 -3
  164. package/dist/signers/evm-api-key.d.ts +7 -3
  165. package/dist/signers/evm-api-key.js +1 -7
  166. package/dist/signers/evm-external-wallet.cjs +1 -7
  167. package/dist/signers/evm-external-wallet.d.cts +12 -13
  168. package/dist/signers/evm-external-wallet.d.ts +12 -13
  169. package/dist/signers/evm-external-wallet.js +1 -7
  170. package/dist/signers/external-wallet-signer.cjs +1 -0
  171. package/dist/signers/external-wallet-signer.d.cts +28 -0
  172. package/dist/signers/external-wallet-signer.d.ts +28 -0
  173. package/dist/signers/external-wallet-signer.js +1 -0
  174. package/dist/signers/index.cjs +1 -33
  175. package/dist/signers/index.d.cts +6 -2
  176. package/dist/signers/index.d.ts +6 -2
  177. package/dist/signers/index.js +1 -33
  178. package/dist/signers/non-custodial/index.cjs +1 -27
  179. package/dist/signers/non-custodial/index.d.cts +6 -2
  180. package/dist/signers/non-custodial/index.d.ts +6 -2
  181. package/dist/signers/non-custodial/index.js +1 -27
  182. package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -13
  183. package/dist/signers/non-custodial/ncs-evm-signer.d.cts +6 -2
  184. package/dist/signers/non-custodial/ncs-evm-signer.d.ts +6 -2
  185. package/dist/signers/non-custodial/ncs-evm-signer.js +1 -13
  186. package/dist/signers/non-custodial/ncs-iframe-manager.cjs +1 -7
  187. package/dist/signers/non-custodial/ncs-iframe-manager.js +1 -7
  188. package/dist/signers/non-custodial/ncs-signer.cjs +1 -14
  189. package/dist/signers/non-custodial/ncs-signer.d.cts +7 -3
  190. package/dist/signers/non-custodial/ncs-signer.d.ts +7 -3
  191. package/dist/signers/non-custodial/ncs-signer.js +1 -14
  192. package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -13
  193. package/dist/signers/non-custodial/ncs-solana-signer.d.cts +6 -2
  194. package/dist/signers/non-custodial/ncs-solana-signer.d.ts +6 -2
  195. package/dist/signers/non-custodial/ncs-solana-signer.js +1 -13
  196. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -13
  197. package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +6 -2
  198. package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +6 -2
  199. package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -13
  200. package/dist/signers/passkey.cjs +1 -7
  201. package/dist/signers/passkey.d.cts +7 -3
  202. package/dist/signers/passkey.d.ts +7 -3
  203. package/dist/signers/passkey.js +1 -7
  204. package/dist/signers/server/assemble-server-signer.cjs +1 -14
  205. package/dist/signers/server/assemble-server-signer.d.cts +5 -1
  206. package/dist/signers/server/assemble-server-signer.d.ts +5 -1
  207. package/dist/signers/server/assemble-server-signer.js +1 -14
  208. package/dist/signers/server/evm-server-signer.cjs +1 -7
  209. package/dist/signers/server/evm-server-signer.d.cts +7 -3
  210. package/dist/signers/server/evm-server-signer.d.ts +7 -3
  211. package/dist/signers/server/evm-server-signer.js +1 -7
  212. package/dist/signers/server/helpers/derive-server-signer.cjs +1 -11
  213. package/dist/signers/server/helpers/derive-server-signer.d.cts +5 -1
  214. package/dist/signers/server/helpers/derive-server-signer.d.ts +5 -1
  215. package/dist/signers/server/helpers/derive-server-signer.js +1 -11
  216. package/dist/signers/server/helpers/get-chain-type.cjs +1 -7
  217. package/dist/signers/server/helpers/get-chain-type.js +1 -7
  218. package/dist/signers/server/helpers/index.cjs +1 -15
  219. package/dist/signers/server/helpers/index.d.cts +5 -1
  220. package/dist/signers/server/helpers/index.d.ts +5 -1
  221. package/dist/signers/server/helpers/index.js +1 -15
  222. package/dist/signers/server/index.cjs +1 -29
  223. package/dist/signers/server/index.d.cts +5 -1
  224. package/dist/signers/server/index.d.ts +5 -1
  225. package/dist/signers/server/index.js +1 -29
  226. package/dist/signers/server/solana-server-signer.cjs +1 -7
  227. package/dist/signers/server/solana-server-signer.d.cts +7 -3
  228. package/dist/signers/server/solana-server-signer.d.ts +7 -3
  229. package/dist/signers/server/solana-server-signer.js +1 -7
  230. package/dist/signers/server/stellar-server-signer.cjs +1 -7
  231. package/dist/signers/server/stellar-server-signer.d.cts +7 -3
  232. package/dist/signers/server/stellar-server-signer.d.ts +7 -3
  233. package/dist/signers/server/stellar-server-signer.js +1 -7
  234. package/dist/signers/solana-api-key.cjs +1 -7
  235. package/dist/signers/solana-api-key.d.cts +7 -3
  236. package/dist/signers/solana-api-key.d.ts +7 -3
  237. package/dist/signers/solana-api-key.js +1 -7
  238. package/dist/signers/solana-external-wallet.cjs +1 -8
  239. package/dist/signers/solana-external-wallet.d.cts +9 -10
  240. package/dist/signers/solana-external-wallet.d.ts +9 -10
  241. package/dist/signers/solana-external-wallet.js +1 -8
  242. package/dist/signers/stellar-external-wallet.cjs +1 -7
  243. package/dist/signers/stellar-external-wallet.d.cts +9 -9
  244. package/dist/signers/stellar-external-wallet.d.ts +9 -9
  245. package/dist/signers/stellar-external-wallet.js +1 -7
  246. package/dist/signers/types.cjs +1 -9
  247. package/dist/signers/types.d.cts +10 -102
  248. package/dist/signers/types.d.ts +10 -102
  249. package/dist/signers/types.js +1 -9
  250. package/dist/types/base32.js.d.cjs +1 -0
  251. package/dist/types/base32.js.d.d.cts +4 -0
  252. package/dist/types/base32.js.d.d.ts +4 -0
  253. package/dist/types/base32.js.d.js +0 -0
  254. package/dist/types-BaHy48kd.d.ts +427 -0
  255. package/dist/types-Dz8JNP4U.d.cts +427 -0
  256. package/dist/utils/constants.cjs +1 -13
  257. package/dist/utils/constants.js +1 -13
  258. package/dist/utils/device-signers/DeviceSignerKeyStorage.cjs +1 -0
  259. package/dist/utils/device-signers/DeviceSignerKeyStorage.d.cts +72 -0
  260. package/dist/utils/device-signers/DeviceSignerKeyStorage.d.ts +72 -0
  261. package/dist/utils/device-signers/DeviceSignerKeyStorage.js +1 -0
  262. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -0
  263. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.cts +51 -0
  264. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.ts +51 -0
  265. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -0
  266. package/dist/utils/device-signers/createDeviceSigner.cjs +1 -0
  267. package/dist/utils/device-signers/createDeviceSigner.d.cts +28 -0
  268. package/dist/utils/device-signers/createDeviceSigner.d.ts +28 -0
  269. package/dist/utils/device-signers/createDeviceSigner.js +1 -0
  270. package/dist/utils/device-signers/index.cjs +1 -0
  271. package/dist/utils/device-signers/index.d.cts +13 -0
  272. package/dist/utils/device-signers/index.d.ts +13 -0
  273. package/dist/utils/device-signers/index.js +1 -0
  274. package/dist/utils/errors.cjs +1 -55
  275. package/dist/utils/errors.d.cts +11 -2
  276. package/dist/utils/errors.d.ts +11 -2
  277. package/dist/utils/errors.js +1 -55
  278. package/dist/utils/server-key-derivation.cjs +1 -9
  279. package/dist/utils/server-key-derivation.js +1 -9
  280. package/dist/utils/signer-locator.cjs +1 -0
  281. package/dist/utils/signer-locator.d.cts +26 -0
  282. package/dist/utils/signer-locator.d.ts +26 -0
  283. package/dist/utils/signer-locator.js +1 -0
  284. package/dist/utils/signer-mapping.cjs +1 -0
  285. package/dist/utils/signer-mapping.d.cts +32 -0
  286. package/dist/utils/signer-mapping.d.ts +32 -0
  287. package/dist/utils/signer-mapping.js +1 -0
  288. package/dist/utils/signer-validation.cjs +1 -10
  289. package/dist/utils/signer-validation.d.cts +6 -4
  290. package/dist/utils/signer-validation.d.ts +6 -4
  291. package/dist/utils/signer-validation.js +1 -10
  292. package/dist/wallets/__tests__/setup.cjs +1 -36
  293. package/dist/wallets/__tests__/setup.js +1 -36
  294. package/dist/wallets/__tests__/test-helpers.cjs +1 -102
  295. package/dist/wallets/__tests__/test-helpers.d.cts +8 -8
  296. package/dist/wallets/__tests__/test-helpers.d.ts +8 -8
  297. package/dist/wallets/__tests__/test-helpers.js +1 -102
  298. package/dist/wallets/evm.cjs +1 -34
  299. package/dist/wallets/evm.d.cts +6 -7
  300. package/dist/wallets/evm.d.ts +6 -7
  301. package/dist/wallets/evm.js +1 -34
  302. package/dist/wallets/solana.cjs +1 -35
  303. package/dist/wallets/solana.d.cts +8 -7
  304. package/dist/wallets/solana.d.ts +8 -7
  305. package/dist/wallets/solana.js +1 -35
  306. package/dist/wallets/stellar.cjs +1 -34
  307. package/dist/wallets/stellar.d.cts +5 -6
  308. package/dist/wallets/stellar.d.ts +5 -6
  309. package/dist/wallets/stellar.js +1 -34
  310. package/dist/wallets/types.d.cts +9 -171
  311. package/dist/wallets/types.d.ts +9 -171
  312. package/dist/wallets/wallet-factory.cjs +1 -42
  313. package/dist/wallets/wallet-factory.d.cts +14 -10
  314. package/dist/wallets/wallet-factory.d.ts +14 -10
  315. package/dist/wallets/wallet-factory.js +1 -42
  316. package/dist/wallets/wallet.cjs +1 -33
  317. package/dist/wallets/wallet.d.cts +132 -34
  318. package/dist/wallets/wallet.d.ts +132 -34
  319. package/dist/wallets/wallet.js +1 -33
  320. package/package.json +9 -5
  321. package/dist/chunk-2I2OFGNL.js +0 -36
  322. package/dist/chunk-2M32LBCA.cjs +0 -52
  323. package/dist/chunk-2PSAUSOG.js +0 -379
  324. package/dist/chunk-2RG6642I.js +0 -39
  325. package/dist/chunk-2T5HHKUI.js +0 -19
  326. package/dist/chunk-3U6UAYOV.js +0 -25
  327. package/dist/chunk-3WZUNLYI.cjs +0 -16
  328. package/dist/chunk-47WKYTRN.js +0 -63
  329. package/dist/chunk-4GFSUI2I.cjs +0 -66
  330. package/dist/chunk-4Z3YDHHG.js +0 -82
  331. package/dist/chunk-4ZWUI6LE.cjs +0 -757
  332. package/dist/chunk-55V4VMTX.cjs +0 -25
  333. package/dist/chunk-65KPNJ77.js +0 -119
  334. package/dist/chunk-7EZDSDKA.cjs +0 -125
  335. package/dist/chunk-7GOUUPS4.js +0 -36
  336. package/dist/chunk-7SUWMK4J.cjs +0 -246
  337. package/dist/chunk-7USEVMTW.cjs +0 -21
  338. package/dist/chunk-7W4HGN3H.cjs +0 -63
  339. package/dist/chunk-ASE2FXWP.js +0 -65
  340. package/dist/chunk-BR4UVMIC.js +0 -332
  341. package/dist/chunk-BUBSPQ7U.cjs +0 -332
  342. package/dist/chunk-CPZQ7BK5.cjs +0 -82
  343. package/dist/chunk-CTOLL4BK.js +0 -29
  344. package/dist/chunk-DDNG224J.cjs +0 -45
  345. package/dist/chunk-EVR4CD53.js +0 -63
  346. package/dist/chunk-F7L2TZ3I.cjs +0 -21
  347. package/dist/chunk-FOOISYCJ.js +0 -66
  348. package/dist/chunk-FZQG6OX2.js +0 -323
  349. package/dist/chunk-G6QJHFSY.cjs +0 -74
  350. package/dist/chunk-GJT2JD3E.js +0 -45
  351. package/dist/chunk-GLUD6EBN.js +0 -16
  352. package/dist/chunk-H6WV5NRT.js +0 -10
  353. package/dist/chunk-HFEF2URB.js +0 -84
  354. package/dist/chunk-HTSQPZHW.cjs +0 -25
  355. package/dist/chunk-HWTWDQYT.cjs +0 -42
  356. package/dist/chunk-HYA3ESUA.js +0 -69
  357. package/dist/chunk-IOMKHF6R.cjs +0 -44
  358. package/dist/chunk-IPO25BCU.js +0 -43
  359. package/dist/chunk-JSWTGW46.cjs +0 -36
  360. package/dist/chunk-JWMQALLN.js +0 -21
  361. package/dist/chunk-K6LSGLG6.js +0 -42
  362. package/dist/chunk-KHY5FXO4.cjs +0 -37
  363. package/dist/chunk-KT3CVXFG.js +0 -9
  364. package/dist/chunk-M47ZHA7Q.js +0 -246
  365. package/dist/chunk-M4HCASMG.cjs +0 -119
  366. package/dist/chunk-M6IPPGXQ.cjs +0 -29
  367. package/dist/chunk-M7OPRXZH.cjs +0 -69
  368. package/dist/chunk-MIKWTXUA.cjs +0 -223
  369. package/dist/chunk-MMISP35W.js +0 -21
  370. package/dist/chunk-MNHK6EQK.cjs +0 -57
  371. package/dist/chunk-NIBKCMQ2.cjs +0 -19
  372. package/dist/chunk-NO2KMGS2.cjs +0 -379
  373. package/dist/chunk-OPKFMXPI.cjs +0 -39
  374. package/dist/chunk-OXB6RTW7.js +0 -125
  375. package/dist/chunk-P4XJHOLW.cjs +0 -253
  376. package/dist/chunk-PIFD6KNH.js +0 -59
  377. package/dist/chunk-PJOJIRTY.js +0 -74
  378. package/dist/chunk-PK7J3Y3L.js +0 -44
  379. package/dist/chunk-Q52MMQSC.js +0 -57
  380. package/dist/chunk-Q5KNPVYI.cjs +0 -59
  381. package/dist/chunk-QQNDLR6E.cjs +0 -323
  382. package/dist/chunk-RBHGZDDX.cjs +0 -58
  383. package/dist/chunk-RHR6P2KP.cjs +0 -15
  384. package/dist/chunk-RUQYXEEG.cjs +0 -10
  385. package/dist/chunk-S2L5Z2ZT.js +0 -37
  386. package/dist/chunk-SGINWAB6.js +0 -155
  387. package/dist/chunk-T5NKL6F4.js +0 -89
  388. package/dist/chunk-U56Z2EOR.cjs +0 -89
  389. package/dist/chunk-UO2J2ZB2.cjs +0 -65
  390. package/dist/chunk-VLZ5ZS5U.js +0 -253
  391. package/dist/chunk-VTF3WCXG.cjs +0 -84
  392. package/dist/chunk-VVPGO564.js +0 -757
  393. package/dist/chunk-WJUPOCKJ.js +0 -15
  394. package/dist/chunk-X4SPF4KJ.js +0 -223
  395. package/dist/chunk-XC2V34TS.cjs +0 -155
  396. package/dist/chunk-XEPUH4XH.js +0 -52
  397. package/dist/chunk-XOCC3MPK.cjs +0 -36
  398. package/dist/chunk-ZBLW42YE.js +0 -25
  399. package/dist/chunk-ZNAGDENG.cjs +0 -43
  400. package/dist/chunk-ZP4ZZCIE.js +0 -58
  401. package/dist/chunk-ZT7EGOCI.cjs +0 -9
  402. package/dist/chunk-ZTEMOYS2.cjs +0 -63
@@ -1,42 +1 @@
1
- import {
2
- WalletFactory
3
- } from "../chunk-2PSAUSOG.js";
4
- import "../chunk-ZP4ZZCIE.js";
5
- import "../chunk-VVPGO564.js";
6
- import "../chunk-EVR4CD53.js";
7
- import "../chunk-L52GDMSH.js";
8
- import "../chunk-CTOLL4BK.js";
9
- import "../chunk-QM3BB4E2.js";
10
- import "../chunk-S2L5Z2ZT.js";
11
- import "../chunk-H6WV5NRT.js";
12
- import "../chunk-GJT2JD3E.js";
13
- import "../chunk-K6LSGLG6.js";
14
- import "../chunk-2RG6642I.js";
15
- import "../chunk-YDZRBHS3.js";
16
- import "../chunk-HFEF2URB.js";
17
- import "../chunk-4Z3YDHHG.js";
18
- import "../chunk-T5NKL6F4.js";
19
- import "../chunk-FZQG6OX2.js";
20
- import "../chunk-FOOISYCJ.js";
21
- import "../chunk-Q52MMQSC.js";
22
- import "../chunk-7GOUUPS4.js";
23
- import "../chunk-47WKYTRN.js";
24
- import "../chunk-IPO25BCU.js";
25
- import "../chunk-2I2OFGNL.js";
26
- import "../chunk-PIFD6KNH.js";
27
- import "../chunk-PK7J3Y3L.js";
28
- import "../chunk-WJUPOCKJ.js";
29
- import "../chunk-X4SPF4KJ.js";
30
- import "../chunk-ZBLW42YE.js";
31
- import "../chunk-2T5HHKUI.js";
32
- import "../chunk-3U6UAYOV.js";
33
- import "../chunk-MMISP35W.js";
34
- import "../chunk-JWMQALLN.js";
35
- import "../chunk-SGINWAB6.js";
36
- import "../chunk-455NK5LB.js";
37
- import "../chunk-XEPUH4XH.js";
38
- import "../chunk-GLUD6EBN.js";
39
- import "../chunk-ASE2FXWP.js";
40
- export {
41
- WalletFactory
42
- };
1
+ import{a}from"../chunk-24JKRXBH.js";import"../chunk-YIO5XXQ4.js";import"../chunk-2RNAWXXS.js";import"../chunk-TOAFCAVT.js";import"../chunk-575WRSRN.js";import"../chunk-IOSADDL5.js";import"../chunk-6FGJ3ICD.js";import"../chunk-GOXB2RBF.js";import"../chunk-N5WVT7QE.js";import"../chunk-2JW6HKFK.js";import"../chunk-L52GDMSH.js";import"../chunk-G5R6VQGJ.js";import"../chunk-QM3BB4E2.js";import"../chunk-PKYRYRX4.js";import"../chunk-OQZTL6ZG.js";import"../chunk-ZE4NT3CJ.js";import"../chunk-MMFZP54X.js";import"../chunk-WT5MDUZY.js";import"../chunk-YDZRBHS3.js";import"../chunk-36OMUNL3.js";import"../chunk-LEALJLNK.js";import"../chunk-SMADCELI.js";import"../chunk-RR6DWIRN.js";import"../chunk-O6VBO7KG.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-LB4V5KKI.js";import"../chunk-SH7KRBXV.js";import"../chunk-XS5B3TUE.js";import"../chunk-EIHK5TYE.js";import"../chunk-WBIKVPHW.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JDDMCB6P.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-6TYV7ADO.js";import"../chunk-W6V7WGBL.js";import"../chunk-J3R36SGJ.js";export{a as WalletFactory};
@@ -1,33 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk4ZWUI6LEcjs = require('../chunk-4ZWUI6LE.cjs');
4
- require('../chunk-5IC7UWND.cjs');
5
- require('../chunk-M6IPPGXQ.cjs');
6
- require('../chunk-IGRPHTXZ.cjs');
7
- require('../chunk-KHY5FXO4.cjs');
8
- require('../chunk-RUQYXEEG.cjs');
9
- require('../chunk-DDNG224J.cjs');
10
- require('../chunk-HWTWDQYT.cjs');
11
- require('../chunk-OPKFMXPI.cjs');
12
- require('../chunk-PO6S7UR3.cjs');
13
- require('../chunk-VTF3WCXG.cjs');
14
- require('../chunk-CPZQ7BK5.cjs');
15
- require('../chunk-U56Z2EOR.cjs');
16
- require('../chunk-QQNDLR6E.cjs');
17
- require('../chunk-4GFSUI2I.cjs');
18
- require('../chunk-MNHK6EQK.cjs');
19
- require('../chunk-RHR6P2KP.cjs');
20
- require('../chunk-MIKWTXUA.cjs');
21
- require('../chunk-HTSQPZHW.cjs');
22
- require('../chunk-NIBKCMQ2.cjs');
23
- require('../chunk-55V4VMTX.cjs');
24
- require('../chunk-7USEVMTW.cjs');
25
- require('../chunk-F7L2TZ3I.cjs');
26
- require('../chunk-XC2V34TS.cjs');
27
- require('../chunk-CCIGWTAO.cjs');
28
- require('../chunk-2M32LBCA.cjs');
29
- require('../chunk-3WZUNLYI.cjs');
30
- require('../chunk-UO2J2ZB2.cjs');
31
-
32
-
33
- exports.Wallet = _chunk4ZWUI6LEcjs.Wallet;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVA26VSUQcjs = require('../chunk-VA26VSUQ.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-JJ72GFYU.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-LZNQBJEK.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-576HP23H.cjs');require('../chunk-YPHM2V2G.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-4ADZVYB5.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-6MGMZ3SI.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-W5EH3HYF.cjs');require('../chunk-7VUOD7EI.cjs');require('../chunk-RC6KDONJ.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-QBS76CBT.cjs');require('../chunk-2C3AOHCT.cjs');require('../chunk-WP4V3OCS.cjs');require('../chunk-QY5OHQW4.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-NJWSHT2H.cjs');require('../chunk-JJMKQ5PK.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-TTSJFEM5.cjs');require('../chunk-RXRRXB74.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-VV6374MW.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-3OGAQBMG.cjs');require('../chunk-FOINTZC5.cjs');require('../chunk-2GKPWQBQ.cjs');exports.Wallet = _chunkVA26VSUQcjs.a;
@@ -1,24 +1,25 @@
1
+ import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
1
2
  import { ApiClient } from '../api/client.cjs';
2
- import { FundWalletResponse, GetTransactionsResponse, GetTransactionSuccessResponse, Activity, RegisterSignerPasskeyParams, WalletLocator, ApproveSignatureResponse } from '../api/types.cjs';
3
- import { WalletNftsResponseDto, WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
4
- import { WalletOptions, Balances, SendTokenTransactionOptions, UserLocator, Transaction, PrepareOnly, ApproveParams, ApproveResult, AddDelegatedSignerOptions, AddDelegatedSignerReturnType, DelegatedSigner, ApproveOptions, Signature } from './types.cjs';
3
+ import { e as WalletOptions, n as SignerConfigForChain, x as Signer, B as Balances, V as FundWalletResponse, X as GetTransactionsResponse, Y as GetTransactionSuccessResponse, T as Transfers, Z as SendTokenTransactionOptions, _ as UserLocator, b as Transaction, L as PrepareOnly, $ as ApproveParams, a0 as ApproveResult, a1 as AddSignerOptions, m as ServerSignerConfig, k as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, D as DelegatedSigner, o as SignerLocator, U as WalletLocator, a3 as ApproveOptions, a4 as ApproveSignatureResponse, g as Signature } from '../types-Dz8JNP4U.cjs';
5
4
  import { Chain } from '../chains/chains.cjs';
6
- import { Signer, ServerSignerConfig } from '../signers/types.cjs';
7
5
  import '@crossmint/common-sdk-base';
8
6
  import 'viem';
9
- import '@solana/web3.js';
7
+ import 'ox';
10
8
  import '@crossmint/client-sdk-window';
11
9
  import '@crossmint/client-signers';
10
+ import '@solana/web3.js';
12
11
  import 'abitype';
13
- import 'ox';
12
+ import '../utils/device-signers/DeviceSignerKeyStorage.cjs';
14
13
 
15
14
  type WalletContructorType<C extends Chain> = {
16
15
  chain: C;
17
16
  address: string;
18
17
  owner?: string;
19
18
  alias?: string;
20
- signer: Signer;
21
19
  options?: WalletOptions;
20
+ recovery: SignerConfigForChain<C>;
21
+ signers?: SignerConfigForChain<C>[];
22
+ signer?: Signer;
22
23
  };
23
24
  declare class Wallet<C extends Chain> {
24
25
  #private;
@@ -26,18 +27,39 @@ declare class Wallet<C extends Chain> {
26
27
  address: string;
27
28
  owner?: string;
28
29
  alias?: string;
29
- signer: Signer;
30
30
  constructor(args: WalletContructorType<C>, apiClient: ApiClient);
31
+ get signer(): Signer | undefined;
32
+ /**
33
+ * Initialize the device signer by resolving key availability.
34
+ * If a device key is found locally, assembles the signer immediately.
35
+ * If not, flags the wallet for recovery so a key is generated during the next transaction.
36
+ * Device signers are not supported for Solana (Squads does not support device signer registration).
37
+ */
38
+ private initDeviceSigner;
39
+ /**
40
+ * Initialize the default signer for this wallet.
41
+ * Priority:
42
+ * 1. Device signer (if available and enabled)
43
+ * 2. If no device signer and no pending recovery: fallback based on delegated signer count
44
+ * - 0 signers: try to use recovery signer
45
+ * - 1 signer: try to use that signer
46
+ * - >1 signers: leave undefined (user must call useSigner)
47
+ *
48
+ * Note: Server and api-key signers may fail to auto-assemble if required data
49
+ * is not available in the API response. In those cases, the signer is left undefined.
50
+ */
51
+ private initDefaultSigner;
31
52
  protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
32
53
  protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
33
- protected get apiClient(): ApiClient;
54
+ protected static getRecovery<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>;
55
+ get apiClient(): ApiClient;
34
56
  protected get options(): WalletOptions | undefined;
35
57
  /**
36
- * Get the API client
37
- * @returns The API client
58
+ * Get the recovery signer config
59
+ * @returns The recovery signer config
38
60
  * @experimental This API is experimental and may change in the future
39
61
  */
40
- experimental_apiClient(): ApiClient;
62
+ get recovery(): SignerConfigForChain<C>;
41
63
  /**
42
64
  * Get the wallet balances - always includes USDC and native token (ETH/SOL)
43
65
  * @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
@@ -68,31 +90,32 @@ declare class Wallet<C extends Chain> {
68
90
  * @param {number} params.page - The page number
69
91
  * @param {WalletLocator} [params.locator] - The locator
70
92
  * @returns The NFTs
71
- * @experimental This API is experimental and may change in the future
72
93
  */
73
- experimental_nfts(params: {
94
+ nfts(params: {
74
95
  perPage: number;
75
96
  page: number;
76
- }): Promise<WalletNftsResponseDto>;
97
+ }): Promise<unknown>;
77
98
  /**
78
99
  * Get the wallet transactions
79
100
  * @returns The transactions
80
101
  * @throws {Error} If the transactions cannot be retrieved
81
102
  */
82
- experimental_transactions(): Promise<GetTransactionsResponse>;
103
+ transactions(): Promise<GetTransactionsResponse>;
83
104
  /**
84
105
  * Get a transaction by id
85
106
  * @returns The transaction
86
107
  * @throws {Error} If the transaction cannot be retrieved
87
108
  */
88
- experimental_transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
109
+ transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
89
110
  /**
90
- * Get the wallet activity
91
- * @returns The activity
92
- * @experimental This API is experimental and may change in the future
93
- * @throws {Error} If the activity cannot be retrieved
111
+ * Get the wallet transfers
112
+ * @returns The transfers
113
+ * @throws {Error} If the transfers cannot be retrieved
94
114
  */
95
- experimental_activity(): Promise<Activity>;
115
+ transfers(params?: {
116
+ tokens?: string;
117
+ status?: "successful" | "failed";
118
+ }): Promise<Transfers>;
96
119
  /**
97
120
  * Send a token to a wallet or user locator
98
121
  * @param {string | UserLocator} to - The recipient (address or user locator)
@@ -108,7 +131,7 @@ declare class Wallet<C extends Chain> {
108
131
  * @param params - The parameters
109
132
  * @param params.transactionId - The transaction id
110
133
  * @param params.options - The options for the transaction
111
- * @param params.options.experimental_approval - The approval
134
+ * @param params.options.approval - The approval
112
135
  * @param params.options.additionalSigners - The additional signers
113
136
  * @returns The transaction
114
137
  */
@@ -119,28 +142,103 @@ declare class Wallet<C extends Chain> {
119
142
  * @param params.transactionId - The transaction id or
120
143
  * @param params.signatureId - The signature id
121
144
  * @param params.options - The options for the transaction
122
- * @param params.options.experimental_approval - The approval
145
+ * @param params.options.approval - The approval
123
146
  * @param params.options.additionalSigners - The additional signers
124
147
  * @returns The transaction or signature
125
148
  */
126
149
  approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
127
150
  /**
128
- * Add a delegated signer to the wallet
129
- * @param signer - The signer. For Solana, it must be a string. For EVM, it can be a string or a passkey.
151
+ * Add a signer to the wallet.
152
+ * Always uses the recovery signer internally to approve the registration.
153
+ * If the signer being added is the current operational signer, it will be reassembled with the new locator.
154
+ * Otherwise, the original signer is restored after the operation.
155
+ * @param signer - The signer configuration object
130
156
  * @param options - The options for the operation
131
- * @param options.experimental_prepareOnly - If true, returns the transaction/signature ID without auto-approving
157
+ * @param options.prepareOnly - If true, returns the signer with approval ID without auto-approving
158
+ */
159
+ addSigner<T extends AddSignerOptions | undefined = undefined>(signer: SignerConfigForChain<C> | ServerSignerConfig | ExternalWalletRegistrationConfig, options?: T): Promise<T extends PrepareOnly<true> ? AddSignerReturnType<C> : DelegatedSigner>;
160
+ /**
161
+ * Set the active signer for this wallet.
162
+ * Accepts a signer config object. The locator is inferred internally.
163
+ * Works for both delegated signers and the recovery (admin) signer.
164
+ *
165
+ * For passkey signers: if no `id` is provided, the wallet will auto-select the passkey
166
+ * if exactly one passkey signer is registered. If multiple passkeys exist, an `id` must be specified.
167
+ *
168
+ * For device signers: if no device key is found locally, the signer will be created
169
+ * automatically during the next transaction (via recovery).
170
+ *
171
+ * For external-wallet signers: the config object must include an onSign callback
172
+ * (applies to both delegated and recovery signers).
173
+ *
174
+ * @param signer - The signer config object to use
132
175
  */
133
- addDelegatedSigner<T extends AddDelegatedSignerOptions | undefined = undefined>(params: {
134
- signer: string | RegisterSignerPasskeyParams | ServerSignerConfig;
135
- options?: T;
136
- }): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>;
176
+ useSigner(signer: SignerConfigForChain<C>): Promise<void>;
137
177
  /**
138
- * List the delegated signers for this wallet.
139
- * @returns {Promise<DelegatedSigner[]>} The delegated signers
178
+ * Resolve a non-device signer: check delegated registration first, then fall back to recovery.
179
+ * For passkeys without an explicit credential id, auto-selects from registered delegated signers.
140
180
  */
141
- delegatedSigners(): Promise<DelegatedSigner[]>;
181
+ private resolveNonDeviceSigner;
182
+ /**
183
+ * Try to auto-select a passkey credential from registered delegated signers.
184
+ * Returns true if a credential was auto-selected, false if no passkey signers exist.
185
+ * Throws if multiple passkey signers exist (user must specify an id).
186
+ */
187
+ private tryAutoSelectPasskey;
188
+ /**
189
+ * Compute the signer locator for registration checks.
190
+ * Server signers use the derived address; other types use the standard locator.
191
+ */
192
+ private resolveSignerLocator;
193
+ private isPasskeyMissingId;
194
+ /**
195
+ * Check if a signer is registered (delegated) in this wallet.
196
+ * @param signerLocator - The locator of the signer to check
197
+ * @returns true if the signer is registered
198
+ */
199
+ signerIsRegistered(signerLocator: SignerLocator | string): Promise<boolean>;
200
+ /**
201
+ * Whether the wallet needs recovery (signer registration) before the next transaction.
202
+ * @returns true if recovery is needed
203
+ */
204
+ needsRecovery(): boolean;
205
+ /**
206
+ * Register a device signer with the wallet using the recovery signer.
207
+ * Generates a new device key and registers it on-chain.
208
+ * Returns early if the device signer's locator is already approved on-chain.
209
+ */
210
+ recover(): Promise<void>;
211
+ /**
212
+ * List the signers for this wallet.
213
+ * Returns full signer objects with status.
214
+ * For EVM wallets, only signers with an approval (pending or completed) for the wallet's chain are included.
215
+ * @returns {Promise<DelegatedSigner[]>} The signers
216
+ */
217
+ signers(): Promise<DelegatedSigner[]>;
142
218
  protected get walletLocator(): WalletLocator;
219
+ /**
220
+ * Ensures that a signer is available. Throws if the wallet is read-only.
221
+ */
222
+ protected requireSigner(): Signer;
143
223
  protected preAuthIfNeeded(): Promise<void>;
224
+ /**
225
+ * Check if a signer config matches the wallet's recovery (admin) signer.
226
+ */
227
+ private isRecoverySigner;
228
+ /**
229
+ * Validate that the signer input has the required values for its type.
230
+ */
231
+ private validateSignerInput;
232
+ /**
233
+ * Check if a device signer key is available locally, or flag for recovery.
234
+ * Looks up device key storage by wallet address, then by matching registered device signers.
235
+ * If no key is found, sets needsRecovery so a new device key is generated during the next transaction.
236
+ */
237
+ private resolveDeviceSignerAvailability;
238
+ /**
239
+ * Build an InternalSignerConfig from a SignerConfigForChain.
240
+ */
241
+ private buildInternalSignerConfig;
144
242
  protected get isSolanaWallet(): boolean;
145
243
  protected resolveChainForEnvironment(): C;
146
244
  protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
@@ -1,24 +1,25 @@
1
+ import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
1
2
  import { ApiClient } from '../api/client.js';
2
- import { FundWalletResponse, GetTransactionsResponse, GetTransactionSuccessResponse, Activity, RegisterSignerPasskeyParams, WalletLocator, ApproveSignatureResponse } from '../api/types.js';
3
- import { WalletNftsResponseDto, WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
4
- import { WalletOptions, Balances, SendTokenTransactionOptions, UserLocator, Transaction, PrepareOnly, ApproveParams, ApproveResult, AddDelegatedSignerOptions, AddDelegatedSignerReturnType, DelegatedSigner, ApproveOptions, Signature } from './types.js';
3
+ import { e as WalletOptions, n as SignerConfigForChain, x as Signer, B as Balances, V as FundWalletResponse, X as GetTransactionsResponse, Y as GetTransactionSuccessResponse, T as Transfers, Z as SendTokenTransactionOptions, _ as UserLocator, b as Transaction, L as PrepareOnly, $ as ApproveParams, a0 as ApproveResult, a1 as AddSignerOptions, m as ServerSignerConfig, k as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, D as DelegatedSigner, o as SignerLocator, U as WalletLocator, a3 as ApproveOptions, a4 as ApproveSignatureResponse, g as Signature } from '../types-BaHy48kd.js';
5
4
  import { Chain } from '../chains/chains.js';
6
- import { Signer, ServerSignerConfig } from '../signers/types.js';
7
5
  import '@crossmint/common-sdk-base';
8
6
  import 'viem';
9
- import '@solana/web3.js';
7
+ import 'ox';
10
8
  import '@crossmint/client-sdk-window';
11
9
  import '@crossmint/client-signers';
10
+ import '@solana/web3.js';
12
11
  import 'abitype';
13
- import 'ox';
12
+ import '../utils/device-signers/DeviceSignerKeyStorage.js';
14
13
 
15
14
  type WalletContructorType<C extends Chain> = {
16
15
  chain: C;
17
16
  address: string;
18
17
  owner?: string;
19
18
  alias?: string;
20
- signer: Signer;
21
19
  options?: WalletOptions;
20
+ recovery: SignerConfigForChain<C>;
21
+ signers?: SignerConfigForChain<C>[];
22
+ signer?: Signer;
22
23
  };
23
24
  declare class Wallet<C extends Chain> {
24
25
  #private;
@@ -26,18 +27,39 @@ declare class Wallet<C extends Chain> {
26
27
  address: string;
27
28
  owner?: string;
28
29
  alias?: string;
29
- signer: Signer;
30
30
  constructor(args: WalletContructorType<C>, apiClient: ApiClient);
31
+ get signer(): Signer | undefined;
32
+ /**
33
+ * Initialize the device signer by resolving key availability.
34
+ * If a device key is found locally, assembles the signer immediately.
35
+ * If not, flags the wallet for recovery so a key is generated during the next transaction.
36
+ * Device signers are not supported for Solana (Squads does not support device signer registration).
37
+ */
38
+ private initDeviceSigner;
39
+ /**
40
+ * Initialize the default signer for this wallet.
41
+ * Priority:
42
+ * 1. Device signer (if available and enabled)
43
+ * 2. If no device signer and no pending recovery: fallback based on delegated signer count
44
+ * - 0 signers: try to use recovery signer
45
+ * - 1 signer: try to use that signer
46
+ * - >1 signers: leave undefined (user must call useSigner)
47
+ *
48
+ * Note: Server and api-key signers may fail to auto-assemble if required data
49
+ * is not available in the API response. In those cases, the signer is left undefined.
50
+ */
51
+ private initDefaultSigner;
31
52
  protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
32
53
  protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
33
- protected get apiClient(): ApiClient;
54
+ protected static getRecovery<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>;
55
+ get apiClient(): ApiClient;
34
56
  protected get options(): WalletOptions | undefined;
35
57
  /**
36
- * Get the API client
37
- * @returns The API client
58
+ * Get the recovery signer config
59
+ * @returns The recovery signer config
38
60
  * @experimental This API is experimental and may change in the future
39
61
  */
40
- experimental_apiClient(): ApiClient;
62
+ get recovery(): SignerConfigForChain<C>;
41
63
  /**
42
64
  * Get the wallet balances - always includes USDC and native token (ETH/SOL)
43
65
  * @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
@@ -68,31 +90,32 @@ declare class Wallet<C extends Chain> {
68
90
  * @param {number} params.page - The page number
69
91
  * @param {WalletLocator} [params.locator] - The locator
70
92
  * @returns The NFTs
71
- * @experimental This API is experimental and may change in the future
72
93
  */
73
- experimental_nfts(params: {
94
+ nfts(params: {
74
95
  perPage: number;
75
96
  page: number;
76
- }): Promise<WalletNftsResponseDto>;
97
+ }): Promise<unknown>;
77
98
  /**
78
99
  * Get the wallet transactions
79
100
  * @returns The transactions
80
101
  * @throws {Error} If the transactions cannot be retrieved
81
102
  */
82
- experimental_transactions(): Promise<GetTransactionsResponse>;
103
+ transactions(): Promise<GetTransactionsResponse>;
83
104
  /**
84
105
  * Get a transaction by id
85
106
  * @returns The transaction
86
107
  * @throws {Error} If the transaction cannot be retrieved
87
108
  */
88
- experimental_transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
109
+ transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
89
110
  /**
90
- * Get the wallet activity
91
- * @returns The activity
92
- * @experimental This API is experimental and may change in the future
93
- * @throws {Error} If the activity cannot be retrieved
111
+ * Get the wallet transfers
112
+ * @returns The transfers
113
+ * @throws {Error} If the transfers cannot be retrieved
94
114
  */
95
- experimental_activity(): Promise<Activity>;
115
+ transfers(params?: {
116
+ tokens?: string;
117
+ status?: "successful" | "failed";
118
+ }): Promise<Transfers>;
96
119
  /**
97
120
  * Send a token to a wallet or user locator
98
121
  * @param {string | UserLocator} to - The recipient (address or user locator)
@@ -108,7 +131,7 @@ declare class Wallet<C extends Chain> {
108
131
  * @param params - The parameters
109
132
  * @param params.transactionId - The transaction id
110
133
  * @param params.options - The options for the transaction
111
- * @param params.options.experimental_approval - The approval
134
+ * @param params.options.approval - The approval
112
135
  * @param params.options.additionalSigners - The additional signers
113
136
  * @returns The transaction
114
137
  */
@@ -119,28 +142,103 @@ declare class Wallet<C extends Chain> {
119
142
  * @param params.transactionId - The transaction id or
120
143
  * @param params.signatureId - The signature id
121
144
  * @param params.options - The options for the transaction
122
- * @param params.options.experimental_approval - The approval
145
+ * @param params.options.approval - The approval
123
146
  * @param params.options.additionalSigners - The additional signers
124
147
  * @returns The transaction or signature
125
148
  */
126
149
  approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
127
150
  /**
128
- * Add a delegated signer to the wallet
129
- * @param signer - The signer. For Solana, it must be a string. For EVM, it can be a string or a passkey.
151
+ * Add a signer to the wallet.
152
+ * Always uses the recovery signer internally to approve the registration.
153
+ * If the signer being added is the current operational signer, it will be reassembled with the new locator.
154
+ * Otherwise, the original signer is restored after the operation.
155
+ * @param signer - The signer configuration object
130
156
  * @param options - The options for the operation
131
- * @param options.experimental_prepareOnly - If true, returns the transaction/signature ID without auto-approving
157
+ * @param options.prepareOnly - If true, returns the signer with approval ID without auto-approving
158
+ */
159
+ addSigner<T extends AddSignerOptions | undefined = undefined>(signer: SignerConfigForChain<C> | ServerSignerConfig | ExternalWalletRegistrationConfig, options?: T): Promise<T extends PrepareOnly<true> ? AddSignerReturnType<C> : DelegatedSigner>;
160
+ /**
161
+ * Set the active signer for this wallet.
162
+ * Accepts a signer config object. The locator is inferred internally.
163
+ * Works for both delegated signers and the recovery (admin) signer.
164
+ *
165
+ * For passkey signers: if no `id` is provided, the wallet will auto-select the passkey
166
+ * if exactly one passkey signer is registered. If multiple passkeys exist, an `id` must be specified.
167
+ *
168
+ * For device signers: if no device key is found locally, the signer will be created
169
+ * automatically during the next transaction (via recovery).
170
+ *
171
+ * For external-wallet signers: the config object must include an onSign callback
172
+ * (applies to both delegated and recovery signers).
173
+ *
174
+ * @param signer - The signer config object to use
132
175
  */
133
- addDelegatedSigner<T extends AddDelegatedSignerOptions | undefined = undefined>(params: {
134
- signer: string | RegisterSignerPasskeyParams | ServerSignerConfig;
135
- options?: T;
136
- }): Promise<T extends PrepareOnly<true> ? AddDelegatedSignerReturnType<C> : void>;
176
+ useSigner(signer: SignerConfigForChain<C>): Promise<void>;
137
177
  /**
138
- * List the delegated signers for this wallet.
139
- * @returns {Promise<DelegatedSigner[]>} The delegated signers
178
+ * Resolve a non-device signer: check delegated registration first, then fall back to recovery.
179
+ * For passkeys without an explicit credential id, auto-selects from registered delegated signers.
140
180
  */
141
- delegatedSigners(): Promise<DelegatedSigner[]>;
181
+ private resolveNonDeviceSigner;
182
+ /**
183
+ * Try to auto-select a passkey credential from registered delegated signers.
184
+ * Returns true if a credential was auto-selected, false if no passkey signers exist.
185
+ * Throws if multiple passkey signers exist (user must specify an id).
186
+ */
187
+ private tryAutoSelectPasskey;
188
+ /**
189
+ * Compute the signer locator for registration checks.
190
+ * Server signers use the derived address; other types use the standard locator.
191
+ */
192
+ private resolveSignerLocator;
193
+ private isPasskeyMissingId;
194
+ /**
195
+ * Check if a signer is registered (delegated) in this wallet.
196
+ * @param signerLocator - The locator of the signer to check
197
+ * @returns true if the signer is registered
198
+ */
199
+ signerIsRegistered(signerLocator: SignerLocator | string): Promise<boolean>;
200
+ /**
201
+ * Whether the wallet needs recovery (signer registration) before the next transaction.
202
+ * @returns true if recovery is needed
203
+ */
204
+ needsRecovery(): boolean;
205
+ /**
206
+ * Register a device signer with the wallet using the recovery signer.
207
+ * Generates a new device key and registers it on-chain.
208
+ * Returns early if the device signer's locator is already approved on-chain.
209
+ */
210
+ recover(): Promise<void>;
211
+ /**
212
+ * List the signers for this wallet.
213
+ * Returns full signer objects with status.
214
+ * For EVM wallets, only signers with an approval (pending or completed) for the wallet's chain are included.
215
+ * @returns {Promise<DelegatedSigner[]>} The signers
216
+ */
217
+ signers(): Promise<DelegatedSigner[]>;
142
218
  protected get walletLocator(): WalletLocator;
219
+ /**
220
+ * Ensures that a signer is available. Throws if the wallet is read-only.
221
+ */
222
+ protected requireSigner(): Signer;
143
223
  protected preAuthIfNeeded(): Promise<void>;
224
+ /**
225
+ * Check if a signer config matches the wallet's recovery (admin) signer.
226
+ */
227
+ private isRecoverySigner;
228
+ /**
229
+ * Validate that the signer input has the required values for its type.
230
+ */
231
+ private validateSignerInput;
232
+ /**
233
+ * Check if a device signer key is available locally, or flag for recovery.
234
+ * Looks up device key storage by wallet address, then by matching registered device signers.
235
+ * If no key is found, sets needsRecovery so a new device key is generated during the next transaction.
236
+ */
237
+ private resolveDeviceSignerAvailability;
238
+ /**
239
+ * Build an InternalSignerConfig from a SignerConfigForChain.
240
+ */
241
+ private buildInternalSignerConfig;
144
242
  protected get isSolanaWallet(): boolean;
145
243
  protected resolveChainForEnvironment(): C;
146
244
  protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
@@ -1,33 +1 @@
1
- import {
2
- Wallet
3
- } from "../chunk-VVPGO564.js";
4
- import "../chunk-L52GDMSH.js";
5
- import "../chunk-CTOLL4BK.js";
6
- import "../chunk-QM3BB4E2.js";
7
- import "../chunk-S2L5Z2ZT.js";
8
- import "../chunk-H6WV5NRT.js";
9
- import "../chunk-GJT2JD3E.js";
10
- import "../chunk-K6LSGLG6.js";
11
- import "../chunk-2RG6642I.js";
12
- import "../chunk-YDZRBHS3.js";
13
- import "../chunk-HFEF2URB.js";
14
- import "../chunk-4Z3YDHHG.js";
15
- import "../chunk-T5NKL6F4.js";
16
- import "../chunk-FZQG6OX2.js";
17
- import "../chunk-FOOISYCJ.js";
18
- import "../chunk-Q52MMQSC.js";
19
- import "../chunk-WJUPOCKJ.js";
20
- import "../chunk-X4SPF4KJ.js";
21
- import "../chunk-ZBLW42YE.js";
22
- import "../chunk-2T5HHKUI.js";
23
- import "../chunk-3U6UAYOV.js";
24
- import "../chunk-MMISP35W.js";
25
- import "../chunk-JWMQALLN.js";
26
- import "../chunk-SGINWAB6.js";
27
- import "../chunk-455NK5LB.js";
28
- import "../chunk-XEPUH4XH.js";
29
- import "../chunk-GLUD6EBN.js";
30
- import "../chunk-ASE2FXWP.js";
31
- export {
32
- Wallet
33
- };
1
+ import{a}from"../chunk-2RNAWXXS.js";import"../chunk-TOAFCAVT.js";import"../chunk-575WRSRN.js";import"../chunk-IOSADDL5.js";import"../chunk-6FGJ3ICD.js";import"../chunk-GOXB2RBF.js";import"../chunk-N5WVT7QE.js";import"../chunk-2JW6HKFK.js";import"../chunk-L52GDMSH.js";import"../chunk-G5R6VQGJ.js";import"../chunk-QM3BB4E2.js";import"../chunk-PKYRYRX4.js";import"../chunk-OQZTL6ZG.js";import"../chunk-ZE4NT3CJ.js";import"../chunk-MMFZP54X.js";import"../chunk-WT5MDUZY.js";import"../chunk-YDZRBHS3.js";import"../chunk-36OMUNL3.js";import"../chunk-LEALJLNK.js";import"../chunk-SMADCELI.js";import"../chunk-RR6DWIRN.js";import"../chunk-O6VBO7KG.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-LB4V5KKI.js";import"../chunk-SH7KRBXV.js";import"../chunk-XS5B3TUE.js";import"../chunk-EIHK5TYE.js";import"../chunk-WBIKVPHW.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-JDDMCB6P.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-6TYV7ADO.js";import"../chunk-W6V7WGBL.js";import"../chunk-J3R36SGJ.js";export{a as Wallet};
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@crossmint/wallets-sdk",
3
- "version": "0.21.0",
3
+ "version": "1.0.0-beta.3",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "exports": {
10
- "import": "./dist/index.js",
11
- "require": "./dist/index.cjs"
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ }
12
14
  },
13
15
  "main": "./dist/index.cjs",
14
16
  "module": "./dist/index.js",
@@ -22,6 +24,7 @@
22
24
  "@solana/web3.js": "1.98.1",
23
25
  "@stellar/stellar-sdk": "v14.0.0-rc.3",
24
26
  "abitype": "1.0.8",
27
+ "base32.js": "0.1.0",
25
28
  "bs58": "5.0.0",
26
29
  "@noble/hashes": "1.8.0",
27
30
  "ox": "0.6.9",
@@ -29,8 +32,9 @@
29
32
  "viem": "2.33.1",
30
33
  "@crossmint/client-sdk-window": "1.0.9",
31
34
  "@crossmint/client-signers": "0.1.2",
32
- "@crossmint/common-sdk-auth": "1.0.73",
33
- "@crossmint/common-sdk-base": "0.9.20"
35
+ "@crossmint/common-sdk-auth": "1.1.0-beta.1",
36
+ "@crossmint/common-sdk-base": "0.10.0-beta.1",
37
+ "@crossmint/client-signers-cryptography": "0.0.4"
34
38
  },
35
39
  "devDependencies": {
36
40
  "@hey-api/openapi-ts": "0.69.2",