@crossmint/wallets-sdk 1.0.0 → 1.0.2

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 (398) hide show
  1. package/README.md +221 -0
  2. package/dist/api/__tests__/constants.cjs +1 -0
  3. package/dist/api/__tests__/constants.d.cts +104 -0
  4. package/dist/api/__tests__/constants.d.ts +104 -0
  5. package/dist/api/__tests__/constants.js +1 -0
  6. package/dist/api/__tests__/test-utils.cjs +1 -0
  7. package/dist/api/__tests__/test-utils.d.cts +105 -0
  8. package/dist/api/__tests__/test-utils.d.ts +105 -0
  9. package/dist/api/__tests__/test-utils.js +1 -0
  10. package/dist/api/client.cjs +1 -1
  11. package/dist/api/client.d.cts +42 -40
  12. package/dist/api/client.d.ts +42 -40
  13. package/dist/api/client.js +1 -1
  14. package/dist/api/gen/client.gen.cjs +1 -1
  15. package/dist/api/gen/client.gen.js +1 -1
  16. package/dist/api/gen/index.cjs +1 -1
  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 -1
  20. package/dist/api/gen/sdk.gen.cjs +1 -1
  21. package/dist/api/gen/sdk.gen.d.cts +123 -48
  22. package/dist/api/gen/sdk.gen.d.ts +123 -48
  23. package/dist/api/gen/sdk.gen.js +1 -1
  24. package/dist/api/gen/types.gen.d.cts +9810 -2353
  25. package/dist/api/gen/types.gen.d.ts +9810 -2353
  26. package/dist/api/index.cjs +1 -1
  27. package/dist/api/index.d.cts +10 -1
  28. package/dist/api/index.d.ts +10 -1
  29. package/dist/api/index.js +1 -1
  30. package/dist/api/types.cjs +1 -0
  31. package/dist/api/types.d.cts +11 -0
  32. package/dist/api/types.d.ts +11 -0
  33. package/dist/api/types.js +1 -0
  34. package/dist/chains/chains.cjs +1 -0
  35. package/dist/chains/chains.d.cts +29 -0
  36. package/dist/chains/chains.d.ts +29 -0
  37. package/dist/chains/chains.js +1 -0
  38. package/dist/chains/definitions/arcTestnet.cjs +1 -0
  39. package/dist/chains/definitions/arcTestnet.d.cts +43 -0
  40. package/dist/chains/definitions/arcTestnet.d.ts +43 -0
  41. package/dist/chains/definitions/arcTestnet.js +1 -0
  42. package/dist/chains/definitions/story.cjs +1 -0
  43. package/dist/chains/definitions/story.d.cts +49 -0
  44. package/dist/chains/definitions/story.d.ts +49 -0
  45. package/dist/chains/definitions/story.js +1 -0
  46. package/dist/chains/definitions/storyTestnet.cjs +1 -0
  47. package/dist/chains/definitions/storyTestnet.d.cts +43 -0
  48. package/dist/chains/definitions/storyTestnet.d.ts +43 -0
  49. package/dist/chains/definitions/storyTestnet.js +1 -0
  50. package/dist/chains/definitions/tempo.cjs +1 -0
  51. package/dist/chains/definitions/tempo.d.cts +39 -0
  52. package/dist/chains/definitions/tempo.d.ts +39 -0
  53. package/dist/chains/definitions/tempo.js +1 -0
  54. package/dist/chains/definitions/tempoTestnet.cjs +1 -0
  55. package/dist/chains/definitions/tempoTestnet.d.cts +39 -0
  56. package/dist/chains/definitions/tempoTestnet.d.ts +39 -0
  57. package/dist/chains/definitions/tempoTestnet.js +1 -0
  58. package/dist/chunk-2DANZH3R.js +1 -0
  59. package/dist/chunk-2GKPWQBQ.cjs +1 -0
  60. package/dist/chunk-2YLRFJ66.js +1 -0
  61. package/dist/chunk-3FY5QWEA.cjs +1 -0
  62. package/dist/chunk-3SVXPFSP.cjs +1 -0
  63. package/dist/chunk-3TRQCN5N.cjs +1 -0
  64. package/dist/chunk-3VRN3GKQ.js +1 -0
  65. package/dist/chunk-3VSFHDFH.cjs +1 -0
  66. package/dist/chunk-3VYGTPRF.cjs +1 -0
  67. package/dist/chunk-4DJWSV7I.cjs +1 -0
  68. package/dist/chunk-4GEI6CKB.js +1 -0
  69. package/dist/chunk-4KN3NJMT.cjs +1 -0
  70. package/dist/chunk-4YR5EP32.cjs +1 -0
  71. package/dist/chunk-5FH7WFWL.cjs +1 -0
  72. package/dist/chunk-5IFDVB4Y.js +0 -0
  73. package/dist/chunk-5LWJMR24.js +1 -0
  74. package/dist/chunk-5QIW67NU.cjs +1 -0
  75. package/dist/chunk-5X4EOJFG.cjs +1 -0
  76. package/dist/chunk-6EZCCLTK.cjs +1 -0
  77. package/dist/chunk-6HXIZLEQ.cjs +1 -0
  78. package/dist/chunk-6X5JEJD7.js +1 -0
  79. package/dist/chunk-A33BEWR7.cjs +1 -0
  80. package/dist/chunk-B5TANOHX.cjs +1 -0
  81. package/dist/chunk-B6GZ3H2H.js +1 -0
  82. package/dist/chunk-BITOMWYZ.js +1 -0
  83. package/dist/chunk-CAZWAHBL.cjs +1 -0
  84. package/dist/chunk-CBKN4SEV.js +1 -0
  85. package/dist/chunk-CCIGWTAO.cjs +1 -0
  86. package/dist/chunk-CEV4NP5X.cjs +1 -0
  87. package/dist/chunk-CKZYSQOK.js +1 -0
  88. package/dist/chunk-CUHDOBKN.cjs +1 -0
  89. package/dist/chunk-D6SLJ5C2.cjs +1 -0
  90. package/dist/chunk-DIGDDKSF.js +1 -0
  91. package/dist/chunk-ECAM5KTH.cjs +1 -0
  92. package/dist/chunk-EE4ITUGS.js +1 -0
  93. package/dist/chunk-EM3D5Q3A.js +1 -0
  94. package/dist/chunk-ENU3EKBG.cjs +1 -0
  95. package/dist/chunk-EXC7TCGL.js +1 -0
  96. package/dist/chunk-FT5EVMLB.js +1 -0
  97. package/dist/chunk-GEY3BU62.cjs +1 -0
  98. package/dist/chunk-GEY574TH.cjs +1 -0
  99. package/dist/chunk-GOXB2RBF.js +1 -0
  100. package/dist/chunk-GZP2JQ6P.cjs +1 -0
  101. package/dist/chunk-HRUMWG2F.cjs +1 -0
  102. package/dist/chunk-IA6LDKX6.cjs +1 -0
  103. package/dist/chunk-ICFT4GH4.cjs +3 -0
  104. package/dist/chunk-IFTHOW6I.js +1 -0
  105. package/dist/chunk-IGRPHTXZ.cjs +1 -0
  106. package/dist/chunk-IJ632UXD.cjs +1 -0
  107. package/dist/chunk-IOSADDL5.js +1 -0
  108. package/dist/chunk-IR5WN6FQ.cjs +1 -0
  109. package/dist/chunk-J33QM2ID.cjs +1 -0
  110. package/dist/chunk-J3R36SGJ.js +1 -0
  111. package/dist/chunk-JBP52JOH.cjs +1 -0
  112. package/dist/chunk-JINIR3YK.cjs +1 -0
  113. package/dist/chunk-K5TQ4QU3.cjs +1 -0
  114. package/dist/chunk-KBJA7JDT.js +0 -0
  115. package/dist/chunk-KKQBZXFE.js +1 -0
  116. package/dist/chunk-KUP7H7X2.js +1 -0
  117. package/dist/chunk-KY7JXYJT.js +1 -0
  118. package/dist/chunk-KYHZI332.js +1 -0
  119. package/dist/chunk-L2HE5GZQ.cjs +1 -0
  120. package/dist/chunk-L52GDMSH.js +0 -0
  121. package/dist/chunk-L756WM7L.cjs +1 -0
  122. package/dist/chunk-LKQYA27B.cjs +1 -0
  123. package/dist/chunk-LSMX26JP.js +1 -0
  124. package/dist/chunk-M335XCYO.js +1 -0
  125. package/dist/chunk-MXHHXA2U.cjs +1 -0
  126. package/dist/chunk-N355UETO.js +1 -0
  127. package/dist/chunk-N4IWDL6M.js +1 -0
  128. package/dist/chunk-N5622OKA.js +1 -0
  129. package/dist/chunk-NX256LAH.cjs +1 -0
  130. package/dist/chunk-O6VBO7KG.js +1 -0
  131. package/dist/chunk-OBCMEKEL.js +1 -0
  132. package/dist/chunk-ODOCGZQN.cjs +1 -0
  133. package/dist/chunk-OGP7B5O3.cjs +1 -0
  134. package/dist/chunk-OQZTL6ZG.js +1 -0
  135. package/dist/chunk-PDHWPAGW.js +1 -0
  136. package/dist/chunk-PHPBBEXU.cjs +1 -0
  137. package/dist/chunk-PO6S7UR3.cjs +1 -0
  138. package/dist/chunk-Q7CG36OB.js +3 -0
  139. package/dist/chunk-QM3BB4E2.js +0 -0
  140. package/dist/chunk-QVTKTDED.js +1 -0
  141. package/dist/chunk-RBSMBO4T.js +1 -0
  142. package/dist/chunk-RWV3P3EG.js +1 -0
  143. package/dist/chunk-S3DYQVRD.js +1 -0
  144. package/dist/chunk-SCEPJO4Q.cjs +1 -0
  145. package/dist/chunk-SLXO6E5S.js +1 -0
  146. package/dist/chunk-SPTXAOFR.cjs +1 -0
  147. package/dist/chunk-SVIKBM3S.js +1 -0
  148. package/dist/chunk-T3U46LK3.cjs +1 -0
  149. package/dist/chunk-TOAFCAVT.js +0 -0
  150. package/dist/chunk-U64C57PB.cjs +1 -0
  151. package/dist/chunk-UE3WVHTM.cjs +1 -0
  152. package/dist/chunk-VADIEIDS.js +1 -0
  153. package/dist/chunk-W7LJS32A.js +1 -0
  154. package/dist/chunk-WCGUGIGJ.js +1 -0
  155. package/dist/chunk-XLOZ34NX.js +1 -0
  156. package/dist/chunk-XNZLCUTY.js +1 -0
  157. package/dist/chunk-XS5B3TUE.js +1 -0
  158. package/dist/chunk-XVNQOEEA.js +1 -0
  159. package/dist/chunk-YDZRBHS3.js +0 -0
  160. package/dist/chunk-YF5G4U6L.cjs +1 -0
  161. package/dist/chunk-YGL4ITFK.cjs +1 -0
  162. package/dist/chunk-YH7G2U6V.js +1 -0
  163. package/dist/chunk-YHV3672R.cjs +1 -0
  164. package/dist/chunk-YIO5XXQ4.js +1 -0
  165. package/dist/chunk-ZKOHOVGT.cjs +1 -0
  166. package/dist/index.cjs +1 -1
  167. package/dist/index.d.cts +21 -2
  168. package/dist/index.d.ts +21 -2
  169. package/dist/index.js +1 -1
  170. package/dist/logger/index.cjs +1 -0
  171. package/dist/logger/index.d.cts +2 -0
  172. package/dist/logger/index.d.ts +2 -0
  173. package/dist/logger/index.js +1 -0
  174. package/dist/logger/init.cjs +1 -0
  175. package/dist/logger/init.d.cts +15 -0
  176. package/dist/logger/init.d.ts +15 -0
  177. package/dist/logger/init.js +1 -0
  178. package/dist/sdk.cjs +1 -1
  179. package/dist/sdk.d.cts +42 -28
  180. package/dist/sdk.d.ts +42 -28
  181. package/dist/sdk.js +1 -1
  182. package/dist/signers/device.cjs +1 -0
  183. package/dist/signers/device.d.cts +23 -0
  184. package/dist/signers/device.d.ts +23 -0
  185. package/dist/signers/device.js +1 -0
  186. package/dist/signers/evm-api-key.cjs +1 -0
  187. package/dist/signers/evm-api-key.d.cts +22 -0
  188. package/dist/signers/evm-api-key.d.ts +22 -0
  189. package/dist/signers/evm-api-key.js +1 -0
  190. package/dist/signers/evm-external-wallet.cjs +1 -0
  191. package/dist/signers/evm-external-wallet.d.cts +25 -0
  192. package/dist/signers/evm-external-wallet.d.ts +25 -0
  193. package/dist/signers/evm-external-wallet.js +1 -0
  194. package/dist/signers/external-wallet-signer.cjs +1 -0
  195. package/dist/signers/external-wallet-signer.d.cts +28 -0
  196. package/dist/signers/external-wallet-signer.d.ts +28 -0
  197. package/dist/signers/external-wallet-signer.js +1 -0
  198. package/dist/signers/index.cjs +1 -0
  199. package/dist/signers/index.d.cts +15 -0
  200. package/dist/signers/index.d.ts +15 -0
  201. package/dist/signers/index.js +1 -0
  202. package/dist/signers/non-custodial/index.cjs +1 -0
  203. package/dist/signers/non-custodial/index.d.cts +15 -0
  204. package/dist/signers/non-custodial/index.d.ts +15 -0
  205. package/dist/signers/non-custodial/index.js +1 -0
  206. package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -0
  207. package/dist/signers/non-custodial/ncs-evm-signer.d.cts +34 -0
  208. package/dist/signers/non-custodial/ncs-evm-signer.d.ts +34 -0
  209. package/dist/signers/non-custodial/ncs-evm-signer.js +1 -0
  210. package/dist/signers/non-custodial/ncs-iframe-manager.cjs +1 -0
  211. package/dist/signers/non-custodial/ncs-iframe-manager.d.cts +16 -0
  212. package/dist/signers/non-custodial/ncs-iframe-manager.d.ts +16 -0
  213. package/dist/signers/non-custodial/ncs-iframe-manager.js +1 -0
  214. package/dist/signers/non-custodial/ncs-signer.cjs +1 -0
  215. package/dist/signers/non-custodial/ncs-signer.d.cts +54 -0
  216. package/dist/signers/non-custodial/ncs-signer.d.ts +54 -0
  217. package/dist/signers/non-custodial/ncs-signer.js +1 -0
  218. package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -0
  219. package/dist/signers/non-custodial/ncs-solana-signer.d.cts +31 -0
  220. package/dist/signers/non-custodial/ncs-solana-signer.d.ts +31 -0
  221. package/dist/signers/non-custodial/ncs-solana-signer.js +1 -0
  222. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -0
  223. package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +31 -0
  224. package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +31 -0
  225. package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -0
  226. package/dist/signers/passkey.cjs +1 -0
  227. package/dist/signers/passkey.d.cts +23 -0
  228. package/dist/signers/passkey.d.ts +23 -0
  229. package/dist/signers/passkey.js +1 -0
  230. package/dist/signers/server/assemble-server-signer.cjs +1 -0
  231. package/dist/signers/server/assemble-server-signer.d.cts +15 -0
  232. package/dist/signers/server/assemble-server-signer.d.ts +15 -0
  233. package/dist/signers/server/assemble-server-signer.js +1 -0
  234. package/dist/signers/server/evm-server-signer.cjs +1 -0
  235. package/dist/signers/server/evm-server-signer.d.cts +29 -0
  236. package/dist/signers/server/evm-server-signer.d.ts +29 -0
  237. package/dist/signers/server/evm-server-signer.js +1 -0
  238. package/dist/signers/server/helpers/derive-server-signer.cjs +1 -0
  239. package/dist/signers/server/helpers/derive-server-signer.d.cts +19 -0
  240. package/dist/signers/server/helpers/derive-server-signer.d.ts +19 -0
  241. package/dist/signers/server/helpers/derive-server-signer.js +1 -0
  242. package/dist/signers/server/helpers/get-chain-type.cjs +1 -0
  243. package/dist/signers/server/helpers/get-chain-type.d.cts +7 -0
  244. package/dist/signers/server/helpers/get-chain-type.d.ts +7 -0
  245. package/dist/signers/server/helpers/get-chain-type.js +1 -0
  246. package/dist/signers/server/helpers/index.cjs +1 -0
  247. package/dist/signers/server/helpers/index.d.cts +13 -0
  248. package/dist/signers/server/helpers/index.d.ts +13 -0
  249. package/dist/signers/server/helpers/index.js +1 -0
  250. package/dist/signers/server/index.cjs +1 -0
  251. package/dist/signers/server/index.d.cts +16 -0
  252. package/dist/signers/server/index.d.ts +16 -0
  253. package/dist/signers/server/index.js +1 -0
  254. package/dist/signers/server/solana-server-signer.cjs +1 -0
  255. package/dist/signers/server/solana-server-signer.d.cts +29 -0
  256. package/dist/signers/server/solana-server-signer.d.ts +29 -0
  257. package/dist/signers/server/solana-server-signer.js +1 -0
  258. package/dist/signers/server/stellar-server-signer.cjs +1 -0
  259. package/dist/signers/server/stellar-server-signer.d.cts +29 -0
  260. package/dist/signers/server/stellar-server-signer.d.ts +29 -0
  261. package/dist/signers/server/stellar-server-signer.js +1 -0
  262. package/dist/signers/solana-api-key.cjs +1 -0
  263. package/dist/signers/solana-api-key.d.cts +22 -0
  264. package/dist/signers/solana-api-key.d.ts +22 -0
  265. package/dist/signers/solana-api-key.js +1 -0
  266. package/dist/signers/solana-external-wallet.cjs +1 -0
  267. package/dist/signers/solana-external-wallet.d.cts +23 -0
  268. package/dist/signers/solana-external-wallet.d.ts +23 -0
  269. package/dist/signers/solana-external-wallet.js +1 -0
  270. package/dist/signers/stellar-external-wallet.cjs +1 -0
  271. package/dist/signers/stellar-external-wallet.d.cts +23 -0
  272. package/dist/signers/stellar-external-wallet.d.ts +23 -0
  273. package/dist/signers/stellar-external-wallet.js +1 -0
  274. package/dist/signers/types.cjs +1 -0
  275. package/dist/signers/types.d.cts +11 -0
  276. package/dist/signers/types.d.ts +11 -0
  277. package/dist/signers/types.js +1 -0
  278. package/dist/types/base32.js.d.cjs +1 -0
  279. package/dist/types/base32.js.d.d.cts +4 -0
  280. package/dist/types/base32.js.d.d.ts +4 -0
  281. package/dist/types/base32.js.d.js +0 -0
  282. package/dist/types-DfT-EHk3.d.cts +428 -0
  283. package/dist/types-vcGYTcL0.d.ts +428 -0
  284. package/dist/utils/constants.cjs +1 -1
  285. package/dist/utils/constants.d.cts +2 -1
  286. package/dist/utils/constants.d.ts +2 -1
  287. package/dist/utils/constants.js +1 -1
  288. package/dist/utils/device-signers/DeviceSignerKeyStorage.cjs +1 -0
  289. package/dist/utils/device-signers/DeviceSignerKeyStorage.d.cts +72 -0
  290. package/dist/utils/device-signers/DeviceSignerKeyStorage.d.ts +72 -0
  291. package/dist/utils/device-signers/DeviceSignerKeyStorage.js +1 -0
  292. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -0
  293. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.cts +51 -0
  294. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.d.ts +51 -0
  295. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -0
  296. package/dist/utils/device-signers/createDeviceSigner.cjs +1 -0
  297. package/dist/utils/device-signers/createDeviceSigner.d.cts +28 -0
  298. package/dist/utils/device-signers/createDeviceSigner.d.ts +28 -0
  299. package/dist/utils/device-signers/createDeviceSigner.js +1 -0
  300. package/dist/utils/device-signers/index.cjs +1 -0
  301. package/dist/utils/device-signers/index.d.cts +13 -0
  302. package/dist/utils/device-signers/index.d.ts +13 -0
  303. package/dist/utils/device-signers/index.js +1 -0
  304. package/dist/utils/errors.cjs +1 -0
  305. package/dist/utils/errors.d.cts +89 -0
  306. package/dist/utils/errors.d.ts +89 -0
  307. package/dist/utils/errors.js +1 -0
  308. package/dist/utils/server-key-derivation.cjs +1 -0
  309. package/dist/utils/server-key-derivation.d.cts +20 -0
  310. package/dist/utils/server-key-derivation.d.ts +20 -0
  311. package/dist/utils/server-key-derivation.js +1 -0
  312. package/dist/utils/signer-locator.cjs +1 -0
  313. package/dist/utils/signer-locator.d.cts +26 -0
  314. package/dist/utils/signer-locator.d.ts +26 -0
  315. package/dist/utils/signer-locator.js +1 -0
  316. package/dist/utils/signer-mapping.cjs +1 -0
  317. package/dist/utils/signer-mapping.d.cts +36 -0
  318. package/dist/utils/signer-mapping.d.ts +36 -0
  319. package/dist/utils/signer-mapping.js +1 -0
  320. package/dist/utils/signer-validation.cjs +1 -0
  321. package/dist/utils/signer-validation.d.cts +11 -0
  322. package/dist/utils/signer-validation.d.ts +11 -0
  323. package/dist/utils/signer-validation.js +1 -0
  324. package/dist/utils/stellar.cjs +1 -0
  325. package/dist/utils/stellar.d.cts +18 -0
  326. package/dist/utils/stellar.d.ts +18 -0
  327. package/dist/utils/stellar.js +1 -0
  328. package/dist/wallets/__tests__/setup.cjs +1 -0
  329. package/dist/wallets/__tests__/setup.d.cts +2 -0
  330. package/dist/wallets/__tests__/setup.d.ts +2 -0
  331. package/dist/wallets/__tests__/setup.js +1 -0
  332. package/dist/wallets/__tests__/test-helpers.cjs +1 -0
  333. package/dist/wallets/__tests__/test-helpers.d.cts +36 -0
  334. package/dist/wallets/__tests__/test-helpers.d.ts +36 -0
  335. package/dist/wallets/__tests__/test-helpers.js +1 -0
  336. package/dist/wallets/evm.cjs +1 -0
  337. package/dist/wallets/evm.d.cts +154 -0
  338. package/dist/wallets/evm.d.ts +154 -0
  339. package/dist/wallets/evm.js +1 -0
  340. package/dist/wallets/solana.cjs +1 -0
  341. package/dist/wallets/solana.d.cts +29 -0
  342. package/dist/wallets/solana.d.ts +29 -0
  343. package/dist/wallets/solana.js +1 -0
  344. package/dist/wallets/stellar.cjs +1 -0
  345. package/dist/wallets/stellar.d.cts +29 -0
  346. package/dist/wallets/stellar.d.ts +29 -0
  347. package/dist/wallets/stellar.js +1 -0
  348. package/dist/wallets/types.cjs +1 -0
  349. package/dist/wallets/types.d.cts +11 -0
  350. package/dist/wallets/types.d.ts +11 -0
  351. package/dist/wallets/types.js +0 -0
  352. package/dist/wallets/wallet-factory.cjs +1 -0
  353. package/dist/wallets/wallet-factory.d.cts +37 -0
  354. package/dist/wallets/wallet-factory.d.ts +37 -0
  355. package/dist/wallets/wallet-factory.js +1 -0
  356. package/dist/wallets/wallet.cjs +1 -0
  357. package/dist/wallets/wallet.d.cts +274 -0
  358. package/dist/wallets/wallet.d.ts +274 -0
  359. package/dist/wallets/wallet.js +1 -0
  360. package/package.json +30 -12
  361. package/dist/chunk-22GIA4MK.js +0 -1
  362. package/dist/chunk-3ENSZP74.cjs +0 -1
  363. package/dist/chunk-6TDMYZSP.js +0 -1
  364. package/dist/chunk-APYZEG33.js +0 -1
  365. package/dist/chunk-CK4JCQY6.cjs +0 -1
  366. package/dist/chunk-DBOB7H6W.cjs +0 -1
  367. package/dist/chunk-EY4BQMWT.js +0 -1
  368. package/dist/chunk-ICE64YWF.js +0 -1
  369. package/dist/chunk-MSK53SDP.js +0 -1
  370. package/dist/chunk-O5UBTDCJ.cjs +0 -1
  371. package/dist/chunk-OOKBOMFJ.cjs +0 -1
  372. package/dist/chunk-U2WTEWN7.cjs +0 -1
  373. package/dist/chunk-WVCL7F3L.js +0 -1
  374. package/dist/chunk-Z4FSGH26.js +0 -1
  375. package/dist/chunk-Z4XNQ4N5.cjs +0 -1
  376. package/dist/chunk-Z6JFF3HR.cjs +0 -1
  377. package/dist/evm/chains.cjs +0 -1
  378. package/dist/evm/chains.d.cts +0 -9
  379. package/dist/evm/chains.d.ts +0 -9
  380. package/dist/evm/chains.js +0 -1
  381. package/dist/evm/index.cjs +0 -1
  382. package/dist/evm/index.d.cts +0 -6
  383. package/dist/evm/index.d.ts +0 -6
  384. package/dist/evm/index.js +0 -1
  385. package/dist/evm/wallet.cjs +0 -1
  386. package/dist/evm/wallet.d.cts +0 -48
  387. package/dist/evm/wallet.d.ts +0 -48
  388. package/dist/evm/wallet.js +0 -1
  389. package/dist/solana/index.cjs +0 -1
  390. package/dist/solana/index.d.cts +0 -5
  391. package/dist/solana/index.d.ts +0 -5
  392. package/dist/solana/index.js +0 -1
  393. package/dist/solana/wallet.cjs +0 -1
  394. package/dist/solana/wallet.d.cts +0 -33
  395. package/dist/solana/wallet.d.ts +0 -33
  396. package/dist/solana/wallet.js +0 -1
  397. /package/dist/{chunk-A7F5DWC7.js → chunk-455NK5LB.js} +0 -0
  398. /package/dist/{chunk-RUIBT3JV.cjs → chunk-5IC7UWND.cjs} +0 -0
