@symmio/trading-react 3.3.0 → 3.4.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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -29
- package/dist/pools/index.d.ts +1 -0
- package/dist/pools/index.d.ts.map +1 -1
- package/dist/pools/index.js +9 -8
- package/dist/pools/use-pool-transactions.d.ts +13 -5
- package/dist/pools/use-pool-transactions.d.ts.map +1 -1
- package/dist/pools/use-pool-transactions.js +1 -1
- package/dist/pools/use-pool-transactions.js.map +1 -1
- package/dist/pools/use-token-price.d.ts +50 -0
- package/dist/pools/use-token-price.d.ts.map +1 -0
- package/dist/pools/use-token-price.js +28 -0
- package/dist/pools/use-token-price.js.map +1 -0
- package/dist/quotes/use-close-quote-group.d.ts +7 -0
- package/dist/quotes/use-close-quote-group.d.ts.map +1 -1
- package/dist/quotes/use-close-quote-group.js +20 -19
- package/dist/quotes/use-close-quote-group.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -304,7 +304,7 @@ export { useErrorMessage, usePartyAUpnl, useSolverBalanceInfo, useSolverOpenInte
|
|
|
304
304
|
* pagination are all server-side, so every parameter change is a new request
|
|
305
305
|
* rather than a re-view of an already-fetched page.
|
|
306
306
|
*/
|
|
307
|
-
export { useAddMarket, useAuthenticateListing, useCancelWithdraw, useClaimHistory, useClaimProfit, useDepositAddress, useListingConfig, useListingMarketConfig, useListingMarketConfigProjection, useListingMarketDetail, useListingMarkets, useListingStatus, usePoolQuotes, usePoolRewardChart, usePoolTotalReward, usePoolTradeHistory, usePoolTransactions, useRefundMarket, useRetryListing, useRetryListingInfo, useSupportsListingService, useUpdateListingMarketConfig, useUserListingMarkets, useUserProfit, useUserRewardChart, useUserTotalReward, useUserTransactions, useWeeklyListingLimit, useWithdrawLp, type AddMarketVariables, type AuthenticateListingVariables, type CancelWithdrawVariables, type ClaimProfitVariables, type RefundMarketVariables, type RetryListingVariables, type UpdateListingMarketConfigVariables, type UseAddMarketParameters, type UseAddMarketReturnType, type UseAuthenticateListingParameters, type UseAuthenticateListingReturnType, type UseCancelWithdrawParameters, type UseCancelWithdrawReturnType, type UseClaimHistoryParameters, type UseClaimHistoryReturnType, type UseClaimProfitParameters, type UseClaimProfitReturnType, type UseDepositAddressParameters, type UseDepositAddressReturnType, type UseListingConfigParameters, type UseListingConfigReturnType, type UseListingMarketConfigParameters, type UseListingMarketConfigProjectionParameters, type UseListingMarketConfigProjectionReturnType, type UseListingMarketConfigReturnType, type UseListingMarketDetailParameters, type UseListingMarketDetailReturnType, type UseListingMarketsParameters, type UseListingMarketsReturnType, type UseListingStatusParameters, type UseListingStatusReturnType, type UsePoolQuotesParameters, type UsePoolQuotesReturnType, type UsePoolRewardChartParameters, type UsePoolRewardChartReturnType, type UsePoolTotalRewardParameters, type UsePoolTotalRewardReturnType, type UsePoolTradeHistoryParameters, type UsePoolTradeHistoryReturnType, type UsePoolTransactionsParameters, type UsePoolTransactionsReturnType, type UseRefundMarketParameters, type UseRefundMarketReturnType, type UseRetryListingInfoParameters, type UseRetryListingInfoReturnType, type UseRetryListingParameters, type UseRetryListingReturnType, type UseSupportsListingServiceParameters, type UseUpdateListingMarketConfigParameters, type UseUpdateListingMarketConfigReturnType, type UseUserListingMarketsParameters, type UseUserListingMarketsReturnType, type UseUserProfitParameters, type UseUserProfitReturnType, type UseUserRewardChartParameters, type UseUserRewardChartReturnType, type UseUserTotalRewardParameters, type UseUserTotalRewardReturnType, type UseUserTransactionsParameters, type UseUserTransactionsReturnType, type UseWeeklyListingLimitParameters, type UseWeeklyListingLimitReturnType, type UseWithdrawLpParameters, type UseWithdrawLpReturnType, type WithdrawLpVariables, } from './pools/index.js';
|
|
307
|
+
export { useAddMarket, useAuthenticateListing, useCancelWithdraw, useClaimHistory, useClaimProfit, useDepositAddress, useListingConfig, useListingMarketConfig, useListingMarketConfigProjection, useListingMarketDetail, useListingMarkets, useListingStatus, usePoolQuotes, usePoolRewardChart, usePoolTotalReward, usePoolTradeHistory, usePoolTransactions, useRefundMarket, useRetryListing, useRetryListingInfo, useSupportsListingService, useTokenPrice, useUpdateListingMarketConfig, useUserListingMarkets, useUserProfit, useUserRewardChart, useUserTotalReward, useUserTransactions, useWeeklyListingLimit, useWithdrawLp, type AddMarketVariables, type AuthenticateListingVariables, type CancelWithdrawVariables, type ClaimProfitVariables, type RefundMarketVariables, type RetryListingVariables, type UpdateListingMarketConfigVariables, type UseAddMarketParameters, type UseAddMarketReturnType, type UseAuthenticateListingParameters, type UseAuthenticateListingReturnType, type UseCancelWithdrawParameters, type UseCancelWithdrawReturnType, type UseClaimHistoryParameters, type UseClaimHistoryReturnType, type UseClaimProfitParameters, type UseClaimProfitReturnType, type UseDepositAddressParameters, type UseDepositAddressReturnType, type UseListingConfigParameters, type UseListingConfigReturnType, type UseListingMarketConfigParameters, type UseListingMarketConfigProjectionParameters, type UseListingMarketConfigProjectionReturnType, type UseListingMarketConfigReturnType, type UseListingMarketDetailParameters, type UseListingMarketDetailReturnType, type UseListingMarketsParameters, type UseListingMarketsReturnType, type UseListingStatusParameters, type UseListingStatusReturnType, type UsePoolQuotesParameters, type UsePoolQuotesReturnType, type UsePoolRewardChartParameters, type UsePoolRewardChartReturnType, type UsePoolTotalRewardParameters, type UsePoolTotalRewardReturnType, type UsePoolTradeHistoryParameters, type UsePoolTradeHistoryReturnType, type UsePoolTransactionsParameters, type UsePoolTransactionsReturnType, type UseRefundMarketParameters, type UseRefundMarketReturnType, type UseRetryListingInfoParameters, type UseRetryListingInfoReturnType, type UseRetryListingParameters, type UseRetryListingReturnType, type UseSupportsListingServiceParameters, type UseTokenPriceParameters, type UseTokenPriceReturnType, type UseUpdateListingMarketConfigParameters, type UseUpdateListingMarketConfigReturnType, type UseUserListingMarketsParameters, type UseUserListingMarketsReturnType, type UseUserProfitParameters, type UseUserProfitReturnType, type UseUserRewardChartParameters, type UseUserRewardChartReturnType, type UseUserTotalRewardParameters, type UseUserTotalRewardReturnType, type UseUserTransactionsParameters, type UseUserTransactionsReturnType, type UseWeeklyListingLimitParameters, type UseWeeklyListingLimitReturnType, type UseWithdrawLpParameters, type UseWithdrawLpReturnType, type WithdrawLpVariables, } from './pools/index.js';
|
|
308
308
|
/**
|
|
309
309
|
* Inventory service
|
|
310
310
|
* -----------------
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,sCAAsC,EACtC,yBAAyB,EACzB,oBAAoB,EACpB,gCAAgC,EAChC,uCAAuC,EACvC,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,kCAAkC,EAClC,mBAAmB,EACnB,2CAA2C,EAC3C,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,kCAAkC,EAClC,sBAAsB,EACtB,iCAAiC,EACjC,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EACjC,gCAAgC,EAChC,KAAK,6CAA6C,EAClD,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAA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C9C,KAAK,4CAA4C,EACjD,KAAK,oCAAoC,EACzC,KAAK,uCAAuC,EAC5C,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACvC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,uCAAuC,EAC5C,KAAK,uCAAuC,EAC5C,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,iCAAiC,EACtC,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,gDAAgD,EACrD,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EAChD,KAAK,2CAA2C,EAChD,KAAK,mCAAmC,GACzC,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -223,32 +223,33 @@ import { useRefundMarket as dr } from "./pools/use-refund-market.js";
|
|
|
223
223
|
import { useRetryListing as fr } from "./pools/use-retry-listing.js";
|
|
224
224
|
import { useRetryListingInfo as pr } from "./pools/use-retry-listing-info.js";
|
|
225
225
|
import { useSupportsListingService as mr } from "./pools/use-supports-listing-service.js";
|
|
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
|
-
|
|
226
|
+
import { useTokenPrice as hr } from "./pools/use-token-price.js";
|
|
227
|
+
import { useUpdateListingMarketConfig as gr } from "./pools/use-update-listing-market-config.js";
|
|
228
|
+
import { useUserListingMarkets as _r } from "./pools/use-user-listing-markets.js";
|
|
229
|
+
import { useUserRewardChart as vr } from "./pools/use-user-reward-chart.js";
|
|
230
|
+
import { useUserTotalReward as yr } from "./pools/use-user-total-reward.js";
|
|
231
|
+
import { useUserTransactions as br } from "./pools/use-user-transactions.js";
|
|
232
|
+
import { useWeeklyListingLimit as xr } from "./pools/use-weekly-listing-limit.js";
|
|
233
|
+
import { useWithdrawLp as Sr } from "./pools/use-withdraw-lp.js";
|
|
234
|
+
import { useInventoryTvl as Cr } from "./inventory/use-inventory-tvl.js";
|
|
235
|
+
import { useInventoryTvlHistory as wr } from "./inventory/use-inventory-tvl-history.js";
|
|
236
|
+
import { useApproveOperationalFee as Tr } from "./gasless/use-approve-operational-fee.js";
|
|
237
|
+
import { useGaslessBatchFeeQuote as Er } from "./gasless/use-gasless-batch-fee-quote.js";
|
|
238
|
+
import { useGaslessDepositPolicy as Dr } from "./gasless/use-gasless-deposit-policy.js";
|
|
239
|
+
import { useGaslessFeeQuote as Or } from "./gasless/use-gasless-fee-quote.js";
|
|
240
|
+
import { useGaslessRequest as kr } from "./gasless/use-gasless-request.js";
|
|
241
|
+
import { useGaslessRequestTransactions as Ar } from "./gasless/use-gasless-request-transactions.js";
|
|
242
|
+
import { useGaslessWalletAddress as jr } from "./gasless/use-gasless-wallet-address.js";
|
|
243
|
+
import { useGaslessWalletCreationFee as Mr } from "./gasless/use-gasless-wallet-creation-fee.js";
|
|
244
|
+
import { useGaslessWalletExecute as Nr } from "./gasless/use-gasless-wallet-execute.js";
|
|
245
|
+
import { useGaslessWalletExecuteSelectors as Pr } from "./gasless/use-gasless-wallet-execute-selectors.js";
|
|
246
|
+
import { useGaslessWalletNonce as Fr } from "./gasless/use-gasless-wallet-nonce.js";
|
|
247
|
+
import { useOperationalFeeAllowance as Ir } from "./gasless/use-operational-fee-allowance.js";
|
|
248
|
+
import { useRelayGaslessBatch as Lr } from "./gasless/use-relay-gasless-batch.js";
|
|
249
|
+
import { useRelayInstantOperations as Rr } from "./gasless/use-relay-instant-operations.js";
|
|
250
|
+
import { useResubmitGaslessRequest as zr } from "./gasless/use-resubmit-gasless-request.js";
|
|
251
|
+
import { useSettleGaslessDepositExistingAccount as Br } from "./gasless/use-settle-gasless-deposit-existing-account.js";
|
|
252
|
+
import { useSettleGaslessDepositNewAccount as Vr } from "./gasless/use-settle-gasless-deposit-new-account.js";
|
|
253
|
+
import { useSupportsGaslessService as Hr } from "./gasless/use-supports-gasless-service.js";
|
|
254
|
+
import { ADD_MARGIN_TO_NEXT_VA_SELECTOR as Ur, DEFAULT_TPSL_SLIPPAGE_LOWCAPS as Wr, GASLESS_RELAYABLE_FUNCTIONS as Gr, GASLESS_RELAYABLE_SELECTORS as Kr, GASLESS_SESSION_KEY_SELECTORS as qr, GASLESS_SESSION_KEY_WITHDRAW_SELECTORS as Jr, GASLESS_TERMINAL_STATUSES as Yr, GROUP_TPSL_SIDES as Xr, GaslessRequestStatus as Zr, INSTANT_TRADE_REQUIRED_SELECTORS as Qr, LEGACY_INSTANT_TRADE_REQUIRED_SELECTORS as $r, NotificationType as ei, OrderType as ti, PositionType as ni, QuoteStatus as ri, REQUEST_TO_CLOSE_POSITION_SELECTOR as ii, SEND_QUOTE_SELECTOR as ai, SEND_QUOTE_WITH_AFFILIATE_AND_DATA_SELECTOR as oi, SubAccountIsolationType as si, SymmApiError as ci, SymmError as li, VIRTUAL_ACCOUNT_ISOLATION_TYPE as ui, ZERO_LEG as di, buildConditionalOrderLeg as fi, buildConditionalOrderMessage as pi, buildTpSlDeleteMessage as mi, calculateAvailableForOrder as hi, calculateAvailableInstantOpenMargin as gi, calculateClosePrice as _i, calculatePriceImpact as vi, calculateQuoteLeverage as yi, calculateQuotePnl as bi, calculateSolverCloseFee as xi, calculateTradeParams as Si, childNotional as Ci, clampClosePrecision as wi, classifyGaslessFailure as Ti, decimalPriceToWei as Ei, decodeGaslessOperationFailure as Di, deleteQuoteTpSl as Oi, deleteQuoteTpSlMutationOptions as ki, estimateGroupTpSlReturn as Ai, generateTpSlSalt as ji, getGaslessUnconfirmedSubmit as Mi, getPartyAOpenPositionsQueryKey as Ni, getPartyAOpenPositionsQueryOptions as Pi, getSessionKeySelectors as Fi, isGaslessIdempotencyConflictError as Ii, isGaslessRequestTerminal as Li, isolationTypeForSide as Ri, parseGaslessErrorDetail as zi, parseTpSlFrame as Bi, planGroupTpSl as Vi, planGroupTpSlDelete as Hi, priceSlippageCalculation as Ui, sharePercent as Wi, signTpSlRequest as Gi, summarizeQuoteGroupTpSl as Ki, supportsEstimatedPrice as qi, toGroupTpSlChildren as Ji, toGroupTpSlOrders as Yi, toSignableTpSlMessage as Xi, validateInstantCloseAgainstMarket as Zi, validateInstantOpenAgainstMarket as Qi, validateTpSl as $i, watchTpSlNotifications as ea } from "@symmio/trading-core";
|
|
255
|
+
export { Ur as ADD_MARGIN_TO_NEXT_VA_SELECTOR, zt as DEFAULT_NOTIONAL_CAP_POLLING_MS, Wr as DEFAULT_TPSL_SLIPPAGE_LOWCAPS, Gr as GASLESS_RELAYABLE_FUNCTIONS, Kr as GASLESS_RELAYABLE_SELECTORS, qr as GASLESS_SESSION_KEY_SELECTORS, Jr as GASLESS_SESSION_KEY_WITHDRAW_SELECTORS, Yr as GASLESS_TERMINAL_STATUSES, Xr as GROUP_TPSL_SIDES, Zr as GaslessRequestStatus, Qr as INSTANT_TRADE_REQUIRED_SELECTORS, $r as LEGACY_INSTANT_TRADE_REQUIRED_SELECTORS, ei as NotificationType, ti as OrderType, ni as PositionType, ri as QuoteStatus, ii as REQUEST_TO_CLOSE_POSITION_SELECTOR, ai as SEND_QUOTE_SELECTOR, oi as SEND_QUOTE_WITH_AFFILIATE_AND_DATA_SELECTOR, si as SubAccountIsolationType, ci as SymmApiError, li as SymmError, t as SymmioProvider, i as SymmioRequestError, p as TransactionRevertedError, ui as VIRTUAL_ACCOUNT_ISOLATION_TYPE, di as ZERO_LEG, fi as buildConditionalOrderLeg, pi as buildConditionalOrderMessage, mi as buildTpSlDeleteMessage, hi as calculateAvailableForOrder, gi as calculateAvailableInstantOpenMargin, _i as calculateClosePrice, vi as calculatePriceImpact, yi as calculateQuoteLeverage, bi as calculateQuotePnl, xi as calculateSolverCloseFee, Si as calculateTradeParams, Ci as childNotional, wi as clampClosePrecision, Ti as classifyGaslessFailure, e as createSessionKeyWalletClientResolver, Ei as decimalPriceToWei, Di as decodeGaslessOperationFailure, Oi as deleteQuoteTpSl, ki as deleteQuoteTpSlMutationOptions, Ai as estimateGroupTpSlReturn, ji as generateTpSlSalt, Mi as getGaslessUnconfirmedSubmit, Ni as getPartyAOpenPositionsQueryKey, Pi as getPartyAOpenPositionsQueryOptions, Fi as getSessionKeySelectors, bn as invalidateTpSlReads, Ii as isGaslessIdempotencyConflictError, Li as isGaslessRequestTerminal, Ri as isolationTypeForSide, a as normalizeSymmError, zi as parseGaslessErrorDetail, Bi as parseTpSlFrame, Vi as planGroupTpSl, Hi as planGroupTpSlDelete, h as predicateMatch, Ui as priceSlippageCalculation, Wi as sharePercent, Gi as signTpSlRequest, Ki as summarizeQuoteGroupTpSl, qi as supportsEstimatedPrice, Ji as toGroupTpSlChildren, Yi as toGroupTpSlOrders, be as toQuoteTpSl, Xi as toSignableTpSlMessage, d as useAccountBalanceInfo, f as useAccountBalanceOf, Qe as useAccountLiquidationPrice, bt as useAccountMarginRisk, et as useAccountUpnl, Z as useActiveDelegations, g as useAddMargin, qn as useAddMarket, _ as useAffiliateState, v as useAllocate, q as useApproveCollateral, Tr as useApproveOperationalFee, Q as useAreDelegationsActive, Jn as useAuthenticateListing, Pt as useAvailableInstantOpenMargin, Ft as useBalanceHistory, Nn as useBinanceCandleSource, Yt as useBinanceHealth, Ln as useBinanceOrderbookSource, Xt as useBinancePremiumIndex, Zt as useBinancePrices, Qt as useBinanceSymbolsInfo, y as useCancelRegistration, Yn as useCancelWithdraw, Pn as useCandleStream, Fn as useCandles, Xn as useClaimHistory, Zn 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, cn as useDeallocateUpnlSig, $ as useDelegationExpiry, xn as useDeleteQuoteGroupTpSl, Sn as useDeleteQuoteTpSl, C as useDeleteSubAccount, w as useDeposit, Qn as useDepositAddress, T as useDepositAndAllocate, It as useDepositHistory, s as useDisconnectWallet, E as useEditAccountName, St as useEnigmaPriceByMarketId, xt as useEnigmaPriceByName, $t as useEnigmaPriceServiceHealth, en as useEnigmaPriceServiceMetadata, tn as useEnigmaPriceServicePricesByAddresses, nn as useEnigmaPriceServicePricesByNames, rn as useEnigmaPriceServiceSymbolsInfo, an as useEnigmaPrices, Vn 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, ln as useForceClosePriceSig, Ke as useFundingFeesOfPartyB, Ut as useFundingInfo, Er as useGaslessBatchFeeQuote, Dr as useGaslessDepositPolicy, Or as useGaslessFeeQuote, kr as useGaslessRequest, Ar as useGaslessRequestTransactions, jr as useGaslessWalletAddress, Mr as useGaslessWalletCreationFee, Nr as useGaslessWalletExecute, Pr as useGaslessWalletExecuteSelectors, Fr 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, Cr as useInventoryTvl, wr as useInventoryTvlHistory, De as useIsDelegationActive, Le as useLastWithdrawRequestId, Oe as useLimitCloseAuto, ke as useLimitOpenAuto, ft as useLimitOrders, $n as useListingConfig, er as useListingMarketConfig, rr as useListingMarketConfigProjection, tr as useListingMarketDetail, ir as useListingMarkets, ar as useListingStatus, zn as useLiveOrderbook, _e as useLockedParams, $e as useManagedQuotes, on as useMarkPrices, qt as useMarketInfo, ce as useMarkets, un as useMuonPartyAOverview, dn as useMuonPrice, fn as useMuonPriceRange, pn as useMuonSettleUpnl, mn as useMuonUpnl, hn as useMuonUpnlA, gn as useMuonUpnlAWithSymbolPrice, _n as useMuonUpnlB, vn as useMuonUpnlWithSymbolPrice, u as useNotifications, Vt as useNotionalCapAll, Bt as useNotionalCapBySymbolId, qe as useOnchainContractMarkets, Ht as useOpenInterestBySymbolId, Ir as useOperationalFeeAllowance, Xe as useOptimisticQuotesStore, Bn as useOrderbook, Rn as useOrderbookStream, Ze as usePartyAOpenPositions, pt as usePartyAPendingQuotes, Hn as usePartyAUpnl, Ae as usePendingRevocation, Re as usePendingWithdrawRequests, or as usePoolQuotes, sr as usePoolRewardChart, cr as usePoolTotalReward, lr as usePoolTradeHistory, ur as usePoolTransactions, O as usePredictedNextVirtualAccount, je as usePrepareInstantOpenParams, kt as usePriceByMarketId, ue as usePriceByName, le as usePrices, mt as useQuote, ht as useQuoteEventsByType, _t as useQuoteFunding, vt as useQuoteGroupFunding, yt as useQuoteGroupFundingHistory, Ct as useQuoteGroupMarginRisk, Cn as useQuoteGroupTpSl, wn as useQuoteGroupTpSlEditor, wt as useQuoteHistory, Et as useQuotePendingFunding, Dt as useQuotePlatformFee, Ot as useQuotePriceHistory, En as useQuoteTpSl, At as useQuoteUpnlAndPnl, gt as useQuotesFunding, Tt as useQuotesPendingFunding, dr as useRefundMarket, Lr as useRelayGaslessBatch, Rr as useRelayInstantOperations, k as useRemoveMargin, ze as useRequestCancelWithdraw, jt as useRequestToCancelCloseRequest, Mt as useRequestToCancelQuote, A as useRequestToRegisterAffiliate, zr as useResubmitGaslessRequest, fr as useRetryListing, pr as useRetryListingInfo, Wt as useRevenueRecords, Me as useRevocationCooldown, sn as useSearchNotifications, Dn as useSearchTpSlOrders, yn as useSendQuoteUpnlSig, Ne as useSessionKeySelectors, On as useSetQuoteGroupTpSl, kn as useSetQuoteTpSl, Br as useSettleGaslessDepositExistingAccount, Vr 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, Un as useSolverBalanceInfo, ot as useSolverCapabilities, Je as useSolverErrorCodes, Ye as useSolverErrorMessage, de as useSolverInfo, Wn as useSolverOpenInterest, Gn as useSolverPriceRange, Kn as useSolverReadiness, Jt as useSolverRevenue, B as useSubAccount, V as useSubAccountVirtualNonce, H as useSubAccountsCountOfUser, Nt as useSubgraphQuery, Hr as useSupportsGaslessService, st as useSupportsGroupClose, ct as useSupportsLimitOrder, mr as useSupportsListingService, c as useSwitchToSymmioChain, Gt as useSymbols, n as useSymmioChainId, r as useSymmioConfig, hr as useTokenPrice, An as useTpSlConfig, xe as useTpSlRecord, Se as useTpSlRecords, jn as useTpSlSigningSpec, Ce as useTpSlStore, Mn as useTpSlSupported, Kt as useTradeVolume, In as useTradingViewDatafeed, m as useTransactionsStore, Rt as useTransferHistory, gr as useUpdateListingMarketConfig, _r as useUserListingMarkets, nr as useUserProfit, vr as useUserRewardChart, U as useUserSubAccounts, W as useUserSubAccountsAddresses, yr as useUserTotalReward, br as useUserTransactions, G as useVirtualAccount, K as useVirtualAccountsAddressesOfSubAccount, l as useWalletAccount, Tn as useWatchTpSlNotifications, xr as useWeeklyListingLimit, Ue as useWithdraw, Lt as useWithdrawHistory, Sr as useWithdrawLp, We as useWithdrawRequest, Ge as useWithdrawableTime, Zi as validateInstantCloseAgainstMarket, Qi as validateInstantOpenAgainstMarket, $i as validateTpSl, ea as watchTpSlNotifications };
|
package/dist/pools/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './use-refund-market.js';
|
|
|
19
19
|
export * from './use-retry-listing.js';
|
|
20
20
|
export * from './use-retry-listing-info.js';
|
|
21
21
|
export * from './use-supports-listing-service.js';
|
|
22
|
+
export * from './use-token-price.js';
|
|
22
23
|
export * from './use-update-listing-market-config.js';
|
|
23
24
|
export * from './use-user-listing-markets.js';
|
|
24
25
|
export * from './use-user-profit.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pools/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AA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AAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
|
package/dist/pools/index.js
CHANGED
|
@@ -20,11 +20,12 @@ import { useRefundMarket as v } from "./use-refund-market.js";
|
|
|
20
20
|
import { useRetryListing as y } from "./use-retry-listing.js";
|
|
21
21
|
import { useRetryListingInfo as b } from "./use-retry-listing-info.js";
|
|
22
22
|
import { useSupportsListingService as x } from "./use-supports-listing-service.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
|
|
23
|
+
import { useTokenPrice as S } from "./use-token-price.js";
|
|
24
|
+
import { useUpdateListingMarketConfig as C } from "./use-update-listing-market-config.js";
|
|
25
|
+
import { useUserListingMarkets as w } from "./use-user-listing-markets.js";
|
|
26
|
+
import { useUserRewardChart as T } from "./use-user-reward-chart.js";
|
|
27
|
+
import { useUserTotalReward as E } from "./use-user-total-reward.js";
|
|
28
|
+
import { useUserTransactions as D } from "./use-user-transactions.js";
|
|
29
|
+
import { useWeeklyListingLimit as O } from "./use-weekly-listing-limit.js";
|
|
30
|
+
import { useWithdrawLp as k } from "./use-withdraw-lp.js";
|
|
31
|
+
export { e as useAddMarket, t as useAuthenticateListing, n as useCancelWithdraw, r as useClaimHistory, i as useClaimProfit, a as useDepositAddress, o as useListingConfig, s as useListingMarketConfig, u as useListingMarketConfigProjection, c as useListingMarketDetail, d as useListingMarkets, f as useListingStatus, p as usePoolQuotes, m as usePoolRewardChart, h as usePoolTotalReward, g as usePoolTradeHistory, _ as usePoolTransactions, v as useRefundMarket, y as useRetryListing, b as useRetryListingInfo, x as useSupportsListingService, S as useTokenPrice, C as useUpdateListingMarketConfig, w as useUserListingMarkets, l as useUserProfit, T as useUserRewardChart, E as useUserTotalReward, D as useUserTransactions, O as useWeeklyListingLimit, k as useWithdrawLp };
|
|
@@ -6,18 +6,26 @@ export type UsePoolTransactionsParameters = GetPoolTransactionsOptions & ConfigP
|
|
|
6
6
|
/** Return type of {@link usePoolTransactions}: one page of transaction rows. */
|
|
7
7
|
export type UsePoolTransactionsReturnType = UseQueryResult<GetPoolTransactionsReturnType, SymmioRequestError>;
|
|
8
8
|
/**
|
|
9
|
-
* Read
|
|
9
|
+
* Read pool deposit and withdrawal history — refunded deposits included —
|
|
10
|
+
* newest first.
|
|
10
11
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
12
|
+
* Public and unscoped by default: every LP's rows on **every** pool, not just
|
|
13
|
+
* the connected wallet's. Narrow it with `tokenAddress` (one pool),
|
|
14
|
+
* `marketChainId`, `walletAddress`, `transactionType` and `transactionStatus`;
|
|
15
|
+
* each row names its own pool (`tokenAddress`, `chainId`). The service fixes the
|
|
16
|
+
* order newest first and takes no sort parameter.
|
|
13
17
|
*
|
|
14
18
|
* `count` is the total across all pages, so it is what a pager should divide —
|
|
15
19
|
* not `items.length`. Errors are normalized to {@link SymmioRequestError}.
|
|
16
20
|
*
|
|
17
21
|
* @example
|
|
18
22
|
* ```tsx
|
|
19
|
-
*
|
|
23
|
+
* // One pool, 25 rows a page.
|
|
24
|
+
* const { data } = usePoolTransactions({ tokenAddress, size: 25, start: page * 25 });
|
|
25
|
+
*
|
|
26
|
+
* // The latest activity across every pool.
|
|
27
|
+
* const { data: latest } = usePoolTransactions();
|
|
20
28
|
* ```
|
|
21
29
|
*/
|
|
22
|
-
export declare function usePoolTransactions(parameters
|
|
30
|
+
export declare function usePoolTransactions(parameters?: UsePoolTransactionsParameters): UsePoolTransactionsReturnType;
|
|
23
31
|
//# sourceMappingURL=use-pool-transactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-pool-transactions.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,oGAAoG;AACpG,MAAM,MAAM,6BAA6B,GAAG,0BAA0B,GAAG,eAAe,CAAC;AAEzF,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAAC;AAE9G
|
|
1
|
+
{"version":3,"file":"use-pool-transactions.d.ts","sourceRoot":"","sources":["../../src/pools/use-pool-transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,oGAAoG;AACpG,MAAM,MAAM,6BAA6B,GAAG,0BAA0B,GAAG,eAAe,CAAC;AAEzF,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG,cAAc,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,GAAE,6BAAkC,GAAG,6BAA6B,CAkBjH"}
|
|
@@ -5,7 +5,7 @@ import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
|
|
|
5
5
|
import { getPoolTransactionsQueryOptions as r } from "@symmio/trading-core";
|
|
6
6
|
import { useQuery as i } from "@tanstack/react-query";
|
|
7
7
|
//#region src/pools/use-pool-transactions.ts
|
|
8
|
-
function a(a) {
|
|
8
|
+
function a(a = {}) {
|
|
9
9
|
let o = t(a), s = e(), c = r(o, {
|
|
10
10
|
...a,
|
|
11
11
|
chainId: a.chainId ?? s
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-pool-transactions.js","names":[],"sources":["../../src/pools/use-pool-transactions.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolTransactionsQueryOptions,\n type ConfigParameter,\n type GetPoolTransactionsOptions,\n type GetPoolTransactionsReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link usePoolTransactions}: the core query options plus an optional `config`. */\nexport type UsePoolTransactionsParameters = GetPoolTransactionsOptions & ConfigParameter;\n\n/** Return type of {@link usePoolTransactions}: one page of transaction rows. */\nexport type UsePoolTransactionsReturnType = UseQueryResult<GetPoolTransactionsReturnType, SymmioRequestError>;\n\n/**\n * Read
|
|
1
|
+
{"version":3,"file":"use-pool-transactions.js","names":[],"sources":["../../src/pools/use-pool-transactions.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getPoolTransactionsQueryOptions,\n type ConfigParameter,\n type GetPoolTransactionsOptions,\n type GetPoolTransactionsReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link usePoolTransactions}: the core query options plus an optional `config`. */\nexport type UsePoolTransactionsParameters = GetPoolTransactionsOptions & ConfigParameter;\n\n/** Return type of {@link usePoolTransactions}: one page of transaction rows. */\nexport type UsePoolTransactionsReturnType = UseQueryResult<GetPoolTransactionsReturnType, SymmioRequestError>;\n\n/**\n * Read pool deposit and withdrawal history — refunded deposits included —\n * newest first.\n *\n * Public and unscoped by default: every LP's rows on **every** pool, not just\n * the connected wallet's. Narrow it with `tokenAddress` (one pool),\n * `marketChainId`, `walletAddress`, `transactionType` and `transactionStatus`;\n * each row names its own pool (`tokenAddress`, `chainId`). The service fixes the\n * order newest first and takes no sort parameter.\n *\n * `count` is the total across all pages, so it is what a pager should divide —\n * not `items.length`. Errors are normalized to {@link SymmioRequestError}.\n *\n * @example\n * ```tsx\n * // One pool, 25 rows a page.\n * const { data } = usePoolTransactions({ tokenAddress, size: 25, start: page * 25 });\n *\n * // The latest activity across every pool.\n * const { data: latest } = usePoolTransactions();\n * ```\n */\nexport function usePoolTransactions(parameters: UsePoolTransactionsParameters = {}): UsePoolTransactionsReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getPoolTransactionsQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UsePoolTransactionsReturnType;\n}\n"],"mappings":";;;;;;;AA0CA,SAAgB,EAAoB,IAA4C,CAAC,GAAkC;CACjH,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAAgC,GAAQ;EACtD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ConfigParameter, GetTokenPriceOptions, GetTokenPriceReturnType } from '@symmio/trading-core';
|
|
2
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import { SymmioRequestError } from '../errors/symmio-request-error.js';
|
|
4
|
+
/** Parameters for {@link useTokenPrice}: the core query options plus an optional `config`. */
|
|
5
|
+
export type UseTokenPriceParameters = GetTokenPriceOptions & ConfigParameter;
|
|
6
|
+
/** Return type of {@link useTokenPrice}: the token's pre-listing price estimate. */
|
|
7
|
+
export type UseTokenPriceReturnType = UseQueryResult<GetTokenPriceReturnType, SymmioRequestError>;
|
|
8
|
+
/**
|
|
9
|
+
* Read a pre-listing **price estimate** for a token — what the Price Service
|
|
10
|
+
* thinks one unit is worth in USD, before (or regardless of whether) the token
|
|
11
|
+
* is listed as a pool. The read a create-pool form shows next to the address
|
|
12
|
+
* the user just pasted.
|
|
13
|
+
*
|
|
14
|
+
* This is an authed read: it takes a Bearer `accessToken` from
|
|
15
|
+
* {@link useAuthenticateListing}, the token's `chain` by vendor name
|
|
16
|
+
* (`TokenPriceChain`, not a numeric chain id), and its `tokenAddress`. The
|
|
17
|
+
* token and the address both gate the query: until the `accessToken` **and**
|
|
18
|
+
* the `tokenAddress` are non-empty strings the hook stays idle
|
|
19
|
+
* (`enabled: false`) rather than firing an incomplete or unauthenticated
|
|
20
|
+
* request, so it can be mounted before sign-in or before an address is typed.
|
|
21
|
+
*
|
|
22
|
+
* The figure is an **estimate**, not a mark or trade price: the backend caches
|
|
23
|
+
* it for about five minutes and rate-limits the endpoint, so the query defaults
|
|
24
|
+
* to a five-minute `staleTime` / `gcTime` and the same inputs inside that
|
|
25
|
+
* window are served from the cache with no refetch. Render it with a `~` and
|
|
26
|
+
* do not poll — pass `query.staleTime` only if you really need it fresher.
|
|
27
|
+
* Enigma-only; errors are normalized to {@link SymmioRequestError}, with a
|
|
28
|
+
* `401` meaning the token is bad or expired.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const login = useAuthenticateListing();
|
|
33
|
+
* const [token, setToken] = useState("");
|
|
34
|
+
* const [address, setAddress] = useState("");
|
|
35
|
+
*
|
|
36
|
+
* const { data, isPending } = useTokenPrice({
|
|
37
|
+
* accessToken: token,
|
|
38
|
+
* chain: TokenPriceChain.ARC,
|
|
39
|
+
* tokenAddress: address,
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // sign in first, then feed the token to the hook:
|
|
43
|
+
* login.mutate({}, { onSuccess: (result) => setToken(result.accessToken) });
|
|
44
|
+
*
|
|
45
|
+
* // the estimate, once the user has pasted an address:
|
|
46
|
+
* data ? `~$${data.price}` : "—";
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function useTokenPrice(parameters: UseTokenPriceParameters): UseTokenPriceReturnType;
|
|
50
|
+
//# sourceMappingURL=use-token-price.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-token-price.d.ts","sourceRoot":"","sources":["../../src/pools/use-token-price.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,8FAA8F;AAC9F,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAE7E,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,uBAAuB,GAAG,uBAAuB,CAoB1F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSymmioChainId as e } from "../provider/use-symmio-chain-id.js";
|
|
3
|
+
import { useSymmioConfig as t } from "../provider/use-symmio-config.js";
|
|
4
|
+
import { normalizeSymmError as n } from "../errors/normalize-symm-error.js";
|
|
5
|
+
import { getTokenPriceQueryOptions as r } from "@symmio/trading-core";
|
|
6
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
7
|
+
//#region src/pools/use-token-price.ts
|
|
8
|
+
function a(a) {
|
|
9
|
+
let o = t(a), s = e(), c = r(o, {
|
|
10
|
+
...a,
|
|
11
|
+
chainId: a.chainId ?? s
|
|
12
|
+
});
|
|
13
|
+
return i({
|
|
14
|
+
...c,
|
|
15
|
+
enabled: (a.query?.enabled ?? !0) && a.accessToken.length > 0 && a.tokenAddress.length > 0,
|
|
16
|
+
queryFn: async () => {
|
|
17
|
+
try {
|
|
18
|
+
return await c.queryFn();
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw n(e);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { a as useTokenPrice };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=use-token-price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-token-price.js","names":[],"sources":["../../src/pools/use-token-price.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getTokenPriceQueryOptions,\n type ConfigParameter,\n type GetTokenPriceOptions,\n type GetTokenPriceReturnType,\n} from \"@symmio/trading-core\";\nimport { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { normalizeSymmError } from \"../errors/normalize-symm-error\";\nimport type { SymmioRequestError } from \"../errors/symmio-request-error\";\nimport { useSymmioChainId } from \"../provider/use-symmio-chain-id\";\nimport { useSymmioConfig } from \"../provider/use-symmio-config\";\n\n/** Parameters for {@link useTokenPrice}: the core query options plus an optional `config`. */\nexport type UseTokenPriceParameters = GetTokenPriceOptions & ConfigParameter;\n\n/** Return type of {@link useTokenPrice}: the token's pre-listing price estimate. */\nexport type UseTokenPriceReturnType = UseQueryResult<GetTokenPriceReturnType, SymmioRequestError>;\n\n/**\n * Read a pre-listing **price estimate** for a token — what the Price Service\n * thinks one unit is worth in USD, before (or regardless of whether) the token\n * is listed as a pool. The read a create-pool form shows next to the address\n * the user just pasted.\n *\n * This is an authed read: it takes a Bearer `accessToken` from\n * {@link useAuthenticateListing}, the token's `chain` by vendor name\n * (`TokenPriceChain`, not a numeric chain id), and its `tokenAddress`. The\n * token and the address both gate the query: until the `accessToken` **and**\n * the `tokenAddress` are non-empty strings the hook stays idle\n * (`enabled: false`) rather than firing an incomplete or unauthenticated\n * request, so it can be mounted before sign-in or before an address is typed.\n *\n * The figure is an **estimate**, not a mark or trade price: the backend caches\n * it for about five minutes and rate-limits the endpoint, so the query defaults\n * to a five-minute `staleTime` / `gcTime` and the same inputs inside that\n * window are served from the cache with no refetch. Render it with a `~` and\n * do not poll — pass `query.staleTime` only if you really need it fresher.\n * Enigma-only; errors are normalized to {@link SymmioRequestError}, with a\n * `401` meaning the token is bad or expired.\n *\n * @example\n * ```tsx\n * const login = useAuthenticateListing();\n * const [token, setToken] = useState(\"\");\n * const [address, setAddress] = useState(\"\");\n *\n * const { data, isPending } = useTokenPrice({\n * accessToken: token,\n * chain: TokenPriceChain.ARC,\n * tokenAddress: address,\n * });\n *\n * // sign in first, then feed the token to the hook:\n * login.mutate({}, { onSuccess: (result) => setToken(result.accessToken) });\n *\n * // the estimate, once the user has pasted an address:\n * data ? `~$${data.price}` : \"—\";\n * ```\n */\nexport function useTokenPrice(parameters: UseTokenPriceParameters): UseTokenPriceReturnType {\n const config = useSymmioConfig(parameters);\n const chainId = useSymmioChainId();\n const options = getTokenPriceQueryOptions(config, {\n ...parameters,\n chainId: parameters.chainId ?? chainId,\n });\n\n return useQuery({\n ...options,\n enabled:\n (parameters.query?.enabled ?? true) && parameters.accessToken.length > 0 && parameters.tokenAddress.length > 0,\n queryFn: async () => {\n try {\n return await options.queryFn();\n } catch (err) {\n throw normalizeSymmError(err);\n }\n },\n }) as UseTokenPriceReturnType;\n}\n"],"mappings":";;;;;;;AA6DA,SAAgB,EAAc,GAA8D;CAC1F,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAU,EAAiB,GAC3B,IAAU,EAA0B,GAAQ;EAChD,GAAG;EACH,SAAS,EAAW,WAAW;CACjC,CAAC;CAED,OAAO,EAAS;EACd,GAAG;EACH,UACG,EAAW,OAAO,WAAW,OAAS,EAAW,YAAY,SAAS,KAAK,EAAW,aAAa,SAAS;EAC/G,SAAS,YAAY;GACnB,IAAI;IACF,OAAO,MAAM,EAAQ,QAAQ;GAC/B,SAAS,GAAK;IACZ,MAAM,EAAmB,CAAG;GAC9B;EACF;CACF,CAAC;AACH"}
|
|
@@ -42,6 +42,13 @@ export interface CloseQuoteGroupParameters {
|
|
|
42
42
|
markPrice?: string;
|
|
43
43
|
/** Delegated session key to submit the closes from, when delegation is active. */
|
|
44
44
|
from?: Address;
|
|
45
|
+
/**
|
|
46
|
+
* Check that the signer holds the `requestToClosePosition` delegation before
|
|
47
|
+
* any close is signed. Defaults to `true`; a run that fails it reports
|
|
48
|
+
* `INSTANT_SIGNER_NOT_DELEGATED` in its summary's `error`. Pass `false` when
|
|
49
|
+
* your UI already gates the close on delegation.
|
|
50
|
+
*/
|
|
51
|
+
preflightDelegation?: boolean;
|
|
45
52
|
/**
|
|
46
53
|
* Account whose live notification stream reports the close fills — pass the
|
|
47
54
|
* **sub-account** when closing Virtual Account quotes (the VA frames arrive
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-close-quote-group.d.ts","sourceRoot":"","sources":["../../src/quotes/use-close-quote-group.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,eAAe,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EAEhB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAgBzE;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAA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,sBAAsB,CAAC,CAAC;IAClF,0EAA0E;IAC1E,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,6BAA6B;IAC7B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,uCAAuC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,sEAAsE;IACtE,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,sEAAsE;IACtE,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,iDAAiD;AACjD,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAa3D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,GAAE,4BAAiC,GAAG,4BAA4B,CAoM9G"}
|
|
@@ -65,42 +65,42 @@ function y(y = {}) {
|
|
|
65
65
|
steps: [],
|
|
66
66
|
error: n(/* @__PURE__ */ Error("A group close is already in flight."))
|
|
67
67
|
};
|
|
68
|
-
let { group: t, targetQuantity: r, minAcceptableQuoteValue: a, slippage: d, markPrice: f, from: p,
|
|
69
|
-
if (!
|
|
68
|
+
let { group: t, targetQuantity: r, minAcceptableQuoteValue: a, slippage: d, markPrice: f, from: p, preflightDelegation: m, notificationsAccount: h } = e, _ = e.chainId ?? x, v = c(l(t.quotes, a), r);
|
|
69
|
+
if (!v.feasible) return A({
|
|
70
70
|
status: "failed",
|
|
71
71
|
steps: [],
|
|
72
72
|
closedQuantity: 0n,
|
|
73
73
|
targetQuantity: r,
|
|
74
|
-
planFailure:
|
|
74
|
+
planFailure: v
|
|
75
75
|
}), {
|
|
76
76
|
ok: !1,
|
|
77
77
|
closedQuantity: 0n,
|
|
78
78
|
steps: [],
|
|
79
|
-
planFailure:
|
|
79
|
+
planFailure: v
|
|
80
80
|
};
|
|
81
|
-
let
|
|
81
|
+
let y = new Map(t.quotes.map((e) => [e.key, e])), C = v.allocations.map((e) => ({
|
|
82
82
|
key: e.key,
|
|
83
|
-
quoteId:
|
|
83
|
+
quoteId: y.get(e.key).quoteId,
|
|
84
84
|
closeQuantity: e.closeQuantity,
|
|
85
85
|
kind: e.kind,
|
|
86
86
|
status: "queued"
|
|
87
87
|
}));
|
|
88
88
|
E.current = !0;
|
|
89
|
-
let
|
|
90
|
-
k.current =
|
|
89
|
+
let w = y.get(C[0].key);
|
|
90
|
+
k.current = _, O(h ?? w.vaAddress ?? w.partyA), A({
|
|
91
91
|
status: "closing",
|
|
92
|
-
steps:
|
|
92
|
+
steps: C.map((e) => ({
|
|
93
93
|
...e,
|
|
94
94
|
status: "closing"
|
|
95
95
|
})),
|
|
96
96
|
closedQuantity: 0n,
|
|
97
97
|
targetQuantity: r
|
|
98
98
|
});
|
|
99
|
-
let
|
|
99
|
+
let D = s(b);
|
|
100
100
|
try {
|
|
101
|
-
await
|
|
102
|
-
orders:
|
|
103
|
-
let t =
|
|
101
|
+
await D.mutationFn({
|
|
102
|
+
orders: C.map((e) => {
|
|
103
|
+
let t = y.get(e.key);
|
|
104
104
|
return {
|
|
105
105
|
partyA: t.vaAddress ?? t.partyA,
|
|
106
106
|
market: { id: Number(t.symbolId) },
|
|
@@ -112,7 +112,8 @@ function y(y = {}) {
|
|
|
112
112
|
};
|
|
113
113
|
}),
|
|
114
114
|
from: p,
|
|
115
|
-
|
|
115
|
+
preflightDelegation: m,
|
|
116
|
+
chainId: _
|
|
116
117
|
});
|
|
117
118
|
} catch (e) {
|
|
118
119
|
let t = n(e), r = T.current;
|
|
@@ -134,11 +135,11 @@ function y(y = {}) {
|
|
|
134
135
|
} finally {
|
|
135
136
|
E.current = !1;
|
|
136
137
|
}
|
|
137
|
-
let
|
|
138
|
-
S.invalidateQueries({ predicate: i(o, { configKey:
|
|
139
|
-
let
|
|
140
|
-
return
|
|
141
|
-
...
|
|
138
|
+
let j = b.getChainConfigKey(_);
|
|
139
|
+
S.invalidateQueries({ predicate: i(o, { configKey: j }) });
|
|
140
|
+
let M = T.current;
|
|
141
|
+
return M.status === "closing" && M.steps.every((e) => e.status === "closed") && A({
|
|
142
|
+
...M,
|
|
142
143
|
status: "success"
|
|
143
144
|
}), {
|
|
144
145
|
ok: !0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-close-quote-group.js","names":[],"sources":["../../src/quotes/use-close-quote-group.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getInstantClosesQueryKey,\n instantCloseBulkAutoMutationOptions,\n NotificationType,\n planGroupClose,\n toGroupCloseCandidates,\n type ConfigParameter,\n type Notification,\n type PlanGroupCloseFailure,\n type QuoteGroup,\n type UnifiedQuote,\n} from \"@symmio/trading-core\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useCallback, useMemo, useRef, useState } from \"react\";\nimport type { Address } from \"viem\";\nimport { formatUnits } from \"viem\";\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\";\nimport { predicateMatch } from \"../utils\";\nimport { useNotifications } from \"../websocket/use-notifications\";\n\n/** Decimal places of an 18-decimal-wei fixed-point value. */\nconst WEI_DECIMALS = 18;\n\n/**\n * Solver `lastSeenAction` values that report a close **fill** — the moment a\n * close is actually done (mirrors the core notification classifier's fill set;\n * the request-stage actions are deliberately not here).\n */\nconst CLOSE_FILL_ACTIONS = new Set([\"FillMarketOrderInstantClose\", \"FillLimitOrderClose\"]);\n\n/**\n * Lifecycle of one child close inside a group close:\n * `queued` → `closing` (submitted in the bulk request, awaiting its close-fill\n * notification) → `closed` (fill notification received), or `failed` (the bulk\n * submit or the close itself errored).\n */\nexport type CloseQuoteGroupStepStatus = \"queued\" | \"closing\" | \"closed\" | \"failed\";\n\n/** Live state of one child close inside a group close run. */\nexport interface CloseQuoteGroupStep {\n /** Child identity (`UnifiedQuote.key`). */\n key: string;\n /** On-chain quote id of the child. */\n quoteId: bigint;\n /** Planned close amount, wei. */\n closeQuantity: bigint;\n /** `full` when the child closes entirely, `partial` otherwise. */\n kind: \"full\" | \"partial\";\n /** Current lifecycle stage of this child close. */\n status: CloseQuoteGroupStepStatus;\n /** Normalized error, when `status` is `failed`. */\n error?: SymmioRequestError;\n}\n\n/** Overall lifecycle of a group close run. */\nexport type CloseQuoteGroupStatus = \"idle\" | \"closing\" | \"success\" | \"failed\";\n\n/** Inputs for one {@link UseCloseQuoteGroupReturnType.close} run. */\nexport interface CloseQuoteGroupParameters {\n /** The group whose children are being closed. */\n group: QuoteGroup;\n /** Exact total quantity to close across the group, wei. */\n targetQuantity: bigint;\n /**\n * The symbol's `minAcceptableQuoteValue` (wei) — the dust floor a partially\n * closed child must keep. Read it from the market info of the group's symbol.\n */\n minAcceptableQuoteValue: bigint;\n /** Slippage tolerance percent forwarded to every child close (e.g. `5`). */\n slippage: number;\n /** Pre-fetched mark price (decimal string) forwarded to every child close. */\n markPrice?: string;\n /** Delegated session key to submit the closes from, when delegation is active. */\n from?: Address;\n /**\n * Account whose live notification stream reports the close fills — pass the\n * **sub-account** when closing Virtual Account quotes (the VA frames arrive\n * on its owning sub-account's stream). Defaults to the first child's\n * `vaAddress ?? partyA`.\n */\n notificationsAccount?: Address;\n /** Chain override; defaults to the connected chain. */\n chainId?: number;\n}\n\n/**\n * Submission outcome of one {@link UseCloseQuoteGroupReturnType.close} run.\n * Resolves when the bulk request carrying every child close has been\n * **submitted** — settlement is confirmed asynchronously per child (its\n * close-fill notification), tracked via `status` / `steps` /\n * `progressPercent` on the hook.\n */\nexport interface CloseQuoteGroupSummary {\n /** `true` when every planned child close was submitted successfully. */\n ok: boolean;\n /** Σ quantity already confirmed closed at resolve time, wei. */\n closedQuantity: bigint;\n /** Per-child final states. Empty when planning already failed. */\n steps: CloseQuoteGroupStep[];\n /** Present when the plan itself was infeasible — nothing was closed. */\n planFailure?: PlanGroupCloseFailure;\n /** The error that stopped the run, when `ok` is `false` and a close failed. */\n error?: SymmioRequestError;\n}\n\n/** Return type of {@link useCloseQuoteGroup}. */\nexport interface UseCloseQuoteGroupReturnType {\n /** Plan and execute a group close. Resolves with the run's summary (never rejects). */\n close: (parameters: CloseQuoteGroupParameters) => Promise<CloseQuoteGroupSummary>;\n /** Clear the run state back to `idle`. No-op while a run is in flight. */\n reset: () => void;\n /** Overall run lifecycle. */\n status: CloseQuoteGroupStatus;\n /** `true` while a run is in flight. */\n isClosing: boolean;\n /** Quantity-weighted completion, `0`–`100` (2-decimal resolution). */\n progressPercent: number;\n /** Σ quantity closed so far in the current/last run, wei. */\n closedQuantity: bigint;\n /** The run's target, wei (`0` while idle). */\n targetQuantity: bigint;\n /** Per-child close states of the current/last run, in execution order. */\n steps: CloseQuoteGroupStep[];\n /** Planning failure of the last run, when the plan was infeasible. */\n planFailure?: PlanGroupCloseFailure;\n /** The error that stopped the last run, when a child close failed. */\n error?: SymmioRequestError;\n}\n\n/** Parameters for {@link useCloseQuoteGroup}. */\nexport type UseCloseQuoteGroupParameters = ConfigParameter;\n\ninterface RunState {\n status: CloseQuoteGroupStatus;\n steps: CloseQuoteGroupStep[];\n closedQuantity: bigint;\n targetQuantity: bigint;\n planFailure?: PlanGroupCloseFailure;\n error?: SymmioRequestError;\n}\n\nconst IDLE: RunState = { status: \"idle\", steps: [], closedQuantity: 0n, targetQuantity: 0n };\n\n/**\n * Close an exact quantity across a grouped position, child by child.\n *\n * The run first plans the allocation with `planGroupClose` (largest child\n * first; every partially closed child keeps at least the symbol's\n * `minAcceptableQuoteValue`; the plan sums to the target exactly or fails\n * without closing anything). It then submits **every allocation in one bulk\n * request** (`instantCloseBulkAuto` — n operations, one endpoint call). A\n * submitted child stays `closing` until its close settles: the hook watches\n * the account's live notifications and flips the child to `closed` — advancing\n * `closedQuantity` / `progressPercent` — when its **close fill** frame arrives\n * (`lastSeenAction: FillMarketOrderInstantClose` / `FillLimitOrderClose` with\n * `success`); `status` becomes `success` once every child confirms, and a\n * `failed` frame fails that step and the run. A rejected bulk submit fails the\n * whole run at once.\n *\n * @example\n * ```tsx\n * const { close, status, progressPercent, steps } = useCloseQuoteGroup();\n * const summary = await close({\n * group, targetQuantity: parseUnits(\"2.8\", 18),\n * minAcceptableQuoteValue: market.minAcceptableQuoteValue, slippage: 5,\n * });\n * if (!summary.ok) showError(summary.planFailure ?? summary.error);\n * ```\n */\nexport function useCloseQuoteGroup(parameters: UseCloseQuoteGroupParameters = {}): UseCloseQuoteGroupReturnType {\n const config = useSymmioConfig(parameters);\n const connectedChainId = useSymmioChainId();\n const queryClient = useQueryClient();\n const [state, setState] = useState<RunState>(IDLE);\n /** Mirror of `state` for the notification callback and the submit loop (single source). */\n const runRef = useRef<RunState>(IDLE);\n const inFlight = useRef(false);\n /** Account whose notification stream confirms the run's closes. */\n const [watchAccount, setWatchAccount] = useState<Address>();\n const watchChainIdRef = useRef<number | undefined>(undefined);\n\n const commit = useCallback((next: RunState) => {\n runRef.current = next;\n setState(next);\n }, []);\n\n /**\n * Settlement tracking: a submitted child is finished when its close **fill**\n * notification arrives — `lastSeenAction` of `FillMarketOrderInstantClose`\n * (or `FillLimitOrderClose`) with a `success` status. That flips the step to\n * `closed` and advances progress; the run finishes (`success`) once every\n * step is closed. A `failed` frame for the quote marks the step (and run)\n * failed instead. Request-stage frames (`InstantRequestToClosePosition`, …)\n * are ignored.\n */\n const onNotification = useCallback(\n (notification: Notification) => {\n const run = runRef.current;\n const index = run.steps.findIndex(\n (step) => step.status === \"closing\" && String(step.quoteId) === notification.quoteId,\n );\n if (index < 0) return;\n\n const isCloseFill =\n notification.type === NotificationType.SUCCESS &&\n notification.lastSeenAction !== null &&\n CLOSE_FILL_ACTIONS.has(notification.lastSeenAction);\n const isFailure = notification.type === NotificationType.FAILED;\n if (!isCloseFill && !isFailure) return;\n\n const steps = [...run.steps];\n let closedQuantity = run.closedQuantity;\n if (isCloseFill) {\n const step = { ...steps[index]!, status: \"closed\" as const };\n closedQuantity += step.closeQuantity;\n steps[index] = step;\n const allClosed = steps.every((entry) => entry.status === \"closed\");\n const status = run.status === \"closing\" && allClosed ? \"success\" : run.status;\n commit({ ...run, steps, closedQuantity, status });\n return;\n }\n const error = normalizeSymmError(new Error(notification.failureMessage ?? \"Close failed on the solver.\"));\n steps[index] = { ...steps[index]!, status: \"failed\", error };\n commit({ ...run, steps, status: \"failed\", error });\n },\n [commit],\n );\n\n useNotifications({\n account: watchAccount,\n chainId: watchChainIdRef.current,\n config: parameters.config,\n // Listen while any submitted child still awaits its settle notifications —\n // even after a later submit failed, the earlier closes keep confirming.\n enabled: Boolean(watchAccount) && state.steps.some((step) => step.status === \"closing\"),\n onNotification,\n });\n\n const close = useCallback(\n async (runParameters: CloseQuoteGroupParameters): Promise<CloseQuoteGroupSummary> => {\n if (inFlight.current || runRef.current.steps.some((step) => step.status === \"closing\")) {\n return {\n ok: false,\n closedQuantity: 0n,\n steps: [],\n error: normalizeSymmError(new Error(\"A group close is already in flight.\")),\n };\n }\n\n const { group, targetQuantity, minAcceptableQuoteValue, slippage, markPrice, from, notificationsAccount } =\n runParameters;\n const chainId = runParameters.chainId ?? connectedChainId;\n\n const candidates = toGroupCloseCandidates(group.quotes, minAcceptableQuoteValue);\n const plan = planGroupClose(candidates, targetQuantity);\n if (!plan.feasible) {\n commit({ status: \"failed\", steps: [], closedQuantity: 0n, targetQuantity, planFailure: plan });\n return { ok: false, closedQuantity: 0n, steps: [], planFailure: plan };\n }\n\n const childByKey = new Map<string, UnifiedQuote>(group.quotes.map((quote) => [quote.key, quote]));\n const steps: CloseQuoteGroupStep[] = plan.allocations.map((allocation) => ({\n key: allocation.key,\n // The planner only emits candidates built from anchored children, so the id is present.\n quoteId: childByKey.get(allocation.key)!.quoteId!,\n closeQuantity: allocation.closeQuantity,\n kind: allocation.kind,\n status: \"queued\",\n }));\n\n inFlight.current = true;\n const firstChild = childByKey.get(steps[0]!.key)!;\n watchChainIdRef.current = chainId;\n setWatchAccount(notificationsAccount ?? firstChild.vaAddress ?? firstChild.partyA);\n\n // Every allocation submits in ONE bulk round-trip, so all steps go `closing` together.\n commit({\n status: \"closing\",\n steps: steps.map((step) => ({ ...step, status: \"closing\" as const })),\n closedQuantity: 0n,\n targetQuantity,\n });\n\n const base = instantCloseBulkAutoMutationOptions(config);\n try {\n await base.mutationFn({\n orders: steps.map((step) => {\n const child = childByKey.get(step.key)!;\n return {\n partyA: child.vaAddress ?? child.partyA,\n market: { id: Number(child.symbolId) },\n positionType: child.positionType,\n quoteId: step.quoteId,\n quantityToClose: formatUnits(step.closeQuantity, WEI_DECIMALS),\n slippage,\n markPrice,\n };\n }),\n from,\n chainId,\n });\n } catch (err) {\n const error = normalizeSymmError(err);\n const run = runRef.current;\n commit({\n ...run,\n status: \"failed\",\n steps: run.steps.map((step) =>\n step.status === \"closing\" ? { ...step, status: \"failed\" as const, error } : step,\n ),\n error,\n });\n return { ok: false, closedQuantity: runRef.current.closedQuantity, steps: [...runRef.current.steps], error };\n } finally {\n inFlight.current = false;\n }\n\n // Surface the fresh closing rows immediately, exactly like the single-close hook.\n const configKey = config.getChainConfigKey(chainId);\n void queryClient.invalidateQueries({ predicate: predicateMatch(getInstantClosesQueryKey, { configKey }) });\n\n // Submitted. Completion is notification-driven; fast fills may already have\n // finished the run while the request was in flight.\n const run = runRef.current;\n if (run.status === \"closing\" && run.steps.every((step) => step.status === \"closed\")) {\n commit({ ...run, status: \"success\" });\n }\n return { ok: true, closedQuantity: runRef.current.closedQuantity, steps: [...runRef.current.steps] };\n },\n [commit, config, connectedChainId, queryClient],\n );\n\n const reset = useCallback(() => {\n if (inFlight.current) return;\n watchChainIdRef.current = undefined;\n setWatchAccount(undefined);\n commit(IDLE);\n }, [commit]);\n\n const progressPercent = useMemo(() => {\n if (state.targetQuantity <= 0n) return 0;\n return Number((state.closedQuantity * 10_000n) / state.targetQuantity) / 100;\n }, [state.closedQuantity, state.targetQuantity]);\n\n return {\n close,\n reset,\n status: state.status,\n isClosing: state.status === \"closing\",\n progressPercent,\n closedQuantity: state.closedQuantity,\n targetQuantity: state.targetQuantity,\n steps: state.steps,\n planFailure: state.planFailure,\n error: state.error,\n };\n}\n"],"mappings":";;;;;;;;;;;AA0BA,IAAM,IAAe,IAOf,IAAqB,IAAI,IAAI,CAAC,+BAA+B,qBAAqB,CAAC,GAiHnF,IAAiB;CAAE,QAAQ;CAAQ,OAAO,CAAC;CAAG,gBAAgB;CAAI,gBAAgB;AAAG;AA4B3F,SAAgB,EAAmB,IAA2C,CAAC,GAAiC;CAC9G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAmB,EAAiB,GACpC,IAAc,EAAe,GAC7B,CAAC,GAAO,KAAY,EAAmB,CAAI,GAE3C,IAAS,EAAiB,CAAI,GAC9B,IAAW,EAAO,EAAK,GAEvB,CAAC,GAAc,KAAmB,EAAkB,GACpD,IAAkB,EAA2B,KAAA,CAAS,GAEtD,IAAS,GAAa,MAAmB;EAE7C,AADA,EAAO,UAAU,GACjB,EAAS,CAAI;CACf,GAAG,CAAC,CAAC,GAWC,IAAiB,GACpB,MAA+B;EAC9B,IAAM,IAAM,EAAO,SACb,IAAQ,EAAI,MAAM,WACrB,MAAS,EAAK,WAAW,aAAa,OAAO,EAAK,OAAO,MAAM,EAAa,OAC/E;EACA,IAAI,IAAQ,GAAG;EAEf,IAAM,IACJ,EAAa,SAAS,EAAiB,WACvC,EAAa,mBAAmB,QAChC,EAAmB,IAAI,EAAa,cAAc,GAC9C,IAAY,EAAa,SAAS,EAAiB;EACzD,IAAI,CAAC,KAAe,CAAC,GAAW;EAEhC,IAAM,IAAQ,CAAC,GAAG,EAAI,KAAK,GACvB,IAAiB,EAAI;EACzB,IAAI,GAAa;GACf,IAAM,IAAO;IAAE,GAAG,EAAM;IAAS,QAAQ;GAAkB;GAE3D,AADA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,CAAC;EAIzG,IAAM,IAAM,EAAO;EAInB,OAHI,EAAI,WAAW,aAAa,EAAI,MAAM,OAAO,MAAS,EAAK,WAAW,QAAQ,KAChF,EAAO;GAAE,GAAG;GAAK,QAAQ;EAAU,CAAC,GAE/B;GAAE,IAAI;GAAM,gBAAgB,EAAO,QAAQ;GAAgB,OAAO,CAAC,GAAG,EAAO,QAAQ,KAAK;EAAE;CACrG,GACA;EAAC;EAAQ;EAAQ;EAAkB;CAAW,CAChD,GAEM,IAAQ,QAAkB;EAC1B,EAAS,YACb,EAAgB,UAAU,KAAA,GAC1B,EAAgB,KAAA,CAAS,GACzB,EAAO,CAAI;CACb,GAAG,CAAC,CAAM,CAAC,GAEL,IAAkB,QAClB,EAAM,kBAAkB,KAAW,IAChC,OAAQ,EAAM,iBAAiB,SAAW,EAAM,cAAc,IAAI,KACxE,CAAC,EAAM,gBAAgB,EAAM,cAAc,CAAC;CAE/C,OAAO;EACL;EACA;EACA,QAAQ,EAAM;EACd,WAAW,EAAM,WAAW;EAC5B;EACA,gBAAgB,EAAM;EACtB,gBAAgB,EAAM;EACtB,OAAO,EAAM;EACb,aAAa,EAAM;EACnB,OAAO,EAAM;CACf;AACF"}
|
|
1
|
+
{"version":3,"file":"use-close-quote-group.js","names":[],"sources":["../../src/quotes/use-close-quote-group.ts"],"sourcesContent":["\"use client\";\n\nimport {\n getInstantClosesQueryKey,\n instantCloseBulkAutoMutationOptions,\n NotificationType,\n planGroupClose,\n toGroupCloseCandidates,\n type ConfigParameter,\n type Notification,\n type PlanGroupCloseFailure,\n type QuoteGroup,\n type UnifiedQuote,\n} from \"@symmio/trading-core\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { useCallback, useMemo, useRef, useState } from \"react\";\nimport type { Address } from \"viem\";\nimport { formatUnits } from \"viem\";\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\";\nimport { predicateMatch } from \"../utils\";\nimport { useNotifications } from \"../websocket/use-notifications\";\n\n/** Decimal places of an 18-decimal-wei fixed-point value. */\nconst WEI_DECIMALS = 18;\n\n/**\n * Solver `lastSeenAction` values that report a close **fill** — the moment a\n * close is actually done (mirrors the core notification classifier's fill set;\n * the request-stage actions are deliberately not here).\n */\nconst CLOSE_FILL_ACTIONS = new Set([\"FillMarketOrderInstantClose\", \"FillLimitOrderClose\"]);\n\n/**\n * Lifecycle of one child close inside a group close:\n * `queued` → `closing` (submitted in the bulk request, awaiting its close-fill\n * notification) → `closed` (fill notification received), or `failed` (the bulk\n * submit or the close itself errored).\n */\nexport type CloseQuoteGroupStepStatus = \"queued\" | \"closing\" | \"closed\" | \"failed\";\n\n/** Live state of one child close inside a group close run. */\nexport interface CloseQuoteGroupStep {\n /** Child identity (`UnifiedQuote.key`). */\n key: string;\n /** On-chain quote id of the child. */\n quoteId: bigint;\n /** Planned close amount, wei. */\n closeQuantity: bigint;\n /** `full` when the child closes entirely, `partial` otherwise. */\n kind: \"full\" | \"partial\";\n /** Current lifecycle stage of this child close. */\n status: CloseQuoteGroupStepStatus;\n /** Normalized error, when `status` is `failed`. */\n error?: SymmioRequestError;\n}\n\n/** Overall lifecycle of a group close run. */\nexport type CloseQuoteGroupStatus = \"idle\" | \"closing\" | \"success\" | \"failed\";\n\n/** Inputs for one {@link UseCloseQuoteGroupReturnType.close} run. */\nexport interface CloseQuoteGroupParameters {\n /** The group whose children are being closed. */\n group: QuoteGroup;\n /** Exact total quantity to close across the group, wei. */\n targetQuantity: bigint;\n /**\n * The symbol's `minAcceptableQuoteValue` (wei) — the dust floor a partially\n * closed child must keep. Read it from the market info of the group's symbol.\n */\n minAcceptableQuoteValue: bigint;\n /** Slippage tolerance percent forwarded to every child close (e.g. `5`). */\n slippage: number;\n /** Pre-fetched mark price (decimal string) forwarded to every child close. */\n markPrice?: string;\n /** Delegated session key to submit the closes from, when delegation is active. */\n from?: Address;\n /**\n * Check that the signer holds the `requestToClosePosition` delegation before\n * any close is signed. Defaults to `true`; a run that fails it reports\n * `INSTANT_SIGNER_NOT_DELEGATED` in its summary's `error`. Pass `false` when\n * your UI already gates the close on delegation.\n */\n preflightDelegation?: boolean;\n /**\n * Account whose live notification stream reports the close fills — pass the\n * **sub-account** when closing Virtual Account quotes (the VA frames arrive\n * on its owning sub-account's stream). Defaults to the first child's\n * `vaAddress ?? partyA`.\n */\n notificationsAccount?: Address;\n /** Chain override; defaults to the connected chain. */\n chainId?: number;\n}\n\n/**\n * Submission outcome of one {@link UseCloseQuoteGroupReturnType.close} run.\n * Resolves when the bulk request carrying every child close has been\n * **submitted** — settlement is confirmed asynchronously per child (its\n * close-fill notification), tracked via `status` / `steps` /\n * `progressPercent` on the hook.\n */\nexport interface CloseQuoteGroupSummary {\n /** `true` when every planned child close was submitted successfully. */\n ok: boolean;\n /** Σ quantity already confirmed closed at resolve time, wei. */\n closedQuantity: bigint;\n /** Per-child final states. Empty when planning already failed. */\n steps: CloseQuoteGroupStep[];\n /** Present when the plan itself was infeasible — nothing was closed. */\n planFailure?: PlanGroupCloseFailure;\n /** The error that stopped the run, when `ok` is `false` and a close failed. */\n error?: SymmioRequestError;\n}\n\n/** Return type of {@link useCloseQuoteGroup}. */\nexport interface UseCloseQuoteGroupReturnType {\n /** Plan and execute a group close. Resolves with the run's summary (never rejects). */\n close: (parameters: CloseQuoteGroupParameters) => Promise<CloseQuoteGroupSummary>;\n /** Clear the run state back to `idle`. No-op while a run is in flight. */\n reset: () => void;\n /** Overall run lifecycle. */\n status: CloseQuoteGroupStatus;\n /** `true` while a run is in flight. */\n isClosing: boolean;\n /** Quantity-weighted completion, `0`–`100` (2-decimal resolution). */\n progressPercent: number;\n /** Σ quantity closed so far in the current/last run, wei. */\n closedQuantity: bigint;\n /** The run's target, wei (`0` while idle). */\n targetQuantity: bigint;\n /** Per-child close states of the current/last run, in execution order. */\n steps: CloseQuoteGroupStep[];\n /** Planning failure of the last run, when the plan was infeasible. */\n planFailure?: PlanGroupCloseFailure;\n /** The error that stopped the last run, when a child close failed. */\n error?: SymmioRequestError;\n}\n\n/** Parameters for {@link useCloseQuoteGroup}. */\nexport type UseCloseQuoteGroupParameters = ConfigParameter;\n\ninterface RunState {\n status: CloseQuoteGroupStatus;\n steps: CloseQuoteGroupStep[];\n closedQuantity: bigint;\n targetQuantity: bigint;\n planFailure?: PlanGroupCloseFailure;\n error?: SymmioRequestError;\n}\n\nconst IDLE: RunState = { status: \"idle\", steps: [], closedQuantity: 0n, targetQuantity: 0n };\n\n/**\n * Close an exact quantity across a grouped position, child by child.\n *\n * The run first plans the allocation with `planGroupClose` (largest child\n * first; every partially closed child keeps at least the symbol's\n * `minAcceptableQuoteValue`; the plan sums to the target exactly or fails\n * without closing anything). It then submits **every allocation in one bulk\n * request** (`instantCloseBulkAuto` — n operations, one endpoint call). A\n * submitted child stays `closing` until its close settles: the hook watches\n * the account's live notifications and flips the child to `closed` — advancing\n * `closedQuantity` / `progressPercent` — when its **close fill** frame arrives\n * (`lastSeenAction: FillMarketOrderInstantClose` / `FillLimitOrderClose` with\n * `success`); `status` becomes `success` once every child confirms, and a\n * `failed` frame fails that step and the run. A rejected bulk submit fails the\n * whole run at once.\n *\n * @example\n * ```tsx\n * const { close, status, progressPercent, steps } = useCloseQuoteGroup();\n * const summary = await close({\n * group, targetQuantity: parseUnits(\"2.8\", 18),\n * minAcceptableQuoteValue: market.minAcceptableQuoteValue, slippage: 5,\n * });\n * if (!summary.ok) showError(summary.planFailure ?? summary.error);\n * ```\n */\nexport function useCloseQuoteGroup(parameters: UseCloseQuoteGroupParameters = {}): UseCloseQuoteGroupReturnType {\n const config = useSymmioConfig(parameters);\n const connectedChainId = useSymmioChainId();\n const queryClient = useQueryClient();\n const [state, setState] = useState<RunState>(IDLE);\n /** Mirror of `state` for the notification callback and the submit loop (single source). */\n const runRef = useRef<RunState>(IDLE);\n const inFlight = useRef(false);\n /** Account whose notification stream confirms the run's closes. */\n const [watchAccount, setWatchAccount] = useState<Address>();\n const watchChainIdRef = useRef<number | undefined>(undefined);\n\n const commit = useCallback((next: RunState) => {\n runRef.current = next;\n setState(next);\n }, []);\n\n /**\n * Settlement tracking: a submitted child is finished when its close **fill**\n * notification arrives — `lastSeenAction` of `FillMarketOrderInstantClose`\n * (or `FillLimitOrderClose`) with a `success` status. That flips the step to\n * `closed` and advances progress; the run finishes (`success`) once every\n * step is closed. A `failed` frame for the quote marks the step (and run)\n * failed instead. Request-stage frames (`InstantRequestToClosePosition`, …)\n * are ignored.\n */\n const onNotification = useCallback(\n (notification: Notification) => {\n const run = runRef.current;\n const index = run.steps.findIndex(\n (step) => step.status === \"closing\" && String(step.quoteId) === notification.quoteId,\n );\n if (index < 0) return;\n\n const isCloseFill =\n notification.type === NotificationType.SUCCESS &&\n notification.lastSeenAction !== null &&\n CLOSE_FILL_ACTIONS.has(notification.lastSeenAction);\n const isFailure = notification.type === NotificationType.FAILED;\n if (!isCloseFill && !isFailure) return;\n\n const steps = [...run.steps];\n let closedQuantity = run.closedQuantity;\n if (isCloseFill) {\n const step = { ...steps[index]!, status: \"closed\" as const };\n closedQuantity += step.closeQuantity;\n steps[index] = step;\n const allClosed = steps.every((entry) => entry.status === \"closed\");\n const status = run.status === \"closing\" && allClosed ? \"success\" : run.status;\n commit({ ...run, steps, closedQuantity, status });\n return;\n }\n const error = normalizeSymmError(new Error(notification.failureMessage ?? \"Close failed on the solver.\"));\n steps[index] = { ...steps[index]!, status: \"failed\", error };\n commit({ ...run, steps, status: \"failed\", error });\n },\n [commit],\n );\n\n useNotifications({\n account: watchAccount,\n chainId: watchChainIdRef.current,\n config: parameters.config,\n // Listen while any submitted child still awaits its settle notifications —\n // even after a later submit failed, the earlier closes keep confirming.\n enabled: Boolean(watchAccount) && state.steps.some((step) => step.status === \"closing\"),\n onNotification,\n });\n\n const close = useCallback(\n async (runParameters: CloseQuoteGroupParameters): Promise<CloseQuoteGroupSummary> => {\n if (inFlight.current || runRef.current.steps.some((step) => step.status === \"closing\")) {\n return {\n ok: false,\n closedQuantity: 0n,\n steps: [],\n error: normalizeSymmError(new Error(\"A group close is already in flight.\")),\n };\n }\n\n const {\n group,\n targetQuantity,\n minAcceptableQuoteValue,\n slippage,\n markPrice,\n from,\n preflightDelegation,\n notificationsAccount,\n } = runParameters;\n const chainId = runParameters.chainId ?? connectedChainId;\n\n const candidates = toGroupCloseCandidates(group.quotes, minAcceptableQuoteValue);\n const plan = planGroupClose(candidates, targetQuantity);\n if (!plan.feasible) {\n commit({ status: \"failed\", steps: [], closedQuantity: 0n, targetQuantity, planFailure: plan });\n return { ok: false, closedQuantity: 0n, steps: [], planFailure: plan };\n }\n\n const childByKey = new Map<string, UnifiedQuote>(group.quotes.map((quote) => [quote.key, quote]));\n const steps: CloseQuoteGroupStep[] = plan.allocations.map((allocation) => ({\n key: allocation.key,\n // The planner only emits candidates built from anchored children, so the id is present.\n quoteId: childByKey.get(allocation.key)!.quoteId!,\n closeQuantity: allocation.closeQuantity,\n kind: allocation.kind,\n status: \"queued\",\n }));\n\n inFlight.current = true;\n const firstChild = childByKey.get(steps[0]!.key)!;\n watchChainIdRef.current = chainId;\n setWatchAccount(notificationsAccount ?? firstChild.vaAddress ?? firstChild.partyA);\n\n // Every allocation submits in ONE bulk round-trip, so all steps go `closing` together.\n commit({\n status: \"closing\",\n steps: steps.map((step) => ({ ...step, status: \"closing\" as const })),\n closedQuantity: 0n,\n targetQuantity,\n });\n\n const base = instantCloseBulkAutoMutationOptions(config);\n try {\n await base.mutationFn({\n orders: steps.map((step) => {\n const child = childByKey.get(step.key)!;\n return {\n partyA: child.vaAddress ?? child.partyA,\n market: { id: Number(child.symbolId) },\n positionType: child.positionType,\n quoteId: step.quoteId,\n quantityToClose: formatUnits(step.closeQuantity, WEI_DECIMALS),\n slippage,\n markPrice,\n };\n }),\n from,\n preflightDelegation,\n chainId,\n });\n } catch (err) {\n const error = normalizeSymmError(err);\n const run = runRef.current;\n commit({\n ...run,\n status: \"failed\",\n steps: run.steps.map((step) =>\n step.status === \"closing\" ? { ...step, status: \"failed\" as const, error } : step,\n ),\n error,\n });\n return { ok: false, closedQuantity: runRef.current.closedQuantity, steps: [...runRef.current.steps], error };\n } finally {\n inFlight.current = false;\n }\n\n // Surface the fresh closing rows immediately, exactly like the single-close hook.\n const configKey = config.getChainConfigKey(chainId);\n void queryClient.invalidateQueries({ predicate: predicateMatch(getInstantClosesQueryKey, { configKey }) });\n\n // Submitted. Completion is notification-driven; fast fills may already have\n // finished the run while the request was in flight.\n const run = runRef.current;\n if (run.status === \"closing\" && run.steps.every((step) => step.status === \"closed\")) {\n commit({ ...run, status: \"success\" });\n }\n return { ok: true, closedQuantity: runRef.current.closedQuantity, steps: [...runRef.current.steps] };\n },\n [commit, config, connectedChainId, queryClient],\n );\n\n const reset = useCallback(() => {\n if (inFlight.current) return;\n watchChainIdRef.current = undefined;\n setWatchAccount(undefined);\n commit(IDLE);\n }, [commit]);\n\n const progressPercent = useMemo(() => {\n if (state.targetQuantity <= 0n) return 0;\n return Number((state.closedQuantity * 10_000n) / state.targetQuantity) / 100;\n }, [state.closedQuantity, state.targetQuantity]);\n\n return {\n close,\n reset,\n status: state.status,\n isClosing: state.status === \"closing\",\n progressPercent,\n closedQuantity: state.closedQuantity,\n targetQuantity: state.targetQuantity,\n steps: state.steps,\n planFailure: state.planFailure,\n error: state.error,\n };\n}\n"],"mappings":";;;;;;;;;;;AA0BA,IAAM,IAAe,IAOf,IAAqB,IAAI,IAAI,CAAC,+BAA+B,qBAAqB,CAAC,GAwHnF,IAAiB;CAAE,QAAQ;CAAQ,OAAO,CAAC;CAAG,gBAAgB;CAAI,gBAAgB;AAAG;AA4B3F,SAAgB,EAAmB,IAA2C,CAAC,GAAiC;CAC9G,IAAM,IAAS,EAAgB,CAAU,GACnC,IAAmB,EAAiB,GACpC,IAAc,EAAe,GAC7B,CAAC,GAAO,KAAY,EAAmB,CAAI,GAE3C,IAAS,EA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AAC;CAE/C,OAAO;EACL;EACA;EACA,QAAQ,EAAM;EACd,WAAW,EAAM,WAAW;EAC5B;EACA,gBAAgB,EAAM;EACtB,gBAAgB,EAAM;EACtB,OAAO,EAAM;EACb,aAAa,EAAM;EACnB,OAAO,EAAM;CACf;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symmio/trading-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "React adapter for the SYMMIO SDK. Hooks, providers, and React-bound ergonomics on top of @symmio/trading-core.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/SYMM-IO/Trading-SDK/tree/main/packages/trading-react#readme",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@tanstack/react-query": "^5.100.0",
|
|
92
92
|
"decimal.js": "^10.4.3",
|
|
93
93
|
"zustand": "^5.0.0",
|
|
94
|
-
"@symmio/trading-core": "^3.
|
|
94
|
+
"@symmio/trading-core": "^3.6.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"react": "^19.0.0",
|