@crossmint/wallets-sdk 1.6.1 → 1.7.0

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 (293) hide show
  1. package/dist/api/__tests__/constants.d.cts +1 -1
  2. package/dist/api/__tests__/constants.d.ts +1 -1
  3. package/dist/api/__tests__/test-utils.cjs +1 -1
  4. package/dist/api/__tests__/test-utils.d.cts +1 -1
  5. package/dist/api/__tests__/test-utils.d.ts +1 -1
  6. package/dist/api/__tests__/test-utils.js +1 -1
  7. package/dist/api/client.cjs +1 -1
  8. package/dist/api/client.d.cts +1 -1
  9. package/dist/api/client.d.ts +1 -1
  10. package/dist/api/client.js +1 -1
  11. package/dist/api/gen/index.cjs +1 -1
  12. package/dist/api/gen/index.js +1 -1
  13. package/dist/api/index.cjs +1 -1
  14. package/dist/api/index.d.cts +1 -1
  15. package/dist/api/index.d.ts +1 -1
  16. package/dist/api/index.js +1 -1
  17. package/dist/api/types.d.cts +1 -1
  18. package/dist/api/types.d.ts +1 -1
  19. package/dist/chains/adapters/evm.cjs +1 -1
  20. package/dist/chains/adapters/evm.d.cts +1 -1
  21. package/dist/chains/adapters/evm.d.ts +1 -1
  22. package/dist/chains/adapters/evm.js +1 -1
  23. package/dist/chains/adapters/solana.cjs +1 -1
  24. package/dist/chains/adapters/solana.d.cts +1 -1
  25. package/dist/chains/adapters/solana.d.ts +1 -1
  26. package/dist/chains/adapters/solana.js +1 -1
  27. package/dist/chains/adapters/stellar.cjs +1 -1
  28. package/dist/chains/adapters/stellar.d.cts +1 -1
  29. package/dist/chains/adapters/stellar.d.ts +1 -1
  30. package/dist/chains/adapters/stellar.js +1 -1
  31. package/dist/chains/chain-adapter.cjs +1 -1
  32. package/dist/chains/chain-adapter.d.cts +1 -1
  33. package/dist/chains/chain-adapter.d.ts +1 -1
  34. package/dist/chains/chain-adapter.js +1 -1
  35. package/dist/chains/chains.cjs +1 -1
  36. package/dist/chains/chains.js +1 -1
  37. package/dist/{chunk-YWZMLT47.js → chunk-3PDACUM7.js} +1 -1
  38. package/dist/{chunk-NE2Y6VFQ.js → chunk-3WDIJIBZ.js} +1 -1
  39. package/dist/chunk-6CNBIQGF.cjs +1 -0
  40. package/dist/{chunk-JFJXQGW5.cjs → chunk-72MJS3AC.cjs} +1 -1
  41. package/dist/{chunk-A3N6JH3M.cjs → chunk-7FQTFYO6.cjs} +1 -1
  42. package/dist/{chunk-SO32FMP7.cjs → chunk-ARN45RZ4.cjs} +1 -1
  43. package/dist/chunk-BBMFGUOH.js +1 -0
  44. package/dist/{chunk-HI72AV4W.cjs → chunk-BCXIEWZK.cjs} +1 -1
  45. package/dist/{chunk-NFDWJLL6.cjs → chunk-BJZM3EV2.cjs} +1 -1
  46. package/dist/{chunk-PNYAMSZ7.cjs → chunk-BOB3OT66.cjs} +1 -1
  47. package/dist/chunk-BZJ5TU7H.cjs +1 -0
  48. package/dist/{chunk-EFAZ2WYW.cjs → chunk-CIMSRCXA.cjs} +1 -1
  49. package/dist/{chunk-UEM7C5FY.js → chunk-CISUOQT6.js} +1 -1
  50. package/dist/{chunk-RKVJZO7O.js → chunk-CNXZJOVE.js} +1 -1
  51. package/dist/{chunk-SJ5MLAQI.cjs → chunk-DBWMNPH7.cjs} +1 -1
  52. package/dist/{chunk-OWDSSX2P.js → chunk-DCKFFFPG.js} +1 -1
  53. package/dist/{chunk-JZYDIP5D.cjs → chunk-DDNFHKJR.cjs} +1 -1
  54. package/dist/{chunk-6A7SZ3QD.js → chunk-DMNULXGD.js} +1 -1
  55. package/dist/{chunk-KSW27XVT.js → chunk-EJCR7VKJ.js} +1 -1
  56. package/dist/chunk-EXFV7SBW.cjs +1 -0
  57. package/dist/{chunk-73FKNIUX.cjs → chunk-EXY6WMAQ.cjs} +1 -1
  58. package/dist/{chunk-TUSSLVSF.cjs → chunk-FO2AO5HQ.cjs} +1 -1
  59. package/dist/chunk-FXMXIAPL.js +1 -0
  60. package/dist/{chunk-LJKNUBZA.js → chunk-GCIDUJF2.js} +1 -1
  61. package/dist/{chunk-CHDHMS5R.cjs → chunk-GIXJ5P3D.cjs} +1 -1
  62. package/dist/chunk-GNON524X.js +1 -0
  63. package/dist/{chunk-NUO3MBBE.cjs → chunk-GZSM6NWF.cjs} +1 -1
  64. package/dist/{chunk-2WS6SXS6.cjs → chunk-HIKDNSEI.cjs} +1 -1
  65. package/dist/{chunk-SWBJ2RMN.cjs → chunk-HIWBYW72.cjs} +1 -1
  66. package/dist/{chunk-BNC4HX7P.js → chunk-HJNJJGK6.js} +1 -1
  67. package/dist/{chunk-K55DPXZQ.cjs → chunk-I3H3U7XW.cjs} +1 -1
  68. package/dist/{chunk-RKUCX4Z4.cjs → chunk-IW4FVUP5.cjs} +2 -2
  69. package/dist/{chunk-JTWVCUVZ.js → chunk-J5SLH6DG.js} +1 -1
  70. package/dist/{chunk-Q4VN3MG7.cjs → chunk-K4CPNZQP.cjs} +1 -1
  71. package/dist/{chunk-46Z5EE2F.js → chunk-KQOBLF64.js} +1 -1
  72. package/dist/{chunk-4DLKWRLY.cjs → chunk-LSJDT5QL.cjs} +1 -1
  73. package/dist/{chunk-7SKKGHMB.js → chunk-M4U7HAZ6.js} +1 -1
  74. package/dist/{chunk-UAB6KH63.js → chunk-M5A2GB2R.js} +1 -1
  75. package/dist/{chunk-7KF4AULF.cjs → chunk-MQE44PAR.cjs} +2 -2
  76. package/dist/{chunk-66XVKHJQ.cjs → chunk-MYLHEIBD.cjs} +1 -1
  77. package/dist/{chunk-6GEBK257.cjs → chunk-MYWEABPN.cjs} +1 -1
  78. package/dist/{chunk-K7BNQDN2.cjs → chunk-N2YQ7SK2.cjs} +1 -1
  79. package/dist/{chunk-ULAIS6HM.js → chunk-N6LXJTAC.js} +1 -1
  80. package/dist/chunk-NFX2WUB6.js +1 -0
  81. package/dist/{chunk-6ZD7NFX6.js → chunk-NLMPNCXE.js} +1 -1
  82. package/dist/{chunk-M7BGVCMZ.cjs → chunk-NML6ZUFM.cjs} +1 -1
  83. package/dist/{chunk-Z5DV2DB7.js → chunk-OE4UVHAK.js} +1 -1
  84. package/dist/{chunk-RPBBYBNA.js → chunk-OEMMPPUX.js} +1 -1
  85. package/dist/{chunk-SNAWZWNR.cjs → chunk-OI6QI264.cjs} +1 -1
  86. package/dist/{chunk-WK67OXB3.js → chunk-OMTJMVSG.js} +1 -1
  87. package/dist/{chunk-QOSA6B55.js → chunk-OTFPEC53.js} +1 -1
  88. package/dist/{chunk-PVXNJEBO.js → chunk-P4P3Q7F2.js} +1 -1
  89. package/dist/chunk-PH5XGZFF.cjs +1 -0
  90. package/dist/{chunk-76TBLKLF.js → chunk-QJALSMVI.js} +1 -1
  91. package/dist/{chunk-5HBCBS5W.cjs → chunk-QPCZFIUV.cjs} +1 -1
  92. package/dist/{chunk-LKFW3NS5.js → chunk-R23CUQZX.js} +1 -1
  93. package/dist/chunk-R7S55N7J.cjs +1 -0
  94. package/dist/{chunk-VPBJ7L4I.js → chunk-S7DYRZI2.js} +1 -1
  95. package/dist/{chunk-U7MO5CYP.cjs → chunk-SEXK7X55.cjs} +1 -1
  96. package/dist/{chunk-S7XUH7XP.js → chunk-T6VDXOWC.js} +1 -1
  97. package/dist/{chunk-6VH3KWLM.js → chunk-U37UWZ6M.js} +1 -1
  98. package/dist/{chunk-7VMBZI5M.cjs → chunk-U6SAS52Q.cjs} +1 -1
  99. package/dist/chunk-V3BCKXZ6.js +1 -0
  100. package/dist/{chunk-KQNMPKVE.js → chunk-VBM6V2GS.js} +1 -1
  101. package/dist/chunk-VKXHD6UP.js +1 -0
  102. package/dist/{chunk-CTQFY3MR.js → chunk-WE32RGKM.js} +1 -1
  103. package/dist/chunk-WT45L3WI.cjs +1 -0
  104. package/dist/chunk-XMN42YI5.cjs +1 -0
  105. package/dist/{chunk-KGQWE3HH.js → chunk-ZLKQZHEG.js} +1 -1
  106. package/dist/chunk-ZUG5BIGQ.js +1 -0
  107. package/dist/index.cjs +1 -1
  108. package/dist/index.d.cts +1 -1
  109. package/dist/index.d.ts +1 -1
  110. package/dist/index.js +1 -1
  111. package/dist/logger/index.cjs +1 -1
  112. package/dist/logger/index.js +1 -1
  113. package/dist/logger/init.cjs +1 -1
  114. package/dist/logger/init.js +1 -1
  115. package/dist/sdk.cjs +1 -1
  116. package/dist/sdk.d.cts +1 -1
  117. package/dist/sdk.d.ts +1 -1
  118. package/dist/sdk.js +1 -1
  119. package/dist/signers/descriptors/api-key.cjs +1 -1
  120. package/dist/signers/descriptors/api-key.d.cts +1 -1
  121. package/dist/signers/descriptors/api-key.d.ts +1 -1
  122. package/dist/signers/descriptors/api-key.js +1 -1
  123. package/dist/signers/descriptors/device.cjs +1 -1
  124. package/dist/signers/descriptors/device.d.cts +1 -1
  125. package/dist/signers/descriptors/device.d.ts +1 -1
  126. package/dist/signers/descriptors/device.js +1 -1
  127. package/dist/signers/descriptors/email.cjs +1 -1
  128. package/dist/signers/descriptors/email.d.cts +1 -1
  129. package/dist/signers/descriptors/email.d.ts +1 -1
  130. package/dist/signers/descriptors/email.js +1 -1
  131. package/dist/signers/descriptors/external-wallet.cjs +1 -1
  132. package/dist/signers/descriptors/external-wallet.d.cts +1 -1
  133. package/dist/signers/descriptors/external-wallet.d.ts +1 -1
  134. package/dist/signers/descriptors/external-wallet.js +1 -1
  135. package/dist/signers/descriptors/index.cjs +1 -1
  136. package/dist/signers/descriptors/index.d.cts +1 -1
  137. package/dist/signers/descriptors/index.d.ts +1 -1
  138. package/dist/signers/descriptors/index.js +1 -1
  139. package/dist/signers/descriptors/passkey.d.cts +1 -1
  140. package/dist/signers/descriptors/passkey.d.ts +1 -1
  141. package/dist/signers/descriptors/phone.cjs +1 -1
  142. package/dist/signers/descriptors/phone.d.cts +1 -1
  143. package/dist/signers/descriptors/phone.d.ts +1 -1
  144. package/dist/signers/descriptors/phone.js +1 -1
  145. package/dist/signers/descriptors/server.cjs +1 -1
  146. package/dist/signers/descriptors/server.d.cts +1 -1
  147. package/dist/signers/descriptors/server.d.ts +1 -1
  148. package/dist/signers/descriptors/server.js +1 -1
  149. package/dist/signers/descriptors/types.d.cts +2 -1
  150. package/dist/signers/descriptors/types.d.ts +2 -1
  151. package/dist/signers/device.d.cts +1 -1
  152. package/dist/signers/device.d.ts +1 -1
  153. package/dist/signers/evm-api-key.d.cts +1 -1
  154. package/dist/signers/evm-api-key.d.ts +1 -1
  155. package/dist/signers/evm-external-wallet.d.cts +1 -1
  156. package/dist/signers/evm-external-wallet.d.ts +1 -1
  157. package/dist/signers/external-wallet-signer.d.cts +1 -1
  158. package/dist/signers/external-wallet-signer.d.ts +1 -1
  159. package/dist/signers/index.cjs +1 -1
  160. package/dist/signers/index.d.cts +1 -1
  161. package/dist/signers/index.d.ts +1 -1
  162. package/dist/signers/index.js +1 -1
  163. package/dist/signers/non-custodial/index.cjs +1 -1
  164. package/dist/signers/non-custodial/index.d.cts +1 -1
  165. package/dist/signers/non-custodial/index.d.ts +1 -1
  166. package/dist/signers/non-custodial/index.js +1 -1
  167. package/dist/signers/non-custodial/ncs-evm-signer.cjs +1 -1
  168. package/dist/signers/non-custodial/ncs-evm-signer.d.cts +1 -1
  169. package/dist/signers/non-custodial/ncs-evm-signer.d.ts +1 -1
  170. package/dist/signers/non-custodial/ncs-evm-signer.js +1 -1
  171. package/dist/signers/non-custodial/ncs-signer.cjs +1 -1
  172. package/dist/signers/non-custodial/ncs-signer.d.cts +3 -1
  173. package/dist/signers/non-custodial/ncs-signer.d.ts +3 -1
  174. package/dist/signers/non-custodial/ncs-signer.js +1 -1
  175. package/dist/signers/non-custodial/ncs-solana-signer.cjs +1 -1
  176. package/dist/signers/non-custodial/ncs-solana-signer.d.cts +1 -1
  177. package/dist/signers/non-custodial/ncs-solana-signer.d.ts +1 -1
  178. package/dist/signers/non-custodial/ncs-solana-signer.js +1 -1
  179. package/dist/signers/non-custodial/ncs-stellar-signer.cjs +1 -1
  180. package/dist/signers/non-custodial/ncs-stellar-signer.d.cts +1 -1
  181. package/dist/signers/non-custodial/ncs-stellar-signer.d.ts +1 -1
  182. package/dist/signers/non-custodial/ncs-stellar-signer.js +1 -1
  183. package/dist/signers/passkey.d.cts +1 -1
  184. package/dist/signers/passkey.d.ts +1 -1
  185. package/dist/signers/server/assemble-server-signer.d.cts +1 -1
  186. package/dist/signers/server/assemble-server-signer.d.ts +1 -1
  187. package/dist/signers/server/evm-server-signer.d.cts +1 -1
  188. package/dist/signers/server/evm-server-signer.d.ts +1 -1
  189. package/dist/signers/server/helpers/derive-server-signer.d.cts +1 -1
  190. package/dist/signers/server/helpers/derive-server-signer.d.ts +1 -1
  191. package/dist/signers/server/helpers/index.d.cts +1 -1
  192. package/dist/signers/server/helpers/index.d.ts +1 -1
  193. package/dist/signers/server/index.d.cts +1 -1
  194. package/dist/signers/server/index.d.ts +1 -1
  195. package/dist/signers/server/resolver.cjs +1 -1
  196. package/dist/signers/server/resolver.d.cts +1 -1
  197. package/dist/signers/server/resolver.d.ts +1 -1
  198. package/dist/signers/server/resolver.js +1 -1
  199. package/dist/signers/server/solana-server-signer.d.cts +1 -1
  200. package/dist/signers/server/solana-server-signer.d.ts +1 -1
  201. package/dist/signers/server/stellar-server-signer.d.cts +1 -1
  202. package/dist/signers/server/stellar-server-signer.d.ts +1 -1
  203. package/dist/signers/solana-api-key.d.cts +1 -1
  204. package/dist/signers/solana-api-key.d.ts +1 -1
  205. package/dist/signers/solana-external-wallet.d.cts +1 -1
  206. package/dist/signers/solana-external-wallet.d.ts +1 -1
  207. package/dist/signers/stellar-external-wallet.d.cts +1 -1
  208. package/dist/signers/stellar-external-wallet.d.ts +1 -1
  209. package/dist/signers/types.cjs +1 -1
  210. package/dist/signers/types.d.cts +1 -1
  211. package/dist/signers/types.d.ts +1 -1
  212. package/dist/signers/types.js +1 -1
  213. package/dist/{types-D6r1qRCA.d.cts → types-DUaBfLJv.d.cts} +11 -1
  214. package/dist/{types-VTpasnqi.d.ts → types-DnpNYkDF.d.ts} +11 -1
  215. package/dist/utils/constants.cjs +1 -1
  216. package/dist/utils/constants.js +1 -1
  217. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.cjs +1 -1
  218. package/dist/utils/device-signers/IframeDeviceSignerKeyStorage.js +1 -1
  219. package/dist/utils/device-signers/createDeviceSigner.d.cts +1 -1
  220. package/dist/utils/device-signers/createDeviceSigner.d.ts +1 -1
  221. package/dist/utils/device-signers/index.cjs +1 -1
  222. package/dist/utils/device-signers/index.d.cts +1 -1
  223. package/dist/utils/device-signers/index.d.ts +1 -1
  224. package/dist/utils/device-signers/index.js +1 -1
  225. package/dist/utils/locators.d.cts +1 -1
  226. package/dist/utils/locators.d.ts +1 -1
  227. package/dist/utils/signer-locator.cjs +1 -1
  228. package/dist/utils/signer-locator.d.cts +1 -1
  229. package/dist/utils/signer-locator.d.ts +1 -1
  230. package/dist/utils/signer-locator.js +1 -1
  231. package/dist/utils/signer-mapping.d.cts +1 -1
  232. package/dist/utils/signer-mapping.d.ts +1 -1
  233. package/dist/utils/signer-validation.cjs +1 -1
  234. package/dist/utils/signer-validation.d.cts +10 -1
  235. package/dist/utils/signer-validation.d.ts +10 -1
  236. package/dist/utils/signer-validation.js +1 -1
  237. package/dist/wallets/__tests__/test-helpers.cjs +1 -1
  238. package/dist/wallets/__tests__/test-helpers.d.cts +1 -1
  239. package/dist/wallets/__tests__/test-helpers.d.ts +1 -1
  240. package/dist/wallets/__tests__/test-helpers.js +1 -1
  241. package/dist/wallets/evm.cjs +1 -1
  242. package/dist/wallets/evm.d.cts +1 -1
  243. package/dist/wallets/evm.d.ts +1 -1
  244. package/dist/wallets/evm.js +1 -1
  245. package/dist/wallets/services/balance-formatter.cjs +1 -1
  246. package/dist/wallets/services/balance-formatter.d.cts +1 -1
  247. package/dist/wallets/services/balance-formatter.d.ts +1 -1
  248. package/dist/wallets/services/balance-formatter.js +1 -1
  249. package/dist/wallets/services/device-recovery-service.cjs +1 -1
  250. package/dist/wallets/services/device-recovery-service.d.cts +1 -1
  251. package/dist/wallets/services/device-recovery-service.d.ts +1 -1
  252. package/dist/wallets/services/device-recovery-service.js +1 -1
  253. package/dist/wallets/services/operation-poller.cjs +1 -1
  254. package/dist/wallets/services/operation-poller.d.cts +1 -1
  255. package/dist/wallets/services/operation-poller.d.ts +1 -1
  256. package/dist/wallets/services/operation-poller.js +1 -1
  257. package/dist/wallets/services/signer-manager.cjs +1 -1
  258. package/dist/wallets/services/signer-manager.d.cts +1 -1
  259. package/dist/wallets/services/signer-manager.d.ts +1 -1
  260. package/dist/wallets/services/signer-manager.js +1 -1
  261. package/dist/wallets/solana.cjs +1 -1
  262. package/dist/wallets/solana.d.cts +1 -1
  263. package/dist/wallets/solana.d.ts +1 -1
  264. package/dist/wallets/solana.js +1 -1
  265. package/dist/wallets/stellar.cjs +1 -1
  266. package/dist/wallets/stellar.d.cts +1 -1
  267. package/dist/wallets/stellar.d.ts +1 -1
  268. package/dist/wallets/stellar.js +1 -1
  269. package/dist/wallets/types.d.cts +1 -1
  270. package/dist/wallets/types.d.ts +1 -1
  271. package/dist/wallets/wallet-factory.cjs +1 -1
  272. package/dist/wallets/wallet-factory.d.cts +1 -1
  273. package/dist/wallets/wallet-factory.d.ts +1 -1
  274. package/dist/wallets/wallet-factory.js +1 -1
  275. package/dist/wallets/wallet.cjs +1 -1
  276. package/dist/wallets/wallet.d.cts +1 -1
  277. package/dist/wallets/wallet.d.ts +1 -1
  278. package/dist/wallets/wallet.js +1 -1
  279. package/package.json +4 -4
  280. package/dist/chunk-64JQSHXM.js +0 -1
  281. package/dist/chunk-EE6XMYUL.js +0 -1
  282. package/dist/chunk-GOXB2RBF.js +0 -1
  283. package/dist/chunk-HBHDN4G7.js +0 -1
  284. package/dist/chunk-HHVYXPUL.cjs +0 -1
  285. package/dist/chunk-IKHH67TL.cjs +0 -1
  286. package/dist/chunk-LV5QR6LK.js +0 -1
  287. package/dist/chunk-NX256LAH.cjs +0 -1
  288. package/dist/chunk-OWJS5ITO.cjs +0 -1
  289. package/dist/chunk-RWRESDZR.cjs +0 -1
  290. package/dist/chunk-TIRSLCAM.js +0 -1
  291. package/dist/chunk-TL2BD4MX.cjs +0 -1
  292. package/dist/chunk-WK2RGS25.cjs +0 -1
  293. package/dist/chunk-WPNLE54U.js +0 -1
