@agg-build/hooks 4.7.4 → 4.9.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.
@@ -11,7 +11,7 @@ import {
11
11
  useOnWithdrawalLifecycle,
12
12
  useSyncBalances,
13
13
  useWithdrawManaged
14
- } from "./chunk-HDPVTROR.mjs";
14
+ } from "./chunk-25XGLYBT.mjs";
15
15
 
16
16
  // src/withdraw/use-withdraw-flow.ts
17
17
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __async,
3
3
  useAggClient
4
- } from "./chunk-HDPVTROR.mjs";
4
+ } from "./chunk-25XGLYBT.mjs";
5
5
 
6
6
  // src/use-ramp-quotes.ts
7
7
  import { useMutation } from "@tanstack/react-query";
package/dist/deposit.js CHANGED
@@ -797,7 +797,7 @@ var enUsLabels = {
797
797
  venueMinOrderSize: "Order size is below the venue minimum. Try a larger amount.",
798
798
  sourceBalanceChanged: "Your balance changed since the quote. Refresh and try again, or pick a smaller amount.",
799
799
  venueMarketResolved: "This market just resolved. Pick a different market or wait for the next round.",
800
- dflowWalletUnverified: "Your Solana wallet needs to be verified with dFlow before you can trade Kalshi markets. Verify at https://dflow.net/proof, then try again.",
800
+ dflowWalletUnverified: "This route is unavailable for your wallet. Check your account connection and try again.",
801
801
  venueNoQuotePath: "No active quote path for this market right now. Try a different size, or wait a moment and re-quote.",
802
802
  solanaBlockhashExpired: "Solana transaction expired before submission. Please re-quote and try again.",
803
803
  venueRateLimited: "The venue is rate-limiting requests right now. Please wait a moment and try again.",
@@ -841,6 +841,25 @@ var enUsLabels = {
841
841
  kycSuccessTitle: "Verification successful",
842
842
  kycSuccessDescription: "Your identity has been confirmed and you now have full access to trade on Kalshi markets.",
843
843
  kycSuccessDone: "Done",
844
+ sharedKyc: {
845
+ required: "KYC required",
846
+ completeToTrade: "Complete KYC to trade",
847
+ checkingStatus: "Checking verification status",
848
+ modal: {
849
+ ariaLabel: "Identity verification",
850
+ title: "Verify Your Identity",
851
+ freeDescription: "Complete a one-time identity verification to trade all KYC-required venues.",
852
+ pendingTitle: "Verification pending",
853
+ pendingDescription: "Your verification is being reviewed. Check back for approval before trading.",
854
+ checkStatus: "Check verification status",
855
+ startVerification: "Start verification",
856
+ doItLater: "Do it later",
857
+ successTitle: "Verification successful",
858
+ successDescription: "Your identity has been verified. You can now trade on all KYC-required venues.",
859
+ done: "Done",
860
+ error: "We couldn't confirm your verification."
861
+ }
862
+ },
844
863
  connectKalshi: "Connect to trade Kalshi",
845
864
  tradingAccessVenues: "Venues",
846
865
  tradingAccessAvailable: "Available",
@@ -885,9 +904,13 @@ var enUsLabels = {
885
904
  insufficientVenueInventory: (sharesLabel, priceLabel) => `Only ${sharesLabel} \xB7 ${priceLabel}`,
886
905
  viewAllRoutes: (count) => `View all (${count})`,
887
906
  venueUnavailableInRegion: "Unavailable in your region",
907
+ venueTemporarilyUnavailable: "Temporarily unavailable",
888
908
  verified: "Verified",
889
909
  platformFee: "0% platform fees",
890
910
  estimatedFees: "Estimated fees",
911
+ executionReserve: "Execution reserve",
912
+ executionReserveTooltipAria: "Why funds are reserved",
913
+ executionReserveDescription: "Held for price movement or possible venue charges, not a confirmed fee. Unused funds are returned after execution.",
891
914
  estimatedFeesTooltipAria: "Estimated fees breakdown",
892
915
  feeBreakdownVenueFees: "Venue",
893
916
  feeBreakdownBridgeFees: "Bridging",
@@ -1162,6 +1185,35 @@ var enUsLabels = {
1162
1185
  bannerAria: "Site header",
1163
1186
  logoAria: "Home"
1164
1187
  },
1188
+ paperTrading: {
1189
+ badge: "Paper trading",
1190
+ badgeTooltip: "Trade real prediction markets with simulated funds. No real money at risk.",
1191
+ profile: {
1192
+ buyingPower: "Paper Buying Power",
1193
+ earnings: "Paper Earnings",
1194
+ earningsCaption: "Keep what you earn"
1195
+ },
1196
+ onboarding: {
1197
+ stepEyebrow: ({ current, total }) => `STEP ${current} OF ${total}`,
1198
+ skip: "Skip",
1199
+ back: "Back",
1200
+ next: "Next",
1201
+ // Figma reads "Get Strated" (node 4772:31236) — a typo, not copy.
1202
+ done: "Get started",
1203
+ realMarkets: {
1204
+ title: "Real markets, real prices",
1205
+ body: "Follow live prediction markets and trade using real-time market prices from leading venues."
1206
+ },
1207
+ zeroRisk: {
1208
+ title: "Paper trading, zero risk",
1209
+ body: ({ amount }) => `Start with ${amount} in simulated funds. No deposit, no real money, and no risk.`
1210
+ },
1211
+ readyToTrade: {
1212
+ title: "You're ready to trade",
1213
+ body: "Pick a market, make your prediction, and track your performance."
1214
+ }
1215
+ }
1216
+ },
1165
1217
  notifications: {
1166
1218
  order: {
1167
1219
  filledTitle: "Order filled",
@@ -1329,6 +1381,7 @@ var defaultAggUiConfig = {
1329
1381
  // src/core/providers/contexts.ts
1330
1382
  var AggClientContext = (0, import_react2.createContext)(null);
1331
1383
  var AggUiContext = (0, import_react2.createContext)(defaultAggUiConfig);
1384
+ var AggExecutionModeContext = (0, import_react2.createContext)(null);
1332
1385
  var AggLabelsContext = (0, import_react2.createContext)(defaultAggUiConfig.general.labels);
1333
1386
  var AggAuthContext = (0, import_react2.createContext)(null);
1334
1387
  var AggBalanceContext = (0, import_react2.createContext)(null);
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-DUZ3EJUK.mjs";
4
+ } from "./chunk-PUI2EGWE.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-HDPVTROR.mjs";
14
+ } from "./chunk-25XGLYBT.mjs";
15
15
 
16
16
  // src/deposit/normalize-wallet-error.ts
17
17
  function normalizeWalletError(error, supportedChains) {
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
3
  export { QueryClient, QueryClientProvider, useQueryClient } from '@tanstack/react-query';
4
4
  import * as _agg_build_sdk from '@agg-build/sdk';
5
- import { CandleBuilder, AggAuthStartBody, AggAuthStartResult, AggClientSessionInput, AggClient, RampQuote, RampQuoteRequest, RampWidgetSession, RampSessionRequest, ExecuteManagedResponse, ExecuteManagedParams, PlaceLimitOrderResponse, PlaceLimitOrderParams, CancelManagedExecutionResponse, GetPositionsParams, ExecutionStatusStep, WsOrderSubmitted, WsBalanceUpdate, ExecutionStatusOrder, CreateBalanceRefillPolicyParams, UpdateBalanceRefillPolicyParams, RedeemResponse, RedeemRequest, WsRedeemEvent, AggWebSocket, WsOrderEvent, WsWithdrawalLifecycleEvent, WsCandleInterval, WsTrade, AggregatedOrderbookResponse, Venue as Venue$1, VenueKeyStatus, AggLinkAccountBody, AggLinkAccountResult, AggLinkAccountWalletConfirmBody, AggLinkAccountConfirmResult, Category, UserActivityQuery, UserActivityItem, PaginatedResponse, CandleInterval, OrderbookState, OrderbookQuoteResponse, OrderListQuery, TradeExecutorOrder, SmartRouteSide, ExecutionMode, SmartRouteResponse, RecurringCryptoDuration, RecurringCryptoVenueMarket, RecurringCryptoWindowMarket, RecurrenceFilter, SportsLiveResponse, SportsLiveState, MidpointRow, BatchMidpointsResponse, AppClientConfigResponse } from '@agg-build/sdk';
5
+ import { CandleBuilder, AggAuthStartBody, AggAuthStartResult, AggClientSessionInput, AggClient, RampQuote, RampQuoteRequest, RampWidgetSession, RampSessionRequest, ExecuteManagedResponse, ExecuteManagedParams, PlaceLimitOrderResponse, PlaceLimitOrderParams, CancelManagedExecutionResponse, GetPositionsParams, ExecutionStatusStep, WsOrderSubmitted, WsBalanceUpdate, ExecutionStatusOrder, CreateBalanceRefillPolicyParams, UpdateBalanceRefillPolicyParams, RedeemResponse, RedeemRequest, WsRedeemEvent, AggWebSocket, WsOrderEvent, WsWithdrawalLifecycleEvent, WsCandleInterval, WsTrade, AggregatedOrderbookResponse, Venue as Venue$1, VenueKeyStatus, AggLinkAccountBody, AggLinkAccountResult, AggLinkAccountWalletConfirmBody, AggLinkAccountConfirmResult, Category, UserActivityQuery, UserActivityItem, PaginatedResponse, CandleInterval, OrderbookState, OrderbookQuoteResponse, OrderListQuery, TradeExecutorOrder, SmartRouteSide, ExecutionMode, SmartRouteResponse, RecurringCryptoDuration, RecurringCryptoVenueMarket, RecurringCryptoWindowMarket, RecurrenceFilter, SportsLiveResponse, SportsLiveState, MidpointRow, BatchMidpointsResponse, AppClientConfigResponse, AppTradingMode } from '@agg-build/sdk';
6
6
  export { SportsGameStatus, SportsLiveParticipant, SportsLiveResponse, SportsLiveState, TurnstileChallengeError } from '@agg-build/sdk';
7
7
  import React, { ReactNode } from 'react';
8
8
  export { UseManagedBalancesOptions, UseWithdrawEstimateParams, UseWithdrawFlowOptions, UseWithdrawFlowResult, UseWithdrawManagedOptions, UseWithdrawPreviewParams, UseWithdrawalLifecycleResult, WithdrawFeeEstimate, WithdrawalLifecycleState, useManagedBalances, useWithdrawEstimate, useWithdrawFlow, useWithdrawManaged, useWithdrawPreview, useWithdrawalLifecycle } from './withdraw.mjs';
@@ -160,6 +160,21 @@ type UnifiedBalanceResponse = {
160
160
  portfolioValueCents?: number | undefined;
161
161
  updatedAt: string;
162
162
  }[];
163
+ /**
164
+ * Paper-account summary. Present only when the request resolved to paper
165
+ * mode; absent in a live response. Mirrors `UnifiedBalanceResponseSchemaTB`
166
+ * in `typebox/schemas/trading.ts` — keep the two in sync. All dollars.
167
+ */
168
+ paper?: {
169
+ startingBalance: number;
170
+ cashBalance: number;
171
+ positionsValue: number;
172
+ /** Banked P&L from closed trades — account-level, not summable from positions. */
173
+ realizedPnl: number;
174
+ unrealizedPnl: number;
175
+ /** realized + unrealized. */
176
+ earnings: number;
177
+ };
163
178
  };
164
179
  type GetOrdersQuery = {
165
180
  status?: OrderStatus | undefined;
@@ -1196,7 +1211,7 @@ interface AggUiLabels {
1196
1211
  */
1197
1212
  venueMarketResolved: string;
1198
1213
  /**
1199
- * dFlow wallet KYC required (verify at dflow.net/proof).
1214
+ * Legacy dFlow wallet eligibility error; Kalshi v2 does not initiate KYC.
1200
1215
  */
1201
1216
  dflowWalletUnverified: string;
1202
1217
  /**
@@ -1253,6 +1268,25 @@ interface AggUiLabels {
1253
1268
  kycSuccessTitle: string;
1254
1269
  kycSuccessDescription: string;
1255
1270
  kycSuccessDone: string;
1271
+ sharedKyc: {
1272
+ required: string;
1273
+ completeToTrade: string;
1274
+ checkingStatus: string;
1275
+ modal: {
1276
+ ariaLabel: string;
1277
+ title: string;
1278
+ freeDescription: string;
1279
+ pendingTitle: string;
1280
+ pendingDescription: string;
1281
+ checkStatus: string;
1282
+ startVerification: string;
1283
+ doItLater: string;
1284
+ successTitle: string;
1285
+ successDescription: string;
1286
+ done: string;
1287
+ error: string;
1288
+ };
1289
+ };
1256
1290
  connectKalshi: string;
1257
1291
  tradingAccessVenues: string;
1258
1292
  tradingAccessAvailable: string;
@@ -1292,9 +1326,13 @@ interface AggUiLabels {
1292
1326
  insufficientVenueInventory: (sharesLabel: string, priceLabel: string) => string;
1293
1327
  viewAllRoutes: (count: number) => string;
1294
1328
  venueUnavailableInRegion: string;
1329
+ venueTemporarilyUnavailable: string;
1295
1330
  verified: string;
1296
1331
  platformFee: string;
1297
1332
  estimatedFees: string;
1333
+ executionReserve: string;
1334
+ executionReserveTooltipAria: string;
1335
+ executionReserveDescription: string;
1298
1336
  estimatedFeesTooltipAria: string;
1299
1337
  feeBreakdownVenueFees: string;
1300
1338
  feeBreakdownBridgeFees: string;
@@ -1555,6 +1593,62 @@ interface AggUiLabels {
1555
1593
  bannerAria: string;
1556
1594
  logoAria: string;
1557
1595
  };
1596
+ /**
1597
+ * Copy for app-level paper trading mode (SNA-2964). Every paper string in
1598
+ * the UI resolves through here — components must not render literals, and
1599
+ * tests should assert against these keys rather than their values. The
1600
+ * wording below is placeholder: the design was drawn against an earlier
1601
+ * daily-allowance model and copy is still being revised, so treat these as
1602
+ * defaults to be overridden, not as spec.
1603
+ *
1604
+ * Money figures are passed in already formatted by the caller, sourced from
1605
+ * the server's `paperStartingBalance`, so no amount is ever hardcoded here.
1606
+ */
1607
+ paperTrading: {
1608
+ /** Header pill marking the whole app as simulated. */
1609
+ badge: string;
1610
+ /** Tooltip shown on the header pill. */
1611
+ badgeTooltip: string;
1612
+ profile: {
1613
+ /** Card title for simulated cash available to trade. */
1614
+ buyingPower: string;
1615
+ /** Card title for cumulative simulated P&L. */
1616
+ earnings: string;
1617
+ /**
1618
+ * Small caption beside the earnings figure. There is deliberately no
1619
+ * matching caption for buying power: Figma's "Resets daily" describes
1620
+ * the daily-allowance model, which the one-time grant replaced.
1621
+ */
1622
+ earningsCaption: string;
1623
+ };
1624
+ onboarding: {
1625
+ /** e.g. "STEP 1 OF 3". Derived, never a literal per card. */
1626
+ stepEyebrow: (params: {
1627
+ current: number;
1628
+ total: number;
1629
+ }) => string;
1630
+ /** Secondary action on step 1, where there is nothing to go back to. */
1631
+ skip: string;
1632
+ back: string;
1633
+ next: string;
1634
+ done: string;
1635
+ realMarkets: {
1636
+ title: string;
1637
+ body: string;
1638
+ };
1639
+ zeroRisk: {
1640
+ title: string;
1641
+ /** `amount` arrives pre-formatted, e.g. "$10,000". */
1642
+ body: (params: {
1643
+ amount: string;
1644
+ }) => string;
1645
+ };
1646
+ readyToTrade: {
1647
+ title: string;
1648
+ body: string;
1649
+ };
1650
+ };
1651
+ };
1558
1652
  /**
1559
1653
  * Copy for the global notification bridge (`AggNotificationEventsProvider`).
1560
1654
  * Each leaf is read from a websocket / activity-feed lifecycle event and
@@ -2853,6 +2947,22 @@ declare const venueKeyQueryKeys: {
2853
2947
  };
2854
2948
  declare const useVenueKeyStatus: (venue: Venue$1, enabled?: boolean) => _tanstack_react_query.UseQueryResult<VenueKeyStatus, Error>;
2855
2949
 
2950
+ declare const sharedKycQueryKeys: {
2951
+ status: (userId: string | null) => readonly ["agg", "shared-kyc", string | null];
2952
+ };
2953
+ /** Shared CH-backed identity state; legacy venue flags and callback query strings are not approval. */
2954
+ declare const useSharedKyc: () => {
2955
+ status: "verified" | "loading" | "unverified";
2956
+ refreshStatus: () => Promise<"verified" | "unverified">;
2957
+ initiateVerification: ({ venue, redirectUri }: {
2958
+ venue: string;
2959
+ redirectUri: string;
2960
+ }) => Promise<{
2961
+ status: string;
2962
+ kycUrl?: string;
2963
+ }>;
2964
+ };
2965
+
2856
2966
  interface UseAggAuthOptions {
2857
2967
  signMessage?: (message: string) => Promise<string>;
2858
2968
  address?: string;
@@ -6705,17 +6815,49 @@ interface UseVisibleIdsResult {
6705
6815
  */
6706
6816
  declare function useVisibleIds(options?: UseVisibleIdsOptions): UseVisibleIdsResult;
6707
6817
 
6818
+ /**
6819
+ * App config is per-App data, and `tradingMode` on it is the client-side
6820
+ * trading authority (SNA-2964). Two `AggClient`s for different Apps under one
6821
+ * `QueryClient` — a partner switching Apps, an admin previewing one — must not
6822
+ * read each other's entry, or a live app paints paper chrome and vice versa.
6823
+ */
6824
+ declare const appConfigQueryKey: (appId: string | undefined) => readonly ["agg", "app-config", string];
6708
6825
  interface UseAppConfigResult {
6709
6826
  disabledVenues: AppClientConfigResponse["disabledVenues"];
6710
6827
  disabledCategoryPresets: AppClientConfigResponse["disabledCategoryPresets"];
6711
6828
  earlyAccessEnabled: AppClientConfigResponse["earlyAccessEnabled"];
6712
6829
  authOptions: AppClientConfigResponse["authOptions"];
6830
+ /**
6831
+ * Server-owned paper/live mode. `undefined` until `/app/config` resolves —
6832
+ * deliberately NOT defaulted here, so callers can tell "not loaded yet"
6833
+ * apart from "the server said live". Resolve it via
6834
+ * `useResolvedExecutionMode`, not by reading this directly.
6835
+ */
6836
+ tradingMode: AppClientConfigResponse["tradingMode"] | undefined;
6837
+ /** One-time paper grant in dollars; `undefined` until config resolves. */
6838
+ paperStartingBalance: number | undefined;
6713
6839
  isLoading: boolean;
6714
6840
  error: unknown;
6715
6841
  }
6716
6842
  /**
6717
- * Fetch the current App's UI config (disabled venues + category presets).
6718
- * Cached for 5 minutes — config rarely changes at runtime.
6843
+ * Fetch the current App's UI config (disabled venues, category presets, and
6844
+ * the server-owned paper/live mode).
6845
+ *
6846
+ * Cadence is deliberately the 5 minutes this hook has always used. The only
6847
+ * field here that changes at runtime is `tradingMode`, and a stale one is
6848
+ * COSMETIC: the API resolves mode from the App on every request
6849
+ * (`resolveTradingMode`), so a client that still believes the old value
6850
+ * renders the wrong chrome but cannot execute in the wrong mode or spend real
6851
+ * funds. That does not justify polling a partner's app every minute.
6852
+ *
6853
+ * A bounded `refetchInterval` is still worth having — without one, a tab left
6854
+ * open on a single screen never learns about a flip at all — but it matches
6855
+ * `staleTime` rather than undercutting it.
6856
+ *
6857
+ * `refetchOnWindowFocus`/`refetchOnReconnect` are deliberately left at the
6858
+ * host's defaults. Forcing `"always"` here would override a partner's own
6859
+ * `QueryClient` settings (the demo sets `refetchOnWindowFocus: false`), which
6860
+ * is not this hook's call to make.
6719
6861
  */
6720
6862
  declare function useAppConfig(): UseAppConfigResult;
6721
6863
  /**
@@ -6724,4 +6866,62 @@ declare function useAppConfig(): UseAppConfigResult;
6724
6866
  */
6725
6867
  declare function useCachedAppConfig(): UseAppConfigResult;
6726
6868
 
6727
- 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 ExecutionRawStepProgress, type ExecutionStepProgress, type ExecutionTerminalOrderEvent, type GeoBlockState, type GetOrdersQuery, type GetPositionsQuery, type InvalidateUserActivityOptions, type InvalidateUserMoneyStateOptions, type LimitOrderVenueQuoteRequest, type LimitOrderVenueQuoteResult, 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 RecurringCryptoIdentity, type RecurringCryptoMarketInstance, type RecurringCryptoTimeline, type RedeemEvent, type RedeemLegLifecycle, type RedeemLifecycleState, RedeemRejectedError, type RollingChartWindow, SPORTS_LIVE_POLL_INTERVAL_MS, SPORTS_SCHEDULED_POLL_INTERVAL_MS, 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 UseCancelManagedOrderOptions, type UseCategoriesOptions, type UseCategoryChildrenOptions, type UseEnrichedVenueEventOptions, type UseExecuteManagedOptions, type UseExecutionOrdersOptions, type UseExecutionPositionsOptions, type UseExecutionProgressOptions, type UseExecutionProgressResult, type UseExternalIdOptions, type UseExternalIdReturn, type UseLimitOrderVenueQuotesOptions, type UseLimitOrderVenueQuotesResult, 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 UsePlaceLimitOrderOptions, type UsePositionsOptions, type UseRecurringCryptoMarketsOptions, type UseRedeemLifecycleInput, type UseRollingChartWindowOptions, type UseSearchOptions, type UseSmartRouteOptions, type UseSmartRouteResult, type UseUserActivityOptions, type UseUserHoldingsOptions, type UseVenueEventOptions, type UseVenueEventsOptions, type UseVenueMarketMidpointsOptions, type UseVenueMarketsOptions, type UseVenueSellQuotesOptions, type UseVenueSellQuotesResult, type UseViewportMidpointsOptions, type UseVisibleIdsOptions, type UseVisibleIdsResult, type UserActivityInvalidationStrategy, Venue, type VenueAvailabilityState, type VenueEvent, type VenueEventWithMarkets, type VenueMarket, type VenueMarketOutcome, type VenueSellQuoteRequest, type VenueSellQuoteResult, type WalletActionSendTokenParams, type WalletActions, buildLiveBestPriceCandidates, computeClosedPositionTotals, computePriceGaps, defaultAggUiConfig, defaultAggUiConfig as defaultSdkUiConfig, executionKeys, extractOutcomeBestCandidate, fetchRecurringCryptoMarkets, findLivePriceById, getBuilder, getOrCreateBuilder, getVenueAvailabilityState, getVisibleVenueIdsByConfig, getVisibleVenuesByConfig, getWalletAddressFromUserProfile, invalidateBalanceQueries, invalidatePositionQueries, invalidateUserActivityQueries, invalidateUserClaimState, invalidateUserMoneyState, isVenueDisabledByConfig, mergeBestPricesPreferringLive, mergeRecurringCryptoWindows, normalizeVenueId, optimizedImageUrl, parseEmail, parseEmailStrict, rangeToSeconds, recurringCryptoTransitionPollInterval, requestAggAuthChooserOpen, resolveAggUiLabels, resolveDefaultMarket as resolveDefaultTradingMarket, resolveEventTradingState, resolveMarketTradingState, resolveMarketWinningOutcome, resolveOrderEligibility, resolveRecurringCryptoIdentity, resolveRecurringCryptoTimeline, resolveRollingWindow, resolveTradingStateKind, sortVenues, sportsLiveQueryKey, sportsLiveRefetchInterval, timeRangeToInterval, tradingReducer, useAggAuth, useAggAuthContext, useAggAuthState, useAggBalance, useAggBalanceContext, useAggBalanceState, useAggClient, useAggLabels, useAggUiConfig, useAggWebSocket, useAppConfig, useArbFeed, useBalanceRefillPolicies, useCachedAppConfig, useCancelManagedOrder, useCategories, useCategoryChildren, useDebouncedValue, useEnrichedVenueEvent, useEventListState, useEventOrderbookData, useEventTradingContext, useExecuteManaged, useExecutionOrders, useExecutionPositions, useExecutionProgress, useExternalId, useGeoBlock, useLabels, useLimitOrderVenueQuotes, useLinkAccount, useLiveBestPriceCandidates, useLiveBestPrices, useLiveCandleOverlay, useLiveCandles, useLiveMarket, useLiveMarketStores, useLiveOutcomePrices, useLiveTrades, useMarketArb, useMarketChart, useMarketOrderbook, useMarketSearch, useMidpoints, useOnBalanceUpdate, useOnOrderEvent, useOnOrderSubmitted, useOnRedeemEvent, useOnWithdrawalLifecycle, useOptionalAggClient, useOrderBook, useOrderbookQuote, useOrders, usePlaceLimitOrder, usePositions, useRampQuotes, useRampSession, useRecurringCryptoMarkets, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useSportsLive, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueKeyStatus, useVenueMarketMidpoints, useVenueMarkets, useVenueSellQuotes, useViewportMidpoints, useVisibleIds, userActivityQueryKeys, venueKeyQueryKeys };
6869
+ interface UsePaperOnboardingResult {
6870
+ /** Whether the intro should be on screen right now. */
6871
+ isOpen: boolean;
6872
+ /** Dismiss and never show again for this user. Idempotent. */
6873
+ dismiss: () => void;
6874
+ }
6875
+ /**
6876
+ * Decides whether to show the paper-trading intro.
6877
+ *
6878
+ * Shown once per user, and only in a paper app. All four conditions must hold:
6879
+ *
6880
+ * 1. the app resolved to paper mode (never in a live app),
6881
+ * 2. mode resolution has finished (otherwise a live app flashes the intro
6882
+ * before `/app/config` answers),
6883
+ * 3. the user is signed in and we know who they are (the flag is per-user),
6884
+ * 4. that user has not dismissed it before.
6885
+ */
6886
+ declare function usePaperOnboarding(): UsePaperOnboardingResult;
6887
+
6888
+ interface UseResolvedExecutionModeResult {
6889
+ /**
6890
+ * The mode every execution surface must trade against. Once `/app/config`
6891
+ * resolves this is the server's value, unconditionally.
6892
+ */
6893
+ executionMode: AppTradingMode;
6894
+ /** Convenience for the common branch. */
6895
+ isPaperMode: boolean;
6896
+ /**
6897
+ * True while `/app/config` is still in flight, so the value above is a
6898
+ * locally-configured guess rather than the server's answer. Surfaces that
6899
+ * render mode-specific chrome (a paper badge, a hidden Limit tab, hidden
6900
+ * deposit controls) should hold or skeleton until this is false — otherwise
6901
+ * a paper app briefly paints live chrome, and vice versa.
6902
+ */
6903
+ isResolving: boolean;
6904
+ }
6905
+ /**
6906
+ * Resolve the app's execution mode with the server as the source of truth.
6907
+ *
6908
+ * Paper/live is an app-level setting owned by the partner admin (SNA-2964);
6909
+ * end users cannot change it, and a partner's own `trading.executionMode`
6910
+ * provider config cannot override it. That local value survives only as the
6911
+ * pre-resolution guess and as the answer for callers running without a
6912
+ * reachable `/app/config`.
6913
+ *
6914
+ * The API enforces the same decision independently — a client that ignores
6915
+ * this hook still cannot place a live order against a paper app.
6916
+ */
6917
+ declare function useResolvedExecutionMode(
6918
+ /**
6919
+ * Per-surface `executionMode` prop, where one exists (`EventMarketPage`,
6920
+ * `UserProfilePage`, `PlaceOrder`, …). Kept for source compatibility and
6921
+ * honoured only BEFORE the server answers — an app-level mode cannot be
6922
+ * overridden per surface, so the documented "live panel inside a paper app"
6923
+ * pattern no longer applies.
6924
+ */
6925
+ override?: AppTradingMode): UseResolvedExecutionModeResult;
6926
+
6927
+ 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 ExecutionRawStepProgress, type ExecutionStepProgress, type ExecutionTerminalOrderEvent, type GeoBlockState, type GetOrdersQuery, type GetPositionsQuery, type InvalidateUserActivityOptions, type InvalidateUserMoneyStateOptions, type LimitOrderVenueQuoteRequest, type LimitOrderVenueQuoteResult, 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 RecurringCryptoIdentity, type RecurringCryptoMarketInstance, type RecurringCryptoTimeline, type RedeemEvent, type RedeemLegLifecycle, type RedeemLifecycleState, RedeemRejectedError, type RollingChartWindow, SPORTS_LIVE_POLL_INTERVAL_MS, SPORTS_SCHEDULED_POLL_INTERVAL_MS, 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 UseCancelManagedOrderOptions, type UseCategoriesOptions, type UseCategoryChildrenOptions, type UseEnrichedVenueEventOptions, type UseExecuteManagedOptions, type UseExecutionOrdersOptions, type UseExecutionPositionsOptions, type UseExecutionProgressOptions, type UseExecutionProgressResult, type UseExternalIdOptions, type UseExternalIdReturn, type UseLimitOrderVenueQuotesOptions, type UseLimitOrderVenueQuotesResult, 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 UsePaperOnboardingResult, type UsePlaceLimitOrderOptions, type UsePositionsOptions, type UseRecurringCryptoMarketsOptions, type UseRedeemLifecycleInput, type UseResolvedExecutionModeResult, type UseRollingChartWindowOptions, type UseSearchOptions, type UseSmartRouteOptions, type UseSmartRouteResult, type UseUserActivityOptions, type UseUserHoldingsOptions, type UseVenueEventOptions, type UseVenueEventsOptions, type UseVenueMarketMidpointsOptions, type UseVenueMarketsOptions, type UseVenueSellQuotesOptions, type UseVenueSellQuotesResult, type UseViewportMidpointsOptions, type UseVisibleIdsOptions, type UseVisibleIdsResult, type UserActivityInvalidationStrategy, Venue, type VenueAvailabilityState, type VenueEvent, type VenueEventWithMarkets, type VenueMarket, type VenueMarketOutcome, type VenueSellQuoteRequest, type VenueSellQuoteResult, type WalletActionSendTokenParams, type WalletActions, appConfigQueryKey, buildLiveBestPriceCandidates, computeClosedPositionTotals, computePriceGaps, defaultAggUiConfig, defaultAggUiConfig as defaultSdkUiConfig, executionKeys, extractOutcomeBestCandidate, fetchRecurringCryptoMarkets, findLivePriceById, getBuilder, getOrCreateBuilder, getVenueAvailabilityState, getVisibleVenueIdsByConfig, getVisibleVenuesByConfig, getWalletAddressFromUserProfile, invalidateBalanceQueries, invalidatePositionQueries, invalidateUserActivityQueries, invalidateUserClaimState, invalidateUserMoneyState, isVenueDisabledByConfig, mergeBestPricesPreferringLive, mergeRecurringCryptoWindows, normalizeVenueId, optimizedImageUrl, parseEmail, parseEmailStrict, rangeToSeconds, recurringCryptoTransitionPollInterval, requestAggAuthChooserOpen, resolveAggUiLabels, resolveDefaultMarket as resolveDefaultTradingMarket, resolveEventTradingState, resolveMarketTradingState, resolveMarketWinningOutcome, resolveOrderEligibility, resolveRecurringCryptoIdentity, resolveRecurringCryptoTimeline, resolveRollingWindow, resolveTradingStateKind, sharedKycQueryKeys, sortVenues, sportsLiveQueryKey, sportsLiveRefetchInterval, timeRangeToInterval, tradingReducer, useAggAuth, useAggAuthContext, useAggAuthState, useAggBalance, useAggBalanceContext, useAggBalanceState, useAggClient, useAggLabels, useAggUiConfig, useAggWebSocket, useAppConfig, useArbFeed, useBalanceRefillPolicies, useCachedAppConfig, useCancelManagedOrder, useCategories, useCategoryChildren, useDebouncedValue, useEnrichedVenueEvent, useEventListState, useEventOrderbookData, useEventTradingContext, useExecuteManaged, useExecutionOrders, useExecutionPositions, useExecutionProgress, useExternalId, useGeoBlock, useLabels, useLimitOrderVenueQuotes, useLinkAccount, useLiveBestPriceCandidates, useLiveBestPrices, useLiveCandleOverlay, useLiveCandles, useLiveMarket, useLiveMarketStores, useLiveOutcomePrices, useLiveTrades, useMarketArb, useMarketChart, useMarketOrderbook, useMarketSearch, useMidpoints, useOnBalanceUpdate, useOnOrderEvent, useOnOrderSubmitted, useOnRedeemEvent, useOnWithdrawalLifecycle, useOptionalAggClient, useOrderBook, useOrderbookQuote, useOrders, usePaperOnboarding, usePlaceLimitOrder, usePositions, useRampQuotes, useRampSession, useRecurringCryptoMarkets, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useResolvedExecutionMode, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSharedKyc, useSmartRoute, useSportsLive, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueKeyStatus, useVenueMarketMidpoints, useVenueMarkets, useVenueSellQuotes, useViewportMidpoints, useVisibleIds, userActivityQueryKeys, venueKeyQueryKeys };