@symmio/trading-core 3.6.0 → 4.1.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 (303) hide show
  1. package/dist/balance-history/get-balance-history/types.d.ts +3 -1
  2. package/dist/balance-history/get-balance-history/types.d.ts.map +1 -1
  3. package/dist/balance-history/get-balance-history/types.js +1 -1
  4. package/dist/balance-history/get-balance-history/types.js.map +1 -1
  5. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.d.ts +50 -0
  6. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.d.ts.map +1 -0
  7. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.js +30 -0
  8. package/dist/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.js.map +1 -0
  9. package/dist/funding/get-funding-index-checkpoints/index.d.ts +5 -0
  10. package/dist/funding/get-funding-index-checkpoints/index.d.ts.map +1 -0
  11. package/dist/funding/get-funding-index-checkpoints/query-document.d.ts +16 -0
  12. package/dist/funding/get-funding-index-checkpoints/query-document.d.ts.map +1 -0
  13. package/dist/funding/get-funding-index-checkpoints/query-document.js +7 -0
  14. package/dist/funding/get-funding-index-checkpoints/query-document.js.map +1 -0
  15. package/dist/funding/get-funding-index-checkpoints/query.d.ts +37 -0
  16. package/dist/funding/get-funding-index-checkpoints/query.d.ts.map +1 -0
  17. package/dist/funding/get-funding-index-checkpoints/query.js +23 -0
  18. package/dist/funding/get-funding-index-checkpoints/query.js.map +1 -0
  19. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.d.ts +12 -0
  20. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.d.ts.map +1 -0
  21. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.js +31 -0
  22. package/dist/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.js.map +1 -0
  23. package/dist/funding/get-funding-index-checkpoints/types.d.ts +51 -0
  24. package/dist/funding/get-funding-index-checkpoints/types.d.ts.map +1 -0
  25. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.d.ts +47 -0
  26. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.d.ts.map +1 -0
  27. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.js +30 -0
  28. package/dist/funding/get-quote-funding-settlements/get-quote-funding-settlements.js.map +1 -0
  29. package/dist/funding/get-quote-funding-settlements/index.d.ts +5 -0
  30. package/dist/funding/get-quote-funding-settlements/index.d.ts.map +1 -0
  31. package/dist/funding/get-quote-funding-settlements/query-document.d.ts +16 -0
  32. package/dist/funding/get-quote-funding-settlements/query-document.d.ts.map +1 -0
  33. package/dist/funding/get-quote-funding-settlements/query-document.js +7 -0
  34. package/dist/funding/get-quote-funding-settlements/query-document.js.map +1 -0
  35. package/dist/funding/get-quote-funding-settlements/query.d.ts +37 -0
  36. package/dist/funding/get-quote-funding-settlements/query.d.ts.map +1 -0
  37. package/dist/funding/get-quote-funding-settlements/query.js +23 -0
  38. package/dist/funding/get-quote-funding-settlements/query.js.map +1 -0
  39. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.d.ts +12 -0
  40. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.d.ts.map +1 -0
  41. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.js +33 -0
  42. package/dist/funding/get-quote-funding-settlements/to-quote-funding-settlement-row.js.map +1 -0
  43. package/dist/funding/get-quote-funding-settlements/types.d.ts +56 -0
  44. package/dist/funding/get-quote-funding-settlements/types.d.ts.map +1 -0
  45. package/dist/funding/index.d.ts +3 -0
  46. package/dist/funding/index.d.ts.map +1 -0
  47. package/dist/index.d.ts +48 -5
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +408 -386
  50. package/dist/liquidation/get-liquidation-details/get-liquidation-details.d.ts +44 -0
  51. package/dist/liquidation/get-liquidation-details/get-liquidation-details.d.ts.map +1 -0
  52. package/dist/liquidation/get-liquidation-details/get-liquidation-details.js +30 -0
  53. package/dist/liquidation/get-liquidation-details/get-liquidation-details.js.map +1 -0
  54. package/dist/liquidation/get-liquidation-details/index.d.ts +5 -0
  55. package/dist/liquidation/get-liquidation-details/index.d.ts.map +1 -0
  56. package/dist/liquidation/get-liquidation-details/query-document.d.ts +16 -0
  57. package/dist/liquidation/get-liquidation-details/query-document.d.ts.map +1 -0
  58. package/dist/liquidation/get-liquidation-details/query-document.js +7 -0
  59. package/dist/liquidation/get-liquidation-details/query-document.js.map +1 -0
  60. package/dist/liquidation/get-liquidation-details/query.d.ts +37 -0
  61. package/dist/liquidation/get-liquidation-details/query.d.ts.map +1 -0
  62. package/dist/liquidation/get-liquidation-details/query.js +23 -0
  63. package/dist/liquidation/get-liquidation-details/query.js.map +1 -0
  64. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.d.ts +12 -0
  65. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.d.ts.map +1 -0
  66. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.js +32 -0
  67. package/dist/liquidation/get-liquidation-details/to-liquidation-detail-row.js.map +1 -0
  68. package/dist/liquidation/get-liquidation-details/types.d.ts +47 -0
  69. package/dist/liquidation/get-liquidation-details/types.d.ts.map +1 -0
  70. package/dist/liquidation/index.d.ts +2 -0
  71. package/dist/liquidation/index.d.ts.map +1 -0
  72. package/dist/margin/get-margin-transfers/get-margin-transfers.d.ts +51 -0
  73. package/dist/margin/get-margin-transfers/get-margin-transfers.d.ts.map +1 -0
  74. package/dist/margin/get-margin-transfers/get-margin-transfers.js +32 -0
  75. package/dist/margin/get-margin-transfers/get-margin-transfers.js.map +1 -0
  76. package/dist/margin/get-margin-transfers/index.d.ts +5 -0
  77. package/dist/margin/get-margin-transfers/index.d.ts.map +1 -0
  78. package/dist/margin/get-margin-transfers/query-document.d.ts +17 -0
  79. package/dist/margin/get-margin-transfers/query-document.d.ts.map +1 -0
  80. package/dist/margin/get-margin-transfers/query-document.js +7 -0
  81. package/dist/margin/get-margin-transfers/query-document.js.map +1 -0
  82. package/dist/margin/get-margin-transfers/query.d.ts +37 -0
  83. package/dist/margin/get-margin-transfers/query.d.ts.map +1 -0
  84. package/dist/margin/get-margin-transfers/query.js +23 -0
  85. package/dist/margin/get-margin-transfers/query.js.map +1 -0
  86. package/dist/margin/get-margin-transfers/to-margin-transfer-row.d.ts +12 -0
  87. package/dist/margin/get-margin-transfers/to-margin-transfer-row.d.ts.map +1 -0
  88. package/dist/margin/get-margin-transfers/to-margin-transfer-row.js +19 -0
  89. package/dist/margin/get-margin-transfers/to-margin-transfer-row.js.map +1 -0
  90. package/dist/margin/get-margin-transfers/types.d.ts +27 -0
  91. package/dist/margin/get-margin-transfers/types.d.ts.map +1 -0
  92. package/dist/margin/index.d.ts +1 -0
  93. package/dist/margin/index.d.ts.map +1 -1
  94. package/dist/pools/markets/get-listing-markets.d.ts +2 -0
  95. package/dist/pools/markets/get-listing-markets.d.ts.map +1 -1
  96. package/dist/pools/markets/get-listing-markets.js +1 -0
  97. package/dist/pools/markets/get-listing-markets.js.map +1 -1
  98. package/dist/pools/markets/query.d.ts.map +1 -1
  99. package/dist/pools/markets/query.js +1 -0
  100. package/dist/pools/markets/query.js.map +1 -1
  101. package/dist/pools/markets/to-search-params.d.ts +1 -0
  102. package/dist/pools/markets/to-search-params.d.ts.map +1 -1
  103. package/dist/pools/markets/to-search-params.js +1 -1
  104. package/dist/pools/markets/to-search-params.js.map +1 -1
  105. package/dist/pools/trade-history/query-document.d.ts +3 -0
  106. package/dist/pools/trade-history/query-document.d.ts.map +1 -1
  107. package/dist/pools/trade-history/query-document.js +1 -1
  108. package/dist/pools/trade-history/query-document.js.map +1 -1
  109. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.d.ts +22 -12
  110. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.d.ts.map +1 -1
  111. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.js +20 -21
  112. package/dist/quotes/get-quote-events-by-type/get-quote-events-by-type.js.map +1 -1
  113. package/dist/quotes/get-quote-events-by-type/query-document.d.ts +5 -5
  114. package/dist/quotes/get-quote-events-by-type/query-document.d.ts.map +1 -1
  115. package/dist/quotes/get-quote-events-by-type/query-document.js +1 -1
  116. package/dist/quotes/get-quote-events-by-type/query-document.js.map +1 -1
  117. package/dist/quotes/get-quote-events-by-type/query.d.ts +7 -6
  118. package/dist/quotes/get-quote-events-by-type/query.d.ts.map +1 -1
  119. package/dist/quotes/get-quote-events-by-type/query.js +19 -17
  120. package/dist/quotes/get-quote-events-by-type/query.js.map +1 -1
  121. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.d.ts +2 -2
  122. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.d.ts.map +1 -1
  123. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.js +1 -3
  124. package/dist/quotes/get-quote-events-by-type/to-quote-event-row.js.map +1 -1
  125. package/dist/quotes/get-quote-events-by-type/types.d.ts +14 -3
  126. package/dist/quotes/get-quote-events-by-type/types.d.ts.map +1 -1
  127. package/dist/quotes/get-quote-events-by-type/types.js.map +1 -1
  128. package/dist/quotes/get-quote-funding/get-quote-funding.d.ts +12 -2
  129. package/dist/quotes/get-quote-funding/get-quote-funding.d.ts.map +1 -1
  130. package/dist/quotes/get-quote-funding/get-quote-funding.js +21 -17
  131. package/dist/quotes/get-quote-funding/get-quote-funding.js.map +1 -1
  132. package/dist/quotes/get-quote-funding/query-document.d.ts +3 -2
  133. package/dist/quotes/get-quote-funding/query-document.d.ts.map +1 -1
  134. package/dist/quotes/get-quote-funding/query-document.js +1 -1
  135. package/dist/quotes/get-quote-funding/query-document.js.map +1 -1
  136. package/dist/quotes/get-quote-funding/query.d.ts.map +1 -1
  137. package/dist/quotes/get-quote-funding/query.js +2 -1
  138. package/dist/quotes/get-quote-funding/query.js.map +1 -1
  139. package/dist/quotes/get-quote-funding/to-funding-row.d.ts.map +1 -1
  140. package/dist/quotes/get-quote-funding/to-funding-row.js +1 -3
  141. package/dist/quotes/get-quote-funding/to-funding-row.js.map +1 -1
  142. package/dist/quotes/get-quote-history/get-quote-history.d.ts +18 -7
  143. package/dist/quotes/get-quote-history/get-quote-history.d.ts.map +1 -1
  144. package/dist/quotes/get-quote-history/get-quote-history.js +32 -22
  145. package/dist/quotes/get-quote-history/get-quote-history.js.map +1 -1
  146. package/dist/quotes/get-quote-history/query-document.d.ts +12 -7
  147. package/dist/quotes/get-quote-history/query-document.d.ts.map +1 -1
  148. package/dist/quotes/get-quote-history/query-document.js +1 -1
  149. package/dist/quotes/get-quote-history/query-document.js.map +1 -1
  150. package/dist/quotes/get-quote-history/query.d.ts +3 -2
  151. package/dist/quotes/get-quote-history/query.d.ts.map +1 -1
  152. package/dist/quotes/get-quote-history/query.js +22 -19
  153. package/dist/quotes/get-quote-history/query.js.map +1 -1
  154. package/dist/quotes/get-quote-history/to-history-row.d.ts.map +1 -1
  155. package/dist/quotes/get-quote-history/to-history-row.js +52 -37
  156. package/dist/quotes/get-quote-history/to-history-row.js.map +1 -1
  157. package/dist/quotes/get-quote-history/types.d.ts +41 -0
  158. package/dist/quotes/get-quote-history/types.d.ts.map +1 -1
  159. package/dist/quotes/get-quote-history/types.js.map +1 -1
  160. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts +21 -11
  161. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.d.ts.map +1 -1
  162. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js +19 -21
  163. package/dist/quotes/get-quotes-events-by-type/get-quotes-events-by-type.js.map +1 -1
  164. package/dist/quotes/get-quotes-events-by-type/query-document.d.ts +7 -7
  165. package/dist/quotes/get-quotes-events-by-type/query-document.d.ts.map +1 -1
  166. package/dist/quotes/get-quotes-events-by-type/query-document.js +1 -1
  167. package/dist/quotes/get-quotes-events-by-type/query-document.js.map +1 -1
  168. package/dist/quotes/get-quotes-events-by-type/query.d.ts +8 -6
  169. package/dist/quotes/get-quotes-events-by-type/query.d.ts.map +1 -1
  170. package/dist/quotes/get-quotes-events-by-type/query.js +22 -20
  171. package/dist/quotes/get-quotes-events-by-type/query.js.map +1 -1
  172. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.d.ts +38 -0
  173. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.d.ts.map +1 -0
  174. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.js +28 -0
  175. package/dist/quotes/get-subgraph-quotes/get-subgraph-quotes.js.map +1 -0
  176. package/dist/quotes/get-subgraph-quotes/index.d.ts +5 -0
  177. package/dist/quotes/get-subgraph-quotes/index.d.ts.map +1 -0
  178. package/dist/quotes/get-subgraph-quotes/query-document.d.ts +15 -0
  179. package/dist/quotes/get-subgraph-quotes/query-document.d.ts.map +1 -0
  180. package/dist/quotes/get-subgraph-quotes/query-document.js +7 -0
  181. package/dist/quotes/get-subgraph-quotes/query-document.js.map +1 -0
  182. package/dist/quotes/get-subgraph-quotes/query.d.ts +37 -0
  183. package/dist/quotes/get-subgraph-quotes/query.d.ts.map +1 -0
  184. package/dist/quotes/get-subgraph-quotes/query.js +23 -0
  185. package/dist/quotes/get-subgraph-quotes/query.js.map +1 -0
  186. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.d.ts +12 -0
  187. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.d.ts.map +1 -0
  188. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.js +32 -0
  189. package/dist/quotes/get-subgraph-quotes/to-subgraph-quote-row.js.map +1 -0
  190. package/dist/quotes/get-subgraph-quotes/types.d.ts +54 -0
  191. package/dist/quotes/get-subgraph-quotes/types.d.ts.map +1 -0
  192. package/dist/quotes/index.d.ts +1 -0
  193. package/dist/quotes/index.d.ts.map +1 -1
  194. package/dist/solvers/estimated-price/get-estimated-price.d.ts +2 -0
  195. package/dist/solvers/estimated-price/get-estimated-price.d.ts.map +1 -1
  196. package/dist/solvers/estimated-price/get-estimated-price.js +4 -1
  197. package/dist/solvers/estimated-price/get-estimated-price.js.map +1 -1
  198. package/dist/solvers/estimated-price/query.d.ts +6 -2
  199. package/dist/solvers/estimated-price/query.d.ts.map +1 -1
  200. package/dist/solvers/estimated-price/query.js +3 -2
  201. package/dist/solvers/estimated-price/query.js.map +1 -1
  202. package/dist/solvers/funding-info/adapters/enigma-funding-info.d.ts +4 -0
  203. package/dist/solvers/funding-info/adapters/enigma-funding-info.d.ts.map +1 -0
  204. package/dist/solvers/funding-info/adapters/enigma-funding-info.js +17 -0
  205. package/dist/solvers/funding-info/adapters/enigma-funding-info.js.map +1 -0
  206. package/dist/solvers/funding-info/adapters/rasa-funding-info.d.ts +4 -0
  207. package/dist/solvers/funding-info/adapters/rasa-funding-info.d.ts.map +1 -0
  208. package/dist/solvers/funding-info/adapters/rasa-funding-info.js +21 -0
  209. package/dist/solvers/funding-info/adapters/rasa-funding-info.js.map +1 -0
  210. package/dist/solvers/funding-info/get-funding-info.d.ts +22 -13
  211. package/dist/solvers/funding-info/get-funding-info.d.ts.map +1 -1
  212. package/dist/solvers/funding-info/get-funding-info.js +24 -12
  213. package/dist/solvers/funding-info/get-funding-info.js.map +1 -1
  214. package/dist/solvers/funding-info/query.d.ts +14 -6
  215. package/dist/solvers/funding-info/query.d.ts.map +1 -1
  216. package/dist/solvers/funding-info/query.js +1 -0
  217. package/dist/solvers/funding-info/query.js.map +1 -1
  218. package/dist/solvers/funding-info/to-funding-info.d.ts +8 -4
  219. package/dist/solvers/funding-info/to-funding-info.d.ts.map +1 -1
  220. package/dist/solvers/funding-info/to-funding-info.js +2 -1
  221. package/dist/solvers/funding-info/to-funding-info.js.map +1 -1
  222. package/dist/solvers/funding-info/types.d.ts +26 -4
  223. package/dist/solvers/funding-info/types.d.ts.map +1 -1
  224. package/dist/solvers/market-info/adapters/enigma-market-info.d.ts +3 -3
  225. package/dist/solvers/market-info/adapters/enigma-market-info.d.ts.map +1 -1
  226. package/dist/solvers/market-info/adapters/enigma-market-info.js +7 -5
  227. package/dist/solvers/market-info/adapters/enigma-market-info.js.map +1 -1
  228. package/dist/solvers/market-info/get-market-info.d.ts +3 -2
  229. package/dist/solvers/market-info/get-market-info.d.ts.map +1 -1
  230. package/dist/solvers/market-info/get-market-info.js.map +1 -1
  231. package/dist/solvers/market-info/types.d.ts +4 -3
  232. package/dist/solvers/market-info/types.d.ts.map +1 -1
  233. package/dist/solvers/notional-cap/get-notional-cap-all.d.ts +10 -10
  234. package/dist/solvers/notional-cap/get-notional-cap-all.d.ts.map +1 -1
  235. package/dist/solvers/notional-cap/get-notional-cap-all.js +26 -23
  236. package/dist/solvers/notional-cap/get-notional-cap-all.js.map +1 -1
  237. package/dist/solvers/notional-cap/get-notional-cap-page.d.ts +49 -0
  238. package/dist/solvers/notional-cap/get-notional-cap-page.d.ts.map +1 -0
  239. package/dist/solvers/notional-cap/get-notional-cap-page.js +37 -0
  240. package/dist/solvers/notional-cap/get-notional-cap-page.js.map +1 -0
  241. package/dist/solvers/notional-cap/index.d.ts +2 -0
  242. package/dist/solvers/notional-cap/index.d.ts.map +1 -1
  243. package/dist/solvers/notional-cap/query-page.d.ts +45 -0
  244. package/dist/solvers/notional-cap/query-page.d.ts.map +1 -0
  245. package/dist/solvers/notional-cap/query-page.js +26 -0
  246. package/dist/solvers/notional-cap/query-page.js.map +1 -0
  247. package/dist/solvers/symbols/get-symbols.d.ts +3 -2
  248. package/dist/solvers/symbols/get-symbols.d.ts.map +1 -1
  249. package/dist/solvers/symbols/get-symbols.js +17 -3
  250. package/dist/solvers/symbols/get-symbols.js.map +1 -1
  251. package/dist/solvers/trade-volume/get-trade-volume.d.ts +2 -1
  252. package/dist/solvers/trade-volume/get-trade-volume.d.ts.map +1 -1
  253. package/dist/solvers/trade-volume/get-trade-volume.js +6 -1
  254. package/dist/solvers/trade-volume/get-trade-volume.js.map +1 -1
  255. package/dist/solvers/trade-volume/to-daily-volume.d.ts +6 -6
  256. package/dist/solvers/trade-volume/to-daily-volume.js.map +1 -1
  257. package/dist/solvers/trade-volume/types.d.ts +4 -3
  258. package/dist/solvers/trade-volume/types.d.ts.map +1 -1
  259. package/dist/solvers/types/generated/enigma-solver.js +3 -3
  260. package/dist/solvers/types/generated/enigma-solver.js.map +1 -1
  261. package/dist/solvers/types/generated/rasa-solver.js +8 -2
  262. package/dist/solvers/types/generated/rasa-solver.js.map +1 -1
  263. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.d.ts +122 -0
  264. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.d.ts.map +1 -0
  265. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.js +80 -0
  266. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/get-party-a-open-positions-batch.js.map +1 -0
  267. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/index.d.ts +3 -0
  268. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/index.d.ts.map +1 -0
  269. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.d.ts +37 -0
  270. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.d.ts.map +1 -0
  271. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.js +27 -0
  272. package/dist/symmio-contracts/symmio/get-party-a-open-positions-batch/query.js.map +1 -0
  273. package/dist/symmio-contracts/symmio/index.d.ts +2 -0
  274. package/dist/symmio-contracts/symmio/index.d.ts.map +1 -1
  275. package/dist/symmio-contracts/symmio/is-party-a-liquidated/index.d.ts +3 -0
  276. package/dist/symmio-contracts/symmio/is-party-a-liquidated/index.d.ts.map +1 -0
  277. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.d.ts +37 -0
  278. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.d.ts.map +1 -0
  279. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.js +15 -0
  280. package/dist/symmio-contracts/symmio/is-party-a-liquidated/is-party-a-liquidated.js.map +1 -0
  281. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.d.ts +38 -0
  282. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.d.ts.map +1 -0
  283. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.js +29 -0
  284. package/dist/symmio-contracts/symmio/is-party-a-liquidated/query.js.map +1 -0
  285. package/dist/symmio-subgraph/index.d.ts +1 -0
  286. package/dist/symmio-subgraph/index.d.ts.map +1 -1
  287. package/dist/symmio-subgraph/subgraph-decode.d.ts +51 -0
  288. package/dist/symmio-subgraph/subgraph-decode.d.ts.map +1 -0
  289. package/dist/symmio-subgraph/subgraph-decode.js +24 -0
  290. package/dist/symmio-subgraph/subgraph-decode.js.map +1 -0
  291. package/dist/symmio-subgraph/subgraph-filters.d.ts +97 -0
  292. package/dist/symmio-subgraph/subgraph-filters.d.ts.map +1 -0
  293. package/dist/symmio-subgraph/subgraph-filters.js +39 -0
  294. package/dist/symmio-subgraph/subgraph-filters.js.map +1 -0
  295. package/dist/symmio-subgraph/types/generated/analytics/gql.d.ts +25 -5
  296. package/dist/symmio-subgraph/types/generated/analytics/gql.d.ts.map +1 -1
  297. package/dist/symmio-subgraph/types/generated/analytics/gql.js +16 -11
  298. package/dist/symmio-subgraph/types/generated/analytics/gql.js.map +1 -1
  299. package/dist/symmio-subgraph/types/generated/analytics/graphql.d.ts +3640 -9
  300. package/dist/symmio-subgraph/types/generated/analytics/graphql.d.ts.map +1 -1
  301. package/dist/symmio-subgraph/types/generated/analytics/graphql.js +2 -2
  302. package/dist/symmio-subgraph/types/generated/analytics/graphql.js.map +1 -1
  303. package/package.json +3 -3
