@symmio/trading-core 3.5.0 → 4.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 (161) hide show
  1. package/dist/gasless/delegation-preflight.d.ts +22 -0
  2. package/dist/gasless/delegation-preflight.d.ts.map +1 -1
  3. package/dist/gasless/delegation-preflight.js +34 -19
  4. package/dist/gasless/delegation-preflight.js.map +1 -1
  5. package/dist/index.d.ts +14 -4
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +248 -243
  8. package/dist/pools/index.d.ts +1 -0
  9. package/dist/pools/index.d.ts.map +1 -1
  10. package/dist/pools/markets/get-listing-markets.d.ts +2 -0
  11. package/dist/pools/markets/get-listing-markets.d.ts.map +1 -1
  12. package/dist/pools/markets/get-listing-markets.js +1 -0
  13. package/dist/pools/markets/get-listing-markets.js.map +1 -1
  14. package/dist/pools/markets/query.d.ts.map +1 -1
  15. package/dist/pools/markets/query.js +1 -0
  16. package/dist/pools/markets/query.js.map +1 -1
  17. package/dist/pools/markets/to-search-params.d.ts +1 -0
  18. package/dist/pools/markets/to-search-params.d.ts.map +1 -1
  19. package/dist/pools/markets/to-search-params.js +1 -1
  20. package/dist/pools/markets/to-search-params.js.map +1 -1
  21. package/dist/pools/token-price/get-token-price.d.ts +71 -0
  22. package/dist/pools/token-price/get-token-price.d.ts.map +1 -0
  23. package/dist/pools/token-price/get-token-price.js +30 -0
  24. package/dist/pools/token-price/get-token-price.js.map +1 -0
  25. package/dist/pools/token-price/index.d.ts +4 -0
  26. package/dist/pools/token-price/index.d.ts.map +1 -0
  27. package/dist/pools/token-price/query.d.ts +52 -0
  28. package/dist/pools/token-price/query.d.ts.map +1 -0
  29. package/dist/pools/token-price/query.js +29 -0
  30. package/dist/pools/token-price/query.js.map +1 -0
  31. package/dist/pools/token-price/to-token-price.d.ts +14 -0
  32. package/dist/pools/token-price/to-token-price.d.ts.map +1 -0
  33. package/dist/pools/token-price/to-token-price.js +8 -0
  34. package/dist/pools/token-price/to-token-price.js.map +1 -0
  35. package/dist/pools/transactions/get-pool-transactions.d.ts +59 -17
  36. package/dist/pools/transactions/get-pool-transactions.d.ts.map +1 -1
  37. package/dist/pools/transactions/get-pool-transactions.js +7 -4
  38. package/dist/pools/transactions/get-pool-transactions.js.map +1 -1
  39. package/dist/pools/transactions/query.d.ts +6 -2
  40. package/dist/pools/transactions/query.d.ts.map +1 -1
  41. package/dist/pools/transactions/query.js +12 -13
  42. package/dist/pools/transactions/query.js.map +1 -1
  43. package/dist/pools/transactions/to-pool-transaction.d.ts +7 -0
  44. package/dist/pools/transactions/to-pool-transaction.d.ts.map +1 -1
  45. package/dist/pools/transactions/to-pool-transaction.js +3 -1
  46. package/dist/pools/transactions/to-pool-transaction.js.map +1 -1
  47. package/dist/pools/types/generated/listing-backend.js +8 -8
  48. package/dist/pools/types/generated/listing-backend.js.map +1 -1
  49. package/dist/pools/types.d.ts +53 -10
  50. package/dist/pools/types.d.ts.map +1 -1
  51. package/dist/pools/types.js +6 -4
  52. package/dist/pools/types.js.map +1 -1
  53. package/dist/solvers/estimated-price/get-estimated-price.d.ts +2 -0
  54. package/dist/solvers/estimated-price/get-estimated-price.d.ts.map +1 -1
  55. package/dist/solvers/estimated-price/get-estimated-price.js +4 -1
  56. package/dist/solvers/estimated-price/get-estimated-price.js.map +1 -1
  57. package/dist/solvers/estimated-price/query.d.ts +6 -2
  58. package/dist/solvers/estimated-price/query.d.ts.map +1 -1
  59. package/dist/solvers/estimated-price/query.js +3 -2
  60. package/dist/solvers/estimated-price/query.js.map +1 -1
  61. package/dist/solvers/funding-info/adapters/enigma-funding-info.d.ts +4 -0
  62. package/dist/solvers/funding-info/adapters/enigma-funding-info.d.ts.map +1 -0
  63. package/dist/solvers/funding-info/adapters/enigma-funding-info.js +17 -0
  64. package/dist/solvers/funding-info/adapters/enigma-funding-info.js.map +1 -0
  65. package/dist/solvers/funding-info/adapters/rasa-funding-info.d.ts +4 -0
  66. package/dist/solvers/funding-info/adapters/rasa-funding-info.d.ts.map +1 -0
  67. package/dist/solvers/funding-info/adapters/rasa-funding-info.js +21 -0
  68. package/dist/solvers/funding-info/adapters/rasa-funding-info.js.map +1 -0
  69. package/dist/solvers/funding-info/get-funding-info.d.ts +22 -13
  70. package/dist/solvers/funding-info/get-funding-info.d.ts.map +1 -1
  71. package/dist/solvers/funding-info/get-funding-info.js +24 -12
  72. package/dist/solvers/funding-info/get-funding-info.js.map +1 -1
  73. package/dist/solvers/funding-info/query.d.ts +14 -6
  74. package/dist/solvers/funding-info/query.d.ts.map +1 -1
  75. package/dist/solvers/funding-info/query.js +1 -0
  76. package/dist/solvers/funding-info/query.js.map +1 -1
  77. package/dist/solvers/funding-info/to-funding-info.d.ts +8 -4
  78. package/dist/solvers/funding-info/to-funding-info.d.ts.map +1 -1
  79. package/dist/solvers/funding-info/to-funding-info.js +2 -1
  80. package/dist/solvers/funding-info/to-funding-info.js.map +1 -1
  81. package/dist/solvers/funding-info/types.d.ts +26 -4
  82. package/dist/solvers/funding-info/types.d.ts.map +1 -1
  83. package/dist/solvers/instant-close/instant-close/instant-close.d.ts +8 -1
  84. package/dist/solvers/instant-close/instant-close/instant-close.d.ts.map +1 -1
  85. package/dist/solvers/instant-close/instant-close/instant-close.js +40 -32
  86. package/dist/solvers/instant-close/instant-close/instant-close.js.map +1 -1
  87. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.d.ts +7 -1
  88. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.d.ts.map +1 -1
  89. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.js +48 -40
  90. package/dist/solvers/instant-close/instant-close-bulk/instant-close-bulk.js.map +1 -1
  91. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.d.ts +4 -2
  92. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.d.ts.map +1 -1
  93. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.js +1 -0
  94. package/dist/solvers/instant-close/instant-close-bulk-auto/instant-close-bulk-auto.js.map +1 -1
  95. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.d.ts +4 -2
  96. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.d.ts.map +1 -1
  97. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.js +2 -1
  98. package/dist/solvers/instant-close/prepare-instant-close-params/prepare-instant-close-params.js.map +1 -1
  99. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts +2 -0
  100. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.d.ts.map +1 -1
  101. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js +64 -56
  102. package/dist/solvers/instant-open/instant-open/adapters/enigma-instant-open.js.map +1 -1
  103. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.d.ts +2 -0
  104. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.d.ts.map +1 -1
  105. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js +51 -43
  106. package/dist/solvers/instant-open/instant-open/adapters/rasa-instant-open.js.map +1 -1
  107. package/dist/solvers/instant-open/instant-open/instant-open.d.ts +6 -0
  108. package/dist/solvers/instant-open/instant-open/instant-open.d.ts.map +1 -1
  109. package/dist/solvers/instant-open/instant-open/instant-open.js.map +1 -1
  110. package/dist/solvers/instant-open/instant-open/types.d.ts +2 -1
  111. package/dist/solvers/instant-open/instant-open/types.d.ts.map +1 -1
  112. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.d.ts +3 -1
  113. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.d.ts.map +1 -1
  114. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.js +2 -1
  115. package/dist/solvers/instant-open/prepare-instant-open-params/prepare-instant-open-params.js.map +1 -1
  116. package/dist/solvers/market-info/adapters/enigma-market-info.d.ts +3 -3
  117. package/dist/solvers/market-info/adapters/enigma-market-info.d.ts.map +1 -1
  118. package/dist/solvers/market-info/adapters/enigma-market-info.js +7 -5
  119. package/dist/solvers/market-info/adapters/enigma-market-info.js.map +1 -1
  120. package/dist/solvers/market-info/get-market-info.d.ts +3 -2
  121. package/dist/solvers/market-info/get-market-info.d.ts.map +1 -1
  122. package/dist/solvers/market-info/get-market-info.js.map +1 -1
  123. package/dist/solvers/market-info/types.d.ts +4 -3
  124. package/dist/solvers/market-info/types.d.ts.map +1 -1
  125. package/dist/solvers/notional-cap/get-notional-cap-all.d.ts +10 -10
  126. package/dist/solvers/notional-cap/get-notional-cap-all.d.ts.map +1 -1
  127. package/dist/solvers/notional-cap/get-notional-cap-all.js +26 -23
  128. package/dist/solvers/notional-cap/get-notional-cap-all.js.map +1 -1
  129. package/dist/solvers/notional-cap/get-notional-cap-page.d.ts +49 -0
  130. package/dist/solvers/notional-cap/get-notional-cap-page.d.ts.map +1 -0
  131. package/dist/solvers/notional-cap/get-notional-cap-page.js +37 -0
  132. package/dist/solvers/notional-cap/get-notional-cap-page.js.map +1 -0
  133. package/dist/solvers/notional-cap/index.d.ts +2 -0
  134. package/dist/solvers/notional-cap/index.d.ts.map +1 -1
  135. package/dist/solvers/notional-cap/query-page.d.ts +45 -0
  136. package/dist/solvers/notional-cap/query-page.d.ts.map +1 -0
  137. package/dist/solvers/notional-cap/query-page.js +26 -0
  138. package/dist/solvers/notional-cap/query-page.js.map +1 -0
  139. package/dist/solvers/shared/index.d.ts +1 -0
  140. package/dist/solvers/shared/index.d.ts.map +1 -1
  141. package/dist/solvers/shared/instant-delegation-preflight.d.ts +65 -0
  142. package/dist/solvers/shared/instant-delegation-preflight.d.ts.map +1 -0
  143. package/dist/solvers/shared/instant-delegation-preflight.js +34 -0
  144. package/dist/solvers/shared/instant-delegation-preflight.js.map +1 -0
  145. package/dist/solvers/symbols/get-symbols.d.ts +3 -2
  146. package/dist/solvers/symbols/get-symbols.d.ts.map +1 -1
  147. package/dist/solvers/symbols/get-symbols.js +17 -3
  148. package/dist/solvers/symbols/get-symbols.js.map +1 -1
  149. package/dist/solvers/trade-volume/get-trade-volume.d.ts +2 -1
  150. package/dist/solvers/trade-volume/get-trade-volume.d.ts.map +1 -1
  151. package/dist/solvers/trade-volume/get-trade-volume.js +6 -1
  152. package/dist/solvers/trade-volume/get-trade-volume.js.map +1 -1
  153. package/dist/solvers/trade-volume/to-daily-volume.d.ts +6 -6
  154. package/dist/solvers/trade-volume/to-daily-volume.js.map +1 -1
  155. package/dist/solvers/trade-volume/types.d.ts +4 -3
  156. package/dist/solvers/trade-volume/types.d.ts.map +1 -1
  157. package/dist/solvers/types/generated/enigma-solver.js +3 -3
  158. package/dist/solvers/types/generated/enigma-solver.js.map +1 -1
  159. package/dist/solvers/types/generated/rasa-solver.js +8 -2
  160. package/dist/solvers/types/generated/rasa-solver.js.map +1 -1
  161. package/package.json +3 -3
@@ -84,8 +84,29 @@ export declare enum ListingDepositChainId {
84
84
  BASE = 8453,
85
85
  SONIC = 146,
86
86
  ARBITRUM_ONE = 42161,
87
+ ROBINHOOD = 4663,
88
+ ARC = 5042,
87
89
  HYPER_EVM = 999
88
90
  }
91
+ /**
92
+ * Chains the listing backend's token-price endpoint accepts, keyed by the
93
+ * vendor's chain **name** — the `chain` input of `getTokenPrice`.
94
+ *
95
+ * This is a different key space from {@link ListingDepositChainId}: that enum
96
+ * is numeric (an EVM chain id, or the `0` sentinel for Solana) and names where
97
+ * a listing deposit lands; this one is a string name the price endpoint
98
+ * understands, and two of its members (`ROBINHOOD`, `ARC`) have no numeric
99
+ * twin at all. Do not cast between the two — pick the member explicitly.
100
+ */
101
+ export declare enum TokenPriceChain {
102
+ BASE = "BASE",
103
+ SOLANA = "SOLANA",
104
+ BSC = "BSC",
105
+ ARBITRUM_ONE = "ARBITRUM_ONE",
106
+ SONIC = "SONIC",
107
+ ROBINHOOD = "ROBINHOOD",
108
+ ARC = "ARC"
109
+ }
89
110
  /**
90
111
  * The same metric measured over each trailing window the listing service
91
112
  * reports.
@@ -359,6 +380,19 @@ export interface MarketDepositAddress {
359
380
  /** The market's listing lifecycle status. */
360
381
  marketStatus: ListingMarketStatus;
361
382
  }
383
+ /**
384
+ * A pre-listing price **estimate** for one token — the normalized result of
385
+ * the authed `/v2/market/token-price` endpoint, which asks the Price Service
386
+ * for a token that is not (yet) listed.
387
+ *
388
+ * The backend caches the figure for about five minutes and rate-limits the
389
+ * endpoint, so treat `price` as a display estimate, never as a mark or trade
390
+ * price: render it with a `~`, and do not poll for a fresher one.
391
+ */
392
+ export interface TokenPrice {
393
+ /** USD per token, as the service reports it — a plain float, always `> 0`. */
394
+ price: number;
395
+ }
362
396
  /**
363
397
  * The listing-pipeline status of a single market — the normalized result of
364
398
  * `getListingStatus`, keyed by the market's token address and deposit chain.
@@ -613,13 +647,18 @@ export declare enum PoolTransactionStatus {
613
647
  /**
614
648
  * One deposit or withdrawal against a pool.
615
649
  *
616
- * `amount`, `usdcAmount` and `tokenAmount` are `bigint` at
617
- * {@link LISTING_VALUE_DECIMALS}. The refund fields are populated only for a
618
- * refunded row.
650
+ * Each row names its own pool (`tokenAddress`, `chainId`), so a page read across
651
+ * every pool stays attributable row by row. `amount`, `usdcAmount` and
652
+ * `tokenAmount` are `bigint` at {@link LISTING_VALUE_DECIMALS}. The refund fields
653
+ * are populated only for a refunded row.
619
654
  */
