@agg-build/hooks 2.3.0 → 2.4.6

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __async,
3
3
  useAggClient
4
- } from "./chunk-R7C4J345.mjs";
4
+ } from "./chunk-CAG2RCHR.mjs";
5
5
 
6
6
  // src/use-ramp-quotes.ts
7
7
  import { useMutation } from "@tanstack/react-query";
@@ -63,6 +63,18 @@ var Venue = /* @__PURE__ */ ((Venue2) => {
63
63
  Venue2["hyperliquid"] = "hyperliquid";
64
64
  return Venue2;
65
65
  })(Venue || {});
66
+ var ACTIVE_VENUES = [
67
+ "polymarket" /* polymarket */,
68
+ "limitless" /* limitless */,
69
+ "opinion" /* opinion */,
70
+ "predict" /* predict */,
71
+ "probable" /* probable */,
72
+ "myriad" /* myriad */,
73
+ "hyperliquid" /* hyperliquid */
74
+ ];
75
+ var INACTIVE_VENUES = ["kalshi" /* kalshi */];
76
+ var ACTIVE_VENUE_SET = new Set(ACTIVE_VENUES);
77
+ var INACTIVE_VENUE_SET = new Set(INACTIVE_VENUES);
66
78
 
67
79
  // ../common/src/enums/market-status.ts
