@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 @@
1
+ {"version":3,"file":"use-pool-quotes.js","names":[],"sources":["../../src/pools/use-pool-quotes.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolQuotesQueryOptions,\n type ConfigParameter,\n type GetPoolQuotesOptions,\n type GetPoolQuotesReturnType,\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 usePoolQuotes}: the core query options plus an optional `config`. */\nexport type UsePoolQuotesParameters = GetPoolQuotesOptions & ConfigParameter;\n\n/** Return type of {@link usePoolQuotes}: the pool's quote rows. */\nexport type UsePoolQuotesReturnType = UseQueryResult<GetPoolQuotesReturnType, SymmioRequestError>;\n\n/**\n * Read a **pool's** quote book from the analytics subgraph.\n *\n * This is the pool's whole book — every trader's quotes on that market, so\n * `partyA` varies row to row. That is what makes it different from the\n * account-scoped quote hooks, and why it needs no wallet connection.\n *\n * Which rows you get is the `quoteStatuses` filter: `POOL_PENDING_QUOTE_STATUSES`\n * (the default) for an \"open quotes\" tab, `POOL_OPEN_QUOTE_STATUSES` for live\n * positions. The query stays idle while `symbolId` is absent, since an unlisted\n * pool has no book. Errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = usePoolQuotes({ symbolId, quoteStatuses: POOL_OPEN_QUOTE_STATUSES });\n * ```\n */\nexport function usePoolQuotes(parameters: UsePoolQuotesParameters): UsePoolQuotesReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getPoolQuotesQueryOptions(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 UsePoolQuotesReturnType;\n}\n"],"mappings":";;;;;;;AAqCA,SAAgB,EAAc,GAA8D;CAC1F,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA0B,GAAQ;EAChD,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, GetPoolRewardChartOptions, GetPoolRewardChartReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link usePoolRewardChart}: the core query options plus an optional `config`. */
5
+ export type UsePoolRewardChartParameters = GetPoolRewardChartOptions & ConfigParameter;
6
+ /** Return type of {@link usePoolRewardChart}: one point per reward day. */
7
+ export type UsePoolRewardChartReturnType = UseQueryResult<GetPoolRewardChartReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a pool's daily LP-reward series — the public series behind a pool page's
10
+ * rewards chart.
11
+ *
12
+ * Public: no bearer token. A pool is addressed by the pair
13
+ * `(marketAddress, marketChainId)`, matching a `ListingMarket`'s
14
+ * `contractAddress` and `chainId`; `marketChainId` is the chain the pool's token
15
+ * lives on, **not** the SYMMIO chain the market trades on.
16
+ *
17
+ * `marketAddress` gates the query, so the hook can be mounted before a pool is
18
+ * picked. Each point's `reward` is a `bigint` at `LISTING_VALUE_DECIMALS` (18)
19
+ * and is money — the descaled figure is USD, not a percentage. A pool with no
20
+ * snapshots resolves to an empty array rather than erroring. Errors are
21
+ * normalized to {@link SymmioRequestError}.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * const { data: rewards } = usePoolRewardChart({
26
+ * marketAddress: pool.contractAddress,
27
+ * marketChainId: pool.chainId,
28
+ * });
29
+ * ```
30
+ */
31
+ export declare function usePoolRewardChart(parameters: UsePoolRewardChartParameters): UsePoolRewardChartReturnType;
32
+ //# sourceMappingURL=use-pool-reward-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-reward-chart.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-reward-chart.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,mGAAmG;AACnG,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,GAAG,eAAe,CAAC;AAEvF,2EAA2E;AAC3E,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,4BAA4B,GAAG,4BAA4B,CAmBzG"}
@@ -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 { getPoolRewardChartQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-pool-reward-chart.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.marketAddress.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 usePoolRewardChart };
27
+
28
+ //# sourceMappingURL=use-pool-reward-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-reward-chart.js","names":[],"sources":["../../src/pools/use-pool-reward-chart.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolRewardChartQueryOptions,\n type ConfigParameter,\n type GetPoolRewardChartOptions,\n type GetPoolRewardChartReturnType,\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 usePoolRewardChart}: the core query options plus an optional `config`. */\nexport type UsePoolRewardChartParameters = GetPoolRewardChartOptions & ConfigParameter;\n\n/** Return type of {@link usePoolRewardChart}: one point per reward day. */\nexport type UsePoolRewardChartReturnType = UseQueryResult<GetPoolRewardChartReturnType, SymmioRequestError>;\n\n/**\n * Read a pool's daily LP-reward series — the public series behind a pool page's\n * rewards chart.\n *\n * Public: no bearer token. A pool is addressed by the pair\n * `(marketAddress, marketChainId)`, matching a `ListingMarket`'s\n * `contractAddress` and `chainId`; `marketChainId` is the chain the pool's token\n * lives on, **not** the SYMMIO chain the market trades on.\n *\n * `marketAddress` gates the query, so the hook can be mounted before a pool is\n * picked. Each point's `reward` is a `bigint` at `LISTING_VALUE_DECIMALS` (18)\n * and is money — the descaled figure is USD, not a percentage. A pool with no\n * snapshots resolves to an empty array rather than erroring. Errors are\n * normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data: rewards } = usePoolRewardChart({\n * marketAddress: pool.contractAddress,\n * marketChainId: pool.chainId,\n * });\n * ```\n */\nexport function usePoolRewardChart(parameters: UsePoolRewardChartParameters): UsePoolRewardChartReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getPoolRewardChartQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n enabled: (parameters.query?.enabled ?? true) && parameters.marketAddress.length > 0,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UsePoolRewardChartReturnType;\n}\n"],"mappings":";;;;;;;AA2CA,SAAgB,EAAmB,GAAwE;CACzG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA+B,GAAQ;EACrD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,UAAU,EAAW,OAAO,WAAW,OAAS,EAAW,cAAc,SAAS;EAClF,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,27 @@
1
+ import { ConfigParameter, GetPoolTotalRewardOptions, GetPoolTotalRewardReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link usePoolTotalReward}: the core query options plus an optional `config`. */
5
+ export type UsePoolTotalRewardParameters = GetPoolTotalRewardOptions & ConfigParameter;
6
+ /** Return type of {@link usePoolTotalReward}: aggregate reward as an 18-decimal `bigint`. */
7
+ export type UsePoolTotalRewardReturnType = UseQueryResult<GetPoolTotalRewardReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a pool's aggregate LP reward over the last `days` — the headline figure
10
+ * above a pool's rewards chart.
11
+ *
12
+ * Public: no bearer token. `days` is capped at **30** by the service; a larger
13
+ * window is rejected with a `422`. The result is money at
14
+ * `LISTING_VALUE_DECIMALS` (18) — the descaled figure is USD. `marketAddress`
15
+ * gates the query. Errors are normalized to {@link SymmioRequestError}.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const { data: reward30d } = usePoolTotalReward({
20
+ * marketAddress: pool.contractAddress,
21
+ * marketChainId: pool.chainId,
22
+ * days: 30,
23
+ * });
24
+ * ```
25
+ */
26
+ export declare function usePoolTotalReward(parameters: UsePoolTotalRewardParameters): UsePoolTotalRewardReturnType;
27
+ //# sourceMappingURL=use-pool-total-reward.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-total-reward.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-total-reward.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,mGAAmG;AACnG,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,GAAG,eAAe,CAAC;AAEvF,6FAA6F;AAC7F,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,4BAA4B,GAAG,4BAA4B,CAmBzG"}
@@ -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 { getPoolTotalRewardQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-pool-total-reward.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.marketAddress.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 usePoolTotalReward };
27
+
28
+ //# sourceMappingURL=use-pool-total-reward.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-total-reward.js","names":[],"sources":["../../src/pools/use-pool-total-reward.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolTotalRewardQueryOptions,\n type ConfigParameter,\n type GetPoolTotalRewardOptions,\n type GetPoolTotalRewardReturnType,\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 usePoolTotalReward}: the core query options plus an optional `config`. */\nexport type UsePoolTotalRewardParameters = GetPoolTotalRewardOptions & ConfigParameter;\n\n/** Return type of {@link usePoolTotalReward}: aggregate reward as an 18-decimal `bigint`. */\nexport type UsePoolTotalRewardReturnType = UseQueryResult<GetPoolTotalRewardReturnType, SymmioRequestError>;\n\n/**\n * Read a pool's aggregate LP reward over the last `days` — the headline figure\n * above a pool's rewards chart.\n *\n * Public: no bearer token. `days` is capped at **30** by the service; a larger\n * window is rejected with a `422`. The result is money at\n * `LISTING_VALUE_DECIMALS` (18) — the descaled figure is USD. `marketAddress`\n * gates the query. Errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data: reward30d } = usePoolTotalReward({\n * marketAddress: pool.contractAddress,\n * marketChainId: pool.chainId,\n * days: 30,\n * });\n * ```\n */\nexport function usePoolTotalReward(parameters: UsePoolTotalRewardParameters): UsePoolTotalRewardReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getPoolTotalRewardQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n enabled: (parameters.query?.enabled ?? true) && parameters.marketAddress.length > 0,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UsePoolTotalRewardReturnType;\n}\n"],"mappings":";;;;;;;AAsCA,SAAgB,EAAmB,GAAwE;CACzG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA+B,GAAQ;EACrD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,UAAU,EAAW,OAAO,WAAW,OAAS,EAAW,cAAc,SAAS;EAClF,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, GetPoolTradeHistoryOptions, GetPoolTradeHistoryReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link usePoolTradeHistory}: the core query options plus an optional `config`. */
5
+ export type UsePoolTradeHistoryParameters = GetPoolTradeHistoryOptions & ConfigParameter;
6
+ /** Return type of {@link usePoolTradeHistory}: the pool's realized history rows. */
7
+ export type UsePoolTradeHistoryReturnType = UseQueryResult<GetPoolTradeHistoryReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a **pool's** realized trade history from the analytics subgraph.
10
+ *
11
+ * Each row is one close or liquidation event with that event's frozen snapshot
12
+ * applied, so a quote closed in several partial closes yields several rows —
13
+ * each showing the size and price of *that* close rather than the quote's final
14
+ * state.
15
+ *
16
+ * Pool-wide: no account filter, so this is every trader's closes on the market.
17
+ * The query stays idle while `symbolId` is absent. Errors are normalized to
18
+ * {@link SymmioRequestError}.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const { data } = usePoolTradeHistory({ symbolId, first: 25 });
23
+ * ```
24
+ */
25
+ export declare function usePoolTradeHistory(parameters: UsePoolTradeHistoryParameters): UsePoolTradeHistoryReturnType;
26
+ //# sourceMappingURL=use-pool-trade-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-trade-history.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-trade-history.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,oGAAoG;AACpG,MAAM,MAAM,6BAA6B,GAAG,0BAA0B,GAAG,eAAe,CAAC;AAEzF,oFAAoF;AACpF,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAAC;AAE9G;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,6BAA6B,GAAG,6BAA6B,CAkB5G"}
@@ -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 { getPoolTradeHistoryQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-pool-trade-history.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 usePoolTradeHistory };
26
+
27
+ //# sourceMappingURL=use-pool-trade-history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-trade-history.js","names":[],"sources":["../../src/pools/use-pool-trade-history.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolTradeHistoryQueryOptions,\n type ConfigParameter,\n type GetPoolTradeHistoryOptions,\n type GetPoolTradeHistoryReturnType,\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 usePoolTradeHistory}: the core query options plus an optional `config`. */\nexport type UsePoolTradeHistoryParameters = GetPoolTradeHistoryOptions & ConfigParameter;\n\n/** Return type of {@link usePoolTradeHistory}: the pool's realized history rows. */\nexport type UsePoolTradeHistoryReturnType = UseQueryResult<GetPoolTradeHistoryReturnType, SymmioRequestError>;\n\n/**\n * Read a **pool's** realized trade history from the analytics subgraph.\n *\n * Each row is one close or liquidation event with that event's frozen snapshot\n * applied, so a quote closed in several partial closes yields several rows —\n * each showing the size and price of *that* close rather than the quote's final\n * state.\n *\n * Pool-wide: no account filter, so this is every trader's closes on the market.\n * The query stays idle while `symbolId` is absent. Errors are normalized to\n * {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = usePoolTradeHistory({ symbolId, first: 25 });\n * ```\n */\nexport function usePoolTradeHistory(parameters: UsePoolTradeHistoryParameters): UsePoolTradeHistoryReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getPoolTradeHistoryQueryOptions(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 UsePoolTradeHistoryReturnType;\n}\n"],"mappings":";;;;;;;AAqCA,SAAgB,EAAoB,GAA0E;CAC5G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAgC,GAAQ;EACtD,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,23 @@
1
+ import { ConfigParameter, GetPoolTransactionsOptions, GetPoolTransactionsReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link usePoolTransactions}: the core query options plus an optional `config`. */
5
+ export type UsePoolTransactionsParameters = GetPoolTransactionsOptions & ConfigParameter;
6
+ /** Return type of {@link usePoolTransactions}: one page of transaction rows. */
7
+ export type UsePoolTransactionsReturnType = UseQueryResult<GetPoolTransactionsReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read a pool's deposit and withdrawal history — refunded deposits included.
10
+ *
11
+ * Pool-wide by default: every LP's rows, not just the connected wallet's. Pass
12
+ * `walletAddress` to narrow it to one wallet.
13
+ *
14
+ * `count` is the total across all pages, so it is what a pager should divide —
15
+ * not `items.length`. Errors are normalized to {@link SymmioRequestError}.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const { data } = usePoolTransactions({ marketAddress, size: 25, start: page * 25 });
20
+ * ```
21
+ */
22
+ export declare function usePoolTransactions(parameters: UsePoolTransactionsParameters): UsePoolTransactionsReturnType;
23
+ //# sourceMappingURL=use-pool-transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-transactions.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,oGAAoG;AACpG,MAAM,MAAM,6BAA6B,GAAG,0BAA0B,GAAG,eAAe,CAAC;AAEzF,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAAC;AAE9G;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,6BAA6B,GAAG,6BAA6B,CAkB5G"}
@@ -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 { getPoolTransactionsQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-pool-transactions.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 usePoolTransactions };
26
+
27
+ //# sourceMappingURL=use-pool-transactions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-pool-transactions.js","names":[],"sources":["../../src/pools/use-pool-transactions.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolTransactionsQueryOptions,\n type ConfigParameter,\n type GetPoolTransactionsOptions,\n type GetPoolTransactionsReturnType,\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 usePoolTransactions}: the core query options plus an optional `config`. */\nexport type UsePoolTransactionsParameters = GetPoolTransactionsOptions & ConfigParameter;\n\n/** Return type of {@link usePoolTransactions}: one page of transaction rows. */\nexport type UsePoolTransactionsReturnType = UseQueryResult<GetPoolTransactionsReturnType, SymmioRequestError>;\n\n/**\n * Read a pool's deposit and withdrawal history — refunded deposits included.\n *\n * Pool-wide by default: every LP's rows, not just the connected wallet's. Pass\n * `walletAddress` to narrow it to one wallet.\n *\n * `count` is the total across all pages, so it is what a pager should divide —\n * not `items.length`. Errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = usePoolTransactions({ marketAddress, size: 25, start: page * 25 });\n * ```\n */\nexport function usePoolTransactions(parameters: UsePoolTransactionsParameters): UsePoolTransactionsReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getPoolTransactionsQueryOptions(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 UsePoolTransactionsReturnType;\n}\n"],"mappings":";;;;;;;AAkCA,SAAgB,EAAoB,GAA0E;CAC5G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAgC,GAAQ;EACtD,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,51 @@
1
+ import { ConfigParameter, RefundMarketParameters, RefundMarketReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useRefundMarket}: just an optional `config`. */
5
+ export type UseRefundMarketParameters = ConfigParameter;
6
+ /**
7
+ * Variables for the {@link useRefundMarket} mutation — the same shape as core's
8
+ * {@link RefundMarketParameters}.
9
+ *
10
+ * `accessToken`, `marketAddress`, `depositChain`, and `recipientAddress` are
11
+ * required; `chainId` defaults to the connected chain when omitted.
12
+ */
13
+ export type RefundMarketVariables = RefundMarketParameters;
14
+ /**
15
+ * Return type of {@link useRefundMarket}: resolves to a `PoolRefundResult` receipt
16
+ * on success, or a normalized error.
17
+ */
18
+ export type UseRefundMarketReturnType = UseMutationResult<RefundMarketReturnType, SymmioRequestError, RefundMarketVariables>;
19
+ /**
20
+ * Refund a deposit on a **rejected** market — reclaim the funds a user deposited
21
+ * into a market whose listing was rejected.
22
+ *
23
+ * The mutation POSTs the rejected `marketAddress`, its `depositChain`, and the
24
+ * `recipientAddress` to send the deposit to, authed with the caller's Bearer
25
+ * `accessToken` (mint it with {@link useAuthenticateListing}). Use it only for a
26
+ * market whose `marketStatus` is `REJECTED`; it resolves to a `PoolRefundResult`
27
+ * carrying the transfer's transaction hash.
28
+ *
29
+ * On success the hook invalidates the user's transaction lists
30
+ * (`getUserTransactions`, `getPoolTransactions`) and their pools view
31
+ * (`getUserListingMarkets`), so mounted views refetch and reflect the refund.
32
+ *
33
+ * Pools is **chain-level** — `mutate` / `mutateAsync` reject with a normalized
34
+ * {@link SymmioRequestError} (`LISTING_NOT_CONFIGURED`) on a chain with no listing
35
+ * backend, and a bad or expired token comes back as a `REFUND_MARKET_FAILED`
36
+ * `401`. A market that is not refundable is rejected by the service. Failures are
37
+ * normalized to {@link SymmioRequestError}.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * const refund = useRefundMarket();
42
+ * refund.mutate({
43
+ * accessToken, // from useAuthenticateListing
44
+ * marketAddress: rejectedMarket.contractAddress,
45
+ * depositChain: rejectedMarket.chainId,
46
+ * recipientAddress: account.address,
47
+ * });
48
+ * ```
49
+ */
50
+ export declare function useRefundMarket(parameters?: UseRefundMarketParameters): UseRefundMarketReturnType;
51
+ //# sourceMappingURL=use-refund-market.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-refund-market.d.ts","sourceRoot":"","sources":["../../src/pools/use-refund-market.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,yEAAyE;AACzE,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CACvD,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,eAAe,CAAC,UAAU,GAAE,yBAA8B,GAAG,yBAAyB,CAwBrG"}
@@ -0,0 +1,30 @@
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 { refundMarketMutationOptions as r } from "@symmio/trading-core";
6
+ import { useMutation as i, useQueryClient as a } from "@tanstack/react-query";
7
+ //#region src/pools/use-refund-market.ts
8
+ function o(o = {}) {
9
+ let s = t(o), c = e(), l = a(), u = r(s);
10
+ return i({
11
+ ...u,
12
+ mutationFn: async (e) => {
13
+ try {
14
+ return await u.mutationFn({
15
+ ...e,
16
+ chainId: e.chainId ?? c
17
+ });
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ },
22
+ onSuccess: () => {
23
+ l.invalidateQueries({ queryKey: ["getUserTransactions"] }), l.invalidateQueries({ queryKey: ["getPoolTransactions"] }), l.invalidateQueries({ queryKey: ["getUserListingMarkets"] });
24
+ }
25
+ });
26
+ }
27
+ //#endregion
28
+ export { o as useRefundMarket };
29
+
30
+ //# sourceMappingURL=use-refund-market.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-refund-market.js","names":[],"sources":["../../src/pools/use-refund-market.ts"],"sourcesContent":["\"use client\";\n\nimport {\n refundMarketMutationOptions,\n type ConfigParameter,\n type RefundMarketParameters,\n type RefundMarketReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } 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 useRefundMarket}: just an optional `config`. */\nexport type UseRefundMarketParameters = ConfigParameter;\n\n/**\n * Variables for the {@link useRefundMarket} mutation — the same shape as core's\n * {@link RefundMarketParameters}.\n *\n * `accessToken`, `marketAddress`, `depositChain`, and `recipientAddress` are\n * required; `chainId` defaults to the connected chain when omitted.\n */\nexport type RefundMarketVariables = RefundMarketParameters;\n\n/**\n * Return type of {@link useRefundMarket}: resolves to a `PoolRefundResult` receipt\n * on success, or a normalized error.\n */\nexport type UseRefundMarketReturnType = UseMutationResult<\n RefundMarketReturnType,\n SymmioRequestError,\n RefundMarketVariables\n>;\n\n/**\n * Refund a deposit on a **rejected** market — reclaim the funds a user deposited\n * into a market whose listing was rejected.\n *\n * The mutation POSTs the rejected `marketAddress`, its `depositChain`, and the\n * `recipientAddress` to send the deposit to, authed with the caller's Bearer\n * `accessToken` (mint it with {@link useAuthenticateListing}). Use it only for a\n * market whose `marketStatus` is `REJECTED`; it resolves to a `PoolRefundResult`\n * carrying the transfer's transaction hash.\n *\n * On success the hook invalidates the user's transaction lists\n * (`getUserTransactions`, `getPoolTransactions`) and their pools view\n * (`getUserListingMarkets`), so mounted views refetch and reflect the refund.\n *\n * Pools is **chain-level** — `mutate` / `mutateAsync` reject with a normalized\n * {@link SymmioRequestError} (`LISTING_NOT_CONFIGURED`) on a chain with no listing\n * backend, and a bad or expired token comes back as a `REFUND_MARKET_FAILED`\n * `401`. A market that is not refundable is rejected by the service. Failures are\n * normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const refund = useRefundMarket();\n * refund.mutate({\n * accessToken, // from useAuthenticateListing\n * marketAddress: rejectedMarket.contractAddress,\n * depositChain: rejectedMarket.chainId,\n * recipientAddress: account.address,\n * });\n * ```\n */\nexport function useRefundMarket(parameters: UseRefundMarketParameters = {}): UseRefundMarketReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n const options = refundMarketMutationOptions(config);\n\n return useMutation({\n ...options,\n mutationFn: async (variables: RefundMarketVariables): Promise<RefundMarketReturnType> => {\n try {\n return await options.mutationFn({ ...variables, chainId: variables.chainId ?? chainId });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n onSuccess: () => {\n // A refund turns the deposit into a refunded row and updates the rejected\n // market in the user's pools view. Invalidate each by key tag so mounted\n // views refetch — the caller does not refetch these by hand.\n void queryClient.invalidateQueries({ queryKey: [\"getUserTransactions\"] });\n void queryClient.invalidateQueries({ queryKey: [\"getPoolTransactions\"] });\n void queryClient.invalidateQueries({ queryKey: [\"getUserListingMarkets\"] });\n },\n }) as UseRefundMarketReturnType;\n}\n"],"mappings":";;;;;;;AAmEA,SAAgB,EAAgB,IAAwC,CAAC,GAA8B;CACrG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAc,EAAe,GAC7B,IAAU,EAA4B,CAAM;CAElD,OAAO,EAAY;EACjB,GAAG;EACH,YAAY,OAAO,MAAsE;GACvF,IAAI;IACF,OAAO,MAAM,EAAQ,WAAW;KAAE,GAAG;KAAW,SAAS,EAAU,WAAW;IAAQ,CAAC;GACzF,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;EACA,iBAAiB;GAMf,AAFA,EAAiB,kBAAkB,EAAE,UAAU,CAAC,qBAAqB,EAAE,CAAC,GACxE,EAAiB,kBAAkB,EAAE,UAAU,CAAC,qBAAqB,EAAE,CAAC,GACxE,EAAiB,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,EAAE,CAAC;EAC5E;CACF,CAAC;AACH"}
@@ -0,0 +1,23 @@
1
+ import { ConfigParameter, GetRetryListingInfoOptions, GetRetryListingInfoReturnType } from '@symmio/trading-core';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useRetryListingInfo}: the core query options plus an optional `config`. */
5
+ export type UseRetryListingInfoParameters = GetRetryListingInfoOptions & ConfigParameter;
6
+ /** Return type of {@link useRetryListingInfo}: the user's retry allowance for one market. */
7
+ export type UseRetryListingInfoReturnType = UseQueryResult<GetRetryListingInfoReturnType, SymmioRequestError>;
8
+ /**
9
+ * Read the signed-in user's **retry allowance** for a rejected market — how many
10
+ * listing retries remain and the cooldown before the next.
11
+ *
12
+ * Authed: pass the Bearer `accessToken` from {@link useAuthenticateListing}. Read
13
+ * this before offering {@link useRetryListing}: gate the retry button on
14
+ * `remainingRetries > 0` and on `remainingCooldownSeconds` being `null` or `0`.
15
+ * Errors are normalized to {@link SymmioRequestError}.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * const { data } = useRetryListingInfo({ accessToken, tokenContractAddress, depositChain });
20
+ * ```
21
+ */
22
+ export declare function useRetryListingInfo(parameters: UseRetryListingInfoParameters): UseRetryListingInfoReturnType;
23
+ //# sourceMappingURL=use-retry-listing-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-retry-listing-info.d.ts","sourceRoot":"","sources":["../../src/pools/use-retry-listing-info.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,oGAAoG;AACpG,MAAM,MAAM,6BAA6B,GAAG,0BAA0B,GAAG,eAAe,CAAC;AAEzF,6FAA6F;AAC7F,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAAC;AAE9G;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,6BAA6B,GAAG,6BAA6B,CAkB5G"}
@@ -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 { getRetryListingInfoQueryOptions as r } from "@symmio/trading-core";
6
+ import { useQuery as i } from "@tanstack/react-query";
7
+ //#region src/pools/use-retry-listing-info.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 useRetryListingInfo };
26
+
27
+ //# sourceMappingURL=use-retry-listing-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-retry-listing-info.js","names":[],"sources":["../../src/pools/use-retry-listing-info.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getRetryListingInfoQueryOptions,\n type ConfigParameter,\n type GetRetryListingInfoOptions,\n type GetRetryListingInfoReturnType,\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 useRetryListingInfo}: the core query options plus an optional `config`. */\nexport type UseRetryListingInfoParameters = GetRetryListingInfoOptions & ConfigParameter;\n\n/** Return type of {@link useRetryListingInfo}: the user's retry allowance for one market. */\nexport type UseRetryListingInfoReturnType = UseQueryResult<GetRetryListingInfoReturnType, SymmioRequestError>;\n\n/**\n * Read the signed-in user's **retry allowance** for a rejected market — how many\n * listing retries remain and the cooldown before the next.\n *\n * Authed: pass the Bearer `accessToken` from {@link useAuthenticateListing}. Read\n * this before offering {@link useRetryListing}: gate the retry button on\n * `remainingRetries > 0` and on `remainingCooldownSeconds` being `null` or `0`.\n * Errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = useRetryListingInfo({ accessToken, tokenContractAddress, depositChain });\n * ```\n */\nexport function useRetryListingInfo(parameters: UseRetryListingInfoParameters): UseRetryListingInfoReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getRetryListingInfoQueryOptions(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 UseRetryListingInfoReturnType;\n}\n"],"mappings":";;;;;;;AAkCA,SAAgB,EAAoB,GAA0E;CAC5G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAgC,GAAQ;EACtD,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,46 @@
1
+ import { ConfigParameter, RetryListingParameters, RetryListingReturnType } from '@symmio/trading-core';
2
+ import { UseMutationResult } from '@tanstack/react-query';
3
+ import { SymmioRequestError } from '../errors/symmio-request-error.js';
4
+ /** Parameters for {@link useRetryListing}: just an optional `config`. */
5
+ export type UseRetryListingParameters = ConfigParameter;
6
+ /**
7
+ * Variables for the {@link useRetryListing} mutation — the same shape as core's
8
+ * {@link RetryListingParameters}.
9
+ *
10
+ * `accessToken`, `tokenContractAddress`, and `depositChain` are required;
11
+ * `chainId` defaults to the connected chain when omitted.
12
+ */
13
+ export type RetryListingVariables = RetryListingParameters;
14
+ /**
15
+ * Return type of {@link useRetryListing}: resolves to a `RetryListingResult` (the
16
+ * retry allowance left) on success, or a normalized error.
17
+ */
18
+ export type UseRetryListingReturnType = UseMutationResult<RetryListingReturnType, SymmioRequestError, RetryListingVariables>;
19
+ /**
20
+ * Retry a **rejected** market's listing — re-submit a market whose listing was
21
+ * rejected, instead of refunding it.
22
+ *
23
+ * The mutation POSTs the rejected `tokenContractAddress` and its `depositChain`,
24
+ * authed with the caller's Bearer `accessToken` (mint it with
25
+ * {@link useAuthenticateListing}). Retries are capped and rate-limited: read
26
+ * {@link useRetryListingInfo} first and only offer this when `remainingRetries > 0`
27
+ * and the cooldown has elapsed.
28
+ *
29
+ * On success the hook invalidates the retry allowance (`getRetryListingInfo`) and
30
+ * the user's pools view (`getUserListingMarkets`), so mounted views refetch and
31
+ * reflect the retry.
32
+ *
33
+ * Pools is **chain-level** — `mutate` / `mutateAsync` reject with a normalized
34
+ * {@link SymmioRequestError} (`LISTING_NOT_CONFIGURED`) on a chain with no listing
35
+ * backend, and a bad or expired token comes back as a `RETRY_LISTING_FAILED`
36
+ * `401`. No retries left or an un-elapsed cooldown is rejected by the service.
37
+ * Failures are normalized to {@link SymmioRequestError}.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * const retry = useRetryListing();
42
+ * retry.mutate({ accessToken, tokenContractAddress, depositChain });
43
+ * ```
44
+ */
45
+ export declare function useRetryListing(parameters?: UseRetryListingParameters): UseRetryListingReturnType;
46
+ //# sourceMappingURL=use-retry-listing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-retry-listing.d.ts","sourceRoot":"","sources":["../../src/pools/use-retry-listing.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,yEAAyE;AACzE,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CACvD,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,eAAe,CAAC,UAAU,GAAE,yBAA8B,GAAG,yBAAyB,CAsBrG"}
@@ -0,0 +1,30 @@
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 { retryListingMutationOptions as r } from "@symmio/trading-core";
6
+ import { useMutation as i, useQueryClient as a } from "@tanstack/react-query";
7
+ //#region src/pools/use-retry-listing.ts
8
+ function o(o = {}) {
9
+ let s = t(o), c = e(), l = a(), u = r(s);
10
+ return i({
11
+ ...u,
12
+ mutationFn: async (e) => {
13
+ try {
14
+ return await u.mutationFn({
15
+ ...e,
16
+ chainId: e.chainId ?? c
17
+ });
18
+ } catch (e) {
19
+ throw n(e);
20
+ }
21
+ },
22
+ onSuccess: () => {
23
+ l.invalidateQueries({ queryKey: ["getRetryListingInfo"] }), l.invalidateQueries({ queryKey: ["getUserListingMarkets"] });
24
+ }
25
+ });
26
+ }
27
+ //#endregion
28
+ export { o as useRetryListing };
29
+
30
+ //# sourceMappingURL=use-retry-listing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-retry-listing.js","names":[],"sources":["../../src/pools/use-retry-listing.ts"],"sourcesContent":["\"use client\";\n\nimport {\n retryListingMutationOptions,\n type ConfigParameter,\n type RetryListingParameters,\n type RetryListingReturnType,\n} from \"@symmio/trading-core\";\nimport { useMutation, useQueryClient, type UseMutationResult } 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 useRetryListing}: just an optional `config`. */\nexport type UseRetryListingParameters = ConfigParameter;\n\n/**\n * Variables for the {@link useRetryListing} mutation — the same shape as core's\n * {@link RetryListingParameters}.\n *\n * `accessToken`, `tokenContractAddress`, and `depositChain` are required;\n * `chainId` defaults to the connected chain when omitted.\n */\nexport type RetryListingVariables = RetryListingParameters;\n\n/**\n * Return type of {@link useRetryListing}: resolves to a `RetryListingResult` (the\n * retry allowance left) on success, or a normalized error.\n */\nexport type UseRetryListingReturnType = UseMutationResult<\n RetryListingReturnType,\n SymmioRequestError,\n RetryListingVariables\n>;\n\n/**\n * Retry a **rejected** market's listing — re-submit a market whose listing was\n * rejected, instead of refunding it.\n *\n * The mutation POSTs the rejected `tokenContractAddress` and its `depositChain`,\n * authed with the caller's Bearer `accessToken` (mint it with\n * {@link useAuthenticateListing}). Retries are capped and rate-limited: read\n * {@link useRetryListingInfo} first and only offer this when `remainingRetries > 0`\n * and the cooldown has elapsed.\n *\n * On success the hook invalidates the retry allowance (`getRetryListingInfo`) and\n * the user's pools view (`getUserListingMarkets`), so mounted views refetch and\n * reflect the retry.\n *\n * Pools is **chain-level** — `mutate` / `mutateAsync` reject with a normalized\n * {@link SymmioRequestError} (`LISTING_NOT_CONFIGURED`) on a chain with no listing\n * backend, and a bad or expired token comes back as a `RETRY_LISTING_FAILED`\n * `401`. No retries left or an un-elapsed cooldown is rejected by the service.\n * Failures are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const retry = useRetryListing();\n * retry.mutate({ accessToken, tokenContractAddress, depositChain });\n * ```\n */\nexport function useRetryListing(parameters: UseRetryListingParameters = {}): UseRetryListingReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const queryClient = useQueryClient();\n const options = retryListingMutationOptions(config);\n\n return useMutation({\n ...options,\n mutationFn: async (variables: RetryListingVariables): Promise<RetryListingReturnType> => {\n try {\n return await options.mutationFn({ ...variables, chainId: variables.chainId ?? chainId });\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n onSuccess: () => {\n // A retry consumes an allowance and moves the market off REJECTED in the\n // user's pools view. Invalidate each by key tag so mounted views refetch.\n void queryClient.invalidateQueries({ queryKey: [\"getRetryListingInfo\"] });\n void queryClient.invalidateQueries({ queryKey: [\"getUserListingMarkets\"] });\n },\n }) as UseRetryListingReturnType;\n}\n"],"mappings":";;;;;;;AA8DA,SAAgB,EAAgB,IAAwC,CAAC,GAA8B;CACrG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAc,EAAe,GAC7B,IAAU,EAA4B,CAAM;CAElD,OAAO,EAAY;EACjB,GAAG;EACH,YAAY,OAAO,MAAsE;GACvF,IAAI;IACF,OAAO,MAAM,EAAQ,WAAW;KAAE,GAAG;KAAW,SAAS,EAAU,WAAW;IAAQ,CAAC;GACzF,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;EACA,iBAAiB;GAIf,AADA,EAAiB,kBAAkB,EAAE,UAAU,CAAC,qBAAqB,EAAE,CAAC,GACxE,EAAiB,kBAAkB,EAAE,UAAU,CAAC,uBAAuB,EAAE,CAAC;EAC5E;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { ConfigParameter } from '@symmio/trading-core';
2
+ /** Parameters for {@link useSupportsListingService}. */
3
+ export interface UseSupportsListingServiceParameters extends ConfigParameter {
4
+ /** Chain to check; defaults to the connected chain. */
5
+ chainId?: number;
6
+ }
7
+ /**
8
+ * Whether the target chain has the lowcap **Pools** listing backend. Listing is
9
+ * chain-level — a chain either carries a `listing` block or it does not; there is
10
+ * no solver capability involved. Delegates to core `supportsListingService`
11
+ * (non-throwing); gate the Pools tab on it so the feature hides where it is
12
+ * unavailable rather than erroring at request time.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * const supported = useSupportsListingService();
17
+ * if (!supported) return null;
18
+ * ```
19
+ */
20
+ export declare function useSupportsListingService(parameters?: UseSupportsListingServiceParameters): boolean;
21
+ //# sourceMappingURL=use-supports-listing-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-supports-listing-service.d.ts","sourceRoot":"","sources":["../../src/pools/use-supports-listing-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIpF,wDAAwD;AACxD,MAAM,WAAW,mCAAoC,SAAQ,eAAe;IAC1E,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,GAAE,mCAAwC,GAAG,OAAO,CAIvG"}
@@ -0,0 +1,13 @@
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 { supportsListingService as n } from "@symmio/trading-core";
5
+ //#region src/pools/use-supports-listing-service.ts
6
+ function r(r = {}) {
7
+ let i = t(r), a = e();
8
+ return n(i, { chainId: r.chainId ?? a });
9
+ }
10
+ //#endregion
11
+ export { r as useSupportsListingService };
12
+
13
+ //# sourceMappingURL=use-supports-listing-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-supports-listing-service.js","names":[],"sources":["../../src/pools/use-supports-listing-service.ts"],"sourcesContent":["\"use client\";\n\nimport { supportsListingService, type ConfigParameter } from \"@symmio/trading-core\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useSupportsListingService}. */\nexport interface UseSupportsListingServiceParameters extends ConfigParameter {\n /** Chain to check; defaults to the connected chain. */\n chainId?: number;\n}\n\n/**\n * Whether the target chain has the lowcap **Pools** listing backend. Listing is\n * chain-level — a chain either carries a `listing` block or it does not; there is\n * no solver capability involved. Delegates to core `supportsListingService`\n * (non-throwing); gate the Pools tab on it so the feature hides where it is\n * unavailable rather than erroring at request time.\n *\n * @example\n * ```tsx\n * const supported = useSupportsListingService();\n * if (!supported) return null;\n * ```\n */\nexport function useSupportsListingService(parameters: UseSupportsListingServiceParameters = {}): boolean {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n return supportsListingService(config, { chainId: parameters.chainId ?? chainId });\n}\n"],"mappings":";;;;;AAyBA,SAAgB,EAA0B,IAAkD,CAAC,GAAY;CACvG,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB;CACjC,OAAO,EAAuB,GAAQ,EAAE,SAAS,EAAW,WAAW,EAAQ,CAAC;AAClF"}