620
655
  export interface PoolTransaction {
621
656
  /** Backend id for the transaction. */
622
657
  transactionId: string;
658
+ /** The pool's token contract address (EVM `0x…` or Solana base58) — the pool this row belongs to. */
659
+ tokenAddress: string;
660
+ /** The chain the pool's token lives on — not the chain the market trades on. */
661
+ chainId: ListingDepositChainId;
623
662
  /** The wallet that made it. */
624
663
  walletAddress: string;
625
664
  /** Amount moved, in the transaction's own denomination. */
@@ -643,22 +682,26 @@ export interface PoolTransaction {
643
682
  /** When the transaction happened, Unix **seconds**. */
644
683
  time: number;
645
684
  }
646
- /** One page of {@link PoolTransaction} rows for a pool. */
685
+ /** One page of {@link PoolTransaction} rows — one pool's, or every pool's when the read is not narrowed to a token. */
647
686
  export interface PoolTransactionPage {
648
- /** The pool's token contract address, echoed by the backend, or `null` when the history was not scoped to one pool. */
687
+ /**
688
+ * The token address the page was narrowed to, echoed by the backend in its canonical form, or `null` when the page
689
+ * spans every pool. Each row carries its own `tokenAddress` either way.
690
+ */
649
691
  marketAddress: string | null;
650
- /** Total rows matching the query across all pages. */
692
+ /** Total rows matching the query across all pages — what a pager divides, not `items.length`. */
651
693
  count: number;
652
- /** The rows themselves. */
694
+ /** The rows themselves, newest first. */
653
695
  items: PoolTransaction[];
654
696
  }
655
697
  /**
656
698
  * One row of the signed-in user's transaction history (`getUserTransactions`) —
657
699
  * a deposit or withdrawal they made, on any pool.
658
700
  *
659
- * Unlike {@link PoolTransaction} (one pool, every LP), this is one user, every
660
- * pool — so each row carries its own token identity (`tokenAddress`,
661
- * `tokenName`, `tokenTicker`, `tokenDecimals`, `chainId`).
701
+ * Unlike {@link PoolTransaction} (public, every LP), this is authed and scoped to
702
+ * one user, every pool — and each row carries the token's display metadata
703
+ * (`tokenName`, `tokenTicker`, `tokenDecimals`), not just its identity
704
+ * (`tokenAddress`, `chainId`).
662
705
  */
663
706
  export interface UserTransaction {
664
707
  /** Backend id for the transaction. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/pools/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,oBAAY,mBAAmB;IAC7B,mBAAmB,wBAAwB;IAC3C,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,gBAAgB;IAC1B,kBAAkB,uBAAuB;IACzC,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A2C;IAC3C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,yFAAyF;IACzF,aAAa,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,aAAa,EAAE,qBAAqB,CAAC;IACrC,oFAAoF;IACpF,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
@@ -4,15 +4,17 @@ var e = 18, t = /* @__PURE__ */ function(e) {
4
4
  }({}), n = /* @__PURE__ */ function(e) {
5
5
  return e.LIQUIDITY_EXPOSURE = "LIQUIDITY_EXPOSURE", e.LOW_TVL = "LOW_TVL", e.PRICE_UNAVAILABLE = "PRICE_UNAVAILABLE", e.SHORT_CIRCUIT = "SHORT_CIRCUIT", e.MANUAL = "MANUAL", e.UNKNOWN = "UNKNOWN", e;
6
6
  }({}), r = /* @__PURE__ */ function(e) {
7
- return e[e.SOLANA = 0] = "SOLANA", e[e.BSC = 56] = "BSC", e[e.BASE = 8453] = "BASE", e[e.SONIC = 146] = "SONIC", e[e.ARBITRUM_ONE = 42161] = "ARBITRUM_ONE", e[e.HYPER_EVM = 999] = "HYPER_EVM", e;
7
+ return e[e.SOLANA = 0] = "SOLANA", e[e.BSC = 56] = "BSC", e[e.BASE = 8453] = "BASE", e[e.SONIC = 146] = "SONIC", e[e.ARBITRUM_ONE = 42161] = "ARBITRUM_ONE", e[e.ROBINHOOD = 4663] = "ROBINHOOD", e[e.ARC = 5042] = "ARC", e[e.HYPER_EVM = 999] = "HYPER_EVM", e;
8
8
  }({}), i = /* @__PURE__ */ function(e) {
9
- return e.LONG = "long", e.SHORT = "short", e;
9
+ return e.BASE = "BASE", e.SOLANA = "SOLANA", e.BSC = "BSC", e.ARBITRUM_ONE = "ARBITRUM_ONE", e.SONIC = "SONIC", e.ROBINHOOD = "ROBINHOOD", e.ARC = "ARC", e;
10
10
  }({}), a = /* @__PURE__ */ function(e) {
11
- return e.DEPOSIT = "deposit", e.WITHDRAW = "withdraw", e;
11
+ return e.LONG = "long", e.SHORT = "short", e;
12
12
  }({}), o = /* @__PURE__ */ function(e) {
13
+ return e.DEPOSIT = "deposit", e.WITHDRAW = "withdraw", e;
14
+ }({}), s = /* @__PURE__ */ function(e) {
13
15
  return e.PENDING = "pending", e.SUCCESS = "success", e.REJECTED = "rejected", e.REFUND = "refund", e.CANCELED = "canceled", e;
14
16
  }({});
15
17
  //#endregion
16
- export { e as LISTING_VALUE_DECIMALS, r as ListingDepositChainId, t as ListingMarketStatus, n as MarketLockReason, i as PoolPositionSide, o as PoolTransactionStatus, a as PoolTransactionType };
18
+ export { e as LISTING_VALUE_DECIMALS, r as ListingDepositChainId, t as ListingMarketStatus, n as MarketLockReason, a as PoolPositionSide, s as PoolTransactionStatus, o as PoolTransactionType, i as TokenPriceChain };
17
19
 
18
20
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/pools/types.ts"],"sourcesContent":["import type { MarketStatus } from \"./types/generated/listing-backend\";\n\n/**\n * Fixed-point scale of every money and rate field the listing service returns.\n *\n * The service reports these as decimal **strings** at 18 decimals, regardless of\n * the token's own decimals or the collateral's (`\"1000000000000000000\"` = `1`).\n * The SDK keeps them as `bigint` at this scale so nothing is lost; format with\n * `formatUnits(value, LISTING_VALUE_DECIMALS)` from `@symmio/utils/decimal` at\n * the display edge.\n *\n * **What the descaled number means differs by field.** For money fields it is a\n * USD amount (`1e18` = `$1`). For rate fields it is **already a percentage**\n * (`1e18` = `1%`), *not* a fraction — do **not** multiply by 100 to render one.\n *\n * Verified against the live service: a pool with `tvl` `177.78` and `reward_24h`\n * `0.0055` annualizes to `1.1295%`, and its `apr_24h` descales to exactly\n * `1.1295`.\n */\nexport const LISTING_VALUE_DECIMALS = 18;\n\n/**\n * Lifecycle status of a market in the permissionless-listing service.\n *\n * The service — not the chain — owns this state machine. A market becomes\n * tradable only at {@link ListingMarketStatus.LISTED}; before that it has no\n * `symbolId` and no solver market behind it.\n *\n * - `WAITING_FOR_DEPOSIT` — application accepted, the listing deposit has not\n * landed at the custodial address yet.\n * - `UNDER_REVIEW` — deposit received, awaiting the operator's decision.\n * - `REJECTED` — the operator declined the listing; the deposit is refundable.\n * - `LISTED` — live and tradable; `symbolId` is assigned.\n * - `DELISTED` — was live, has since been withdrawn from trading.\n */\nexport enum ListingMarketStatus {\n WAITING_FOR_DEPOSIT = \"waiting_for_deposit\",\n UNDER_REVIEW = \"under_review\",\n REJECTED = \"rejected\",\n LISTED = \"listed\",\n DELISTED = \"delisted\",\n}\n\n/**\n * Why the inventory service has locked a market's pool against new deposits.\n *\n * A lock blocks deposits only: trading, withdrawals, claims and every other\n * flow stay available. It is also orthogonal to {@link ListingMarketStatus}: a\n * `LISTED` market can be locked, and the lock lifts without the lifecycle\n * status moving. The catalogue\n * row carries only the flag ({@link ListingMarket.isLocked}); the reasons are on\n * the detail read ({@link ListingMarketDetail.lockReasons}).\n *\n * - `LIQUIDITY_EXPOSURE` — locked on the service's liquidity-exposure limit.\n * - `LOW_TVL` — the pool's TVL is below the service's threshold.\n * - `PRICE_UNAVAILABLE` — the service has no price for the token.\n * - `SHORT_CIRCUIT` — the service's short-circuit guard tripped.\n * - `MANUAL` — an operator locked the market by hand.\n * - `UNKNOWN` — a reason this SDK release does not recognize. The mapper folds\n * every unrecognized wire value here rather than throwing, so a newer backend\n * cannot break the read.\n */\nexport enum MarketLockReason {\n LIQUIDITY_EXPOSURE = \"LIQUIDITY_EXPOSURE\",\n LOW_TVL = \"LOW_TVL\",\n PRICE_UNAVAILABLE = \"PRICE_UNAVAILABLE\",\n SHORT_CIRCUIT = \"SHORT_CIRCUIT\",\n MANUAL = \"MANUAL\",\n UNKNOWN = \"UNKNOWN\",\n}\n\n/**\n * Chains the listing service accepts a listing deposit on.\n *\n * This is the chain the **token** lives on and where its listing collateral was\n * deposited — it is **not** the chain the resulting market trades on. A market\n * whose token is on Solana or BSC still trades on the SYMMIO deployment the\n * listing service is configured for.\n *\n * `SOLANA = 0` is a sentinel the service uses for its one non-EVM chain, not a\n * real chain id: a `ListingMarket` on it carries a base58 `contractAddress`, so\n * never feed one to an EVM address helper without checking `chainId` first.\n */\nexport enum ListingDepositChainId {\n /** Sentinel for Solana — not an EVM chain id. Addresses are base58. */\n SOLANA = 0,\n BSC = 56,\n BASE = 8453,\n SONIC = 146,\n ARBITRUM_ONE = 42161,\n HYPER_EVM = 999,\n}\n\n/**\n * The same metric measured over each trailing window the listing service\n * reports.\n *\n * Every entry is a `bigint` at {@link LISTING_VALUE_DECIMALS}, or `null` when\n * the service has no value for that window — a young market has no 30-day\n * figure, and `null` means *absent*, never zero.\n */\nexport interface ListingTrailingWindows {\n /** Trailing 1 hour. */\n h1: bigint | null;\n /** Trailing 6 hours. */\n h6: bigint | null;\n /** Trailing 24 hours. */\n h24: bigint | null;\n /** Trailing 30 days. */\n d30: bigint | null;\n}\n\n/**\n * A metric the service reports over the trailing windows **and** since listing.\n *\n * Only the two APY series carry a lifetime column; APR does not, which is why\n * `lifetime` lives here rather than on {@link ListingTrailingWindows}.\n */\nexport interface ListingApyWindows extends ListingTrailingWindows {\n /** Since the market was listed. */\n lifetime: bigint | null;\n}\n\n/**\n * One market in the permissionless-listing catalog — a row of the pools list.\n *\n * Money and rate fields are `bigint` at {@link LISTING_VALUE_DECIMALS}; `null`\n * means the service reported no value, which is distinct from zero.\n */\nexport interface ListingMarket {\n /**\n * The listed token's contract address on {@link ListingMarket.chainId}.\n *\n * Typed as `string`, **not** viem's `Address`: Solana listings\n * (`chainId === ListingDepositChainId.SOLANA`) carry a base58 address that is\n * not 0x-prefixed. This is also the id used to address a single market in the\n * rest of the listing API.\n */\n contractAddress: string;\n /** Chain the token lives on and its listing deposit was made on. */\n chainId: ListingDepositChainId;\n /**\n * The solver market id this listing trades under, or `null` when it has none\n * yet. Assigned when the market reaches {@link ListingMarketStatus.LISTED};\n * everything downstream (prices, notional caps, quotes, subgraph rows) keys\n * off it, so a `null` here means the market is not tradable.\n */\n symbolId: number | null;\n /** Token ticker, e.g. `\"SYMM\"`. */\n tokenTicker: string;\n /** Token display name, e.g. `\"Symmio\"`. */\n tokenName: string;\n /** Maximum leverage the market allows, as a whole multiplier (`20` = 20x). */\n maxLeverage: number;\n /** Token market capitalization, in USD. */\n marketCap: bigint | null;\n /** Trailing 24-hour trading volume, in USD. */\n vol24h: bigint | null;\n /** Total value locked in the market's pool, in USD. */\n tvl: bigint | null;\n /** Notional the solver will still take on this market, in USD. */\n liquidity: bigint | null;\n /** Notional currently open on this market, in USD. */\n openInterest: bigint | null;\n /** LP rewards accrued over the trailing 24 hours, in USD. */\n reward24h: bigint | null;\n /** Headline APR: a percentage already (`1e18` = `1%`), not a fraction — render it without multiplying by 100. */\n apr: bigint | null;\n /**\n * APR broken out per trailing window, same units as {@link ListingMarket.apr}.\n * There is no lifetime APR — use {@link ListingMarket.apr} for the headline.\n */\n aprByWindow: ListingTrailingWindows;\n /** APY attributed to TVL growth, per window: a percentage already (`1e18` = `1%`), not a fraction — render it without multiplying by 100. */\n tvlDrivenApy: ListingApyWindows;\n /** APY attributed to token price movement, per window: a percentage already (`1e18` = `1%`), not a fraction — render it without multiplying by 100. */\n priceDrivenApy: ListingApyWindows;\n /** When the market went live, as a Unix timestamp in **seconds**. `null` before it is listed. */\n listingTime: number | null;\n /** Where the market sits in the listing lifecycle. */\n marketStatus: ListingMarketStatus;\n /**\n * Whether the inventory service currently has this market's pool locked\n * against new deposits. Only deposits are blocked; trading, withdrawals and\n * every other flow stay available. Independent of\n * {@link ListingMarket.marketStatus}: a `LISTED` market can be locked. The row\n * carries only the flag; the reasons are on\n * {@link ListingMarketDetail.lockReasons}.\n */\n isLocked: boolean;\n}\n\n/** One page of {@link ListingMarket} rows, with the totals needed to paginate. */\nexport interface ListingMarketPage {\n /** Total rows matching the query across all pages. */\n total: number;\n /** Page size the service applied. */\n limit: number;\n /** Row offset of this page. */\n offset: number;\n /** The rows themselves. */\n items: ListingMarket[];\n}\n\n/**\n * A {@link ListingMarket} enriched with the signed-in user's position in it — one\n * row of \"Your Pools\", the markets that generated a deposit address for the user.\n */\nexport interface UserListingMarket extends ListingMarket {\n /** The user's current deposit into this pool, in USD (18-dec bigint). `null` when the deposit address exists but nothing has been deposited yet. */\n userDeposit: bigint | null;\n /** The user's share of the pool, as a percentage number (not 18-dec scaled). */\n userSharePercentage: number;\n /** The user's accrued revenue from this pool, in USD (18-dec bigint), or `null` when absent. */\n userRevenue: bigint | null;\n}\n\n/** One page of {@link UserListingMarket} rows, with the totals needed to paginate. */\nexport interface UserListingMarketPage {\n /** Total rows matching the query across all pages. */\n total: number;\n /** Page size the service applied. */\n limit: number;\n /** Row offset of this page. */\n offset: number;\n /** The rows themselves. */\n items: UserListingMarket[];\n}\n\n/**\n * The signed-in user's LP position and profit in a single pool — the authed\n * per-token read behind a pool's \"your position\" panel.\n *\n * Every field is a `bigint` at {@link LISTING_VALUE_DECIMALS} (18), independent\n * of the token's or collateral's own decimals; format with\n * `formatUnits(value, LISTING_VALUE_DECIMALS)` at the display edge. An absent\n * figure is normalized to `0n`, not `null`.\n */\nexport interface UserPoolProfit {\n /** LP balance valued in the pool's token units, 18-dec bigint. */\n userBalanceInTokens: bigint;\n /** LP balance valued in USDC, 18-dec bigint USD. */\n userBalanceInUsdc: bigint;\n /** Rewards the user can claim now, 18-dec bigint USD. */\n claimableReward: bigint;\n /** Rewards already claimed, 18-dec bigint USD. */\n claimedReward: bigint;\n /** Token amount the user deposited, 18-dec bigint. */\n userDepositedTokenAmount: bigint;\n /** The user's LP shares, 18-dec bigint. */\n userLpAmount: bigint;\n /** LP shares queued for withdrawal (the pending-withdrawal amount), 18-dec bigint. */\n pendingWithdrawLpAmount: bigint;\n /**\n * LP shares free to withdraw right now — `userLpAmount − pendingWithdrawLpAmount`,\n * floored at `0n`. This is the ceiling a withdrawal (`withdrawLp`) may request;\n * the shares already counted in {@link UserPoolProfit.pendingWithdrawLpAmount}\n * are spoken for. Derived by the SDK, not a field the service returns. 18-dec\n * bigint.\n */\n availableLpAmount: bigint;\n}\n\n/**\n * The receipt returned by `claimProfit` — the outcome of a `/v2/claim` request.\n *\n * The claim is synchronous: a `200` means the USDC was moved to the target\n * sub-account. `amountClaimed` is the moved figure normalized to a `bigint` at\n * `LISTING_VALUE_DECIMALS` (18), `claimRequestId` references the claim in the\n * service, and `transactionHash` is the on-chain transfer hash when the service\n * has one (`null` otherwise).\n */\nexport interface PoolClaimResult {\n /** The service's status string, e.g. `\"ok\"`. */\n status: string;\n /** USDC moved to the sub-account, 18-dec bigint USD. */\n amountClaimed: bigint;\n /** Claim id — reference it to restore or look up the claim later. */\n claimRequestId: string;\n /** On-chain hash of the claim transfer, or `null` when the service has none yet. */\n transactionHash: string | null;\n}\n\n/**\n * One past pool-reward claim, from the user's claim history (`getClaimHistory`).\n *\n * The internal `wallet_id` / `market_id` UUIDs the service carries are dropped —\n * they address rows in the backend, not anything a consumer renders.\n */\nexport interface PoolClaim {\n /** Claim id — reference it to look the claim up in the service. */\n claimRequestId: string;\n /** Sub-account address that received the claimed USDC. */\n accountAddress: string;\n /** USDC claimed, 18-dec bigint USD. */\n amount: bigint;\n /** On-chain hash of the claim transfer, or `null` when the service has none. */\n transactionHash: string | null;\n /** When the claim was created, Unix **seconds**. */\n time: number;\n}\n\n/** One page of {@link PoolClaim} rows — the signed-in user's claim history. */\nexport interface PoolClaimHistoryPage {\n /** Total claims matching the query across all pages — what a pager divides. */\n count: number;\n /** The claims themselves, newest first. */\n items: PoolClaim[];\n}\n\n/**\n * The receipt returned by `cancelWithdraw` — the outcome of cancelling a queued\n * LP withdrawal.\n */\nexport interface PoolCancelWithdrawResult {\n /** The affected withdrawal's transaction id, echoed by the service. */\n transactionId: string;\n /**\n * The withdrawal's resulting status, e.g. `\"canceled\"`. Carried through as the\n * service's raw string — its enum (`canceled` | `pending` | `transferred` | …)\n * is a superset of {@link PoolTransactionStatus}, so it is not narrowed to it.\n */\n status: string;\n}\n\n/**\n * The receipt returned by `refundMarket` — the outcome of refunding a deposit on\n * a rejected market.\n */\nexport interface PoolRefundResult {\n /** On-chain hash of the refund transfer. */\n transactionHash: string;\n}\n\n/**\n * The signed-in user's **retry allowance** for one rejected market\n * (`getRetryListingInfo`) — how many listing retries remain and the cooldown\n * before the next.\n */\nexport interface RetryListingInfo {\n /** Maximum retries allowed per market. */\n retryLimit: number;\n /** Retries the user has left for this market. */\n remainingRetries: number;\n /** Seconds until the next retry is allowed, or `null` when no cooldown is in effect. */\n remainingCooldownSeconds: number | null;\n}\n\n/**\n * The result of `retryListing` — the retry allowance left after re-submitting a\n * rejected market.\n */\nexport interface RetryListingResult {\n /** Maximum retries allowed per market. */\n retryLimit: number;\n /** Retries left after this one. */\n remainingRetries: number;\n /** Seconds before the next retry is allowed. */\n cooldownSeconds: number;\n}\n\n/**\n * The signed-in user's deposit wallet for one market — the get-or-create result\n * of the authed `/v2/market/deposit-address` endpoint. This is the address the\n * user sends funds to in order to deposit into the market's pool.\n */\nexport interface MarketDepositAddress {\n /** The market's token contract address (EVM 0x… or Solana base58). */\n tokenContractAddress: string;\n /** The signed-in user this deposit wallet belongs to. */\n userAddress: string;\n /** The market's deposit chain. */\n depositChain: ListingDepositChainId;\n /** The deposit address — where the user sends funds to deposit into this market. `null` when the service returned none. */\n depositAddress: string | null;\n /** The token's on-chain decimals. */\n tokenDecimal: number;\n /** The market's listing lifecycle status. */\n marketStatus: ListingMarketStatus;\n}\n\n/**\n * The listing-pipeline status of a single market — the normalized result of\n * `getListingStatus`, keyed by the market's token address and deposit chain.\n *\n * `marketStatus` is the overall lifecycle status (the same machine as\n * {@link ListingMarketStatus}); the remaining fields describe where the listing\n * is in the backend's step pipeline and whether the current step is retrying or\n * has errored.\n */\nexport interface ListingStatus {\n /** Overall lifecycle status of the market, mapped from the service's `market_status`. */\n marketStatus: ListingMarketStatus;\n /** The step the listing pipeline is currently on, or `null` when it is not in a step. */\n currentStep: string | null;\n /** The ordered pipeline steps the listing moves through. */\n steps: string[];\n /** Error code reported for the current step, or `null` when there is no error. */\n errorCode: number | null;\n /** Human-readable detail for the current step's error, or `null`. */\n errorDetail: string | null;\n /** How many times the current step has been retried. */\n retryCount: number;\n /** The maximum retries allowed for the current step. */\n retryLimit: number;\n}\n\n/**\n * The protocol's global new-market listing cap for the current rolling weekly\n * window — how many pools may still be listed across the protocol before the\n * window resets.\n */\nexport interface WeeklyListingLimit {\n /** Total new-market listings allowed per rolling weekly window. */\n limit: number;\n /** Listings still available in the current window — `0` means no more pools can be listed until reset. */\n remaining: number;\n /** When the window resets, as the Unix timestamp the service returns (`reset_at`). */\n resetAt: number;\n}\n\n/**\n * Server-side sort keys accepted by `getListingMarkets`.\n *\n * Mirrors the service's `sort_by` enum verbatim — snake_case, not the SDK's\n * camelCase field names — because the value is a wire literal, and translating\n * it would break silently the moment the service adds a key.\n *\n * Note the two bare keys: `tvl_driven_apy` and `price_driven_apy` have no\n * matching bare response field. They sort by the **lifetime** column\n * (`tvl_driven_apy_lifetime` / `price_driven_apy_lifetime`).\n */\nexport type ListingMarketSortField =\n | \"liquidity\"\n | \"tvl\"\n | \"market_cap\"\n | \"vol24h\"\n | \"open_interest\"\n | \"apr_1h\"\n | \"apr_6h\"\n | \"apr_24h\"\n | \"apr_30d\"\n | \"reward_24h\"\n | \"apr\"\n | \"tvl_driven_apy_1h\"\n | \"tvl_driven_apy_6h\"\n | \"tvl_driven_apy_24h\"\n | \"tvl_driven_apy_30d\"\n | \"tvl_driven_apy\"\n | \"price_driven_apy_1h\"\n | \"price_driven_apy_6h\"\n | \"price_driven_apy_24h\"\n | \"price_driven_apy_30d\"\n | \"price_driven_apy\"\n | \"listing_time\";\n\n/** Sort direction. */\nexport type ListingSortDirection = \"asc\" | \"desc\";\n\n/**\n * An inclusive `[min, max]` bound on one of the service's value fields. Either\n * end may be omitted for a one-sided bound.\n *\n * Bounds use the **same 18-decimal scale as the response**\n * ({@link LISTING_VALUE_DECIMALS}), not the human-readable figure. Filtering for\n * \"market cap of at least one million USD\" is\n * `{ min: parseUnits(\"1000000\", LISTING_VALUE_DECIMALS) }`, not `{ min: 1_000_000 }`\n * — the latter is a bound of `0.000000000001` USD and silently matches nothing\n * useful. Verified against the live service.\n */\nexport interface ListingValueRange {\n /** Inclusive lower bound at 18 decimals (`__ge` on the wire). */\n min?: bigint;\n /** Inclusive upper bound at 18 decimals (`__le` on the wire). */\n max?: bigint;\n}\n\n/**\n * An inclusive `[min, max]` bound on a timestamp field, in Unix **seconds**\n * (not milliseconds, and not 18-decimal scaled).\n */\nexport interface ListingTimeRange {\n /** Inclusive lower bound, Unix seconds (`__ge` on the wire). */\n min?: number;\n /** Inclusive upper bound, Unix seconds (`__le` on the wire). */\n max?: number;\n}\n\n/**\n * Range filters `getListingMarkets` accepts. Every key is optional; omitted keys\n * are not sent.\n *\n * All {@link ListingValueRange} bounds are at {@link LISTING_VALUE_DECIMALS};\n * `listingTime` is the one exception and takes Unix seconds.\n */\nexport interface ListingMarketFilters {\n /** Token market capitalization, USD. */\n marketCap?: ListingValueRange;\n /** Trailing 24-hour volume, USD. */\n vol24h?: ListingValueRange;\n /** Total value locked, USD. */\n tvl?: ListingValueRange;\n /** Available notional, USD. */\n liquidity?: ListingValueRange;\n /** Open notional, USD. */\n openInterest?: ListingValueRange;\n /** Trailing 24-hour LP rewards, USD. */\n reward24h?: ListingValueRange;\n /** Headline APR bounds, at the field's own scale (`1e18` = `1%`). */\n apr?: ListingValueRange;\n /** APR over the trailing hour. */\n apr1h?: ListingValueRange;\n /** APR over the trailing 6 hours. */\n apr6h?: ListingValueRange;\n /** APR over the trailing 24 hours. */\n apr24h?: ListingValueRange;\n /** APR over the trailing 30 days. */\n apr30d?: ListingValueRange;\n /** TVL-driven APY over the trailing hour. */\n tvlDrivenApy1h?: ListingValueRange;\n /** TVL-driven APY over the trailing 6 hours. */\n tvlDrivenApy6h?: ListingValueRange;\n /** TVL-driven APY over the trailing 24 hours. */\n tvlDrivenApy24h?: ListingValueRange;\n /** TVL-driven APY over the trailing 30 days. */\n tvlDrivenApy30d?: ListingValueRange;\n /** TVL-driven APY over the market's lifetime. */\n tvlDrivenApy?: ListingValueRange;\n /** Price-driven APY over the trailing hour. */\n priceDrivenApy1h?: ListingValueRange;\n /** Price-driven APY over the trailing 6 hours. */\n priceDrivenApy6h?: ListingValueRange;\n /** Price-driven APY over the trailing 24 hours. */\n priceDrivenApy24h?: ListingValueRange;\n /** Price-driven APY over the trailing 30 days. */\n priceDrivenApy30d?: ListingValueRange;\n /** Price-driven APY over the market's lifetime. */\n priceDrivenApy?: ListingValueRange;\n /** Listing timestamp bounds, Unix seconds. */\n listingTime?: ListingTimeRange;\n}\n\n/**\n * Which side of the pool's book a {@link PoolPosition} row describes.\n *\n * The pool's inventory is reported as two aggregates, not a list of individual\n * trades — the detail read gives one long total and one short total.\n */\nexport enum PoolPositionSide {\n LONG = \"long\",\n SHORT = \"short\",\n}\n\n/**\n * One side of a pool's aggregate position book.\n *\n * Every figure is a `bigint` at {@link LISTING_VALUE_DECIMALS}. `upnl` is signed\n * — a losing side reports a negative value — and is the only field here that\n * routinely is.\n */\nexport interface PoolPosition {\n /** Which side this row aggregates. */\n side: PoolPositionSide;\n /** Total size held on this side, in the pool token's units. */\n size: bigint;\n /** Notional value of the side, in USD. */\n value: bigint;\n /** Size-weighted average open price of the side, in USD. */\n avgOpenPrice: bigint;\n /** Unrealized PnL of the side, in USD. Signed. */\n upnl: bigint;\n}\n\n/**\n * A pool's public detail — the aggregate stats and inventory position behind a\n * pool page.\n *\n * Money and rate fields are `bigint` at {@link LISTING_VALUE_DECIMALS}; recall\n * that a descaled *rate* is already a percentage (`1e18` = `1%`) while a\n * descaled *money* field is USD (`1e18` = `$1`). `null` means the backend\n * reported no value, which is not zero.\n *\n * A **delisted** pool is a documented special case: the backend returns cached\n * remaining token and USDC balances with `tvl` fixed at zero.\n */\nexport interface ListingMarketDetail {\n /** The pool's token contract address — its id in the listing API. */\n tokenContractAddress: string;\n /** Chain the token lives on and its listing deposit was made on. */\n depositChain: ListingDepositChainId;\n /** Token display name. */\n tokenName: string;\n /** Token ticker, or `null` when the backend has none. */\n tokenTicker: string | null;\n /** Token decimals. */\n tokenDecimal: number;\n /** Solver market id, or `null` when the pool is not tradable yet. */\n symbolId: number | null;\n /** Where the pool sits in the listing lifecycle. */\n marketStatus: ListingMarketStatus;\n /**\n * Whether the inventory service currently has this pool locked against new\n * deposits. Only deposits are blocked; trading, withdrawals and every other\n * flow stay available. Independent of {@link ListingMarketDetail.marketStatus}.\n * `false` when the backend reports no lock state, as it does for a delisted\n * pool.\n */\n isLocked: boolean;\n /**\n * Why the pool is locked, one entry per active reason; empty when it is not\n * locked. A reason this SDK release does not recognize arrives as\n * {@link MarketLockReason.UNKNOWN}.\n */\n lockReasons: MarketLockReason[];\n /** Maximum leverage the market allows, as a whole multiplier. */\n maxLeverage: number;\n /** Share of revenue routed to token buybacks, as a percentage (`50` = 50%). */\n buybackRatio: number;\n /** When the market went live, as a Unix timestamp in **seconds**. */\n listingTime: number | null;\n /** Pool age in **seconds**, or `null` before listing. */\n age: number | null;\n /** Number of distinct LPs in the pool. */\n activeLps: number;\n /** Total value locked in the pool, USD. `0` for a delisted pool by design. */\n tvl: bigint | null;\n /** Collateral held by the pool, USD. */\n totalUsdcInPool: bigint;\n /** Pool token held by the pool, in the token's own units. */\n totalTokenInPool: bigint;\n /** Accrued maintenance fees, USD. */\n maintenanceFees: bigint;\n /** LP rewards per window, USD. */\n rewards: ListingApyWindows;\n /** Solver revenue per window, USD. */\n solverRevenue: ListingApyWindows;\n /** Headline APY per window, as a percentage. */\n apy: ListingApyWindows;\n /** APY attributed to TVL growth, per window, as a percentage. */\n tvlDrivenApy: ListingApyWindows;\n /** APY attributed to token price movement, per window, as a percentage. */\n priceDrivenApy: ListingApyWindows;\n /** The pool's aggregate long side, or `null` when the backend reported none. */\n longPosition: PoolPosition | null;\n /** The pool's aggregate short side, or `null` when the backend reported none. */\n shortPosition: PoolPosition | null;\n}\n\n/** Whether a pool transaction is money going in or coming out. */\nexport enum PoolTransactionType {\n DEPOSIT = \"deposit\",\n WITHDRAW = \"withdraw\",\n}\n\n/**\n * Where a pool transaction sits in its lifecycle, as the backend reports it to\n * users.\n */\nexport enum PoolTransactionStatus {\n PENDING = \"pending\",\n SUCCESS = \"success\",\n REJECTED = \"rejected\",\n REFUND = \"refund\",\n CANCELED = \"canceled\",\n}\n\n/**\n * One deposit or withdrawal against a pool.\n *\n * `amount`, `usdcAmount` and `tokenAmount` are `bigint` at\n * {@link LISTING_VALUE_DECIMALS}. The refund fields are populated only for a\n * refunded row.\n */\nexport interface PoolTransaction {\n /** Backend id for the transaction. */\n transactionId: string;\n /** The wallet that made it. */\n walletAddress: string;\n /** Amount moved, in the transaction's own denomination. */\n amount: bigint;\n /** Collateral value moved, USD. */\n usdcAmount: bigint;\n /** Token amount moved, in the pool token's units. */\n tokenAmount: bigint;\n /** On-chain transaction hash or Solana signature, when known. */\n transactionHash: string | null;\n /** Address a refund was sent to, or `null` when this is not a refund. */\n refundAddress: string | null;\n /** Hash of the refund transaction, or `null` when this is not a refund. */\n refundTransactionHash: string | null;\n /** When the refund completed, Unix **seconds**; `null` when not a refund. */\n refundTime: number | null;\n /** Deposit or withdrawal. */\n type: PoolTransactionType;\n /** Lifecycle status. */\n status: PoolTransactionStatus;\n /** When the transaction happened, Unix **seconds**. */\n time: number;\n}\n\n/** One page of {@link PoolTransaction} rows for a pool. */\nexport interface PoolTransactionPage {\n /** The pool's token contract address, echoed by the backend, or `null` when the history was not scoped to one pool. */\n marketAddress: string | null;\n /** Total rows matching the query across all pages. */\n count: number;\n /** The rows themselves. */\n items: PoolTransaction[];\n}\n\n/**\n * One row of the signed-in user's transaction history (`getUserTransactions`) —\n * a deposit or withdrawal they made, on any pool.\n *\n * Unlike {@link PoolTransaction} (one pool, every LP), this is one user, every\n * pool — so each row carries its own token identity (`tokenAddress`,\n * `tokenName`, `tokenTicker`, `tokenDecimals`, `chainId`).\n */\nexport interface UserTransaction {\n /** Backend id for the transaction. */\n transactionId: string;\n /** Deposit or withdrawal. */\n type: PoolTransactionType;\n /** Lifecycle status. */\n status: PoolTransactionStatus;\n /** Amount moved, 18-dec bigint (a 1e18-scaled figure, like every listing value). */\n amount: bigint;\n /** The token's own decimals, as reported by the service — metadata, not the `amount` scale. */\n tokenDecimals: number;\n /** The pool's token contract address (EVM `0x…` or Solana base58). */\n tokenAddress: string;\n /** The token's name. */\n tokenName: string;\n /** The token's ticker. */\n tokenTicker: string;\n /** The chain the transaction's token lives on. */\n chainId: ListingDepositChainId;\n /** The temporary deposit wallet involved, or `null` when the service omits it. */\n wallet: string | null;\n /** Address a refund was sent to, or `null` when this is not a refund. */\n refundAddress: string | null;\n /** On-chain transaction hash or Solana signature, when known. */\n transactionHash: string | null;\n /** When the transaction happened, Unix **seconds**; `null` when the service omits it. */\n time: number | null;\n}\n\n/** One page of {@link UserTransaction} rows — the signed-in user's transaction history. */\nexport interface UserTransactionPage {\n /** Total rows matching the query across all pages — what a pager divides. */\n count: number;\n /** The rows themselves, newest first. */\n items: UserTransaction[];\n}\n\n/**\n * The generated `MarketStatus` enum and {@link ListingMarketStatus} carry the\n * same string values; this alias documents that the cast in the mapper is\n * value-preserving rather than a widening.\n *\n * @internal\n */\nexport type GeneratedMarketStatus = MarketStatus;\n\n/**\n * One deposit chain a new listing may use, from the listing service's public\n * config ({@link ListingConfig.supportedDepositChains}).\n */\nexport interface ListingDepositChain {\n /** Numeric chain id to send with market/deposit requests. */\n chainId: ListingDepositChainId;\n /** Human-readable chain name, e.g. \"HyperEVM\". */\n chainName: string;\n}\n\n/**\n * The client mutation limits the listing service enforces, from its public\n * config ({@link ListingConfig.rateLimits}).\n */\nexport interface ListingRateLimits {\n /** Max successful market-config updates per user+market in a rolling 24h window. */\n marketConfigUpdatesPerDay: number;\n /** Max successful profit claims per user+market in a rolling 24h window. */\n profitClaimsPerDay: number;\n}\n\n/**\n * The listing service's public client configuration — the deposit guidance,\n * listing fee, supported deposit chains, rate limits, and protocol reward share\n * a create-listing flow needs.\n *\n * The three USDC figures are `bigint` at {@link LISTING_VALUE_DECIMALS} (18),\n * independent of the collateral token's own decimals; format them with\n * `formatUnits(value, LISTING_VALUE_DECIMALS)` at the display edge.\n */\nexport interface ListingConfig {\n /** Recommended initial USDC deposit to start a listing, USD at LISTING_VALUE_DECIMALS (18) as a bigint. */\n recommendedInitialDepositUsdc: bigint;\n /** Minimum accepted initial USDC deposit after slippage, USD 18-dec bigint. */\n minimumInitialDepositUsdc: bigint;\n /** Listing fee in USDC, USD 18-dec bigint. */\n listingFeeUsdc: bigint;\n /** Deposit chains new markets may use — the source of truth for a chain picker. */\n supportedDepositChains: ListingDepositChain[];\n /** Rolling-24h client mutation limits. */\n rateLimits: ListingRateLimits;\n /** Whole-percent of market revenue to the protocol before buyback/LP. */\n protocolRewardSharePercent: number;\n}\n\n/**\n * One quote in a pool's book, decoded from the analytics subgraph.\n *\n * A pool's book is **every trader's** quotes on that market, not one account's —\n * `partyA` differs from row to row. Amounts and prices are `bigint` at 18\n * decimals (the protocol's own scale, not the listing backend's), and `null`\n * means the subgraph had no value for that field.\n */\nexport interface PoolQuote {\n /** Subgraph row id (`{quoteId}-{source}`); stable, use as a table key. */\n id: string;\n /** Protocol quote id. */\n quoteId: bigint;\n /** Raw `QuoteStatus` ordinal as the subgraph reports it. */\n quoteStatus: number | null;\n /** Raw `PositionType` ordinal — `0` long, `1` short. */\n positionType: number | null;\n /** Raw `OrderType` ordinal of the open — `0` limit, `1` market. */\n orderTypeOpen: number | null;\n /** Market ticker, when the subgraph carries one. */\n symbol: string | null;\n /** Solver market id. */\n symbolId: number | null;\n /** The account that opened the quote. */\n partyA: string;\n /** The solver that took the other side. */\n partyB: string | null;\n /** Quote size. */\n quantity: bigint | null;\n /** How much of {@link PoolQuote.quantity} has been closed. */\n closedAmount: bigint | null;\n /** Size of an in-flight close request. */\n quantityToClose: bigint | null;\n /** Price the quote actually opened at. */\n openedPrice: bigint | null;\n /** Price the opener asked for. */\n requestedOpenPrice: bigint | null;\n /** Size-weighted average of the closes so far. */\n averageClosedPrice: bigint | null;\n /** Price of an in-flight close request. */\n closePrice: bigint | null;\n /** Open price before any modification. */\n initialOpenedPrice: bigint | null;\n /** Size liquidated, when the quote was liquidated. */\n liquidateAmount: bigint | null;\n /** Price the liquidation executed at. */\n liquidatePrice: bigint | null;\n /** Block timestamp of the quote's last update, Unix **seconds**. */\n timestamp: number;\n /** Block the quote was last updated in. */\n blockNumber: bigint;\n}\n\n/**\n * One day of LP reward for a pool.\n *\n * A series of these is what a pool page's rewards chart plots — the public\n * per-pool series from `getPoolRewardChart`, or one market's slice of the\n * signed-in user's {@link UserPoolRewardChart}.\n */\nexport interface PoolRewardPoint {\n /** Start of the reward day, unix **seconds**. */\n timestamp: number;\n /**\n * Reward earned that day, `bigint` at {@link LISTING_VALUE_DECIMALS} (18).\n *\n * A **money** field, so the descaled number is a USD amount (`1e18` = `$1`) —\n * unlike the catalog's rate fields, which are already percentages. A day the\n * service reports as absent collapses to `0n` rather than `null`: a missing\n * snapshot and a zero-reward day are the same point on a chart.\n */\n reward: bigint;\n}\n\n/**\n * The signed-in user's daily reward series for **one** market, as returned by\n * `getUserRewardChart` — which reports every market the user has rewards in,\n * one entry each.\n *\n * A market is addressed by the pair `(marketAddress, marketChainId)`, matching\n * {@link ListingMarket.contractAddress} and {@link ListingMarket.chainId}. Note\n * `marketChainId` is the chain the **token** lives on, not the SYMMIO chain the\n * market trades on.\n */\nexport interface UserPoolRewardChart {\n /** The pool's token contract address — matches {@link ListingMarket.contractAddress}. */\n marketAddress: string;\n /** Chain the token lives on — matches {@link ListingMarket.chainId}. */\n marketChainId: ListingDepositChainId;\n /** The user's daily rewards in this pool, in the order the service returns them. */\n rewards: PoolRewardPoint[];\n}\n"],"mappings":";AAmBA,IAAa,IAAyB,IAgB1B,IAAL,yBAAA,GAAA;QACL,EAAA,sBAAA,uBACA,EAAA,eAAA,gBACA,EAAA,WAAA,YACA,EAAA,SAAA,UACA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAqBY,IAAL,yBAAA,GAAA;QACL,EAAA,qBAAA,sBACA,EAAA,UAAA,WACA,EAAA,oBAAA,qBACA,EAAA,gBAAA,iBACA,EAAA,SAAA,UACA,EAAA,UAAA;AACF,EAAA,CAAA,CAAA,GAcY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,SAAA,KAAA,UACA,EAAA,EAAA,MAAA,MAAA,OACA,EAAA,EAAA,OAAA,QAAA,QACA,EAAA,EAAA,QAAA,OAAA,SACA,EAAA,EAAA,eAAA,SAAA,gBACA,EAAA,EAAA,YAAA,OAAA;AACF,EAAA,CAAA,CAAA,GAycY,IAAL,yBAAA,GAAA;QACL,EAAA,OAAA,QACA,EAAA,QAAA;AACF,EAAA,CAAA,CAAA,GAkGY,IAAL,yBAAA,GAAA;QACL,EAAA,UAAA,WACA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAMY,IAAL,yBAAA,GAAA;QACL,EAAA,UAAA,WACA,EAAA,UAAA,WACA,EAAA,WAAA,YACA,EAAA,SAAA,UACA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/pools/types.ts"],"sourcesContent":["import type { MarketStatus } from \"./types/generated/listing-backend\";\n\n/**\n * Fixed-point scale of every money and rate field the listing service returns.\n *\n * The service reports these as decimal **strings** at 18 decimals, regardless of\n * the token's own decimals or the collateral's (`\"1000000000000000000\"` = `1`).\n * The SDK keeps them as `bigint` at this scale so nothing is lost; format with\n * `formatUnits(value, LISTING_VALUE_DECIMALS)` from `@symmio/utils/decimal` at\n * the display edge.\n *\n * **What the descaled number means differs by field.** For money fields it is a\n * USD amount (`1e18` = `$1`). For rate fields it is **already a percentage**\n * (`1e18` = `1%`), *not* a fraction — do **not** multiply by 100 to render one.\n *\n * Verified against the live service: a pool with `tvl` `177.78` and `reward_24h`\n * `0.0055` annualizes to `1.1295%`, and its `apr_24h` descales to exactly\n * `1.1295`.\n */\nexport const LISTING_VALUE_DECIMALS = 18;\n\n/**\n * Lifecycle status of a market in the permissionless-listing service.\n *\n * The service — not the chain — owns this state machine. A market becomes\n * tradable only at {@link ListingMarketStatus.LISTED}; before that it has no\n * `symbolId` and no solver market behind it.\n *\n * - `WAITING_FOR_DEPOSIT` — application accepted, the listing deposit has not\n * landed at the custodial address yet.\n * - `UNDER_REVIEW` — deposit received, awaiting the operator's decision.\n * - `REJECTED` — the operator declined the listing; the deposit is refundable.\n * - `LISTED` — live and tradable; `symbolId` is assigned.\n * - `DELISTED` — was live, has since been withdrawn from trading.\n */\nexport enum ListingMarketStatus {\n WAITING_FOR_DEPOSIT = \"waiting_for_deposit\",\n UNDER_REVIEW = \"under_review\",\n REJECTED = \"rejected\",\n LISTED = \"listed\",\n DELISTED = \"delisted\",\n}\n\n/**\n * Why the inventory service has locked a market's pool against new deposits.\n *\n * A lock blocks deposits only: trading, withdrawals, claims and every other\n * flow stay available. It is also orthogonal to {@link ListingMarketStatus}: a\n * `LISTED` market can be locked, and the lock lifts without the lifecycle\n * status moving. The catalogue\n * row carries only the flag ({@link ListingMarket.isLocked}); the reasons are on\n * the detail read ({@link ListingMarketDetail.lockReasons}).\n *\n * - `LIQUIDITY_EXPOSURE` — locked on the service's liquidity-exposure limit.\n * - `LOW_TVL` — the pool's TVL is below the service's threshold.\n * - `PRICE_UNAVAILABLE` — the service has no price for the token.\n * - `SHORT_CIRCUIT` — the service's short-circuit guard tripped.\n * - `MANUAL` — an operator locked the market by hand.\n * - `UNKNOWN` — a reason this SDK release does not recognize. The mapper folds\n * every unrecognized wire value here rather than throwing, so a newer backend\n * cannot break the read.\n */\nexport enum MarketLockReason {\n LIQUIDITY_EXPOSURE = \"LIQUIDITY_EXPOSURE\",\n LOW_TVL = \"LOW_TVL\",\n PRICE_UNAVAILABLE = \"PRICE_UNAVAILABLE\",\n SHORT_CIRCUIT = \"SHORT_CIRCUIT\",\n MANUAL = \"MANUAL\",\n UNKNOWN = \"UNKNOWN\",\n}\n\n/**\n * Chains the listing service accepts a listing deposit on.\n *\n * This is the chain the **token** lives on and where its listing collateral was\n * deposited — it is **not** the chain the resulting market trades on. A market\n * whose token is on Solana or BSC still trades on the SYMMIO deployment the\n * listing service is configured for.\n *\n * `SOLANA = 0` is a sentinel the service uses for its one non-EVM chain, not a\n * real chain id: a `ListingMarket` on it carries a base58 `contractAddress`, so\n * never feed one to an EVM address helper without checking `chainId` first.\n */\nexport enum ListingDepositChainId {\n /** Sentinel for Solana — not an EVM chain id. Addresses are base58. */\n SOLANA = 0,\n BSC = 56,\n BASE = 8453,\n SONIC = 146,\n ARBITRUM_ONE = 42161,\n ROBINHOOD = 4663,\n ARC = 5042,\n HYPER_EVM = 999,\n}\n\n/**\n * Chains the listing backend's token-price endpoint accepts, keyed by the\n * vendor's chain **name** — the `chain` input of `getTokenPrice`.\n *\n * This is a different key space from {@link ListingDepositChainId}: that enum\n * is numeric (an EVM chain id, or the `0` sentinel for Solana) and names where\n * a listing deposit lands; this one is a string name the price endpoint\n * understands, and two of its members (`ROBINHOOD`, `ARC`) have no numeric\n * twin at all. Do not cast between the two — pick the member explicitly.\n */\nexport enum TokenPriceChain {\n BASE = \"BASE\",\n SOLANA = \"SOLANA\",\n BSC = \"BSC\",\n ARBITRUM_ONE = \"ARBITRUM_ONE\",\n SONIC = \"SONIC\",\n ROBINHOOD = \"ROBINHOOD\",\n ARC = \"ARC\",\n}\n\n/**\n * The same metric measured over each trailing window the listing service\n * reports.\n *\n * Every entry is a `bigint` at {@link LISTING_VALUE_DECIMALS}, or `null` when\n * the service has no value for that window — a young market has no 30-day\n * figure, and `null` means *absent*, never zero.\n */\nexport interface ListingTrailingWindows {\n /** Trailing 1 hour. */\n h1: bigint | null;\n /** Trailing 6 hours. */\n h6: bigint | null;\n /** Trailing 24 hours. */\n h24: bigint | null;\n /** Trailing 30 days. */\n d30: bigint | null;\n}\n\n/**\n * A metric the service reports over the trailing windows **and** since listing.\n *\n * Only the two APY series carry a lifetime column; APR does not, which is why\n * `lifetime` lives here rather than on {@link ListingTrailingWindows}.\n */\nexport interface ListingApyWindows extends ListingTrailingWindows {\n /** Since the market was listed. */\n lifetime: bigint | null;\n}\n\n/**\n * One market in the permissionless-listing catalog — a row of the pools list.\n *\n * Money and rate fields are `bigint` at {@link LISTING_VALUE_DECIMALS}; `null`\n * means the service reported no value, which is distinct from zero.\n */\nexport interface ListingMarket {\n /**\n * The listed token's contract address on {@link ListingMarket.chainId}.\n *\n * Typed as `string`, **not** viem's `Address`: Solana listings\n * (`chainId === ListingDepositChainId.SOLANA`) carry a base58 address that is\n * not 0x-prefixed. This is also the id used to address a single market in the\n * rest of the listing API.\n */\n contractAddress: string;\n /** Chain the token lives on and its listing deposit was made on. */\n chainId: ListingDepositChainId;\n /**\n * The solver market id this listing trades under, or `null` when it has none\n * yet. Assigned when the market reaches {@link ListingMarketStatus.LISTED};\n * everything downstream (prices, notional caps, quotes, subgraph rows) keys\n * off it, so a `null` here means the market is not tradable.\n */\n symbolId: number | null;\n /** Token ticker, e.g. `\"SYMM\"`. */\n tokenTicker: string;\n /** Token display name, e.g. `\"Symmio\"`. */\n tokenName: string;\n /** Maximum leverage the market allows, as a whole multiplier (`20` = 20x). */\n maxLeverage: number;\n /** Token market capitalization, in USD. */\n marketCap: bigint | null;\n /** Trailing 24-hour trading volume, in USD. */\n vol24h: bigint | null;\n /** Total value locked in the market's pool, in USD. */\n tvl: bigint | null;\n /** Notional the solver will still take on this market, in USD. */\n liquidity: bigint | null;\n /** Notional currently open on this market, in USD. */\n openInterest: bigint | null;\n /** LP rewards accrued over the trailing 24 hours, in USD. */\n reward24h: bigint | null;\n /** Headline APR: a percentage already (`1e18` = `1%`), not a fraction — render it without multiplying by 100. */\n apr: bigint | null;\n /**\n * APR broken out per trailing window, same units as {@link ListingMarket.apr}.\n * There is no lifetime APR — use {@link ListingMarket.apr} for the headline.\n */\n aprByWindow: ListingTrailingWindows;\n /** APY attributed to TVL growth, per window: a percentage already (`1e18` = `1%`), not a fraction — render it without multiplying by 100. */\n tvlDrivenApy: ListingApyWindows;\n /** APY attributed to token price movement, per window: a percentage already (`1e18` = `1%`), not a fraction — render it without multiplying by 100. */\n priceDrivenApy: ListingApyWindows;\n /** When the market went live, as a Unix timestamp in **seconds**. `null` before it is listed. */\n listingTime: number | null;\n /** Where the market sits in the listing lifecycle. */\n marketStatus: ListingMarketStatus;\n /**\n * Whether the inventory service currently has this market's pool locked\n * against new deposits. Only deposits are blocked; trading, withdrawals and\n * every other flow stay available. Independent of\n * {@link ListingMarket.marketStatus}: a `LISTED` market can be locked. The row\n * carries only the flag; the reasons are on\n * {@link ListingMarketDetail.lockReasons}.\n */\n isLocked: boolean;\n}\n\n/** One page of {@link ListingMarket} rows, with the totals needed to paginate. */\nexport interface ListingMarketPage {\n /** Total rows matching the query across all pages. */\n total: number;\n /** Page size the service applied. */\n limit: number;\n /** Row offset of this page. */\n offset: number;\n /** The rows themselves. */\n items: ListingMarket[];\n}\n\n/**\n * A {@link ListingMarket} enriched with the signed-in user's position in it — one\n * row of \"Your Pools\", the markets that generated a deposit address for the user.\n */\nexport interface UserListingMarket extends ListingMarket {\n /** The user's current deposit into this pool, in USD (18-dec bigint). `null` when the deposit address exists but nothing has been deposited yet. */\n userDeposit: bigint | null;\n /** The user's share of the pool, as a percentage number (not 18-dec scaled). */\n userSharePercentage: number;\n /** The user's accrued revenue from this pool, in USD (18-dec bigint), or `null` when absent. */\n userRevenue: bigint | null;\n}\n\n/** One page of {@link UserListingMarket} rows, with the totals needed to paginate. */\nexport interface UserListingMarketPage {\n /** Total rows matching the query across all pages. */\n total: number;\n /** Page size the service applied. */\n limit: number;\n /** Row offset of this page. */\n offset: number;\n /** The rows themselves. */\n items: UserListingMarket[];\n}\n\n/**\n * The signed-in user's LP position and profit in a single pool — the authed\n * per-token read behind a pool's \"your position\" panel.\n *\n * Every field is a `bigint` at {@link LISTING_VALUE_DECIMALS} (18), independent\n * of the token's or collateral's own decimals; format with\n * `formatUnits(value, LISTING_VALUE_DECIMALS)` at the display edge. An absent\n * figure is normalized to `0n`, not `null`.\n */\nexport interface UserPoolProfit {\n /** LP balance valued in the pool's token units, 18-dec bigint. */\n userBalanceInTokens: bigint;\n /** LP balance valued in USDC, 18-dec bigint USD. */\n userBalanceInUsdc: bigint;\n /** Rewards the user can claim now, 18-dec bigint USD. */\n claimableReward: bigint;\n /** Rewards already claimed, 18-dec bigint USD. */\n claimedReward: bigint;\n /** Token amount the user deposited, 18-dec bigint. */\n userDepositedTokenAmount: bigint;\n /** The user's LP shares, 18-dec bigint. */\n userLpAmount: bigint;\n /** LP shares queued for withdrawal (the pending-withdrawal amount), 18-dec bigint. */\n pendingWithdrawLpAmount: bigint;\n /**\n * LP shares free to withdraw right now — `userLpAmount − pendingWithdrawLpAmount`,\n * floored at `0n`. This is the ceiling a withdrawal (`withdrawLp`) may request;\n * the shares already counted in {@link UserPoolProfit.pendingWithdrawLpAmount}\n * are spoken for. Derived by the SDK, not a field the service returns. 18-dec\n * bigint.\n */\n availableLpAmount: bigint;\n}\n\n/**\n * The receipt returned by `claimProfit` — the outcome of a `/v2/claim` request.\n *\n * The claim is synchronous: a `200` means the USDC was moved to the target\n * sub-account. `amountClaimed` is the moved figure normalized to a `bigint` at\n * `LISTING_VALUE_DECIMALS` (18), `claimRequestId` references the claim in the\n * service, and `transactionHash` is the on-chain transfer hash when the service\n * has one (`null` otherwise).\n */\nexport interface PoolClaimResult {\n /** The service's status string, e.g. `\"ok\"`. */\n status: string;\n /** USDC moved to the sub-account, 18-dec bigint USD. */\n amountClaimed: bigint;\n /** Claim id — reference it to restore or look up the claim later. */\n claimRequestId: string;\n /** On-chain hash of the claim transfer, or `null` when the service has none yet. */\n transactionHash: string | null;\n}\n\n/**\n * One past pool-reward claim, from the user's claim history (`getClaimHistory`).\n *\n * The internal `wallet_id` / `market_id` UUIDs the service carries are dropped —\n * they address rows in the backend, not anything a consumer renders.\n */\nexport interface PoolClaim {\n /** Claim id — reference it to look the claim up in the service. */\n claimRequestId: string;\n /** Sub-account address that received the claimed USDC. */\n accountAddress: string;\n /** USDC claimed, 18-dec bigint USD. */\n amount: bigint;\n /** On-chain hash of the claim transfer, or `null` when the service has none. */\n transactionHash: string | null;\n /** When the claim was created, Unix **seconds**. */\n time: number;\n}\n\n/** One page of {@link PoolClaim} rows — the signed-in user's claim history. */\nexport interface PoolClaimHistoryPage {\n /** Total claims matching the query across all pages — what a pager divides. */\n count: number;\n /** The claims themselves, newest first. */\n items: PoolClaim[];\n}\n\n/**\n * The receipt returned by `cancelWithdraw` — the outcome of cancelling a queued\n * LP withdrawal.\n */\nexport interface PoolCancelWithdrawResult {\n /** The affected withdrawal's transaction id, echoed by the service. */\n transactionId: string;\n /**\n * The withdrawal's resulting status, e.g. `\"canceled\"`. Carried through as the\n * service's raw string — its enum (`canceled` | `pending` | `transferred` | …)\n * is a superset of {@link PoolTransactionStatus}, so it is not narrowed to it.\n */\n status: string;\n}\n\n/**\n * The receipt returned by `refundMarket` — the outcome of refunding a deposit on\n * a rejected market.\n */\nexport interface PoolRefundResult {\n /** On-chain hash of the refund transfer. */\n transactionHash: string;\n}\n\n/**\n * The signed-in user's **retry allowance** for one rejected market\n * (`getRetryListingInfo`) — how many listing retries remain and the cooldown\n * before the next.\n */\nexport interface RetryListingInfo {\n /** Maximum retries allowed per market. */\n retryLimit: number;\n /** Retries the user has left for this market. */\n remainingRetries: number;\n /** Seconds until the next retry is allowed, or `null` when no cooldown is in effect. */\n remainingCooldownSeconds: number | null;\n}\n\n/**\n * The result of `retryListing` — the retry allowance left after re-submitting a\n * rejected market.\n */\nexport interface RetryListingResult {\n /** Maximum retries allowed per market. */\n retryLimit: number;\n /** Retries left after this one. */\n remainingRetries: number;\n /** Seconds before the next retry is allowed. */\n cooldownSeconds: number;\n}\n\n/**\n * The signed-in user's deposit wallet for one market — the get-or-create result\n * of the authed `/v2/market/deposit-address` endpoint. This is the address the\n * user sends funds to in order to deposit into the market's pool.\n */\nexport interface MarketDepositAddress {\n /** The market's token contract address (EVM 0x… or Solana base58). */\n tokenContractAddress: string;\n /** The signed-in user this deposit wallet belongs to. */\n userAddress: string;\n /** The market's deposit chain. */\n depositChain: ListingDepositChainId;\n /** The deposit address — where the user sends funds to deposit into this market. `null` when the service returned none. */\n depositAddress: string | null;\n /** The token's on-chain decimals. */\n tokenDecimal: number;\n /** The market's listing lifecycle status. */\n marketStatus: ListingMarketStatus;\n}\n\n/**\n * A pre-listing price **estimate** for one token — the normalized result of\n * the authed `/v2/market/token-price` endpoint, which asks the Price Service\n * for a token that is not (yet) listed.\n *\n * The backend caches the figure for about five minutes and rate-limits the\n * endpoint, so treat `price` as a display estimate, never as a mark or trade\n * price: render it with a `~`, and do not poll for a fresher one.\n */\nexport interface TokenPrice {\n /** USD per token, as the service reports it — a plain float, always `> 0`. */\n price: number;\n}\n\n/**\n * The listing-pipeline status of a single market — the normalized result of\n * `getListingStatus`, keyed by the market's token address and deposit chain.\n *\n * `marketStatus` is the overall lifecycle status (the same machine as\n * {@link ListingMarketStatus}); the remaining fields describe where the listing\n * is in the backend's step pipeline and whether the current step is retrying or\n * has errored.\n */\nexport interface ListingStatus {\n /** Overall lifecycle status of the market, mapped from the service's `market_status`. */\n marketStatus: ListingMarketStatus;\n /** The step the listing pipeline is currently on, or `null` when it is not in a step. */\n currentStep: string | null;\n /** The ordered pipeline steps the listing moves through. */\n steps: string[];\n /** Error code reported for the current step, or `null` when there is no error. */\n errorCode: number | null;\n /** Human-readable detail for the current step's error, or `null`. */\n errorDetail: string | null;\n /** How many times the current step has been retried. */\n retryCount: number;\n /** The maximum retries allowed for the current step. */\n retryLimit: number;\n}\n\n/**\n * The protocol's global new-market listing cap for the current rolling weekly\n * window — how many pools may still be listed across the protocol before the\n * window resets.\n */\nexport interface WeeklyListingLimit {\n /** Total new-market listings allowed per rolling weekly window. */\n limit: number;\n /** Listings still available in the current window — `0` means no more pools can be listed until reset. */\n remaining: number;\n /** When the window resets, as the Unix timestamp the service returns (`reset_at`). */\n resetAt: number;\n}\n\n/**\n * Server-side sort keys accepted by `getListingMarkets`.\n *\n * Mirrors the service's `sort_by` enum verbatim — snake_case, not the SDK's\n * camelCase field names — because the value is a wire literal, and translating\n * it would break silently the moment the service adds a key.\n *\n * Note the two bare keys: `tvl_driven_apy` and `price_driven_apy` have no\n * matching bare response field. They sort by the **lifetime** column\n * (`tvl_driven_apy_lifetime` / `price_driven_apy_lifetime`).\n */\nexport type ListingMarketSortField =\n | \"liquidity\"\n | \"tvl\"\n | \"market_cap\"\n | \"vol24h\"\n | \"open_interest\"\n | \"apr_1h\"\n | \"apr_6h\"\n | \"apr_24h\"\n | \"apr_30d\"\n | \"reward_24h\"\n | \"apr\"\n | \"tvl_driven_apy_1h\"\n | \"tvl_driven_apy_6h\"\n | \"tvl_driven_apy_24h\"\n | \"tvl_driven_apy_30d\"\n | \"tvl_driven_apy\"\n | \"price_driven_apy_1h\"\n | \"price_driven_apy_6h\"\n | \"price_driven_apy_24h\"\n | \"price_driven_apy_30d\"\n | \"price_driven_apy\"\n | \"listing_time\";\n\n/** Sort direction. */\nexport type ListingSortDirection = \"asc\" | \"desc\";\n\n/**\n * An inclusive `[min, max]` bound on one of the service's value fields. Either\n * end may be omitted for a one-sided bound.\n *\n * Bounds use the **same 18-decimal scale as the response**\n * ({@link LISTING_VALUE_DECIMALS}), not the human-readable figure. Filtering for\n * \"market cap of at least one million USD\" is\n * `{ min: parseUnits(\"1000000\", LISTING_VALUE_DECIMALS) }`, not `{ min: 1_000_000 }`\n * — the latter is a bound of `0.000000000001` USD and silently matches nothing\n * useful. Verified against the live service.\n */\nexport interface ListingValueRange {\n /** Inclusive lower bound at 18 decimals (`__ge` on the wire). */\n min?: bigint;\n /** Inclusive upper bound at 18 decimals (`__le` on the wire). */\n max?: bigint;\n}\n\n/**\n * An inclusive `[min, max]` bound on a timestamp field, in Unix **seconds**\n * (not milliseconds, and not 18-decimal scaled).\n */\nexport interface ListingTimeRange {\n /** Inclusive lower bound, Unix seconds (`__ge` on the wire). */\n min?: number;\n /** Inclusive upper bound, Unix seconds (`__le` on the wire). */\n max?: number;\n}\n\n/**\n * Range filters `getListingMarkets` accepts. Every key is optional; omitted keys\n * are not sent.\n *\n * All {@link ListingValueRange} bounds are at {@link LISTING_VALUE_DECIMALS};\n * `listingTime` is the one exception and takes Unix seconds.\n */\nexport interface ListingMarketFilters {\n /** Token market capitalization, USD. */\n marketCap?: ListingValueRange;\n /** Trailing 24-hour volume, USD. */\n vol24h?: ListingValueRange;\n /** Total value locked, USD. */\n tvl?: ListingValueRange;\n /** Available notional, USD. */\n liquidity?: ListingValueRange;\n /** Open notional, USD. */\n openInterest?: ListingValueRange;\n /** Trailing 24-hour LP rewards, USD. */\n reward24h?: ListingValueRange;\n /** Headline APR bounds, at the field's own scale (`1e18` = `1%`). */\n apr?: ListingValueRange;\n /** APR over the trailing hour. */\n apr1h?: ListingValueRange;\n /** APR over the trailing 6 hours. */\n apr6h?: ListingValueRange;\n /** APR over the trailing 24 hours. */\n apr24h?: ListingValueRange;\n /** APR over the trailing 30 days. */\n apr30d?: ListingValueRange;\n /** TVL-driven APY over the trailing hour. */\n tvlDrivenApy1h?: ListingValueRange;\n /** TVL-driven APY over the trailing 6 hours. */\n tvlDrivenApy6h?: ListingValueRange;\n /** TVL-driven APY over the trailing 24 hours. */\n tvlDrivenApy24h?: ListingValueRange;\n /** TVL-driven APY over the trailing 30 days. */\n tvlDrivenApy30d?: ListingValueRange;\n /** TVL-driven APY over the market's lifetime. */\n tvlDrivenApy?: ListingValueRange;\n /** Price-driven APY over the trailing hour. */\n priceDrivenApy1h?: ListingValueRange;\n /** Price-driven APY over the trailing 6 hours. */\n priceDrivenApy6h?: ListingValueRange;\n /** Price-driven APY over the trailing 24 hours. */\n priceDrivenApy24h?: ListingValueRange;\n /** Price-driven APY over the trailing 30 days. */\n priceDrivenApy30d?: ListingValueRange;\n /** Price-driven APY over the market's lifetime. */\n priceDrivenApy?: ListingValueRange;\n /** Listing timestamp bounds, Unix seconds. */\n listingTime?: ListingTimeRange;\n}\n\n/**\n * Which side of the pool's book a {@link PoolPosition} row describes.\n *\n * The pool's inventory is reported as two aggregates, not a list of individual\n * trades — the detail read gives one long total and one short total.\n */\nexport enum PoolPositionSide {\n LONG = \"long\",\n SHORT = \"short\",\n}\n\n/**\n * One side of a pool's aggregate position book.\n *\n * Every figure is a `bigint` at {@link LISTING_VALUE_DECIMALS}. `upnl` is signed\n * — a losing side reports a negative value — and is the only field here that\n * routinely is.\n */\nexport interface PoolPosition {\n /** Which side this row aggregates. */\n side: PoolPositionSide;\n /** Total size held on this side, in the pool token's units. */\n size: bigint;\n /** Notional value of the side, in USD. */\n value: bigint;\n /** Size-weighted average open price of the side, in USD. */\n avgOpenPrice: bigint;\n /** Unrealized PnL of the side, in USD. Signed. */\n upnl: bigint;\n}\n\n/**\n * A pool's public detail — the aggregate stats and inventory position behind a\n * pool page.\n *\n * Money and rate fields are `bigint` at {@link LISTING_VALUE_DECIMALS}; recall\n * that a descaled *rate* is already a percentage (`1e18` = `1%`) while a\n * descaled *money* field is USD (`1e18` = `$1`). `null` means the backend\n * reported no value, which is not zero.\n *\n * A **delisted** pool is a documented special case: the backend returns cached\n * remaining token and USDC balances with `tvl` fixed at zero.\n */\nexport interface ListingMarketDetail {\n /** The pool's token contract address — its id in the listing API. */\n tokenContractAddress: string;\n /** Chain the token lives on and its listing deposit was made on. */\n depositChain: ListingDepositChainId;\n /** Token display name. */\n tokenName: string;\n /** Token ticker, or `null` when the backend has none. */\n tokenTicker: string | null;\n /** Token decimals. */\n tokenDecimal: number;\n /** Solver market id, or `null` when the pool is not tradable yet. */\n symbolId: number | null;\n /** Where the pool sits in the listing lifecycle. */\n marketStatus: ListingMarketStatus;\n /**\n * Whether the inventory service currently has this pool locked against new\n * deposits. Only deposits are blocked; trading, withdrawals and every other\n * flow stay available. Independent of {@link ListingMarketDetail.marketStatus}.\n * `false` when the backend reports no lock state, as it does for a delisted\n * pool.\n */\n isLocked: boolean;\n /**\n * Why the pool is locked, one entry per active reason; empty when it is not\n * locked. A reason this SDK release does not recognize arrives as\n * {@link MarketLockReason.UNKNOWN}.\n */\n lockReasons: MarketLockReason[];\n /** Maximum leverage the market allows, as a whole multiplier. */\n maxLeverage: number;\n /** Share of revenue routed to token buybacks, as a percentage (`50` = 50%). */\n buybackRatio: number;\n /** When the market went live, as a Unix timestamp in **seconds**. */\n listingTime: number | null;\n /** Pool age in **seconds**, or `null` before listing. */\n age: number | null;\n /** Number of distinct LPs in the pool. */\n activeLps: number;\n /** Total value locked in the pool, USD. `0` for a delisted pool by design. */\n tvl: bigint | null;\n /** Collateral held by the pool, USD. */\n totalUsdcInPool: bigint;\n /** Pool token held by the pool, in the token's own units. */\n totalTokenInPool: bigint;\n /** Accrued maintenance fees, USD. */\n maintenanceFees: bigint;\n /** LP rewards per window, USD. */\n rewards: ListingApyWindows;\n /** Solver revenue per window, USD. */\n solverRevenue: ListingApyWindows;\n /** Headline APY per window, as a percentage. */\n apy: ListingApyWindows;\n /** APY attributed to TVL growth, per window, as a percentage. */\n tvlDrivenApy: ListingApyWindows;\n /** APY attributed to token price movement, per window, as a percentage. */\n priceDrivenApy: ListingApyWindows;\n /** The pool's aggregate long side, or `null` when the backend reported none. */\n longPosition: PoolPosition | null;\n /** The pool's aggregate short side, or `null` when the backend reported none. */\n shortPosition: PoolPosition | null;\n}\n\n/** Whether a pool transaction is money going in or coming out. */\nexport enum PoolTransactionType {\n DEPOSIT = \"deposit\",\n WITHDRAW = \"withdraw\",\n}\n\n/**\n * Where a pool transaction sits in its lifecycle, as the backend reports it to\n * users.\n */\nexport enum PoolTransactionStatus {\n PENDING = \"pending\",\n SUCCESS = \"success\",\n REJECTED = \"rejected\",\n REFUND = \"refund\",\n CANCELED = \"canceled\",\n}\n\n/**\n * One deposit or withdrawal against a pool.\n *\n * Each row names its own pool (`tokenAddress`, `chainId`), so a page read across\n * every pool stays attributable row by row. `amount`, `usdcAmount` and\n * `tokenAmount` are `bigint` at {@link LISTING_VALUE_DECIMALS}. The refund fields\n * are populated only for a refunded row.\n */\nexport interface PoolTransaction {\n /** Backend id for the transaction. */\n transactionId: string;\n /** The pool's token contract address (EVM `0x…` or Solana base58) — the pool this row belongs to. */\n tokenAddress: string;\n /** The chain the pool's token lives on — not the chain the market trades on. */\n chainId: ListingDepositChainId;\n /** The wallet that made it. */\n walletAddress: string;\n /** Amount moved, in the transaction's own denomination. */\n amount: bigint;\n /** Collateral value moved, USD. */\n usdcAmount: bigint;\n /** Token amount moved, in the pool token's units. */\n tokenAmount: bigint;\n /** On-chain transaction hash or Solana signature, when known. */\n transactionHash: string | null;\n /** Address a refund was sent to, or `null` when this is not a refund. */\n refundAddress: string | null;\n /** Hash of the refund transaction, or `null` when this is not a refund. */\n refundTransactionHash: string | null;\n /** When the refund completed, Unix **seconds**; `null` when not a refund. */\n refundTime: number | null;\n /** Deposit or withdrawal. */\n type: PoolTransactionType;\n /** Lifecycle status. */\n status: PoolTransactionStatus;\n /** When the transaction happened, Unix **seconds**. */\n time: number;\n}\n\n/** One page of {@link PoolTransaction} rows — one pool's, or every pool's when the read is not narrowed to a token. */\nexport interface PoolTransactionPage {\n /**\n * The token address the page was narrowed to, echoed by the backend in its canonical form, or `null` when the page\n * spans every pool. Each row carries its own `tokenAddress` either way.\n */\n marketAddress: string | null;\n /** Total rows matching the query across all pages — what a pager divides, not `items.length`. */\n count: number;\n /** The rows themselves, newest first. */\n items: PoolTransaction[];\n}\n\n/**\n * One row of the signed-in user's transaction history (`getUserTransactions`) —\n * a deposit or withdrawal they made, on any pool.\n *\n * Unlike {@link PoolTransaction} (public, every LP), this is authed and scoped to\n * one user, every pool — and each row carries the token's display metadata\n * (`tokenName`, `tokenTicker`, `tokenDecimals`), not just its identity\n * (`tokenAddress`, `chainId`).\n */\nexport interface UserTransaction {\n /** Backend id for the transaction. */\n transactionId: string;\n /** Deposit or withdrawal. */\n type: PoolTransactionType;\n /** Lifecycle status. */\n status: PoolTransactionStatus;\n /** Amount moved, 18-dec bigint (a 1e18-scaled figure, like every listing value). */\n amount: bigint;\n /** The token's own decimals, as reported by the service — metadata, not the `amount` scale. */\n tokenDecimals: number;\n /** The pool's token contract address (EVM `0x…` or Solana base58). */\n tokenAddress: string;\n /** The token's name. */\n tokenName: string;\n /** The token's ticker. */\n tokenTicker: string;\n /** The chain the transaction's token lives on. */\n chainId: ListingDepositChainId;\n /** The temporary deposit wallet involved, or `null` when the service omits it. */\n wallet: string | null;\n /** Address a refund was sent to, or `null` when this is not a refund. */\n refundAddress: string | null;\n /** On-chain transaction hash or Solana signature, when known. */\n transactionHash: string | null;\n /** When the transaction happened, Unix **seconds**; `null` when the service omits it. */\n time: number | null;\n}\n\n/** One page of {@link UserTransaction} rows — the signed-in user's transaction history. */\nexport interface UserTransactionPage {\n /** Total rows matching the query across all pages — what a pager divides. */\n count: number;\n /** The rows themselves, newest first. */\n items: UserTransaction[];\n}\n\n/**\n * The generated `MarketStatus` enum and {@link ListingMarketStatus} carry the\n * same string values; this alias documents that the cast in the mapper is\n * value-preserving rather than a widening.\n *\n * @internal\n */\nexport type GeneratedMarketStatus = MarketStatus;\n\n/**\n * One deposit chain a new listing may use, from the listing service's public\n * config ({@link ListingConfig.supportedDepositChains}).\n */\nexport interface ListingDepositChain {\n /** Numeric chain id to send with market/deposit requests. */\n chainId: ListingDepositChainId;\n /** Human-readable chain name, e.g. \"HyperEVM\". */\n chainName: string;\n}\n\n/**\n * The client mutation limits the listing service enforces, from its public\n * config ({@link ListingConfig.rateLimits}).\n */\nexport interface ListingRateLimits {\n /** Max successful market-config updates per user+market in a rolling 24h window. */\n marketConfigUpdatesPerDay: number;\n /** Max successful profit claims per user+market in a rolling 24h window. */\n profitClaimsPerDay: number;\n}\n\n/**\n * The listing service's public client configuration — the deposit guidance,\n * listing fee, supported deposit chains, rate limits, and protocol reward share\n * a create-listing flow needs.\n *\n * The three USDC figures are `bigint` at {@link LISTING_VALUE_DECIMALS} (18),\n * independent of the collateral token's own decimals; format them with\n * `formatUnits(value, LISTING_VALUE_DECIMALS)` at the display edge.\n */\nexport interface ListingConfig {\n /** Recommended initial USDC deposit to start a listing, USD at LISTING_VALUE_DECIMALS (18) as a bigint. */\n recommendedInitialDepositUsdc: bigint;\n /** Minimum accepted initial USDC deposit after slippage, USD 18-dec bigint. */\n minimumInitialDepositUsdc: bigint;\n /** Listing fee in USDC, USD 18-dec bigint. */\n listingFeeUsdc: bigint;\n /** Deposit chains new markets may use — the source of truth for a chain picker. */\n supportedDepositChains: ListingDepositChain[];\n /** Rolling-24h client mutation limits. */\n rateLimits: ListingRateLimits;\n /** Whole-percent of market revenue to the protocol before buyback/LP. */\n protocolRewardSharePercent: number;\n}\n\n/**\n * One quote in a pool's book, decoded from the analytics subgraph.\n *\n * A pool's book is **every trader's** quotes on that market, not one account's —\n * `partyA` differs from row to row. Amounts and prices are `bigint` at 18\n * decimals (the protocol's own scale, not the listing backend's), and `null`\n * means the subgraph had no value for that field.\n */\nexport interface PoolQuote {\n /** Subgraph row id (`{quoteId}-{source}`); stable, use as a table key. */\n id: string;\n /** Protocol quote id. */\n quoteId: bigint;\n /** Raw `QuoteStatus` ordinal as the subgraph reports it. */\n quoteStatus: number | null;\n /** Raw `PositionType` ordinal — `0` long, `1` short. */\n positionType: number | null;\n /** Raw `OrderType` ordinal of the open — `0` limit, `1` market. */\n orderTypeOpen: number | null;\n /** Market ticker, when the subgraph carries one. */\n symbol: string | null;\n /** Solver market id. */\n symbolId: number | null;\n /** The account that opened the quote. */\n partyA: string;\n /** The solver that took the other side. */\n partyB: string | null;\n /** Quote size. */\n quantity: bigint | null;\n /** How much of {@link PoolQuote.quantity} has been closed. */\n closedAmount: bigint | null;\n /** Size of an in-flight close request. */\n quantityToClose: bigint | null;\n /** Price the quote actually opened at. */\n openedPrice: bigint | null;\n /** Price the opener asked for. */\n requestedOpenPrice: bigint | null;\n /** Size-weighted average of the closes so far. */\n averageClosedPrice: bigint | null;\n /** Price of an in-flight close request. */\n closePrice: bigint | null;\n /** Open price before any modification. */\n initialOpenedPrice: bigint | null;\n /** Size liquidated, when the quote was liquidated. */\n liquidateAmount: bigint | null;\n /** Price the liquidation executed at. */\n liquidatePrice: bigint | null;\n /** Block timestamp of the quote's last update, Unix **seconds**. */\n timestamp: number;\n /** Block the quote was last updated in. */\n blockNumber: bigint;\n}\n\n/**\n * One day of LP reward for a pool.\n *\n * A series of these is what a pool page's rewards chart plots — the public\n * per-pool series from `getPoolRewardChart`, or one market's slice of the\n * signed-in user's {@link UserPoolRewardChart}.\n */\nexport interface PoolRewardPoint {\n /** Start of the reward day, unix **seconds**. */\n timestamp: number;\n /**\n * Reward earned that day, `bigint` at {@link LISTING_VALUE_DECIMALS} (18).\n *\n * A **money** field, so the descaled number is a USD amount (`1e18` = `$1`) —\n * unlike the catalog's rate fields, which are already percentages. A day the\n * service reports as absent collapses to `0n` rather than `null`: a missing\n * snapshot and a zero-reward day are the same point on a chart.\n */\n reward: bigint;\n}\n\n/**\n * The signed-in user's daily reward series for **one** market, as returned by\n * `getUserRewardChart` — which reports every market the user has rewards in,\n * one entry each.\n *\n * A market is addressed by the pair `(marketAddress, marketChainId)`, matching\n * {@link ListingMarket.contractAddress} and {@link ListingMarket.chainId}. Note\n * `marketChainId` is the chain the **token** lives on, not the SYMMIO chain the\n * market trades on.\n */\nexport interface UserPoolRewardChart {\n /** The pool's token contract address — matches {@link ListingMarket.contractAddress}. */\n marketAddress: string;\n /** Chain the token lives on — matches {@link ListingMarket.chainId}. */\n marketChainId: ListingDepositChainId;\n /** The user's daily rewards in this pool, in the order the service returns them. */\n rewards: PoolRewardPoint[];\n}\n"],"mappings":";AAmBA,IAAa,IAAyB,IAgB1B,IAAL,yBAAA,GAAA;QACL,EAAA,sBAAA,uBACA,EAAA,eAAA,gBACA,EAAA,WAAA,YACA,EAAA,SAAA,UACA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAqBY,IAAL,yBAAA,GAAA;QACL,EAAA,qBAAA,sBACA,EAAA,UAAA,WACA,EAAA,oBAAA,qBACA,EAAA,gBAAA,iBACA,EAAA,SAAA,UACA,EAAA,UAAA;AACF,EAAA,CAAA,CAAA,GAcY,IAAL,yBAAA,GAAA;QAEL,EAAA,EAAA,SAAA,KAAA,UACA,EAAA,EAAA,MAAA,MAAA,OACA,EAAA,EAAA,OAAA,QAAA,QACA,EAAA,EAAA,QAAA,OAAA,SACA,EAAA,EAAA,eAAA,SAAA,gBACA,EAAA,EAAA,YAAA,QAAA,aACA,EAAA,EAAA,MAAA,QAAA,OACA,EAAA,EAAA,YAAA,OAAA;AACF,EAAA,CAAA,CAAA,GAYY,IAAL,yBAAA,GAAA;QACL,EAAA,OAAA,QACA,EAAA,SAAA,UACA,EAAA,MAAA,OACA,EAAA,eAAA,gBACA,EAAA,QAAA,SACA,EAAA,YAAA,aACA,EAAA,MAAA;AACF,EAAA,CAAA,CAAA,GAudY,IAAL,yBAAA,GAAA;QACL,EAAA,OAAA,QACA,EAAA,QAAA;AACF,EAAA,CAAA,CAAA,GAkGY,IAAL,yBAAA,GAAA;QACL,EAAA,UAAA,WACA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA,GAMY,IAAL,yBAAA,GAAA;QACL,EAAA,UAAA,WACA,EAAA,UAAA,WACA,EAAA,WAAA,YACA,EAAA,SAAA,UACA,EAAA,WAAA;AACF,EAAA,CAAA,CAAA"}
@@ -21,6 +21,8 @@ export type GetEstimatedPriceParameters = Compute<ReadSolverParameter & {
21
21
  * prices the fill relative to it.
22
22
  */
23
23
  price: string;
24
+ /** Cancels the underlying HTTP request; no timeout is imposed by default. */
25
+ signal?: AbortSignal;
24
26
  }>;