@@ -1,4 +1,4 @@
1
- import { ag as WalletLocator } from '../../types-D6r1qRCA.cjs';
1
+ import { ah as WalletLocator } from '../../types-DUaBfLJv.cjs';
2
2
  import 'viem';
3
3
  import '../gen/types.gen.cjs';
4
4
  import 'ox';
@@ -1,4 +1,4 @@
1
- import { ag as WalletLocator } from '../../types-VTpasnqi.js';
1
+ import { ah as WalletLocator } from '../../types-DnpNYkDF.js';
2
2
  import 'viem';
3
3
  import '../gen/types.gen.js';
4
4
  import 'ox';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJ33QM2IDcjs = require('../../chunk-J33QM2ID.cjs');var _chunk66XVKHJQcjs = require('../../chunk-66XVKHJQ.cjs');require('../../chunk-3F4FMM3R.cjs');require('../../chunk-6GEBK257.cjs');require('../../chunk-2WS6SXS6.cjs');var _chunkDSIFRRBScjs = require('../../chunk-DSIFRRBS.cjs');var _vitest = require('vitest');var P=({data:e,status:t=200,ok:n=!0,statusText:s="OK"})=>({json:_vitest.vi.fn().mockResolvedValue(e),ok:n,status:t,statusText:s}),j= exports.createMockSuccessResponse =e=>P({data:e}),b= exports.createMockErrorResponse =(e,t=400,n="Bad Request")=>P({data:e,status:t,ok:!1,statusText:n}),B= exports.createMockCrossmint =(e={})=>{let t=_chunkDSIFRRBScjs.a.call(void 0, {apiKey:_chunkJ33QM2IDcjs.m},e);return _chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},t),{setJwt:_vitest.vi.fn().mockReturnThis()})},L= exports.createTestApiClient =e=>new (0, _chunk66XVKHJQcjs.a)(e||B()),K= exports.createServerSideApiClient =()=>{let e=L();return Object.defineProperty(e,"isServerSide",{get:()=>!0,configurable:!0}),e},Y= exports.extractFetchCall =e=>{let t=e.mock.calls;if(t.length===0)return;let n=t[t.length-1];return{path:n[0],options:n[1]}},N= exports.expectRequestPath =(e,t)=>{_vitest.expect.call(void 0, e==null?void 0:e.path).toBe(t)},V= exports.expectCommonHeaders =e=>{_vitest.expect.call(void 0, e["Content-Type"]).toBe("application/json")},q= exports.expectRequestBody =(e,t)=>{_vitest.expect.call(void 0, e.body).toBe(JSON.stringify(t))},z= exports.validateRequest =(e,t,n)=>{_vitest.expect.call(void 0, e).toBeDefined(),e&&(N(e,t),e.options.headers&&V(e.options.headers),n!==void 0&&e.options&&q(e.options,n))},X= exports.testHttpErrorResponse =(e,t,n,s)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockResolvedValue(b(n,s));let a=yield e();_vitest.expect.call(void 0, l(a)).toBe(!0),l(a)&&(_vitest.expect.call(void 0, a.error).toBe(!0),n.message&&_vitest.expect.call(void 0, a.message).toBe(n.message))}),Z= exports.testCommonHttpErrors =(s,a,...o)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,[s,a,...o],function*(e,t,n=[]){for(let{status:c,message:g}of _chunkJ33QM2IDcjs.a){if(n.includes(c))continue;let u={error:!0,message:g};t.mockResolvedValueOnce(b(u,c));let m=yield e();_vitest.expect.call(void 0, l(m)).toBe(!0)}}),Q= exports.testNetworkError =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockRejectedValue(new Error("Network error")),yield _vitest.expect.call(void 0, e()).rejects.toThrow("Network error")}),ee= exports.testInvalidJsonResponse =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let n={json:_vitest.vi.fn().mockRejectedValue(new Error("Invalid JSON")),ok:!0,status:200};t.mockResolvedValue(n),yield _vitest.expect.call(void 0, e()).rejects.toThrow()}),te= exports.testTimeoutError =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockImplementation(()=>new Promise((n,s)=>setTimeout(()=>s(new Error("Request timeout")),0))),yield _vitest.expect.call(void 0, e()).rejects.toThrow("Request timeout")}),ne= exports.testMalformedResponse =(e,t,n)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockResolvedValue(j(n));let s=yield e();_vitest.expect.call(void 0, s).toEqual(n)}),se= exports.createMockWalletResponse =(e={})=>_chunkDSIFRRBScjs.a.call(void 0, {address:_chunkJ33QM2IDcjs.b.evmAddress,chainType:"evm",type:"smart",config:{adminSigner:{type:"external-wallet",address:_chunkJ33QM2IDcjs.k.EVM_TEST}}},e),oe= exports.createMockSendResponse =(e={})=>_chunkDSIFRRBScjs.a.call(void 0, {id:"txn-123",status:"pending",chainType:"evm",walletType:"evm-smart-wallet",params:{transaction:"0x1234567890abcdef",signer:"api-key:test"},onChain:{txId:"0xabcdef1234567890abcdef1234567890abcdef12",explorerLink:"https://explorer.example.com/tx/0xabcdef1234567890abcdef1234567890abcdef12"},createdAt:Date.now()},e);function l(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error===!0}function C(e){return typeof e=="object"&&e!==null&&"address"in e&&"chainType"in e&&"type"in e}function $(e){return typeof e=="object"&&e!==null&&"id"in e&&"status"in e&&"chainType"in e}var x=e=>new Promise(t=>setTimeout(t,e)),re= exports.isValidEthereumAddress =e=>/^0x[a-fA-F0-9]{40}$/.test(e),ae= exports.isValidSolanaAddress =e=>/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e),ie= exports.createIntegrationApiClient =(e,t,n={})=>{let s=_chunkDSIFRRBScjs.a.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {apiKey:e},t&&{overrideBaseUrl:t}),n),a=_chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},s),{setJwt:()=>a});return new (0, _chunk66XVKHJQcjs.a)(a)},v= exports.TestDataFactory =class{constructor(){this.wallets=[];this.transactions=[]}addWallet(t){t&&!this.wallets.includes(t)&&this.wallets.push(t)}addTransaction(t){t&&!this.transactions.includes(t)&&this.transactions.push(t)}getWallet(t=0){return this.wallets[t]}getTransaction(t=0){return this.transactions[t]}hasWallets(){return this.wallets.length>0}clear(){this.wallets=[],this.transactions=[]}};function ce(s,a){return _chunkDSIFRRBScjs.h.call(void 0, this,arguments,function*(e,t,n={}){if(t.hasWallets())return t.getWallet();let{chainType:o="evm",type:c="mpc",owner:g,testName:u="default"}=n,m=g||`userId:integration-${u}-${Date.now()}`,f=yield e.createWallet(_chunkDSIFRRBScjs.a.call(void 0, {chainType:o,type:c},g&&{owner:m}));if(C(f))return t.addWallet(f.address),f.address})}function pe(e,t,n){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let s=yield e.createWallet(n);return C(s)&&t.addWallet(s.address),s})}function le(e,t){_vitest.expect.call(void 0, l(e)).toBe(!0),t&&_vitest.expect.call(void 0, e.message).toBeDefined()}function ue(e){_vitest.expect.call(void 0, C(e)).toBe(!0)}function de(e){_vitest.expect.call(void 0, $(e)).toBe(!0)}var I=(e,t,n,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let o={amount:n,token:s,chain:a},c=yield e.fundWallet(t,o);if(l(c))throw new Error(`Failed to fund wallet: ${c.message||"Unknown error"}`);return yield x(_chunkJ33QM2IDcjs.i),c}),U= exports.approveTransaction =(a,o,c,...g)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,[a,o,c,...g],function*(e,t,n,s=_chunkJ33QM2IDcjs.l.APPROVE_TRANSACTION_MAX_RETRIES){var m;for(let f=0;f<s;f++){let d=yield e.getTransaction(t,n);if(l(d))throw new Error(`Transaction not found: ${d.message||"Unknown error"}`);if("status"in d&&(d.status==="success"||d.status==="failed"))return d;let T="approvals"in d?(m=d.approvals)==null?void 0:m.pending:void 0;if(T&&T.length>0){let O={approvals:T.map(_=>({signer:_.signer.locator,signature:""}))},h=yield e.approveTransaction(t,n,O);if(l(h))throw new Error(`Failed to approve transaction: ${h.message||"Unknown error"}`);yield x(_chunkJ33QM2IDcjs.j);continue}yield x(_chunkJ33QM2IDcjs.i)}let u=yield e.getTransaction(t,n);if(l(u))throw new Error(`Transaction not found after retries: ${u.message||"Unknown error"}`);if(!("status"in u))throw new Error("Transaction response missing status property");return u}),me= exports.fundWalletAndWait =(e,t,n=1,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){return I(e,t,n,s,a)}),fe= exports.sendTokenAndApprove =(e,t,n,s,a)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let o=yield e.send(t,n,{recipient:s,amount:a});if(l(o))throw new Error(`Failed to send token: ${o.message||"Unknown error"}`);if(typeof o=="object"&&o!==null&&"id"in o&&typeof o.id=="string")return U(e,t,o.id);throw new Error("Transaction ID not found in send response")}),ge= exports.ensureWalletFunded =(e,t,n=1,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){try{yield I(e,t,n,s,a)}catch(o){let c=o instanceof Error?o.message:String(o);if(!c.includes("already funded")&&!c.includes("insufficient"))throw o}});exports.TestDataFactory = v; exports.approveTransaction = U; exports.createIntegrationApiClient = ie; exports.createMockCrossmint = B; exports.createMockErrorResponse = b; exports.createMockResponse = P; exports.createMockSendResponse = oe; exports.createMockSuccessResponse = j; exports.createMockWalletResponse = se; exports.createServerSideApiClient = K; exports.createTestApiClient = L; exports.createTestWallet = pe; exports.delay = x; exports.ensureWalletExists = ce; exports.ensureWalletFunded = ge; exports.expectCommonHeaders = V; exports.expectErrorResponse = le; exports.expectRequestBody = q; exports.expectRequestPath = N; exports.expectSuccessTransactionResponse = de; exports.expectSuccessWalletResponse = ue; exports.extractFetchCall = Y; exports.fundWallet = I; exports.fundWalletAndWait = me; exports.isErrorResponse = l; exports.isSuccessTransactionResponse = $; exports.isSuccessWalletResponse = C; exports.isValidEthereumAddress = re; exports.isValidSolanaAddress = ae; exports.sendTokenAndApprove = fe; exports.testCommonHttpErrors = Z; exports.testHttpErrorResponse = X; exports.testInvalidJsonResponse = ee; exports.testMalformedResponse = ne; exports.testNetworkError = Q; exports.testTimeoutError = te; exports.validateRequest = z;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJ33QM2IDcjs = require('../../chunk-J33QM2ID.cjs');var _chunkMYLHEIBDcjs = require('../../chunk-MYLHEIBD.cjs');require('../../chunk-3F4FMM3R.cjs');require('../../chunk-MYWEABPN.cjs');require('../../chunk-HIKDNSEI.cjs');var _chunkDSIFRRBScjs = require('../../chunk-DSIFRRBS.cjs');var _vitest = require('vitest');var P=({data:e,status:t=200,ok:n=!0,statusText:s="OK"})=>({json:_vitest.vi.fn().mockResolvedValue(e),ok:n,status:t,statusText:s}),j= exports.createMockSuccessResponse =e=>P({data:e}),b= exports.createMockErrorResponse =(e,t=400,n="Bad Request")=>P({data:e,status:t,ok:!1,statusText:n}),B= exports.createMockCrossmint =(e={})=>{let t=_chunkDSIFRRBScjs.a.call(void 0, {apiKey:_chunkJ33QM2IDcjs.m},e);return _chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},t),{setJwt:_vitest.vi.fn().mockReturnThis()})},L= exports.createTestApiClient =e=>new (0, _chunkMYLHEIBDcjs.a)(e||B()),K= exports.createServerSideApiClient =()=>{let e=L();return Object.defineProperty(e,"isServerSide",{get:()=>!0,configurable:!0}),e},Y= exports.extractFetchCall =e=>{let t=e.mock.calls;if(t.length===0)return;let n=t[t.length-1];return{path:n[0],options:n[1]}},N= exports.expectRequestPath =(e,t)=>{_vitest.expect.call(void 0, e==null?void 0:e.path).toBe(t)},V= exports.expectCommonHeaders =e=>{_vitest.expect.call(void 0, e["Content-Type"]).toBe("application/json")},q= exports.expectRequestBody =(e,t)=>{_vitest.expect.call(void 0, e.body).toBe(JSON.stringify(t))},z= exports.validateRequest =(e,t,n)=>{_vitest.expect.call(void 0, e).toBeDefined(),e&&(N(e,t),e.options.headers&&V(e.options.headers),n!==void 0&&e.options&&q(e.options,n))},X= exports.testHttpErrorResponse =(e,t,n,s)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockResolvedValue(b(n,s));let a=yield e();_vitest.expect.call(void 0, l(a)).toBe(!0),l(a)&&(_vitest.expect.call(void 0, a.error).toBe(!0),n.message&&_vitest.expect.call(void 0, a.message).toBe(n.message))}),Z= exports.testCommonHttpErrors =(s,a,...o)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,[s,a,...o],function*(e,t,n=[]){for(let{status:c,message:g}of _chunkJ33QM2IDcjs.a){if(n.includes(c))continue;let u={error:!0,message:g};t.mockResolvedValueOnce(b(u,c));let m=yield e();_vitest.expect.call(void 0, l(m)).toBe(!0)}}),Q= exports.testNetworkError =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockRejectedValue(new Error("Network error")),yield _vitest.expect.call(void 0, e()).rejects.toThrow("Network error")}),ee= exports.testInvalidJsonResponse =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let n={json:_vitest.vi.fn().mockRejectedValue(new Error("Invalid JSON")),ok:!0,status:200};t.mockResolvedValue(n),yield _vitest.expect.call(void 0, e()).rejects.toThrow()}),te= exports.testTimeoutError =(e,t)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockImplementation(()=>new Promise((n,s)=>setTimeout(()=>s(new Error("Request timeout")),0))),yield _vitest.expect.call(void 0, e()).rejects.toThrow("Request timeout")}),ne= exports.testMalformedResponse =(e,t,n)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){t.mockResolvedValue(j(n));let s=yield e();_vitest.expect.call(void 0, s).toEqual(n)}),se= exports.createMockWalletResponse =(e={})=>_chunkDSIFRRBScjs.a.call(void 0, {address:_chunkJ33QM2IDcjs.b.evmAddress,chainType:"evm",type:"smart",config:{adminSigner:{type:"external-wallet",address:_chunkJ33QM2IDcjs.k.EVM_TEST}}},e),oe= exports.createMockSendResponse =(e={})=>_chunkDSIFRRBScjs.a.call(void 0, {id:"txn-123",status:"pending",chainType:"evm",walletType:"evm-smart-wallet",params:{transaction:"0x1234567890abcdef",signer:"api-key:test"},onChain:{txId:"0xabcdef1234567890abcdef1234567890abcdef12",explorerLink:"https://explorer.example.com/tx/0xabcdef1234567890abcdef1234567890abcdef12"},createdAt:Date.now()},e);function l(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error===!0}function C(e){return typeof e=="object"&&e!==null&&"address"in e&&"chainType"in e&&"type"in e}function $(e){return typeof e=="object"&&e!==null&&"id"in e&&"status"in e&&"chainType"in e}var x=e=>new Promise(t=>setTimeout(t,e)),re= exports.isValidEthereumAddress =e=>/^0x[a-fA-F0-9]{40}$/.test(e),ae= exports.isValidSolanaAddress =e=>/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e),ie= exports.createIntegrationApiClient =(e,t,n={})=>{let s=_chunkDSIFRRBScjs.a.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {apiKey:e},t&&{overrideBaseUrl:t}),n),a=_chunkDSIFRRBScjs.b.call(void 0, _chunkDSIFRRBScjs.a.call(void 0, {},s),{setJwt:()=>a});return new (0, _chunkMYLHEIBDcjs.a)(a)},v= exports.TestDataFactory =class{constructor(){this.wallets=[];this.transactions=[]}addWallet(t){t&&!this.wallets.includes(t)&&this.wallets.push(t)}addTransaction(t){t&&!this.transactions.includes(t)&&this.transactions.push(t)}getWallet(t=0){return this.wallets[t]}getTransaction(t=0){return this.transactions[t]}hasWallets(){return this.wallets.length>0}clear(){this.wallets=[],this.transactions=[]}};function ce(s,a){return _chunkDSIFRRBScjs.h.call(void 0, this,arguments,function*(e,t,n={}){if(t.hasWallets())return t.getWallet();let{chainType:o="evm",type:c="mpc",owner:g,testName:u="default"}=n,m=g||`userId:integration-${u}-${Date.now()}`,f=yield e.createWallet(_chunkDSIFRRBScjs.a.call(void 0, {chainType:o,type:c},g&&{owner:m}));if(C(f))return t.addWallet(f.address),f.address})}function pe(e,t,n){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let s=yield e.createWallet(n);return C(s)&&t.addWallet(s.address),s})}function le(e,t){_vitest.expect.call(void 0, l(e)).toBe(!0),t&&_vitest.expect.call(void 0, e.message).toBeDefined()}function ue(e){_vitest.expect.call(void 0, C(e)).toBe(!0)}function de(e){_vitest.expect.call(void 0, $(e)).toBe(!0)}var I=(e,t,n,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let o={amount:n,token:s,chain:a},c=yield e.fundWallet(t,o);if(l(c))throw new Error(`Failed to fund wallet: ${c.message||"Unknown error"}`);return yield x(_chunkJ33QM2IDcjs.i),c}),U= exports.approveTransaction =(a,o,c,...g)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,[a,o,c,...g],function*(e,t,n,s=_chunkJ33QM2IDcjs.l.APPROVE_TRANSACTION_MAX_RETRIES){var m;for(let f=0;f<s;f++){let d=yield e.getTransaction(t,n);if(l(d))throw new Error(`Transaction not found: ${d.message||"Unknown error"}`);if("status"in d&&(d.status==="success"||d.status==="failed"))return d;let T="approvals"in d?(m=d.approvals)==null?void 0:m.pending:void 0;if(T&&T.length>0){let O={approvals:T.map(_=>({signer:_.signer.locator,signature:""}))},h=yield e.approveTransaction(t,n,O);if(l(h))throw new Error(`Failed to approve transaction: ${h.message||"Unknown error"}`);yield x(_chunkJ33QM2IDcjs.j);continue}yield x(_chunkJ33QM2IDcjs.i)}let u=yield e.getTransaction(t,n);if(l(u))throw new Error(`Transaction not found after retries: ${u.message||"Unknown error"}`);if(!("status"in u))throw new Error("Transaction response missing status property");return u}),me= exports.fundWalletAndWait =(e,t,n=1,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){return I(e,t,n,s,a)}),fe= exports.sendTokenAndApprove =(e,t,n,s,a)=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){let o=yield e.send(t,n,{recipient:s,amount:a});if(l(o))throw new Error(`Failed to send token: ${o.message||"Unknown error"}`);if(typeof o=="object"&&o!==null&&"id"in o&&typeof o.id=="string")return U(e,t,o.id);throw new Error("Transaction ID not found in send response")}),ge= exports.ensureWalletFunded =(e,t,n=1,s="usdxm",a="base-sepolia")=>_chunkDSIFRRBScjs.h.call(void 0, void 0,null,function*(){try{yield I(e,t,n,s,a)}catch(o){let c=o instanceof Error?o.message:String(o);if(!c.includes("already funded")&&!c.includes("insufficient"))throw o}});exports.TestDataFactory = v; exports.approveTransaction = U; exports.createIntegrationApiClient = ie; exports.createMockCrossmint = B; exports.createMockErrorResponse = b; exports.createMockResponse = P; exports.createMockSendResponse = oe; exports.createMockSuccessResponse = j; exports.createMockWalletResponse = se; exports.createServerSideApiClient = K; exports.createTestApiClient = L; exports.createTestWallet = pe; exports.delay = x; exports.ensureWalletExists = ce; exports.ensureWalletFunded = ge; exports.expectCommonHeaders = V; exports.expectErrorResponse = le; exports.expectRequestBody = q; exports.expectRequestPath = N; exports.expectSuccessTransactionResponse = de; exports.expectSuccessWalletResponse = ue; exports.extractFetchCall = Y; exports.fundWallet = I; exports.fundWalletAndWait = me; exports.isErrorResponse = l; exports.isSuccessTransactionResponse = $; exports.isSuccessWalletResponse = C; exports.isValidEthereumAddress = re; exports.isValidSolanaAddress = ae; exports.sendTokenAndApprove = fe; exports.testCommonHttpErrors = Z; exports.testHttpErrorResponse = X; exports.testInvalidJsonResponse = ee; exports.testMalformedResponse = ne; exports.testNetworkError = Q; exports.testTimeoutError = te; exports.validateRequest = z;