@@ -44,7 +44,9 @@ export declare enum MarginTransferType {
44
44
  /** Pulling margin out of a Virtual Account back to the SubAccount. */
45
45
  Remove = "REMOVE",
46
46
  /** Margin automatically returned to the SubAccount (e.g. on close / deallocate). */
47
- AutoReturn = "AUTO_RETURN"
47
+ AutoReturn = "AUTO_RETURN",
48
+ /** Margin recovered from a Virtual Account by the emergency path. */
49
+ EmergencyRecover = "EMERGENCY_RECOVER"
48
50
  }
49
51
  /**
50
52
  * How a {@link "getBalanceHistory"} read treats **internal margin-transfer legs**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/balance-history/get-balance-history/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,oBAAY,iBAAiB;IAC3B,+CAA+C;IAC/C,OAAO,YAAY;IACnB,+CAA+C;IAC/C,QAAQ,aAAa;IACrB,kFAAkF;IAClF,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B,2DAA2D;IAC3D,GAAG,QAAQ;IACX,qBAAqB;IACrB,OAAO,YAAY;IACnB,6CAA6C;IAC7C,QAAQ,aAAa;CACtB;AAED;;;;;;;;;GASG;AACH,oBAAY,kBAAkB;IAC5B,8DAA8D;IAC9D,GAAG,QAAQ;IACX,sEAAsE;IACtE,MAAM,WAAW;IACjB,oFAAoF;IACpF,UAAU,gBAAgB;CAC3B;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB;AAC/B,mGAAmG;AACjG,SAAS;AACX,wEAAwE;GACtE,MAAM;AACR,4DAA4D;GAC1D,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,WAAW,EAAE,GAAG,CAAC;IACjB;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4FAA4F;IAC5F,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC/C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/balance-history/get-balance-history/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,oBAAY,iBAAiB;IAC3B,+CAA+C;IAC/C,OAAO,YAAY;IACnB,+CAA+C;IAC/C,QAAQ,aAAa;IACrB,kFAAkF;IAClF,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B,2DAA2D;IAC3D,GAAG,QAAQ;IACX,qBAAqB;IACrB,OAAO,YAAY;IACnB,6CAA6C;IAC7C,QAAQ,aAAa;CACtB;AAED;;;;;;;;;GASG;AACH,oBAAY,kBAAkB;IAC5B,8DAA8D;IAC9D,GAAG,QAAQ;IACX,sEAAsE;IACtE,MAAM,WAAW;IACjB,oFAAoF;IACpF,UAAU,gBAAgB;IAC1B,qEAAqE;IACrE,gBAAgB,sBAAsB;CACvC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB;AAC/B,mGAAmG;AACjG,SAAS;AACX,wEAAwE;GACtE,MAAM;AACR,4DAA4D;GAC1D,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,WAAW,EAAE,GAAG,CAAC;IACjB;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4FAA4F;IAC5F,kBAAkB,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC/C"}
@@ -4,7 +4,7 @@ var e = /* @__PURE__ */ function(e) {
4
4
  }({}), t = /* @__PURE__ */ function(e) {
5
5
  return e.All = "All", e.Deposit = "Deposit", e.Withdraw = "Withdraw", e;
6
6
  }({}), n = /* @__PURE__ */ function(e) {
7
- return e.Add = "ADD", e.Remove = "REMOVE", e.AutoReturn = "AUTO_RETURN", e;
7
+ return e.Add = "ADD", e.Remove = "REMOVE", e.AutoReturn = "AUTO_RETURN", e.EmergencyRecover = "EMERGENCY_RECOVER", e;
8
8
  }({});
