@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,323 +0,0 @@
1
- import {
2
- NcsIframeManager
3
- } from "./chunk-FOOISYCJ.js";
4
- import {
5
- AuthRejectedError
6
- } from "./chunk-WJUPOCKJ.js";
7
- import {
8
- walletsLogger
9
- } from "./chunk-XEPUH4XH.js";
10
- import {
11
- __async,
12
- __decorateClass
13
- } from "./chunk-ASE2FXWP.js";
14
-
15
- // src/signers/non-custodial/ncs-signer.ts
16
- import { validateAPIKey, WithLoggerContext } from "@crossmint/common-sdk-base";
17
- var NonCustodialSigner = class {
18
- constructor(config) {
19
- this.config = config;
20
- this._needsAuth = true;
21
- this._authPromise = null;
22
- this._initializationPromise = null;
23
- if (typeof window !== "undefined") {
24
- this.initialize();
25
- }
26
- this.type = this.config.type;
27
- }
28
- locator() {
29
- return this.config.locator;
30
- }
31
- address() {
32
- return this.config.address;
33
- }
34
- initialize() {
35
- return __async(this, null, function* () {
36
- if (this.config.clientTEEConnection == null) {
37
- const parsedAPIKey = validateAPIKey(this.config.crossmint.apiKey);
38
- if (!parsedAPIKey.isValid) {
39
- throw new Error("Invalid API key");
40
- }
41
- const iframeManager = new NcsIframeManager({
42
- environment: parsedAPIKey.environment
43
- });
44
- this.config.clientTEEConnection = yield iframeManager.initialize();
45
- }
46
- });
47
- }
48
- getTEEConnection() {
49
- return __async(this, null, function* () {
50
- if (this.config.clientTEEConnection == null) {
51
- if (this._initializationPromise) {
52
- yield this._initializationPromise;
53
- return this.config.clientTEEConnection;
54
- }
55
- this._initializationPromise = this.initializeTEEConnection();
56
- try {
57
- yield this._initializationPromise;
58
- } finally {
59
- this._initializationPromise = null;
60
- }
61
- }
62
- return this.config.clientTEEConnection;
63
- });
64
- }
65
- initializeTEEConnection() {
66
- return __async(this, null, function* () {
67
- walletsLogger.info("TEE connection not initialized, initializing now");
68
- const parsedAPIKey = validateAPIKey(this.config.crossmint.apiKey);
69
- if (!parsedAPIKey.isValid) {
70
- throw new Error("Invalid API key");
71
- }
72
- const iframeManager = new NcsIframeManager({
73
- environment: parsedAPIKey.environment
74
- });
75
- this.config.clientTEEConnection = yield iframeManager.initialize();
76
- if (this.config.clientTEEConnection == null) {
77
- throw new Error("Failed to initialize TEE connection");
78
- }
79
- walletsLogger.info("TEE connection initialized successfully");
80
- });
81
- }
82
- handleAuthRequired() {
83
- return __async(this, null, function* () {
84
- var _a, _b;
85
- const clientTEEConnection = yield this.getTEEConnection();
86
- if (this.config.onAuthRequired == null) {
87
- throw new Error(
88
- `${this.type} signer requires the onAuthRequired callback to handle OTP verification. This callback manages the authentication flow (sending OTP and verifying user input). If using our React/React Native SDK, this is handled automatically by the provider. For other environments, implement: onAuthRequired: (needsAuth, sendEmailWithOtp, verifyOtp, reject) => { /* your UI logic */ }`
89
- );
90
- }
91
- walletsLogger.info("get-status: sending request");
92
- const startTime = Date.now();
93
- const signerResponse = yield clientTEEConnection.sendAction({
94
- event: "request:get-status",
95
- responseEvent: "response:get-status",
96
- data: {
97
- authData: {
98
- jwt: (_b = (_a = this.config.crossmint.experimental_customAuth) == null ? void 0 : _a.jwt) != null ? _b : "",
99
- apiKey: this.config.crossmint.apiKey
100
- }
101
- },
102
- options: DEFAULT_EVENT_OPTIONS
103
- });
104
- const durationMs = Date.now() - startTime;
105
- if ((signerResponse == null ? void 0 : signerResponse.status) !== "success") {
106
- walletsLogger.error("get-status: failed", {
107
- status: signerResponse == null ? void 0 : signerResponse.status,
108
- error: signerResponse == null ? void 0 : signerResponse.error,
109
- durationMs
110
- });
111
- throw new Error(signerResponse == null ? void 0 : signerResponse.error);
112
- }
113
- walletsLogger.info("get-status: response received", {
114
- signerStatus: signerResponse.signerStatus,
115
- durationMs
116
- });
117
- if (signerResponse.signerStatus === "ready") {
118
- this._needsAuth = false;
119
- return;
120
- } else {
121
- this._needsAuth = true;
122
- }
123
- walletsLogger.info("Auth required, initiating OTP flow", { needsAuth: this._needsAuth });
124
- const { promise, resolve, reject } = this.createAuthPromise();
125
- this._authPromise = { promise, resolve, reject };
126
- if (this.config.onAuthRequired) {
127
- try {
128
- yield this.config.onAuthRequired(
129
- this._needsAuth,
130
- () => this.sendMessageWithOtp(),
131
- (otp) => this.verifyOtp(otp),
132
- () => __async(this, null, function* () {
133
- walletsLogger.info("Auth rejected", { authRejected: true });
134
- this._needsAuth = false;
135
- if (this.config.onAuthRequired != null) {
136
- yield this.config.onAuthRequired(
137
- this._needsAuth,
138
- () => this.sendMessageWithOtp(),
139
- (otp) => this.verifyOtp(otp),
140
- () => {
141
- var _a2;
142
- return (_a2 = this._authPromise) == null ? void 0 : _a2.reject(new AuthRejectedError());
143
- }
144
- );
145
- }
146
- reject(new AuthRejectedError());
147
- })
148
- );
149
- } catch (error) {
150
- walletsLogger.error("handleAuthRequired error", { error });
151
- reject(error);
152
- }
153
- }
154
- try {
155
- yield promise;
156
- } catch (error) {
157
- walletsLogger.error("handleAuthRequired promise error", { error });
158
- throw error;
159
- }
160
- });
161
- }
162
- ensureAuthenticated() {
163
- return __async(this, null, function* () {
164
- yield this.handleAuthRequired();
165
- });
166
- }
167
- getJwtOrThrow() {
168
- var _a;
169
- const jwt = (_a = this.config.crossmint.experimental_customAuth) == null ? void 0 : _a.jwt;
170
- if (jwt == null) {
171
- throw new Error("JWT is required");
172
- }
173
- return jwt;
174
- }
175
- createAuthPromise() {
176
- let resolvePromise;
177
- let rejectPromise;
178
- const promise = new Promise((resolve, reject) => {
179
- resolvePromise = resolve;
180
- rejectPromise = reject;
181
- });
182
- return { promise, resolve: resolvePromise, reject: rejectPromise };
183
- }
184
- sendMessageWithOtp() {
185
- return __async(this, null, function* () {
186
- var _a, _b, _c;
187
- const handshakeParent = yield this.getTEEConnection();
188
- const authId = this.getAuthId();
189
- walletsLogger.info("start-onboarding: sending request");
190
- const startTime = Date.now();
191
- const response = yield handshakeParent.sendAction({
192
- event: "request:start-onboarding",
193
- responseEvent: "response:start-onboarding",
194
- data: {
195
- authData: {
196
- jwt: (_b = (_a = this.config.crossmint.experimental_customAuth) == null ? void 0 : _a.jwt) != null ? _b : "",
197
- apiKey: this.config.crossmint.apiKey
198
- },
199
- data: { authId }
200
- },
201
- options: DEFAULT_EVENT_OPTIONS
202
- });
203
- const durationMs = Date.now() - startTime;
204
- walletsLogger.info("start-onboarding: response received", {
205
- status: response == null ? void 0 : response.status,
206
- durationMs
207
- });
208
- if ((response == null ? void 0 : response.status) === "success" && response.signerStatus === "ready") {
209
- this._needsAuth = false;
210
- return;
211
- }
212
- if ((response == null ? void 0 : response.status) === "error") {
213
- walletsLogger.error("start-onboarding: failed", { error: response.error });
214
- (_c = this._authPromise) == null ? void 0 : _c.reject(new Error(response.error || "Failed to initiate OTP process."));
215
- }
216
- });
217
- }
218
- getAuthId() {
219
- if (this.config.type === "email") {
220
- return `email:${this.config.email}`;
221
- }
222
- return `phone:${this.config.phone}`;
223
- }
224
- verifyOtp(encryptedOtp) {
225
- return __async(this, null, function* () {
226
- var _a, _b, _c, _d, _e;
227
- let response;
228
- try {
229
- const handshakeParent = yield this.getTEEConnection();
230
- walletsLogger.info("complete-onboarding: sending request");
231
- const startTime = Date.now();
232
- response = yield handshakeParent.sendAction({
233
- event: "request:complete-onboarding",
234
- responseEvent: "response:complete-onboarding",
235
- data: {
236
- authData: {
237
- jwt: (_b = (_a = this.config.crossmint.experimental_customAuth) == null ? void 0 : _a.jwt) != null ? _b : "",
238
- apiKey: this.config.crossmint.apiKey
239
- },
240
- data: {
241
- onboardingAuthentication: { encryptedOtp }
242
- }
243
- },
244
- options: DEFAULT_EVENT_OPTIONS
245
- });
246
- walletsLogger.info("complete-onboarding: response received", {
247
- status: response == null ? void 0 : response.status,
248
- durationMs: Date.now() - startTime
249
- });
250
- } catch (err) {
251
- walletsLogger.error("complete-onboarding: error", { error: err });
252
- this._needsAuth = true;
253
- (_c = this._authPromise) == null ? void 0 : _c.reject(err);
254
- throw err;
255
- }
256
- if ((response == null ? void 0 : response.status) === "success") {
257
- this._needsAuth = false;
258
- if (this.config.onAuthRequired != null) {
259
- yield this.config.onAuthRequired(
260
- this._needsAuth,
261
- () => this.sendMessageWithOtp(),
262
- (otp) => this.verifyOtp(otp),
263
- () => {
264
- var _a2;
265
- return (_a2 = this._authPromise) == null ? void 0 : _a2.reject(new AuthRejectedError());
266
- }
267
- );
268
- }
269
- (_d = this._authPromise) == null ? void 0 : _d.resolve();
270
- return;
271
- }
272
- walletsLogger.error("complete-onboarding: OTP validation failed", { status: response == null ? void 0 : response.status });
273
- this._needsAuth = true;
274
- const errorMessage = (response == null ? void 0 : response.status) === "error" ? response.error : "Failed to validate encrypted OTP";
275
- const error = new Error(errorMessage);
276
- (_e = this._authPromise) == null ? void 0 : _e.reject(error);
277
- throw error;
278
- });
279
- }
280
- /**
281
- * Export the private key for this signer
282
- * @throws {Error} If signer is not authenticated
283
- */
284
- _exportPrivateKey(exportTEEConnection) {
285
- return __async(this, null, function* () {
286
- yield this.handleAuthRequired();
287
- const jwt = this.getJwtOrThrow();
288
- const { scheme, encoding } = this.getChainKeyParams();
289
- const response = yield exportTEEConnection.sendAction({
290
- event: "request:export-signer",
291
- responseEvent: "response:export-signer",
292
- data: {
293
- authData: {
294
- jwt,
295
- apiKey: this.config.crossmint.apiKey
296
- },
297
- data: {
298
- scheme,
299
- encoding
300
- }
301
- },
302
- options: DEFAULT_EVENT_OPTIONS
303
- });
304
- if ((response == null ? void 0 : response.status) === "error") {
305
- throw new Error(response.error || "Failed to export private key");
306
- }
307
- });
308
- }
309
- };
310
- __decorateClass([
311
- WithLoggerContext({
312
- logger: walletsLogger,
313
- methodName: "handleAuthRequired"
314
- })
315
- ], NonCustodialSigner.prototype, "handleAuthRequired", 1);
316
- var DEFAULT_EVENT_OPTIONS = {
317
- timeoutMs: 3e4
318
- };
319
-
320
- export {
321
- NonCustodialSigner,
322
- DEFAULT_EVENT_OPTIONS
323
- };
@@ -1,74 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/api/__tests__/constants.ts
2
- var HTTP_ERROR_STATUSES = [
3
- { status: 400, message: "Bad Request" },
4
- { status: 401, message: "Unauthorized" },
5
- { status: 403, message: "Forbidden" },
6
- { status: 404, message: "Not Found" },
7
- { status: 429, message: "Rate limit exceeded" },
8
- { status: 500, message: "Internal server error" },
9
- { status: 502, message: "Bad Gateway" },
10
- { status: 503, message: "Service Unavailable" }
11
- ];
12
- var WALLET_LOCATORS = {
13
- evmSmart: "me:evm:smart",
14
- evmMpc: "me:evm:mpc",
15
- solanaSmart: "me:solana:smart",
16
- solanaAddress: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
17
- evmAddress: "0x1234567890123456789012345678901234567890",
18
- evmAddressWithSpecialChars: "0xABCDEFabcdef0123456789ABCDEFabcdef012345"
19
- };
20
- var TOKEN_LOCATORS = {
21
- eth: "base-sepolia:eth",
22
- usdc: "base-sepolia:usdc",
23
- sol: "solana:sol",
24
- customContract: "base-sepolia:0x1234567890123456789012345678901234567890",
25
- tokenWithSpecialChars: "base-sepolia:0xABCDEFabcdef0123456789ABCDEFabcdef012345"
26
- };
27
- var TIMEOUT_SHORT = 3e4;
28
- var TIMEOUT_MEDIUM = 6e4;
29
- var TIMEOUT_LONG = 12e4;
30
- var DELAY_SHORT = 200;
31
- var DELAY_MEDIUM = 500;
32
- var DELAY_LONG = 1e3;
33
- var DELAY_RATE_LIMIT_WINDOW = 2e3;
34
- var TEST_ADDRESSES = {
35
- EVM_ADMIN_SIGNER: "0xe5E91D9b21C3563011cc332B050150fb9211bBEB",
36
- SOLANA_ADMIN_SIGNER: "CsHuaddA9J8j9vSTdL9wpvBsyjYe4F7iQQLuPg3EUqsU",
37
- EVM_RECIPIENT: "0xDF8b5F9c19E187f1Ea00730a1e46180152244315",
38
- EVM_NON_EXISTENT: "0x0000000000000000000000000000000000000000",
39
- EVM_TEST: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
40
- };
41
- var TEST_VALUES = {
42
- FUNDING_AMOUNT_SMALL: 1,
43
- FUNDING_AMOUNT_LARGE: 10,
44
- SEND_AMOUNT_SMALL: "0.0001",
45
- SEND_AMOUNT_VERY_SMALL: "0.000000000000000001",
46
- SEND_AMOUNT_ZERO: "0",
47
- SEND_AMOUNT_INVALID: "999999999999999999.0",
48
- SEND_AMOUNT_EXTREME: "999999999999999999999999999999.999999999999999999",
49
- LONG_STRING_LENGTH: 1e4,
50
- CONCURRENT_REQUESTS: 3,
51
- RAPID_SEQUENTIAL_COUNT: 3,
52
- RATE_LIMIT_BATCH_SIZE: 5,
53
- RATE_LIMIT_BATCHES: 3,
54
- RATE_LIMIT_RAPID_COUNT: 20,
55
- RATE_LIMIT_STRESS_COUNT: 50,
56
- APPROVE_TRANSACTION_MAX_RETRIES: 10
57
- };
58
- var MOCK_API_KEY = "ck_development_A61UZQnvjSQcM5qVBaBactgqebxafWAVsNdD2xLkgBxoYuH5q2guM8r9DUmZQzE1WYyoByGVYpEG2o9gVSzAZFsrLbfKGERUJ6D5CW6S9AsJGAc3ctgrsD4n2ioekzGj7KPbLwT3SysDjMamYXLxEroUbQSdwf6aLF4zeEpECq2crkTUQeLFzxzmjWNxFDHFYefDrfrFPCURvBXJLf5pCxCQ";
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
- exports.HTTP_ERROR_STATUSES = HTTP_ERROR_STATUSES; exports.WALLET_LOCATORS = WALLET_LOCATORS; exports.TOKEN_LOCATORS = TOKEN_LOCATORS; exports.TIMEOUT_SHORT = TIMEOUT_SHORT; exports.TIMEOUT_MEDIUM = TIMEOUT_MEDIUM; exports.TIMEOUT_LONG = TIMEOUT_LONG; exports.DELAY_SHORT = DELAY_SHORT; exports.DELAY_MEDIUM = DELAY_MEDIUM; exports.DELAY_LONG = DELAY_LONG; exports.DELAY_RATE_LIMIT_WINDOW = DELAY_RATE_LIMIT_WINDOW; exports.TEST_ADDRESSES = TEST_ADDRESSES; exports.TEST_VALUES = TEST_VALUES; exports.MOCK_API_KEY = MOCK_API_KEY;
@@ -1,45 +0,0 @@
1
- import {
2
- __async
3
- } from "./chunk-ASE2FXWP.js";
4
-
5
- // src/signers/server/evm-server-signer.ts
6
- import { privateKeyToAccount } from "viem/accounts";
7
- import { bytesToHex } from "@noble/hashes/utils";
8
- var EVMServerSigner = class {
9
- constructor(config) {
10
- this.type = "server";
11
- this.account = privateKeyToAccount(`0x${bytesToHex(config.derivedKeyBytes)}`);
12
- this._address = this.account.address;
13
- this._locator = config.locator;
14
- }
15
- address() {
16
- return this._address;
17
- }
18
- locator() {
19
- return this._locator;
20
- }
21
- signMessage(message) {
22
- return __async(this, null, function* () {
23
- if (!message.startsWith("0x")) {
24
- throw new Error(
25
- `EVMServerSigner.signMessage expects a 0x-prefixed hex string, got: ${message.slice(0, 10)}...`
26
- );
27
- }
28
- const signature = yield this.account.signMessage({
29
- message: {
30
- raw: message
31
- }
32
- });
33
- return { signature };
34
- });
35
- }
36
- signTransaction(transaction) {
37
- return __async(this, null, function* () {
38
- return yield this.signMessage(transaction);
39
- });
40
- }
41
- };
42
-
43
- export {
44
- EVMServerSigner
45
- };
@@ -1,16 +0,0 @@
1
- // package.json
2
- var name = "@crossmint/wallets-sdk";
3
- var version = "0.21.0";
4
-
5
- // src/utils/constants.ts
6
- var WALLETS_SERVICE = "WALLETS_SDK";
7
- var SDK_VERSION = version;
8
- var SDK_NAME = name;
9
- var STATUS_POLLING_INTERVAL_MS = 500;
10
-
11
- export {
12
- WALLETS_SERVICE,
13
- SDK_VERSION,
14
- SDK_NAME,
15
- STATUS_POLLING_INTERVAL_MS
16
- };
@@ -1,10 +0,0 @@
1
- // src/signers/server/helpers/get-chain-type.ts
2
- function getChainType(chain) {
3
- if (chain === "solana") return "solana";
4
- if (chain === "stellar") return "stellar";
5
- return "evm";
6
- }
7
-
8
- export {
9
- getChainType
10
- };
@@ -1,84 +0,0 @@
1
- import {
2
- DEFAULT_EVENT_OPTIONS,
3
- NonCustodialSigner
4
- } from "./chunk-FZQG6OX2.js";
5
- import {
6
- walletsLogger
7
- } from "./chunk-XEPUH4XH.js";
8
- import {
9
- __async
10
- } from "./chunk-ASE2FXWP.js";
11
-
12
- // src/signers/non-custodial/ncs-solana-signer.ts
13
- import { VersionedTransaction } from "@solana/web3.js";
14
- import base58 from "bs58";
15
- var SolanaNonCustodialSigner = class _SolanaNonCustodialSigner extends NonCustodialSigner {
16
- constructor(config) {
17
- super(config);
18
- }
19
- signMessage() {
20
- return __async(this, null, function* () {
21
- return yield Promise.reject(new Error("signMessage method not implemented for email signer"));
22
- });
23
- }
24
- signTransaction(transaction) {
25
- return __async(this, null, function* () {
26
- var _a;
27
- yield this.handleAuthRequired();
28
- const jwt = this.getJwtOrThrow();
29
- const transactionBytes = base58.decode(transaction);
30
- const deserializedTransaction = VersionedTransaction.deserialize(transactionBytes);
31
- const messageData = deserializedTransaction.message.serialize();
32
- walletsLogger.info("sign: sending request", { keyType: "ed25519" });
33
- const startTime = Date.now();
34
- const res = yield (_a = this.config.clientTEEConnection) == null ? void 0 : _a.sendAction({
35
- event: "request:sign",
36
- responseEvent: "response:sign",
37
- data: {
38
- authData: {
39
- jwt,
40
- apiKey: this.config.crossmint.apiKey
41
- },
42
- data: {
43
- keyType: "ed25519",
44
- bytes: base58.encode(messageData),
45
- encoding: "base58"
46
- }
47
- },
48
- options: DEFAULT_EVENT_OPTIONS
49
- });
50
- walletsLogger.info("sign: response received", {
51
- status: res == null ? void 0 : res.status,
52
- durationMs: Date.now() - startTime
53
- });
54
- if ((res == null ? void 0 : res.status) === "error") {
55
- throw new Error(res.error);
56
- }
57
- if ((res == null ? void 0 : res.signature) == null) {
58
- throw new Error("Failed to sign transaction");
59
- }
60
- _SolanaNonCustodialSigner.verifyPublicKeyFormat(res.publicKey);
61
- return { signature: res.signature.bytes };
62
- });
63
- }
64
- static verifyPublicKeyFormat(publicKey) {
65
- if (publicKey == null) {
66
- throw new Error("No public key found");
67
- }
68
- if (publicKey.encoding !== "base58" || publicKey.keyType !== "ed25519" || publicKey.bytes == null) {
69
- throw new Error(
70
- "Not supported. Expected public key to be in base58 encoding and ed25519 key type. Got: " + JSON.stringify(publicKey)
71
- );
72
- }
73
- }
74
- getChainKeyParams() {
75
- return {
76
- scheme: "ed25519",
77
- encoding: "base58"
78
- };
79
- }
80
- };
81
-
82
- export {
83
- SolanaNonCustodialSigner
84
- };
@@ -1,25 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/chains/definitions/arcTestnet.ts
2
- var _viem = require('viem');
3
- var arcTestnet = _viem.defineChain.call(void 0, {
4
- id: 5042002,
5
- name: "Arc Testnet",
6
- nativeCurrency: {
7
- decimals: 6,
8
- name: "USDC",
9
- symbol: "USDC"
10
- },
11
- rpcUrls: {
12
- default: { http: ["https://rpc.testnet.arc.network"] }
13
- },
14
- blockExplorers: {
15
- default: {
16
- name: "Arc Testnet Explorer",
17
- url: "https://testnet.arcscan.app"
18
- }
19
- },
20
- testnet: true
21
- });
22
-
23
-
24
-
25
- exports.arcTestnet = arcTestnet;
@@ -1,42 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
- var _chunkUO2J2ZB2cjs = require('./chunk-UO2J2ZB2.cjs');
4
-
5
- // src/signers/server/solana-server-signer.ts
6
- var _web3js = require('@solana/web3.js');
7
- var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
8
- var _tweetnacl = require('tweetnacl'); var _tweetnacl2 = _interopRequireDefault(_tweetnacl);
9
- var SolanaServerSigner = class {
10
- constructor(config) {
11
- this.type = "server";
12
- this.keypair = _web3js.Keypair.fromSeed(config.derivedKeyBytes);
13
- this._address = this.keypair.publicKey.toBase58();
14
- this._locator = config.locator;
15
- }
16
- address() {
17
- return this._address;
18
- }
19
- locator() {
20
- return this._locator;
21
- }
22
- signMessage(message) {
23
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
24
- const messageBytes = _bs582.default.decode(message);
25
- const signatureBytes = _tweetnacl2.default.sign.detached(messageBytes, this.keypair.secretKey);
26
- return { signature: _bs582.default.encode(signatureBytes) };
27
- });
28
- }
29
- signTransaction(transaction) {
30
- return _chunkUO2J2ZB2cjs.__async.call(void 0, this, null, function* () {
31
- const transactionBytes = _bs582.default.decode(transaction);
32
- const versionedTx = _web3js.VersionedTransaction.deserialize(transactionBytes);
33
- const messageBytes = versionedTx.message.serialize();
34
- const signatureBytes = _tweetnacl2.default.sign.detached(messageBytes, this.keypair.secretKey);
35
- return { signature: _bs582.default.encode(signatureBytes) };
36
- });
37
- }
38
- };
39
-
40
-
41
-
42
- exports.SolanaServerSigner = SolanaServerSigner;
@@ -1,69 +0,0 @@
1
- import {
2
- WalletFactory
3
- } from "./chunk-2PSAUSOG.js";
4
- import {
5
- ApiClient
6
- } from "./chunk-VLZ5ZS5U.js";
7
- import {
8
- initWalletsLogger,
9
- walletsLogger
10
- } from "./chunk-XEPUH4XH.js";
11
- import {
12
- __async
13
- } from "./chunk-ASE2FXWP.js";
14
-
15
- // src/sdk.ts
16
- import { createCrossmint } from "@crossmint/common-sdk-base";
17
- var CrossmintWallets = class _CrossmintWallets {
18
- constructor(crossmint) {
19
- initWalletsLogger(crossmint.apiKey);
20
- const apiClient = new ApiClient(crossmint);
21
- this.walletFactory = new WalletFactory(apiClient);
22
- walletsLogger.info("wallets.sdk.initialized");
23
- }
24
- /**
25
- * Initialize the Wallets SDK
26
- * @param crossmint - Crossmint data (use `createCrossmint` to initialize)
27
- * @returns A new CrossmintWallets instance
28
- */
29
- static from(crossmint) {
30
- return new _CrossmintWallets(crossmint);
31
- }
32
- /**
33
- * Get or create a wallet, can only be called on the client side
34
- * @param args - Wallet data
35
- * @param options - Wallet options
36
- * @returns An existing wallet or a new wallet
37
- */
38
- getOrCreateWallet(options) {
39
- return __async(this, null, function* () {
40
- return yield this.walletFactory.getOrCreateWallet(options);
41
- });
42
- }
43
- /**
44
- * Get an existing wallet by its locator, can only be called on the server side
45
- * @param walletLocator - Wallet locator
46
- * @param options - Wallet options
47
- * @returns A wallet if found, throws WalletNotAvailableError if not found
48
- */
49
- getWallet(walletLocator, options) {
50
- return __async(this, null, function* () {
51
- return yield this.walletFactory.getWallet(walletLocator, options);
52
- });
53
- }
54
- /**
55
- * Create a new wallet, can only be called on the server side
56
- * @param options - Wallet options
57
- * @returns A new wallet
58
- */
59
- createWallet(options) {
60
- return __async(this, null, function* () {
61
- return yield this.walletFactory.createWallet(options);
62
- });
63
- }
64
- };
65
-
66
- export {
67
- createCrossmint,
68
- CrossmintWallets
69
- };