@@ -0,0 +1,11 @@
1
+ import '@solana/web3.js';
2
+ import '@crossmint/client-sdk-window';
3
+ import '@crossmint/client-signers';
4
+ import 'viem';
5
+ import 'abitype';
6
+ export { k as AddSignerOptions, a2 as AddSignerReturnType, aH as Approval, j as ApproveOptions, A as ApproveParams, a1 as ApproveResult, B as Balances, e as Callbacks, C as ClientSideWalletArgsFor, a as ClientSideWalletCreateArgs, aF as DeviceSignerDescriptor, E as EVMTransactionInput, aB as FormattedEVMTransaction, aD as PendingApproval, O as PrepareOnly, $ as SendTokenTransactionOptions, az as SendTokenTransactionType, Q as SignMessageInput, U as SignTypedDataInput, h as Signature, aA as SignatureInputOptions, S as Signer, aC as SignerInput, b as SignerStatus, i as SolanaTransactionInput, X as StellarTransactionInput, aE as StellarWalletPlugin, aG as TokenBalance, c as Transaction, V as TransactionInputOptions, T as Transfers, a0 as UserLocator, W as WalletArgsFor, d as WalletCreateArgs, f as WalletOptions, g as WalletPlugin } from '../types-vcGYTcL0.js';
7
+ import '../chains/chains.js';
8
+ import '../utils/device-signers/DeviceSignerKeyStorage.js';
9
+ import '../api/gen/types.gen.js';
10
+ import 'ox';
11
+ import '@crossmint/common-sdk-base';
File without changes
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkB5TANOHXcjs = require('../chunk-B5TANOHX.cjs');require('../chunk-K5TQ4QU3.cjs');require('../chunk-ICFT4GH4.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-CAZWAHBL.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-L756WM7L.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-GZP2JQ6P.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-ODOCGZQN.cjs');require('../chunk-3FY5QWEA.cjs');require('../chunk-U64C57PB.cjs');require('../chunk-4KN3NJMT.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-CEV4NP5X.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-3TRQCN5N.cjs');require('../chunk-LKQYA27B.cjs');require('../chunk-2GKPWQBQ.cjs');exports.WalletFactory = _chunkB5TANOHXcjs.a;
@@ -0,0 +1,37 @@
1
+ import { ApiClient } from '../api/client.cjs';
2
+ import { Chain } from '../chains/chains.cjs';
3
+ import { W as WalletArgsFor, d as WalletCreateArgs } from '../types-DfT-EHk3.cjs';
4
+ import { Wallet } from './wallet.cjs';
5
+ import '@crossmint/common-sdk-base';
6
+ import 'viem';
7
+ import '../api/gen/types.gen.cjs';
8
+ import 'ox';
9
+ import '@crossmint/client-sdk-window';
10
+ import '@crossmint/client-signers';
11
+ import '@solana/web3.js';
12
+ import 'abitype';
13
+ import '../utils/device-signers/DeviceSignerKeyStorage.cjs';
14
+
15
+ declare class WalletFactory {
16
+ private readonly apiClient;
17
+ constructor(apiClient: ApiClient);
18
+ getWallet<C extends Chain>(args: WalletArgsFor<C>): Promise<Wallet<C>>;
19
+ getWallet<C extends Chain>(walletLocator: string, args: WalletArgsFor<C>): Promise<Wallet<C>>;
20
+ createWallet<C extends Chain>(args: WalletCreateArgs<C>): Promise<Wallet<C>>;
21
+ private createWalletInstance;
22
+ private getWalletLocator;
23
+ private createPasskeySigner;
24
+ /**
25
+ * Ensures device signer is included in the signers array for wallet creation.
26
+ * If no device signer is present in args.signers, adds one.
27
+ * Device signers are not supported for Solana (Squads does not support device signer registration).
28
+ */
29
+ private ensureDeviceSignerInSigners;
30
+ private validateExistingWalletConfig;
31
+ private validateSigners;
32
+ private isMatchingPasskeySigner;
33
+ private registerSigners;
34
+ private getChainType;
35
+ }
36
+
37
+ export { WalletFactory };
@@ -0,0 +1,37 @@
1
+ import { ApiClient } from '../api/client.js';
2
+ import { Chain } from '../chains/chains.js';
3
+ import { W as WalletArgsFor, d as WalletCreateArgs } from '../types-vcGYTcL0.js';
4
+ import { Wallet } from './wallet.js';
5
+ import '@crossmint/common-sdk-base';
6
+ import 'viem';
7
+ import '../api/gen/types.gen.js';
8
+ import 'ox';
9
+ import '@crossmint/client-sdk-window';
10
+ import '@crossmint/client-signers';
11
+ import '@solana/web3.js';
12
+ import 'abitype';
13
+ import '../utils/device-signers/DeviceSignerKeyStorage.js';
14
+
15
+ declare class WalletFactory {
16
+ private readonly apiClient;
17
+ constructor(apiClient: ApiClient);
18
+ getWallet<C extends Chain>(args: WalletArgsFor<C>): Promise<Wallet<C>>;
19
+ getWallet<C extends Chain>(walletLocator: string, args: WalletArgsFor<C>): Promise<Wallet<C>>;
20
+ createWallet<C extends Chain>(args: WalletCreateArgs<C>): Promise<Wallet<C>>;
21
+ private createWalletInstance;
22
+ private getWalletLocator;
23
+ private createPasskeySigner;
24
+ /**
25
+ * Ensures device signer is included in the signers array for wallet creation.
26
+ * If no device signer is present in args.signers, adds one.
27
+ * Device signers are not supported for Solana (Squads does not support device signer registration).
28
+ */
29
+ private ensureDeviceSignerInSigners;
30
+ private validateExistingWalletConfig;
31
+ private validateSigners;
32
+ private isMatchingPasskeySigner;
33
+ private registerSigners;
34
+ private getChainType;
35
+ }
36
+
37
+ export { WalletFactory };
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-LSMX26JP.js";import"../chunk-YIO5XXQ4.js";import"../chunk-Q7CG36OB.js";import"../chunk-TOAFCAVT.js";import"../chunk-N4IWDL6M.js";import"../chunk-2DANZH3R.js";import"../chunk-IOSADDL5.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-SLXO6E5S.js";import"../chunk-L52GDMSH.js";import"../chunk-6X5JEJD7.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-YDZRBHS3.js";import"../chunk-N5622OKA.js";import"../chunk-CBKN4SEV.js";import"../chunk-KYHZI332.js";import"../chunk-5LWJMR24.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-KY7JXYJT.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-B6GZ3H2H.js";import"../chunk-XLOZ34NX.js";import"../chunk-J3R36SGJ.js";export{a as WalletFactory};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkICFT4GH4cjs = require('../chunk-ICFT4GH4.cjs');require('../chunk-CUHDOBKN.cjs');require('../chunk-YHV3672R.cjs');require('../chunk-CAZWAHBL.cjs');require('../chunk-3VYGTPRF.cjs');require('../chunk-NX256LAH.cjs');require('../chunk-D6SLJ5C2.cjs');require('../chunk-L756WM7L.cjs');require('../chunk-5IC7UWND.cjs');require('../chunk-GZP2JQ6P.cjs');require('../chunk-IGRPHTXZ.cjs');require('../chunk-3VSFHDFH.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3SVXPFSP.cjs');require('../chunk-4DJWSV7I.cjs');require('../chunk-YF5G4U6L.cjs');require('../chunk-PO6S7UR3.cjs');require('../chunk-ODOCGZQN.cjs');require('../chunk-3FY5QWEA.cjs');require('../chunk-U64C57PB.cjs');require('../chunk-4KN3NJMT.cjs');require('../chunk-JBP52JOH.cjs');require('../chunk-5FH7WFWL.cjs');require('../chunk-SPTXAOFR.cjs');require('../chunk-5QIW67NU.cjs');require('../chunk-YGL4ITFK.cjs');require('../chunk-GEY3BU62.cjs');require('../chunk-PHPBBEXU.cjs');require('../chunk-A33BEWR7.cjs');require('../chunk-OGP7B5O3.cjs');require('../chunk-IJ632UXD.cjs');require('../chunk-6EZCCLTK.cjs');require('../chunk-SCEPJO4Q.cjs');require('../chunk-CEV4NP5X.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-T3U46LK3.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-3TRQCN5N.cjs');require('../chunk-LKQYA27B.cjs');require('../chunk-2GKPWQBQ.cjs');exports.Wallet = _chunkICFT4GH4cjs.a;
@@ -0,0 +1,274 @@
1
+ import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.cjs';
2
+ import { ApiClient } from '../api/client.cjs';
3
+ import { f as WalletOptions, r as SignerConfigForChain, m as SignerAdapter, B as Balances, Y as FundWalletResponse, Z as GetTransactionsResponse, _ as GetTransactionSuccessResponse, T as Transfers, $ as SendTokenTransactionOptions, a0 as UserLocator, c as Transaction, O as PrepareOnly, A as ApproveParams, a1 as ApproveResult, k as AddSignerOptions, q as ServerSignerConfig, o as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, S as Signer, s as SignerLocator, a3 as WalletLocator, j as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-DfT-EHk3.cjs';
4
+ import { Chain } from '../chains/chains.cjs';
5
+ import '@crossmint/common-sdk-base';
6
+ import 'viem';
7
+ import 'ox';
8
+ import '@crossmint/client-sdk-window';
9
+ import '@crossmint/client-signers';
10
+ import '@solana/web3.js';
11
+ import 'abitype';
12
+ import '../utils/device-signers/DeviceSignerKeyStorage.cjs';
13
+
14
+ type WalletContructorType<C extends Chain> = {
15
+ chain: C;
16
+ address: string;
17
+ owner?: string;
18
+ alias?: string;
19
+ options?: WalletOptions;
20
+ recovery: SignerConfigForChain<C>;
21
+ signers?: SignerConfigForChain<C>[];
22
+ signer?: SignerAdapter;
23
+ };
24
+ declare class Wallet<C extends Chain> {
25
+ #private;
26
+ chain: C;
27
+ address: string;
28
+ owner?: string;
29
+ alias?: string;
30
+ constructor(args: WalletContructorType<C>, apiClient: ApiClient);
31
+ get signer(): SignerAdapter | 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;
52
+ protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
53
+ protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
54
+ protected static getRecovery<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>;
55
+ protected static getInitialSigners<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>[];
56
+ get apiClient(): ApiClient;
57
+ protected get options(): WalletOptions | undefined;
58
+ /**
59
+ * Get the recovery signer config
60
+ * @returns The recovery signer config
61
+ * @experimental This API is experimental and may change in the future
62
+ */
63
+ get recovery(): SignerConfigForChain<C>;
64
+ /**
65
+ * Get the wallet balances - always includes USDC and native token (ETH/SOL)
66
+ * @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
67
+ * @returns {Promise<Balances<C>>} The balances returns nativeToken, usdc, tokens
68
+ * @throws {Error} If the balances cannot be retrieved
69
+ */
70
+ balances(tokens?: string[]): Promise<Balances<C>>;
71
+ /**
72
+ * Funds the wallet with Crossmint's stablecoin (USDXM).
73
+ *
74
+ * **Note:** This method is only available in staging environments and exclusively supports USDXM tokens.
75
+ * It cannot be used in production environments.
76
+ * @param amount - The amount of USDXM to fund the wallet with
77
+ * @param chain - Optional chain to fund on. If not provided, uses the wallet's default chain
78
+ * @returns The funding response
79
+ * @throws {Error} If the funding operation fails or if called in a production environment
80
+ */
81
+ stagingFund(amount: number, chain?: Chain): Promise<FundWalletResponse>;
82
+ /**
83
+ * Transform the API balance response to the new structure
84
+ * @private
85
+ */
86
+ private transformBalanceResponse;
87
+ /**
88
+ * Get the wallet NFTs
89
+ * @param params - The parameters
90
+ * @param params.perPage - The number of NFTs per page
91
+ * @param params.page - The page number
92
+ * @returns The NFTs
93
+ */
94
+ nfts(params: {
95
+ perPage: number;
96
+ page: number;
97
+ }): Promise<unknown>;
98
+ /**
99
+ * Get the wallet transactions
100
+ * @returns The transactions
101
+ * @throws {Error} If the transactions cannot be retrieved
102
+ */
103
+ transactions(): Promise<GetTransactionsResponse>;
104
+ /**
105
+ * Get a transaction by id
106
+ * @returns The transaction
107
+ * @throws {Error} If the transaction cannot be retrieved
108
+ */
109
+ transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
110
+ /**
111
+ * Get the wallet transfers
112
+ * @returns The transfers
113
+ * @throws {Error} If the transfers cannot be retrieved
114
+ */
115
+ transfers(params?: {
116
+ tokens?: string;
117
+ status?: "successful" | "failed";
118
+ }): Promise<Transfers>;
119
+ /**
120
+ * Send a token to a wallet or user locator
121
+ * @param {string | UserLocator} to - The recipient (address or user locator)
122
+ * @param {string} token - The token (address or currency symbol)
123
+ * @param {string} amount - The amount to send (decimal units)
124
+ * @param {TransactionInputOptions} options - The options for the transaction
125
+ * @returns {Transaction} The transaction
126
+ */
127
+ send<T extends SendTokenTransactionOptions | undefined = undefined>(to: string | UserLocator, token: string, amount: string, options?: T): Promise<Transaction<T extends PrepareOnly<true> ? true : false>>;
128
+ /**
129
+ * @deprecated Use `approve` instead.
130
+ * Approve a transaction
131
+ * @param params - The parameters
132
+ * @param params.transactionId - The transaction id
133
+ * @param params.options - The options for the transaction
134
+ * @param params.options.approval - The approval
135
+ * @param params.options.additionalSigners - The additional signers
136
+ * @returns The transaction
137
+ */
138
+ approveTransaction(params: ApproveParams): Promise<Error>;
139
+ /**
140
+ * Approve a transaction or signature
141
+ * @param params - The parameters
142
+ * @param params.transactionId - The transaction id
143
+ * @param params.signatureId - The signature id
144
+ * @param params.options - The options for the approval
145
+ * @param params.options.approval - The approval data
146
+ * @param params.options.additionalSigners - Additional signers for the approval
147
+ * @returns The transaction or signature
148
+ */
149
+ approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
150
+ /**
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
156
+ * @param options - The options for the operation
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> : Signer>;
160
+ /**
161
+ * Set the active signer for this wallet.
162
+ * Accepts a signer config object. The locator is inferred internally.
163
+ * Works for both registered signers and the recovery 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 registered and recovery signers).
173
+ *
174
+ * @param signer - The signer config object to use
175
+ */
176
+ useSigner(signer: SignerConfigForChain<C>): Promise<void>;
177
+ /**
178
+ * Resolve a non-device signer: check registration first, then fall back to recovery.
179
+ * For passkeys without an explicit credential id, auto-selects from registered signers.
180
+ */
181
+ private resolveNonDeviceSigner;
182
+ /**
183
+ * Try to auto-select a passkey credential from registered 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 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
+ * Check if a signer is approved and usable for the current wallet chain.
202
+ * @param signerLocator - The locator of the signer to check
203
+ * @returns true if the signer is approved for this chain
204
+ */
205
+ isSignerApproved(signerLocator: SignerLocator | string): Promise<boolean>;
206
+ /**
207
+ * Whether the wallet needs recovery (signer registration) before the next transaction.
208
+ * @returns true if recovery is needed
209
+ */
210
+ needsRecovery(): boolean;
211
+ /**
212
+ * Register a device signer with the wallet using the recovery signer.
213
+ * Generates a new device key and registers it on-chain.
214
+ * Returns early if the device signer's locator is already approved on-chain.
215
+ */
216
+ recover(): Promise<void>;
217
+ /**
218
+ * List the signers for this wallet.
219
+ * Returns full signer objects with status.
220
+ * For EVM wallets, only signers with an approval (pending or completed) for the wallet's chain are included.
221
+ * @returns {Promise<WalletSigner[]>} The signers
222
+ */
223
+ signers(): Promise<Signer[]>;
224
+ protected get walletLocator(): WalletLocator;
225
+ /**
226
+ * Ensures that a signer is available. Throws if the wallet is read-only.
227
+ */
228
+ protected requireSigner(): SignerAdapter;
229
+ protected preAuthIfNeeded(): Promise<void>;
230
+ /**
231
+ * Check if a signer config matches the wallet's recovery signer.
232
+ */
233
+ private isRecoverySigner;
234
+ /**
235
+ * Validate that the signer input has the required values for its type.
236
+ */
237
+ private validateSignerInput;
238
+ /**
239
+ * Check if a device signer key is available locally, or flag for recovery.
240
+ * Looks up device key storage by wallet address, then by matching registered device signers.
241
+ * If no key is found, sets needsRecovery so a new device key is generated during the next transaction.
242
+ */
243
+ private resolveDeviceSignerAvailability;
244
+ private assembleFullSigner;
245
+ private getSignerState;
246
+ /**
247
+ * Build an InternalSignerConfig from a SignerConfigForChain.
248
+ */
249
+ private buildInternalSignerConfig;
250
+ protected get isSolanaWallet(): boolean;
251
+ protected resolveChainForEnvironment(): C;
252
+ protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
253
+ hash: string;
254
+ explorerLink: string;
255
+ transactionId: string;
256
+ }>;
257
+ protected approveSignatureAndWait(signatureId: string, options?: ApproveOptions): Promise<{
258
+ signature: string;
259
+ signatureId: string;
260
+ }>;
261
+ protected approveSignatureInternal(signatureId: string, options?: ApproveOptions): Promise<ApproveSignatureResponse>;
262
+ protected approveTransactionInternal(transactionId: string, options?: ApproveOptions): Promise<WalletsTransactionV2025ResponseDto>;
263
+ private executeApproveTransactionWithErrorHandling;
264
+ private executeApproveSignatureWithErrorHandling;
265
+ protected waitForSignature(signatureId: string): Promise<Signature<false>>;
266
+ protected waitForTransaction(transactionId: string, timeoutMs?: number, { backoffMultiplier, maxBackoffMs, initialBackoffMs, }?: {
267
+ initialBackoffMs?: number;
268
+ backoffMultiplier?: number;
269
+ maxBackoffMs?: number;
270
+ }): Promise<Transaction<false>>;
271
+ protected sleep(ms: number): Promise<unknown>;
272
+ }
273
+
274
+ export { Wallet };
@@ -0,0 +1,274 @@
1
+ import { WalletsTransactionV2025ResponseDto } from '../api/gen/types.gen.js';
2
+ import { ApiClient } from '../api/client.js';
3
+ import { f as WalletOptions, r as SignerConfigForChain, m as SignerAdapter, B as Balances, Y as FundWalletResponse, Z as GetTransactionsResponse, _ as GetTransactionSuccessResponse, T as Transfers, $ as SendTokenTransactionOptions, a0 as UserLocator, c as Transaction, O as PrepareOnly, A as ApproveParams, a1 as ApproveResult, k as AddSignerOptions, q as ServerSignerConfig, o as ExternalWalletRegistrationConfig, a2 as AddSignerReturnType, S as Signer, s as SignerLocator, a3 as WalletLocator, j as ApproveOptions, a4 as ApproveSignatureResponse, h as Signature } from '../types-vcGYTcL0.js';
4
+ import { Chain } from '../chains/chains.js';
5
+ import '@crossmint/common-sdk-base';
6
+ import 'viem';
7
+ import 'ox';
8
+ import '@crossmint/client-sdk-window';
9
+ import '@crossmint/client-signers';
10
+ import '@solana/web3.js';
11
+ import 'abitype';
12
+ import '../utils/device-signers/DeviceSignerKeyStorage.js';
13
+
14
+ type WalletContructorType<C extends Chain> = {
15
+ chain: C;
16
+ address: string;
17
+ owner?: string;
18
+ alias?: string;
19
+ options?: WalletOptions;
20
+ recovery: SignerConfigForChain<C>;
21
+ signers?: SignerConfigForChain<C>[];
22
+ signer?: SignerAdapter;
23
+ };
24
+ declare class Wallet<C extends Chain> {
25
+ #private;
26
+ chain: C;
27
+ address: string;
28
+ owner?: string;
29
+ alias?: string;
30
+ constructor(args: WalletContructorType<C>, apiClient: ApiClient);
31
+ get signer(): SignerAdapter | 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;
52
+ protected static getApiClient<C extends Chain>(wallet: Wallet<C>): ApiClient;
53
+ protected static getOptions<C extends Chain>(wallet: Wallet<C>): WalletOptions | undefined;
54
+ protected static getRecovery<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>;
55
+ protected static getInitialSigners<C extends Chain>(wallet: Wallet<C>): SignerConfigForChain<C>[];
56
+ get apiClient(): ApiClient;
57
+ protected get options(): WalletOptions | undefined;
58
+ /**
59
+ * Get the recovery signer config
60
+ * @returns The recovery signer config
61
+ * @experimental This API is experimental and may change in the future
62
+ */
63
+ get recovery(): SignerConfigForChain<C>;
64
+ /**
65
+ * Get the wallet balances - always includes USDC and native token (ETH/SOL)
66
+ * @param {string[]} tokens - Additional tokens to request (optional: native token and usdc are always included)
67
+ * @returns {Promise<Balances<C>>} The balances returns nativeToken, usdc, tokens
68
+ * @throws {Error} If the balances cannot be retrieved
69
+ */
70
+ balances(tokens?: string[]): Promise<Balances<C>>;
71
+ /**
72
+ * Funds the wallet with Crossmint's stablecoin (USDXM).
73
+ *
74
+ * **Note:** This method is only available in staging environments and exclusively supports USDXM tokens.
75
+ * It cannot be used in production environments.
76
+ * @param amount - The amount of USDXM to fund the wallet with
77
+ * @param chain - Optional chain to fund on. If not provided, uses the wallet's default chain
78
+ * @returns The funding response
79
+ * @throws {Error} If the funding operation fails or if called in a production environment
80
+ */
81
+ stagingFund(amount: number, chain?: Chain): Promise<FundWalletResponse>;
82
+ /**
83
+ * Transform the API balance response to the new structure
84
+ * @private
85
+ */
86
+ private transformBalanceResponse;
87
+ /**
88
+ * Get the wallet NFTs
89
+ * @param params - The parameters
90
+ * @param params.perPage - The number of NFTs per page
91
+ * @param params.page - The page number
92
+ * @returns The NFTs
93
+ */
94
+ nfts(params: {
95
+ perPage: number;
96
+ page: number;
97
+ }): Promise<unknown>;
98
+ /**
99
+ * Get the wallet transactions
100
+ * @returns The transactions
101
+ * @throws {Error} If the transactions cannot be retrieved
102
+ */
103
+ transactions(): Promise<GetTransactionsResponse>;
104
+ /**
105
+ * Get a transaction by id
106
+ * @returns The transaction
107
+ * @throws {Error} If the transaction cannot be retrieved
108
+ */
109
+ transaction(transactionId: string): Promise<GetTransactionSuccessResponse>;
110
+ /**
111
+ * Get the wallet transfers
112
+ * @returns The transfers
113
+ * @throws {Error} If the transfers cannot be retrieved
114
+ */
115
+ transfers(params?: {
116
+ tokens?: string;
117
+ status?: "successful" | "failed";
118
+ }): Promise<Transfers>;
119
+ /**
120
+ * Send a token to a wallet or user locator
121
+ * @param {string | UserLocator} to - The recipient (address or user locator)
122
+ * @param {string} token - The token (address or currency symbol)
123
+ * @param {string} amount - The amount to send (decimal units)
124
+ * @param {TransactionInputOptions} options - The options for the transaction
125
+ * @returns {Transaction} The transaction
126
+ */
127
+ send<T extends SendTokenTransactionOptions | undefined = undefined>(to: string | UserLocator, token: string, amount: string, options?: T): Promise<Transaction<T extends PrepareOnly<true> ? true : false>>;
128
+ /**
129
+ * @deprecated Use `approve` instead.
130
+ * Approve a transaction
131
+ * @param params - The parameters
132
+ * @param params.transactionId - The transaction id
133
+ * @param params.options - The options for the transaction
134
+ * @param params.options.approval - The approval
135
+ * @param params.options.additionalSigners - The additional signers
136
+ * @returns The transaction
137
+ */
138
+ approveTransaction(params: ApproveParams): Promise<Error>;
139
+ /**
140
+ * Approve a transaction or signature
141
+ * @param params - The parameters
142
+ * @param params.transactionId - The transaction id
143
+ * @param params.signatureId - The signature id
144
+ * @param params.options - The options for the approval
145
+ * @param params.options.approval - The approval data
146
+ * @param params.options.additionalSigners - Additional signers for the approval
147
+ * @returns The transaction or signature
148
+ */
149
+ approve<T extends ApproveParams>(params: T): Promise<ApproveResult<T>>;
150
+ /**
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
156
+ * @param options - The options for the operation
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> : Signer>;
160
+ /**
161
+ * Set the active signer for this wallet.
162
+ * Accepts a signer config object. The locator is inferred internally.
163
+ * Works for both registered signers and the recovery 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 registered and recovery signers).
173
+ *
174
+ * @param signer - The signer config object to use
175
+ */
176
+ useSigner(signer: SignerConfigForChain<C>): Promise<void>;
177
+ /**
178
+ * Resolve a non-device signer: check registration first, then fall back to recovery.
179
+ * For passkeys without an explicit credential id, auto-selects from registered signers.
180
+ */
181
+ private resolveNonDeviceSigner;
182
+ /**
183
+ * Try to auto-select a passkey credential from registered 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 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
+ * Check if a signer is approved and usable for the current wallet chain.
202
+ * @param signerLocator - The locator of the signer to check
203
+ * @returns true if the signer is approved for this chain
204
+ */
205
+ isSignerApproved(signerLocator: SignerLocator | string): Promise<boolean>;
206
+ /**
207
+ * Whether the wallet needs recovery (signer registration) before the next transaction.
208
+ * @returns true if recovery is needed
209
+ */
210
+ needsRecovery(): boolean;
211
+ /**
212
+ * Register a device signer with the wallet using the recovery signer.
213
+ * Generates a new device key and registers it on-chain.
214
+ * Returns early if the device signer's locator is already approved on-chain.
215
+ */
216
+ recover(): Promise<void>;
217
+ /**
218
+ * List the signers for this wallet.
219
+ * Returns full signer objects with status.
220
+ * For EVM wallets, only signers with an approval (pending or completed) for the wallet's chain are included.
221
+ * @returns {Promise<WalletSigner[]>} The signers
222
+ */
223
+ signers(): Promise<Signer[]>;
224
+ protected get walletLocator(): WalletLocator;
225
+ /**
226
+ * Ensures that a signer is available. Throws if the wallet is read-only.
227
+ */
228
+ protected requireSigner(): SignerAdapter;
229
+ protected preAuthIfNeeded(): Promise<void>;
230
+ /**
231
+ * Check if a signer config matches the wallet's recovery signer.
232
+ */
233
+ private isRecoverySigner;
234
+ /**
235
+ * Validate that the signer input has the required values for its type.
236
+ */
237
+ private validateSignerInput;
238
+ /**
239
+ * Check if a device signer key is available locally, or flag for recovery.
240
+ * Looks up device key storage by wallet address, then by matching registered device signers.
241
+ * If no key is found, sets needsRecovery so a new device key is generated during the next transaction.
242
+ */
243
+ private resolveDeviceSignerAvailability;
244
+ private assembleFullSigner;
245
+ private getSignerState;
246
+ /**
247
+ * Build an InternalSignerConfig from a SignerConfigForChain.
248
+ */
249
+ private buildInternalSignerConfig;
250
+ protected get isSolanaWallet(): boolean;
251
+ protected resolveChainForEnvironment(): C;
252
+ protected approveTransactionAndWait(transactionId: string, options?: ApproveOptions): Promise<{
253
+ hash: string;
254
+ explorerLink: string;
255
+ transactionId: string;
256
+ }>;
257
+ protected approveSignatureAndWait(signatureId: string, options?: ApproveOptions): Promise<{
258
+ signature: string;
259
+ signatureId: string;
260
+ }>;
261
+ protected approveSignatureInternal(signatureId: string, options?: ApproveOptions): Promise<ApproveSignatureResponse>;
262
+ protected approveTransactionInternal(transactionId: string, options?: ApproveOptions): Promise<WalletsTransactionV2025ResponseDto>;
263
+ private executeApproveTransactionWithErrorHandling;
264
+ private executeApproveSignatureWithErrorHandling;
265
+ protected waitForSignature(signatureId: string): Promise<Signature<false>>;
266
+ protected waitForTransaction(transactionId: string, timeoutMs?: number, { backoffMultiplier, maxBackoffMs, initialBackoffMs, }?: {
267
+ initialBackoffMs?: number;
268
+ backoffMultiplier?: number;
269
+ maxBackoffMs?: number;
270
+ }): Promise<Transaction<false>>;
271
+ protected sleep(ms: number): Promise<unknown>;
272
+ }
273
+
274
+ export { Wallet };
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-Q7CG36OB.js";import"../chunk-TOAFCAVT.js";import"../chunk-N4IWDL6M.js";import"../chunk-2DANZH3R.js";import"../chunk-IOSADDL5.js";import"../chunk-GOXB2RBF.js";import"../chunk-VADIEIDS.js";import"../chunk-SLXO6E5S.js";import"../chunk-L52GDMSH.js";import"../chunk-6X5JEJD7.js";import"../chunk-QM3BB4E2.js";import"../chunk-RBSMBO4T.js";import"../chunk-OQZTL6ZG.js";import"../chunk-N355UETO.js";import"../chunk-3VRN3GKQ.js";import"../chunk-BITOMWYZ.js";import"../chunk-YDZRBHS3.js";import"../chunk-N5622OKA.js";import"../chunk-CBKN4SEV.js";import"../chunk-KYHZI332.js";import"../chunk-5LWJMR24.js";import"../chunk-O6VBO7KG.js";import"../chunk-EM3D5Q3A.js";import"../chunk-EE4ITUGS.js";import"../chunk-WCGUGIGJ.js";import"../chunk-XNZLCUTY.js";import"../chunk-CKZYSQOK.js";import"../chunk-QVTKTDED.js";import"../chunk-XS5B3TUE.js";import"../chunk-M335XCYO.js";import"../chunk-YH7G2U6V.js";import"../chunk-W7LJS32A.js";import"../chunk-2YLRFJ66.js";import"../chunk-KY7JXYJT.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-EXC7TCGL.js";import"../chunk-455NK5LB.js";import"../chunk-B6GZ3H2H.js";import"../chunk-XLOZ34NX.js";import"../chunk-J3R36SGJ.js";export{a as Wallet};