68
80
  var MatchStatus = /* @__PURE__ */ ((MatchStatus2) => {
@@ -596,6 +608,7 @@ var enUsLabels = {
596
608
  venuePlural: "Venues",
597
609
  matched: "Matched",
598
610
  matchedCount: (count) => `${count} ${count === 1 ? "Match" : "Matches"}`,
611
+ remainingMarkets: (count) => `+${count} ${count === 1 ? "market" : "markets"}`,
599
612
  priceGap: "Price Gap"
600
613
  },
601
614
  eventItemDetails: {
@@ -620,7 +633,7 @@ var enUsLabels = {
620
633
  marketSelectEmpty: "No markets found"
621
634
  },
622
635
  settlementSummary: {
623
- title: "Settlement",
636
+ title: "Settlement differences",
624
637
  readFullDetails: "Read full details",
625
638
  showLess: "Show less"
626
639
  },
@@ -687,6 +700,9 @@ var enUsLabels = {
687
700
  trading: {
688
701
  settlementSection: "Settlement",
689
702
  settlementDifferencesTitle: "Key differences across venues",
703
+ settlementFullRulesTitle: "Full rules by venue",
704
+ settlementCriticalDifferenceLabel: "Critical",
705
+ settlementValueUnavailable: "Not provided",
690
706
  settlementLoading: "Loading settlement",
691
707
  settlementDetailsAria: (venueLabel) => `${venueLabel} settlement details`,
692
708
  settlementShowMoreAria: (ctaLabel, venueLabel) => `${ctaLabel} for ${venueLabel}`,
@@ -741,6 +757,7 @@ var enUsLabels = {
741
757
  orderDisabledNoOutcome: "Select an outcome to place an order.",
742
758
  orderDisabledNoEvent: "No event selected.",
743
759
  insufficientBalance: "Insufficient balance",
760
+ lowLiquidityWarning: "This market has low liquidity, which may impact execution price for larger orders.",
744
761
  refreshQuote: "Refresh Quote",
745
762
  confirmOrder: "Confirm Order",
746
763
  withdrawSubmitted: "Withdrawal submitted",
@@ -3392,11 +3409,17 @@ var parseAuthCallbackCode = (callbackUrl) => {
3392
3409
  const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
3393
3410
  return (_a = resolvedUrl == null ? void 0 : resolvedUrl.searchParams.get("code")) != null ? _a : null;
3394
3411
  };
3412
+ var parseLinkConfirmToken = (callbackUrl) => {
3413
+ var _a;
3414
+ const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
3415
+ return (_a = resolvedUrl == null ? void 0 : resolvedUrl.searchParams.get("link_confirm_token")) != null ? _a : null;
3416
+ };
3395
3417
  var getAuthCallbackCleanupPath = (callbackUrl) => {
3396
3418
  const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
3397
3419
  if (!resolvedUrl) return null;
3398
3420
  const params = new URLSearchParams(resolvedUrl.search);
3399
3421
  params.delete("code");
3422
+ params.delete("link_confirm_token");
3400
3423
  const search = params.toString();
3401
3424
  return `${resolvedUrl.pathname}${search ? `?${search}` : ""}`;
3402
3425
  };
@@ -3409,6 +3432,12 @@ var exchangeAuthCallbackCode = (client, callbackUrl) => __async(null, null, func
3409
3432
  user: result.user
3410
3433
  };
3411
3434
  });
3435
+ var confirmLinkAccountCallback = (client, callbackUrl) => __async(null, null, function* () {
3436
+ const token = parseLinkConfirmToken(callbackUrl);
3437
+ if (!token) return null;
3438
+ yield client.linkAccountConfirm(token);
3439
+ return { cleanupPath: getAuthCallbackCleanupPath(callbackUrl) };
3440
+ });
3412
3441
  var parseAuthCallbackTokens = (callbackUrl) => {
3413
3442
  var _a, _b;
3414
3443
  const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
@@ -3655,6 +3684,14 @@ function AggAuthProvider({ children }) {
3655
3684
  }
3656
3685
  return resolvedUser2;
3657
3686
  }
3687
+ const confirmedLink = yield confirmLinkAccountCallback(client, callbackUrl);
3688
+ if (confirmedLink) {
3689
+ const resolvedUser2 = yield refreshCurrentUser(client);
3690
+ if (callbackUrl === void 0) {
3691
+ replaceAuthCallbackUrl(confirmedLink.cleanupPath);
3692
+ }
3693
+ return resolvedUser2;
3694
+ }
3658
3695
  const tokens = parseAuthCallbackTokens(callbackUrl);
3659
3696
  if (!tokens) return null;
3660
3697
  client.setSession(createAuthCallbackSession(tokens));
@@ -11,7 +11,7 @@ import {
11
11
  useOnWithdrawalLifecycle,
12
12
  useSyncBalances,
13
13
  useWithdrawManaged
14
- } from "./chunk-R7C4J345.mjs";
14
+ } from "./chunk-CAG2RCHR.mjs";
15
15
 
16
16
  // src/withdraw/use-withdraw-flow.ts
17
17
  import { useCallback, useEffect, useMemo, useState } from "react";
package/dist/deposit.js CHANGED
@@ -533,6 +533,7 @@ var enUsLabels = {
533
533
  venuePlural: "Venues",
534
534
  matched: "Matched",
535
535
  matchedCount: (count) => `${count} ${count === 1 ? "Match" : "Matches"}`,
536
+ remainingMarkets: (count) => `+${count} ${count === 1 ? "market" : "markets"}`,
536
537
  priceGap: "Price Gap"
537
538
  },
538
539
  eventItemDetails: {
@@ -557,7 +558,7 @@ var enUsLabels = {
557
558
  marketSelectEmpty: "No markets found"
558
559
  },
559
560
  settlementSummary: {
560
- title: "Settlement",
561
+ title: "Settlement differences",
561
562
  readFullDetails: "Read full details",
562
563
  showLess: "Show less"
563
564
  },
@@ -624,6 +625,9 @@ var enUsLabels = {
624
625
  trading: {
625
626
  settlementSection: "Settlement",
626
627
  settlementDifferencesTitle: "Key differences across venues",
628
+ settlementFullRulesTitle: "Full rules by venue",
629
+ settlementCriticalDifferenceLabel: "Critical",
630
+ settlementValueUnavailable: "Not provided",
627
631
  settlementLoading: "Loading settlement",
628
632
  settlementDetailsAria: (venueLabel) => `${venueLabel} settlement details`,
629
633
  settlementShowMoreAria: (ctaLabel, venueLabel) => `${ctaLabel} for ${venueLabel}`,
@@ -678,6 +682,7 @@ var enUsLabels = {
678
682
  orderDisabledNoOutcome: "Select an outcome to place an order.",
679
683
  orderDisabledNoEvent: "No event selected.",
680
684
  insufficientBalance: "Insufficient balance",
685
+ lowLiquidityWarning: "This market has low liquidity, which may impact execution price for larger orders.",
681
686
  refreshQuote: "Refresh Quote",
682
687
  confirmOrder: "Confirm Order",
683
688
  withdrawSubmitted: "Withdrawal submitted",
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-UYM2TJOM.mjs";
4
+ } from "./chunk-4IRZFXAC.mjs";
5
5
  import {
6
6
  __async,
7
7
  useAggAuthState,
@@ -11,7 +11,7 @@ import {
11
11
  useDepositAddresses,
12
12
  useOptionalAggClient,
13
13
  useSyncBalances
14
- } from "./chunk-R7C4J345.mjs";
14
+ } from "./chunk-CAG2RCHR.mjs";
15
15
 
16
16
  // src/deposit/normalize-wallet-error.ts
17
17
  function normalizeWalletError(error, supportedChains) {
package/dist/index.d.mts CHANGED
@@ -290,6 +290,9 @@ type VenueMarket = {
290
290
  externalIdentifier: string;
291
291
  status?: MarketStatus | undefined;
292
292
  conditionId?: string | null | undefined;
293
+ description?: string | null | undefined;
294
+ rulesPrimary?: string | null | undefined;
295
+ rulesSecondary?: string | null | undefined;
293
296
  venueMarketOutcomes?: {
294
297
  id: string;
295
298
  /** REMOVED — no longer returned; use GET /midpoints for live prices. */
@@ -363,6 +366,8 @@ type VenueEvent = {
363
366
  structureType?: "candidate" | "sport" | "axis" | "dates" | null | undefined;
364
367
  /** Canonical sport slug for sports events (e.g. "basketball", "soccer"); null for non-sports. */
365
368
  sport?: string | null | undefined;
369
+ /** Structured per-venue settlement key-differences for this event's cluster. */
370
+ settlementDiff?: SettlementDiff | null | undefined;
366
371
  };
367
372
  type Orderbook = {
368
373
  bids: {
@@ -403,6 +408,16 @@ type VenueMarketOutcome = {
403
408
  type VenueEventWithMarkets = VenueEvent & {
404
409
  venueMarkets: VenueMarket[];
405
410
  };
411
+ type SettlementDifference = {
412
+ type: string;
413
+ title: string;
414
+ perVenue: Record<string, string>;
415
+ summary?: string | undefined;
416
+ };
417
+ type SettlementDiff = {
418
+ sharedSummary: string;
419
+ differences: SettlementDifference[];
420
+ };
406
421
 
407
422
  declare function getWalletAddressFromUserProfile(user: UserProfile | undefined): string | undefined;
408
423
 
@@ -842,6 +857,7 @@ interface AggUiLabels {
842
857
  venuePlural: string;
843
858
  matched: string;
844
859
  matchedCount: (count: number) => string;
860
+ remainingMarkets: (count: number) => string;
845
861
  priceGap: string;
846
862
  };
847
863
  eventItemDetails: {
@@ -933,6 +949,9 @@ interface AggUiLabels {
933
949
  trading: {
934
950
  settlementSection: string;
935
951
  settlementDifferencesTitle: string;
952
+ settlementFullRulesTitle: string;
953
+ settlementCriticalDifferenceLabel: string;
954
+ settlementValueUnavailable: string;
936
955
  settlementLoading: string;
937
956
  settlementDetailsAria: (venueLabel: string) => string;
938
957
  settlementShowMoreAria: (ctaLabel: string, venueLabel: string) => string;
@@ -981,6 +1000,7 @@ interface AggUiLabels {
981
1000
  orderDisabledNoOutcome: string;
982
1001
  orderDisabledNoEvent: string;
983
1002
  insufficientBalance: string;
1003
+ lowLiquidityWarning: string;
984
1004
  refreshQuote: string;
985
1005
  confirmOrder: string;
986
1006
  withdrawSubmitted: string;
@@ -5708,4 +5728,4 @@ declare function useAppConfig(): UseAppConfigResult;
5708
5728
  */
5709
5729
  declare function useCachedAppConfig(): UseAppConfigResult;
5710
5730
 
5711
- export { AUTH_CHOOSER_OPEN_EVENT, type AggAuthContextValue, type AggAuthSignInOptions, type AggBalanceContextValue, AggBalanceProvider, AggProvider, type AggProviderProps, AggProvider as AggSdkProvider, type AggProviderProps as AggSdkProviderProps, type AggUiConfig, type AggUiConfigInput, type AggUiLabels, type AggUiLabelsInput, AggUiProvider, type AggUiTradingExecutionMode, CHART_TIME_RANGES, CONFIRMED_MATCH_STATUSES, type ChartTimeRange, type ClosedPositionTotals, type ComputePriceGapsOptions, DEFAULT_AGG_ROOT_CLASS_NAME, type DagStepProgress, type EventListStateContextValue, EventListStateProvider, type EventListStateSnapshot, type EventTradingContextValue, type EventTradingState, type ExecutionProgressPhase, type ExecutionTerminalOrderEvent, type GeoBlockState, type GetOrdersQuery, type GetPositionsQuery, type InvalidateUserActivityOptions, type InvalidateUserMoneyStateOptions, type LiveBestPriceCandidate, type LiveBestPriceCandidates, type LiveBestPrices, type LiveCandle, MAX_PRICE_GAP_PCT, MIN_PRICE_GAP_PCT, type MarketChartCandle, type MarketChartData, type MarketChartVenueData, type MarketOrderbookData, type MarketOrderbookIntegrity, MarketStatus, type MarketTradingState, MatchStatus, MatchType, type OrderEligibility, type OrderEligibilityReason, type OrderListItem, type OrderbookResult, type PositionGroup, type PriceGapValue, type RedeemEvent, type RedeemLegLifecycle, type RedeemLifecycleState, RedeemRejectedError, type RollingChartWindow, type ScaledCandlePoint, type SdkUiConfig, type SdkUiConfigInput, type SdkUiProviderProps, type SmartRouteLoadingReason, type ThemeMode, TradeSide, type TradingAction, type TradingState, type TradingStateBase, type TradingStateKind, type UseAggAuthOptions, type UseAggAuthReturn, type UseAppConfigResult, type UseArbFeedResult, type UseCategoriesOptions, type UseCategoryChildrenOptions, type UseEnrichedVenueEventOptions, type UseExecuteManagedOptions, type UseExecutionOrdersOptions, type UseExecutionPositionsOptions, type UseExecutionProgressOptions, type UseExecutionProgressResult, type UseExternalIdOptions, type UseExternalIdReturn, type UseLinkAccountReturn, type UseLiveCandleOverlayOptions, type UseLiveCandleOverlayResult, type UseLiveCandlesOptions, type UseLiveCandlesResult, type UseLiveMarketResult, type UseMarketArbResult, type UseMarketChartOptions, type UseMarketChartResult, type UseMarketOrderbookOptions, type UseMarketOrderbookResult, type UseMarketOrderbookVenueOutcome, type UseMarketSearchOptions, type UseMidpointsOptions, type UseMidpointsResult, type UseOrderBookOptions, type UseOrderbookQuoteOptions, type UseOrderbookQuoteResult, type UseOrdersOptions, type UsePositionsOptions, type UseQuoteManagedOptions, type UseRedeemLifecycleInput, type UseRollingChartWindowOptions, type UseSearchOptions, type UseSmartRouteOptions, type UseSmartRouteResult, type UseUserActivityOptions, type UseUserHoldingsOptions, type UseVenueEventOptions, type UseVenueEventsOptions, type UseVenueMarketMidpointsOptions, type UseVenueMarketsOptions, type UseViewportMidpointsOptions, type UseVisibleIdsOptions, type UseVisibleIdsResult, type UserActivityInvalidationStrategy, Venue, type VenueAvailabilityState, type VenueEvent, type VenueEventWithMarkets, type VenueMarket, type VenueMarketOutcome, type WalletActionSendTokenParams, type WalletActions, buildLiveBestPriceCandidates, computeClosedPositionTotals, computePriceGaps, defaultAggUiConfig, defaultAggUiConfig as defaultSdkUiConfig, executionKeys, extractOutcomeBestCandidate, findLivePriceById, getBuilder, getOrCreateBuilder, getVenueAvailabilityState, getVisibleVenueIdsByConfig, getVisibleVenuesByConfig, getWalletAddressFromUserProfile, invalidateBalanceQueries, invalidatePositionQueries, invalidateUserActivityQueries, invalidateUserClaimState, invalidateUserMoneyState, isVenueDisabledByConfig, mergeBestPricesPreferringLive, normalizeVenueId, optimizedImageUrl, parseEmail, parseEmailStrict, rangeToSeconds, requestAggAuthChooserOpen, resolveAggUiLabels, resolveDefaultMarket as resolveDefaultTradingMarket, resolveEventTradingState, resolveMarketTradingState, resolveMarketWinningOutcome, resolveOrderEligibility, resolveRollingWindow, resolveTradingStateKind, sortVenues, timeRangeToInterval, tradingReducer, useAggAuth, useAggAuthContext, useAggAuthState, useAggBalance, useAggBalanceContext, useAggBalanceState, useAggClient, useAggLabels, useAggUiConfig, useAggWebSocket, useAppConfig, useArbFeed, useCachedAppConfig, useCategories, useCategoryChildren, useDebouncedValue, useEnrichedVenueEvent, useEventListState, useEventOrderbookData, useEventTradingContext, useExecuteManaged, useExecutionOrders, useExecutionPositions, useExecutionProgress, useExternalId, useGeoBlock, useLabels, useLinkAccount, useLiveBestPriceCandidates, useLiveBestPrices, useLiveCandleOverlay, useLiveCandles, useLiveMarket, useLiveMarketStores, useLiveOutcomePrices, useLiveTrades, useMarketArb, useMarketChart, useMarketOrderbook, useMarketSearch, useMidpoints, useOnBalanceUpdate, useOnOrderEvent, useOnOrderSubmitted, useOnRedeemEvent, useOnWithdrawalLifecycle, useOptionalAggClient, useOrderBook, useOrderbookQuote, useOrders, usePositions, useQuoteManaged, useRampQuotes, useRampSession, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueMarketMidpoints, useVenueMarkets, useViewportMidpoints, useVisibleIds, userActivityQueryKeys };
5731
+ export { AUTH_CHOOSER_OPEN_EVENT, type AggAuthContextValue, type AggAuthSignInOptions, type AggBalanceContextValue, AggBalanceProvider, AggProvider, type AggProviderProps, AggProvider as AggSdkProvider, type AggProviderProps as AggSdkProviderProps, type AggUiConfig, type AggUiConfigInput, type AggUiLabels, type AggUiLabelsInput, AggUiProvider, type AggUiTradingExecutionMode, CHART_TIME_RANGES, CONFIRMED_MATCH_STATUSES, type ChartTimeRange, type ClosedPositionTotals, type ComputePriceGapsOptions, DEFAULT_AGG_ROOT_CLASS_NAME, type DagStepProgress, type EventListStateContextValue, EventListStateProvider, type EventListStateSnapshot, type EventTradingContextValue, type EventTradingState, type ExecutionProgressPhase, type ExecutionTerminalOrderEvent, type GeoBlockState, type GetOrdersQuery, type GetPositionsQuery, type InvalidateUserActivityOptions, type InvalidateUserMoneyStateOptions, type LiveBestPriceCandidate, type LiveBestPriceCandidates, type LiveBestPrices, type LiveCandle, MAX_PRICE_GAP_PCT, MIN_PRICE_GAP_PCT, type MarketChartCandle, type MarketChartData, type MarketChartVenueData, type MarketOrderbookData, type MarketOrderbookIntegrity, MarketStatus, type MarketTradingState, MatchStatus, MatchType, type OrderEligibility, type OrderEligibilityReason, type OrderListItem, type OrderbookResult, type PositionGroup, type PriceGapValue, type RedeemEvent, type RedeemLegLifecycle, type RedeemLifecycleState, RedeemRejectedError, type RollingChartWindow, type ScaledCandlePoint, type SdkUiConfig, type SdkUiConfigInput, type SdkUiProviderProps, type SettlementDiff, type SettlementDifference, type SmartRouteLoadingReason, type ThemeMode, TradeSide, type TradingAction, type TradingState, type TradingStateBase, type TradingStateKind, type UseAggAuthOptions, type UseAggAuthReturn, type UseAppConfigResult, type UseArbFeedResult, type UseCategoriesOptions, type UseCategoryChildrenOptions, type UseEnrichedVenueEventOptions, type UseExecuteManagedOptions, type UseExecutionOrdersOptions, type UseExecutionPositionsOptions, type UseExecutionProgressOptions, type UseExecutionProgressResult, type UseExternalIdOptions, type UseExternalIdReturn, type UseLinkAccountReturn, type UseLiveCandleOverlayOptions, type UseLiveCandleOverlayResult, type UseLiveCandlesOptions, type UseLiveCandlesResult, type UseLiveMarketResult, type UseMarketArbResult, type UseMarketChartOptions, type UseMarketChartResult, type UseMarketOrderbookOptions, type UseMarketOrderbookResult, type UseMarketOrderbookVenueOutcome, type UseMarketSearchOptions, type UseMidpointsOptions, type UseMidpointsResult, type UseOrderBookOptions, type UseOrderbookQuoteOptions, type UseOrderbookQuoteResult, type UseOrdersOptions, type UsePositionsOptions, type UseQuoteManagedOptions, type UseRedeemLifecycleInput, type UseRollingChartWindowOptions, type UseSearchOptions, type UseSmartRouteOptions, type UseSmartRouteResult, type UseUserActivityOptions, type UseUserHoldingsOptions, type UseVenueEventOptions, type UseVenueEventsOptions, type UseVenueMarketMidpointsOptions, type UseVenueMarketsOptions, type UseViewportMidpointsOptions, type UseVisibleIdsOptions, type UseVisibleIdsResult, type UserActivityInvalidationStrategy, Venue, type VenueAvailabilityState, type VenueEvent, type VenueEventWithMarkets, type VenueMarket, type VenueMarketOutcome, type WalletActionSendTokenParams, type WalletActions, buildLiveBestPriceCandidates, computeClosedPositionTotals, computePriceGaps, defaultAggUiConfig, defaultAggUiConfig as defaultSdkUiConfig, executionKeys, extractOutcomeBestCandidate, findLivePriceById, getBuilder, getOrCreateBuilder, getVenueAvailabilityState, getVisibleVenueIdsByConfig, getVisibleVenuesByConfig, getWalletAddressFromUserProfile, invalidateBalanceQueries, invalidatePositionQueries, invalidateUserActivityQueries, invalidateUserClaimState, invalidateUserMoneyState, isVenueDisabledByConfig, mergeBestPricesPreferringLive, normalizeVenueId, optimizedImageUrl, parseEmail, parseEmailStrict, rangeToSeconds, requestAggAuthChooserOpen, resolveAggUiLabels, resolveDefaultMarket as resolveDefaultTradingMarket, resolveEventTradingState, resolveMarketTradingState, resolveMarketWinningOutcome, resolveOrderEligibility, resolveRollingWindow, resolveTradingStateKind, sortVenues, timeRangeToInterval, tradingReducer, useAggAuth, useAggAuthContext, useAggAuthState, useAggBalance, useAggBalanceContext, useAggBalanceState, useAggClient, useAggLabels, useAggUiConfig, useAggWebSocket, useAppConfig, useArbFeed, useCachedAppConfig, useCategories, useCategoryChildren, useDebouncedValue, useEnrichedVenueEvent, useEventListState, useEventOrderbookData, useEventTradingContext, useExecuteManaged, useExecutionOrders, useExecutionPositions, useExecutionProgress, useExternalId, useGeoBlock, useLabels, useLinkAccount, useLiveBestPriceCandidates, useLiveBestPrices, useLiveCandleOverlay, useLiveCandles, useLiveMarket, useLiveMarketStores, useLiveOutcomePrices, useLiveTrades, useMarketArb, useMarketChart, useMarketOrderbook, useMarketSearch, useMidpoints, useOnBalanceUpdate, useOnOrderEvent, useOnOrderSubmitted, useOnRedeemEvent, useOnWithdrawalLifecycle, useOptionalAggClient, useOrderBook, useOrderbookQuote, useOrders, usePositions, useQuoteManaged, useRampQuotes, useRampSession, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueMarketMidpoints, useVenueMarkets, useViewportMidpoints, useVisibleIds, userActivityQueryKeys };
package/dist/index.d.ts CHANGED
@@ -290,6 +290,9 @@ type VenueMarket = {
290
290
  externalIdentifier: string;
291
291
  status?: MarketStatus | undefined;
292
292
  conditionId?: string | null | undefined;
293
+ description?: string | null | undefined;
294
+ rulesPrimary?: string | null | undefined;
295
+ rulesSecondary?: string | null | undefined;
293
296
  venueMarketOutcomes?: {
294
297
  id: string;
295
298
  /** REMOVED — no longer returned; use GET /midpoints for live prices. */
@@ -363,6 +366,8 @@ type VenueEvent = {
363
366
  structureType?: "candidate" | "sport" | "axis" | "dates" | null | undefined;
364
367
  /** Canonical sport slug for sports events (e.g. "basketball", "soccer"); null for non-sports. */
365
368
  sport?: string | null | undefined;
369
+ /** Structured per-venue settlement key-differences for this event's cluster. */
370
+ settlementDiff?: SettlementDiff | null | undefined;
366
371
  };
367
372
  type Orderbook = {
368
373
  bids: {
@@ -403,6 +408,16 @@ type VenueMarketOutcome = {
403
408
  type VenueEventWithMarkets = VenueEvent & {
404
409
  venueMarkets: VenueMarket[];
405
410
  };
411
+ type SettlementDifference = {
412
+ type: string;
413
+ title: string;
414
+ perVenue: Record<string, string>;
415
+ summary?: string | undefined;
416
+ };
417
+ type SettlementDiff = {
418
+ sharedSummary: string;
419
+ differences: SettlementDifference[];
420
+ };
406
421
 
407
422
  declare function getWalletAddressFromUserProfile(user: UserProfile | undefined): string | undefined;
408
423
 
@@ -842,6 +857,7 @@ interface AggUiLabels {
842
857
  venuePlural: string;
843
858
  matched: string;
844
859
  matchedCount: (count: number) => string;
860
+ remainingMarkets: (count: number) => string;
845
861
  priceGap: string;
846
862
  };
847
863
  eventItemDetails: {
@@ -933,6 +949,9 @@ interface AggUiLabels {
933
949
  trading: {
934
950
  settlementSection: string;
935
951
  settlementDifferencesTitle: string;
952
+ settlementFullRulesTitle: string;
953
+ settlementCriticalDifferenceLabel: string;
954
+ settlementValueUnavailable: string;
936
955
  settlementLoading: string;
937
956
  settlementDetailsAria: (venueLabel: string) => string;
938
957
  settlementShowMoreAria: (ctaLabel: string, venueLabel: string) => string;
@@ -981,6 +1000,7 @@ interface AggUiLabels {
981
1000
  orderDisabledNoOutcome: string;
982
1001
  orderDisabledNoEvent: string;
983
1002
  insufficientBalance: string;
1003
+ lowLiquidityWarning: string;
984
1004
  refreshQuote: string;
985
1005
  confirmOrder: string;
986
1006
  withdrawSubmitted: string;
@@ -5708,4 +5728,4 @@ declare function useAppConfig(): UseAppConfigResult;
5708
5728
  */
5709
5729
  declare function useCachedAppConfig(): UseAppConfigResult;
5710
5730
 
5711
- export { AUTH_CHOOSER_OPEN_EVENT, type AggAuthContextValue, type AggAuthSignInOptions, type AggBalanceContextValue, AggBalanceProvider, AggProvider, type AggProviderProps, AggProvider as AggSdkProvider, type AggProviderProps as AggSdkProviderProps, type AggUiConfig, type AggUiConfigInput, type AggUiLabels, type AggUiLabelsInput, AggUiProvider, type AggUiTradingExecutionMode, CHART_TIME_RANGES, CONFIRMED_MATCH_STATUSES, type ChartTimeRange, type ClosedPositionTotals, type ComputePriceGapsOptions, DEFAULT_AGG_ROOT_CLASS_NAME, type DagStepProgress, type EventListStateContextValue, EventListStateProvider, type EventListStateSnapshot, type EventTradingContextValue, type EventTradingState, type ExecutionProgressPhase, type ExecutionTerminalOrderEvent, type GeoBlockState, type GetOrdersQuery, type GetPositionsQuery, type InvalidateUserActivityOptions, type InvalidateUserMoneyStateOptions, type LiveBestPriceCandidate, type LiveBestPriceCandidates, type LiveBestPrices, type LiveCandle, MAX_PRICE_GAP_PCT, MIN_PRICE_GAP_PCT, type MarketChartCandle, type MarketChartData, type MarketChartVenueData, type MarketOrderbookData, type MarketOrderbookIntegrity, MarketStatus, type MarketTradingState, MatchStatus, MatchType, type OrderEligibility, type OrderEligibilityReason, type OrderListItem, type OrderbookResult, type PositionGroup, type PriceGapValue, type RedeemEvent, type RedeemLegLifecycle, type RedeemLifecycleState, RedeemRejectedError, type RollingChartWindow, type ScaledCandlePoint, type SdkUiConfig, type SdkUiConfigInput, type SdkUiProviderProps, type SmartRouteLoadingReason, type ThemeMode, TradeSide, type TradingAction, type TradingState, type TradingStateBase, type TradingStateKind, type UseAggAuthOptions, type UseAggAuthReturn, type UseAppConfigResult, type UseArbFeedResult, type UseCategoriesOptions, type UseCategoryChildrenOptions, type UseEnrichedVenueEventOptions, type UseExecuteManagedOptions, type UseExecutionOrdersOptions, type UseExecutionPositionsOptions, type UseExecutionProgressOptions, type UseExecutionProgressResult, type UseExternalIdOptions, type UseExternalIdReturn, type UseLinkAccountReturn, type UseLiveCandleOverlayOptions, type UseLiveCandleOverlayResult, type UseLiveCandlesOptions, type UseLiveCandlesResult, type UseLiveMarketResult, type UseMarketArbResult, type UseMarketChartOptions, type UseMarketChartResult, type UseMarketOrderbookOptions, type UseMarketOrderbookResult, type UseMarketOrderbookVenueOutcome, type UseMarketSearchOptions, type UseMidpointsOptions, type UseMidpointsResult, type UseOrderBookOptions, type UseOrderbookQuoteOptions, type UseOrderbookQuoteResult, type UseOrdersOptions, type UsePositionsOptions, type UseQuoteManagedOptions, type UseRedeemLifecycleInput, type UseRollingChartWindowOptions, type UseSearchOptions, type UseSmartRouteOptions, type UseSmartRouteResult, type UseUserActivityOptions, type UseUserHoldingsOptions, type UseVenueEventOptions, type UseVenueEventsOptions, type UseVenueMarketMidpointsOptions, type UseVenueMarketsOptions, type UseViewportMidpointsOptions, type UseVisibleIdsOptions, type UseVisibleIdsResult, type UserActivityInvalidationStrategy, Venue, type VenueAvailabilityState, type VenueEvent, type VenueEventWithMarkets, type VenueMarket, type VenueMarketOutcome, type WalletActionSendTokenParams, type WalletActions, buildLiveBestPriceCandidates, computeClosedPositionTotals, computePriceGaps, defaultAggUiConfig, defaultAggUiConfig as defaultSdkUiConfig, executionKeys, extractOutcomeBestCandidate, findLivePriceById, getBuilder, getOrCreateBuilder, getVenueAvailabilityState, getVisibleVenueIdsByConfig, getVisibleVenuesByConfig, getWalletAddressFromUserProfile, invalidateBalanceQueries, invalidatePositionQueries, invalidateUserActivityQueries, invalidateUserClaimState, invalidateUserMoneyState, isVenueDisabledByConfig, mergeBestPricesPreferringLive, normalizeVenueId, optimizedImageUrl, parseEmail, parseEmailStrict, rangeToSeconds, requestAggAuthChooserOpen, resolveAggUiLabels, resolveDefaultMarket as resolveDefaultTradingMarket, resolveEventTradingState, resolveMarketTradingState, resolveMarketWinningOutcome, resolveOrderEligibility, resolveRollingWindow, resolveTradingStateKind, sortVenues, timeRangeToInterval, tradingReducer, useAggAuth, useAggAuthContext, useAggAuthState, useAggBalance, useAggBalanceContext, useAggBalanceState, useAggClient, useAggLabels, useAggUiConfig, useAggWebSocket, useAppConfig, useArbFeed, useCachedAppConfig, useCategories, useCategoryChildren, useDebouncedValue, useEnrichedVenueEvent, useEventListState, useEventOrderbookData, useEventTradingContext, useExecuteManaged, useExecutionOrders, useExecutionPositions, useExecutionProgress, useExternalId, useGeoBlock, useLabels, useLinkAccount, useLiveBestPriceCandidates, useLiveBestPrices, useLiveCandleOverlay, useLiveCandles, useLiveMarket, useLiveMarketStores, useLiveOutcomePrices, useLiveTrades, useMarketArb, useMarketChart, useMarketOrderbook, useMarketSearch, useMidpoints, useOnBalanceUpdate, useOnOrderEvent, useOnOrderSubmitted, useOnRedeemEvent, useOnWithdrawalLifecycle, useOptionalAggClient, useOrderBook, useOrderbookQuote, useOrders, usePositions, useQuoteManaged, useRampQuotes, useRampSession, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueMarketMidpoints, useVenueMarkets, useViewportMidpoints, useVisibleIds, userActivityQueryKeys };
5731
+ export { AUTH_CHOOSER_OPEN_EVENT, type AggAuthContextValue, type AggAuthSignInOptions, type AggBalanceContextValue, AggBalanceProvider, AggProvider, type AggProviderProps, AggProvider as AggSdkProvider, type AggProviderProps as AggSdkProviderProps, type AggUiConfig, type AggUiConfigInput, type AggUiLabels, type AggUiLabelsInput, AggUiProvider, type AggUiTradingExecutionMode, CHART_TIME_RANGES, CONFIRMED_MATCH_STATUSES, type ChartTimeRange, type ClosedPositionTotals, type ComputePriceGapsOptions, DEFAULT_AGG_ROOT_CLASS_NAME, type DagStepProgress, type EventListStateContextValue, EventListStateProvider, type EventListStateSnapshot, type EventTradingContextValue, type EventTradingState, type ExecutionProgressPhase, type ExecutionTerminalOrderEvent, type GeoBlockState, type GetOrdersQuery, type GetPositionsQuery, type InvalidateUserActivityOptions, type InvalidateUserMoneyStateOptions, type LiveBestPriceCandidate, type LiveBestPriceCandidates, type LiveBestPrices, type LiveCandle, MAX_PRICE_GAP_PCT, MIN_PRICE_GAP_PCT, type MarketChartCandle, type MarketChartData, type MarketChartVenueData, type MarketOrderbookData, type MarketOrderbookIntegrity, MarketStatus, type MarketTradingState, MatchStatus, MatchType, type OrderEligibility, type OrderEligibilityReason, type OrderListItem, type OrderbookResult, type PositionGroup, type PriceGapValue, type RedeemEvent, type RedeemLegLifecycle, type RedeemLifecycleState, RedeemRejectedError, type RollingChartWindow, type ScaledCandlePoint, type SdkUiConfig, type SdkUiConfigInput, type SdkUiProviderProps, type SettlementDiff, type SettlementDifference, type SmartRouteLoadingReason, type ThemeMode, TradeSide, type TradingAction, type TradingState, type TradingStateBase, type TradingStateKind, type UseAggAuthOptions, type UseAggAuthReturn, type UseAppConfigResult, type UseArbFeedResult, type UseCategoriesOptions, type UseCategoryChildrenOptions, type UseEnrichedVenueEventOptions, type UseExecuteManagedOptions, type UseExecutionOrdersOptions, type UseExecutionPositionsOptions, type UseExecutionProgressOptions, type UseExecutionProgressResult, type UseExternalIdOptions, type UseExternalIdReturn, type UseLinkAccountReturn, type UseLiveCandleOverlayOptions, type UseLiveCandleOverlayResult, type UseLiveCandlesOptions, type UseLiveCandlesResult, type UseLiveMarketResult, type UseMarketArbResult, type UseMarketChartOptions, type UseMarketChartResult, type UseMarketOrderbookOptions, type UseMarketOrderbookResult, type UseMarketOrderbookVenueOutcome, type UseMarketSearchOptions, type UseMidpointsOptions, type UseMidpointsResult, type UseOrderBookOptions, type UseOrderbookQuoteOptions, type UseOrderbookQuoteResult, type UseOrdersOptions, type UsePositionsOptions, type UseQuoteManagedOptions, type UseRedeemLifecycleInput, type UseRollingChartWindowOptions, type UseSearchOptions, type UseSmartRouteOptions, type UseSmartRouteResult, type UseUserActivityOptions, type UseUserHoldingsOptions, type UseVenueEventOptions, type UseVenueEventsOptions, type UseVenueMarketMidpointsOptions, type UseVenueMarketsOptions, type UseViewportMidpointsOptions, type UseVisibleIdsOptions, type UseVisibleIdsResult, type UserActivityInvalidationStrategy, Venue, type VenueAvailabilityState, type VenueEvent, type VenueEventWithMarkets, type VenueMarket, type VenueMarketOutcome, type WalletActionSendTokenParams, type WalletActions, buildLiveBestPriceCandidates, computeClosedPositionTotals, computePriceGaps, defaultAggUiConfig, defaultAggUiConfig as defaultSdkUiConfig, executionKeys, extractOutcomeBestCandidate, findLivePriceById, getBuilder, getOrCreateBuilder, getVenueAvailabilityState, getVisibleVenueIdsByConfig, getVisibleVenuesByConfig, getWalletAddressFromUserProfile, invalidateBalanceQueries, invalidatePositionQueries, invalidateUserActivityQueries, invalidateUserClaimState, invalidateUserMoneyState, isVenueDisabledByConfig, mergeBestPricesPreferringLive, normalizeVenueId, optimizedImageUrl, parseEmail, parseEmailStrict, rangeToSeconds, requestAggAuthChooserOpen, resolveAggUiLabels, resolveDefaultMarket as resolveDefaultTradingMarket, resolveEventTradingState, resolveMarketTradingState, resolveMarketWinningOutcome, resolveOrderEligibility, resolveRollingWindow, resolveTradingStateKind, sortVenues, timeRangeToInterval, tradingReducer, useAggAuth, useAggAuthContext, useAggAuthState, useAggBalance, useAggBalanceContext, useAggBalanceState, useAggClient, useAggLabels, useAggUiConfig, useAggWebSocket, useAppConfig, useArbFeed, useCachedAppConfig, useCategories, useCategoryChildren, useDebouncedValue, useEnrichedVenueEvent, useEventListState, useEventOrderbookData, useEventTradingContext, useExecuteManaged, useExecutionOrders, useExecutionPositions, useExecutionProgress, useExternalId, useGeoBlock, useLabels, useLinkAccount, useLiveBestPriceCandidates, useLiveBestPrices, useLiveCandleOverlay, useLiveCandles, useLiveMarket, useLiveMarketStores, useLiveOutcomePrices, useLiveTrades, useMarketArb, useMarketChart, useMarketOrderbook, useMarketSearch, useMidpoints, useOnBalanceUpdate, useOnOrderEvent, useOnOrderSubmitted, useOnRedeemEvent, useOnWithdrawalLifecycle, useOptionalAggClient, useOrderBook, useOrderbookQuote, useOrders, usePositions, useQuoteManaged, useRampQuotes, useRampSession, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueMarketMidpoints, useVenueMarkets, useViewportMidpoints, useVisibleIds, userActivityQueryKeys };
package/dist/index.js CHANGED
@@ -225,6 +225,18 @@ var Venue = /* @__PURE__ */ ((Venue2) => {
225
225
  Venue2["hyperliquid"] = "hyperliquid";
226
226
  return Venue2;
227
227
  })(Venue || {});
228
+ var ACTIVE_VENUES = [
229
+ "polymarket" /* polymarket */,
230
+ "limitless" /* limitless */,
231
+ "opinion" /* opinion */,
232
+ "predict" /* predict */,
233
+ "probable" /* probable */,
234
+ "myriad" /* myriad */,
235
+ "hyperliquid" /* hyperliquid */
236
+ ];
237
+ var INACTIVE_VENUES = ["kalshi" /* kalshi */];
238
+ var ACTIVE_VENUE_SET = new Set(ACTIVE_VENUES);
239
+ var INACTIVE_VENUE_SET = new Set(INACTIVE_VENUES);
228
240
 
229
241
  // ../common/src/enums/market-status.ts
230
242
  var MatchStatus = /* @__PURE__ */ ((MatchStatus2) => {
@@ -437,11 +449,17 @@ var parseAuthCallbackCode = (callbackUrl) => {
437
449
  const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
438
450
  return (_a = resolvedUrl == null ? void 0 : resolvedUrl.searchParams.get("code")) != null ? _a : null;
439
451
  };
452
+ var parseLinkConfirmToken = (callbackUrl) => {
453
+ var _a;
454
+ const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
455
+ return (_a = resolvedUrl == null ? void 0 : resolvedUrl.searchParams.get("link_confirm_token")) != null ? _a : null;
456
+ };
440
457
  var getAuthCallbackCleanupPath = (callbackUrl) => {
441
458
  const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
442
459
  if (!resolvedUrl) return null;
443
460
  const params = new URLSearchParams(resolvedUrl.search);
444
461
  params.delete("code");
462
+ params.delete("link_confirm_token");
445
463
  const search = params.toString();
446
464
  return `${resolvedUrl.pathname}${search ? `?${search}` : ""}`;
447
465
  };
@@ -454,6 +472,12 @@ var exchangeAuthCallbackCode = (client, callbackUrl) => __async(null, null, func
454
472
  user: result.user
455
473
  };
456
474
  });
475
+ var confirmLinkAccountCallback = (client, callbackUrl) => __async(null, null, function* () {
476
+ const token = parseLinkConfirmToken(callbackUrl);
477
+ if (!token) return null;
478
+ yield client.linkAccountConfirm(token);
479
+ return { cleanupPath: getAuthCallbackCleanupPath(callbackUrl) };
480
+ });
457
481
  var parseAuthCallbackTokens = (callbackUrl) => {
458
482
  var _a, _b;
459
483
  const resolvedUrl = resolveAuthCallbackUrl(callbackUrl);
@@ -918,6 +942,7 @@ var enUsLabels = {
918
942
  venuePlural: "Venues",
919
943
  matched: "Matched",
920
944
  matchedCount: (count) => `${count} ${count === 1 ? "Match" : "Matches"}`,
945
+ remainingMarkets: (count) => `+${count} ${count === 1 ? "market" : "markets"}`,
921
946
  priceGap: "Price Gap"
922
947
  },
923
948
  eventItemDetails: {
@@ -942,7 +967,7 @@ var enUsLabels = {
942
967
  marketSelectEmpty: "No markets found"
943
968
  },
944
969
  settlementSummary: {
945
- title: "Settlement",
970
+ title: "Settlement differences",
946
971
  readFullDetails: "Read full details",
947
972
  showLess: "Show less"
948
973
  },
@@ -1009,6 +1034,9 @@ var enUsLabels = {
1009
1034
  trading: {
1010
1035
  settlementSection: "Settlement",
1011
1036
  settlementDifferencesTitle: "Key differences across venues",
1037
+ settlementFullRulesTitle: "Full rules by venue",
1038
+ settlementCriticalDifferenceLabel: "Critical",
1039
+ settlementValueUnavailable: "Not provided",
1012
1040
  settlementLoading: "Loading settlement",
1013
1041
  settlementDetailsAria: (venueLabel) => `${venueLabel} settlement details`,
1014
1042
  settlementShowMoreAria: (ctaLabel, venueLabel) => `${ctaLabel} for ${venueLabel}`,
@@ -1063,6 +1091,7 @@ var enUsLabels = {
1063
1091
  orderDisabledNoOutcome: "Select an outcome to place an order.",
1064
1092
  orderDisabledNoEvent: "No event selected.",
1065
1093
  insufficientBalance: "Insufficient balance",
1094
+ lowLiquidityWarning: "This market has low liquidity, which may impact execution price for larger orders.",
1066
1095
  refreshQuote: "Refresh Quote",
1067
1096
  confirmOrder: "Confirm Order",
1068
1097
  withdrawSubmitted: "Withdrawal submitted",
@@ -1776,6 +1805,14 @@ function AggAuthProvider({ children }) {
1776
1805
  }
1777
1806
  return resolvedUser2;
1778
1807
  }
1808
+ const confirmedLink = yield confirmLinkAccountCallback(client, callbackUrl);
1809
+ if (confirmedLink) {
1810
+ const resolvedUser2 = yield refreshCurrentUser(client);
1811
+ if (callbackUrl === void 0) {
1812
+ replaceAuthCallbackUrl(confirmedLink.cleanupPath);
1813
+ }
1814
+ return resolvedUser2;
1815
+ }
1779
1816
  const tokens = parseAuthCallbackTokens(callbackUrl);
1780
1817
  if (!tokens) return null;
1781
1818
  client.setSession(createAuthCallbackSession(tokens));
@@ -7598,6 +7635,19 @@ var import_react34 = require("react");
7598
7635
 
7599
7636
  // src/use-venue-event.ts
7600
7637
  var import_react_query34 = require("@tanstack/react-query");
7638
+ var RESOLUTION_POLL_MS = 15e3;
7639
+ var RESOLUTION_POLL_MAX_PAST_END_MS = 60 * 6e4;
7640
+ function resolutionPollInterval(event) {
7641
+ var _a;
7642
+ if (!((_a = event == null ? void 0 : event.venueMarkets) == null ? void 0 : _a.length)) return false;
7643
+ const now = Date.now();
7644
+ const shouldPoll = event.venueMarkets.some((market) => {
7645
+ if (market.status !== "open" /* open */ || !market.endDate) return false;
7646
+ const endsAt = new Date(market.endDate).getTime();
7647
+ return Number.isFinite(endsAt) && now > endsAt && now < endsAt + RESOLUTION_POLL_MAX_PAST_END_MS;
7648
+ });
7649
+ return shouldPoll ? RESOLUTION_POLL_MS : false;
7650
+ }
7601
7651
  function useVenueEvent(options) {
7602
7652
  var _a;
7603
7653
  const client = useAggClient();
@@ -7613,6 +7663,7 @@ function useVenueEvent(options) {
7613
7663
  refetchOnWindowFocus: true,
7614
7664
  refetchOnReconnect: true,
7615
7665
  refetchOnMount: true,
7666
+ refetchInterval: (query2) => resolutionPollInterval(query2.state.data),
7616
7667
  retry: 1
7617
7668
  });
7618
7669
  return __spreadProps(__spreadValues({}, query), {
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-UYM2TJOM.mjs";
4
+ } from "./chunk-4IRZFXAC.mjs";
5
5
  import {
6
6
  useWithdrawEstimate,
7
7
  useWithdrawFlow,
8
8
  useWithdrawPreview,
9
9
  useWithdrawalLifecycle
10
- } from "./chunk-TILXL4NI.mjs";
10
+ } from "./chunk-X32MRBHC.mjs";
11
11
  import {
12
12
  AggAuthContext,
13
13
  AggBalanceProvider,
@@ -95,7 +95,7 @@ import {
95
95
  useSyncBalances,
96
96
  useWithdrawManaged,
97
97
  userActivityQueryKeys
98
- } from "./chunk-R7C4J345.mjs";
98
+ } from "./chunk-CAG2RCHR.mjs";
99
99
 
100
100
  // src/index.ts
101
101
  import { QueryClient as QueryClient4, QueryClientProvider, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
@@ -2404,6 +2404,19 @@ import { useMemo as useMemo10 } from "react";
2404
2404
 
2405
2405
  // src/use-venue-event.ts
2406
2406
  import { useQuery as useQuery7 } from "@tanstack/react-query";
2407
+ var RESOLUTION_POLL_MS = 15e3;
2408
+ var RESOLUTION_POLL_MAX_PAST_END_MS = 60 * 6e4;
2409
+ function resolutionPollInterval(event) {
2410
+ var _a;
2411
+ if (!((_a = event == null ? void 0 : event.venueMarkets) == null ? void 0 : _a.length)) return false;
2412
+ const now = Date.now();
2413
+ const shouldPoll = event.venueMarkets.some((market) => {
2414
+ if (market.status !== "open" /* open */ || !market.endDate) return false;
2415
+ const endsAt = new Date(market.endDate).getTime();
2416
+ return Number.isFinite(endsAt) && now > endsAt && now < endsAt + RESOLUTION_POLL_MAX_PAST_END_MS;
2417
+ });
2418
+ return shouldPoll ? RESOLUTION_POLL_MS : false;
2419
+ }
2407
2420
  function useVenueEvent(options) {
2408
2421
  var _a;
2409
2422
  const client = useAggClient();
@@ -2419,6 +2432,7 @@ function useVenueEvent(options) {
2419
2432
  refetchOnWindowFocus: true,
2420
2433
  refetchOnReconnect: true,
2421
2434
  refetchOnMount: true,
2435
+ refetchInterval: (query2) => resolutionPollInterval(query2.state.data),
2422
2436
  retry: 1
2423
2437
  });
2424
2438
  return __spreadProps(__spreadValues({}, query), {
package/dist/withdraw.js CHANGED
@@ -463,6 +463,7 @@ var enUsLabels = {
463
463
  venuePlural: "Venues",
464
464
  matched: "Matched",
465
465
  matchedCount: (count) => `${count} ${count === 1 ? "Match" : "Matches"}`,
466
+ remainingMarkets: (count) => `+${count} ${count === 1 ? "market" : "markets"}`,
466
467
  priceGap: "Price Gap"
467
468
  },
468
469
  eventItemDetails: {
@@ -487,7 +488,7 @@ var enUsLabels = {
487
488
  marketSelectEmpty: "No markets found"
488
489
  },
489
490
  settlementSummary: {
490
- title: "Settlement",
491
+ title: "Settlement differences",
491
492
  readFullDetails: "Read full details",
492
493
  showLess: "Show less"
493
494
  },
@@ -554,6 +555,9 @@ var enUsLabels = {
554
555
  trading: {
555
556
  settlementSection: "Settlement",
556
557
  settlementDifferencesTitle: "Key differences across venues",
558
+ settlementFullRulesTitle: "Full rules by venue",
559
+ settlementCriticalDifferenceLabel: "Critical",
560
+ settlementValueUnavailable: "Not provided",
557
561
  settlementLoading: "Loading settlement",
558
562
  settlementDetailsAria: (venueLabel) => `${venueLabel} settlement details`,
559
563
  settlementShowMoreAria: (ctaLabel, venueLabel) => `${ctaLabel} for ${venueLabel}`,
@@ -608,6 +612,7 @@ var enUsLabels = {
608
612
  orderDisabledNoOutcome: "Select an outcome to place an order.",
609
613
  orderDisabledNoEvent: "No event selected.",
610
614
  insufficientBalance: "Insufficient balance",
615
+ lowLiquidityWarning: "This market has low liquidity, which may impact execution price for larger orders.",
611
616
  refreshQuote: "Refresh Quote",
612
617
  confirmOrder: "Confirm Order",
613
618
  withdrawSubmitted: "Withdrawal submitted",
package/dist/withdraw.mjs CHANGED
@@ -3,12 +3,12 @@ import {
3
3
  useWithdrawFlow,
4
4
  useWithdrawPreview,
5
5
  useWithdrawalLifecycle
6
- } from "./chunk-TILXL4NI.mjs";
6
+ } from "./chunk-X32MRBHC.mjs";
7
7
  import {
8
8
  useDepositAddresses,
9
9
  useManagedBalances,
10
10
  useWithdrawManaged
11
- } from "./chunk-R7C4J345.mjs";
11
+ } from "./chunk-CAG2RCHR.mjs";
12
12
  export {
13
13
  useDepositAddresses,
14
14
  useManagedBalances,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/hooks",
3
- "version": "2.3.0",
3
+ "version": "2.4.6",
4
4
  "description": "React hooks and providers for the AGG prediction market aggregator. Wraps @agg-build/sdk with TanStack Query, shared session state, and live WebSocket data.",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -83,7 +83,7 @@
83
83
  "react": "^18.0.0 || ^19.0.0",
84
84
  "viem": "^2.0.0",
85
85
  "wagmi": "^3.0.0 || ^2.0.0",
86
- "@agg-build/sdk": "^2.3.0"
86
+ "@agg-build/sdk": "^2.4.6"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@solana/wallet-adapter-react": {