@@ -1,7 +1,7 @@
1
1
  import { MockedFunction } from 'vitest';
2
2
  import { Crossmint } from '@crossmint/common-sdk-base';
3
3
  import { ApiClient } from '../client.cjs';
4
- import { ag as WalletLocator, ap as GetTransactionResponse, aq as SendResponse, ar as CreateWalletResponse, as as CreateWalletParams, a9 as FundWalletResponse } from '../../types-D6r1qRCA.cjs';
4
+ import { ah as WalletLocator, aq as GetTransactionResponse, ar as SendResponse, as as CreateWalletResponse, at as CreateWalletParams, aa as FundWalletResponse } from '../../types-DUaBfLJv.cjs';
5
5
  import '../../chains/chains.cjs';
6
6
  import 'viem';
7
7
  import '../gen/types.gen.cjs';
@@ -1,7 +1,7 @@
1
1
  import { MockedFunction } from 'vitest';
2
2
  import { Crossmint } from '@crossmint/common-sdk-base';
3
3
  import { ApiClient } from '../client.js';
4
- import { ag as WalletLocator, ap as GetTransactionResponse, aq as SendResponse, ar as CreateWalletResponse, as as CreateWalletParams, a9 as FundWalletResponse } from '../../types-VTpasnqi.js';
4
+ import { ah as WalletLocator, aq as GetTransactionResponse, ar as SendResponse, as as CreateWalletResponse, at as CreateWalletParams, aa as FundWalletResponse } from '../../types-DnpNYkDF.js';
5
5
  import '../../chains/chains.js';
6
6
  import 'viem';
7
7
  import '../gen/types.gen.js';