25
27
  /**
26
28
  * Return type of {@link getEstimatedPrice}.
@@ -1 +1 @@
1
- {"version":3,"file":"get-estimated-price.d.ts","sourceRoot":"","sources":["../../../src/solvers/estimated-price/get-estimated-price.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,6EAA6E;AAC7E,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAC/C,mBAAmB,GAAG;IACpB,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,uDAAuD;IACvD,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,kFAAkF;IAClF,cAAc,EAAE,MAAM,CAAC;CACxB;AAOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,2BAA2B,GACtC,OAAO,CAAC,2BAA2B,CAAC,CA2BtC"}
1
+ {"version":3,"file":"get-estimated-price.d.ts","sourceRoot":"","sources":["../../../src/solvers/estimated-price/get-estimated-price.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,6EAA6E;AAC7E,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAC/C,mBAAmB,GAAG;IACpB,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,uDAAuD;IACvD,KAAK,EAAE,mBAAmB,CAAC;IAC3B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,kFAAkF;IAClF,cAAc,EAAE,MAAM,CAAC;CACxB;AAOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,2BAA2B,GACtC,OAAO,CAAC,2BAA2B,CAAC,CA2BtC"}
@@ -21,7 +21,10 @@ async function c(n, c) {
21
21
  position_type: s(c.positionType),
22
22
  entry: c.entry,
23
23
  price: c.price
24
- }, { baseURL: l.url })).data);
24
+ }, {
25
+ baseURL: l.url,
26
+ signal: c.signal
27
+ })).data);
25
28
  } catch (n) {
26
29
  throw n instanceof t ? n : o(n) ? e.fromAxios(n, {
27
30
  code: "FETCH_ESTIMATED_PRICE_FAILED",
@@ -1 +1 @@
1
- {"version":3,"file":"get-estimated-price.js","names":[],"sources":["../../../src/solvers/estimated-price/get-estimated-price.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { PositionType } from \"../../symmio-contracts/symmio/types\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getEstimatedPrice as requestEstimatedPrice } from \"../types/generated/enigma-solver\";\nimport { toEstimatedPrice } from \"./to-estimated-price\";\n\n/** Whether a price estimate is for **opening** or **closing** a position. */\nexport type EstimatedPriceEntry = \"open\" | \"close\";\n\n/**\n * Parameters for {@link getEstimatedPrice}.\n */\nexport type GetEstimatedPriceParameters = Compute<\n ReadSolverParameter & {\n /** Solver market id. */\n symbolId: number;\n /** Order quantity (decimal string). */\n quantity: string;\n /** Long or short. */\n positionType: PositionType;\n /** Whether this estimate is for an open or a close. */\n entry: EstimatedPriceEntry;\n /**\n * The price **sent to the solver** — the slippage-adjusted request price the\n * caller computed for the open/close, **not** the raw mark price. The solver\n * prices the fill relative to it.\n */\n price: string;\n }\n>;\n\n/**\n * Return type of {@link getEstimatedPrice}.\n */\nexport interface GetEstimatedPriceReturnType {\n /** Estimated execution price (decimal string); `\"0\"` when the solver omits it. */\n estimatedPrice: string;\n}\n\n/** Solver wire value for a position side (`\"long\"` / `\"short\"`). */\nfunction positionTypeToWire(positionType: PositionType): string {\n return positionType === PositionType.SHORT ? \"short\" : \"long\";\n}\n\n/**\n * Ask the solver what price an open or close would actually fill at — a\n * read-only simulation of the trade (`GET /estimated-price`; nothing is\n * submitted). Pass the order `quantity`, the side, whether it's an open or\n * close, and the slippage-adjusted request `price`; the solver returns the price\n * it would fill at, from which the UI derives price impact (see\n * {@link calculatePriceImpact}) and — for a close — an estimated PnL.\n *\n * @param config - The SDK config.\n * @param parameters - Market, quantity, side, entry (open/close), and request price.\n * @returns The estimated execution price.\n * @throws {SymmApiError} when the solver request fails.\n * @throws {SymmError} when the chain is unsupported.\n *\n * @example\n * ```ts\n * const { estimatedPrice } = await getEstimatedPrice(config, {\n * symbolId: 1,\n * quantity: \"1000\",\n * positionType: PositionType.LONG,\n * entry: \"open\",\n * price: requestPrice, // slippage-adjusted, from calculateTradeParams\n * });\n * ```\n */\nexport async function getEstimatedPrice(\n config: Config,\n parameters: GetEstimatedPriceParameters,\n): Promise<GetEstimatedPriceReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getEstimatedPrice\");\n try {\n const response = await requestEstimatedPrice(\n {\n symbol_id: parameters.symbolId,\n quantity: parameters.quantity,\n position_type: positionTypeToWire(parameters.positionType),\n entry: parameters.entry,\n price: parameters.price,\n },\n { baseURL: solver.url },\n );\n return toEstimatedPrice(response.data);\n } catch (err) {\n if (err instanceof SymmError) throw err;\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_ESTIMATED_PRICE_FAILED\", baseURL: solver.url });\n }\n throw new SymmError(\n \"api\",\n \"FETCH_ESTIMATED_PRICE_FAILED\",\n `Failed to fetch estimated price: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n"],"mappings":";;;;;;;AA2CA,SAAS,EAAmB,GAAoC;CAC9D,OAAO,MAAiB,EAAa,QAAQ,UAAU;AACzD;AA2BA,eAAsB,EACpB,GACA,GACsC;CACtC,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAC9F,EAAiB,GAAQ,UAAU,mBAAmB;CACtD,IAAI;EAWF,OAAO,GAAiB,MAVD,EACrB;GACE,WAAW,EAAW;GACtB,UAAU,EAAW;GACrB,eAAe,EAAmB,EAAW,YAAY;GACzD,OAAO,EAAW;GAClB,OAAO,EAAW;EACpB,GACA,EAAE,SAAS,EAAO,IAAI,CACxB,GACiC,IAAI;CACvC,SAAS,GAAK;EAKZ,MAJI,aAAe,IAAiB,IAChC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAAgC,SAAS,EAAO;EAAI,CAAC,IAE3F,IAAI,EACR,OACA,gCACA,oCAAoC,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KACnF,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF"}
1
+ {"version":3,"file":"get-estimated-price.js","names":[],"sources":["../../../src/solvers/estimated-price/get-estimated-price.ts"],"sourcesContent":["import { isAxiosError } from \"axios\";\nimport type { Config } from \"../../core/config\";\nimport { SymmApiError, SymmError } from \"../../shared/errors/symm-error\";\nimport type { Compute, ReadSolverParameter } from \"../../shared/types/properties\";\nimport { PositionType } from \"../../symmio-contracts/symmio/types\";\nimport { assertSolverKind } from \"../assert-solver-kind\";\nimport { getEstimatedPrice as requestEstimatedPrice } from \"../types/generated/enigma-solver\";\nimport { toEstimatedPrice } from \"./to-estimated-price\";\n\n/** Whether a price estimate is for **opening** or **closing** a position. */\nexport type EstimatedPriceEntry = \"open\" | \"close\";\n\n/**\n * Parameters for {@link getEstimatedPrice}.\n */\nexport type GetEstimatedPriceParameters = Compute<\n ReadSolverParameter & {\n /** Solver market id. */\n symbolId: number;\n /** Order quantity (decimal string). */\n quantity: string;\n /** Long or short. */\n positionType: PositionType;\n /** Whether this estimate is for an open or a close. */\n entry: EstimatedPriceEntry;\n /**\n * The price **sent to the solver** — the slippage-adjusted request price the\n * caller computed for the open/close, **not** the raw mark price. The solver\n * prices the fill relative to it.\n */\n price: string;\n /** Cancels the underlying HTTP request; no timeout is imposed by default. */\n signal?: AbortSignal;\n }\n>;\n\n/**\n * Return type of {@link getEstimatedPrice}.\n */\nexport interface GetEstimatedPriceReturnType {\n /** Estimated execution price (decimal string); `\"0\"` when the solver omits it. */\n estimatedPrice: string;\n}\n\n/** Solver wire value for a position side (`\"long\"` / `\"short\"`). */\nfunction positionTypeToWire(positionType: PositionType): string {\n return positionType === PositionType.SHORT ? \"short\" : \"long\";\n}\n\n/**\n * Ask the solver what price an open or close would actually fill at — a\n * read-only simulation of the trade (`GET /estimated-price`; nothing is\n * submitted). Pass the order `quantity`, the side, whether it's an open or\n * close, and the slippage-adjusted request `price`; the solver returns the price\n * it would fill at, from which the UI derives price impact (see\n * {@link calculatePriceImpact}) and — for a close — an estimated PnL.\n *\n * @param config - The SDK config.\n * @param parameters - Market, quantity, side, entry (open/close), and request price.\n * @returns The estimated execution price.\n * @throws {SymmApiError} when the solver request fails.\n * @throws {SymmError} when the chain is unsupported.\n *\n * @example\n * ```ts\n * const { estimatedPrice } = await getEstimatedPrice(config, {\n * symbolId: 1,\n * quantity: \"1000\",\n * positionType: PositionType.LONG,\n * entry: \"open\",\n * price: requestPrice, // slippage-adjusted, from calculateTradeParams\n * });\n * ```\n */\nexport async function getEstimatedPrice(\n config: Config,\n parameters: GetEstimatedPriceParameters,\n): Promise<GetEstimatedPriceReturnType> {\n const solver = config.getSolver({ chainId: parameters.chainId, solverId: parameters.solverId });\n assertSolverKind(solver, \"enigma\", \"getEstimatedPrice\");\n try {\n const response = await requestEstimatedPrice(\n {\n symbol_id: parameters.symbolId,\n quantity: parameters.quantity,\n position_type: positionTypeToWire(parameters.positionType),\n entry: parameters.entry,\n price: parameters.price,\n },\n { baseURL: solver.url, signal: parameters.signal },\n );\n return toEstimatedPrice(response.data);\n } catch (err) {\n if (err instanceof SymmError) throw err;\n if (isAxiosError(err)) {\n throw SymmApiError.fromAxios(err, { code: \"FETCH_ESTIMATED_PRICE_FAILED\", baseURL: solver.url });\n }\n throw new SymmError(\n \"api\",\n \"FETCH_ESTIMATED_PRICE_FAILED\",\n `Failed to fetch estimated price: ${err instanceof Error ? err.message : String(err)}`,\n { cause: err instanceof Error ? err : undefined },\n );\n }\n}\n"],"mappings":";;;;;;;AA6CA,SAAS,EAAmB,GAAoC;CAC9D,OAAO,MAAiB,EAAa,QAAQ,UAAU;AACzD;AA2BA,eAAsB,EACpB,GACA,GACsC;CACtC,IAAM,IAAS,EAAO,UAAU;EAAE,SAAS,EAAW;EAAS,UAAU,EAAW;CAAS,CAAC;CAC9F,EAAiB,GAAQ,UAAU,mBAAmB;CACtD,IAAI;EAWF,OAAO,GAAiB,MAVD,EACrB;GACE,WAAW,EAAW;GACtB,UAAU,EAAW;GACrB,eAAe,EAAmB,EAAW,YAAY;GACzD,OAAO,EAAW;GAClB,OAAO,EAAW;EACpB,GACA;GAAE,SAAS,EAAO;GAAK,QAAQ,EAAW;EAAO,CACnD,GACiC,IAAI;CACvC,SAAS,GAAK;EAKZ,MAJI,aAAe,IAAiB,IAChC,EAAa,CAAG,IACZ,EAAa,UAAU,GAAK;GAAE,MAAM;GAAgC,SAAS,EAAO;EAAI,CAAC,IAE3F,IAAI,EACR,OACA,gCACA,oCAAoC,aAAe,QAAQ,EAAI,UAAU,OAAO,CAAG,KACnF,EAAE,OAAO,aAAe,QAAQ,IAAM,KAAA,EAAU,CAClD;CACF;AACF"}
@@ -9,9 +9,13 @@ export declare function getEstimatedPriceQueryKey(options: Compute<GetEstimatedP
9
9
  /** Query-key type produced by {@link getEstimatedPriceQueryKey}. */
10
10
  export type GetEstimatedPriceQueryKey = ReturnType<typeof getEstimatedPriceQueryKey>;
11
11
  /** Options accepted by {@link getEstimatedPriceQueryOptions}. */
12
- export type GetEstimatedPriceOptions = Compute<GetEstimatedPriceParameters & QueryParameter<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>>;
12
+ export type GetEstimatedPriceOptions = Compute<Omit<GetEstimatedPriceParameters, "signal"> & QueryParameter<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>>;
13
13
  /** TanStack Query options returned by {@link getEstimatedPriceQueryOptions}. */
14
- export type GetEstimatedPriceQueryOptions = SymmioQueryOptions<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>;
14
+ export type GetEstimatedPriceQueryOptions = Omit<SymmioQueryOptions<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>, "queryFn"> & {
15
+ queryFn: (context?: {
16
+ signal?: AbortSignal;
17
+ }) => Promise<GetEstimatedPriceData>;
18
+ };
15
19
  /**
16
20
  * Build TanStack Query options for {@link getEstimatedPrice}. Disabled until
17
21
  * `quantity` and `price` are non-empty, so the estimate does not fire on partial
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/solvers/estimated-price/query.ts"],"names":[],"mappings":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,2BAA2B,EAChC,KAAK,2BAA2B,EACjC,MAAM,uBAAuB,CAAC;AAE/B,wEAAwE;AACxE,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEhE,8EAA8E;AAC9E,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,2BAA2B,GAAG,kBAAkB,CAAC,2DAE3G;AAED,oEAAoE;AACpE,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAErF,iEAAiE;AACjE,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,IAAI,CAAC,2BAA2B,EAAE,QAAQ,CAAC,GACzC,cAAc,CAAC,qBAAqB,EAAE,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,CAAC,CACjG,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,kBAAkB,CAAC,qBAAqB,EAAE,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,CAAC,EAClG,SAAS,CACV,GAAG;IACF,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACjF,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,GAChC,6BAA6B,CAoB/B"}
@@ -12,14 +12,15 @@ function r(e, r) {
12
12
  configKey: e.getChainConfigKey(r.chainId)
13
13
  }),
14
14
  enabled: (r.query?.enabled ?? !0) && r.quantity.length > 0 && r.price.length > 0,
15
- queryFn: () => t(e, {
15
+ queryFn: (n) => t(e, {
16
16
  chainId: r.chainId,
17
17
  solverId: r.solverId,
18
18
  symbolId: r.symbolId,
19
19
  quantity: r.quantity,
20
20
  positionType: r.positionType,
21
21
  entry: r.entry,
22
- price: r.price
22
+ price: r.price,
23
+ signal: n?.signal
23
24
  })
24
25
  };
25
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","names":[],"sources":["../../../src/solvers/estimated-price/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 {\n getEstimatedPrice,\n type GetEstimatedPriceParameters,\n type GetEstimatedPriceReturnType,\n} from \"./get-estimated-price\";\n\n/** Data resolved by the {@link getEstimatedPriceQueryOptions} query. */\nexport type GetEstimatedPriceData = GetEstimatedPriceReturnType;\n\n/** Build the TanStack Query key for {@link getEstimatedPriceQueryOptions}. */\nexport function getEstimatedPriceQueryKey(options: Compute<GetEstimatedPriceParameters & ConfigKeyParameter>) {\n return [\"getEstimatedPrice\", filterQueryOptions(options)] as const;\n}\n\n/** Query-key type produced by {@link getEstimatedPriceQueryKey}. */\nexport type GetEstimatedPriceQueryKey = ReturnType<typeof getEstimatedPriceQueryKey>;\n\n/** Options accepted by {@link getEstimatedPriceQueryOptions}. */\nexport type GetEstimatedPriceOptions = Compute<\n GetEstimatedPriceParameters &\n QueryParameter<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>\n>;\n\n/** TanStack Query options returned by {@link getEstimatedPriceQueryOptions}. */\nexport type GetEstimatedPriceQueryOptions = SymmioQueryOptions<\n GetEstimatedPriceData,\n Error,\n GetEstimatedPriceData,\n GetEstimatedPriceQueryKey\n>;\n\n/**\n * Build TanStack Query options for {@link getEstimatedPrice}. Disabled until\n * `quantity` and `price` are non-empty, so the estimate does not fire on partial\n * input.\n *\n * @example\n * ```ts\n * useQuery(getEstimatedPriceQueryOptions(config, { symbolId, quantity, positionType, entry: \"open\", price }));\n * ```\n */\nexport function getEstimatedPriceQueryOptions(\n config: Config,\n options: GetEstimatedPriceOptions,\n): GetEstimatedPriceQueryOptions {\n return {\n ...options.query,\n queryKey: getEstimatedPriceQueryKey({\n ...options,\n configKey: config.getChainConfigKey(options.chainId),\n }),\n enabled: (options.query?.enabled ?? true) && options.quantity.length > 0 && options.price.length > 0,\n queryFn: () =>\n getEstimatedPrice(config, {\n chainId: options.chainId,\n solverId: options.solverId,\n symbolId: options.symbolId,\n quantity: options.quantity,\n positionType: options.positionType,\n entry: options.entry,\n price: options.price,\n }),\n };\n}\n"],"mappings":";;;AAcA,SAAgB,EAA0B,GAAoE;CAC5G,OAAO,CAAC,qBAAqB,EAAmB,CAAO,CAAC;AAC1D;AA6BA,SAAgB,EACd,GACA,GAC+B;CAC/B,OAAO;EACL,GAAG,EAAQ;EACX,UAAU,EAA0B;GAClC,GAAG;GACH,WAAW,EAAO,kBAAkB,EAAQ,OAAO;EACrD,CAAC;EACD,UAAU,EAAQ,OAAO,WAAW,OAAS,EAAQ,SAAS,SAAS,KAAK,EAAQ,MAAM,SAAS;EACnG,eACE,EAAkB,GAAQ;GACxB,SAAS,EAAQ;GACjB,UAAU,EAAQ;GAClB,UAAU,EAAQ;GAClB,UAAU,EAAQ;GAClB,cAAc,EAAQ;GACtB,OAAO,EAAQ;GACf,OAAO,EAAQ;EACjB,CAAC;CACL;AACF"}
1
+ {"version":3,"file":"query.js","names":[],"sources":["../../../src/solvers/estimated-price/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 {\n getEstimatedPrice,\n type GetEstimatedPriceParameters,\n type GetEstimatedPriceReturnType,\n} from \"./get-estimated-price\";\n\n/** Data resolved by the {@link getEstimatedPriceQueryOptions} query. */\nexport type GetEstimatedPriceData = GetEstimatedPriceReturnType;\n\n/** Build the TanStack Query key for {@link getEstimatedPriceQueryOptions}. */\nexport function getEstimatedPriceQueryKey(options: Compute<GetEstimatedPriceParameters & ConfigKeyParameter>) {\n return [\"getEstimatedPrice\", filterQueryOptions(options)] as const;\n}\n\n/** Query-key type produced by {@link getEstimatedPriceQueryKey}. */\nexport type GetEstimatedPriceQueryKey = ReturnType<typeof getEstimatedPriceQueryKey>;\n\n/** Options accepted by {@link getEstimatedPriceQueryOptions}. */\nexport type GetEstimatedPriceOptions = Compute<\n Omit<GetEstimatedPriceParameters, \"signal\"> &\n QueryParameter<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>\n>;\n\n/** TanStack Query options returned by {@link getEstimatedPriceQueryOptions}. */\nexport type GetEstimatedPriceQueryOptions = Omit<\n SymmioQueryOptions<GetEstimatedPriceData, Error, GetEstimatedPriceData, GetEstimatedPriceQueryKey>,\n \"queryFn\"\n> & {\n queryFn: (context?: { signal?: AbortSignal }) => Promise<GetEstimatedPriceData>;\n};\n\n/**\n * Build TanStack Query options for {@link getEstimatedPrice}. Disabled until\n * `quantity` and `price` are non-empty, so the estimate does not fire on partial\n * input.\n *\n * @example\n * ```ts\n * useQuery(getEstimatedPriceQueryOptions(config, { symbolId, quantity, positionType, entry: \"open\", price }));\n * ```\n */\nexport function getEstimatedPriceQueryOptions(\n config: Config,\n options: GetEstimatedPriceOptions,\n): GetEstimatedPriceQueryOptions {\n return {\n ...options.query,\n queryKey: getEstimatedPriceQueryKey({\n ...options,\n configKey: config.getChainConfigKey(options.chainId),\n }),\n enabled: (options.query?.enabled ?? true) && options.quantity.length > 0 && options.price.length > 0,\n queryFn: (context) =>\n getEstimatedPrice(config, {\n chainId: options.chainId,\n solverId: options.solverId,\n symbolId: options.symbolId,\n quantity: options.quantity,\n positionType: options.positionType,\n entry: options.entry,\n price: options.price,\n signal: context?.signal,\n }),\n };\n}\n"],"mappings":";;;AAcA,SAAgB,EAA0B,GAAoE;CAC5G,OAAO,CAAC,qBAAqB,EAAmB,CAAO,CAAC;AAC1D;AA6BA,SAAgB,EACd,GACA,GAC+B;CAC/B,OAAO;EACL,GAAG,EAAQ;EACX,UAAU,EAA0B;GAClC,GAAG;GACH,WAAW,EAAO,kBAAkB,EAAQ,OAAO;EACrD,CAAC;EACD,UAAU,EAAQ,OAAO,WAAW,OAAS,EAAQ,SAAS,SAAS,KAAK,EAAQ,MAAM,SAAS;EACnG,UAAU,MACR,EAAkB,GAAQ;GACxB,SAAS,EAAQ;GACjB,UAAU,EAAQ;GAClB,UAAU,EAAQ;GAClB,UAAU,EAAQ;GAClB,cAAc,EAAQ;GACtB,OAAO,EAAQ;GACf,OAAO,EAAQ;GACf,QAAQ,GAAS;EACnB,CAAC;CACL;AACF"}
@@ -0,0 +1,4 @@
1
+ import { EnigmaMarketFundingInfo } from '../types.js';
2
+ /** Fetch Enigma symbol-ID funding through its generated client. @internal */
3
+ export declare function fetchEnigmaFundingInfo(baseURL: string, symbolIds?: readonly number[]): Promise<EnigmaMarketFundingInfo[]>;
4
+ //# sourceMappingURL=enigma-funding-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enigma-funding-info.d.ts","sourceRoot":"","sources":["../../../../src/solvers/funding-info/adapters/enigma-funding-info.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,6EAA6E;AAC7E,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAC5B,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAWpC"}
@@ -0,0 +1,17 @@
1
+ import { getFundingInfo as e } from "../../types/generated/enigma-solver.js";
2
+ import { toMarketFundingInfo as t } from "../to-funding-info.js";
3
+ //#region src/solvers/funding-info/adapters/enigma-funding-info.ts
4
+ async function n(n, r) {
5
+ let i = await e(r ? { symbol_ids: [...r] } : void 0, {
6
+ baseURL: n,
7
+ paramsSerializer: { indexes: null }
8
+ });
9
+ return Object.entries(i.data).flatMap(([e, n]) => {
10
+ let r = Number(e);
11
+ return !Number.isSafeInteger(r) || r <= 0 || !n || typeof n != "object" ? [] : [t(r, n)];
12
+ });
13
+ }
14
+ //#endregion
15
+ export { n as fetchEnigmaFundingInfo };
16
+
17
+ //# sourceMappingURL=enigma-funding-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enigma-funding-info.js","names":[],"sources":["../../../../src/solvers/funding-info/adapters/enigma-funding-info.ts"],"sourcesContent":["import { getFundingInfo as requestFundingInfo } from \"../../types/generated/enigma-solver\";\nimport { toMarketFundingInfo } from \"../to-funding-info\";\nimport type { EnigmaMarketFundingInfo } from \"../types\";\n/** Fetch Enigma symbol-ID funding through its generated client. @internal */\nexport async function fetchEnigmaFundingInfo(\n baseURL: string,\n symbolIds?: readonly number[],\n): Promise<EnigmaMarketFundingInfo[]> {\n const response = await requestFundingInfo(symbolIds ? { symbol_ids: [...symbolIds] } : undefined, {\n baseURL,\n // The solver accepts repeated keys, not Axios's default bracketed arrays.\n paramsSerializer: { indexes: null },\n });\n return Object.entries(response.data).flatMap(([key, raw]) => {\n const symbolId = Number(key);\n if (!Number.isSafeInteger(symbolId) || symbolId <= 0 || !raw || typeof raw !== \"object\") return [];\n return [toMarketFundingInfo(symbolId, raw)];\n });\n}\n"],"mappings":";;;AAIA,eAAsB,EACpB,GACA,GACoC;CACpC,IAAM,IAAW,MAAM,EAAmB,IAAY,EAAE,YAAY,CAAC,GAAG,CAAS,EAAE,IAAI,KAAA,GAAW;EAChG;EAEA,kBAAkB,EAAE,SAAS,KAAK;CACpC,CAAC;CACD,OAAO,OAAO,QAAQ,EAAS,IAAI,EAAE,SAAS,CAAC,GAAK,OAAS;EAC3D,IAAM,IAAW,OAAO,CAAG;EAE3B,OADI,CAAC,OAAO,cAAc,CAAQ,KAAK,KAAY,KAAK,CAAC,KAAO,OAAO,KAAQ,WAAiB,CAAC,IAC1F,CAAC,EAAoB,GAAU,CAAG,CAAC;CAC5C,CAAC;AACH"}
@@ -0,0 +1,4 @@
1
+ import { RasaMarketFundingInfo } from '../types.js';
2
+ /** Fetch Rasa's existing ticker-based funding response. @internal */
3
+ export declare function fetchRasaFundingInfo(baseURL: string, symbols?: readonly string[]): Promise<RasaMarketFundingInfo[]>;
4
+ //# sourceMappingURL=rasa-funding-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rasa-funding-info.d.ts","sourceRoot":"","sources":["../../../../src/solvers/funding-info/adapters/rasa-funding-info.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,qEAAqE;AACrE,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAC1B,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAalC"}
@@ -0,0 +1,21 @@
1
+ import { getFundingInfoGetFundingInfoGet as e } from "../../types/generated/rasa-solver.js";
2
+ import { toFiniteNumber as t } from "@symmio/utils/number";
3
+ //#region src/solvers/funding-info/adapters/rasa-funding-info.ts
4
+ async function n(n, r) {
5
+ let i = await e(r ? { symbols: [...r] } : void 0, {
6
+ baseURL: n,
7
+ paramsSerializer: { indexes: null }
8
+ });
9
+ return Object.entries(i.data).map(([e, n]) => ({
10
+ kind: "rasa",
11
+ symbol: e,
12
+ nextFundingRateLong: t(n.next_funding_rate_long),
13
+ nextFundingRateShort: t(n.next_funding_rate_short),
14
+ nextFundingTime: t(n.next_funding_time),
15
+ epochDurationSeconds: t(n.funding_rate_epoch_duration)
16
+ }));
17
+ }
18
+ //#endregion
19
+ export { n as fetchRasaFundingInfo };
20
+
21
+ //# sourceMappingURL=rasa-funding-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rasa-funding-info.js","names":[],"sources":["../../../../src/solvers/funding-info/adapters/rasa-funding-info.ts"],"sourcesContent":["import { toFiniteNumber } from \"@symmio/utils/number\";\nimport { getFundingInfoGetFundingInfoGet } from \"../../types/generated/rasa-solver\";\nimport type { RasaMarketFundingInfo } from \"../types\";\n/** Fetch Rasa's existing ticker-based funding response. @internal */\nexport async function fetchRasaFundingInfo(\n baseURL: string,\n symbols?: readonly string[],\n): Promise<RasaMarketFundingInfo[]> {\n const response = await getFundingInfoGetFundingInfoGet(symbols ? { symbols: [...symbols] } : undefined, {\n baseURL,\n paramsSerializer: { indexes: null },\n });\n return Object.entries(response.data).map(([symbol, raw]) => ({\n kind: \"rasa\",\n symbol,\n nextFundingRateLong: toFiniteNumber(raw.next_funding_rate_long),\n nextFundingRateShort: toFiniteNumber(raw.next_funding_rate_short),\n nextFundingTime: toFiniteNumber(raw.next_funding_time),\n epochDurationSeconds: toFiniteNumber(raw.funding_rate_epoch_duration),\n }));\n}\n"],"mappings":";;;AAIA,eAAsB,EACpB,GACA,GACkC;CAClC,IAAM,IAAW,MAAM,EAAgC,IAAU,EAAE,SAAS,CAAC,GAAG,CAAO,EAAE,IAAI,KAAA,GAAW;EACtG;EACA,kBAAkB,EAAE,SAAS,KAAK;CACpC,CAAC;CACD,OAAO,OAAO,QAAQ,EAAS,IAAI,EAAE,KAAK,CAAC,GAAQ,QAAU;EAC3D,MAAM;EACN;EACA,qBAAqB,EAAe,EAAI,sBAAsB;EAC9D,sBAAsB,EAAe,EAAI,uBAAuB;EAChE,iBAAiB,EAAe,EAAI,iBAAiB;EACrD,sBAAsB,EAAe,EAAI,2BAA2B;CACtE,EAAE;AACJ"}