@symmio/trading-react 3.4.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/estimated-price/use-estimated-price.js +2 -2
- package/dist/estimated-price/use-estimated-price.js.map +1 -1
- package/dist/funding/index.d.ts +3 -0
- package/dist/funding/index.d.ts.map +1 -0
- package/dist/funding/use-funding-index-checkpoints.d.ts +29 -0
- package/dist/funding/use-funding-index-checkpoints.d.ts.map +1 -0
- package/dist/funding/use-funding-index-checkpoints.js +27 -0
- package/dist/funding/use-funding-index-checkpoints.js.map +1 -0
- package/dist/funding/use-quote-funding-settlements.d.ts +28 -0
- package/dist/funding/use-quote-funding-settlements.d.ts.map +1 -0
- package/dist/funding/use-quote-funding-settlements.js +27 -0
- package/dist/funding/use-quote-funding-settlements.js.map +1 -0
- package/dist/funding-info/use-funding-info.d.ts +10 -7
- package/dist/funding-info/use-funding-info.d.ts.map +1 -1
- package/dist/funding-info/use-funding-info.js.map +1 -1
- package/dist/index.d.ts +20 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +147 -139
- package/dist/liquidation/index.d.ts +2 -0
- package/dist/liquidation/index.d.ts.map +1 -0
- package/dist/liquidation/use-liquidation-details.d.ts +28 -0
- package/dist/liquidation/use-liquidation-details.d.ts.map +1 -0
- package/dist/liquidation/use-liquidation-details.js +27 -0
- package/dist/liquidation/use-liquidation-details.js.map +1 -0
- package/dist/margin/index.d.ts +1 -0
- package/dist/margin/index.d.ts.map +1 -1
- package/dist/margin/use-margin-transfers.d.ts +32 -0
- package/dist/margin/use-margin-transfers.d.ts.map +1 -0
- package/dist/margin/use-margin-transfers.js +27 -0
- package/dist/margin/use-margin-transfers.js.map +1 -0
- package/dist/market-info/use-market-info.d.ts +3 -0
- package/dist/market-info/use-market-info.d.ts.map +1 -1
- package/dist/market-info/use-market-info.js.map +1 -1
- package/dist/notional-cap/index.d.ts +1 -0
- package/dist/notional-cap/index.d.ts.map +1 -1
- package/dist/notional-cap/use-notional-cap-all.d.ts +1 -1
- package/dist/notional-cap/use-notional-cap-all.js.map +1 -1
- package/dist/notional-cap/use-notional-cap-page.d.ts +39 -0
- package/dist/notional-cap/use-notional-cap-page.d.ts.map +1 -0
- package/dist/notional-cap/use-notional-cap-page.js +32 -0
- package/dist/notional-cap/use-notional-cap-page.js.map +1 -0
- package/dist/pools/use-listing-markets.d.ts +2 -0
- package/dist/pools/use-listing-markets.d.ts.map +1 -1
- package/dist/pools/use-listing-markets.js.map +1 -1
- package/dist/quotes/index.d.ts +3 -0
- package/dist/quotes/index.d.ts.map +1 -1
- package/dist/quotes/use-is-party-a-liquidated.d.ts +24 -0
- package/dist/quotes/use-is-party-a-liquidated.d.ts.map +1 -0
- package/dist/quotes/use-is-party-a-liquidated.js +27 -0
- package/dist/quotes/use-is-party-a-liquidated.js.map +1 -0
- package/dist/quotes/use-party-a-open-positions-batch.d.ts +30 -0
- package/dist/quotes/use-party-a-open-positions-batch.d.ts.map +1 -0
- package/dist/quotes/use-party-a-open-positions-batch.js +27 -0
- package/dist/quotes/use-party-a-open-positions-batch.js.map +1 -0
- package/dist/quotes/use-quote-events-by-type.d.ts +9 -4
- package/dist/quotes/use-quote-events-by-type.d.ts.map +1 -1
- package/dist/quotes/use-quote-events-by-type.js.map +1 -1
- package/dist/quotes/use-subgraph-quotes.d.ts +28 -0
- package/dist/quotes/use-subgraph-quotes.d.ts.map +1 -0
- package/dist/quotes/use-subgraph-quotes.js +27 -0
- package/dist/quotes/use-subgraph-quotes.js.map +1 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -114,142 +114,150 @@ import { useSolverCapabilities as ot, useSupportsGroupClose as st, useSupportsLi
|
|
|
114
114
|
import { useForceCloseParams as lt } from "./quotes/use-force-close-params.js";
|
|
115
115
|
import { useForceCloseEligibility as ut } from "./quotes/use-force-close-eligibility.js";
|
|
116
116
|
import { useGroupedQuotes as dt } from "./quotes/use-grouped-quotes.js";
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import {
|
|
145
|
-
import {
|
|
146
|
-
import {
|
|
147
|
-
import {
|
|
148
|
-
import {
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
152
|
-
import {
|
|
153
|
-
import {
|
|
154
|
-
import {
|
|
155
|
-
import {
|
|
156
|
-
import {
|
|
157
|
-
import {
|
|
158
|
-
import {
|
|
159
|
-
import {
|
|
160
|
-
import {
|
|
161
|
-
import {
|
|
162
|
-
import {
|
|
163
|
-
import {
|
|
164
|
-
import {
|
|
165
|
-
import {
|
|
166
|
-
import {
|
|
167
|
-
import {
|
|
168
|
-
import {
|
|
169
|
-
import {
|
|
170
|
-
import {
|
|
171
|
-
import {
|
|
172
|
-
import {
|
|
173
|
-
import {
|
|
174
|
-
import {
|
|
175
|
-
import {
|
|
176
|
-
import {
|
|
177
|
-
import {
|
|
178
|
-
import {
|
|
179
|
-
import {
|
|
180
|
-
import {
|
|
181
|
-
import {
|
|
182
|
-
import {
|
|
183
|
-
import {
|
|
184
|
-
import {
|
|
185
|
-
import {
|
|
186
|
-
import {
|
|
187
|
-
import {
|
|
188
|
-
import {
|
|
189
|
-
import {
|
|
190
|
-
import {
|
|
191
|
-
import {
|
|
192
|
-
import {
|
|
193
|
-
import {
|
|
194
|
-
import {
|
|
195
|
-
import {
|
|
196
|
-
import {
|
|
197
|
-
import {
|
|
198
|
-
import {
|
|
199
|
-
import {
|
|
200
|
-
import {
|
|
201
|
-
import {
|
|
202
|
-
import {
|
|
203
|
-
import {
|
|
204
|
-
import {
|
|
205
|
-
import {
|
|
206
|
-
import {
|
|
207
|
-
import {
|
|
208
|
-
import {
|
|
209
|
-
import {
|
|
210
|
-
import {
|
|
211
|
-
import {
|
|
212
|
-
import {
|
|
213
|
-
import {
|
|
214
|
-
import {
|
|
215
|
-
import {
|
|
216
|
-
import {
|
|
217
|
-
import {
|
|
218
|
-
import {
|
|
219
|
-
import {
|
|
220
|
-
import {
|
|
221
|
-
import {
|
|
222
|
-
import {
|
|
223
|
-
import {
|
|
224
|
-
import {
|
|
225
|
-
import {
|
|
226
|
-
import {
|
|
227
|
-
import {
|
|
228
|
-
import {
|
|
229
|
-
import {
|
|
230
|
-
import {
|
|
231
|
-
import {
|
|
232
|
-
import {
|
|
233
|
-
import {
|
|
234
|
-
import {
|
|
235
|
-
import {
|
|
236
|
-
import {
|
|
237
|
-
import {
|
|
238
|
-
import {
|
|
239
|
-
import {
|
|
240
|
-
import {
|
|
241
|
-
import {
|
|
242
|
-
import {
|
|
243
|
-
import {
|
|
244
|
-
import {
|
|
245
|
-
import {
|
|
246
|
-
import {
|
|
247
|
-
import {
|
|
248
|
-
import {
|
|
249
|
-
import {
|
|
250
|
-
import {
|
|
251
|
-
import {
|
|
252
|
-
import {
|
|
253
|
-
import {
|
|
254
|
-
import {
|
|
255
|
-
|
|
117
|
+
import { useIsPartyALiquidated as ft } from "./quotes/use-is-party-a-liquidated.js";
|
|
118
|
+
import { useLimitOrders as pt } from "./quotes/use-limit-orders.js";
|
|
119
|
+
import { usePartyAOpenPositionsBatch as mt } from "./quotes/use-party-a-open-positions-batch.js";
|
|
120
|
+
import { usePartyAPendingQuotes as ht } from "./quotes/use-party-a-pending-quotes.js";
|
|
121
|
+
import { useQuote as gt } from "./quotes/use-quote.js";
|
|
122
|
+
import { useQuoteEventsByType as _t } from "./quotes/use-quote-events-by-type.js";
|
|
123
|
+
import { useQuotesFunding as vt } from "./quotes/use-quotes-funding.js";
|
|
124
|
+
import { useQuoteFunding as yt } from "./quotes/use-quote-funding.js";
|
|
125
|
+
import { useQuoteGroupFunding as bt } from "./quotes/use-quote-group-funding.js";
|
|
126
|
+
import { useQuoteGroupFundingHistory as xt } from "./quotes/use-quote-group-funding-history.js";
|
|
127
|
+
import { useAccountMarginRisk as St } from "./margin/use-account-margin-risk.js";
|
|
128
|
+
import { useEnigmaPriceByName as Ct } from "./price-service/use-enigma-price-by-name.js";
|
|
129
|
+
import { useEnigmaPriceByMarketId as wt } from "./price-service/use-enigma-price-by-market-id.js";
|
|
130
|
+
import { useQuoteGroupMarginRisk as Tt } from "./quotes/use-quote-group-margin-risk.js";
|
|
131
|
+
import { useQuoteHistory as Et } from "./quotes/use-quote-history.js";
|
|
132
|
+
import { useQuotesPendingFunding as Dt } from "./quotes/use-quotes-pending-funding.js";
|
|
133
|
+
import { useQuotePendingFunding as Ot } from "./quotes/use-quote-pending-funding.js";
|
|
134
|
+
import { useQuotePlatformFee as kt } from "./quotes/use-quote-platform-fee.js";
|
|
135
|
+
import { useQuotePriceHistory as At } from "./quotes/use-quote-price-history.js";
|
|
136
|
+
import { usePriceByMarketId as jt } from "./price-service/use-price-by-market-id.js";
|
|
137
|
+
import { useQuoteUpnlAndPnl as Mt } from "./quotes/use-quote-upnl-and-pnl.js";
|
|
138
|
+
import { useRequestToCancelCloseRequest as Nt } from "./quotes/use-request-to-cancel-close-request.js";
|
|
139
|
+
import { useRequestToCancelQuote as Pt } from "./quotes/use-request-to-cancel-quote.js";
|
|
140
|
+
import { useSubgraphQuery as Ft } from "./quotes/use-subgraph-query.js";
|
|
141
|
+
import { useSubgraphQuotes as It } from "./quotes/use-subgraph-quotes.js";
|
|
142
|
+
import { useAvailableInstantOpenMargin as Lt } from "./margin/use-available-instant-open-margin.js";
|
|
143
|
+
import { useMarginTransfers as Rt } from "./margin/use-margin-transfers.js";
|
|
144
|
+
import { useFundingIndexCheckpoints as zt } from "./funding/use-funding-index-checkpoints.js";
|
|
145
|
+
import { useQuoteFundingSettlements as Bt } from "./funding/use-quote-funding-settlements.js";
|
|
146
|
+
import { useLiquidationDetails as Vt } from "./liquidation/use-liquidation-details.js";
|
|
147
|
+
import { useBalanceHistory as Ht } from "./balance-history/use-balance-history.js";
|
|
148
|
+
import { useDepositHistory as Ut } from "./balance-history/use-deposit-history.js";
|
|
149
|
+
import { useWithdrawHistory as Wt } from "./balance-history/use-withdraw-history.js";
|
|
150
|
+
import { useTransferHistory as Gt } from "./transfers/use-transfer-history.js";
|
|
151
|
+
import { DEFAULT_NOTIONAL_CAP_POLLING_MS as Kt, useNotionalCapBySymbolId as qt } from "./notional-cap/use-notional-cap-by-symbol-id.js";
|
|
152
|
+
import { useNotionalCapAll as Jt } from "./notional-cap/use-notional-cap-all.js";
|
|
153
|
+
import { useNotionalCapPage as Yt } from "./notional-cap/use-notional-cap-page.js";
|
|
154
|
+
import { useOpenInterestBySymbolId as Xt } from "./notional-cap/use-open-interest-by-symbol-id.js";
|
|
155
|
+
import { useFundingInfo as Zt } from "./funding-info/use-funding-info.js";
|
|
156
|
+
import { useRevenueRecords as Qt } from "./revenue-records/use-revenue-records.js";
|
|
157
|
+
import { useSymbols as $t } from "./symbols/use-symbols.js";
|
|
158
|
+
import { useTradeVolume as en } from "./trade-volume/use-trade-volume.js";
|
|
159
|
+
import { useMarketInfo as tn } from "./market-info/use-market-info.js";
|
|
160
|
+
import { useSolverRevenue as nn } from "./solvers/use-solver-revenue.js";
|
|
161
|
+
import { useBinanceHealth as rn } from "./price-service/use-binance-health.js";
|
|
162
|
+
import { useBinancePremiumIndex as an } from "./price-service/use-binance-premium-index.js";
|
|
163
|
+
import { useBinancePrices as on } from "./price-service/use-binance-prices.js";
|
|
164
|
+
import { useBinanceSymbolsInfo as sn } from "./price-service/use-binance-symbols-info.js";
|
|
165
|
+
import { useEnigmaPriceServiceHealth as cn } from "./price-service/use-enigma-price-service-health.js";
|
|
166
|
+
import { useEnigmaPriceServiceMetadata as ln } from "./price-service/use-enigma-price-service-metadata.js";
|
|
167
|
+
import { useEnigmaPriceServicePricesByAddresses as un } from "./price-service/use-enigma-price-service-prices-by-addresses.js";
|
|
168
|
+
import { useEnigmaPriceServicePricesByNames as dn } from "./price-service/use-enigma-price-service-prices-by-names.js";
|
|
169
|
+
import { useEnigmaPriceServiceSymbolsInfo as fn } from "./price-service/use-enigma-price-service-symbols-info.js";
|
|
170
|
+
import { useEnigmaPrices as pn } from "./price-service/use-enigma-prices.js";
|
|
171
|
+
import { useMarkPrices as mn } from "./price-service/use-mark-prices.js";
|
|
172
|
+
import { useSearchNotifications as hn } from "./notifications/use-search-notifications.js";
|
|
173
|
+
import { useDeallocateUpnlSig as gn } from "./muon/use-deallocate-upnl-sig.js";
|
|
174
|
+
import { useForceClosePriceSig as _n } from "./muon/use-force-close-price-sig.js";
|
|
175
|
+
import { useMuonPartyAOverview as vn } from "./muon/use-muon-party-a-overview.js";
|
|
176
|
+
import { useMuonPrice as yn } from "./muon/use-muon-price.js";
|
|
177
|
+
import { useMuonPriceRange as bn } from "./muon/use-muon-price-range.js";
|
|
178
|
+
import { useMuonSettleUpnl as xn } from "./muon/use-muon-settle-upnl.js";
|
|
179
|
+
import { useMuonUpnl as Sn } from "./muon/use-muon-upnl.js";
|
|
180
|
+
import { useMuonUpnlA as Cn } from "./muon/use-muon-upnl-a.js";
|
|
181
|
+
import { useMuonUpnlAWithSymbolPrice as wn } from "./muon/use-muon-upnl-a-with-symbol-price.js";
|
|
182
|
+
import { useMuonUpnlB as Tn } from "./muon/use-muon-upnl-b.js";
|
|
183
|
+
import { useMuonUpnlWithSymbolPrice as En } from "./muon/use-muon-upnl-with-symbol-price.js";
|
|
184
|
+
import { useSendQuoteUpnlSig as Dn } from "./muon/use-send-quote-upnl-sig.js";
|
|
185
|
+
import { invalidateTpSlReads as On } from "./tpsl/invalidate-tpsl.js";
|
|
186
|
+
import { useDeleteQuoteGroupTpSl as kn } from "./tpsl/use-delete-quote-group-tpsl.js";
|
|
187
|
+
import { useDeleteQuoteTpSl as An } from "./tpsl/use-delete-quote-tpsl.js";
|
|
188
|
+
import { useQuoteGroupTpSl as jn } from "./tpsl/use-quote-group-tpsl.js";
|
|
189
|
+
import { useQuoteGroupTpSlEditor as Mn } from "./tpsl/use-quote-group-tpsl-editor.js";
|
|
190
|
+
import { useWatchTpSlNotifications as Nn } from "./tpsl/use-watch-tpsl-notifications.js";
|
|
191
|
+
import { useQuoteTpSl as Pn } from "./tpsl/use-quote-tpsl.js";
|
|
192
|
+
import { useSearchTpSlOrders as Fn } from "./tpsl/use-search-tpsl-orders.js";
|
|
193
|
+
import { useSetQuoteGroupTpSl as In } from "./tpsl/use-set-quote-group-tpsl.js";
|
|
194
|
+
import { useSetQuoteTpSl as Ln } from "./tpsl/use-set-quote-tpsl.js";
|
|
195
|
+
import { useTpSlConfig as Rn } from "./tpsl/use-tpsl-config.js";
|
|
196
|
+
import { useTpSlSigningSpec as zn } from "./tpsl/use-tpsl-signing-spec.js";
|
|
197
|
+
import { useTpSlSupported as Bn } from "./tpsl/use-tpsl-supported.js";
|
|
198
|
+
import { useBinanceCandleSource as Vn } from "./candles/use-binance-candle-source.js";
|
|
199
|
+
import { useCandleStream as Hn } from "./candles/use-candle-stream.js";
|
|
200
|
+
import { useCandles as Un } from "./candles/use-candles.js";
|
|
201
|
+
import { useTradingViewDatafeed as Wn } from "./candles/use-tradingview-datafeed.js";
|
|
202
|
+
import { useBinanceOrderbookSource as Gn } from "./orderbook/use-binance-orderbook-source.js";
|
|
203
|
+
import { useOrderbookStream as Kn } from "./orderbook/use-orderbook-stream.js";
|
|
204
|
+
import { useLiveOrderbook as qn } from "./orderbook/use-live-orderbook.js";
|
|
205
|
+
import { useOrderbook as Jn } from "./orderbook/use-orderbook.js";
|
|
206
|
+
import { useErrorMessage as Yn } from "./rasa-solver/use-error-message.js";
|
|
207
|
+
import { usePartyAUpnl as Xn } from "./rasa-solver/use-party-a-upnl.js";
|
|
208
|
+
import { useSolverBalanceInfo as Zn } from "./rasa-solver/use-solver-balance-info.js";
|
|
209
|
+
import { useSolverOpenInterest as Qn } from "./rasa-solver/use-solver-open-interest.js";
|
|
210
|
+
import { useSolverPriceRange as $n } from "./rasa-solver/use-solver-price-range.js";
|
|
211
|
+
import { useSolverReadiness as er } from "./rasa-solver/use-solver-readiness.js";
|
|
212
|
+
import { useAddMarket as tr } from "./pools/use-add-market.js";
|
|
213
|
+
import { useAuthenticateListing as nr } from "./pools/use-authenticate-listing.js";
|
|
214
|
+
import { useCancelWithdraw as rr } from "./pools/use-cancel-withdraw.js";
|
|
215
|
+
import { useClaimHistory as ir } from "./pools/use-claim-history.js";
|
|
216
|
+
import { useClaimProfit as ar } from "./pools/use-claim-profit.js";
|
|
217
|
+
import { useDepositAddress as or } from "./pools/use-deposit-address.js";
|
|
218
|
+
import { useListingConfig as sr } from "./pools/use-listing-config.js";
|
|
219
|
+
import { useListingMarketConfig as cr } from "./pools/use-listing-market-config.js";
|
|
220
|
+
import { useListingMarketDetail as lr } from "./pools/use-listing-market-detail.js";
|
|
221
|
+
import { useUserProfit as ur } from "./pools/use-user-profit.js";
|
|
222
|
+
import { useListingMarketConfigProjection as dr } from "./pools/use-listing-market-config-projection.js";
|
|
223
|
+
import { useListingMarkets as fr } from "./pools/use-listing-markets.js";
|
|
224
|
+
import { useListingStatus as pr } from "./pools/use-listing-status.js";
|
|
225
|
+
import { usePoolQuotes as mr } from "./pools/use-pool-quotes.js";
|
|
226
|
+
import { usePoolRewardChart as hr } from "./pools/use-pool-reward-chart.js";
|
|
227
|
+
import { usePoolTotalReward as gr } from "./pools/use-pool-total-reward.js";
|
|
228
|
+
import { usePoolTradeHistory as _r } from "./pools/use-pool-trade-history.js";
|
|
229
|
+
import { usePoolTransactions as vr } from "./pools/use-pool-transactions.js";
|
|
230
|
+
import { useRefundMarket as yr } from "./pools/use-refund-market.js";
|
|
231
|
+
import { useRetryListing as br } from "./pools/use-retry-listing.js";
|
|
232
|
+
import { useRetryListingInfo as xr } from "./pools/use-retry-listing-info.js";
|
|
233
|
+
import { useSupportsListingService as Sr } from "./pools/use-supports-listing-service.js";
|
|
234
|
+
import { useTokenPrice as Cr } from "./pools/use-token-price.js";
|
|
235
|
+
import { useUpdateListingMarketConfig as wr } from "./pools/use-update-listing-market-config.js";
|
|
236
|
+
import { useUserListingMarkets as Tr } from "./pools/use-user-listing-markets.js";
|
|
237
|
+
import { useUserRewardChart as Er } from "./pools/use-user-reward-chart.js";
|
|
238
|
+
import { useUserTotalReward as Dr } from "./pools/use-user-total-reward.js";
|
|
239
|
+
import { useUserTransactions as Or } from "./pools/use-user-transactions.js";
|
|
240
|
+
import { useWeeklyListingLimit as kr } from "./pools/use-weekly-listing-limit.js";
|
|
241
|
+
import { useWithdrawLp as Ar } from "./pools/use-withdraw-lp.js";
|
|
242
|
+
import { useInventoryTvl as jr } from "./inventory/use-inventory-tvl.js";
|
|
243
|
+
import { useInventoryTvlHistory as Mr } from "./inventory/use-inventory-tvl-history.js";
|
|
244
|
+
import { useApproveOperationalFee as Nr } from "./gasless/use-approve-operational-fee.js";
|
|
245
|
+
import { useGaslessBatchFeeQuote as Pr } from "./gasless/use-gasless-batch-fee-quote.js";
|
|
246
|
+
import { useGaslessDepositPolicy as Fr } from "./gasless/use-gasless-deposit-policy.js";
|
|
247
|
+
import { useGaslessFeeQuote as Ir } from "./gasless/use-gasless-fee-quote.js";
|
|
248
|
+
import { useGaslessRequest as Lr } from "./gasless/use-gasless-request.js";
|
|
249
|
+
import { useGaslessRequestTransactions as Rr } from "./gasless/use-gasless-request-transactions.js";
|
|
250
|
+
import { useGaslessWalletAddress as zr } from "./gasless/use-gasless-wallet-address.js";
|
|
251
|
+
import { useGaslessWalletCreationFee as Br } from "./gasless/use-gasless-wallet-creation-fee.js";
|
|
252
|
+
import { useGaslessWalletExecute as Vr } from "./gasless/use-gasless-wallet-execute.js";
|
|
253
|
+
import { useGaslessWalletExecuteSelectors as Hr } from "./gasless/use-gasless-wallet-execute-selectors.js";
|
|
254
|
+
import { useGaslessWalletNonce as Ur } from "./gasless/use-gasless-wallet-nonce.js";
|
|
255
|
+
import { useOperationalFeeAllowance as Wr } from "./gasless/use-operational-fee-allowance.js";
|
|
256
|
+
import { useRelayGaslessBatch as Gr } from "./gasless/use-relay-gasless-batch.js";
|
|
257
|
+
import { useRelayInstantOperations as Kr } from "./gasless/use-relay-instant-operations.js";
|
|
258
|
+
import { useResubmitGaslessRequest as qr } from "./gasless/use-resubmit-gasless-request.js";
|
|
259
|
+
import { useSettleGaslessDepositExistingAccount as Jr } from "./gasless/use-settle-gasless-deposit-existing-account.js";
|
|
260
|
+
import { useSettleGaslessDepositNewAccount as Yr } from "./gasless/use-settle-gasless-deposit-new-account.js";
|
|
261
|
+
import { useSupportsGaslessService as Xr } from "./gasless/use-supports-gasless-service.js";
|
|
262
|
+
import { ADD_MARGIN_TO_NEXT_VA_SELECTOR as Zr, DEFAULT_TPSL_SLIPPAGE_LOWCAPS as Qr, GASLESS_RELAYABLE_FUNCTIONS as $r, GASLESS_RELAYABLE_SELECTORS as ei, GASLESS_SESSION_KEY_SELECTORS as ti, GASLESS_SESSION_KEY_WITHDRAW_SELECTORS as ni, GASLESS_TERMINAL_STATUSES as ri, GROUP_TPSL_SIDES as ii, GaslessRequestStatus as ai, INSTANT_TRADE_REQUIRED_SELECTORS as oi, LEGACY_INSTANT_TRADE_REQUIRED_SELECTORS as si, NotificationType as ci, OrderType as li, PositionType as ui, QuoteStatus as di, REQUEST_TO_CLOSE_POSITION_SELECTOR as fi, SEND_QUOTE_SELECTOR as pi, SEND_QUOTE_WITH_AFFILIATE_AND_DATA_SELECTOR as mi, SubAccountIsolationType as hi, SymmApiError as gi, SymmError as _i, VIRTUAL_ACCOUNT_ISOLATION_TYPE as vi, ZERO_LEG as yi, buildConditionalOrderLeg as bi, buildConditionalOrderMessage as xi, buildTpSlDeleteMessage as Si, calculateAvailableForOrder as Ci, calculateAvailableInstantOpenMargin as wi, calculateClosePrice as Ti, calculatePriceImpact as Ei, calculateQuoteLeverage as Di, calculateQuotePnl as Oi, calculateSolverCloseFee as ki, calculateTradeParams as Ai, childNotional as ji, clampClosePrecision as Mi, classifyGaslessFailure as Ni, decimalPriceToWei as Pi, decodeGaslessOperationFailure as Fi, deleteQuoteTpSl as Ii, deleteQuoteTpSlMutationOptions as Li, estimateGroupTpSlReturn as Ri, generateTpSlSalt as zi, getGaslessUnconfirmedSubmit as Bi, getPartyAOpenPositionsQueryKey as Vi, getPartyAOpenPositionsQueryOptions as Hi, getSessionKeySelectors as Ui, isGaslessIdempotencyConflictError as Wi, isGaslessRequestTerminal as Gi, isolationTypeForSide as Ki, parseGaslessErrorDetail as qi, parseTpSlFrame as Ji, planGroupTpSl as Yi, planGroupTpSlDelete as Xi, priceSlippageCalculation as Zi, sharePercent as Qi, signTpSlRequest as $i, summarizeQuoteGroupTpSl as ea, supportsEstimatedPrice as ta, toGroupTpSlChildren as na, toGroupTpSlOrders as ra, toSignableTpSlMessage as ia, validateInstantCloseAgainstMarket as aa, validateInstantOpenAgainstMarket as oa, validateTpSl as sa, watchTpSlNotifications as ca } from "@symmio/trading-core";
|
|
263
|
+
export { Zr as ADD_MARGIN_TO_NEXT_VA_SELECTOR, Kt as DEFAULT_NOTIONAL_CAP_POLLING_MS, Qr as DEFAULT_TPSL_SLIPPAGE_LOWCAPS, $r as GASLESS_RELAYABLE_FUNCTIONS, ei as GASLESS_RELAYABLE_SELECTORS, ti as GASLESS_SESSION_KEY_SELECTORS, ni as GASLESS_SESSION_KEY_WITHDRAW_SELECTORS, ri as GASLESS_TERMINAL_STATUSES, ii as GROUP_TPSL_SIDES, ai as GaslessRequestStatus, oi as INSTANT_TRADE_REQUIRED_SELECTORS, si as LEGACY_INSTANT_TRADE_REQUIRED_SELECTORS, ci as NotificationType, li as OrderType, ui as PositionType, di as QuoteStatus, fi as REQUEST_TO_CLOSE_POSITION_SELECTOR, pi as SEND_QUOTE_SELECTOR, mi as SEND_QUOTE_WITH_AFFILIATE_AND_DATA_SELECTOR, hi as SubAccountIsolationType, gi as SymmApiError, _i as SymmError, t as SymmioProvider, i as SymmioRequestError, p as TransactionRevertedError, vi as VIRTUAL_ACCOUNT_ISOLATION_TYPE, yi as ZERO_LEG, bi as buildConditionalOrderLeg, xi as buildConditionalOrderMessage, Si as buildTpSlDeleteMessage, Ci as calculateAvailableForOrder, wi as calculateAvailableInstantOpenMargin, Ti as calculateClosePrice, Ei as calculatePriceImpact, Di as calculateQuoteLeverage, Oi as calculateQuotePnl, ki as calculateSolverCloseFee, Ai as calculateTradeParams, ji as childNotional, Mi as clampClosePrecision, Ni as classifyGaslessFailure, e as createSessionKeyWalletClientResolver, Pi as decimalPriceToWei, Fi as decodeGaslessOperationFailure, Ii as deleteQuoteTpSl, Li as deleteQuoteTpSlMutationOptions, Ri as estimateGroupTpSlReturn, zi as generateTpSlSalt, Bi as getGaslessUnconfirmedSubmit, Vi as getPartyAOpenPositionsQueryKey, Hi as getPartyAOpenPositionsQueryOptions, Ui as getSessionKeySelectors, On as invalidateTpSlReads, Wi as isGaslessIdempotencyConflictError, Gi as isGaslessRequestTerminal, Ki as isolationTypeForSide, a as normalizeSymmError, qi as parseGaslessErrorDetail, Ji as parseTpSlFrame, Yi as planGroupTpSl, Xi as planGroupTpSlDelete, h as predicateMatch, Zi as priceSlippageCalculation, Qi as sharePercent, $i as signTpSlRequest, ea as summarizeQuoteGroupTpSl, ta as supportsEstimatedPrice, na as toGroupTpSlChildren, ra as toGroupTpSlOrders, be as toQuoteTpSl, ia as toSignableTpSlMessage, d as useAccountBalanceInfo, f as useAccountBalanceOf, Qe as useAccountLiquidationPrice, St as useAccountMarginRisk, et as useAccountUpnl, Z as useActiveDelegations, g as useAddMargin, tr as useAddMarket, _ as useAffiliateState, v as useAllocate, q as useApproveCollateral, Nr as useApproveOperationalFee, Q as useAreDelegationsActive, nr as useAuthenticateListing, Lt as useAvailableInstantOpenMargin, Ht as useBalanceHistory, Vn as useBinanceCandleSource, rn as useBinanceHealth, Gn as useBinanceOrderbookSource, an as useBinancePremiumIndex, on as useBinancePrices, sn as useBinanceSymbolsInfo, y as useCancelRegistration, rr as useCancelWithdraw, Hn as useCandleStream, Un as useCandles, ir as useClaimHistory, ar as useClaimProfit, tt as useCloseQuoteGroup, J as useCollateralAllowance, Y as useCollateralBalance, o as useConnectWallet, nt as useCoolDownsOfMA, b as useCreateSubAccounts, x as useDeallocate, S as useDeallocateAndInitiateWithdraw, gn as useDeallocateUpnlSig, $ as useDelegationExpiry, kn as useDeleteQuoteGroupTpSl, An as useDeleteQuoteTpSl, C as useDeleteSubAccount, w as useDeposit, or as useDepositAddress, T as useDepositAndAllocate, Ut as useDepositHistory, s as useDisconnectWallet, E as useEditAccountName, wt as useEnigmaPriceByMarketId, Ct as useEnigmaPriceByName, cn as useEnigmaPriceServiceHealth, ln as useEnigmaPriceServiceMetadata, un as useEnigmaPriceServicePricesByAddresses, dn as useEnigmaPriceServicePricesByNames, fn as useEnigmaPriceServiceSymbolsInfo, pn as useEnigmaPrices, Yn as useErrorMessage, ge as useEstimatedPrice, se as useFeeForUser, ee as useFinalizeRevokeDelegation, Fe as useFinalizeWithdrawRequest, rt as useForceCancelCloseRequest, it as useForceCancelQuote, at as useForceClose, ut as useForceCloseEligibility, lt as useForceCloseParams, _n as useForceClosePriceSig, Ke as useFundingFeesOfPartyB, zt as useFundingIndexCheckpoints, Zt as useFundingInfo, Pr as useGaslessBatchFeeQuote, Fr as useGaslessDepositPolicy, Ir as useGaslessFeeQuote, Lr as useGaslessRequest, Rr as useGaslessRequestTransactions, zr as useGaslessWalletAddress, Br as useGaslessWalletCreationFee, Vr as useGaslessWalletExecute, Hr as useGaslessWalletExecuteSelectors, Ur as useGaslessWalletNonce, D as useGeneratedAccountManagerAddress, te as useGrantDelegation, dt as useGroupedQuotes, ne as useInitiateRevokeDelegation, Ie as useInitiateWithdraw, re as useInstantClose, ie as useInstantCloseAuto, ae as useInstantCloseBulk, oe as useInstantCloseBulkAuto, fe as useInstantCloseFees, pe as useInstantCloses, me as useInstantOpen, he as useInstantOpenAuto, ve as useInstantOpenFees, ye as useInstantOpenQuoteId, we as useInstantOpenWithTpSl, Te as useInstantOpens, Ee as useInstantTradeRequiredSelectors, jr as useInventoryTvl, Mr as useInventoryTvlHistory, De as useIsDelegationActive, ft as useIsPartyALiquidated, Le as useLastWithdrawRequestId, Oe as useLimitCloseAuto, ke as useLimitOpenAuto, pt as useLimitOrders, Vt as useLiquidationDetails, sr as useListingConfig, cr as useListingMarketConfig, dr as useListingMarketConfigProjection, lr as useListingMarketDetail, fr as useListingMarkets, pr as useListingStatus, qn as useLiveOrderbook, _e as useLockedParams, $e as useManagedQuotes, Rt as useMarginTransfers, mn as useMarkPrices, tn as useMarketInfo, ce as useMarkets, vn as useMuonPartyAOverview, yn as useMuonPrice, bn as useMuonPriceRange, xn as useMuonSettleUpnl, Sn as useMuonUpnl, Cn as useMuonUpnlA, wn as useMuonUpnlAWithSymbolPrice, Tn as useMuonUpnlB, En as useMuonUpnlWithSymbolPrice, u as useNotifications, Jt as useNotionalCapAll, qt as useNotionalCapBySymbolId, Yt as useNotionalCapPage, qe as useOnchainContractMarkets, Xt as useOpenInterestBySymbolId, Wr as useOperationalFeeAllowance, Xe as useOptimisticQuotesStore, Jn as useOrderbook, Kn as useOrderbookStream, Ze as usePartyAOpenPositions, mt as usePartyAOpenPositionsBatch, ht as usePartyAPendingQuotes, Xn as usePartyAUpnl, Ae as usePendingRevocation, Re as usePendingWithdrawRequests, mr as usePoolQuotes, hr as usePoolRewardChart, gr as usePoolTotalReward, _r as usePoolTradeHistory, vr as usePoolTransactions, O as usePredictedNextVirtualAccount, je as usePrepareInstantOpenParams, jt as usePriceByMarketId, ue as usePriceByName, le as usePrices, gt as useQuote, _t as useQuoteEventsByType, yt as useQuoteFunding, Bt as useQuoteFundingSettlements, bt as useQuoteGroupFunding, xt as useQuoteGroupFundingHistory, Tt as useQuoteGroupMarginRisk, jn as useQuoteGroupTpSl, Mn as useQuoteGroupTpSlEditor, Et as useQuoteHistory, Ot as useQuotePendingFunding, kt as useQuotePlatformFee, At as useQuotePriceHistory, Pn as useQuoteTpSl, Mt as useQuoteUpnlAndPnl, vt as useQuotesFunding, Dt as useQuotesPendingFunding, yr as useRefundMarket, Gr as useRelayGaslessBatch, Kr as useRelayInstantOperations, k as useRemoveMargin, ze as useRequestCancelWithdraw, Nt as useRequestToCancelCloseRequest, Pt as useRequestToCancelQuote, A as useRequestToRegisterAffiliate, qr as useResubmitGaslessRequest, br as useRetryListing, xr as useRetryListingInfo, Qt as useRevenueRecords, Me as useRevocationCooldown, hn as useSearchNotifications, Fn as useSearchTpSlOrders, Dn as useSendQuoteUpnlSig, Ne as useSessionKeySelectors, In as useSetQuoteGroupTpSl, Ln as useSetQuoteTpSl, Jr as useSettleGaslessDepositExistingAccount, Yr as useSettleGaslessDepositNewAccount, j as useSimulateAddMargin, M as useSimulateAllocate, X as useSimulateApproveCollateral, N as useSimulateCreateSubAccounts, P as useSimulateDeallocate, F as useSimulateDeleteSubAccount, I as useSimulateDeposit, L as useSimulateDepositAndAllocate, R as useSimulateEditAccountName, Be as useSimulateFinalizeWithdrawRequest, Pe as useSimulateGrantDelegation, Ve as useSimulateInitiateWithdraw, z as useSimulateRemoveMargin, He as useSimulateRequestCancelWithdraw, Zn as useSolverBalanceInfo, ot as useSolverCapabilities, Je as useSolverErrorCodes, Ye as useSolverErrorMessage, de as useSolverInfo, Qn as useSolverOpenInterest, $n as useSolverPriceRange, er as useSolverReadiness, nn as useSolverRevenue, B as useSubAccount, V as useSubAccountVirtualNonce, H as useSubAccountsCountOfUser, Ft as useSubgraphQuery, It as useSubgraphQuotes, Xr as useSupportsGaslessService, st as useSupportsGroupClose, ct as useSupportsLimitOrder, Sr as useSupportsListingService, c as useSwitchToSymmioChain, $t as useSymbols, n as useSymmioChainId, r as useSymmioConfig, Cr as useTokenPrice, Rn as useTpSlConfig, xe as useTpSlRecord, Se as useTpSlRecords, zn as useTpSlSigningSpec, Ce as useTpSlStore, Bn as useTpSlSupported, en as useTradeVolume, Wn as useTradingViewDatafeed, m as useTransactionsStore, Gt as useTransferHistory, wr as useUpdateListingMarketConfig, Tr as useUserListingMarkets, ur as useUserProfit, Er as useUserRewardChart, U as useUserSubAccounts, W as useUserSubAccountsAddresses, Dr as useUserTotalReward, Or as useUserTransactions, G as useVirtualAccount, K as useVirtualAccountsAddressesOfSubAccount, l as useWalletAccount, Nn as useWatchTpSlNotifications, kr as useWeeklyListingLimit, Ue as useWithdraw, Wt as useWithdrawHistory, Ar as useWithdrawLp, We as useWithdrawRequest, Ge as useWithdrawableTime, aa as validateInstantCloseAgainstMarket, oa as validateInstantOpenAgainstMarket, sa as validateTpSl, ca as watchTpSlNotifications };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/liquidation/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ConfigParameter, GetLiquidationDetailsOptions, GetLiquidationDetailsReturnType } from '@symmio/trading-core';
|
|
2
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import { SymmioRequestError } from '../errors/symmio-request-error.js';
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for {@link useLiquidationDetails}: the core query options (filters, paging,
|
|
6
|
+
* sort, chain id, TanStack `query` overrides) plus an optional `config`.
|
|
7
|
+
*/
|
|
8
|
+
export type UseLiquidationDetailsParameters = GetLiquidationDetailsOptions & ConfigParameter;
|
|
9
|
+
/** Return type of {@link useLiquidationDetails}: one page of rows plus `hasMore`. */
|
|
10
|
+
export type UseLiquidationDetailsReturnType = UseQueryResult<GetLiquidationDetailsReturnType, SymmioRequestError>;
|
|
11
|
+
/**
|
|
12
|
+
* Read `LiquidationDetail` entities — one per PartyA liquidation — from the
|
|
13
|
+
* analytics subgraph (`getLiquidationDetails`). Every filter is optional and
|
|
14
|
+
* applied only when passed.
|
|
15
|
+
*
|
|
16
|
+
* `chainId` defaults to the connected chain. Errors normalized to
|
|
17
|
+
* {@link SymmioRequestError}.
|
|
18
|
+
*
|
|
19
|
+
* @param parameters - Filters, paging, sort, optional chain id and config.
|
|
20
|
+
* @returns The TanStack query result.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const { data } = useLiquidationDetails({ source: diamond, partyAs: [virtualAccount] });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function useLiquidationDetails(parameters?: UseLiquidationDetailsParameters): UseLiquidationDetailsReturnType;
|
|
28
|
+
//# sourceMappingURL=use-liquidation-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-liquidation-details.d.ts","sourceRoot":"","sources":["../../src/liquidation/use-liquidation-details.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG,4BAA4B,GAAG,eAAe,CAAC;AAE7F,qFAAqF;AACrF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,GAAE,+BAAoC,GAC/C,+BAA+B,CAkBjC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
|
|
3
|
+
import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
|
|
4
|
+
import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
|
|
5
|
+
import { getLiquidationDetailsQueryOptions as r } from "@symmio/trading-core";
|
|
6
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
7
|
+
//#region src/liquidation/use-liquidation-details.ts
|
|
8
|
+
function a(a = {}) {
|
|
9
|
+
let o = t(a), s = e(), c = r(o, {
|
|
10
|
+
...a,
|
|
11
|
+
chainId: a.chainId ?? s
|
|
12
|
+
});
|
|
13
|
+
return i({
|
|
14
|
+
...c,
|
|
15
|
+
queryFn: async () => {
|
|
16
|
+
try {
|
|
17
|
+
return await c.queryFn();
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw n(e);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a as useLiquidationDetails };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=use-liquidation-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-liquidation-details.js","names":[],"sources":["../../src/liquidation/use-liquidation-details.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getLiquidationDetailsQueryOptions,\n type ConfigParameter,\n type GetLiquidationDetailsOptions,\n type GetLiquidationDetailsReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useLiquidationDetails}: the core query options (filters, paging,\n * sort, chain id, TanStack `query` overrides) plus an optional `config`.\n */\nexport type UseLiquidationDetailsParameters = GetLiquidationDetailsOptions & ConfigParameter;\n\n/** Return type of {@link useLiquidationDetails}: one page of rows plus `hasMore`. */\nexport type UseLiquidationDetailsReturnType = UseQueryResult<GetLiquidationDetailsReturnType, SymmioRequestError>;\n\n/**\n * Read `LiquidationDetail` entities — one per PartyA liquidation — from the\n * analytics subgraph (`getLiquidationDetails`). Every filter is optional and\n * applied only when passed.\n *\n * `chainId` defaults to the connected chain. Errors normalized to\n * {@link SymmioRequestError}.\n *\n * @param parameters - Filters, paging, sort, optional chain id and config.\n * @returns The TanStack query result.\n *\n * @example\n * ```tsx\n * const { data } = useLiquidationDetails({ source: diamond, partyAs: [virtualAccount] });\n * ```\n */\nexport function useLiquidationDetails(\n parameters: UseLiquidationDetailsParameters = {},\n): UseLiquidationDetailsReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getLiquidationDetailsQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseLiquidationDetailsReturnType;\n}\n"],"mappings":";;;;;;;AAuCA,SAAgB,EACd,IAA8C,CAAC,GACd;CACjC,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAkC,GAAQ;EACxD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
|
package/dist/margin/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/margin/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/margin/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ConfigParameter, GetMarginTransfersOptions, GetMarginTransfersReturnType } from '@symmio/trading-core';
|
|
2
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import { SymmioRequestError } from '../errors/symmio-request-error.js';
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for {@link useMarginTransfers}: the core query options (filters, paging,
|
|
6
|
+
* sort, chain id, TanStack `query` overrides) plus an optional `config`.
|
|
7
|
+
*/
|
|
8
|
+
export type UseMarginTransfersParameters = GetMarginTransfersOptions & ConfigParameter;
|
|
9
|
+
/** Return type of {@link useMarginTransfers}: one page of rows plus `hasMore`. */
|
|
10
|
+
export type UseMarginTransfersReturnType = UseQueryResult<GetMarginTransfersReturnType, SymmioRequestError>;
|
|
11
|
+
/**
|
|
12
|
+
* Read `MarginTransfer` entities — margin moved between a SubAccount and its
|
|
13
|
+
* Virtual Accounts — from the analytics subgraph (`getMarginTransfers`). Every
|
|
14
|
+
* filter is optional and applied only when passed; the query stays disabled
|
|
15
|
+
* while a list filter is an empty array.
|
|
16
|
+
*
|
|
17
|
+
* `chainId` defaults to the connected chain. Errors normalized to
|
|
18
|
+
* {@link SymmioRequestError}.
|
|
19
|
+
*
|
|
20
|
+
* @param parameters - Filters, paging, sort, optional chain id and config.
|
|
21
|
+
* @returns The TanStack query result.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const { data } = useMarginTransfers({
|
|
26
|
+
* types: [MarginTransferType.Add],
|
|
27
|
+
* transactions: openTransactions,
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function useMarginTransfers(parameters?: UseMarginTransfersParameters): UseMarginTransfersReturnType;
|
|
32
|
+
//# sourceMappingURL=use-margin-transfers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-margin-transfers.d.ts","sourceRoot":"","sources":["../../src/margin/use-margin-transfers.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,yBAAyB,GAAG,eAAe,CAAC;AAEvF,kFAAkF;AAClF,MAAM,MAAM,4BAA4B,GAAG,cAAc,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,GAAE,4BAAiC,GAAG,4BAA4B,CAkB9G"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
|
|
3
|
+
import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
|
|
4
|
+
import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
|
|
5
|
+
import { getMarginTransfersQueryOptions as r } from "@symmio/trading-core";
|
|
6
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
7
|
+
//#region src/margin/use-margin-transfers.ts
|
|
8
|
+
function a(a = {}) {
|
|
9
|
+
let o = t(a), s = e(), c = r(o, {
|
|
10
|
+
...a,
|
|
11
|
+
chainId: a.chainId ?? s
|
|
12
|
+
});
|
|
13
|
+
return i({
|
|
14
|
+
...c,
|
|
15
|
+
queryFn: async () => {
|
|
16
|
+
try {
|
|
17
|
+
return await c.queryFn();
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw n(e);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a as useMarginTransfers };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=use-margin-transfers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-margin-transfers.js","names":[],"sources":["../../src/margin/use-margin-transfers.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getMarginTransfersQueryOptions,\n type ConfigParameter,\n type GetMarginTransfersOptions,\n type GetMarginTransfersReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useMarginTransfers}: the core query options (filters, paging,\n * sort, chain id, TanStack `query` overrides) plus an optional `config`.\n */\nexport type UseMarginTransfersParameters = GetMarginTransfersOptions & ConfigParameter;\n\n/** Return type of {@link useMarginTransfers}: one page of rows plus `hasMore`. */\nexport type UseMarginTransfersReturnType = UseQueryResult<GetMarginTransfersReturnType, SymmioRequestError>;\n\n/**\n * Read `MarginTransfer` entities — margin moved between a SubAccount and its\n * Virtual Accounts — from the analytics subgraph (`getMarginTransfers`). Every\n * filter is optional and applied only when passed; the query stays disabled\n * while a list filter is an empty array.\n *\n * `chainId` defaults to the connected chain. Errors normalized to\n * {@link SymmioRequestError}.\n *\n * @param parameters - Filters, paging, sort, optional chain id and config.\n * @returns The TanStack query result.\n *\n * @example\n * ```tsx\n * const { data } = useMarginTransfers({\n * types: [MarginTransferType.Add],\n * transactions: openTransactions,\n * });\n * ```\n */\nexport function useMarginTransfers(parameters: UseMarginTransfersParameters = {}): UseMarginTransfersReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getMarginTransfersQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseMarginTransfersReturnType;\n}\n"],"mappings":";;;;;;;AA2CA,SAAgB,EAAmB,IAA2C,CAAC,GAAiC;CAC9G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA+B,GAAQ;EACrD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
|
|
@@ -18,6 +18,9 @@ export type UseMarketInfoReturnType<K extends SymmioSolverKind = SymmioSolverKin
|
|
|
18
18
|
* Does not poll by default; pass `query.refetchInterval` to opt into polling.
|
|
19
19
|
* Errors are normalized to {@link SymmioRequestError}.
|
|
20
20
|
*
|
|
21
|
+
* @param parameters - Deployment, optional config and query overrides.
|
|
22
|
+
* @returns Query state; Enigma rows identify markets by symbolId.
|
|
23
|
+
* @throws {SymmioRequestError} Action failures appear in the query error state.
|
|
21
24
|
* @example
|
|
22
25
|
* ```tsx
|
|
23
26
|
* const { data } = useMarketInfo();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-market-info.d.ts","sourceRoot":"","sources":["../../src/market-info/use-market-info.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAC1G,eAAe,CAAC;AAElB,8EAA8E;AAC9E,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,cAAc,CACjG,uBAAuB,CAAC,CAAC,CAAC,EAC1B,kBAAkB,CACnB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"use-market-info.d.ts","sourceRoot":"","sources":["../../src/market-info/use-market-info.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAC1G,eAAe,CAAC;AAElB,8EAA8E;AAC9E,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,cAAc,CACjG,uBAAuB,CAAC,CAAC,CAAC,EAC1B,kBAAkB,CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EACzE,UAAU,GAAE,uBAAuB,CAAC,CAAC,CAAM,GAC1C,uBAAuB,CAAC,CAAC,CAAC,CAkB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-market-info.js","names":[],"sources":["../../src/market-info/use-market-info.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getMarketInfoQueryOptions,\n type ConfigParameter,\n type GetMarketInfoOptions,\n type GetMarketInfoReturnType,\n type SymmioSolverKind,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useMarketInfo}: the core query options plus an optional\n * `config`. Generic over the solver kind `K` — a literal `solverId` narrows the\n * returned market-info type.\n */\nexport type UseMarketInfoParameters<K extends SymmioSolverKind = SymmioSolverKind> = GetMarketInfoOptions<K> &\n ConfigParameter;\n\n/** Return type of {@link useMarketInfo}, generic over the solver kind `K`. */\nexport type UseMarketInfoReturnType<K extends SymmioSolverKind = SymmioSolverKind> = UseQueryResult<\n GetMarketInfoReturnType<K>,\n SymmioRequestError\n>;\n\n/**\n * Read per-market info from the active chain's solver in one call. The shape\n * diverges by solver — **Enigma** returns 24h volume + lifetime value plus\n * aggregate totals; **Rasa** returns price / 24h change / volume / notional cap.\n * Narrow on `data.kind`, or pass a literal `solverId` to narrow the type.\n *\n * Does not poll by default; pass `query.refetchInterval` to opt into polling.\n * Errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * const { data } = useMarketInfo();\n * if (data?.kind === \"enigma\") console.log(data.totalValue24h);\n * ```\n */\nexport function useMarketInfo<K extends SymmioSolverKind = SymmioSolverKind>(\n parameters: UseMarketInfoParameters<K> = {},\n): UseMarketInfoReturnType<K> {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getMarketInfoQueryOptions<K>(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseMarketInfoReturnType<K>;\n}\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"use-market-info.js","names":[],"sources":["../../src/market-info/use-market-info.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getMarketInfoQueryOptions,\n type ConfigParameter,\n type GetMarketInfoOptions,\n type GetMarketInfoReturnType,\n type SymmioSolverKind,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/**\n * Parameters for {@link useMarketInfo}: the core query options plus an optional\n * `config`. Generic over the solver kind `K` — a literal `solverId` narrows the\n * returned market-info type.\n */\nexport type UseMarketInfoParameters<K extends SymmioSolverKind = SymmioSolverKind> = GetMarketInfoOptions<K> &\n ConfigParameter;\n\n/** Return type of {@link useMarketInfo}, generic over the solver kind `K`. */\nexport type UseMarketInfoReturnType<K extends SymmioSolverKind = SymmioSolverKind> = UseQueryResult<\n GetMarketInfoReturnType<K>,\n SymmioRequestError\n>;\n\n/**\n * Read per-market info from the active chain's solver in one call. The shape\n * diverges by solver — **Enigma** returns 24h volume + lifetime value plus\n * aggregate totals; **Rasa** returns price / 24h change / volume / notional cap.\n * Narrow on `data.kind`, or pass a literal `solverId` to narrow the type.\n *\n * Does not poll by default; pass `query.refetchInterval` to opt into polling.\n * Errors are normalized to {@link SymmioRequestError}.\n *\n * @param parameters - Deployment, optional config and query overrides.\n * @returns Query state; Enigma rows identify markets by symbolId.\n * @throws {SymmioRequestError} Action failures appear in the query error state.\n * @example\n * ```tsx\n * const { data } = useMarketInfo();\n * if (data?.kind === \"enigma\") console.log(data.totalValue24h);\n * ```\n */\nexport function useMarketInfo<K extends SymmioSolverKind = SymmioSolverKind>(\n parameters: UseMarketInfoParameters<K> = {},\n): UseMarketInfoReturnType<K> {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getMarketInfoQueryOptions<K>(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseMarketInfoReturnType<K>;\n}\n"],"mappings":";;;;;;;AA+CA,SAAgB,EACd,IAAyC,CAAC,GACd;CAC5B,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA6B,GAAQ;EACnD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notional-cap/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notional-cap/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC"}
|
|
@@ -16,7 +16,7 @@ export type UseNotionalCapAllParameters = GetNotionalCapAllOptions & ConfigParam
|
|
|
16
16
|
/** Return type of {@link useNotionalCapAll}. */
|
|
17
17
|
export type UseNotionalCapAllReturnType = UseQueryResult<GetNotionalCapAllReturnType, SymmioRequestError>;
|
|
18
18
|
/**
|
|
19
|
-
* Read every market's notional cap
|
|
19
|
+
* Read every market's notional cap across all solver pages. Surfaces the aggregate
|
|
20
20
|
* `totalOpenInterest` / `totalUsed` plus the per-symbol rows.
|
|
21
21
|
*
|
|
22
22
|
* Polls every {@link DEFAULT_NOTIONAL_CAP_POLLING_MS} by default; pass
|