@@ -1 +1 @@
1
- import{a as A,b as F,i as R,j as W,k as E,l as M,m as S}from"../../chunk-DIGDDKSF.js";import{a as w}from"../../chunk-Z5DV2DB7.js";import"../../chunk-TGFHY5PL.js";import"../../chunk-QOSA6B55.js";import"../../chunk-LV5QR6LK.js";import{a as p,b as k,h as i}from"../../chunk-NU7VF7MC.js";import{expect as r,vi as y}from"vitest";var P=({data:e,status:t=200,ok:n=!0,statusText:s="OK"})=>({json:y.fn().mockResolvedValue(e),ok:n,status:t,statusText:s}),j=e=>P({data:e}),b=(e,t=400,n="Bad Request")=>P({data:e,status:t,ok:!1,statusText:n}),B=(e={})=>{let t=p({apiKey:S},e);return k(p({},t),{setJwt:y.fn().mockReturnThis()})},L=e=>new w(e||B()),Y=()=>{let e=L();return Object.defineProperty(e,"isServerSide",{get:()=>!0,configurable:!0}),e},z=e=>{let t=e.mock.calls;if(t.length===0)return;let n=t[t.length-1];return{path:n[0],options:n[1]}},N=(e,t)=>{r(e==null?void 0:e.path).toBe(t)},V=e=>{r(e["Content-Type"]).toBe("application/json")},q=(e,t)=>{r(e.body).toBe(JSON.stringify(t))},X=(e,t,n)=>{r(e).toBeDefined(),e&&(N(e,t),e.options.headers&&V(e.options.headers),n!==void 0&&e.options&&q(e.options,n))},Z=(e,t,n,s)=>i(void 0,null,function*(){t.mockResolvedValue(b(n,s));let a=yield e();r(l(a)).toBe(!0),l(a)&&(r(a.error).toBe(!0),n.message&&r(a.message).toBe(n.message))}),Q=(s,a,...o)=>i(void 0,[s,a,...o],function*(e,t,n=[]){for(let{status:c,message:g}of A){if(n.includes(c))continue;let u={error:!0,message:g};t.mockResolvedValueOnce(b(u,c));let m=yield e();r(l(m)).toBe(!0)}}),ee=(e,t)=>i(void 0,null,function*(){t.mockRejectedValue(new Error("Network error")),yield r(e()).rejects.toThrow("Network error")}),te=(e,t)=>i(void 0,null,function*(){let n={json:y.fn().mockRejectedValue(new Error("Invalid JSON")),ok:!0,status:200};t.mockResolvedValue(n),yield r(e()).rejects.toThrow()}),ne=(e,t)=>i(void 0,null,function*(){t.mockImplementation(()=>new Promise((n,s)=>setTimeout(()=>s(new Error("Request timeout")),0))),yield r(e()).rejects.toThrow("Request timeout")}),se=(e,t,n)=>i(void 0,null,function*(){t.mockResolvedValue(j(n));let s=yield e();r(s).toEqual(n)}),oe=(e={})=>p({address:F.evmAddress,chainType:"evm",type:"smart",config:{adminSigner:{type:"external-wallet",address:E.EVM_TEST}}},e),re=(e={})=>p({id:"txn-123",status:"pending",chainType:"evm",walletType:"evm-smart-wallet",params:{transaction:"0x1234567890abcdef",signer:"api-key:test"},onChain:{txId:"0xabcdef1234567890abcdef1234567890abcdef12",explorerLink:"https://explorer.example.com/tx/0xabcdef1234567890abcdef1234567890abcdef12"},createdAt:Date.now()},e);function l(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error===!0}function C(e){return typeof e=="object"&&e!==null&&"address"in e&&"chainType"in e&&"type"in e}function $(e){return typeof e=="object"&&e!==null&&"id"in e&&"status"in e&&"chainType"in e}var x=e=>new Promise(t=>setTimeout(t,e)),ae=e=>/^0x[a-fA-F0-9]{40}$/.test(e),ie=e=>/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e),ce=(e,t,n={})=>{let s=p(p({apiKey:e},t&&{overrideBaseUrl:t}),n),a=k(p({},s),{setJwt:()=>a});return new w(a)},v=class{constructor(){this.wallets=[];this.transactions=[]}addWallet(t){t&&!this.wallets.includes(t)&&this.wallets.push(t)}addTransaction(t){t&&!this.transactions.includes(t)&&this.transactions.push(t)}getWallet(t=0){return this.wallets[t]}getTransaction(t=0){return this.transactions[t]}hasWallets(){return this.wallets.length>0}clear(){this.wallets=[],this.transactions=[]}};function pe(s,a){return i(this,arguments,function*(e,t,n={}){if(t.hasWallets())return t.getWallet();let{chainType:o="evm",type:c="mpc",owner:g,testName:u="default"}=n,m=g||`userId:integration-${u}-${Date.now()}`,f=yield e.createWallet(p({chainType:o,type:c},g&&{owner:m}));if(C(f))return t.addWallet(f.address),f.address})}function le(e,t,n){return i(this,null,function*(){let s=yield e.createWallet(n);return C(s)&&t.addWallet(s.address),s})}function ue(e,t){r(l(e)).toBe(!0),t&&r(e.message).toBeDefined()}function de(e){r(C(e)).toBe(!0)}function me(e){r($(e)).toBe(!0)}var I=(e,t,n,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){let o={amount:n,token:s,chain:a},c=yield e.fundWallet(t,o);if(l(c))throw new Error(`Failed to fund wallet: ${c.message||"Unknown error"}`);return yield x(R),c}),U=(a,o,c,...g)=>i(void 0,[a,o,c,...g],function*(e,t,n,s=M.APPROVE_TRANSACTION_MAX_RETRIES){var m;for(let f=0;f<s;f++){let d=yield e.getTransaction(t,n);if(l(d))throw new Error(`Transaction not found: ${d.message||"Unknown error"}`);if("status"in d&&(d.status==="success"||d.status==="failed"))return d;let T="approvals"in d?(m=d.approvals)==null?void 0:m.pending:void 0;if(T&&T.length>0){let O={approvals:T.map(_=>({signer:_.signer.locator,signature:""}))},h=yield e.approveTransaction(t,n,O);if(l(h))throw new Error(`Failed to approve transaction: ${h.message||"Unknown error"}`);yield x(W);continue}yield x(R)}let u=yield e.getTransaction(t,n);if(l(u))throw new Error(`Transaction not found after retries: ${u.message||"Unknown error"}`);if(!("status"in u))throw new Error("Transaction response missing status property");return u}),fe=(e,t,n=1,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){return I(e,t,n,s,a)}),ge=(e,t,n,s,a)=>i(void 0,null,function*(){let o=yield e.send(t,n,{recipient:s,amount:a});if(l(o))throw new Error(`Failed to send token: ${o.message||"Unknown error"}`);if(typeof o=="object"&&o!==null&&"id"in o&&typeof o.id=="string")return U(e,t,o.id);throw new Error("Transaction ID not found in send response")}),Te=(e,t,n=1,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){try{yield I(e,t,n,s,a)}catch(o){let c=o instanceof Error?o.message:String(o);if(!c.includes("already funded")&&!c.includes("insufficient"))throw o}});export{v as TestDataFactory,U as approveTransaction,ce as createIntegrationApiClient,B as createMockCrossmint,b as createMockErrorResponse,P as createMockResponse,re as createMockSendResponse,j as createMockSuccessResponse,oe as createMockWalletResponse,Y as createServerSideApiClient,L as createTestApiClient,le as createTestWallet,x as delay,pe as ensureWalletExists,Te as ensureWalletFunded,V as expectCommonHeaders,ue as expectErrorResponse,q as expectRequestBody,N as expectRequestPath,me as expectSuccessTransactionResponse,de as expectSuccessWalletResponse,z as extractFetchCall,I as fundWallet,fe as fundWalletAndWait,l as isErrorResponse,$ as isSuccessTransactionResponse,C as isSuccessWalletResponse,ae as isValidEthereumAddress,ie as isValidSolanaAddress,ge as sendTokenAndApprove,Q as testCommonHttpErrors,Z as testHttpErrorResponse,te as testInvalidJsonResponse,se as testMalformedResponse,ee as testNetworkError,ne as testTimeoutError,X as validateRequest};
1
+ import{a as A,b as F,i as R,j as W,k as E,l as M,m as S}from"../../chunk-DIGDDKSF.js";import{a as w}from"../../chunk-OE4UVHAK.js";import"../../chunk-TGFHY5PL.js";import"../../chunk-OTFPEC53.js";import"../../chunk-FXMXIAPL.js";import{a as p,b as k,h as i}from"../../chunk-NU7VF7MC.js";import{expect as r,vi as y}from"vitest";var P=({data:e,status:t=200,ok:n=!0,statusText:s="OK"})=>({json:y.fn().mockResolvedValue(e),ok:n,status:t,statusText:s}),j=e=>P({data:e}),b=(e,t=400,n="Bad Request")=>P({data:e,status:t,ok:!1,statusText:n}),B=(e={})=>{let t=p({apiKey:S},e);return k(p({},t),{setJwt:y.fn().mockReturnThis()})},L=e=>new w(e||B()),Y=()=>{let e=L();return Object.defineProperty(e,"isServerSide",{get:()=>!0,configurable:!0}),e},z=e=>{let t=e.mock.calls;if(t.length===0)return;let n=t[t.length-1];return{path:n[0],options:n[1]}},N=(e,t)=>{r(e==null?void 0:e.path).toBe(t)},V=e=>{r(e["Content-Type"]).toBe("application/json")},q=(e,t)=>{r(e.body).toBe(JSON.stringify(t))},X=(e,t,n)=>{r(e).toBeDefined(),e&&(N(e,t),e.options.headers&&V(e.options.headers),n!==void 0&&e.options&&q(e.options,n))},Z=(e,t,n,s)=>i(void 0,null,function*(){t.mockResolvedValue(b(n,s));let a=yield e();r(l(a)).toBe(!0),l(a)&&(r(a.error).toBe(!0),n.message&&r(a.message).toBe(n.message))}),Q=(s,a,...o)=>i(void 0,[s,a,...o],function*(e,t,n=[]){for(let{status:c,message:g}of A){if(n.includes(c))continue;let u={error:!0,message:g};t.mockResolvedValueOnce(b(u,c));let m=yield e();r(l(m)).toBe(!0)}}),ee=(e,t)=>i(void 0,null,function*(){t.mockRejectedValue(new Error("Network error")),yield r(e()).rejects.toThrow("Network error")}),te=(e,t)=>i(void 0,null,function*(){let n={json:y.fn().mockRejectedValue(new Error("Invalid JSON")),ok:!0,status:200};t.mockResolvedValue(n),yield r(e()).rejects.toThrow()}),ne=(e,t)=>i(void 0,null,function*(){t.mockImplementation(()=>new Promise((n,s)=>setTimeout(()=>s(new Error("Request timeout")),0))),yield r(e()).rejects.toThrow("Request timeout")}),se=(e,t,n)=>i(void 0,null,function*(){t.mockResolvedValue(j(n));let s=yield e();r(s).toEqual(n)}),oe=(e={})=>p({address:F.evmAddress,chainType:"evm",type:"smart",config:{adminSigner:{type:"external-wallet",address:E.EVM_TEST}}},e),re=(e={})=>p({id:"txn-123",status:"pending",chainType:"evm",walletType:"evm-smart-wallet",params:{transaction:"0x1234567890abcdef",signer:"api-key:test"},onChain:{txId:"0xabcdef1234567890abcdef1234567890abcdef12",explorerLink:"https://explorer.example.com/tx/0xabcdef1234567890abcdef1234567890abcdef12"},createdAt:Date.now()},e);function l(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error===!0}function C(e){return typeof e=="object"&&e!==null&&"address"in e&&"chainType"in e&&"type"in e}function $(e){return typeof e=="object"&&e!==null&&"id"in e&&"status"in e&&"chainType"in e}var x=e=>new Promise(t=>setTimeout(t,e)),ae=e=>/^0x[a-fA-F0-9]{40}$/.test(e),ie=e=>/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e),ce=(e,t,n={})=>{let s=p(p({apiKey:e},t&&{overrideBaseUrl:t}),n),a=k(p({},s),{setJwt:()=>a});return new w(a)},v=class{constructor(){this.wallets=[];this.transactions=[]}addWallet(t){t&&!this.wallets.includes(t)&&this.wallets.push(t)}addTransaction(t){t&&!this.transactions.includes(t)&&this.transactions.push(t)}getWallet(t=0){return this.wallets[t]}getTransaction(t=0){return this.transactions[t]}hasWallets(){return this.wallets.length>0}clear(){this.wallets=[],this.transactions=[]}};function pe(s,a){return i(this,arguments,function*(e,t,n={}){if(t.hasWallets())return t.getWallet();let{chainType:o="evm",type:c="mpc",owner:g,testName:u="default"}=n,m=g||`userId:integration-${u}-${Date.now()}`,f=yield e.createWallet(p({chainType:o,type:c},g&&{owner:m}));if(C(f))return t.addWallet(f.address),f.address})}function le(e,t,n){return i(this,null,function*(){let s=yield e.createWallet(n);return C(s)&&t.addWallet(s.address),s})}function ue(e,t){r(l(e)).toBe(!0),t&&r(e.message).toBeDefined()}function de(e){r(C(e)).toBe(!0)}function me(e){r($(e)).toBe(!0)}var I=(e,t,n,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){let o={amount:n,token:s,chain:a},c=yield e.fundWallet(t,o);if(l(c))throw new Error(`Failed to fund wallet: ${c.message||"Unknown error"}`);return yield x(R),c}),U=(a,o,c,...g)=>i(void 0,[a,o,c,...g],function*(e,t,n,s=M.APPROVE_TRANSACTION_MAX_RETRIES){var m;for(let f=0;f<s;f++){let d=yield e.getTransaction(t,n);if(l(d))throw new Error(`Transaction not found: ${d.message||"Unknown error"}`);if("status"in d&&(d.status==="success"||d.status==="failed"))return d;let T="approvals"in d?(m=d.approvals)==null?void 0:m.pending:void 0;if(T&&T.length>0){let O={approvals:T.map(_=>({signer:_.signer.locator,signature:""}))},h=yield e.approveTransaction(t,n,O);if(l(h))throw new Error(`Failed to approve transaction: ${h.message||"Unknown error"}`);yield x(W);continue}yield x(R)}let u=yield e.getTransaction(t,n);if(l(u))throw new Error(`Transaction not found after retries: ${u.message||"Unknown error"}`);if(!("status"in u))throw new Error("Transaction response missing status property");return u}),fe=(e,t,n=1,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){return I(e,t,n,s,a)}),ge=(e,t,n,s,a)=>i(void 0,null,function*(){let o=yield e.send(t,n,{recipient:s,amount:a});if(l(o))throw new Error(`Failed to send token: ${o.message||"Unknown error"}`);if(typeof o=="object"&&o!==null&&"id"in o&&typeof o.id=="string")return U(e,t,o.id);throw new Error("Transaction ID not found in send response")}),Te=(e,t,n=1,s="usdxm",a="base-sepolia")=>i(void 0,null,function*(){try{yield I(e,t,n,s,a)}catch(o){let c=o instanceof Error?o.message:String(o);if(!c.includes("already funded")&&!c.includes("insufficient"))throw o}});export{v as TestDataFactory,U as approveTransaction,ce as createIntegrationApiClient,B as createMockCrossmint,b as createMockErrorResponse,P as createMockResponse,re as createMockSendResponse,j as createMockSuccessResponse,oe as createMockWalletResponse,Y as createServerSideApiClient,L as createTestApiClient,le as createTestWallet,x as delay,pe as ensureWalletExists,Te as ensureWalletFunded,V as expectCommonHeaders,ue as expectErrorResponse,q as expectRequestBody,N as expectRequestPath,me as expectSuccessTransactionResponse,de as expectSuccessWalletResponse,z as extractFetchCall,I as fundWallet,fe as fundWalletAndWait,l as isErrorResponse,$ as isSuccessTransactionResponse,C as isSuccessWalletResponse,ae as isValidEthereumAddress,ie as isValidSolanaAddress,ge as sendTokenAndApprove,Q as testCommonHttpErrors,Z as testHttpErrorResponse,te as testInvalidJsonResponse,se as testMalformedResponse,ee as testNetworkError,ne as testTimeoutError,X as validateRequest};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk66XVKHJQcjs = require('../chunk-66XVKHJQ.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-6GEBK257.cjs');require('../chunk-2WS6SXS6.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunk66XVKHJQcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMYLHEIBDcjs = require('../chunk-MYLHEIBD.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-MYWEABPN.cjs');require('../chunk-HIKDNSEI.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunkMYLHEIBDcjs.a;
@@ -1,5 +1,5 @@
1
1
  import { CrossmintApiClient, Crossmint, APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
2
- import { as as CreateWalletParams, ar as CreateWalletResponse, ag as WalletLocator, ay as GetWalletResponse, az as CreateTransactionParams, aA as CreateTransactionResponse, aB as ApproveTransactionParams, aC as ApproveTransactionResponse, ap as GetTransactionResponse, aD as CreateSignatureParams, aE as CreateSignatureResponse, aF as ApproveSignatureParams, ah as ApproveSignatureResponse, aG as GetSignatureResponse, aa as GetTransactionsResponse, aH as GetTransfersResponse, aI as GetBalanceResponse, aJ as FundWalletParams, a9 as FundWalletResponse, ak as RegisterSignerParams, an as RegisterSignerResponse, aK as RemoveSignerParams, aL as RemoveSignerResponse, ai as GetSignerResponse, aM as SendParams, aq as SendResponse } from '../types-D6r1qRCA.cjs';
2
+ import { at as CreateWalletParams, as as CreateWalletResponse, ah as WalletLocator, az as GetWalletResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aq as GetTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aH as GetSignatureResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, aJ as GetBalanceResponse, aK as FundWalletParams, aa as FundWalletResponse, al as RegisterSignerParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, aj as GetSignerResponse, aN as SendParams, ar as SendResponse } from '../types-DUaBfLJv.cjs';
3
3
  import { Chain } from '../chains/chains.cjs';
4
4
  import 'viem';
5
5
  import './gen/types.gen.cjs';
@@ -1,5 +1,5 @@
1
1
  import { CrossmintApiClient, Crossmint, APIKeyEnvironmentPrefix } from '@crossmint/common-sdk-base';
2
- import { as as CreateWalletParams, ar as CreateWalletResponse, ag as WalletLocator, ay as GetWalletResponse, az as CreateTransactionParams, aA as CreateTransactionResponse, aB as ApproveTransactionParams, aC as ApproveTransactionResponse, ap as GetTransactionResponse, aD as CreateSignatureParams, aE as CreateSignatureResponse, aF as ApproveSignatureParams, ah as ApproveSignatureResponse, aG as GetSignatureResponse, aa as GetTransactionsResponse, aH as GetTransfersResponse, aI as GetBalanceResponse, aJ as FundWalletParams, a9 as FundWalletResponse, ak as RegisterSignerParams, an as RegisterSignerResponse, aK as RemoveSignerParams, aL as RemoveSignerResponse, ai as GetSignerResponse, aM as SendParams, aq as SendResponse } from '../types-VTpasnqi.js';
2
+ import { at as CreateWalletParams, as as CreateWalletResponse, ah as WalletLocator, az as GetWalletResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aq as GetTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aH as GetSignatureResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, aJ as GetBalanceResponse, aK as FundWalletParams, aa as FundWalletResponse, al as RegisterSignerParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, aj as GetSignerResponse, aN as SendParams, ar as SendResponse } from '../types-DnpNYkDF.js';
3
3
  import { Chain } from '../chains/chains.js';
4
4
  import 'viem';
5
5
  import './gen/types.gen.js';
@@ -1 +1 @@
1
- import{a}from"../chunk-Z5DV2DB7.js";import"../chunk-TGFHY5PL.js";import"../chunk-QOSA6B55.js";import"../chunk-LV5QR6LK.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
1
+ import{a}from"../chunk-OE4UVHAK.js";import"../chunk-TGFHY5PL.js";import"../chunk-OTFPEC53.js";import"../chunk-FXMXIAPL.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHOK6IZYGcjs = require('../../chunk-HOK6IZYG.cjs');require('../../chunk-STYSP6KL.cjs');require('../../chunk-XPMCPXI3.cjs');require('../../chunk-DSIFRRBS.cjs');exports.balanceControllerFundWallet4 = _chunkHOK6IZYGcjs.b; exports.balanceControllerFundWallet5 = _chunkHOK6IZYGcjs.M; exports.balanceControllerGetBalanceForLocator4 = _chunkHOK6IZYGcjs.a; exports.balanceControllerGetBalanceForLocator5 = _chunkHOK6IZYGcjs.L; exports.balanceUnstableControllerGetBalanceForLocator2 = _chunkHOK6IZYGcjs.g; exports.balanceV20250609ControllerGetBalanceForLocator2 = _chunkHOK6IZYGcjs.I; exports.walletActivityUnstableControllerGetMeWalletActivity2 = _chunkHOK6IZYGcjs.d; exports.walletActivityUnstableControllerGetWalletActivity2 = _chunkHOK6IZYGcjs.e; exports.walletsSendTokenControllerSendMeToken2 = _chunkHOK6IZYGcjs.c; exports.walletsSendTokenControllerSendToken2 = _chunkHOK6IZYGcjs.f; exports.walletsSendTokenV2025ControllerGetTransferTransaction2 = _chunkHOK6IZYGcjs.z; exports.walletsSendTokenV2025ControllerSendMeToken2 = _chunkHOK6IZYGcjs.l; exports.walletsSendTokenV2025ControllerSendToken2 = _chunkHOK6IZYGcjs.A; exports.walletsV2025ControllerCreateDelegatedSigner2 = _chunkHOK6IZYGcjs.D; exports.walletsV2025ControllerCreateMeDelegatedSigner2 = _chunkHOK6IZYGcjs.o; exports.walletsV2025ControllerCreateMeSignatureRequest2 = _chunkHOK6IZYGcjs.s; exports.walletsV2025ControllerCreateMeTransaction2 = _chunkHOK6IZYGcjs.k; exports.walletsV2025ControllerCreateMeWallet2 = _chunkHOK6IZYGcjs.u; exports.walletsV2025ControllerCreateSignatureRequest2 = _chunkHOK6IZYGcjs.H; exports.walletsV2025ControllerCreateTransaction2 = _chunkHOK6IZYGcjs.y; exports.walletsV2025ControllerCreateWallet2 = _chunkHOK6IZYGcjs.K; exports.walletsV2025ControllerGetAllSignatures2 = _chunkHOK6IZYGcjs.G; exports.walletsV2025ControllerGetDelegatedSigner2 = _chunkHOK6IZYGcjs.C; exports.walletsV2025ControllerGetMeDelegatedSigner2 = _chunkHOK6IZYGcjs.n; exports.walletsV2025ControllerGetMeSignature2 = _chunkHOK6IZYGcjs.q; exports.walletsV2025ControllerGetMeSignatures2 = _chunkHOK6IZYGcjs.r; exports.walletsV2025ControllerGetMeTransaction2 = _chunkHOK6IZYGcjs.i; exports.walletsV2025ControllerGetMeTransactionsWithoutChain2 = _chunkHOK6IZYGcjs.j; exports.walletsV2025ControllerGetMeWallet2 = _chunkHOK6IZYGcjs.t; exports.walletsV2025ControllerGetSignature2 = _chunkHOK6IZYGcjs.F; exports.walletsV2025ControllerGetTransaction2 = _chunkHOK6IZYGcjs.w; exports.walletsV2025ControllerGetTransactionsWithoutChain2 = _chunkHOK6IZYGcjs.x; exports.walletsV2025ControllerGetWalletByLocator2 = _chunkHOK6IZYGcjs.J; exports.walletsV2025ControllerRemoveDelegatedSigner2 = _chunkHOK6IZYGcjs.B; exports.walletsV2025ControllerRemoveMeDelegatedSigner2 = _chunkHOK6IZYGcjs.m; exports.walletsV2025ControllerSubmitApprovals2 = _chunkHOK6IZYGcjs.v; exports.walletsV2025ControllerSubmitMeApprovals2 = _chunkHOK6IZYGcjs.h; exports.walletsV2025ControllerSubmitMeSignatureApprovals2 = _chunkHOK6IZYGcjs.p; exports.walletsV2025ControllerSubmitSignatureApprovals2 = _chunkHOK6IZYGcjs.E;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-XPMCPXI3.cjs');var _chunkHOK6IZYGcjs = require('../../chunk-HOK6IZYG.cjs');require('../../chunk-STYSP6KL.cjs');require('../../chunk-DSIFRRBS.cjs');exports.balanceControllerFundWallet4 = _chunkHOK6IZYGcjs.b; exports.balanceControllerFundWallet5 = _chunkHOK6IZYGcjs.M; exports.balanceControllerGetBalanceForLocator4 = _chunkHOK6IZYGcjs.a; exports.balanceControllerGetBalanceForLocator5 = _chunkHOK6IZYGcjs.L; exports.balanceUnstableControllerGetBalanceForLocator2 = _chunkHOK6IZYGcjs.g; exports.balanceV20250609ControllerGetBalanceForLocator2 = _chunkHOK6IZYGcjs.I; exports.walletActivityUnstableControllerGetMeWalletActivity2 = _chunkHOK6IZYGcjs.d; exports.walletActivityUnstableControllerGetWalletActivity2 = _chunkHOK6IZYGcjs.e; exports.walletsSendTokenControllerSendMeToken2 = _chunkHOK6IZYGcjs.c; exports.walletsSendTokenControllerSendToken2 = _chunkHOK6IZYGcjs.f; exports.walletsSendTokenV2025ControllerGetTransferTransaction2 = _chunkHOK6IZYGcjs.z; exports.walletsSendTokenV2025ControllerSendMeToken2 = _chunkHOK6IZYGcjs.l; exports.walletsSendTokenV2025ControllerSendToken2 = _chunkHOK6IZYGcjs.A; exports.walletsV2025ControllerCreateDelegatedSigner2 = _chunkHOK6IZYGcjs.D; exports.walletsV2025ControllerCreateMeDelegatedSigner2 = _chunkHOK6IZYGcjs.o; exports.walletsV2025ControllerCreateMeSignatureRequest2 = _chunkHOK6IZYGcjs.s; exports.walletsV2025ControllerCreateMeTransaction2 = _chunkHOK6IZYGcjs.k; exports.walletsV2025ControllerCreateMeWallet2 = _chunkHOK6IZYGcjs.u; exports.walletsV2025ControllerCreateSignatureRequest2 = _chunkHOK6IZYGcjs.H; exports.walletsV2025ControllerCreateTransaction2 = _chunkHOK6IZYGcjs.y; exports.walletsV2025ControllerCreateWallet2 = _chunkHOK6IZYGcjs.K; exports.walletsV2025ControllerGetAllSignatures2 = _chunkHOK6IZYGcjs.G; exports.walletsV2025ControllerGetDelegatedSigner2 = _chunkHOK6IZYGcjs.C; exports.walletsV2025ControllerGetMeDelegatedSigner2 = _chunkHOK6IZYGcjs.n; exports.walletsV2025ControllerGetMeSignature2 = _chunkHOK6IZYGcjs.q; exports.walletsV2025ControllerGetMeSignatures2 = _chunkHOK6IZYGcjs.r; exports.walletsV2025ControllerGetMeTransaction2 = _chunkHOK6IZYGcjs.i; exports.walletsV2025ControllerGetMeTransactionsWithoutChain2 = _chunkHOK6IZYGcjs.j; exports.walletsV2025ControllerGetMeWallet2 = _chunkHOK6IZYGcjs.t; exports.walletsV2025ControllerGetSignature2 = _chunkHOK6IZYGcjs.F; exports.walletsV2025ControllerGetTransaction2 = _chunkHOK6IZYGcjs.w; exports.walletsV2025ControllerGetTransactionsWithoutChain2 = _chunkHOK6IZYGcjs.x; exports.walletsV2025ControllerGetWalletByLocator2 = _chunkHOK6IZYGcjs.J; exports.walletsV2025ControllerRemoveDelegatedSigner2 = _chunkHOK6IZYGcjs.B; exports.walletsV2025ControllerRemoveMeDelegatedSigner2 = _chunkHOK6IZYGcjs.m; exports.walletsV2025ControllerSubmitApprovals2 = _chunkHOK6IZYGcjs.v; exports.walletsV2025ControllerSubmitMeApprovals2 = _chunkHOK6IZYGcjs.h; exports.walletsV2025ControllerSubmitMeSignatureApprovals2 = _chunkHOK6IZYGcjs.p; exports.walletsV2025ControllerSubmitSignatureApprovals2 = _chunkHOK6IZYGcjs.E;
@@ -1 +1 @@
1
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-UUMP3VCM.js";import"../../chunk-5M7IRODB.js";import"../../chunk-YMRXMNME.js";import"../../chunk-NU7VF7MC.js";export{r as balanceControllerFundWallet4,M as balanceControllerFundWallet5,o as balanceControllerGetBalanceForLocator4,L as balanceControllerGetBalanceForLocator5,t as balanceUnstableControllerGetBalanceForLocator2,I as balanceV20250609ControllerGetBalanceForLocator2,f as walletActivityUnstableControllerGetMeWalletActivity2,m as walletActivityUnstableControllerGetWalletActivity2,e as walletsSendTokenControllerSendMeToken2,p as walletsSendTokenControllerSendToken2,z as walletsSendTokenV2025ControllerGetTransferTransaction2,d as walletsSendTokenV2025ControllerSendMeToken2,A as walletsSendTokenV2025ControllerSendToken2,D as walletsV2025ControllerCreateDelegatedSigner2,i as walletsV2025ControllerCreateMeDelegatedSigner2,n as walletsV2025ControllerCreateMeSignatureRequest2,c as walletsV2025ControllerCreateMeTransaction2,s as walletsV2025ControllerCreateMeWallet2,H as walletsV2025ControllerCreateSignatureRequest2,y as walletsV2025ControllerCreateTransaction2,K as walletsV2025ControllerCreateWallet2,G as walletsV2025ControllerGetAllSignatures2,C as walletsV2025ControllerGetDelegatedSigner2,h as walletsV2025ControllerGetMeDelegatedSigner2,k as walletsV2025ControllerGetMeSignature2,l as walletsV2025ControllerGetMeSignatures2,a as walletsV2025ControllerGetMeTransaction2,b as walletsV2025ControllerGetMeTransactionsWithoutChain2,q as walletsV2025ControllerGetMeWallet2,F as walletsV2025ControllerGetSignature2,v as walletsV2025ControllerGetTransaction2,w as walletsV2025ControllerGetTransactionsWithoutChain2,J as walletsV2025ControllerGetWalletByLocator2,B as walletsV2025ControllerRemoveDelegatedSigner2,g as walletsV2025ControllerRemoveMeDelegatedSigner2,u as walletsV2025ControllerSubmitApprovals2,x as walletsV2025ControllerSubmitMeApprovals2,j as walletsV2025ControllerSubmitMeSignatureApprovals2,E as walletsV2025ControllerSubmitSignatureApprovals2};
1
+ import"../../chunk-YMRXMNME.js";import{A,B,C,D,E,F,G,H,I,J,K,L,M,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-UUMP3VCM.js";import"../../chunk-5M7IRODB.js";import"../../chunk-NU7VF7MC.js";export{r as balanceControllerFundWallet4,M as balanceControllerFundWallet5,o as balanceControllerGetBalanceForLocator4,L as balanceControllerGetBalanceForLocator5,t as balanceUnstableControllerGetBalanceForLocator2,I as balanceV20250609ControllerGetBalanceForLocator2,f as walletActivityUnstableControllerGetMeWalletActivity2,m as walletActivityUnstableControllerGetWalletActivity2,e as walletsSendTokenControllerSendMeToken2,p as walletsSendTokenControllerSendToken2,z as walletsSendTokenV2025ControllerGetTransferTransaction2,d as walletsSendTokenV2025ControllerSendMeToken2,A as walletsSendTokenV2025ControllerSendToken2,D as walletsV2025ControllerCreateDelegatedSigner2,i as walletsV2025ControllerCreateMeDelegatedSigner2,n as walletsV2025ControllerCreateMeSignatureRequest2,c as walletsV2025ControllerCreateMeTransaction2,s as walletsV2025ControllerCreateMeWallet2,H as walletsV2025ControllerCreateSignatureRequest2,y as walletsV2025ControllerCreateTransaction2,K as walletsV2025ControllerCreateWallet2,G as walletsV2025ControllerGetAllSignatures2,C as walletsV2025ControllerGetDelegatedSigner2,h as walletsV2025ControllerGetMeDelegatedSigner2,k as walletsV2025ControllerGetMeSignature2,l as walletsV2025ControllerGetMeSignatures2,a as walletsV2025ControllerGetMeTransaction2,b as walletsV2025ControllerGetMeTransactionsWithoutChain2,q as walletsV2025ControllerGetMeWallet2,F as walletsV2025ControllerGetSignature2,v as walletsV2025ControllerGetTransaction2,w as walletsV2025ControllerGetTransactionsWithoutChain2,J as walletsV2025ControllerGetWalletByLocator2,B as walletsV2025ControllerRemoveDelegatedSigner2,g as walletsV2025ControllerRemoveMeDelegatedSigner2,u as walletsV2025ControllerSubmitApprovals2,x as walletsV2025ControllerSubmitMeApprovals2,j as walletsV2025ControllerSubmitMeSignatureApprovals2,E as walletsV2025ControllerSubmitSignatureApprovals2};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunk66XVKHJQcjs = require('../chunk-66XVKHJQ.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-6GEBK257.cjs');require('../chunk-2WS6SXS6.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunk66XVKHJQcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-6HXIZLEQ.cjs');var _chunkMYLHEIBDcjs = require('../chunk-MYLHEIBD.cjs');require('../chunk-ECAM5KTH.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-MYWEABPN.cjs');require('../chunk-HIKDNSEI.cjs');require('../chunk-DSIFRRBS.cjs');exports.ApiClient = _chunkMYLHEIBDcjs.a;
@@ -1,5 +1,5 @@
1
1
  export { ApiClient } from './client.cjs';
2
- export { aF as ApproveSignatureParams, ah as ApproveSignatureResponse, aB as ApproveTransactionParams, aC as ApproveTransactionResponse, aD as CreateSignatureParams, aE as CreateSignatureResponse, az as CreateTransactionParams, aA as CreateTransactionResponse, aN as CreateTransactionSuccessResponse, as as CreateWalletParams, ar as CreateWalletResponse, aJ as FundWalletParams, a9 as FundWalletResponse, aI as GetBalanceResponse, ax as GetBalanceSuccessResponse, aG as GetSignatureResponse, ai as GetSignerResponse, aO as GetSignersResponse, ap as GetTransactionResponse, ab as GetTransactionSuccessResponse, aa as GetTransactionsResponse, aH as GetTransfersResponse, ay as GetWalletResponse, aP as GetWalletSuccessResponse, aQ as RecoverySignerConfig, am as RegisterSignerChain, ak as RegisterSignerParams, R as RegisterSignerPasskeyParams, an as RegisterSignerResponse, aK as RemoveSignerParams, aL as RemoveSignerResponse, S as Scope, aM as SendParams, aq as SendResponse, $ as Signer, F as TransferScope, G as Transfers, ag as WalletLocator } from '../types-D6r1qRCA.cjs';
2
+ export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-DUaBfLJv.cjs';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import '../chains/chains.cjs';
5
5
  import 'viem';
@@ -1,5 +1,5 @@
1
1
  export { ApiClient } from './client.js';
2
- export { aF as ApproveSignatureParams, ah as ApproveSignatureResponse, aB as ApproveTransactionParams, aC as ApproveTransactionResponse, aD as CreateSignatureParams, aE as CreateSignatureResponse, az as CreateTransactionParams, aA as CreateTransactionResponse, aN as CreateTransactionSuccessResponse, as as CreateWalletParams, ar as CreateWalletResponse, aJ as FundWalletParams, a9 as FundWalletResponse, aI as GetBalanceResponse, ax as GetBalanceSuccessResponse, aG as GetSignatureResponse, ai as GetSignerResponse, aO as GetSignersResponse, ap as GetTransactionResponse, ab as GetTransactionSuccessResponse, aa as GetTransactionsResponse, aH as GetTransfersResponse, ay as GetWalletResponse, aP as GetWalletSuccessResponse, aQ as RecoverySignerConfig, am as RegisterSignerChain, ak as RegisterSignerParams, R as RegisterSignerPasskeyParams, an as RegisterSignerResponse, aK as RemoveSignerParams, aL as RemoveSignerResponse, S as Scope, aM as SendParams, aq as SendResponse, $ as Signer, F as TransferScope, G as Transfers, ag as WalletLocator } from '../types-VTpasnqi.js';
2
+ export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-DnpNYkDF.js';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import '../chains/chains.js';
5
5
  import 'viem';
package/dist/api/index.js CHANGED
@@ -1 +1 @@
1
- import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-Z5DV2DB7.js";import"../chunk-KBJA7JDT.js";import"../chunk-TGFHY5PL.js";import"../chunk-QOSA6B55.js";import"../chunk-LV5QR6LK.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
1
+ import"../chunk-5IFDVB4Y.js";import{a}from"../chunk-OE4UVHAK.js";import"../chunk-KBJA7JDT.js";import"../chunk-TGFHY5PL.js";import"../chunk-OTFPEC53.js";import"../chunk-FXMXIAPL.js";import"../chunk-NU7VF7MC.js";export{a as ApiClient};
@@ -1,6 +1,6 @@
1
1
  import 'viem';
2
2
  import './gen/types.gen.cjs';
3
- export { aF as ApproveSignatureParams, ah as ApproveSignatureResponse, aB as ApproveTransactionParams, aC as ApproveTransactionResponse, aD as CreateSignatureParams, aE as CreateSignatureResponse, az as CreateTransactionParams, aA as CreateTransactionResponse, aN as CreateTransactionSuccessResponse, as as CreateWalletParams, ar as CreateWalletResponse, aJ as FundWalletParams, a9 as FundWalletResponse, aI as GetBalanceResponse, ax as GetBalanceSuccessResponse, aG as GetSignatureResponse, ai as GetSignerResponse, aO as GetSignersResponse, ap as GetTransactionResponse, ab as GetTransactionSuccessResponse, aa as GetTransactionsResponse, aH as GetTransfersResponse, ay as GetWalletResponse, aP as GetWalletSuccessResponse, aQ as RecoverySignerConfig, am as RegisterSignerChain, ak as RegisterSignerParams, R as RegisterSignerPasskeyParams, an as RegisterSignerResponse, aK as RemoveSignerParams, aL as RemoveSignerResponse, S as Scope, aM as SendParams, aq as SendResponse, $ as Signer, F as TransferScope, G as Transfers, ag as WalletLocator } from '../types-D6r1qRCA.cjs';
3
+ export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-DUaBfLJv.cjs';
4
4
  import '../chains/chains.cjs';
5
5
  import 'ox';
6
6
  import '@crossmint/client-sdk-window';
@@ -1,6 +1,6 @@
1
1
  import 'viem';
2
2
  import './gen/types.gen.js';
3
- export { aF as ApproveSignatureParams, ah as ApproveSignatureResponse, aB as ApproveTransactionParams, aC as ApproveTransactionResponse, aD as CreateSignatureParams, aE as CreateSignatureResponse, az as CreateTransactionParams, aA as CreateTransactionResponse, aN as CreateTransactionSuccessResponse, as as CreateWalletParams, ar as CreateWalletResponse, aJ as FundWalletParams, a9 as FundWalletResponse, aI as GetBalanceResponse, ax as GetBalanceSuccessResponse, aG as GetSignatureResponse, ai as GetSignerResponse, aO as GetSignersResponse, ap as GetTransactionResponse, ab as GetTransactionSuccessResponse, aa as GetTransactionsResponse, aH as GetTransfersResponse, ay as GetWalletResponse, aP as GetWalletSuccessResponse, aQ as RecoverySignerConfig, am as RegisterSignerChain, ak as RegisterSignerParams, R as RegisterSignerPasskeyParams, an as RegisterSignerResponse, aK as RemoveSignerParams, aL as RemoveSignerResponse, S as Scope, aM as SendParams, aq as SendResponse, $ as Signer, F as TransferScope, G as Transfers, ag as WalletLocator } from '../types-VTpasnqi.js';
3
+ export { aG as ApproveSignatureParams, ai as ApproveSignatureResponse, aC as ApproveTransactionParams, aD as ApproveTransactionResponse, aE as CreateSignatureParams, aF as CreateSignatureResponse, aA as CreateTransactionParams, aB as CreateTransactionResponse, aO as CreateTransactionSuccessResponse, at as CreateWalletParams, as as CreateWalletResponse, aK as FundWalletParams, aa as FundWalletResponse, aJ as GetBalanceResponse, ay as GetBalanceSuccessResponse, aH as GetSignatureResponse, aj as GetSignerResponse, aP as GetSignersResponse, aq as GetTransactionResponse, ac as GetTransactionSuccessResponse, ab as GetTransactionsResponse, aI as GetTransfersResponse, az as GetWalletResponse, aQ as GetWalletSuccessResponse, aR as RecoverySignerConfig, an as RegisterSignerChain, al as RegisterSignerParams, R as RegisterSignerPasskeyParams, ao as RegisterSignerResponse, aL as RemoveSignerParams, aM as RemoveSignerResponse, S as Scope, aN as SendParams, ar as SendResponse, a0 as Signer, G as TransferScope, H as Transfers, ah as WalletLocator } from '../types-DnpNYkDF.js';
4
4
  import '../chains/chains.js';
5
5
  import 'ox';
6
6
  import '@crossmint/client-sdk-window';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJZYDIP5Dcjs = require('../../chunk-JZYDIP5D.cjs');require('../../chunk-FN64UU7M.cjs');require('../../chunk-3F4FMM3R.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-6GEBK257.cjs');require('../../chunk-2WS6SXS6.cjs');require('../../chunk-DSIFRRBS.cjs');exports.evmChainAdapter = _chunkJZYDIP5Dcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDDNFHKJRcjs = require('../../chunk-DDNFHKJR.cjs');require('../../chunk-FN64UU7M.cjs');require('../../chunk-3F4FMM3R.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-MYWEABPN.cjs');require('../../chunk-HIKDNSEI.cjs');require('../../chunk-DSIFRRBS.cjs');exports.evmChainAdapter = _chunkDDNFHKJRcjs.a;
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
2
2
  import '../chains.cjs';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
- import '../../types-D6r1qRCA.cjs';
5
+ import '../../types-DUaBfLJv.cjs';
6
6
  import '../../api/gen/types.gen.cjs';
7
7
  import 'ox';
8
8
  import '@crossmint/client-sdk-window';
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
2
2
  import '../chains.js';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
- import '../../types-VTpasnqi.js';
5
+ import '../../types-DnpNYkDF.js';
6
6
  import '../../api/gen/types.gen.js';
7
7
  import 'ox';
8
8
  import '@crossmint/client-sdk-window';
@@ -1 +1 @@
1
- import{a}from"../../chunk-BNC4HX7P.js";import"../../chunk-IUMKG7QD.js";import"../../chunk-TGFHY5PL.js";import"../../chunk-455NK5LB.js";import"../../chunk-QOSA6B55.js";import"../../chunk-LV5QR6LK.js";import"../../chunk-NU7VF7MC.js";export{a as evmChainAdapter};
1
+ import{a}from"../../chunk-HJNJJGK6.js";import"../../chunk-IUMKG7QD.js";import"../../chunk-TGFHY5PL.js";import"../../chunk-455NK5LB.js";import"../../chunk-OTFPEC53.js";import"../../chunk-FXMXIAPL.js";import"../../chunk-NU7VF7MC.js";export{a as evmChainAdapter};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHI72AV4Wcjs = require('../../chunk-HI72AV4W.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-6GEBK257.cjs');require('../../chunk-2WS6SXS6.cjs');require('../../chunk-DSIFRRBS.cjs');exports.solanaChainAdapter = _chunkHI72AV4Wcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBCXIEWZKcjs = require('../../chunk-BCXIEWZK.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-MYWEABPN.cjs');require('../../chunk-HIKDNSEI.cjs');require('../../chunk-DSIFRRBS.cjs');exports.solanaChainAdapter = _chunkBCXIEWZKcjs.a;
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
2
2
  import '../chains.cjs';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
- import '../../types-D6r1qRCA.cjs';
5
+ import '../../types-DUaBfLJv.cjs';
6
6
  import '../../api/gen/types.gen.cjs';
7
7
  import 'ox';
8
8
  import '@crossmint/client-sdk-window';
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
2
2
  import '../chains.js';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
- import '../../types-VTpasnqi.js';
5
+ import '../../types-DnpNYkDF.js';
6
6
  import '../../api/gen/types.gen.js';
7
7
  import 'ox';
8
8
  import '@crossmint/client-sdk-window';
@@ -1 +1 @@
1
- import{a}from"../../chunk-6VH3KWLM.js";import"../../chunk-455NK5LB.js";import"../../chunk-QOSA6B55.js";import"../../chunk-LV5QR6LK.js";import"../../chunk-NU7VF7MC.js";export{a as solanaChainAdapter};
1
+ import{a}from"../../chunk-U37UWZ6M.js";import"../../chunk-455NK5LB.js";import"../../chunk-OTFPEC53.js";import"../../chunk-FXMXIAPL.js";import"../../chunk-NU7VF7MC.js";export{a as solanaChainAdapter};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJFJXQGW5cjs = require('../../chunk-JFJXQGW5.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-6GEBK257.cjs');require('../../chunk-2WS6SXS6.cjs');require('../../chunk-DSIFRRBS.cjs');exports.stellarChainAdapter = _chunkJFJXQGW5cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk72MJS3ACcjs = require('../../chunk-72MJS3AC.cjs');require('../../chunk-CCIGWTAO.cjs');require('../../chunk-MYWEABPN.cjs');require('../../chunk-HIKDNSEI.cjs');require('../../chunk-DSIFRRBS.cjs');exports.stellarChainAdapter = _chunk72MJS3ACcjs.a;
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.cjs';
2
2
  import '../chains.cjs';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
- import '../../types-D6r1qRCA.cjs';
5
+ import '../../types-DUaBfLJv.cjs';
6
6
  import '../../api/gen/types.gen.cjs';
7
7
  import 'ox';
8
8
  import '@crossmint/client-sdk-window';
@@ -2,7 +2,7 @@ import { ChainAdapter } from '../chain-adapter.js';
2
2
  import '../chains.js';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
- import '../../types-VTpasnqi.js';
5
+ import '../../types-DnpNYkDF.js';
6
6
  import '../../api/gen/types.gen.js';
7
7
  import 'ox';
8
8
  import '@crossmint/client-sdk-window';
@@ -1 +1 @@
1
- import{a}from"../../chunk-KGQWE3HH.js";import"../../chunk-455NK5LB.js";import"../../chunk-QOSA6B55.js";import"../../chunk-LV5QR6LK.js";import"../../chunk-NU7VF7MC.js";export{a as stellarChainAdapter};
1
+ import{a}from"../../chunk-ZLKQZHEG.js";import"../../chunk-455NK5LB.js";import"../../chunk-OTFPEC53.js";import"../../chunk-FXMXIAPL.js";import"../../chunk-NU7VF7MC.js";export{a as stellarChainAdapter};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRWRESDZRcjs = require('../chunk-RWRESDZR.cjs');require('../chunk-JZYDIP5D.cjs');require('../chunk-HI72AV4W.cjs');require('../chunk-JFJXQGW5.cjs');require('../chunk-FN64UU7M.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-6GEBK257.cjs');require('../chunk-2WS6SXS6.cjs');require('../chunk-DSIFRRBS.cjs');exports.getChainAdapter = _chunkRWRESDZRcjs.a; exports.isSupportedChainType = _chunkRWRESDZRcjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6CNBIQGFcjs = require('../chunk-6CNBIQGF.cjs');require('../chunk-DDNFHKJR.cjs');require('../chunk-BCXIEWZK.cjs');require('../chunk-72MJS3AC.cjs');require('../chunk-FN64UU7M.cjs');require('../chunk-ENU3EKBG.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-MYWEABPN.cjs');require('../chunk-HIKDNSEI.cjs');require('../chunk-DSIFRRBS.cjs');exports.getChainAdapter = _chunk6CNBIQGFcjs.a; exports.isSupportedChainType = _chunk6CNBIQGFcjs.b;
@@ -1,5 +1,5 @@
1
1
  import { Chain } from './chains.cjs';
2
- import { am as RegisterSignerChain, an as RegisterSignerResponse, a0 as PendingSignerOperation, ao as TokenBalance } from '../types-D6r1qRCA.cjs';
2
+ import { an as RegisterSignerChain, ao as RegisterSignerResponse, a1 as PendingSignerOperation, ap as TokenBalance } from '../types-DUaBfLJv.cjs';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
5
  import '../api/gen/types.gen.cjs';
@@ -1,5 +1,5 @@
1
1
  import { Chain } from './chains.js';
2
- import { am as RegisterSignerChain, an as RegisterSignerResponse, a0 as PendingSignerOperation, ao as TokenBalance } from '../types-VTpasnqi.js';
2
+ import { an as RegisterSignerChain, ao as RegisterSignerResponse, a1 as PendingSignerOperation, ap as TokenBalance } from '../types-DnpNYkDF.js';
3
3
  import '@crossmint/common-sdk-base';
4
4
  import 'viem';
5
5
  import '../api/gen/types.gen.js';
@@ -1 +1 @@
1
- import{a,b}from"../chunk-YWZMLT47.js";import"../chunk-BNC4HX7P.js";import"../chunk-6VH3KWLM.js";import"../chunk-KGQWE3HH.js";import"../chunk-IUMKG7QD.js";import"../chunk-OQZTL6ZG.js";import"../chunk-TGFHY5PL.js";import"../chunk-455NK5LB.js";import"../chunk-QOSA6B55.js";import"../chunk-LV5QR6LK.js";import"../chunk-NU7VF7MC.js";export{a as getChainAdapter,b as isSupportedChainType};
1
+ import{a,b}from"../chunk-3PDACUM7.js";import"../chunk-HJNJJGK6.js";import"../chunk-U37UWZ6M.js";import"../chunk-ZLKQZHEG.js";import"../chunk-IUMKG7QD.js";import"../chunk-OQZTL6ZG.js";import"../chunk-TGFHY5PL.js";import"../chunk-455NK5LB.js";import"../chunk-OTFPEC53.js";import"../chunk-FXMXIAPL.js";import"../chunk-NU7VF7MC.js";export{a as getChainAdapter,b as isSupportedChainType};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNFDWJLL6cjs = require('../chunk-NFDWJLL6.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-6GEBK257.cjs');require('../chunk-2WS6SXS6.cjs');require('../chunk-DSIFRRBS.cjs');exports.isMainnetChain = _chunkNFDWJLL6cjs.c; exports.isTestnetChain = _chunkNFDWJLL6cjs.b; exports.isValidChain = _chunkNFDWJLL6cjs.e; exports.mainnetToTestnet = _chunkNFDWJLL6cjs.d; exports.toViemChain = _chunkNFDWJLL6cjs.a; exports.validateChainForEnvironment = _chunkNFDWJLL6cjs.f;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBJZM3EV2cjs = require('../chunk-BJZM3EV2.cjs');require('../chunk-5X4EOJFG.cjs');require('../chunk-HRUMWG2F.cjs');require('../chunk-IR5WN6FQ.cjs');require('../chunk-GEY574TH.cjs');require('../chunk-UE3WVHTM.cjs');require('../chunk-3F4FMM3R.cjs');require('../chunk-CCIGWTAO.cjs');require('../chunk-MYWEABPN.cjs');require('../chunk-HIKDNSEI.cjs');require('../chunk-DSIFRRBS.cjs');exports.isMainnetChain = _chunkBJZM3EV2cjs.c; exports.isTestnetChain = _chunkBJZM3EV2cjs.b; exports.isValidChain = _chunkBJZM3EV2cjs.e; exports.mainnetToTestnet = _chunkBJZM3EV2cjs.d; exports.toViemChain = _chunkBJZM3EV2cjs.a; exports.validateChainForEnvironment = _chunkBJZM3EV2cjs.f;
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"../chunk-KSW27XVT.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-TGFHY5PL.js";import"../chunk-455NK5LB.js";import"../chunk-QOSA6B55.js";import"../chunk-LV5QR6LK.js";import"../chunk-NU7VF7MC.js";export{c as isMainnetChain,b as isTestnetChain,e as isValidChain,d as mainnetToTestnet,a as toViemChain,f as validateChainForEnvironment};
1
+ import{a,b,c,d,e,f}from"../chunk-EJCR7VKJ.js";import"../chunk-FT5EVMLB.js";import"../chunk-SVIKBM3S.js";import"../chunk-KKQBZXFE.js";import"../chunk-S3DYQVRD.js";import"../chunk-KUP7H7X2.js";import"../chunk-TGFHY5PL.js";import"../chunk-455NK5LB.js";import"../chunk-OTFPEC53.js";import"../chunk-FXMXIAPL.js";import"../chunk-NU7VF7MC.js";export{c as isMainnetChain,b as isTestnetChain,e as isValidChain,d as mainnetToTestnet,a as toViemChain,f as validateChainForEnvironment};
@@ -1 +1 @@
1
- import{a}from"./chunk-BNC4HX7P.js";import{a as r}from"./chunk-6VH3KWLM.js";import{a as t}from"./chunk-KGQWE3HH.js";import{a as n}from"./chunk-OQZTL6ZG.js";var i={evm:a,solana:r,stellar:t};function g(e){return i[n(e)]}function m(e){return Object.prototype.hasOwnProperty.call(i,e)}export{g as a,m as b};
1
+ import{a}from"./chunk-HJNJJGK6.js";import{a as r}from"./chunk-U37UWZ6M.js";import{a as t}from"./chunk-ZLKQZHEG.js";import{a as n}from"./chunk-OQZTL6ZG.js";var i={evm:a,solana:r,stellar:t};function g(e){return i[n(e)]}function m(e){return Object.prototype.hasOwnProperty.call(i,e)}export{g as a,m as b};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-GOXB2RBF.js";var t={type:"api-key",validateConfig(){},buildInternalConfig(e,i){return{type:"api-key",locator:"api-key",address:i.walletAddress}},canAutoAssemble(){return!0},addSignerPayload(e){return r(e)},matchesRecovery(e,i){return r(e)===r(i)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};export{t as a};
1
+ import{a as r}from"./chunk-GNON524X.js";var t={type:"api-key",validateConfig(){},buildInternalConfig(e,i){return{type:"api-key",locator:"api-key",address:i.walletAddress}},canAutoAssemble(){return!0},addSignerPayload(e){return r(e)},matchesRecovery(e,i){return r(e)===r(i)},adoptsRecoveryConfigOnMatch:!0,signerUnavailableReason:()=>null};export{t as a};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDDNFHKJRcjs = require('./chunk-DDNFHKJR.cjs');var _chunkBCXIEWZKcjs = require('./chunk-BCXIEWZK.cjs');var _chunk72MJS3ACcjs = require('./chunk-72MJS3AC.cjs');var _chunkENU3EKBGcjs = require('./chunk-ENU3EKBG.cjs');var i={evm:_chunkDDNFHKJRcjs.a,solana:_chunkBCXIEWZKcjs.a,stellar:_chunk72MJS3ACcjs.a};function h(e){return i[_chunkENU3EKBGcjs.a.call(void 0, e)]}function g(e){return Object.prototype.hasOwnProperty.call(i,e)}exports.a = h; exports.b = g;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6GEBK257cjs = require('./chunk-6GEBK257.cjs');var o={nativeToken:"xlm",walletLocatorPrefix:"me:stellar:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,t){if(!("transaction"in n)||n.transaction==null)throw _chunk6GEBK257cjs.a.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"contractId"in n?{contractId:n.contractId}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{contractId:void 0}}};exports.a = o;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMYWEABPNcjs = require('./chunk-MYWEABPN.cjs');var o={nativeToken:"xlm",walletLocatorPrefix:"me:stellar:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,t){if(!("transaction"in n)||n.transaction==null)throw _chunkMYWEABPNcjs.a.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"contractId"in n?{contractId:n.contractId}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{contractId:void 0}}};exports.a = o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGSNFNRH2cjs = require('./chunk-GSNFNRH2.cjs');var _chunk3VYGTPRFcjs = require('./chunk-3VYGTPRF.cjs');var _chunk3F4FMM3Rcjs = require('./chunk-3F4FMM3R.cjs');var _chunk6GEBK257cjs = require('./chunk-6GEBK257.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _ox = require('ox');var R={[_commonsdkbase.APIKeyEnvironmentPrefix.DEVELOPMENT]:"https://development.devicekey.store",[_commonsdkbase.APIKeyEnvironmentPrefix.STAGING]:"https://staging.devicekey.store",[_commonsdkbase.APIKeyEnvironmentPrefix.PRODUCTION]:"https://devicekey.store"},E=6e4,L="indexeddb-fatal",c= exports.a =class extends _chunk3VYGTPRFcjs.a{constructor(e){super(e);this.iframePromise=null;this.reloading=null;this.biometricRequestHandler=null;this.biometricListener=null;if(typeof window!="undefined"&&!_chunkGSNFNRH2cjs.a.call(void 0, ))throw new (0, _chunk3F4FMM3Rcjs.n)("Device signer requires a browser with third-party storage partitioning (Chrome \u2265 115, Firefox \u2265 103, or Safari). Without storage partitioning, different embedders of the same iframe can share IndexedDB, allowing cross-site key access. See https://developer.chrome.com/blog/storage-partitioning");let r=_commonsdkbase.getEnvironmentForKey.call(void 0, e);if(r==null)throw new Error("Unable to determine environment from API key");this.iframeUrl=R[r]}setBiometricRequestHandler(e){this.biometricRequestHandler=e}generateKey(){return _chunkDSIFRRBScjs.h.call(void 0, this,arguments,function*(e={biometricPolicy:"none"}){return(yield this.rpc("generateKey",e)).publicKeyBase64})}mapAddressToKey(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){yield this.rpc("mapAddressToKey",{address:e,publicKeyBase64:r})})}getKey(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.rpc("getKey",{address:e})).publicKeyBase64})}hasKey(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.rpc("hasKey",{publicKeyBase64:e})).hasKey})}signMessage(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.rpc("signMessage",{address:e,message:r})})}deleteKey(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){yield this.rpc("deleteKey",{address:e})})}destroy(){this.biometricListener!=null&&(window.removeEventListener("message",this.biometricListener),this.biometricListener=null),this.iframePromise!=null&&(this.iframePromise.then(e=>e.remove()).catch(()=>{}),this.iframePromise=null)}rpc(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let i=yield this.sendRpc(e,r);if(i.fatal){_chunk6GEBK257cjs.a.warn(`[IframeDeviceSignerKeyStorage] Recoverable IDB error on "${e}", reloading iframe and retrying`),yield this.reloadIframe();let t=yield this.sendRpc(e,r);if(t.fatal)throw new Error(`Device signer IDB fatal error on "${e}" persisted after iframe reload`);return t.value}return i.value})}sendRpc(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let t=(yield this.getIframe()).contentWindow;if(t==null)throw new Error("Device signer iframe has no contentWindow");let g=crypto.randomUUID(),a=new URL(this.iframeUrl).origin;return new Promise((s,o)=>{let f=setTimeout(()=>{window.removeEventListener("message",p),o(new Error(`Device signer RPC "${e}" timed out after ${E}ms`))},E);function p(y){let d=y.data;d==null||d.id!==g||y.origin===a&&(clearTimeout(f),window.removeEventListener("message",p),d.type==="error"&&d.code===L?s({fatal:!0}):d.type==="error"?o(new Error(d.error)):s({value:d.result,fatal:!1}))}window.addEventListener("message",p),t.postMessage({type:e,id:g,payload:r},this.iframeUrl)})})}reloadIframe(){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){if(this.reloading!=null)return this.reloading;let e=_chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){try{this.destroy(),yield this.getIframe()}finally{this.reloading=null}});return this.reloading=e,e})}setupBiometricListener(e){let r=new URL(this.iframeUrl).origin;this.biometricListener=i=>_chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){if(i.origin!==r)return;let t=i.data;if((t==null?void 0:t.type)!=="biometric-request")return;let g=e.contentWindow;if(g!=null)try{this.biometricRequestHandler!=null&&(yield this.biometricRequestHandler(t.action));let a=null;if(t.action==="createCredential"){let s=t.payload,o=yield _ox.WebAuthnP256.createCredential({name:s.name});a={id:o.id,publicKey:{x:`0x${o.publicKey.x.toString(16)}`,y:`0x${o.publicKey.y.toString(16)}`}}}else if(t.action==="sign"){let s=t.payload,{signature:o,metadata:f}=yield _ox.WebAuthnP256.sign({credentialId:s.credentialId,challenge:s.challenge});a={signature:{r:`0x${o.r.toString(16)}`,s:`0x${o.s.toString(16)}`},metadata:f}}g.postMessage({type:"biometric-response",id:t.id,result:a},this.iframeUrl)}catch(a){let s=a instanceof Error?a.message:"Unknown biometric error";g.postMessage({type:"biometric-response",id:t.id,error:s},this.iframeUrl)}}),window.addEventListener("message",this.biometricListener)}getIframe(){return this.iframePromise==null&&(this.iframePromise=this.createIframe().catch(e=>{throw this.iframePromise=null,e})),this.iframePromise}createIframe(){let e=document.createElement("iframe");return e.src=this.iframeUrl,Object.assign(e.style,{position:"absolute",opacity:"0",pointerEvents:"none",width:"0",height:"0",border:"none",top:"-9999px",left:"-9999px"}),new Promise((r,i)=>{e.onload=()=>{this.setupBiometricListener(e),r(e)},e.onerror=()=>i(new Error("Failed to load device signer iframe")),document.body.appendChild(e)})}getDeviceName(){var t;if(typeof navigator=="undefined")return"Unknown Device";let e=navigator.userAgent,r=this.parseDevice(e),i=this.parseBrowser(e);return r!=null&&i!=null?`${i} on ${r}`:(t=r!=null?r:i)!=null?t:"Unknown Device"}parseDevice(e){return/iPad/.test(e)?"iPad":/iPhone/.test(e)?"iPhone":/Macintosh|Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"ChromeOS":null}parseBrowser(e){return/Edg\//.test(e)?"Edge":/OPR\/|Opera/.test(e)?"Opera":typeof navigator!="undefined"&&"brave"in navigator?"Brave":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)&&!/Chrome\//.test(e)?"Safari":/Firefox\//.test(e)?"Firefox":null}};_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"deviceSignerKeyStorage.generateKey"})],c.prototype,"generateKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"deviceSignerKeyStorage.mapAddressToKey"})],c.prototype,"mapAddressToKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"deviceSignerKeyStorage.getKey"})],c.prototype,"getKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"deviceSignerKeyStorage.hasKey"})],c.prototype,"hasKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"deviceSignerKeyStorage.signMessage"})],c.prototype,"signMessage",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"deviceSignerKeyStorage.deleteKey"})],c.prototype,"deleteKey",1);exports.a = c;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGSNFNRH2cjs = require('./chunk-GSNFNRH2.cjs');var _chunk3VYGTPRFcjs = require('./chunk-3VYGTPRF.cjs');var _chunk3F4FMM3Rcjs = require('./chunk-3F4FMM3R.cjs');var _chunkMYWEABPNcjs = require('./chunk-MYWEABPN.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _ox = require('ox');var R={[_commonsdkbase.APIKeyEnvironmentPrefix.DEVELOPMENT]:"https://development.devicekey.store",[_commonsdkbase.APIKeyEnvironmentPrefix.STAGING]:"https://staging.devicekey.store",[_commonsdkbase.APIKeyEnvironmentPrefix.PRODUCTION]:"https://devicekey.store"},E=6e4,L="indexeddb-fatal",c= exports.a =class extends _chunk3VYGTPRFcjs.a{constructor(e){super(e);this.iframePromise=null;this.reloading=null;this.biometricRequestHandler=null;this.biometricListener=null;if(typeof window!="undefined"&&!_chunkGSNFNRH2cjs.a.call(void 0, ))throw new (0, _chunk3F4FMM3Rcjs.n)("Device signer requires a browser with third-party storage partitioning (Chrome \u2265 115, Firefox \u2265 103, or Safari). Without storage partitioning, different embedders of the same iframe can share IndexedDB, allowing cross-site key access. See https://developer.chrome.com/blog/storage-partitioning");let r=_commonsdkbase.getEnvironmentForKey.call(void 0, e);if(r==null)throw new Error("Unable to determine environment from API key");this.iframeUrl=R[r]}setBiometricRequestHandler(e){this.biometricRequestHandler=e}generateKey(){return _chunkDSIFRRBScjs.h.call(void 0, this,arguments,function*(e={biometricPolicy:"none"}){return(yield this.rpc("generateKey",e)).publicKeyBase64})}mapAddressToKey(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){yield this.rpc("mapAddressToKey",{address:e,publicKeyBase64:r})})}getKey(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.rpc("getKey",{address:e})).publicKeyBase64})}hasKey(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return(yield this.rpc("hasKey",{publicKeyBase64:e})).hasKey})}signMessage(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.rpc("signMessage",{address:e,message:r})})}deleteKey(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){yield this.rpc("deleteKey",{address:e})})}destroy(){this.biometricListener!=null&&(window.removeEventListener("message",this.biometricListener),this.biometricListener=null),this.iframePromise!=null&&(this.iframePromise.then(e=>e.remove()).catch(()=>{}),this.iframePromise=null)}rpc(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let i=yield this.sendRpc(e,r);if(i.fatal){_chunkMYWEABPNcjs.a.warn(`[IframeDeviceSignerKeyStorage] Recoverable IDB error on "${e}", reloading iframe and retrying`),yield this.reloadIframe();let t=yield this.sendRpc(e,r);if(t.fatal)throw new Error(`Device signer IDB fatal error on "${e}" persisted after iframe reload`);return t.value}return i.value})}sendRpc(e,r){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let t=(yield this.getIframe()).contentWindow;if(t==null)throw new Error("Device signer iframe has no contentWindow");let g=crypto.randomUUID(),a=new URL(this.iframeUrl).origin;return new Promise((s,o)=>{let f=setTimeout(()=>{window.removeEventListener("message",p),o(new Error(`Device signer RPC "${e}" timed out after ${E}ms`))},E);function p(y){let d=y.data;d==null||d.id!==g||y.origin===a&&(clearTimeout(f),window.removeEventListener("message",p),d.type==="error"&&d.code===L?s({fatal:!0}):d.type==="error"?o(new Error(d.error)):s({value:d.result,fatal:!1}))}window.addEventListener("message",p),t.postMessage({type:e,id:g,payload:r},this.iframeUrl)})})}reloadIframe(){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){if(this.reloading!=null)return this.reloading;let e=_chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){try{this.destroy(),yield this.getIframe()}finally{this.reloading=null}});return this.reloading=e,e})}setupBiometricListener(e){let r=new URL(this.iframeUrl).origin;this.biometricListener=i=>_chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){if(i.origin!==r)return;let t=i.data;if((t==null?void 0:t.type)!=="biometric-request")return;let g=e.contentWindow;if(g!=null)try{this.biometricRequestHandler!=null&&(yield this.biometricRequestHandler(t.action));let a=null;if(t.action==="createCredential"){let s=t.payload,o=yield _ox.WebAuthnP256.createCredential({name:s.name});a={id:o.id,publicKey:{x:`0x${o.publicKey.x.toString(16)}`,y:`0x${o.publicKey.y.toString(16)}`}}}else if(t.action==="sign"){let s=t.payload,{signature:o,metadata:f}=yield _ox.WebAuthnP256.sign({credentialId:s.credentialId,challenge:s.challenge});a={signature:{r:`0x${o.r.toString(16)}`,s:`0x${o.s.toString(16)}`},metadata:f}}g.postMessage({type:"biometric-response",id:t.id,result:a},this.iframeUrl)}catch(a){let s=a instanceof Error?a.message:"Unknown biometric error";g.postMessage({type:"biometric-response",id:t.id,error:s},this.iframeUrl)}}),window.addEventListener("message",this.biometricListener)}getIframe(){return this.iframePromise==null&&(this.iframePromise=this.createIframe().catch(e=>{throw this.iframePromise=null,e})),this.iframePromise}createIframe(){let e=document.createElement("iframe");return e.src=this.iframeUrl,Object.assign(e.style,{position:"absolute",opacity:"0",pointerEvents:"none",width:"0",height:"0",border:"none",top:"-9999px",left:"-9999px"}),new Promise((r,i)=>{e.onload=()=>{this.setupBiometricListener(e),r(e)},e.onerror=()=>i(new Error("Failed to load device signer iframe")),document.body.appendChild(e)})}getDeviceName(){var t;if(typeof navigator=="undefined")return"Unknown Device";let e=navigator.userAgent,r=this.parseDevice(e),i=this.parseBrowser(e);return r!=null&&i!=null?`${i} on ${r}`:(t=r!=null?r:i)!=null?t:"Unknown Device"}parseDevice(e){return/iPad/.test(e)?"iPad":/iPhone/.test(e)?"iPhone":/Macintosh|Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"ChromeOS":null}parseBrowser(e){return/Edg\//.test(e)?"Edge":/OPR\/|Opera/.test(e)?"Opera":typeof navigator!="undefined"&&"brave"in navigator?"Brave":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)&&!/Chrome\//.test(e)?"Safari":/Firefox\//.test(e)?"Firefox":null}};_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"deviceSignerKeyStorage.generateKey"})],c.prototype,"generateKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"deviceSignerKeyStorage.mapAddressToKey"})],c.prototype,"mapAddressToKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"deviceSignerKeyStorage.getKey"})],c.prototype,"getKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"deviceSignerKeyStorage.hasKey"})],c.prototype,"hasKey",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"deviceSignerKeyStorage.signMessage"})],c.prototype,"signMessage",1),_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"deviceSignerKeyStorage.deleteKey"})],c.prototype,"deleteKey",1);exports.a = c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIKHH67TLcjs = require('./chunk-IKHH67TL.cjs');var _chunk6GEBK257cjs = require('./chunk-6GEBK257.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _ox = require('ox');var _viem = require('viem');var c=class p extends _chunkIKHH67TLcjs.a{constructor(e){super(e)}signMessage(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let i=_viem.isHex.call(void 0, e)?e:_viem.toHex.call(void 0, e),r=_ox.PersonalMessage.getSignPayload(i);return yield this.sign(r)})}signTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.sign(e)})}sign(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var o;yield this.handleAuthRequired();let i=this.getJwtOrThrow(),r=e.replace("0x","");_chunk6GEBK257cjs.a.info("sign: sending request",{keyType:"secp256k1"});let y=Date.now(),n=yield(o=this.config.clientTEEConnection)==null?void 0:o.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:i,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:r,encoding:"hex"}},options:_chunkIKHH67TLcjs.b});if(_chunk6GEBK257cjs.a.info("sign: response received",{status:n==null?void 0:n.status,durationMs:Date.now()-y}),(n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return p.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="hex"||e.keyType!=="secp256k1"||e.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"secp256k1",encoding:"hex"}}};exports.a = c;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBZJ5TU7Hcjs = require('./chunk-BZJ5TU7H.cjs');var _chunkMYWEABPNcjs = require('./chunk-MYWEABPN.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _ox = require('ox');var _viem = require('viem');var c=class p extends _chunkBZJ5TU7Hcjs.a{constructor(e){super(e)}signMessage(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){let i=_viem.isHex.call(void 0, e)?e:_viem.toHex.call(void 0, e),r=_ox.PersonalMessage.getSignPayload(i);return yield this.sign(r)})}signTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){return yield this.sign(e)})}sign(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var o;yield this.handleAuthRequired();let i=this.getJwtOrThrow(),r=e.replace("0x","");_chunkMYWEABPNcjs.a.info("sign: sending request",{keyType:"secp256k1"});let y=Date.now(),n=yield(o=this.config.clientTEEConnection)==null?void 0:o.sendAction({event:"request:sign",responseEvent:"response:sign",data:{authData:{jwt:i,apiKey:this.config.crossmint.apiKey},data:{keyType:"secp256k1",bytes:r,encoding:"hex"}},options:_chunkBZJ5TU7Hcjs.b});if(_chunkMYWEABPNcjs.a.info("sign: response received",{status:n==null?void 0:n.status,durationMs:Date.now()-y}),(n==null?void 0:n.status)==="error")throw new Error(n.error);if((n==null?void 0:n.signature)==null)throw new Error("Failed to sign transaction");return p.verifyPublicKeyFormat(n.publicKey),{signature:n.signature.bytes}})}static verifyPublicKeyFormat(e){if(e==null)throw new Error("No public key found");if(e.encoding!=="hex"||e.keyType!=="secp256k1"||e.bytes==null)throw new Error("Not supported. Expected public key to be in hex encoding and secp256k1 key type. Got: "+JSON.stringify(e))}getChainKeyParams(){return{scheme:"secp256k1",encoding:"hex"}}};exports.a = c;
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-IHMMTMFG.js";import{a as u,b as g,c as w,d as v,e as y}from"./chunk-DCKFFFPG.js";import{a as r}from"./chunk-OTFPEC53.js";import{c as E,h}from"./chunk-NU7VF7MC.js";import{validateAPIKey as P,WithLoggerContext as A}from"@crossmint/common-sdk-base";var m=class{constructor(i){this.config=i;this._needsAuth=!0;this._authPromise=null;this._initializationPromise=null;this._onboardingConnectionGeneration=null;typeof window!="undefined"&&(this._initializationPromise=this.initialize()),this.type=this.config.type}locator(){return this.config.locator}address(){return this.config.address}initialize(){return h(this,null,function*(){try{if(this.config.clientTEEConnection==null){let i=P(this.config.crossmint.apiKey);if(!i.isValid)throw new Error("Invalid API key");let t=new f({environment:i.environment});this.config.clientTEEConnection=yield t.initialize()}}finally{this._initializationPromise=null}})}getTEEConnection(){return h(this,null,function*(){if(this.config.clientTEEConnection==null){if(this._initializationPromise){if(yield this._initializationPromise,this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");return this.config.clientTEEConnection}this._initializationPromise=this.initializeTEEConnection();try{yield this._initializationPromise}finally{this._initializationPromise=null}}if(this.config.clientTEEConnection==null)throw new Error("TEE connection is not initialized");return this.config.clientTEEConnection})}initializeTEEConnection(){return h(this,null,function*(){r.info("TEE connection not initialized, initializing now");let i=P(this.config.crossmint.apiKey);if(!i.isValid)throw new Error("Invalid API key");let t=new f({environment:i.environment});if(this.config.clientTEEConnection=yield t.initialize(),this.config.clientTEEConnection==null)throw new Error("Failed to initialize TEE connection");r.info("TEE connection initialized successfully")})}handleAuthRequired(){return h(this,null,function*(){var d;let i=yield this.getTEEConnection();if(this.config.onAuthRequired==null)throw new Error(`${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, sendOtp, verifyOtp, reject) => { /* your UI logic */ }`);r.info("get-status: sending request");let t=Date.now(),e=yield i.sendAction({event:"request:get-status",responseEvent:"response:get-status",data:{authData:{jwt:(d=this.config.crossmint.jwt)!=null?d:"",apiKey:this.config.crossmint.apiKey}},options:l}),n=Date.now()-t;if((e==null?void 0:e.status)!=="success"){let c=(e==null?void 0:e.status)==="error"&&e.error||"Failed to retrieve signer status",p=(e==null?void 0:e.status)==="error"?e.code:void 0;throw r.error("get-status: failed",{status:e==null?void 0:e.status,error:(e==null?void 0:e.status)==="error"?e.error:void 0,code:p,durationMs:n}),new w(c,p)}if(r.info("get-status: response received",{signerStatus:e.signerStatus,durationMs:n}),e.signerStatus==="ready"){this._needsAuth=!1;return}else this._needsAuth=!0;r.info("Auth required, initiating OTP flow",{needsAuth:this._needsAuth});let{promise:s,resolve:o,reject:a}=this.createAuthPromise();if(this._authPromise={promise:s,resolve:o,reject:a},this.config.onAuthRequired)try{yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),c=>this.verifyOtp(c),()=>h(this,null,function*(){r.info("Auth rejected",{authRejected:!0}),this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),c=>this.verifyOtp(c),()=>{var c;return(c=this._authPromise)==null?void 0:c.reject(new u)})),a(new u)}))}catch(c){r.error("handleAuthRequired error",{error:c}),a(c)}try{yield s}catch(c){throw r.error("handleAuthRequired promise error",{error:c}),c}})}ensureAuthenticated(){return h(this,null,function*(){this.config.resetSignerFrame!=null&&(yield this.config.resetSignerFrame()),yield this.handleAuthRequired()})}getJwtOrThrow(){let i=this.config.crossmint.jwt;if(i==null)throw new Error("JWT is required");return i}createAuthPromise(){let i,t;return{promise:new Promise((n,s)=>{i=n,t=s}),resolve:i,reject:t}}sendMessageWithOtp(){return h(this,null,function*(){var o;let i=yield this.getTEEConnection(),t=this.getAuthId();r.info("start-onboarding: sending request");let e=Date.now(),n=yield i.sendAction({event:"request:start-onboarding",responseEvent:"response:start-onboarding",data:{authData:{jwt:(o=this.config.crossmint.jwt)!=null?o:"",apiKey:this.config.crossmint.apiKey},data:{authId:t}},options:l}),s=Date.now()-e;if(this._onboardingConnectionGeneration=i.connectionGeneration,r.info("start-onboarding: response received",{status:n==null?void 0:n.status,durationMs:s}),(n==null?void 0:n.status)==="success"&&n.signerStatus==="ready"){this._needsAuth=!1;return}if((n==null?void 0:n.status)==="error")throw r.error("start-onboarding: failed",{error:n.error,code:n.code}),new g(n.error||"Failed to initiate OTP process.",n.code)})}getAuthId(){return this.config.type==="email"?`email:${this.config.email}`:`phone:${this.config.phone}`}verifyOtp(i){return h(this,null,function*(){var s,o;let t;try{let a=yield this.getTEEConnection();r.info("complete-onboarding: sending request");let d=Date.now();t=yield a.sendAction({event:"request:complete-onboarding",responseEvent:"response:complete-onboarding",data:{authData:{jwt:(s=this.config.crossmint.jwt)!=null?s:"",apiKey:this.config.crossmint.apiKey},data:{onboardingAuthentication:{encryptedOtp:i}}},options:l}),r.info("complete-onboarding: response received",{status:t==null?void 0:t.status,durationMs:Date.now()-d})}catch(a){return r.error("complete-onboarding: error",{error:a}),yield this.handleOnboardingVerificationFailure(a)}if((t==null?void 0:t.status)==="success"){this._needsAuth=!1,this.config.onAuthRequired!=null&&(yield this.config.onAuthRequired(this.config.type,this.locator(),this._needsAuth,()=>this.sendMessageWithOtp(),a=>this.verifyOtp(a),()=>{var a;return(a=this._authPromise)==null?void 0:a.reject(new u)})),(o=this._authPromise)==null||o.resolve();return}r.error("complete-onboarding: OTP validation failed",{status:t==null?void 0:t.status,error:(t==null?void 0:t.status)==="error"?t.error:void 0,code:(t==null?void 0:t.status)==="error"?t.code:void 0});let e=(t==null?void 0:t.status)==="error"&&t.error||"Failed to validate encrypted OTP",n=(t==null?void 0:t.status)==="error"?t.code:void 0;return yield this.handleOnboardingVerificationFailure(new g(e,n))})}handleOnboardingVerificationFailure(i){return h(this,null,function*(){var n,s,o;this._needsAuth=!0;let t=this.config.clientTEEConnection;if(this._onboardingConnectionGeneration!=null&&t!=null&&t.connectionGeneration!==this._onboardingConnectionGeneration){r.warn("tee.signer.onboarding.reissued",{reason:"signer frame reloaded mid-onboarding, re-issuing OTP",onboardingGeneration:this._onboardingConnectionGeneration,currentGeneration:t==null?void 0:t.connectionGeneration});try{yield this.sendMessageWithOtp()}catch(a){throw(n=this._authPromise)==null||n.reject(a),a}if(!this._needsAuth){(s=this._authPromise)==null||s.resolve();return}throw new y}throw(o=this._authPromise)==null||o.reject(i),i})}_exportPrivateKey(i,t){return h(this,null,function*(){yield this.ensureAuthenticated();let e=this.getJwtOrThrow(),{scheme:n,encoding:s}=this.getChainKeyParams();if(t!=null){let a=i.on("event:key-exported",d=>{i.off(a),d.status==="success"&&Promise.resolve().then(()=>t()).catch(()=>{console.error("[NCS Signer] onExport callback error")})})}let o=yield i.sendAction({event:"request:export-signer",responseEvent:"response:export-signer",data:{authData:{jwt:e,apiKey:this.config.crossmint.apiKey},data:{scheme:n,encoding:s,walletAddress:this.config.address,authId:this.getAuthId()}},options:l});if((o==null?void 0:o.status)==="error")throw r.error("export-signer: failed",{error:o.error,code:o.code}),new v(o.error||"Failed to export private key",o.code)})}};E([A({logger:r,methodName:"handleAuthRequired"})],m.prototype,"handleAuthRequired",1);var l={timeoutMs:3e4};export{m as a,l as b};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6GEBK257cjs = require('./chunk-6GEBK257.cjs');var o={nativeToken:"sol",walletLocatorPrefix:"me:solana:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,a){if(!("transaction"in n)||n.transaction==null)throw _chunk6GEBK257cjs.a.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"mintHash"in n?{mintHash:n.mintHash}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{mintHash:void 0}}};exports.a = o;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMYWEABPNcjs = require('./chunk-MYWEABPN.cjs');var o={nativeToken:"sol",walletLocatorPrefix:"me:solana:smart",supportsSignatures:!1,addSignerChain(n){},extractAddSignerOperation(n,r,a){if(!("transaction"in n)||n.transaction==null)throw _chunkMYWEABPNcjs.a.error("wallet.addSigner.error",{error:"Expected transaction in response for Solana/Stellar chain"}),new Error("Expected transaction in response for Solana/Stellar chain");return{type:"transaction",id:n.transaction.id}},balanceTokenFields(n){return n!=null&&"mintHash"in n?{mintHash:n.mintHash}:n!=null&&"contractAddress"in n?{contractAddress:n.contractAddress}:{}},emptyBalanceTokenFields(){return{mintHash:void 0}}};exports.a = o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5X4EOJFGcjs = require('./chunk-5X4EOJFG.cjs');var _chunkHRUMWG2Fcjs = require('./chunk-HRUMWG2F.cjs');var _chunkIR5WN6FQcjs = require('./chunk-IR5WN6FQ.cjs');var _chunkGEY574THcjs = require('./chunk-GEY574TH.cjs');var _chunkUE3WVHTMcjs = require('./chunk-UE3WVHTM.cjs');var _chunk3F4FMM3Rcjs = require('./chunk-3F4FMM3R.cjs');var _chunk6GEBK257cjs = require('./chunk-6GEBK257.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _chains = require('viem/chains');var w=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.CURTIS,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET],D=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT,_commonsdkbase.BlockchainIncludingTestnet.APECHAIN,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA,_commonsdkbase.BlockchainIncludingTestnet.BASE,_commonsdkbase.BlockchainIncludingTestnet.BSC,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM,_commonsdkbase.BlockchainIncludingTestnet.FLOW,_commonsdkbase.BlockchainIncludingTestnet.MANTLE,_commonsdkbase.BlockchainIncludingTestnet.MODE,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM,_commonsdkbase.BlockchainIncludingTestnet.PLUME,_commonsdkbase.BlockchainIncludingTestnet.POLYGON,_commonsdkbase.BlockchainIncludingTestnet.SCROLL,_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1,_commonsdkbase.BlockchainIncludingTestnet.SHAPE,_commonsdkbase.BlockchainIncludingTestnet.STORY,_commonsdkbase.BlockchainIncludingTestnet.TEMPO,_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN,_commonsdkbase.BlockchainIncludingTestnet.ZORA];function X(t){switch(t){case _commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA:return _chains.baseSepolia;case _commonsdkbase.BlockchainIncludingTestnet.BASE:return _chains.base;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY:return _chains.polygonAmoy;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON:return _chains.polygon;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA:return _chains.optimismSepolia;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM:return _chains.optimism;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA:return _chains.arbitrumSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM:return _chains.arbitrum;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA:return _chains.arbitrumNova;case _commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET:return _chunkGEY574THcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.STORY:return _chunkIR5WN6FQcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA:return _chains.modeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.MODE:return _chains.mode;case _commonsdkbase.BlockchainIncludingTestnet.BSC:return _chains.bsc;case _commonsdkbase.BlockchainIncludingTestnet.SHAPE:return _chains.shape;case _commonsdkbase.BlockchainIncludingTestnet.ZORA:return _chains.zora;case _commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA:return _chains.zoraSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA:return _chains.sepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM:return _chains.mainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW:return _chains.flowMainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET:return _chains.flowTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET:return _chains.plumeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME:return _chains.plume;case _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET:return _chunkHRUMWG2Fcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.TEMPO:return _chunkUE3WVHTMcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET:return _chunk5X4EOJFGcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT:case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.APECHAIN:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1:case _commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.CURTIS:case _commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN:case _commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA:throw new Error(`Chain ${t} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`);default:throw new Error(`Unknown chain: ${t}`)}}function I(t){return w.includes(t)}function C(t){return D.includes(t)}var Y={[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT]:_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.APECHAIN]:_commonsdkbase.BlockchainIncludingTestnet.CURTIS,[_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM]:_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.BASE]:_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM]:_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.FLOW]:_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.MANTLE]:_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.MODE]:_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM]:_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.PLUME]:_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.POLYGON]:_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,[_commonsdkbase.BlockchainIncludingTestnet.SCROLL]:_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1]:_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.STORY]:_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN]:_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.ZORA]:_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.TEMPO]:_commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET};function g(t){return Y[t]}function F(t){return t==="solana"||t==="stellar"||I(t)||C(t)}function ee(t,a){if(!F(t))throw new (0, _chunk3F4FMM3Rcjs.c)(`Unknown chain "${t}". Please use a supported chain name (e.g. "base-sepolia", "polygon", "solana", "stellar").`);if(t==="solana"||t==="stellar")return t;let r=t,T=a===_commonsdkbase.APIKeyEnvironmentPrefix.PRODUCTION;if(T&&I(r))throw new (0, _chunk3F4FMM3Rcjs.b)(`Chain "${t}" is a testnet chain and cannot be used in production. Please use a mainnet chain instead.`);if(!T&&C(r)){let n=g(r);if(n!=null)return _chunk6GEBK257cjs.a.debug("validateChainForEnvironment.autoConverted",{chain:t,convertedTo:n,environment:a,message:`Chain "${t}" is a mainnet chain and cannot be used in ${a} environment. Automatically converted to "${n}".`}),n;_chunk6GEBK257cjs.a.debug("validateChainForEnvironment.mismatch",{chain:t,environment:a,message:`Chain "${t}" is a mainnet chain and should not be used in ${a} environment. No testnet equivalent is available. Please use a testnet chain instead.`})}return t}exports.a = X; exports.b = I; exports.c = C; exports.d = g; exports.e = F; exports.f = ee;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5X4EOJFGcjs = require('./chunk-5X4EOJFG.cjs');var _chunkHRUMWG2Fcjs = require('./chunk-HRUMWG2F.cjs');var _chunkIR5WN6FQcjs = require('./chunk-IR5WN6FQ.cjs');var _chunkGEY574THcjs = require('./chunk-GEY574TH.cjs');var _chunkUE3WVHTMcjs = require('./chunk-UE3WVHTM.cjs');var _chunk3F4FMM3Rcjs = require('./chunk-3F4FMM3R.cjs');var _chunkMYWEABPNcjs = require('./chunk-MYWEABPN.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');var _chains = require('viem/chains');var w=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.CURTIS,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,_commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET,_commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET],D=[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT,_commonsdkbase.BlockchainIncludingTestnet.APECHAIN,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM,_commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA,_commonsdkbase.BlockchainIncludingTestnet.BASE,_commonsdkbase.BlockchainIncludingTestnet.BSC,_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM,_commonsdkbase.BlockchainIncludingTestnet.FLOW,_commonsdkbase.BlockchainIncludingTestnet.MANTLE,_commonsdkbase.BlockchainIncludingTestnet.MODE,_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM,_commonsdkbase.BlockchainIncludingTestnet.PLUME,_commonsdkbase.BlockchainIncludingTestnet.POLYGON,_commonsdkbase.BlockchainIncludingTestnet.SCROLL,_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1,_commonsdkbase.BlockchainIncludingTestnet.SHAPE,_commonsdkbase.BlockchainIncludingTestnet.STORY,_commonsdkbase.BlockchainIncludingTestnet.TEMPO,_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN,_commonsdkbase.BlockchainIncludingTestnet.ZORA];function X(t){switch(t){case _commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA:return _chains.baseSepolia;case _commonsdkbase.BlockchainIncludingTestnet.BASE:return _chains.base;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY:return _chains.polygonAmoy;case _commonsdkbase.BlockchainIncludingTestnet.POLYGON:return _chains.polygon;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA:return _chains.optimismSepolia;case _commonsdkbase.BlockchainIncludingTestnet.OPTIMISM:return _chains.optimism;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA:return _chains.arbitrumSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUM:return _chains.arbitrum;case _commonsdkbase.BlockchainIncludingTestnet.ARBITRUMNOVA:return _chains.arbitrumNova;case _commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET:return _chunkGEY574THcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.STORY:return _chunkIR5WN6FQcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA:return _chains.modeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.MODE:return _chains.mode;case _commonsdkbase.BlockchainIncludingTestnet.BSC:return _chains.bsc;case _commonsdkbase.BlockchainIncludingTestnet.SHAPE:return _chains.shape;case _commonsdkbase.BlockchainIncludingTestnet.ZORA:return _chains.zora;case _commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA:return _chains.zoraSepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA:return _chains.sepolia;case _commonsdkbase.BlockchainIncludingTestnet.ETHEREUM:return _chains.mainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW:return _chains.flowMainnet;case _commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET:return _chains.flowTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET:return _chains.plumeTestnet;case _commonsdkbase.BlockchainIncludingTestnet.PLUME:return _chains.plume;case _commonsdkbase.BlockchainIncludingTestnet.ARC_TESTNET:return _chunkHRUMWG2Fcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.TEMPO:return _chunkUE3WVHTMcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET:return _chunk5X4EOJFGcjs.a;case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT:case _commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.APECHAIN:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE:case _commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL:case _commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA:case _commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1:case _commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET:case _commonsdkbase.BlockchainIncludingTestnet.CURTIS:case _commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN:case _commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA:throw new Error(`Chain ${t} is not yet supported in toViemChain function. Please add the appropriate viem chain definition.`);default:throw new Error(`Unknown chain: ${t}`)}}function I(t){return w.includes(t)}function C(t){return D.includes(t)}var Y={[_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT]:_commonsdkbase.BlockchainIncludingTestnet.ABSTRACT_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.APECHAIN]:_commonsdkbase.BlockchainIncludingTestnet.CURTIS,[_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM]:_commonsdkbase.BlockchainIncludingTestnet.ARBITRUM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.BASE]:_commonsdkbase.BlockchainIncludingTestnet.BASE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM]:_commonsdkbase.BlockchainIncludingTestnet.ETHEREUM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.FLOW]:_commonsdkbase.BlockchainIncludingTestnet.FLOW_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.MANTLE]:_commonsdkbase.BlockchainIncludingTestnet.MANTLE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.MODE]:_commonsdkbase.BlockchainIncludingTestnet.MODE_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM]:_commonsdkbase.BlockchainIncludingTestnet.OPTIMISM_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.PLUME]:_commonsdkbase.BlockchainIncludingTestnet.PLUME_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.POLYGON]:_commonsdkbase.BlockchainIncludingTestnet.POLYGON_AMOY,[_commonsdkbase.BlockchainIncludingTestnet.SCROLL]:_commonsdkbase.BlockchainIncludingTestnet.SCROLL_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.SEI_PACIFIC_1]:_commonsdkbase.BlockchainIncludingTestnet.SEI_ATLANTIC_2_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.STORY]:_commonsdkbase.BlockchainIncludingTestnet.STORY_TESTNET,[_commonsdkbase.BlockchainIncludingTestnet.WORLDCHAIN]:_commonsdkbase.BlockchainIncludingTestnet.WORLD_CHAIN_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.ZORA]:_commonsdkbase.BlockchainIncludingTestnet.ZORA_SEPOLIA,[_commonsdkbase.BlockchainIncludingTestnet.TEMPO]:_commonsdkbase.BlockchainIncludingTestnet.TEMPO_TESTNET};function g(t){return Y[t]}function F(t){return t==="solana"||t==="stellar"||I(t)||C(t)}function ee(t,a){if(!F(t))throw new (0, _chunk3F4FMM3Rcjs.c)(`Unknown chain "${t}". Please use a supported chain name (e.g. "base-sepolia", "polygon", "solana", "stellar").`);if(t==="solana"||t==="stellar")return t;let r=t,T=a===_commonsdkbase.APIKeyEnvironmentPrefix.PRODUCTION;if(T&&I(r))throw new (0, _chunk3F4FMM3Rcjs.b)(`Chain "${t}" is a testnet chain and cannot be used in production. Please use a mainnet chain instead.`);if(!T&&C(r)){let n=g(r);if(n!=null)return _chunkMYWEABPNcjs.a.debug("validateChainForEnvironment.autoConverted",{chain:t,convertedTo:n,environment:a,message:`Chain "${t}" is a mainnet chain and cannot be used in ${a} environment. Automatically converted to "${n}".`}),n;_chunkMYWEABPNcjs.a.debug("validateChainForEnvironment.mismatch",{chain:t,environment:a,message:`Chain "${t}" is a mainnet chain and should not be used in ${a} environment. No testnet equivalent is available. Please use a testnet chain instead.`})}return t}exports.a = X; exports.b = I; exports.c = C; exports.d = g; exports.e = F; exports.f = ee;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkSNAWZWNRcjs = require('./chunk-SNAWZWNR.cjs');var _chunkUULZ22RQcjs = require('./chunk-UULZ22RQ.cjs');var _chunk3F4FMM3Rcjs = require('./chunk-3F4FMM3R.cjs');var _chunk6GEBK257cjs = require('./chunk-6GEBK257.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var o=class o extends _chunkSNAWZWNRcjs.a{constructor(e){super({chain:e.chain,address:e.address,owner:e.owner,options:_chunkSNAWZWNRcjs.a.getOptions(e),alias:e.alias,recovery:_chunkSNAWZWNRcjs.a.getRecovery(e),apiRecoveryServerSignerAddress:_chunkSNAWZWNRcjs.a.getApiRecoveryServerSignerAddress(e),apiDelegatedServerSignerAddresses:_chunkSNAWZWNRcjs.a.getApiDelegatedServerSignerAddresses(e),signer:e.signer,signers:_chunkSNAWZWNRcjs.a.getInitialSigners(e)},_chunkSNAWZWNRcjs.a.getApiClient(e))}static from(e){if(!_commonsdkbase.isValidSolanaAddress.call(void 0, e.address))throw new Error("Wallet is not a Solana wallet");return new o(e)}sendTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var l,p;_chunk6GEBK257cjs.a.info("solanaWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let n=yield this.createTransaction(e);if((l=e.options)!=null&&l.prepareOnly)return _chunk6GEBK257cjs.a.info("solanaWallet.sendTransaction.prepared",{transactionId:n.id}),{hash:void 0,explorerLink:void 0,transactionId:n.id};let i={additionalSigners:(p=e.additionalSigners)==null?void 0:p.map(d=>new (0, _chunkUULZ22RQcjs.a)({type:"external-wallet",address:d.publicKey.toString(),locator:`external-wallet:${d.publicKey.toString()}`,onSign:g=>(g.sign([d]),Promise.resolve(g))}))},a=yield this.approveTransactionAndWait(n.id,i);return _chunk6GEBK257cjs.a.info("solanaWallet.sendTransaction.success",{transactionId:n.id,hash:a.hash}),a})}createTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var a;let n;((a=e.options)==null?void 0:a.signer)==null?n=this.signerManager.require().locator():typeof e.options.signer=="string"?n=e.options.signer:n=this.resolveServerSignerApiLocator(e.options.signer);let s;"serializedTransaction"in e?s=e.serializedTransaction:s=_bs582.default.encode(e.transaction.serialize());let i=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:s,signer:n}});if("error"in i)throw new (0, _chunk3F4FMM3Rcjs.y)(JSON.stringify(i));return i})}};_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunk6GEBK257cjs.a,methodName:"solanaWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],o.prototype,"sendTransaction",1);var f=o;exports.a = f;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkOI6QI264cjs = require('./chunk-OI6QI264.cjs');var _chunkUULZ22RQcjs = require('./chunk-UULZ22RQ.cjs');var _chunk3F4FMM3Rcjs = require('./chunk-3F4FMM3R.cjs');var _chunkMYWEABPNcjs = require('./chunk-MYWEABPN.cjs');var _chunkDSIFRRBScjs = require('./chunk-DSIFRRBS.cjs');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _commonsdkbase = require('@crossmint/common-sdk-base');var o=class o extends _chunkOI6QI264cjs.a{constructor(e){super({chain:e.chain,address:e.address,owner:e.owner,options:_chunkOI6QI264cjs.a.getOptions(e),alias:e.alias,recovery:_chunkOI6QI264cjs.a.getRecovery(e),apiRecoveryServerSignerAddress:_chunkOI6QI264cjs.a.getApiRecoveryServerSignerAddress(e),apiDelegatedServerSignerAddresses:_chunkOI6QI264cjs.a.getApiDelegatedServerSignerAddresses(e),signer:e.signer,signers:_chunkOI6QI264cjs.a.getInitialSigners(e)},_chunkOI6QI264cjs.a.getApiClient(e))}static from(e){if(!_commonsdkbase.isValidSolanaAddress.call(void 0, e.address))throw new Error("Wallet is not a Solana wallet");return new o(e)}sendTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var l,p;_chunkMYWEABPNcjs.a.info("solanaWallet.sendTransaction.start"),yield this.preAuthIfNeeded();let n=yield this.createTransaction(e);if((l=e.options)!=null&&l.prepareOnly)return _chunkMYWEABPNcjs.a.info("solanaWallet.sendTransaction.prepared",{transactionId:n.id}),{hash:void 0,explorerLink:void 0,transactionId:n.id};let i={additionalSigners:(p=e.additionalSigners)==null?void 0:p.map(d=>new (0, _chunkUULZ22RQcjs.a)({type:"external-wallet",address:d.publicKey.toString(),locator:`external-wallet:${d.publicKey.toString()}`,onSign:g=>(g.sign([d]),Promise.resolve(g))}))},a=yield this.approveTransactionAndWait(n.id,i);return _chunkMYWEABPNcjs.a.info("solanaWallet.sendTransaction.success",{transactionId:n.id,hash:a.hash}),a})}createTransaction(e){return _chunkDSIFRRBScjs.h.call(void 0, this,null,function*(){var a;let n;((a=e.options)==null?void 0:a.signer)==null?n=this.signerManager.require().locator():typeof e.options.signer=="string"?n=e.options.signer:n=this.resolveServerSignerApiLocator(e.options.signer);let s;"serializedTransaction"in e?s=e.serializedTransaction:s=_bs582.default.encode(e.transaction.serialize());let i=yield this.apiClient.createTransaction(this.walletLocator,{params:{transaction:s,signer:n}});if("error"in i)throw new (0, _chunk3F4FMM3Rcjs.y)(JSON.stringify(i));return i})}};_chunkDSIFRRBScjs.c.call(void 0, [_commonsdkbase.WithLoggerContext.call(void 0, {logger:_chunkMYWEABPNcjs.a,methodName:"solanaWallet.sendTransaction",buildContext(e){return{chain:e.chain,address:e.address}}})],o.prototype,"sendTransaction",1);var f=o;exports.a = f;