9
9
  //#endregion
10
10
  export { e as BalanceChangeType, t as BalanceHistoryFilter, n as MarginTransferType };
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/balance-history/get-balance-history/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\n\n/**\n * Subgraph `BalanceChange.type` values for the collateral movements that make up\n * deposit / withdraw history.\n *\n * @remarks\n * Mirrors the `type` strings emitted by the SYMMIO analytics subgraph. The\n * subgraph also emits margin moves (`ALLOCATE` / `DEALLOCATE`); those are out of\n * scope for this slice and are never returned by {@link \"getBalanceHistory\"}.\n */\nexport enum BalanceChangeType {\n /** Collateral deposited into a sub-account. */\n Deposit = \"DEPOSIT\",\n /** Collateral withdrawn from a sub-account. */\n Withdraw = \"WITHDRAW\",\n /** A withdraw routed through a bridge (instant / CCTP). Treated as a withdraw. */\n Bridge = \"BRIDGE\",\n}\n\n/**\n * Filter selecting which movements a {@link \"getBalanceHistory\"} read returns.\n * Maps to the subgraph `type_in` clause via {@link \"balanceHistoryFilterToTypes\"}.\n */\nexport enum BalanceHistoryFilter {\n /** Deposits and withdraws (including bridge withdraws). */\n All = \"All\",\n /** Deposits only. */\n Deposit = \"Deposit\",\n /** Withdraws, including bridge withdraws. */\n Withdraw = \"Withdraw\",\n}\n\n/**\n * The kind of margin transfer an internal-transfer leg belongs to (subgraph\n * `BalanceChange.marginTransferType`). Present only on rows where\n * {@link BalanceHistoryRow.isInternalTransfer} is `true`.\n *\n * @remarks\n * A margin transfer moves collateral between a user's own SubAccount and one of\n * its Virtual Accounts; it expands into a cluster of primitive balance legs that\n * carry this tag (verified against the live analytics subgraph).\n */\nexport enum MarginTransferType {\n /** Funding a Virtual Account's margin from the SubAccount. */\n Add = \"ADD\",\n /** Pulling margin out of a Virtual Account back to the SubAccount. */\n Remove = \"REMOVE\",\n /** Margin automatically returned to the SubAccount (e.g. on close / deallocate). */\n AutoReturn = \"AUTO_RETURN\",\n}\n\n/**\n * How a {@link \"getBalanceHistory\"} read treats **internal margin-transfer legs**\n * — the `WITHDRAW` / `DEPOSIT` rows that are bookkeeping side effects of moving\n * margin between a user's own accounts, not real collateral movements in or out\n * of the protocol. Maps to the subgraph `isMarginTransferSideEffect` filter.\n *\n * @remarks\n * Orthogonal to {@link BalanceHistoryFilter} (which chooses deposit vs withdraw):\n * `filter` picks the direction, `internalTransfers` picks real-vs-transfer.\n */\nexport type InternalTransfersMode =\n /** Only genuine user deposits / withdrawals (`isMarginTransferSideEffect: false`). The default. */\n | \"exclude\"\n /** Only internal-transfer legs (`isMarginTransferSideEffect: true`). */\n | \"only\"\n /** Both — no constraint on `isMarginTransferSideEffect`. */\n | \"include\";\n\n/**\n * One settled collateral movement (deposit or withdraw) on a sub-account.\n *\n * @remarks\n * `amount` is a raw `bigint` in the **collateral token's decimals** (not 18) —\n * scale it with `config.getChainConfig(chainId).addresses.collateralDecimals`\n * (6 on Arbitrum) for display.\n */\nexport interface BalanceHistoryRow {\n /** Subgraph entity id (use as a stable row key). */\n id: string;\n /** Movement kind, decoded from the subgraph `type`. */\n type: BalanceChangeType;\n /** Amount, raw `bigint` in collateral decimals. */\n amount: bigint;\n /** The sub-account the movement belongs to. */\n account: Address;\n /** Block timestamp, unix seconds. */\n timestamp: number;\n /** Transaction hash of the movement. */\n transaction: Hex;\n /**\n * `true` when this row is an internal margin-transfer leg (a side effect of\n * moving margin between the user's own SubAccount and a Virtual Account) rather\n * than a real user deposit / withdrawal. Always `false` under the default\n * `internalTransfers: \"exclude\"`; only meaningful when transfers are included.\n */\n isInternalTransfer: boolean;\n /** The margin-transfer kind when {@link isInternalTransfer} is `true`; otherwise `null`. */\n marginTransferType: MarginTransferType | null;\n}\n"],"mappings":";AAWA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,UAAA,WAEA,EAAA,WAAA,YAEA,EAAA,SAAA;AACF,EAAA,CAAA,CAAA,GAMY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,UAAA,WAEA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,SAAA,UAEA,EAAA,aAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/balance-history/get-balance-history/types.ts"],"sourcesContent":["import type { Address, Hex } from \"viem\";\n\n/**\n * Subgraph `BalanceChange.type` values for the collateral movements that make up\n * deposit / withdraw history.\n *\n * @remarks\n * Mirrors the `type` strings emitted by the SYMMIO analytics subgraph. The\n * subgraph also emits margin moves (`ALLOCATE` / `DEALLOCATE`); those are out of\n * scope for this slice and are never returned by {@link \"getBalanceHistory\"}.\n */\nexport enum BalanceChangeType {\n /** Collateral deposited into a sub-account. */\n Deposit = \"DEPOSIT\",\n /** Collateral withdrawn from a sub-account. */\n Withdraw = \"WITHDRAW\",\n /** A withdraw routed through a bridge (instant / CCTP). Treated as a withdraw. */\n Bridge = \"BRIDGE\",\n}\n\n/**\n * Filter selecting which movements a {@link \"getBalanceHistory\"} read returns.\n * Maps to the subgraph `type_in` clause via {@link \"balanceHistoryFilterToTypes\"}.\n */\nexport enum BalanceHistoryFilter {\n /** Deposits and withdraws (including bridge withdraws). */\n All = \"All\",\n /** Deposits only. */\n Deposit = \"Deposit\",\n /** Withdraws, including bridge withdraws. */\n Withdraw = \"Withdraw\",\n}\n\n/**\n * The kind of margin transfer an internal-transfer leg belongs to (subgraph\n * `BalanceChange.marginTransferType`). Present only on rows where\n * {@link BalanceHistoryRow.isInternalTransfer} is `true`.\n *\n * @remarks\n * A margin transfer moves collateral between a user's own SubAccount and one of\n * its Virtual Accounts; it expands into a cluster of primitive balance legs that\n * carry this tag (verified against the live analytics subgraph).\n */\nexport enum MarginTransferType {\n /** Funding a Virtual Account's margin from the SubAccount. */\n Add = \"ADD\",\n /** Pulling margin out of a Virtual Account back to the SubAccount. */\n Remove = \"REMOVE\",\n /** Margin automatically returned to the SubAccount (e.g. on close / deallocate). */\n AutoReturn = \"AUTO_RETURN\",\n /** Margin recovered from a Virtual Account by the emergency path. */\n EmergencyRecover = \"EMERGENCY_RECOVER\",\n}\n\n/**\n * How a {@link \"getBalanceHistory\"} read treats **internal margin-transfer legs**\n * — the `WITHDRAW` / `DEPOSIT` rows that are bookkeeping side effects of moving\n * margin between a user's own accounts, not real collateral movements in or out\n * of the protocol. Maps to the subgraph `isMarginTransferSideEffect` filter.\n *\n * @remarks\n * Orthogonal to {@link BalanceHistoryFilter} (which chooses deposit vs withdraw):\n * `filter` picks the direction, `internalTransfers` picks real-vs-transfer.\n */\nexport type InternalTransfersMode =\n /** Only genuine user deposits / withdrawals (`isMarginTransferSideEffect: false`). The default. */\n | \"exclude\"\n /** Only internal-transfer legs (`isMarginTransferSideEffect: true`). */\n | \"only\"\n /** Both — no constraint on `isMarginTransferSideEffect`. */\n | \"include\";\n\n/**\n * One settled collateral movement (deposit or withdraw) on a sub-account.\n *\n * @remarks\n * `amount` is a raw `bigint` in the **collateral token's decimals** (not 18) —\n * scale it with `config.getChainConfig(chainId).addresses.collateralDecimals`\n * (6 on Arbitrum) for display.\n */\nexport interface BalanceHistoryRow {\n /** Subgraph entity id (use as a stable row key). */\n id: string;\n /** Movement kind, decoded from the subgraph `type`. */\n type: BalanceChangeType;\n /** Amount, raw `bigint` in collateral decimals. */\n amount: bigint;\n /** The sub-account the movement belongs to. */\n account: Address;\n /** Block timestamp, unix seconds. */\n timestamp: number;\n /** Transaction hash of the movement. */\n transaction: Hex;\n /**\n * `true` when this row is an internal margin-transfer leg (a side effect of\n * moving margin between the user's own SubAccount and a Virtual Account) rather\n * than a real user deposit / withdrawal. Always `false` under the default\n * `internalTransfers: \"exclude\"`; only meaningful when transfers are included.\n */\n isInternalTransfer: boolean;\n /** The margin-transfer kind when {@link isInternalTransfer} is `true`; otherwise `null`. */\n marginTransferType: MarginTransferType | null;\n}\n"],"mappings":";AAWA,IAAY,IAAL,yBAAA,GAAA;QAEL,EAAA,UAAA,WAEA,EAAA,WAAA,YAEA,EAAA,SAAA;AACF,EAAA,CAAA,CAAA,GAMY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,UAAA,WAEA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QAEL,EAAA,MAAA,OAEA,EAAA,SAAA,UAEA,EAAA,aAAA,eAEA,EAAA,mBAAA;AACF,EAAA,CAAA,CAAA"}
@@ -0,0 +1,50 @@
1
+ import { Address } from 'viem';
2
+ import { Config } from '../../core/config/index.js';
3
+ import { ChainIdParameter, Compute } from '../../shared/types/properties.js';
4
+ import { SubgraphPage, SubgraphPageParameters } from '../../symmio-subgraph/subgraph-filters.js';
5
+ import { FundingIndexCheckpointRow } from './types.js';
6
+ /**
7
+ * Parameters for {@link getFundingIndexCheckpoints}. Every filter is optional and
8
+ * applied only when passed; an empty list filter reads nothing.
9
+ */
10
+ export type GetFundingIndexCheckpointsParameters = Compute<ChainIdParameter & SubgraphPageParameters & {
11
+ /** The deployment's diamond address (the subgraph's `source`). */
12
+ source?: Address;
13
+ /** Market ids (`symbolId`). */
14
+ marketIds?: readonly number[];
15
+ /** PartyB (solver) addresses. */
16
+ partyBs?: readonly Address[];
17
+ /** Lower bound on the block timestamp (unix seconds, inclusive). */
18
+ startTime?: number;
19
+ /** Upper bound on the block timestamp (unix seconds, inclusive). */
20
+ endTime?: number;
21
+ }>;
22
+ /** Return type of {@link getFundingIndexCheckpoints}: one page of checkpoints. */
23
+ export type GetFundingIndexCheckpointsReturnType = SubgraphPage<FundingIndexCheckpointRow>;
24
+ /**
25
+ * Read `FundingIndexCheckpoint` entities — the funding-rate index of a market and
26
+ * PartyB at a point in time — from the analytics subgraph. One call returns one
27
+ * page; see {@link SubgraphPageParameters} for paging by cursor.
28
+ *
29
+ * @param config - The SDK config.
30
+ * @param parameters - Optional filters, paging, sort, chain id.
31
+ * @returns One page of decoded checkpoints.
32
+ * @throws {SymmError} when the chain has no analytics subgraph, `first` / `skip` is out of range, or `idGt`
33
+ * is passed with a sort other than `id` ascending (`INVALID_SUBGRAPH_CURSOR`).
34
+ * @throws {SymmApiError} when the subgraph request fails.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * // The latest checkpoint at or before a moment.
39
+ * const { rows } = await getFundingIndexCheckpoints(config, {
40
+ * source: "0xdiamond…",
41
+ * marketIds: [42],
42
+ * partyBs: ["0xsolver…"],
43
+ * endTime: openedAt,
44
+ * orderDirection: "desc",
45
+ * first: 1,
46
+ * });
47
+ * ```
48
+ */
49
+ export declare function getFundingIndexCheckpoints(config: Config, parameters?: GetFundingIndexCheckpointsParameters): Promise<GetFundingIndexCheckpointsReturnType>;
50
+ //# sourceMappingURL=get-funding-index-checkpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-funding-index-checkpoints.d.ts","sourceRoot":"","sources":["../../../src/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAC;AAIhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,oCAAoC,GAAG,OAAO,CACxD,gBAAgB,GACd,sBAAsB,GAAG;IACvB,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,iCAAiC;IACjC,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC7B,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CACJ,CAAC;AAEF,kFAAkF;AAClF,MAAM,MAAM,oCAAoC,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;AAE3F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,oCAAyC,GACpD,OAAO,CAAC,oCAAoC,CAAC,CAuB/C"}
@@ -0,0 +1,30 @@
1
+ import { querySubgraph as e } from "../../symmio-subgraph/query-subgraph/query-subgraph.js";
2
+ import { compactWhere as t, hasEmptyListFilter as n, lowercaseList as r, resolveSubgraphPage as i, stringList as a, toSubgraphPage as o } from "../../symmio-subgraph/subgraph-filters.js";
3
+ import { FundingIndexCheckpointsDocument as s } from "./query-document.js";
4
+ import { toFundingIndexCheckpointRow as c } from "./to-funding-index-checkpoint-row.js";
5
+ //#region src/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.ts
6
+ async function l(l, u = {}) {
7
+ let { chainId: d, source: f, marketIds: p, partyBs: m, startTime: h, endTime: g, idGt: _ } = u, v = i(u);
8
+ return n(p, m) ? {
9
+ rows: [],
10
+ hasMore: !1
11
+ } : o((await e(l, {
12
+ chainId: d,
13
+ document: s,
14
+ variables: {
15
+ where: t({
16
+ source: f?.toLowerCase(),
17
+ symbolId_in: a(p),
18
+ partyB_in: r(m),
19
+ timestamp_gte: h?.toString(),
20
+ timestamp_lte: g?.toString(),
21
+ id_gt: _
22
+ }),
23
+ ...v
24
+ }
25
+ })).fundingIndexCheckpoints.map(c), v.first);
26
+ }
27
+ //#endregion
28
+ export { l as getFundingIndexCheckpoints };
29
+
30
+ //# sourceMappingURL=get-funding-index-checkpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-funding-index-checkpoints.js","names":[],"sources":["../../../src/funding/get-funding-index-checkpoints/get-funding-index-checkpoints.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../shared/types/properties\";\nimport { querySubgraph } from \"../../symmio-subgraph/query-subgraph\";\nimport {\n compactWhere,\n hasEmptyListFilter,\n lowercaseList,\n resolveSubgraphPage,\n stringList,\n toSubgraphPage,\n type SubgraphPage,\n type SubgraphPageParameters,\n} from \"../../symmio-subgraph/subgraph-filters\";\nimport type { FundingIndexCheckpoint_Filter } from \"../../symmio-subgraph/types/generated/analytics/graphql\";\nimport { FundingIndexCheckpointsDocument } from \"./query-document\";\nimport { toFundingIndexCheckpointRow } from \"./to-funding-index-checkpoint-row\";\nimport type { FundingIndexCheckpointRow } from \"./types\";\n\n/**\n * Parameters for {@link getFundingIndexCheckpoints}. Every filter is optional and\n * applied only when passed; an empty list filter reads nothing.\n */\nexport type GetFundingIndexCheckpointsParameters = Compute<\n ChainIdParameter &\n SubgraphPageParameters & {\n /** The deployment's diamond address (the subgraph's `source`). */\n source?: Address;\n /** Market ids (`symbolId`). */\n marketIds?: readonly number[];\n /** PartyB (solver) addresses. */\n partyBs?: readonly Address[];\n /** Lower bound on the block timestamp (unix seconds, inclusive). */\n startTime?: number;\n /** Upper bound on the block timestamp (unix seconds, inclusive). */\n endTime?: number;\n }\n>;\n\n/** Return type of {@link getFundingIndexCheckpoints}: one page of checkpoints. */\nexport type GetFundingIndexCheckpointsReturnType = SubgraphPage<FundingIndexCheckpointRow>;\n\n/**\n * Read `FundingIndexCheckpoint` entities — the funding-rate index of a market and\n * PartyB at a point in time — from the analytics subgraph. One call returns one\n * page; see {@link SubgraphPageParameters} for paging by cursor.\n *\n * @param config - The SDK config.\n * @param parameters - Optional filters, paging, sort, chain id.\n * @returns One page of decoded checkpoints.\n * @throws {SymmError} when the chain has no analytics subgraph, `first` / `skip` is out of range, or `idGt`\n * is passed with a sort other than `id` ascending (`INVALID_SUBGRAPH_CURSOR`).\n * @throws {SymmApiError} when the subgraph request fails.\n *\n * @example\n * ```ts\n * // The latest checkpoint at or before a moment.\n * const { rows } = await getFundingIndexCheckpoints(config, {\n * source: \"0xdiamond…\",\n * marketIds: [42],\n * partyBs: [\"0xsolver…\"],\n * endTime: openedAt,\n * orderDirection: \"desc\",\n * first: 1,\n * });\n * ```\n */\nexport async function getFundingIndexCheckpoints(\n config: Config,\n parameters: GetFundingIndexCheckpointsParameters = {},\n): Promise<GetFundingIndexCheckpointsReturnType> {\n const { chainId, source, marketIds, partyBs, startTime, endTime, idGt } = parameters;\n const page = resolveSubgraphPage(parameters);\n\n if (hasEmptyListFilter(marketIds, partyBs)) return { rows: [], hasMore: false };\n\n const data = await querySubgraph(config, {\n chainId,\n document: FundingIndexCheckpointsDocument,\n variables: {\n where: compactWhere<FundingIndexCheckpoint_Filter>({\n source: source?.toLowerCase(),\n symbolId_in: stringList(marketIds),\n partyB_in: lowercaseList(partyBs),\n timestamp_gte: startTime?.toString(),\n timestamp_lte: endTime?.toString(),\n id_gt: idGt,\n }),\n ...page,\n },\n });\n\n return toSubgraphPage(data.fundingIndexCheckpoints.map(toFundingIndexCheckpointRow), page.first);\n}\n"],"mappings":";;;;;AAmEA,eAAsB,EACpB,GACA,IAAmD,CAAC,GACL;CAC/C,IAAM,EAAE,YAAS,WAAQ,cAAW,YAAS,cAAW,YAAS,YAAS,GACpE,IAAO,EAAoB,CAAU;CAoB3C,OAlBI,EAAmB,GAAW,CAAO,IAAU;EAAE,MAAM,CAAC;EAAG,SAAS;CAAM,IAkBvE,GAAe,MAhBH,EAAc,GAAQ;EACvC;EACA,UAAU;EACV,WAAW;GACT,OAAO,EAA4C;IACjD,QAAQ,GAAQ,YAAY;IAC5B,aAAa,EAAW,CAAS;IACjC,WAAW,EAAc,CAAO;IAChC,eAAe,GAAW,SAAS;IACnC,eAAe,GAAS,SAAS;IACjC,OAAO;GACT,CAAC;GACD,GAAG;EACL;CACF,CAAC,GAE0B,wBAAwB,IAAI,CAA2B,GAAG,EAAK,KAAK;AACjG"}
@@ -0,0 +1,5 @@
1
+ export * from './get-funding-index-checkpoints.js';
2
+ export * from './query.js';
3
+ export * from './to-funding-index-checkpoint-row.js';
4
+ export * from './types.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/funding/get-funding-index-checkpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,SAAS,CAAC;AACxB,cAAc,mCAAmC,CAAC;AAClD,cAAc,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Read `FundingIndexCheckpoint` entities — the funding-rate index of one market
3
+ * and PartyB at a point in time. Every filter (`source`, `symbolId_in`,
4
+ * `partyB_in`, the `timestamp` range, the `id_gt` cursor) travels in the
5
+ * action-built `$where`, present only when the caller passes it.
6
+ *
7
+ * The document compiles to a typed query string via graphql-codegen.
8
+ */
9
+ export declare const FundingIndexCheckpointsDocument: import('../../symmio-subgraph/types/generated/analytics/graphql.js').TypedDocumentString<import('../../symmio-subgraph/types/generated/analytics/graphql.js').FundingIndexCheckpointsQuery, {
10
+ where: import('../../symmio-subgraph/types/generated/analytics/graphql.js').FundingIndexCheckpoint_Filter;
11
+ first: number;
12
+ skip: number;
13
+ orderBy: import('../../symmio-subgraph/types/generated/analytics/graphql.js').FundingIndexCheckpoint_OrderBy;
14
+ orderDirection: import('../../symmio-subgraph/types/generated/analytics/graphql.js').OrderDirection;
15
+ }>;
16
+ //# sourceMappingURL=query-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-document.d.ts","sourceRoot":"","sources":["../../../src/funding/get-funding-index-checkpoints/query-document.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;;;;EAsC1C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { graphql as e } from "../../symmio-subgraph/types/generated/analytics/gql.js";
2
+ //#region src/funding/get-funding-index-checkpoints/query-document.ts
3
+ var t = e("\n query FundingIndexCheckpoints(\n $where: FundingIndexCheckpoint_filter!\n $first: Int!\n $skip: Int!\n $orderBy: FundingIndexCheckpoint_orderBy!\n $orderDirection: OrderDirection!\n ) {\n fundingIndexCheckpoints(\n first: $first\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n ) {\n id\n source\n symbolId\n partyB\n eventType\n rawLongRate\n rawShortRate\n marketPrice\n currentLongRate\n currentShortRate\n accumulatedLongRate\n accumulatedShortRate\n epochDuration\n lastUpdatedEpoch\n startEpoch\n startEpochTimestamp\n snapshotLongFee\n snapshotShortFee\n timestamp\n blockNumber\n transaction\n }\n }\n");
4
+ //#endregion
5
+ export { t as FundingIndexCheckpointsDocument };
6
+
7
+ //# sourceMappingURL=query-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-document.js","names":[],"sources":["../../../src/funding/get-funding-index-checkpoints/query-document.ts"],"sourcesContent":["import { graphql } from \"../../symmio-subgraph/types/generated/analytics\";\n\n/**\n * Read `FundingIndexCheckpoint` entities — the funding-rate index of one market\n * and PartyB at a point in time. Every filter (`source`, `symbolId_in`,\n * `partyB_in`, the `timestamp` range, the `id_gt` cursor) travels in the\n * action-built `$where`, present only when the caller passes it.\n *\n * The document compiles to a typed query string via graphql-codegen.\n */\nexport const FundingIndexCheckpointsDocument = graphql(`\n query FundingIndexCheckpoints(\n $where: FundingIndexCheckpoint_filter!\n $first: Int!\n $skip: Int!\n $orderBy: FundingIndexCheckpoint_orderBy!\n $orderDirection: OrderDirection!\n ) {\n fundingIndexCheckpoints(\n first: $first\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n ) {\n id\n source\n symbolId\n partyB\n eventType\n rawLongRate\n rawShortRate\n marketPrice\n currentLongRate\n currentShortRate\n accumulatedLongRate\n accumulatedShortRate\n epochDuration\n lastUpdatedEpoch\n startEpoch\n startEpochTimestamp\n snapshotLongFee\n snapshotShortFee\n timestamp\n blockNumber\n transaction\n }\n }\n`);\n"],"mappings":";;AAUA,IAAa,IAAkC,EAAQ,wyBAsCtD"}
@@ -0,0 +1,37 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { Compute, ConfigKeyParameter } from '../../shared/types/properties.js';
3
+ import { QueryParameter, SymmioQueryOptions } from '../../shared/types/query.js';
4
+ import { GetFundingIndexCheckpointsParameters, GetFundingIndexCheckpointsReturnType } from './get-funding-index-checkpoints.js';
5
+ /** Data resolved by the {@link getFundingIndexCheckpointsQueryOptions} query. */
6
+ export type GetFundingIndexCheckpointsData = GetFundingIndexCheckpointsReturnType;
7
+ /**
8
+ * Build the TanStack Query key for {@link getFundingIndexCheckpointsQueryOptions}.
9
+ *
10
+ * @param options - Query parameters (filters, paging, chain id, config key).
11
+ * @returns A stable, hashable query key; `bigint` filters are stringified.
12
+ */
13
+ export declare function getFundingIndexCheckpointsQueryKey(options: Compute<GetFundingIndexCheckpointsParameters & ConfigKeyParameter>): readonly ["getFundingIndexCheckpoints", Record<string, unknown>];
14
+ /** Query-key type produced by {@link getFundingIndexCheckpointsQueryKey}. */
15
+ export type GetFundingIndexCheckpointsQueryKey = ReturnType<typeof getFundingIndexCheckpointsQueryKey>;
16
+ /**
17
+ * Options accepted by {@link getFundingIndexCheckpointsQueryOptions}: the action's parameters
18
+ * plus TanStack overrides.
19
+ */
20
+ export type GetFundingIndexCheckpointsOptions = Compute<GetFundingIndexCheckpointsParameters & QueryParameter<GetFundingIndexCheckpointsData, Error, GetFundingIndexCheckpointsData, GetFundingIndexCheckpointsQueryKey>>;
21
+ /** TanStack Query options returned by {@link getFundingIndexCheckpointsQueryOptions}. */
22
+ export type GetFundingIndexCheckpointsQueryOptions = SymmioQueryOptions<GetFundingIndexCheckpointsData, Error, GetFundingIndexCheckpointsData, GetFundingIndexCheckpointsQueryKey>;
23
+ /**
24
+ * Build TanStack Query options for {@link getFundingIndexCheckpoints}. The query is disabled while
25
+ * any list filter is an empty array (it would match nothing).
26
+ *
27
+ * @param config - The SDK config.
28
+ * @param options - Query parameters and TanStack overrides.
29
+ * @returns Options to pass to `useQuery` / `queryClient.fetchQuery`.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * useQuery(getFundingIndexCheckpointsQueryOptions(config, { marketIds: [42], partyBs: ["0xsolver…"] }));
34
+ * ```
35
+ */
36
+ export declare function getFundingIndexCheckpointsQueryOptions(config: Config, options?: GetFundingIndexCheckpointsOptions): GetFundingIndexCheckpointsQueryOptions;
37
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/funding/get-funding-index-checkpoints/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAEL,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EAC1C,MAAM,iCAAiC,CAAC;AAEzC,iFAAiF;AACjF,MAAM,MAAM,8BAA8B,GAAG,oCAAoC,CAAC;AAElF;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,OAAO,CAAC,oCAAoC,GAAG,kBAAkB,CAAC,oEAG5E;AAED,6EAA6E;AAC7E,MAAM,MAAM,kCAAkC,GAAG,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEvG;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,oCAAoC,GAClC,cAAc,CACZ,8BAA8B,EAC9B,KAAK,EACL,8BAA8B,EAC9B,kCAAkC,CACnC,CACJ,CAAC;AAEF,yFAAyF;AACzF,MAAM,MAAM,sCAAsC,GAAG,kBAAkB,CACrE,8BAA8B,EAC9B,KAAK,EACL,8BAA8B,EAC9B,kCAAkC,CACnC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,iCAAsC,GAC9C,sCAAsC,CAWxC"}
@@ -0,0 +1,23 @@
1
+ import { filterQueryOptions as e } from "../../shared/utils/query.js";
2
+ import { hasEmptyListFilter as t } from "../../symmio-subgraph/subgraph-filters.js";
3
+ import { getFundingIndexCheckpoints as n } from "./get-funding-index-checkpoints.js";
4
+ //#region src/funding/get-funding-index-checkpoints/query.ts
5
+ function r(t) {
6
+ return ["getFundingIndexCheckpoints", e(t)];
7
+ }
8
+ function i(e, i = {}) {
9
+ let { query: a, ...o } = i;
10
+ return {
11
+ ...a,
12
+ queryKey: r({
13
+ ...o,
14
+ configKey: e.getChainConfigKey(o.chainId)
15
+ }),
16
+ enabled: (a?.enabled ?? !0) && !t(o.marketIds, o.partyBs),
17
+ queryFn: () => n(e, o)
18
+ };
19
+ }
20
+ //#endregion
21
+ export { r as getFundingIndexCheckpointsQueryKey, i as getFundingIndexCheckpointsQueryOptions };
22
+
23
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","names":[],"sources":["../../../src/funding/get-funding-index-checkpoints/query.ts"],"sourcesContent":["import type { Config } from \"../../core/config\";\nimport type { Compute, ConfigKeyParameter } from \"../../shared/types/properties\";\nimport type { QueryParameter, SymmioQueryOptions } from \"../../shared/types/query\";\nimport { filterQueryOptions } from \"../../shared/utils/query\";\nimport { hasEmptyListFilter } from \"../../symmio-subgraph/subgraph-filters\";\nimport {\n getFundingIndexCheckpoints,\n type GetFundingIndexCheckpointsParameters,\n type GetFundingIndexCheckpointsReturnType,\n} from \"./get-funding-index-checkpoints\";\n\n/** Data resolved by the {@link getFundingIndexCheckpointsQueryOptions} query. */\nexport type GetFundingIndexCheckpointsData = GetFundingIndexCheckpointsReturnType;\n\n/**\n * Build the TanStack Query key for {@link getFundingIndexCheckpointsQueryOptions}.\n *\n * @param options - Query parameters (filters, paging, chain id, config key).\n * @returns A stable, hashable query key; `bigint` filters are stringified.\n */\nexport function getFundingIndexCheckpointsQueryKey(\n options: Compute<GetFundingIndexCheckpointsParameters & ConfigKeyParameter>,\n) {\n return [\"getFundingIndexCheckpoints\", filterQueryOptions(options)] as const;\n}\n\n/** Query-key type produced by {@link getFundingIndexCheckpointsQueryKey}. */\nexport type GetFundingIndexCheckpointsQueryKey = ReturnType<typeof getFundingIndexCheckpointsQueryKey>;\n\n/**\n * Options accepted by {@link getFundingIndexCheckpointsQueryOptions}: the action's parameters\n * plus TanStack overrides.\n */\nexport type GetFundingIndexCheckpointsOptions = Compute<\n GetFundingIndexCheckpointsParameters &\n QueryParameter<\n GetFundingIndexCheckpointsData,\n Error,\n GetFundingIndexCheckpointsData,\n GetFundingIndexCheckpointsQueryKey\n >\n>;\n\n/** TanStack Query options returned by {@link getFundingIndexCheckpointsQueryOptions}. */\nexport type GetFundingIndexCheckpointsQueryOptions = SymmioQueryOptions<\n GetFundingIndexCheckpointsData,\n Error,\n GetFundingIndexCheckpointsData,\n GetFundingIndexCheckpointsQueryKey\n>;\n\n/**\n * Build TanStack Query options for {@link getFundingIndexCheckpoints}. The query is disabled while\n * any list filter is an empty array (it would match nothing).\n *\n * @param config - The SDK config.\n * @param options - Query parameters and TanStack overrides.\n * @returns Options to pass to `useQuery` / `queryClient.fetchQuery`.\n *\n * @example\n * ```ts\n * useQuery(getFundingIndexCheckpointsQueryOptions(config, { marketIds: [42], partyBs: [\"0xsolver…\"] }));\n * ```\n */\nexport function getFundingIndexCheckpointsQueryOptions(\n config: Config,\n options: GetFundingIndexCheckpointsOptions = {},\n): GetFundingIndexCheckpointsQueryOptions {\n const { query, ...parameters } = options;\n return {\n ...query,\n queryKey: getFundingIndexCheckpointsQueryKey({\n ...parameters,\n configKey: config.getChainConfigKey(parameters.chainId),\n }),\n enabled: (query?.enabled ?? true) && !hasEmptyListFilter(parameters.marketIds, parameters.partyBs),\n queryFn: () => getFundingIndexCheckpoints(config, parameters),\n };\n}\n"],"mappings":";;;;AAoBA,SAAgB,EACd,GACA;CACA,OAAO,CAAC,8BAA8B,EAAmB,CAAO,CAAC;AACnE;AAwCA,SAAgB,EACd,GACA,IAA6C,CAAC,GACN;CACxC,IAAM,EAAE,UAAO,GAAG,MAAe;CACjC,OAAO;EACL,GAAG;EACH,UAAU,EAAmC;GAC3C,GAAG;GACH,WAAW,EAAO,kBAAkB,EAAW,OAAO;EACxD,CAAC;EACD,UAAU,GAAO,WAAW,OAAS,CAAC,EAAmB,EAAW,WAAW,EAAW,OAAO;EACjG,eAAe,EAA2B,GAAQ,CAAU;CAC9D;AACF"}
@@ -0,0 +1,12 @@
1
+ import { FundingIndexCheckpointsQuery } from '../../symmio-subgraph/types/generated/analytics/graphql.js';
2
+ import { FundingIndexCheckpointRow } from './types.js';
3
+ /** A single `fundingIndexCheckpoints` entity as returned by the subgraph. */
4
+ export type RawFundingIndexCheckpointRow = FundingIndexCheckpointsQuery["fundingIndexCheckpoints"][number];
5
+ /**
6
+ * Decode one raw `fundingIndexCheckpoints` entity into a {@link FundingIndexCheckpointRow}.
7
+ *
8
+ * @param row - The raw entity.
9
+ * @returns The decoded row.
10
+ */
11
+ export declare function toFundingIndexCheckpointRow(row: RawFundingIndexCheckpointRow): FundingIndexCheckpointRow;
12
+ //# sourceMappingURL=to-funding-index-checkpoint-row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-funding-index-checkpoint-row.d.ts","sourceRoot":"","sources":["../../../src/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yDAAyD,CAAC;AAC5G,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,6EAA6E;AAC7E,MAAM,MAAM,4BAA4B,GAAG,4BAA4B,CAAC,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3G;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,4BAA4B,GAAG,yBAAyB,CAwBxG"}
@@ -0,0 +1,31 @@
1
+ import { toAddress as e, toBigIntOrNull as t, toBigIntOrZero as n, toHex as r, toNumberOrNull as i } from "../../symmio-subgraph/subgraph-decode.js";
2
+ //#region src/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.ts
3
+ function a(a) {
4
+ return {
5
+ id: a.id,
6
+ source: e(a.source),
7
+ symbolId: Number(a.symbolId),
8
+ partyB: e(a.partyB),
9
+ eventType: a.eventType,
10
+ rawLongRate: t(a.rawLongRate),
11
+ rawShortRate: t(a.rawShortRate),
12
+ marketPrice: t(a.marketPrice),
13
+ currentLongRate: t(a.currentLongRate),
14
+ currentShortRate: t(a.currentShortRate),
15
+ accumulatedLongRate: t(a.accumulatedLongRate),
16
+ accumulatedShortRate: t(a.accumulatedShortRate),
17
+ epochDuration: t(a.epochDuration),
18
+ lastUpdatedEpoch: t(a.lastUpdatedEpoch),
19
+ startEpoch: t(a.startEpoch),
20
+ startEpochTimestamp: i(a.startEpochTimestamp),
21
+ snapshotLongFee: t(a.snapshotLongFee),
22
+ snapshotShortFee: t(a.snapshotShortFee),
23
+ timestamp: Number(a.timestamp),
24
+ blockNumber: n(a.blockNumber),
25
+ transaction: r(a.transaction)
26
+ };
27
+ }
28
+ //#endregion
29
+ export { a as toFundingIndexCheckpointRow };
30
+
31
+ //# sourceMappingURL=to-funding-index-checkpoint-row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-funding-index-checkpoint-row.js","names":[],"sources":["../../../src/funding/get-funding-index-checkpoints/to-funding-index-checkpoint-row.ts"],"sourcesContent":["import {\n toAddress,\n toBigIntOrNull,\n toBigIntOrZero,\n toHex,\n toNumberOrNull,\n} from \"../../symmio-subgraph/subgraph-decode\";\nimport type { FundingIndexCheckpointsQuery } from \"../../symmio-subgraph/types/generated/analytics/graphql\";\nimport type { FundingIndexCheckpointRow } from \"./types\";\n\n/** A single `fundingIndexCheckpoints` entity as returned by the subgraph. */\nexport type RawFundingIndexCheckpointRow = FundingIndexCheckpointsQuery[\"fundingIndexCheckpoints\"][number];\n\n/**\n * Decode one raw `fundingIndexCheckpoints` entity into a {@link FundingIndexCheckpointRow}.\n *\n * @param row - The raw entity.\n * @returns The decoded row.\n */\nexport function toFundingIndexCheckpointRow(row: RawFundingIndexCheckpointRow): FundingIndexCheckpointRow {\n return {\n id: row.id,\n source: toAddress(row.source),\n symbolId: Number(row.symbolId),\n partyB: toAddress(row.partyB),\n eventType: row.eventType,\n rawLongRate: toBigIntOrNull(row.rawLongRate),\n rawShortRate: toBigIntOrNull(row.rawShortRate),\n marketPrice: toBigIntOrNull(row.marketPrice),\n currentLongRate: toBigIntOrNull(row.currentLongRate),\n currentShortRate: toBigIntOrNull(row.currentShortRate),\n accumulatedLongRate: toBigIntOrNull(row.accumulatedLongRate),\n accumulatedShortRate: toBigIntOrNull(row.accumulatedShortRate),\n epochDuration: toBigIntOrNull(row.epochDuration),\n lastUpdatedEpoch: toBigIntOrNull(row.lastUpdatedEpoch),\n startEpoch: toBigIntOrNull(row.startEpoch),\n startEpochTimestamp: toNumberOrNull(row.startEpochTimestamp),\n snapshotLongFee: toBigIntOrNull(row.snapshotLongFee),\n snapshotShortFee: toBigIntOrNull(row.snapshotShortFee),\n timestamp: Number(row.timestamp),\n blockNumber: toBigIntOrZero(row.blockNumber),\n transaction: toHex(row.transaction),\n };\n}\n"],"mappings":";;AAmBA,SAAgB,EAA4B,GAA8D;CACxG,OAAO;EACL,IAAI,EAAI;EACR,QAAQ,EAAU,EAAI,MAAM;EAC5B,UAAU,OAAO,EAAI,QAAQ;EAC7B,QAAQ,EAAU,EAAI,MAAM;EAC5B,WAAW,EAAI;EACf,aAAa,EAAe,EAAI,WAAW;EAC3C,cAAc,EAAe,EAAI,YAAY;EAC7C,aAAa,EAAe,EAAI,WAAW;EAC3C,iBAAiB,EAAe,EAAI,eAAe;EACnD,kBAAkB,EAAe,EAAI,gBAAgB;EACrD,qBAAqB,EAAe,EAAI,mBAAmB;EAC3D,sBAAsB,EAAe,EAAI,oBAAoB;EAC7D,eAAe,EAAe,EAAI,aAAa;EAC/C,kBAAkB,EAAe,EAAI,gBAAgB;EACrD,YAAY,EAAe,EAAI,UAAU;EACzC,qBAAqB,EAAe,EAAI,mBAAmB;EAC3D,iBAAiB,EAAe,EAAI,eAAe;EACnD,kBAAkB,EAAe,EAAI,gBAAgB;EACrD,WAAW,OAAO,EAAI,SAAS;EAC/B,aAAa,EAAe,EAAI,WAAW;EAC3C,aAAa,EAAM,EAAI,WAAW;CACpC;AACF"}
@@ -0,0 +1,51 @@
1
+ import { Address, Hex } from 'viem';
2
+ /**
3
+ * One `FundingIndexCheckpoint` entity: the funding-rate index of one market and
4
+ * PartyB at a point in time. Rates and fees are 18-decimal `bigint`; `null`
5
+ * marks a field the subgraph has not indexed for this checkpoint.
6
+ */
7
+ export interface FundingIndexCheckpointRow {
8
+ /** Subgraph entity id (stable; use as a row key or `idGt` cursor). */
9
+ id: string;
10
+ /** Diamond address the checkpoint was indexed from (the subgraph's `source`). */
11
+ source: Address;
12
+ /** Market id. */
13
+ symbolId: number;
14
+ /** PartyB (the solver). */
15
+ partyB: Address;
16
+ /** The event that wrote the checkpoint, as indexed. */
17
+ eventType: string;
18
+ /** Raw long rate, before the market-price conversion. */
19
+ rawLongRate: bigint | null;
20
+ /** Raw short rate, before the market-price conversion. */
21
+ rawShortRate: bigint | null;
22
+ /** Market price the rates were converted at. */
23
+ marketPrice: bigint | null;
24
+ /** Current long rate. */
25
+ currentLongRate: bigint | null;
26
+ /** Current short rate. */
27
+ currentShortRate: bigint | null;
28
+ /** Accumulated long rate (the index). */
29
+ accumulatedLongRate: bigint | null;
30
+ /** Accumulated short rate (the index). */
31
+ accumulatedShortRate: bigint | null;
32
+ /** Epoch length (seconds). */
33
+ epochDuration: bigint | null;
34
+ /** Last updated epoch. */
35
+ lastUpdatedEpoch: bigint | null;
36
+ /** First epoch. */
37
+ startEpoch: bigint | null;
38
+ /** First epoch's start (unix seconds), or `null`. */
39
+ startEpochTimestamp: number | null;
40
+ /** Long fee snapshot. */
41
+ snapshotLongFee: bigint | null;
42
+ /** Short fee snapshot. */
43
+ snapshotShortFee: bigint | null;
44
+ /** Block timestamp (unix seconds). */
45
+ timestamp: number;
46
+ /** Block number. */
47
+ blockNumber: bigint;
48
+ /** Transaction hash. */
49
+ transaction: Hex;
50
+ }
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/funding/get-funding-index-checkpoints/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,iFAAiF;IACjF,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,0DAA0D;IAC1D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gDAAgD;IAChD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yBAAyB;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,0BAA0B;IAC1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,yCAAyC;IACzC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,0CAA0C;IAC1C,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,8BAA8B;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,0BAA0B;IAC1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qDAAqD;IACrD,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,yBAAyB;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,0BAA0B;IAC1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,WAAW,EAAE,GAAG,CAAC;CAClB"}
@@ -0,0 +1,47 @@
1
+ import { Address } from 'viem';
2
+ import { Config } from '../../core/config/index.js';
3
+ import { ChainIdParameter, Compute } from '../../shared/types/properties.js';
4
+ import { SubgraphPage, SubgraphPageParameters } from '../../symmio-subgraph/subgraph-filters.js';
5
+ import { QuoteFundingSettlementRow } from './types.js';
6
+ /**
7
+ * Parameters for {@link getQuoteFundingSettlements}. Every filter is optional and
8
+ * applied only when passed; an empty list filter reads nothing.
9
+ */
10
+ export type GetQuoteFundingSettlementsParameters = Compute<ChainIdParameter & SubgraphPageParameters & {
11
+ /** On-chain quote ids. */
12
+ quoteIds?: readonly bigint[];
13
+ /** The deployment's diamond address (the subgraph's `source`). */
14
+ source?: Address;
15
+ /** PartyA accounts. */
16
+ partyAs?: readonly Address[];
17
+ /** Lower bound on the block timestamp (unix seconds, inclusive). */
18
+ startTime?: number;
19
+ /** Upper bound on the block timestamp (unix seconds, inclusive). */
20
+ endTime?: number;
21
+ }>;
22
+ /** Return type of {@link getQuoteFundingSettlements}: one page of settlements. */
23
+ export type GetQuoteFundingSettlementsReturnType = SubgraphPage<QuoteFundingSettlementRow>;
24
+ /**
25
+ * Read `QuoteFundingSettlement` entities — one per funding settlement on a
26
+ * quote — from the analytics subgraph. One call returns one page; see
27
+ * {@link SubgraphPageParameters} for paging by cursor.
28
+ *
29
+ * @param config - The SDK config.
30
+ * @param parameters - Optional filters, paging, sort, chain id.
31
+ * @returns One page of decoded settlements.
32
+ * @throws {SymmError} when the chain has no analytics subgraph, `first` / `skip` is out of range, or `idGt`
33
+ * is passed with a sort other than `id` ascending (`INVALID_SUBGRAPH_CURSOR`).
34
+ * @throws {SymmApiError} when the subgraph request fails.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * // One page of a quote's settlements in id order; pass the last row's id as idGt for the next.
39
+ * const { rows, hasMore } = await getQuoteFundingSettlements(config, {
40
+ * quoteIds: [7334n],
41
+ * orderBy: "id",
42
+ * orderDirection: "asc",
43
+ * });
44
+ * ```
45
+ */
46
+ export declare function getQuoteFundingSettlements(config: Config, parameters?: GetQuoteFundingSettlementsParameters): Promise<GetQuoteFundingSettlementsReturnType>;
47
+ //# sourceMappingURL=get-quote-funding-settlements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-quote-funding-settlements.d.ts","sourceRoot":"","sources":["../../../src/funding/get-quote-funding-settlements/get-quote-funding-settlements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAOL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAC;AAIhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,oCAAoC,GAAG,OAAO,CACxD,gBAAgB,GACd,sBAAsB,GAAG;IACvB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC7B,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CACJ,CAAC;AAEF,kFAAkF;AAClF,MAAM,MAAM,oCAAoC,GAAG,YAAY,CAAC,yBAAyB,CAAC,CAAC;AAE3F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,oCAAyC,GACpD,OAAO,CAAC,oCAAoC,CAAC,CAuB/C"}
@@ -0,0 +1,30 @@
1
+ import { querySubgraph as e } from "../../symmio-subgraph/query-subgraph/query-subgraph.js";
2
+ import { compactWhere as t, hasEmptyListFilter as n, lowercaseList as r, resolveSubgraphPage as i, stringList as a, toSubgraphPage as o } from "../../symmio-subgraph/subgraph-filters.js";
3
+ import { QuoteFundingSettlementsDocument as s } from "./query-document.js";
4
+ import { toQuoteFundingSettlementRow as c } from "./to-quote-funding-settlement-row.js";
5
+ //#region src/funding/get-quote-funding-settlements/get-quote-funding-settlements.ts
6
+ async function l(l, u = {}) {
7
+ let { chainId: d, quoteIds: f, source: p, partyAs: m, startTime: h, endTime: g, idGt: _ } = u, v = i(u);
8
+ return n(f, m) ? {
9
+ rows: [],
10
+ hasMore: !1
11
+ } : o((await e(l, {
12
+ chainId: d,
13
+ document: s,
14
+ variables: {
15
+ where: t({
16
+ quoteId_in: a(f),
17
+ source: p?.toLowerCase(),
18
+ partyA_in: r(m),
19
+ timestamp_gte: h?.toString(),
20
+ timestamp_lte: g?.toString(),
21
+ id_gt: _
22
+ }),
23
+ ...v
24
+ }
25
+ })).quoteFundingSettlements.map(c), v.first);
26
+ }
27
+ //#endregion
28
+ export { l as getQuoteFundingSettlements };
29
+
30
+ //# sourceMappingURL=get-quote-funding-settlements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-quote-funding-settlements.js","names":[],"sources":["../../../src/funding/get-quote-funding-settlements/get-quote-funding-settlements.ts"],"sourcesContent":["import type { Address } from \"viem\";\nimport type { Config } from \"../../core/config\";\nimport type { ChainIdParameter, Compute } from \"../../shared/types/properties\";\nimport { querySubgraph } from \"../../symmio-subgraph/query-subgraph\";\nimport {\n compactWhere,\n hasEmptyListFilter,\n lowercaseList,\n resolveSubgraphPage,\n stringList,\n toSubgraphPage,\n type SubgraphPage,\n type SubgraphPageParameters,\n} from \"../../symmio-subgraph/subgraph-filters\";\nimport type { QuoteFundingSettlement_Filter } from \"../../symmio-subgraph/types/generated/analytics/graphql\";\nimport { QuoteFundingSettlementsDocument } from \"./query-document\";\nimport { toQuoteFundingSettlementRow } from \"./to-quote-funding-settlement-row\";\nimport type { QuoteFundingSettlementRow } from \"./types\";\n\n/**\n * Parameters for {@link getQuoteFundingSettlements}. Every filter is optional and\n * applied only when passed; an empty list filter reads nothing.\n */\nexport type GetQuoteFundingSettlementsParameters = Compute<\n ChainIdParameter &\n SubgraphPageParameters & {\n /** On-chain quote ids. */\n quoteIds?: readonly bigint[];\n /** The deployment's diamond address (the subgraph's `source`). */\n source?: Address;\n /** PartyA accounts. */\n partyAs?: readonly Address[];\n /** Lower bound on the block timestamp (unix seconds, inclusive). */\n startTime?: number;\n /** Upper bound on the block timestamp (unix seconds, inclusive). */\n endTime?: number;\n }\n>;\n\n/** Return type of {@link getQuoteFundingSettlements}: one page of settlements. */\nexport type GetQuoteFundingSettlementsReturnType = SubgraphPage<QuoteFundingSettlementRow>;\n\n/**\n * Read `QuoteFundingSettlement` entities — one per funding settlement on a\n * quote — from the analytics subgraph. One call returns one page; see\n * {@link SubgraphPageParameters} for paging by cursor.\n *\n * @param config - The SDK config.\n * @param parameters - Optional filters, paging, sort, chain id.\n * @returns One page of decoded settlements.\n * @throws {SymmError} when the chain has no analytics subgraph, `first` / `skip` is out of range, or `idGt`\n * is passed with a sort other than `id` ascending (`INVALID_SUBGRAPH_CURSOR`).\n * @throws {SymmApiError} when the subgraph request fails.\n *\n * @example\n * ```ts\n * // One page of a quote's settlements in id order; pass the last row's id as idGt for the next.\n * const { rows, hasMore } = await getQuoteFundingSettlements(config, {\n * quoteIds: [7334n],\n * orderBy: \"id\",\n * orderDirection: \"asc\",\n * });\n * ```\n */\nexport async function getQuoteFundingSettlements(\n config: Config,\n parameters: GetQuoteFundingSettlementsParameters = {},\n): Promise<GetQuoteFundingSettlementsReturnType> {\n const { chainId, quoteIds, source, partyAs, startTime, endTime, idGt } = parameters;\n const page = resolveSubgraphPage(parameters);\n\n if (hasEmptyListFilter(quoteIds, partyAs)) return { rows: [], hasMore: false };\n\n const data = await querySubgraph(config, {\n chainId,\n document: QuoteFundingSettlementsDocument,\n variables: {\n where: compactWhere<QuoteFundingSettlement_Filter>({\n quoteId_in: stringList(quoteIds),\n source: source?.toLowerCase(),\n partyA_in: lowercaseList(partyAs),\n timestamp_gte: startTime?.toString(),\n timestamp_lte: endTime?.toString(),\n id_gt: idGt,\n }),\n ...page,\n },\n });\n\n return toSubgraphPage(data.quoteFundingSettlements.map(toQuoteFundingSettlementRow), page.first);\n}\n"],"mappings":";;;;;AAgEA,eAAsB,EACpB,GACA,IAAmD,CAAC,GACL;CAC/C,IAAM,EAAE,YAAS,aAAU,WAAQ,YAAS,cAAW,YAAS,YAAS,GACnE,IAAO,EAAoB,CAAU;CAoB3C,OAlBI,EAAmB,GAAU,CAAO,IAAU;EAAE,MAAM,CAAC;EAAG,SAAS;CAAM,IAkBtE,GAAe,MAhBH,EAAc,GAAQ;EACvC;EACA,UAAU;EACV,WAAW;GACT,OAAO,EAA4C;IACjD,YAAY,EAAW,CAAQ;IAC/B,QAAQ,GAAQ,YAAY;IAC5B,WAAW,EAAc,CAAO;IAChC,eAAe,GAAW,SAAS;IACnC,eAAe,GAAS,SAAS;IACjC,OAAO;GACT,CAAC;GACD,GAAG;EACL;CACF,CAAC,GAE0B,wBAAwB,IAAI,CAA2B,GAAG,EAAK,KAAK;AACjG"}
@@ -0,0 +1,5 @@
1
+ export * from './get-quote-funding-settlements.js';
2
+ export * from './query.js';
3
+ export * from './to-quote-funding-settlement-row.js';
4
+ export * from './types.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/funding/get-quote-funding-settlements/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,SAAS,CAAC;AACxB,cAAc,mCAAmC,CAAC;AAClD,cAAc,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Read `QuoteFundingSettlement` entities — one per funding settlement on a quote.
3
+ * Every filter (`quoteId_in`, `source`, `partyA_in`, the `timestamp` range, the
4
+ * `id_gt` cursor) travels in the action-built `$where`, present only when the
5
+ * caller passes it.
6
+ *
7
+ * The document compiles to a typed query string via graphql-codegen.
8
+ */
9
+ export declare const QuoteFundingSettlementsDocument: import('../../symmio-subgraph/types/generated/analytics/graphql.js').TypedDocumentString<import('../../symmio-subgraph/types/generated/analytics/graphql.js').QuoteFundingSettlementsQuery, {
10
+ where: import('../../symmio-subgraph/types/generated/analytics/graphql.js').QuoteFundingSettlement_Filter;
11
+ first: number;
12
+ skip: number;
13
+ orderBy: import('../../symmio-subgraph/types/generated/analytics/graphql.js').QuoteFundingSettlement_OrderBy;
14
+ orderDirection: import('../../symmio-subgraph/types/generated/analytics/graphql.js').OrderDirection;
15
+ }>;
16
+ //# sourceMappingURL=query-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-document.d.ts","sourceRoot":"","sources":["../../../src/funding/get-quote-funding-settlements/query-document.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;;;;EAwC1C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { graphql as e } from "../../symmio-subgraph/types/generated/analytics/gql.js";
2
+ //#region src/funding/get-quote-funding-settlements/query-document.ts
3
+ var t = e("\n query QuoteFundingSettlements(\n $where: QuoteFundingSettlement_filter!\n $first: Int!\n $skip: Int!\n $orderBy: QuoteFundingSettlement_orderBy!\n $orderDirection: OrderDirection!\n ) {\n quoteFundingSettlements(\n first: $first\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n ) {\n id\n source\n quoteId\n partyA\n partyB\n symbolId\n positionType\n trigger\n openAmount\n signedAmount\n paidByPartyA\n receivedByPartyA\n previousAccumulatedPaidFunding\n newAccumulatedPaidFunding\n fundingDeltaPerUnit\n previousLastFundingPaymentTimestamp\n newLastFundingPaymentTimestamp\n previousPaidThroughEpoch\n newPaidThroughEpoch\n balanceChanged\n timestamp\n blockNumber\n transaction\n }\n }\n");
4
+ //#endregion
5
+ export { t as QuoteFundingSettlementsDocument };
6
+
7
+ //# sourceMappingURL=query-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-document.js","names":[],"sources":["../../../src/funding/get-quote-funding-settlements/query-document.ts"],"sourcesContent":["import { graphql } from \"../../symmio-subgraph/types/generated/analytics\";\n\n/**\n * Read `QuoteFundingSettlement` entities — one per funding settlement on a quote.\n * Every filter (`quoteId_in`, `source`, `partyA_in`, the `timestamp` range, the\n * `id_gt` cursor) travels in the action-built `$where`, present only when the\n * caller passes it.\n *\n * The document compiles to a typed query string via graphql-codegen.\n */\nexport const QuoteFundingSettlementsDocument = graphql(`\n query QuoteFundingSettlements(\n $where: QuoteFundingSettlement_filter!\n $first: Int!\n $skip: Int!\n $orderBy: QuoteFundingSettlement_orderBy!\n $orderDirection: OrderDirection!\n ) {\n quoteFundingSettlements(\n first: $first\n skip: $skip\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n ) {\n id\n source\n quoteId\n partyA\n partyB\n symbolId\n positionType\n trigger\n openAmount\n signedAmount\n paidByPartyA\n receivedByPartyA\n previousAccumulatedPaidFunding\n newAccumulatedPaidFunding\n fundingDeltaPerUnit\n previousLastFundingPaymentTimestamp\n newLastFundingPaymentTimestamp\n previousPaidThroughEpoch\n newPaidThroughEpoch\n balanceChanged\n timestamp\n blockNumber\n transaction\n }\n }\n`);\n"],"mappings":";;AAUA,IAAa,IAAkC,EAAQ,o4BAwCtD"}
@@ -0,0 +1,37 @@
1
+ import { Config } from '../../core/config/index.js';
2
+ import { Compute, ConfigKeyParameter } from '../../shared/types/properties.js';
3
+ import { QueryParameter, SymmioQueryOptions } from '../../shared/types/query.js';
4
+ import { GetQuoteFundingSettlementsParameters, GetQuoteFundingSettlementsReturnType } from './get-quote-funding-settlements.js';
5
+ /** Data resolved by the {@link getQuoteFundingSettlementsQueryOptions} query. */
6
+ export type GetQuoteFundingSettlementsData = GetQuoteFundingSettlementsReturnType;
7
+ /**
8
+ * Build the TanStack Query key for {@link getQuoteFundingSettlementsQueryOptions}.
9
+ *
10
+ * @param options - Query parameters (filters, paging, chain id, config key).
11
+ * @returns A stable, hashable query key; `bigint` filters are stringified.
12
+ */
13
+ export declare function getQuoteFundingSettlementsQueryKey(options: Compute<GetQuoteFundingSettlementsParameters & ConfigKeyParameter>): readonly ["getQuoteFundingSettlements", Record<string, unknown>];
14
+ /** Query-key type produced by {@link getQuoteFundingSettlementsQueryKey}. */
15
+ export type GetQuoteFundingSettlementsQueryKey = ReturnType<typeof getQuoteFundingSettlementsQueryKey>;
16
+ /**
17
+ * Options accepted by {@link getQuoteFundingSettlementsQueryOptions}: the action's parameters
18
+ * plus TanStack overrides.
19
+ */
20
+ export type GetQuoteFundingSettlementsOptions = Compute<GetQuoteFundingSettlementsParameters & QueryParameter<GetQuoteFundingSettlementsData, Error, GetQuoteFundingSettlementsData, GetQuoteFundingSettlementsQueryKey>>;
21
+ /** TanStack Query options returned by {@link getQuoteFundingSettlementsQueryOptions}. */
22
+ export type GetQuoteFundingSettlementsQueryOptions = SymmioQueryOptions<GetQuoteFundingSettlementsData, Error, GetQuoteFundingSettlementsData, GetQuoteFundingSettlementsQueryKey>;
23
+ /**
24
+ * Build TanStack Query options for {@link getQuoteFundingSettlements}. The query is disabled while
25
+ * any list filter is an empty array (it would match nothing).
26
+ *
27
+ * @param config - The SDK config.
28
+ * @param options - Query parameters and TanStack overrides.
29
+ * @returns Options to pass to `useQuery` / `queryClient.fetchQuery`.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * useQuery(getQuoteFundingSettlementsQueryOptions(config, { quoteIds: [7334n] }));
34
+ * ```
35
+ */
36
+ export declare function getQuoteFundingSettlementsQueryOptions(config: Config, options?: GetQuoteFundingSettlementsOptions): GetQuoteFundingSettlementsQueryOptions;
37
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/funding/get-quote-funding-settlements/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAEL,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EAC1C,MAAM,iCAAiC,CAAC;AAEzC,iFAAiF;AACjF,MAAM,MAAM,8BAA8B,GAAG,oCAAoC,CAAC;AAElF;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,OAAO,CAAC,oCAAoC,GAAG,kBAAkB,CAAC,oEAG5E;AAED,6EAA6E;AAC7E,MAAM,MAAM,kCAAkC,GAAG,UAAU,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEvG;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,oCAAoC,GAClC,cAAc,CACZ,8BAA8B,EAC9B,KAAK,EACL,8BAA8B,EAC9B,kCAAkC,CACnC,CACJ,CAAC;AAEF,yFAAyF;AACzF,MAAM,MAAM,sCAAsC,GAAG,kBAAkB,CACrE,8BAA8B,EAC9B,KAAK,EACL,8BAA8B,EAC9B,kCAAkC,CACnC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,iCAAsC,GAC9C,sCAAsC,CAWxC"}