@symmio/trading-react 1.1.0 → 3.0.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 (543) hide show
  1. package/dist/account-layer/index.d.ts +1 -0
  2. package/dist/account-layer/index.d.ts.map +1 -1
  3. package/dist/account-layer/index.js +26 -25
  4. package/dist/account-layer/use-deallocate-and-initiate-withdraw.d.ts +53 -0
  5. package/dist/account-layer/use-deallocate-and-initiate-withdraw.d.ts.map +1 -0
  6. package/dist/account-layer/use-deallocate-and-initiate-withdraw.js +49 -0
  7. package/dist/account-layer/use-deallocate-and-initiate-withdraw.js.map +1 -0
  8. package/dist/account-layer/use-deposit-and-allocate.d.ts +4 -2
  9. package/dist/account-layer/use-deposit-and-allocate.d.ts.map +1 -1
  10. package/dist/account-layer/use-deposit-and-allocate.js +17 -15
  11. package/dist/account-layer/use-deposit-and-allocate.js.map +1 -1
  12. package/dist/account-layer/use-edit-account-name.d.ts.map +1 -1
  13. package/dist/account-layer/use-edit-account-name.js +14 -14
  14. package/dist/account-layer/use-edit-account-name.js.map +1 -1
  15. package/dist/account-layer/use-virtual-accounts-addresses-of-sub-account.d.ts +1 -1
  16. package/dist/account-layer/use-virtual-accounts-addresses-of-sub-account.js.map +1 -1
  17. package/dist/candles/index.d.ts +5 -0
  18. package/dist/candles/index.d.ts.map +1 -0
  19. package/dist/candles/index.js +5 -0
  20. package/dist/candles/use-binance-candle-source.d.ts +27 -0
  21. package/dist/candles/use-binance-candle-source.d.ts.map +1 -0
  22. package/dist/candles/use-binance-candle-source.js +24 -0
  23. package/dist/candles/use-binance-candle-source.js.map +1 -0
  24. package/dist/candles/use-candle-stream.d.ts +65 -0
  25. package/dist/candles/use-candle-stream.d.ts.map +1 -0
  26. package/dist/candles/use-candle-stream.js +44 -0
  27. package/dist/candles/use-candle-stream.js.map +1 -0
  28. package/dist/candles/use-candles.d.ts +40 -0
  29. package/dist/candles/use-candles.d.ts.map +1 -0
  30. package/dist/candles/use-candles.js +22 -0
  31. package/dist/candles/use-candles.js.map +1 -0
  32. package/dist/candles/use-tradingview-datafeed.d.ts +31 -0
  33. package/dist/candles/use-tradingview-datafeed.d.ts.map +1 -0
  34. package/dist/candles/use-tradingview-datafeed.js +21 -0
  35. package/dist/candles/use-tradingview-datafeed.js.map +1 -0
  36. package/dist/index.d.ts +125 -21
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +201 -113
  39. package/dist/instant-layer/index.d.ts +4 -0
  40. package/dist/instant-layer/index.d.ts.map +1 -1
  41. package/dist/instant-layer/index.js +10 -6
  42. package/dist/instant-layer/use-instant-close-auto.d.ts.map +1 -1
  43. package/dist/instant-layer/use-instant-close-auto.js +12 -11
  44. package/dist/instant-layer/use-instant-close-auto.js.map +1 -1
  45. package/dist/instant-layer/use-instant-close-bulk-auto.d.ts.map +1 -1
  46. package/dist/instant-layer/use-instant-close-bulk-auto.js +12 -11
  47. package/dist/instant-layer/use-instant-close-bulk-auto.js.map +1 -1
  48. package/dist/instant-layer/use-instant-close-bulk.d.ts.map +1 -1
  49. package/dist/instant-layer/use-instant-close-bulk.js +12 -11
  50. package/dist/instant-layer/use-instant-close-bulk.js.map +1 -1
  51. package/dist/instant-layer/use-instant-close.d.ts.map +1 -1
  52. package/dist/instant-layer/use-instant-close.js +12 -11
  53. package/dist/instant-layer/use-instant-close.js.map +1 -1
  54. package/dist/instant-layer/use-instant-open-auto.d.ts.map +1 -1
  55. package/dist/instant-layer/use-instant-open-auto.js +12 -11
  56. package/dist/instant-layer/use-instant-open-auto.js.map +1 -1
  57. package/dist/instant-layer/use-instant-open-fees.d.ts +43 -0
  58. package/dist/instant-layer/use-instant-open-fees.d.ts.map +1 -0
  59. package/dist/instant-layer/use-instant-open-fees.js +111 -0
  60. package/dist/instant-layer/use-instant-open-fees.js.map +1 -0
  61. package/dist/instant-layer/use-instant-open-with-tpsl.d.ts.map +1 -1
  62. package/dist/instant-layer/use-instant-open-with-tpsl.js +34 -31
  63. package/dist/instant-layer/use-instant-open-with-tpsl.js.map +1 -1
  64. package/dist/instant-layer/use-instant-open.d.ts +23 -18
  65. package/dist/instant-layer/use-instant-open.d.ts.map +1 -1
  66. package/dist/instant-layer/use-instant-open.js +12 -11
  67. package/dist/instant-layer/use-instant-open.js.map +1 -1
  68. package/dist/instant-layer/use-instant-opens.d.ts +6 -6
  69. package/dist/instant-layer/use-instant-opens.d.ts.map +1 -1
  70. package/dist/instant-layer/use-instant-opens.js.map +1 -1
  71. package/dist/instant-layer/use-instant-trade-required-selectors.d.ts +25 -0
  72. package/dist/instant-layer/use-instant-trade-required-selectors.d.ts.map +1 -0
  73. package/dist/instant-layer/use-instant-trade-required-selectors.js +13 -0
  74. package/dist/instant-layer/use-instant-trade-required-selectors.js.map +1 -0
  75. package/dist/instant-layer/use-limit-close-auto.d.ts +30 -0
  76. package/dist/instant-layer/use-limit-close-auto.d.ts.map +1 -0
  77. package/dist/instant-layer/use-limit-close-auto.js +33 -0
  78. package/dist/instant-layer/use-limit-close-auto.js.map +1 -0
  79. package/dist/instant-layer/use-limit-open-auto.d.ts +30 -0
  80. package/dist/instant-layer/use-limit-open-auto.d.ts.map +1 -0
  81. package/dist/instant-layer/use-limit-open-auto.js +33 -0
  82. package/dist/instant-layer/use-limit-open-auto.js.map +1 -0
  83. package/dist/inventory/index.d.ts +3 -0
  84. package/dist/inventory/index.d.ts.map +1 -0
  85. package/dist/inventory/index.js +3 -0
  86. package/dist/inventory/use-inventory-tvl-history.d.ts +27 -0
  87. package/dist/inventory/use-inventory-tvl-history.d.ts.map +1 -0
  88. package/dist/inventory/use-inventory-tvl-history.js +28 -0
  89. package/dist/inventory/use-inventory-tvl-history.js.map +1 -0
  90. package/dist/inventory/use-inventory-tvl.d.ts +23 -0
  91. package/dist/inventory/use-inventory-tvl.d.ts.map +1 -0
  92. package/dist/inventory/use-inventory-tvl.js +27 -0
  93. package/dist/inventory/use-inventory-tvl.js.map +1 -0
  94. package/dist/margin/index.d.ts +1 -0
  95. package/dist/margin/index.d.ts.map +1 -1
  96. package/dist/margin/use-account-margin-risk.d.ts +68 -0
  97. package/dist/margin/use-account-margin-risk.d.ts.map +1 -0
  98. package/dist/margin/use-account-margin-risk.js +31 -0
  99. package/dist/margin/use-account-margin-risk.js.map +1 -0
  100. package/dist/margin/use-available-instant-open-margin.d.ts +27 -7
  101. package/dist/margin/use-available-instant-open-margin.d.ts.map +1 -1
  102. package/dist/margin/use-available-instant-open-margin.js +117 -46
  103. package/dist/margin/use-available-instant-open-margin.js.map +1 -1
  104. package/dist/market-info/use-market-info.d.ts +13 -13
  105. package/dist/market-info/use-market-info.d.ts.map +1 -1
  106. package/dist/market-info/use-market-info.js.map +1 -1
  107. package/dist/markets/use-markets.d.ts +14 -8
  108. package/dist/markets/use-markets.d.ts.map +1 -1
  109. package/dist/markets/use-markets.js.map +1 -1
  110. package/dist/muon/index.d.ts +2 -0
  111. package/dist/muon/index.d.ts.map +1 -1
  112. package/dist/muon/use-force-close-price-sig.d.ts +34 -0
  113. package/dist/muon/use-force-close-price-sig.d.ts.map +1 -0
  114. package/dist/muon/use-force-close-price-sig.js +31 -0
  115. package/dist/muon/use-force-close-price-sig.js.map +1 -0
  116. package/dist/muon/use-send-quote-upnl-sig.d.ts +30 -0
  117. package/dist/muon/use-send-quote-upnl-sig.d.ts.map +1 -0
  118. package/dist/muon/use-send-quote-upnl-sig.js +28 -0
  119. package/dist/muon/use-send-quote-upnl-sig.js.map +1 -0
  120. package/dist/notifications/use-search-notifications.d.ts +12 -12
  121. package/dist/notifications/use-search-notifications.d.ts.map +1 -1
  122. package/dist/notifications/use-search-notifications.js.map +1 -1
  123. package/dist/notional-cap/use-notional-cap-by-symbol-id.d.ts +7 -7
  124. package/dist/notional-cap/use-notional-cap-by-symbol-id.d.ts.map +1 -1
  125. package/dist/notional-cap/use-notional-cap-by-symbol-id.js.map +1 -1
  126. package/dist/orderbook/index.d.ts +5 -0
  127. package/dist/orderbook/index.d.ts.map +1 -0
  128. package/dist/orderbook/index.js +5 -0
  129. package/dist/orderbook/use-binance-orderbook-source.d.ts +28 -0
  130. package/dist/orderbook/use-binance-orderbook-source.d.ts.map +1 -0
  131. package/dist/orderbook/use-binance-orderbook-source.js +26 -0
  132. package/dist/orderbook/use-binance-orderbook-source.js.map +1 -0
  133. package/dist/orderbook/use-live-orderbook.d.ts +104 -0
  134. package/dist/orderbook/use-live-orderbook.d.ts.map +1 -0
  135. package/dist/orderbook/use-live-orderbook.js +77 -0
  136. package/dist/orderbook/use-live-orderbook.js.map +1 -0
  137. package/dist/orderbook/use-orderbook-stream.d.ts +73 -0
  138. package/dist/orderbook/use-orderbook-stream.d.ts.map +1 -0
  139. package/dist/orderbook/use-orderbook-stream.js +49 -0
  140. package/dist/orderbook/use-orderbook-stream.js.map +1 -0
  141. package/dist/orderbook/use-orderbook.d.ts +35 -0
  142. package/dist/orderbook/use-orderbook.d.ts.map +1 -0
  143. package/dist/orderbook/use-orderbook.js +22 -0
  144. package/dist/orderbook/use-orderbook.js.map +1 -0
  145. package/dist/pools/index.d.ts +30 -0
  146. package/dist/pools/index.d.ts.map +1 -0
  147. package/dist/pools/index.js +30 -0
  148. package/dist/pools/use-add-market.d.ts +57 -0
  149. package/dist/pools/use-add-market.d.ts.map +1 -0
  150. package/dist/pools/use-add-market.js +30 -0
  151. package/dist/pools/use-add-market.js.map +1 -0
  152. package/dist/pools/use-authenticate-listing.d.ts +45 -0
  153. package/dist/pools/use-authenticate-listing.d.ts.map +1 -0
  154. package/dist/pools/use-authenticate-listing.js +30 -0
  155. package/dist/pools/use-authenticate-listing.js.map +1 -0
  156. package/dist/pools/use-cancel-withdraw.d.ts +47 -0
  157. package/dist/pools/use-cancel-withdraw.d.ts.map +1 -0
  158. package/dist/pools/use-cancel-withdraw.js +30 -0
  159. package/dist/pools/use-cancel-withdraw.js.map +1 -0
  160. package/dist/pools/use-claim-history.d.ts +25 -0
  161. package/dist/pools/use-claim-history.d.ts.map +1 -0
  162. package/dist/pools/use-claim-history.js +27 -0
  163. package/dist/pools/use-claim-history.js.map +1 -0
  164. package/dist/pools/use-claim-profit.d.ts +53 -0
  165. package/dist/pools/use-claim-profit.d.ts.map +1 -0
  166. package/dist/pools/use-claim-profit.js +30 -0
  167. package/dist/pools/use-claim-profit.js.map +1 -0
  168. package/dist/pools/use-deposit-address.d.ts +43 -0
  169. package/dist/pools/use-deposit-address.d.ts.map +1 -0
  170. package/dist/pools/use-deposit-address.js +28 -0
  171. package/dist/pools/use-deposit-address.js.map +1 -0
  172. package/dist/pools/use-listing-config.d.ts +28 -0
  173. package/dist/pools/use-listing-config.d.ts.map +1 -0
  174. package/dist/pools/use-listing-config.js +27 -0
  175. package/dist/pools/use-listing-config.js.map +1 -0
  176. package/dist/pools/use-listing-market-config-projection.d.ts +66 -0
  177. package/dist/pools/use-listing-market-config-projection.d.ts.map +1 -0
  178. package/dist/pools/use-listing-market-config-projection.js +57 -0
  179. package/dist/pools/use-listing-market-config-projection.js.map +1 -0
  180. package/dist/pools/use-listing-market-config.d.ts +49 -0
  181. package/dist/pools/use-listing-market-config.d.ts.map +1 -0
  182. package/dist/pools/use-listing-market-config.js +28 -0
  183. package/dist/pools/use-listing-market-config.js.map +1 -0
  184. package/dist/pools/use-listing-market-detail.d.ts +29 -0
  185. package/dist/pools/use-listing-market-detail.d.ts.map +1 -0
  186. package/dist/pools/use-listing-market-detail.js +27 -0
  187. package/dist/pools/use-listing-market-detail.js.map +1 -0
  188. package/dist/pools/use-listing-markets.d.ts +32 -0
  189. package/dist/pools/use-listing-markets.d.ts.map +1 -0
  190. package/dist/pools/use-listing-markets.js +27 -0
  191. package/dist/pools/use-listing-markets.js.map +1 -0
  192. package/dist/pools/use-listing-status.d.ts +29 -0
  193. package/dist/pools/use-listing-status.d.ts.map +1 -0
  194. package/dist/pools/use-listing-status.js +28 -0
  195. package/dist/pools/use-listing-status.js.map +1 -0
  196. package/dist/pools/use-pool-quotes.d.ts +26 -0
  197. package/dist/pools/use-pool-quotes.d.ts.map +1 -0
  198. package/dist/pools/use-pool-quotes.js +27 -0
  199. package/dist/pools/use-pool-quotes.js.map +1 -0
  200. package/dist/pools/use-pool-reward-chart.d.ts +32 -0
  201. package/dist/pools/use-pool-reward-chart.d.ts.map +1 -0
  202. package/dist/pools/use-pool-reward-chart.js +28 -0
  203. package/dist/pools/use-pool-reward-chart.js.map +1 -0
  204. package/dist/pools/use-pool-total-reward.d.ts +27 -0
  205. package/dist/pools/use-pool-total-reward.d.ts.map +1 -0
  206. package/dist/pools/use-pool-total-reward.js +28 -0
  207. package/dist/pools/use-pool-total-reward.js.map +1 -0
  208. package/dist/pools/use-pool-trade-history.d.ts +26 -0
  209. package/dist/pools/use-pool-trade-history.d.ts.map +1 -0
  210. package/dist/pools/use-pool-trade-history.js +27 -0
  211. package/dist/pools/use-pool-trade-history.js.map +1 -0
  212. package/dist/pools/use-pool-transactions.d.ts +23 -0
  213. package/dist/pools/use-pool-transactions.d.ts.map +1 -0
  214. package/dist/pools/use-pool-transactions.js +27 -0
  215. package/dist/pools/use-pool-transactions.js.map +1 -0
  216. package/dist/pools/use-refund-market.d.ts +51 -0
  217. package/dist/pools/use-refund-market.d.ts.map +1 -0
  218. package/dist/pools/use-refund-market.js +30 -0
  219. package/dist/pools/use-refund-market.js.map +1 -0
  220. package/dist/pools/use-retry-listing-info.d.ts +23 -0
  221. package/dist/pools/use-retry-listing-info.d.ts.map +1 -0
  222. package/dist/pools/use-retry-listing-info.js +27 -0
  223. package/dist/pools/use-retry-listing-info.js.map +1 -0
  224. package/dist/pools/use-retry-listing.d.ts +46 -0
  225. package/dist/pools/use-retry-listing.d.ts.map +1 -0
  226. package/dist/pools/use-retry-listing.js +30 -0
  227. package/dist/pools/use-retry-listing.js.map +1 -0
  228. package/dist/pools/use-supports-listing-service.d.ts +21 -0
  229. package/dist/pools/use-supports-listing-service.d.ts.map +1 -0
  230. package/dist/pools/use-supports-listing-service.js +13 -0
  231. package/dist/pools/use-supports-listing-service.js.map +1 -0
  232. package/dist/pools/use-update-listing-market-config.d.ts +60 -0
  233. package/dist/pools/use-update-listing-market-config.d.ts.map +1 -0
  234. package/dist/pools/use-update-listing-market-config.js +30 -0
  235. package/dist/pools/use-update-listing-market-config.js.map +1 -0
  236. package/dist/pools/use-user-listing-markets.d.ts +40 -0
  237. package/dist/pools/use-user-listing-markets.d.ts.map +1 -0
  238. package/dist/pools/use-user-listing-markets.js +28 -0
  239. package/dist/pools/use-user-listing-markets.js.map +1 -0
  240. package/dist/pools/use-user-profit.d.ts +39 -0
  241. package/dist/pools/use-user-profit.d.ts.map +1 -0
  242. package/dist/pools/use-user-profit.js +28 -0
  243. package/dist/pools/use-user-profit.js.map +1 -0
  244. package/dist/pools/use-user-reward-chart.d.ts +28 -0
  245. package/dist/pools/use-user-reward-chart.d.ts.map +1 -0
  246. package/dist/pools/use-user-reward-chart.js +28 -0
  247. package/dist/pools/use-user-reward-chart.js.map +1 -0
  248. package/dist/pools/use-user-total-reward.d.ts +30 -0
  249. package/dist/pools/use-user-total-reward.d.ts.map +1 -0
  250. package/dist/pools/use-user-total-reward.js +28 -0
  251. package/dist/pools/use-user-total-reward.js.map +1 -0
  252. package/dist/pools/use-user-transactions.d.ts +24 -0
  253. package/dist/pools/use-user-transactions.d.ts.map +1 -0
  254. package/dist/pools/use-user-transactions.js +27 -0
  255. package/dist/pools/use-user-transactions.js.map +1 -0
  256. package/dist/pools/use-weekly-listing-limit.d.ts +28 -0
  257. package/dist/pools/use-weekly-listing-limit.d.ts.map +1 -0
  258. package/dist/pools/use-weekly-listing-limit.js +28 -0
  259. package/dist/pools/use-weekly-listing-limit.js.map +1 -0
  260. package/dist/pools/use-withdraw-lp.d.ts +52 -0
  261. package/dist/pools/use-withdraw-lp.d.ts.map +1 -0
  262. package/dist/pools/use-withdraw-lp.js +30 -0
  263. package/dist/pools/use-withdraw-lp.js.map +1 -0
  264. package/dist/price-service/index.d.ts +8 -0
  265. package/dist/price-service/index.d.ts.map +1 -1
  266. package/dist/price-service/index.js +17 -9
  267. package/dist/price-service/use-binance-health.d.ts +16 -0
  268. package/dist/price-service/use-binance-health.d.ts.map +1 -0
  269. package/dist/price-service/use-binance-health.js +27 -0
  270. package/dist/price-service/use-binance-health.js.map +1 -0
  271. package/dist/price-service/use-binance-premium-index.d.ts +24 -0
  272. package/dist/price-service/use-binance-premium-index.d.ts.map +1 -0
  273. package/dist/price-service/use-binance-premium-index.js +27 -0
  274. package/dist/price-service/use-binance-premium-index.js.map +1 -0
  275. package/dist/price-service/use-binance-prices.d.ts +54 -0
  276. package/dist/price-service/use-binance-prices.d.ts.map +1 -0
  277. package/dist/price-service/use-binance-prices.js +57 -0
  278. package/dist/price-service/use-binance-prices.js.map +1 -0
  279. package/dist/price-service/use-binance-symbols-info.d.ts +18 -0
  280. package/dist/price-service/use-binance-symbols-info.d.ts.map +1 -0
  281. package/dist/price-service/use-binance-symbols-info.js +27 -0
  282. package/dist/price-service/use-binance-symbols-info.js.map +1 -0
  283. package/dist/price-service/use-enigma-price-by-market-id.d.ts +7 -1
  284. package/dist/price-service/use-enigma-price-by-market-id.d.ts.map +1 -1
  285. package/dist/price-service/use-enigma-price-by-market-id.js +1 -1
  286. package/dist/price-service/use-enigma-price-by-market-id.js.map +1 -1
  287. package/dist/price-service/use-mark-prices.d.ts +25 -0
  288. package/dist/price-service/use-mark-prices.d.ts.map +1 -0
  289. package/dist/price-service/use-mark-prices.js +27 -0
  290. package/dist/price-service/use-mark-prices.js.map +1 -0
  291. package/dist/price-service/use-price-by-market-id.d.ts +53 -0
  292. package/dist/price-service/use-price-by-market-id.d.ts.map +1 -0
  293. package/dist/price-service/use-price-by-market-id.js +33 -0
  294. package/dist/price-service/use-price-by-market-id.js.map +1 -0
  295. package/dist/price-service/use-price-by-name.d.ts +48 -0
  296. package/dist/price-service/use-price-by-name.d.ts.map +1 -0
  297. package/dist/price-service/use-price-by-name.js +23 -0
  298. package/dist/price-service/use-price-by-name.js.map +1 -0
  299. package/dist/price-service/use-prices.d.ts +87 -0
  300. package/dist/price-service/use-prices.d.ts.map +1 -0
  301. package/dist/price-service/use-prices.js +77 -0
  302. package/dist/price-service/use-prices.js.map +1 -0
  303. package/dist/provider/symmio-provider.d.ts +8 -2
  304. package/dist/provider/symmio-provider.d.ts.map +1 -1
  305. package/dist/provider/symmio-provider.js +19 -19
  306. package/dist/provider/symmio-provider.js.map +1 -1
  307. package/dist/quotes/confirm-hold.d.ts +121 -0
  308. package/dist/quotes/confirm-hold.d.ts.map +1 -0
  309. package/dist/quotes/confirm-hold.js +59 -0
  310. package/dist/quotes/confirm-hold.js.map +1 -0
  311. package/dist/quotes/index.d.ts +14 -0
  312. package/dist/quotes/index.d.ts.map +1 -1
  313. package/dist/quotes/use-account-upnl.d.ts +66 -0
  314. package/dist/quotes/use-account-upnl.d.ts.map +1 -0
  315. package/dist/quotes/use-account-upnl.js +73 -0
  316. package/dist/quotes/use-account-upnl.js.map +1 -0
  317. package/dist/quotes/use-close-quote-group.d.ts +126 -0
  318. package/dist/quotes/use-close-quote-group.d.ts.map +1 -0
  319. package/dist/quotes/use-close-quote-group.js +172 -0
  320. package/dist/quotes/use-close-quote-group.js.map +1 -0
  321. package/dist/quotes/use-cool-downs-of-ma.d.ts +26 -0
  322. package/dist/quotes/use-cool-downs-of-ma.d.ts.map +1 -0
  323. package/dist/quotes/use-cool-downs-of-ma.js +27 -0
  324. package/dist/quotes/use-cool-downs-of-ma.js.map +1 -0
  325. package/dist/quotes/use-force-cancel-close-request.d.ts +27 -0
  326. package/dist/quotes/use-force-cancel-close-request.d.ts.map +1 -0
  327. package/dist/quotes/use-force-cancel-close-request.js +41 -0
  328. package/dist/quotes/use-force-cancel-close-request.js.map +1 -0
  329. package/dist/quotes/use-force-cancel-quote.d.ts +26 -0
  330. package/dist/quotes/use-force-cancel-quote.d.ts.map +1 -0
  331. package/dist/quotes/use-force-cancel-quote.js +42 -0
  332. package/dist/quotes/use-force-cancel-quote.js.map +1 -0
  333. package/dist/quotes/use-force-close-eligibility.d.ts +30 -0
  334. package/dist/quotes/use-force-close-eligibility.d.ts.map +1 -0
  335. package/dist/quotes/use-force-close-eligibility.js +39 -0
  336. package/dist/quotes/use-force-close-eligibility.js.map +1 -0
  337. package/dist/quotes/use-force-close-params.d.ts +22 -0
  338. package/dist/quotes/use-force-close-params.d.ts.map +1 -0
  339. package/dist/quotes/use-force-close-params.js +27 -0
  340. package/dist/quotes/use-force-close-params.js.map +1 -0
  341. package/dist/quotes/use-force-close.d.ts +30 -0
  342. package/dist/quotes/use-force-close.d.ts.map +1 -0
  343. package/dist/quotes/use-force-close.js +38 -0
  344. package/dist/quotes/use-force-close.js.map +1 -0
  345. package/dist/quotes/use-grouped-quotes.d.ts +50 -10
  346. package/dist/quotes/use-grouped-quotes.d.ts.map +1 -1
  347. package/dist/quotes/use-grouped-quotes.js +40 -14
  348. package/dist/quotes/use-grouped-quotes.js.map +1 -1
  349. package/dist/quotes/use-grouping-isolation.d.ts +35 -0
  350. package/dist/quotes/use-grouping-isolation.d.ts.map +1 -0
  351. package/dist/quotes/use-grouping-isolation.js +39 -0
  352. package/dist/quotes/use-grouping-isolation.js.map +1 -0
  353. package/dist/quotes/use-limit-orders.d.ts +62 -0
  354. package/dist/quotes/use-limit-orders.d.ts.map +1 -0
  355. package/dist/quotes/use-limit-orders.js +82 -0
  356. package/dist/quotes/use-limit-orders.js.map +1 -0
  357. package/dist/quotes/use-managed-quotes.d.ts.map +1 -1
  358. package/dist/quotes/use-managed-quotes.js +198 -166
  359. package/dist/quotes/use-managed-quotes.js.map +1 -1
  360. package/dist/quotes/use-party-a-open-positions.d.ts +26 -6
  361. package/dist/quotes/use-party-a-open-positions.d.ts.map +1 -1
  362. package/dist/quotes/use-party-a-open-positions.js +32 -12
  363. package/dist/quotes/use-party-a-open-positions.js.map +1 -1
  364. package/dist/quotes/use-quote-funding.d.ts +2 -2
  365. package/dist/quotes/use-quote-funding.js.map +1 -1
  366. package/dist/quotes/use-quote-group-funding-history.d.ts +70 -0
  367. package/dist/quotes/use-quote-group-funding-history.d.ts.map +1 -0
  368. package/dist/quotes/use-quote-group-funding-history.js +38 -0
  369. package/dist/quotes/use-quote-group-funding-history.js.map +1 -0
  370. package/dist/quotes/use-quote-group-funding.d.ts +67 -0
  371. package/dist/quotes/use-quote-group-funding.d.ts.map +1 -0
  372. package/dist/quotes/use-quote-group-funding.js +26 -0
  373. package/dist/quotes/use-quote-group-funding.js.map +1 -0
  374. package/dist/quotes/use-quote-group-margin-risk.d.ts +111 -0
  375. package/dist/quotes/use-quote-group-margin-risk.d.ts.map +1 -0
  376. package/dist/quotes/use-quote-group-margin-risk.js +63 -0
  377. package/dist/quotes/use-quote-group-margin-risk.js.map +1 -0
  378. package/dist/quotes/use-quote-upnl-and-pnl.d.ts +4 -3
  379. package/dist/quotes/use-quote-upnl-and-pnl.d.ts.map +1 -1
  380. package/dist/quotes/use-quote-upnl-and-pnl.js +2 -1
  381. package/dist/quotes/use-quote-upnl-and-pnl.js.map +1 -1
  382. package/dist/quotes/use-quotes-funding.d.ts +46 -10
  383. package/dist/quotes/use-quotes-funding.d.ts.map +1 -1
  384. package/dist/quotes/use-quotes-funding.js +44 -42
  385. package/dist/quotes/use-quotes-funding.js.map +1 -1
  386. package/dist/quotes/use-request-to-cancel-close-request.d.ts +27 -0
  387. package/dist/quotes/use-request-to-cancel-close-request.d.ts.map +1 -0
  388. package/dist/quotes/use-request-to-cancel-close-request.js +41 -0
  389. package/dist/quotes/use-request-to-cancel-close-request.js.map +1 -0
  390. package/dist/quotes/use-request-to-cancel-quote.d.ts +32 -0
  391. package/dist/quotes/use-request-to-cancel-quote.d.ts.map +1 -0
  392. package/dist/quotes/use-request-to-cancel-quote.js +42 -0
  393. package/dist/quotes/use-request-to-cancel-quote.js.map +1 -0
  394. package/dist/rasa-solver/index.d.ts +7 -0
  395. package/dist/rasa-solver/index.d.ts.map +1 -0
  396. package/dist/rasa-solver/use-error-message.d.ts +14 -0
  397. package/dist/rasa-solver/use-error-message.d.ts.map +1 -0
  398. package/dist/rasa-solver/use-error-message.js +27 -0
  399. package/dist/rasa-solver/use-error-message.js.map +1 -0
  400. package/dist/rasa-solver/use-party-a-upnl.d.ts +14 -0
  401. package/dist/rasa-solver/use-party-a-upnl.d.ts.map +1 -0
  402. package/dist/rasa-solver/use-party-a-upnl.js +27 -0
  403. package/dist/rasa-solver/use-party-a-upnl.js.map +1 -0
  404. package/dist/rasa-solver/use-solver-balance-info.d.ts +14 -0
  405. package/dist/rasa-solver/use-solver-balance-info.d.ts.map +1 -0
  406. package/dist/rasa-solver/use-solver-balance-info.js +27 -0
  407. package/dist/rasa-solver/use-solver-balance-info.js.map +1 -0
  408. package/dist/rasa-solver/use-solver-open-interest.d.ts +14 -0
  409. package/dist/rasa-solver/use-solver-open-interest.d.ts.map +1 -0
  410. package/dist/rasa-solver/use-solver-open-interest.js +27 -0
  411. package/dist/rasa-solver/use-solver-open-interest.js.map +1 -0
  412. package/dist/rasa-solver/use-solver-price-range.d.ts +14 -0
  413. package/dist/rasa-solver/use-solver-price-range.d.ts.map +1 -0
  414. package/dist/rasa-solver/use-solver-price-range.js +27 -0
  415. package/dist/rasa-solver/use-solver-price-range.js.map +1 -0
  416. package/dist/rasa-solver/use-solver-readiness.d.ts +13 -0
  417. package/dist/rasa-solver/use-solver-readiness.d.ts.map +1 -0
  418. package/dist/rasa-solver/use-solver-readiness.js +27 -0
  419. package/dist/rasa-solver/use-solver-readiness.js.map +1 -0
  420. package/dist/revenue-records/index.d.ts +2 -0
  421. package/dist/revenue-records/index.d.ts.map +1 -0
  422. package/dist/revenue-records/use-revenue-records.d.ts +25 -0
  423. package/dist/revenue-records/use-revenue-records.d.ts.map +1 -0
  424. package/dist/revenue-records/use-revenue-records.js +27 -0
  425. package/dist/revenue-records/use-revenue-records.js.map +1 -0
  426. package/dist/solvers/index.d.ts +3 -0
  427. package/dist/solvers/index.d.ts.map +1 -0
  428. package/dist/solvers/use-solver-capabilities.d.ts +31 -0
  429. package/dist/solvers/use-solver-capabilities.d.ts.map +1 -0
  430. package/dist/solvers/use-solver-capabilities.js +30 -0
  431. package/dist/solvers/use-solver-capabilities.js.map +1 -0
  432. package/dist/solvers/use-solver-revenue.d.ts +28 -0
  433. package/dist/solvers/use-solver-revenue.d.ts.map +1 -0
  434. package/dist/solvers/use-solver-revenue.js +27 -0
  435. package/dist/solvers/use-solver-revenue.js.map +1 -0
  436. package/dist/symbols/index.d.ts +2 -0
  437. package/dist/symbols/index.d.ts.map +1 -0
  438. package/dist/symbols/use-symbols.d.ts +25 -0
  439. package/dist/symbols/use-symbols.d.ts.map +1 -0
  440. package/dist/symbols/use-symbols.js +27 -0
  441. package/dist/symbols/use-symbols.js.map +1 -0
  442. package/dist/tpsl/apply-tpsl-search-snapshot.d.ts +33 -0
  443. package/dist/tpsl/apply-tpsl-search-snapshot.d.ts.map +1 -0
  444. package/dist/tpsl/apply-tpsl-search-snapshot.js +51 -0
  445. package/dist/tpsl/apply-tpsl-search-snapshot.js.map +1 -0
  446. package/dist/tpsl/await-tpsl-confirmation.d.ts +77 -0
  447. package/dist/tpsl/await-tpsl-confirmation.d.ts.map +1 -0
  448. package/dist/tpsl/await-tpsl-confirmation.js +42 -0
  449. package/dist/tpsl/await-tpsl-confirmation.js.map +1 -0
  450. package/dist/tpsl/index.d.ts +11 -0
  451. package/dist/tpsl/index.d.ts.map +1 -1
  452. package/dist/tpsl/invalidate-tpsl.d.ts +23 -0
  453. package/dist/tpsl/invalidate-tpsl.d.ts.map +1 -0
  454. package/dist/tpsl/invalidate-tpsl.js +14 -0
  455. package/dist/tpsl/invalidate-tpsl.js.map +1 -0
  456. package/dist/tpsl/match-tpsl-notification.d.ts +27 -0
  457. package/dist/tpsl/match-tpsl-notification.d.ts.map +1 -0
  458. package/dist/tpsl/match-tpsl-notification.js +22 -0
  459. package/dist/tpsl/match-tpsl-notification.js.map +1 -0
  460. package/dist/tpsl/run-with-concurrency.d.ts +20 -0
  461. package/dist/tpsl/run-with-concurrency.d.ts.map +1 -0
  462. package/dist/tpsl/run-with-concurrency.js +15 -0
  463. package/dist/tpsl/run-with-concurrency.js.map +1 -0
  464. package/dist/tpsl/settled-side.d.ts +31 -0
  465. package/dist/tpsl/settled-side.d.ts.map +1 -0
  466. package/dist/tpsl/settled-side.js +21 -0
  467. package/dist/tpsl/settled-side.js.map +1 -0
  468. package/dist/tpsl/tpsl-fallback-poll.d.ts +74 -0
  469. package/dist/tpsl/tpsl-fallback-poll.d.ts.map +1 -0
  470. package/dist/tpsl/tpsl-fallback-poll.js +101 -0
  471. package/dist/tpsl/tpsl-fallback-poll.js.map +1 -0
  472. package/dist/tpsl/tpsl-store.d.ts +98 -2
  473. package/dist/tpsl/tpsl-store.d.ts.map +1 -1
  474. package/dist/tpsl/tpsl-store.js +111 -63
  475. package/dist/tpsl/tpsl-store.js.map +1 -1
  476. package/dist/tpsl/use-delete-quote-group-tpsl.d.ts +165 -0
  477. package/dist/tpsl/use-delete-quote-group-tpsl.d.ts.map +1 -0
  478. package/dist/tpsl/use-delete-quote-group-tpsl.js +247 -0
  479. package/dist/tpsl/use-delete-quote-group-tpsl.js.map +1 -0
  480. package/dist/tpsl/use-delete-quote-tpsl.d.ts.map +1 -1
  481. package/dist/tpsl/use-delete-quote-tpsl.js +11 -10
  482. package/dist/tpsl/use-delete-quote-tpsl.js.map +1 -1
  483. package/dist/tpsl/use-quote-group-tpsl-editor.d.ts +66 -0
  484. package/dist/tpsl/use-quote-group-tpsl-editor.d.ts.map +1 -0
  485. package/dist/tpsl/use-quote-group-tpsl-editor.js +78 -0
  486. package/dist/tpsl/use-quote-group-tpsl-editor.js.map +1 -0
  487. package/dist/tpsl/use-quote-group-tpsl.d.ts +74 -0
  488. package/dist/tpsl/use-quote-group-tpsl.d.ts.map +1 -0
  489. package/dist/tpsl/use-quote-group-tpsl.js +67 -0
  490. package/dist/tpsl/use-quote-group-tpsl.js.map +1 -0
  491. package/dist/tpsl/use-quote-tpsl.d.ts +18 -2
  492. package/dist/tpsl/use-quote-tpsl.d.ts.map +1 -1
  493. package/dist/tpsl/use-quote-tpsl.js +32 -24
  494. package/dist/tpsl/use-quote-tpsl.js.map +1 -1
  495. package/dist/tpsl/use-search-tpsl-orders.d.ts +30 -0
  496. package/dist/tpsl/use-search-tpsl-orders.d.ts.map +1 -0
  497. package/dist/tpsl/use-search-tpsl-orders.js +27 -0
  498. package/dist/tpsl/use-search-tpsl-orders.js.map +1 -0
  499. package/dist/tpsl/use-set-quote-group-tpsl.d.ts +234 -0
  500. package/dist/tpsl/use-set-quote-group-tpsl.d.ts.map +1 -0
  501. package/dist/tpsl/use-set-quote-group-tpsl.js +358 -0
  502. package/dist/tpsl/use-set-quote-group-tpsl.js.map +1 -0
  503. package/dist/tpsl/use-set-quote-tpsl.d.ts +4 -4
  504. package/dist/tpsl/use-set-quote-tpsl.d.ts.map +1 -1
  505. package/dist/tpsl/use-set-quote-tpsl.js +15 -12
  506. package/dist/tpsl/use-set-quote-tpsl.js.map +1 -1
  507. package/dist/tpsl/use-tpsl-supported.d.ts +22 -0
  508. package/dist/tpsl/use-tpsl-supported.d.ts.map +1 -0
  509. package/dist/tpsl/use-tpsl-supported.js +16 -0
  510. package/dist/tpsl/use-tpsl-supported.js.map +1 -0
  511. package/dist/tpsl/use-watch-tpsl-accounts.d.ts +33 -0
  512. package/dist/tpsl/use-watch-tpsl-accounts.d.ts.map +1 -0
  513. package/dist/tpsl/use-watch-tpsl-accounts.js +44 -0
  514. package/dist/tpsl/use-watch-tpsl-accounts.js.map +1 -0
  515. package/dist/trade-volume/index.d.ts +2 -0
  516. package/dist/trade-volume/index.d.ts.map +1 -0
  517. package/dist/trade-volume/use-trade-volume.d.ts +26 -0
  518. package/dist/trade-volume/use-trade-volume.d.ts.map +1 -0
  519. package/dist/trade-volume/use-trade-volume.js +27 -0
  520. package/dist/trade-volume/use-trade-volume.js.map +1 -0
  521. package/dist/utils/index.d.ts +1 -0
  522. package/dist/utils/index.d.ts.map +1 -1
  523. package/dist/utils/invalidate-account-balances.d.ts +36 -0
  524. package/dist/utils/invalidate-account-balances.d.ts.map +1 -0
  525. package/dist/utils/invalidate-account-balances.js +10 -0
  526. package/dist/utils/invalidate-account-balances.js.map +1 -0
  527. package/dist/websocket/use-notifications.d.ts +3 -1
  528. package/dist/websocket/use-notifications.d.ts.map +1 -1
  529. package/dist/websocket/use-notifications.js +22 -20
  530. package/dist/websocket/use-notifications.js.map +1 -1
  531. package/dist/withdraw/index.d.ts +1 -0
  532. package/dist/withdraw/index.d.ts.map +1 -1
  533. package/dist/withdraw/use-initiate-withdraw.d.ts +1 -1
  534. package/dist/withdraw/use-initiate-withdraw.js.map +1 -1
  535. package/dist/withdraw/use-request-cancel-withdraw.d.ts +4 -2
  536. package/dist/withdraw/use-request-cancel-withdraw.d.ts.map +1 -1
  537. package/dist/withdraw/use-request-cancel-withdraw.js +15 -13
  538. package/dist/withdraw/use-request-cancel-withdraw.js.map +1 -1
  539. package/dist/withdraw/use-withdraw.d.ts +67 -0
  540. package/dist/withdraw/use-withdraw.d.ts.map +1 -0
  541. package/dist/withdraw/use-withdraw.js +49 -0
  542. package/dist/withdraw/use-withdraw.js.map +1 -0
  543. package/package.json +18 -2
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getDepositAddressQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-deposit-address.ts
8
+ function a(a) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ enabled: (a.query?.enabled ?? !0) && a.accessToken.length > 0 && a.tokenContractAddress.length > 0,
16
+ queryFn: async () => {
17
+ try {
18
+ return await c.queryFn();
19
+ } catch (e) {
20
+ throw n(e);
21
+ }
22
+ }
23
+ });
24
+ }
25
+ //#endregion
26
+ export { a as useDepositAddress };
27
+
28
+ //# sourceMappingURL=use-deposit-address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-deposit-address.js","names":[],"sources":["../../src/pools/use-deposit-address.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getDepositAddressQueryOptions,\n type ConfigParameter,\n type GetDepositAddressOptions,\n type GetDepositAddressReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useDepositAddress}: the core query options plus an optional `config`. */\nexport type UseDepositAddressParameters = GetDepositAddressOptions & ConfigParameter;\n\n/** Return type of {@link useDepositAddress}: the signed-in user's deposit wallet for one market. */\nexport type UseDepositAddressReturnType = UseQueryResult<GetDepositAddressReturnType, SymmioRequestError>;\n\n/**\n * Return (or create) the signed-in user's deposit wallet for a single market —\n * the address the user sends funds to in order to deposit into the market's pool.\n *\n * This is an authed, per-market read: it takes a Bearer `accessToken` from\n * {@link useAuthenticateListing}, the market's `tokenContractAddress`, and the\n * market's `depositChain` — the last two together identify the market. The token\n * and the address both gate the query: until the `accessToken` **and** the\n * `tokenContractAddress` are non-empty strings the hook stays idle\n * (`enabled: false`) rather than firing an incomplete or unauthenticated\n * request, so it can be mounted before sign-in or before a market is selected.\n *\n * The endpoint is an idempotent get-or-create: it returns the user's existing\n * wallet for the market, or provisions a new one on the first call. Enigma-only;\n * errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const login = useAuthenticateListing();\n * const [token, setToken] = useState(\"\");\n *\n * const { data, isPending } = useDepositAddress({\n * accessToken: token,\n * tokenContractAddress: \"0x1234…\",\n * depositChain: ListingDepositChainId.HYPER_EVM,\n * });\n *\n * // sign in first, then feed the token to the hook:\n * login.mutate({}, { onSuccess: (result) => setToken(result.accessToken) });\n *\n * // the address to deposit into the market:\n * data?.depositAddress;\n * ```\n */\nexport function useDepositAddress(parameters: UseDepositAddressParameters): UseDepositAddressReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getDepositAddressQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n enabled:\n (parameters.query?.enabled ?? true) &&\n parameters.accessToken.length > 0 &&\n parameters.tokenContractAddress.length > 0,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseDepositAddressReturnType;\n}\n"],"mappings":";;;;;;;AAsDA,SAAgB,EAAkB,GAAsE;CACtG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA8B,GAAQ;EACpD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,UACG,EAAW,OAAO,WAAW,OAC9B,EAAW,YAAY,SAAS,KAChC,EAAW,qBAAqB,SAAS;EAC3C,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,28 @@
1
+ import { ConfigParameter, GetListingConfigOptions, ListingConfig } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useListingConfig}: the core query options plus an optional `config`. */
5
+ export type UseListingConfigParameters = GetListingConfigOptions & ConfigParameter;
6
+ /** Return type of {@link useListingConfig}: the listing service's public client config. */
7
+ export type UseListingConfigReturnType = UseQueryResult<ListingConfig, SymmioRequestError>;
8
+ /**
9
+ * Read the listing service's **public** client configuration — the data a
10
+ * create-pool UI must show a user before they list a token: the recommended and
11
+ * minimum initial deposits, the listing fee, the supported deposit chains, the
12
+ * per-day rate limits, and the protocol reward share.
13
+ *
14
+ * This is the public twin of {@link useAuthenticateListing}-gated reads: no
15
+ * token, resolved from the config, so it can be mounted unconditionally. The
16
+ * three `*Usdc` figures are `bigint` at `LISTING_VALUE_DECIMALS` (18) — descale
17
+ * with `formatUnits` before rendering as USD. `supportedDepositChains` is the
18
+ * source of truth for a deposit-chain picker; do not hardcode the list.
19
+ * Enigma-only; errors are normalized to {@link SymmioRequestError}.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * const { data, isPending } = useListingConfig();
24
+ * const chains = data?.supportedDepositChains ?? [];
25
+ * ```
26
+ */
27
+ export declare function useListingConfig(parameters?: UseListingConfigParameters): UseListingConfigReturnType;
28
+ //# sourceMappingURL=use-listing-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-config.d.ts","sourceRoot":"","sources":["../../src/pools/use-listing-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,iGAAiG;AACjG,MAAM,MAAM,0BAA0B,GAAG,uBAAuB,GAAG,eAAe,CAAC;AAEnF,2FAA2F;AAC3F,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;AAE3F;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,GAAE,0BAA+B,GAAG,0BAA0B,CAkBxG"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getListingConfigQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-listing-config.ts
8
+ function a(a = {}) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ queryFn: async () => {
16
+ try {
17
+ return await c.queryFn();
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as useListingConfig };
26
+
27
+ //# sourceMappingURL=use-listing-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-config.js","names":[],"sources":["../../src/pools/use-listing-config.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getListingConfigQueryOptions,\n type ConfigParameter,\n type GetListingConfigOptions,\n type ListingConfig,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useListingConfig}: the core query options plus an optional `config`. */\nexport type UseListingConfigParameters = GetListingConfigOptions & ConfigParameter;\n\n/** Return type of {@link useListingConfig}: the listing service's public client config. */\nexport type UseListingConfigReturnType = UseQueryResult<ListingConfig, SymmioRequestError>;\n\n/**\n * Read the listing service's **public** client configuration — the data a\n * create-pool UI must show a user before they list a token: the recommended and\n * minimum initial deposits, the listing fee, the supported deposit chains, the\n * per-day rate limits, and the protocol reward share.\n *\n * This is the public twin of {@link useAuthenticateListing}-gated reads: no\n * token, resolved from the config, so it can be mounted unconditionally. The\n * three `*Usdc` figures are `bigint` at `LISTING_VALUE_DECIMALS` (18) — descale\n * with `formatUnits` before rendering as USD. `supportedDepositChains` is the\n * source of truth for a deposit-chain picker; do not hardcode the list.\n * Enigma-only; errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data, isPending } = useListingConfig();\n * const chains = data?.supportedDepositChains ?? [];\n * ```\n */\nexport function useListingConfig(parameters: UseListingConfigParameters = {}): UseListingConfigReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getListingConfigQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseListingConfigReturnType;\n}\n"],"mappings":";;;;;;;AAuCA,SAAgB,EAAiB,IAAyC,CAAC,GAA+B;CACxG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA6B,GAAQ;EACnD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,66 @@
1
+ import { ConfigParameter, ListingDepositChainId, ListingMarketConfigProjection } from '@symmio/trading-core';
2
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
3
+ /** Parameters for {@link useListingMarketConfigProjection}. */
4
+ export type UseListingMarketConfigProjectionParameters = ConfigParameter & {
5
+ /** Bearer token from {@link useAuthenticateListing}. */
6
+ accessToken: string;
7
+ /** The pool's token contract address. */
8
+ tokenContractAddress: string;
9
+ /** The pool's deposit chain — the pool's `ListingMarket.chainId`. */
10
+ depositChain: ListingDepositChainId;
11
+ /** The buyback percentage the user is about to submit. Omit to skip that knob. */
12
+ buybackRatio?: number;
13
+ /** The max leverage the user is about to submit. Omit to skip that knob. */
14
+ maxLeverage?: number;
15
+ /** Chain the listing backend is resolved from. Defaults to the connected chain. */
16
+ chainId?: number;
17
+ /** Set `false` to keep every underlying read idle. */
18
+ enabled?: boolean;
19
+ };
20
+ /** Return type of {@link useListingMarketConfigProjection}. */
21
+ export interface UseListingMarketConfigProjectionReturnType {
22
+ /** The projection, or `undefined` until the reads it needs have resolved. */
23
+ data: ListingMarketConfigProjection | undefined;
24
+ /** `true` while any of the three underlying reads is still loading. */
25
+ isLoading: boolean;
26
+ /** The first error among the underlying reads, or `null`. */
27
+ error: SymmioRequestError | null;
28
+ }
29
+ /**
30
+ * Estimate where a pool's configuration lands once the user's opinion is saved
31
+ * — the "new pool buyback / new pool leverage" figures an edit form shows before
32
+ * the write.
33
+ *
34
+ * The listing service blends every LP's opinion by deposit weight, so this
35
+ * composes the three reads that weight needs — the pool's current values
36
+ * ({@link useListingMarketDetail}), the user's prior opinion
37
+ * ({@link useListingMarketConfig}), and the user's stake
38
+ * ({@link useUserProfit}) — and applies core's pure
39
+ * `projectListingMarketConfig`. Nothing here is cached separately: it reuses the
40
+ * three hooks' entries, so mounting it alongside them costs no extra request.
41
+ *
42
+ * The result is an **estimate**. The service rounds the blend it stores, so
43
+ * render it with a `~` and treat the value
44
+ * {@link useUpdateListingMarketConfig} resolves to as the exact figure.
45
+ *
46
+ * When the user has never configured this pool, the pool value is used as the
47
+ * baseline for their prior opinion, which makes the projection an approximation
48
+ * rather than a first-order exact shift.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * const [buybackRatio, setBuybackRatio] = useState(50);
53
+ *
54
+ * const { data } = useListingMarketConfigProjection({
55
+ * accessToken,
56
+ * tokenContractAddress,
57
+ * depositChain: market.chainId,
58
+ * buybackRatio,
59
+ * });
60
+ *
61
+ * // e.g. "~52.5%"
62
+ * data?.projectedBuybackRatio;
63
+ * ```
64
+ */
65
+ export declare function useListingMarketConfigProjection(parameters: UseListingMarketConfigProjectionParameters): UseListingMarketConfigProjectionReturnType;
66
+ //# sourceMappingURL=use-listing-market-config-projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-market-config-projection.d.ts","sourceRoot":"","sources":["../../src/pools/use-listing-market-config-projection.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EACnC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKzE,+DAA+D;AAC/D,MAAM,MAAM,0CAA0C,GAAG,eAAe,GAAG;IACzE,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qEAAqE;IACrE,YAAY,EAAE,qBAAqB,CAAC;IACpC,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,+DAA+D;AAC/D,MAAM,WAAW,0CAA0C;IACzD,6EAA6E;IAC7E,IAAI,EAAE,6BAA6B,GAAG,SAAS,CAAC;IAChD,uEAAuE;IACvE,SAAS,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,0CAA0C,GACrD,0CAA0C,CAoD5C"}
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { useListingMarketConfig as e } from "./use-listing-market-config.js";
3
+ import { useListingMarketDetail as t } from "./use-listing-market-detail.js";
4
+ import { useUserProfit as n } from "./use-user-profit.js";
5
+ import { projectListingMarketConfig as r } from "@symmio/trading-core";
6
+ import { useMemo as i } from "react";
7
+ //#region src/pools/use-listing-market-config-projection.ts
8
+ function a(a) {
9
+ let o = a.enabled ?? !0, s = t({
10
+ config: a.config,
11
+ chainId: a.chainId,
12
+ tokenContractAddress: a.tokenContractAddress,
13
+ depositChain: a.depositChain,
14
+ query: { enabled: o && a.tokenContractAddress.length > 0 }
15
+ }), c = e({
16
+ config: a.config,
17
+ chainId: a.chainId,
18
+ accessToken: a.accessToken,
19
+ tokenContractAddress: a.tokenContractAddress,
20
+ depositChain: a.depositChain,
21
+ query: { enabled: o }
22
+ }), l = n({
23
+ config: a.config,
24
+ chainId: a.chainId,
25
+ accessToken: a.accessToken,
26
+ tokenContractAddress: a.tokenContractAddress,
27
+ query: { enabled: o }
28
+ });
29
+ return {
30
+ data: i(() => {
31
+ if (s.data) return r({
32
+ poolBuybackRatio: s.data.buybackRatio,
33
+ poolMaxLeverage: s.data.maxLeverage,
34
+ priorBuybackRatio: c.data?.userBuybackRatio ?? null,
35
+ priorMaxLeverage: c.data?.userMaxLeverage ?? null,
36
+ buybackRatio: a.buybackRatio,
37
+ maxLeverage: a.maxLeverage,
38
+ userTokenAmount: l.data?.userBalanceInTokens ?? 0n,
39
+ totalTokenInPool: s.data.totalTokenInPool,
40
+ tvl: s.data.tvl,
41
+ totalUsdcInPool: s.data.totalUsdcInPool
42
+ });
43
+ }, [
44
+ s.data,
45
+ c.data,
46
+ l.data,
47
+ a.buybackRatio,
48
+ a.maxLeverage
49
+ ]),
50
+ isLoading: s.isLoading || c.isLoading || l.isLoading,
51
+ error: s.error ?? c.error ?? l.error
52
+ };
53
+ }
54
+ //#endregion
55
+ export { a as useListingMarketConfigProjection };
56
+
57
+ //# sourceMappingURL=use-listing-market-config-projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-market-config-projection.js","names":[],"sources":["../../src/pools/use-listing-market-config-projection.ts"],"sourcesContent":["\"use client\";\n\nimport {\n projectListingMarketConfig,\n type ConfigParameter,\n type ListingDepositChainId,\n type ListingMarketConfigProjection,\n} from \"@symmio/trading-core\";\nimport { useMemo } from \"react\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useListingMarketConfig } from \"./use-listing-market-config\";\nimport { useListingMarketDetail } from \"./use-listing-market-detail\";\nimport { useUserProfit } from \"./use-user-profit\";\n\n/** Parameters for {@link useListingMarketConfigProjection}. */\nexport type UseListingMarketConfigProjectionParameters = ConfigParameter & {\n /** Bearer token from {@link useAuthenticateListing}. */\n accessToken: string;\n /** The pool's token contract address. */\n tokenContractAddress: string;\n /** The pool's deposit chain — the pool's `ListingMarket.chainId`. */\n depositChain: ListingDepositChainId;\n /** The buyback percentage the user is about to submit. Omit to skip that knob. */\n buybackRatio?: number;\n /** The max leverage the user is about to submit. Omit to skip that knob. */\n maxLeverage?: number;\n /** Chain the listing backend is resolved from. Defaults to the connected chain. */\n chainId?: number;\n /** Set `false` to keep every underlying read idle. */\n enabled?: boolean;\n};\n\n/** Return type of {@link useListingMarketConfigProjection}. */\nexport interface UseListingMarketConfigProjectionReturnType {\n /** The projection, or `undefined` until the reads it needs have resolved. */\n data: ListingMarketConfigProjection | undefined;\n /** `true` while any of the three underlying reads is still loading. */\n isLoading: boolean;\n /** The first error among the underlying reads, or `null`. */\n error: SymmioRequestError | null;\n}\n\n/**\n * Estimate where a pool's configuration lands once the user's opinion is saved\n * — the \"new pool buyback / new pool leverage\" figures an edit form shows before\n * the write.\n *\n * The listing service blends every LP's opinion by deposit weight, so this\n * composes the three reads that weight needs — the pool's current values\n * ({@link useListingMarketDetail}), the user's prior opinion\n * ({@link useListingMarketConfig}), and the user's stake\n * ({@link useUserProfit}) — and applies core's pure\n * `projectListingMarketConfig`. Nothing here is cached separately: it reuses the\n * three hooks' entries, so mounting it alongside them costs no extra request.\n *\n * The result is an **estimate**. The service rounds the blend it stores, so\n * render it with a `~` and treat the value\n * {@link useUpdateListingMarketConfig} resolves to as the exact figure.\n *\n * When the user has never configured this pool, the pool value is used as the\n * baseline for their prior opinion, which makes the projection an approximation\n * rather than a first-order exact shift.\n *\n * @example\n * ```tsx\n * const [buybackRatio, setBuybackRatio] = useState(50);\n *\n * const { data } = useListingMarketConfigProjection({\n * accessToken,\n * tokenContractAddress,\n * depositChain: market.chainId,\n * buybackRatio,\n * });\n *\n * // e.g. \"~52.5%\"\n * data?.projectedBuybackRatio;\n * ```\n */\nexport function useListingMarketConfigProjection(\n parameters: UseListingMarketConfigProjectionParameters,\n): UseListingMarketConfigProjectionReturnType {\n const enabled = parameters.enabled ?? true;\n\n const detail = useListingMarketDetail({\n config: parameters.config,\n chainId: parameters.chainId,\n tokenContractAddress: parameters.tokenContractAddress,\n depositChain: parameters.depositChain,\n query: { enabled: enabled && parameters.tokenContractAddress.length > 0 },\n });\n\n const marketConfig = useListingMarketConfig({\n config: parameters.config,\n chainId: parameters.chainId,\n accessToken: parameters.accessToken,\n tokenContractAddress: parameters.tokenContractAddress,\n depositChain: parameters.depositChain,\n query: { enabled },\n });\n\n const profit = useUserProfit({\n config: parameters.config,\n chainId: parameters.chainId,\n accessToken: parameters.accessToken,\n tokenContractAddress: parameters.tokenContractAddress,\n query: { enabled },\n });\n\n const data = useMemo(() => {\n if (!detail.data) return undefined;\n\n return projectListingMarketConfig({\n poolBuybackRatio: detail.data.buybackRatio,\n poolMaxLeverage: detail.data.maxLeverage,\n // The prior opinion is optional: a backend without the read, or a user who\n // has never configured this pool, both fall back to the pool baseline.\n priorBuybackRatio: marketConfig.data?.userBuybackRatio ?? null,\n priorMaxLeverage: marketConfig.data?.userMaxLeverage ?? null,\n buybackRatio: parameters.buybackRatio,\n maxLeverage: parameters.maxLeverage,\n userTokenAmount: profit.data?.userBalanceInTokens ?? 0n,\n totalTokenInPool: detail.data.totalTokenInPool,\n tvl: detail.data.tvl,\n totalUsdcInPool: detail.data.totalUsdcInPool,\n });\n }, [detail.data, marketConfig.data, profit.data, parameters.buybackRatio, parameters.maxLeverage]);\n\n return {\n data,\n isLoading: detail.isLoading || marketConfig.isLoading || profit.isLoading,\n error: detail.error ?? marketConfig.error ?? profit.error,\n };\n}\n"],"mappings":";;;;;;;AA8EA,SAAgB,EACd,GAC4C;CAC5C,IAAM,IAAU,EAAW,WAAW,IAEhC,IAAS,EAAuB;EACpC,QAAQ,EAAW;EACnB,SAAS,EAAW;EACpB,sBAAsB,EAAW;EACjC,cAAc,EAAW;EACzB,OAAO,EAAE,SAAS,KAAW,EAAW,qBAAqB,SAAS,EAAE;CAC1E,CAAC,GAEK,IAAe,EAAuB;EAC1C,QAAQ,EAAW;EACnB,SAAS,EAAW;EACpB,aAAa,EAAW;EACxB,sBAAsB,EAAW;EACjC,cAAc,EAAW;EACzB,OAAO,EAAE,WAAQ;CACnB,CAAC,GAEK,IAAS,EAAc;EAC3B,QAAQ,EAAW;EACnB,SAAS,EAAW;EACpB,aAAa,EAAW;EACxB,sBAAsB,EAAW;EACjC,OAAO,EAAE,WAAQ;CACnB,CAAC;CAqBD,OAAO;EACL,MApBW,QAAc;GACpB,MAAO,MAEZ,OAAO,EAA2B;IAChC,kBAAkB,EAAO,KAAK;IAC9B,iBAAiB,EAAO,KAAK;IAG7B,mBAAmB,EAAa,MAAM,oBAAoB;IAC1D,kBAAkB,EAAa,MAAM,mBAAmB;IACxD,cAAc,EAAW;IACzB,aAAa,EAAW;IACxB,iBAAiB,EAAO,MAAM,uBAAuB;IACrD,kBAAkB,EAAO,KAAK;IAC9B,KAAK,EAAO,KAAK;IACjB,iBAAiB,EAAO,KAAK;GAC/B,CAAC;EACH,GAAG;GAAC,EAAO;GAAM,EAAa;GAAM,EAAO;GAAM,EAAW;GAAc,EAAW;EAAW,CAG9F;EACA,WAAW,EAAO,aAAa,EAAa,aAAa,EAAO;EAChE,OAAO,EAAO,SAAS,EAAa,SAAS,EAAO;CACtD;AACF"}
@@ -0,0 +1,49 @@
1
+ import { ConfigParameter, GetListingMarketConfigOptions, GetListingMarketConfigReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useListingMarketConfig}: the core query options plus an optional `config`. */
5
+ export type UseListingMarketConfigParameters = GetListingMarketConfigOptions & ConfigParameter;
6
+ /**
7
+ * Return type of {@link useListingMarketConfig}: the signed-in user's config
8
+ * opinion for one pool, plus the pool values in force.
9
+ */
10
+ export type UseListingMarketConfigReturnType = UseQueryResult<GetListingMarketConfigReturnType, SymmioRequestError>;
11
+ /**
12
+ * Read the signed-in user's configuration opinion for one pool — their own max
13
+ * leverage and buyback percentage, alongside the deposit-weighted pool values
14
+ * those opinions blend into.
15
+ *
16
+ * Use it to prefill an edit form with what the caller previously set:
17
+ * `userMaxLeverage` and `userBuybackRatio` are `null` until they have ever
18
+ * submitted an opinion for this pool. Both ratios are plain whole numbers —
19
+ * `50` is 50%, `20` is 20x — not 18-decimal values.
20
+ *
21
+ * This is an authed, per-pool read: it takes a Bearer `accessToken` from
22
+ * {@link useAuthenticateListing} and the pool's `tokenContractAddress` +
23
+ * `depositChain`. Both string inputs gate the query — until the token **and**
24
+ * the address are non-empty the hook stays idle (`enabled: false`) rather than
25
+ * firing an unauthenticated request, so it can be mounted before sign-in.
26
+ *
27
+ * The config is per-user, so remount or reset the query when the signed-in
28
+ * account changes; the bearer token is deliberately not part of the query key.
29
+ *
30
+ * Enigma-only. A `404` means this read is not deployed on the pool's listing
31
+ * backend yet — the write can be live while the read is not, so treat it as
32
+ * "opinion unknown" rather than a blocking failure. Errors are normalized to
33
+ * {@link SymmioRequestError}.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * const { data } = useListingMarketConfig({
38
+ * accessToken,
39
+ * tokenContractAddress,
40
+ * depositChain: market.chainId,
41
+ * });
42
+ *
43
+ * // null until this user has ever configured the pool
44
+ * const mine = data?.userBuybackRatio;
45
+ * const pool = data?.buybackRatio;
46
+ * ```
47
+ */
48
+ export declare function useListingMarketConfig(parameters: UseListingMarketConfigParameters): UseListingMarketConfigReturnType;
49
+ //# sourceMappingURL=use-listing-market-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-market-config.d.ts","sourceRoot":"","sources":["../../src/pools/use-listing-market-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACtC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,uGAAuG;AACvG,MAAM,MAAM,gCAAgC,GAAG,6BAA6B,GAAG,eAAe,CAAC;AAE/F;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,gCAAgC,EAAE,kBAAkB,CAAC,CAAC;AAEpH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,gCAAgC,GAAG,gCAAgC,CAsBrH"}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getListingMarketConfigQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-listing-market-config.ts
8
+ function a(a) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ enabled: (a.query?.enabled ?? !0) && a.accessToken.length > 0 && a.tokenContractAddress.length > 0,
16
+ queryFn: async () => {
17
+ try {
18
+ return await c.queryFn();
19
+ } catch (e) {
20
+ throw n(e);
21
+ }
22
+ }
23
+ });
24
+ }
25
+ //#endregion
26
+ export { a as useListingMarketConfig };
27
+
28
+ //# sourceMappingURL=use-listing-market-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-market-config.js","names":[],"sources":["../../src/pools/use-listing-market-config.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getListingMarketConfigQueryOptions,\n type ConfigParameter,\n type GetListingMarketConfigOptions,\n type GetListingMarketConfigReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useListingMarketConfig}: the core query options plus an optional `config`. */\nexport type UseListingMarketConfigParameters = GetListingMarketConfigOptions & ConfigParameter;\n\n/**\n * Return type of {@link useListingMarketConfig}: the signed-in user's config\n * opinion for one pool, plus the pool values in force.\n */\nexport type UseListingMarketConfigReturnType = UseQueryResult<GetListingMarketConfigReturnType, SymmioRequestError>;\n\n/**\n * Read the signed-in user's configuration opinion for one pool — their own max\n * leverage and buyback percentage, alongside the deposit-weighted pool values\n * those opinions blend into.\n *\n * Use it to prefill an edit form with what the caller previously set:\n * `userMaxLeverage` and `userBuybackRatio` are `null` until they have ever\n * submitted an opinion for this pool. Both ratios are plain whole numbers —\n * `50` is 50%, `20` is 20x — not 18-decimal values.\n *\n * This is an authed, per-pool read: it takes a Bearer `accessToken` from\n * {@link useAuthenticateListing} and the pool's `tokenContractAddress` +\n * `depositChain`. Both string inputs gate the query — until the token **and**\n * the address are non-empty the hook stays idle (`enabled: false`) rather than\n * firing an unauthenticated request, so it can be mounted before sign-in.\n *\n * The config is per-user, so remount or reset the query when the signed-in\n * account changes; the bearer token is deliberately not part of the query key.\n *\n * Enigma-only. A `404` means this read is not deployed on the pool's listing\n * backend yet — the write can be live while the read is not, so treat it as\n * \"opinion unknown\" rather than a blocking failure. Errors are normalized to\n * {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = useListingMarketConfig({\n * accessToken,\n * tokenContractAddress,\n * depositChain: market.chainId,\n * });\n *\n * // null until this user has ever configured the pool\n * const mine = data?.userBuybackRatio;\n * const pool = data?.buybackRatio;\n * ```\n */\nexport function useListingMarketConfig(parameters: UseListingMarketConfigParameters): UseListingMarketConfigReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getListingMarketConfigQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n enabled:\n (parameters.query?.enabled ?? true) &&\n parameters.accessToken.length > 0 &&\n parameters.tokenContractAddress.length > 0,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseListingMarketConfigReturnType;\n}\n"],"mappings":";;;;;;;AA4DA,SAAgB,EAAuB,GAAgF;CACrH,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAmC,GAAQ;EACzD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,UACG,EAAW,OAAO,WAAW,OAC9B,EAAW,YAAY,SAAS,KAChC,EAAW,qBAAqB,SAAS;EAC3C,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,29 @@
1
+ import { ConfigParameter, GetListingMarketDetailOptions, GetListingMarketDetailReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useListingMarketDetail}: the core query options plus an optional `config`. */
5
+ export type UseListingMarketDetailParameters = GetListingMarketDetailOptions & ConfigParameter;
6
+ /** Return type of {@link useListingMarketDetail}: one pool's public detail. */
7
+ export type UseListingMarketDetailReturnType = UseQueryResult<GetListingMarketDetailReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read one pool's public detail — its TVL, APY and reward windows, solver
10
+ * revenue, pool balances, active LPs, age, and the inventory position behind it.
11
+ *
12
+ * This is the read a pool page is built on: the same response feeds the stats
13
+ * cards and, via `toPoolPositions`, the positions table — one request, not two.
14
+ *
15
+ * A pool is addressed by its token **and** deposit chain, since the same token
16
+ * can be listed from more than one. Public: no access token needed. Errors are
17
+ * normalized to {@link SymmioRequestError}.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * const { data } = useListingMarketDetail({
22
+ * tokenContractAddress,
23
+ * depositChain: ListingDepositChainId.BASE,
24
+ * });
25
+ * const rows = data ? toPoolPositions(data) : [];
26
+ * ```
27
+ */
28
+ export declare function useListingMarketDetail(parameters: UseListingMarketDetailParameters): UseListingMarketDetailReturnType;
29
+ //# sourceMappingURL=use-listing-market-detail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-market-detail.d.ts","sourceRoot":"","sources":["../../src/pools/use-listing-market-detail.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACtC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,uGAAuG;AACvG,MAAM,MAAM,gCAAgC,GAAG,6BAA6B,GAAG,eAAe,CAAC;AAE/F,+EAA+E;AAC/E,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,gCAAgC,EAAE,kBAAkB,CAAC,CAAC;AAEpH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,gCAAgC,GAAG,gCAAgC,CAkBrH"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getListingMarketDetailQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-listing-market-detail.ts
8
+ function a(a) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ queryFn: async () => {
16
+ try {
17
+ return await c.queryFn();
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as useListingMarketDetail };
26
+
27
+ //# sourceMappingURL=use-listing-market-detail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-market-detail.js","names":[],"sources":["../../src/pools/use-listing-market-detail.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getListingMarketDetailQueryOptions,\n type ConfigParameter,\n type GetListingMarketDetailOptions,\n type GetListingMarketDetailReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useListingMarketDetail}: the core query options plus an optional `config`. */\nexport type UseListingMarketDetailParameters = GetListingMarketDetailOptions & ConfigParameter;\n\n/** Return type of {@link useListingMarketDetail}: one pool's public detail. */\nexport type UseListingMarketDetailReturnType = UseQueryResult<GetListingMarketDetailReturnType, SymmioRequestError>;\n\n/**\n * Read one pool's public detail — its TVL, APY and reward windows, solver\n * revenue, pool balances, active LPs, age, and the inventory position behind it.\n *\n * This is the read a pool page is built on: the same response feeds the stats\n * cards and, via `toPoolPositions`, the positions table — one request, not two.\n *\n * A pool is addressed by its token **and** deposit chain, since the same token\n * can be listed from more than one. Public: no access token needed. Errors are\n * normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = useListingMarketDetail({\n * tokenContractAddress,\n * depositChain: ListingDepositChainId.BASE,\n * });\n * const rows = data ? toPoolPositions(data) : [];\n * ```\n */\nexport function useListingMarketDetail(parameters: UseListingMarketDetailParameters): UseListingMarketDetailReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getListingMarketDetailQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseListingMarketDetailReturnType;\n}\n"],"mappings":";;;;;;;AAwCA,SAAgB,EAAuB,GAAgF;CACrH,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAmC,GAAQ;EACzD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,32 @@
1
+ import { ConfigParameter, GetListingMarketsOptions, GetListingMarketsReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useListingMarkets}: the core query options plus an optional `config`. */
5
+ export type UseListingMarketsParameters = GetListingMarketsOptions & ConfigParameter;
6
+ /** Return type of {@link useListingMarkets}: one page of the listing catalog. */
7
+ export type UseListingMarketsReturnType = UseQueryResult<GetListingMarketsReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a page of the permissionless-listing market catalog — the data behind a
10
+ * pools list.
11
+ *
12
+ * Search, filtering, sorting, and pagination are all server-side: change a
13
+ * parameter and the hook refetches under a new query key rather than filtering
14
+ * an already-fetched page in the client. Pass
15
+ * `marketStatus: ListingMarketStatus.LISTED` to see only tradable markets.
16
+ *
17
+ * Every money and rate field on a row is a `bigint` at `LISTING_VALUE_DECIMALS`
18
+ * (18); `null` means the service reported no value, not zero. Errors are
19
+ * normalized to {@link SymmioRequestError}.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * const { data, isPending } = useListingMarkets({
24
+ * marketStatus: ListingMarketStatus.LISTED,
25
+ * sortBy: "tvl",
26
+ * limit: 25,
27
+ * offset: page * 25,
28
+ * });
29
+ * ```
30
+ */
31
+ export declare function useListingMarkets(parameters?: UseListingMarketsParameters): UseListingMarketsReturnType;
32
+ //# sourceMappingURL=use-listing-markets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-markets.d.ts","sourceRoot":"","sources":["../../src/pools/use-listing-markets.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EACjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,kGAAkG;AAClG,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,GAAG,eAAe,CAAC;AAErF,iFAAiF;AACjF,MAAM,MAAM,2BAA2B,GAAG,cAAc,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC;AAE1G;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,GAAE,2BAAgC,GAAG,2BAA2B,CAkB3G"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getListingMarketsQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-listing-markets.ts
8
+ function a(a = {}) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ queryFn: async () => {
16
+ try {
17
+ return await c.queryFn();
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as useListingMarkets };
26
+
27
+ //# sourceMappingURL=use-listing-markets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-markets.js","names":[],"sources":["../../src/pools/use-listing-markets.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getListingMarketsQueryOptions,\n type ConfigParameter,\n type GetListingMarketsOptions,\n type GetListingMarketsReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useListingMarkets}: the core query options plus an optional `config`. */\nexport type UseListingMarketsParameters = GetListingMarketsOptions & ConfigParameter;\n\n/** Return type of {@link useListingMarkets}: one page of the listing catalog. */\nexport type UseListingMarketsReturnType = UseQueryResult<GetListingMarketsReturnType, SymmioRequestError>;\n\n/**\n * Read a page of the permissionless-listing market catalog — the data behind a\n * pools list.\n *\n * Search, filtering, sorting, and pagination are all server-side: change a\n * parameter and the hook refetches under a new query key rather than filtering\n * an already-fetched page in the client. Pass\n * `marketStatus: ListingMarketStatus.LISTED` to see only tradable markets.\n *\n * Every money and rate field on a row is a `bigint` at `LISTING_VALUE_DECIMALS`\n * (18); `null` means the service reported no value, not zero. Errors are\n * normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data, isPending } = useListingMarkets({\n * marketStatus: ListingMarketStatus.LISTED,\n * sortBy: \"tvl\",\n * limit: 25,\n * offset: page * 25,\n * });\n * ```\n */\nexport function useListingMarkets(parameters: UseListingMarketsParameters = {}): UseListingMarketsReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getListingMarketsQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseListingMarketsReturnType;\n}\n"],"mappings":";;;;;;;AA2CA,SAAgB,EAAkB,IAA0C,CAAC,GAAgC;CAC3G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA8B,GAAQ;EACpD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,29 @@
1
+ import { ConfigParameter, GetListingStatusOptions, GetListingStatusReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useListingStatus}: the core query options plus an optional `config`. */
5
+ export type UseListingStatusParameters = GetListingStatusOptions & ConfigParameter;
6
+ /** Return type of {@link useListingStatus}: one market's listing-pipeline status. */
7
+ export type UseListingStatusReturnType = UseQueryResult<GetListingStatusReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a market's **listing status** — its lifecycle status plus where it sits in
10
+ * the backend's listing pipeline (current step, all steps, retry count/limit, and
11
+ * any step error), keyed by the market's token address and deposit chain.
12
+ *
13
+ * A public read (no bearer token): it gates only on `tokenContractAddress` — until
14
+ * it is a non-empty string the hook stays idle (`enabled: false`) rather than
15
+ * firing an incomplete request, so it can be mounted before an address is entered.
16
+ * Set `query.refetchInterval` to poll a market still moving toward `LISTED`.
17
+ * Enigma-only; errors are normalized to {@link SymmioRequestError}.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * const { data, isPending } = useListingStatus({
22
+ * tokenContractAddress: "0x1234…",
23
+ * depositChain: ListingDepositChainId.HYPER_EVM,
24
+ * query: { refetchInterval: 5000 },
25
+ * });
26
+ * ```
27
+ */
28
+ export declare function useListingStatus(parameters: UseListingStatusParameters): UseListingStatusReturnType;
29
+ //# sourceMappingURL=use-listing-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-status.d.ts","sourceRoot":"","sources":["../../src/pools/use-listing-status.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,iGAAiG;AACjG,MAAM,MAAM,0BAA0B,GAAG,uBAAuB,GAAG,eAAe,CAAC;AAEnF,qFAAqF;AACrF,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;AAExG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,0BAA0B,GAAG,0BAA0B,CAmBnG"}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getListingStatusQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-listing-status.ts
8
+ function a(a) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ enabled: (a.query?.enabled ?? !0) && a.tokenContractAddress.length > 0,
16
+ queryFn: async () => {
17
+ try {
18
+ return await c.queryFn();
19
+ } catch (e) {
20
+ throw n(e);
21
+ }
22
+ }
23
+ });
24
+ }
25
+ //#endregion
26
+ export { a as useListingStatus };
27
+
28
+ //# sourceMappingURL=use-listing-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-listing-status.js","names":[],"sources":["../../src/pools/use-listing-status.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getListingStatusQueryOptions,\n type ConfigParameter,\n type GetListingStatusOptions,\n type GetListingStatusReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useListingStatus}: the core query options plus an optional `config`. */\nexport type UseListingStatusParameters = GetListingStatusOptions & ConfigParameter;\n\n/** Return type of {@link useListingStatus}: one market's listing-pipeline status. */\nexport type UseListingStatusReturnType = UseQueryResult<GetListingStatusReturnType, SymmioRequestError>;\n\n/**\n * Read a market's **listing status** — its lifecycle status plus where it sits in\n * the backend's listing pipeline (current step, all steps, retry count/limit, and\n * any step error), keyed by the market's token address and deposit chain.\n *\n * A public read (no bearer token): it gates only on `tokenContractAddress` — until\n * it is a non-empty string the hook stays idle (`enabled: false`) rather than\n * firing an incomplete request, so it can be mounted before an address is entered.\n * Set `query.refetchInterval` to poll a market still moving toward `LISTED`.\n * Enigma-only; errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data, isPending } = useListingStatus({\n * tokenContractAddress: \"0x1234…\",\n * depositChain: ListingDepositChainId.HYPER_EVM,\n * query: { refetchInterval: 5000 },\n * });\n * ```\n */\nexport function useListingStatus(parameters: UseListingStatusParameters): UseListingStatusReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getListingStatusQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n enabled: (parameters.query?.enabled ?? true) && parameters.tokenContractAddress.length > 0,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseListingStatusReturnType;\n}\n"],"mappings":";;;;;;;AAwCA,SAAgB,EAAiB,GAAoE;CACnG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA6B,GAAQ;EACnD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,UAAU,EAAW,OAAO,WAAW,OAAS,EAAW,qBAAqB,SAAS;EACzF,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,26 @@
1
+ import { ConfigParameter, GetPoolQuotesOptions, GetPoolQuotesReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link usePoolQuotes}: the core query options plus an optional `config`. */
5
+ export type UsePoolQuotesParameters = GetPoolQuotesOptions & ConfigParameter;
6
+ /** Return type of {@link usePoolQuotes}: the pool's quote rows. */
7
+ export type UsePoolQuotesReturnType = UseQueryResult<GetPoolQuotesReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a **pool's** quote book from the analytics subgraph.
10
+ *
11
+ * This is the pool's whole book — every trader's quotes on that market, so
12
+ * `partyA` varies row to row. That is what makes it different from the
13
+ * account-scoped quote hooks, and why it needs no wallet connection.
14
+ *
15
+ * Which rows you get is the `quoteStatuses` filter: `POOL_PENDING_QUOTE_STATUSES`
16
+ * (the default) for an "open quotes" tab, `POOL_OPEN_QUOTE_STATUSES` for live
17
+ * positions. The query stays idle while `symbolId` is absent, since an unlisted
18
+ * pool has no book. Errors are normalized to {@link SymmioRequestError}.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const { data } = usePoolQuotes({ symbolId, quoteStatuses: POOL_OPEN_QUOTE_STATUSES });
23
+ * ```
24
+ */
25
+ export declare function usePoolQuotes(parameters: UsePoolQuotesParameters): UsePoolQuotesReturnType;
26
+ //# sourceMappingURL=use-pool-quotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-quotes.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-quotes.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,8FAA8F;AAC9F,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAE7E,mEAAmE;AACnE,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;AAElG;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,uBAAuB,GAAG,uBAAuB,CAkB1F"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
3
+ import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
4
+ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
5
+ import { getPoolQuotesQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-pool-quotes.ts
8
+ function a(a) {
9
+ let o = t(a), s = e(), c = r(o, {
10
+ ...a,
11
+ chainId: a.chainId ?? s
12
+ });
13
+ return i({
14
+ ...c,
15
+ queryFn: async () => {
16
+ try {
17
+ return await c.queryFn();
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ }
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as usePoolQuotes };
26
+
27
+ //# sourceMappingURL=use-pool-quotes.js.map