@agg-build/hooks 4.7.4 → 4.10.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/deposit.js CHANGED
@@ -168,6 +168,7 @@ var enUsLabels = {
168
168
  kalshi: "Kalshi",
169
169
  opinion: "Opinion",
170
170
  predict: "Predict",
171
+ pred: "PRED",
171
172
  limitless: "Limitless",
172
173
  probable: "Probable",
173
174
  myriad: "Myriad",
@@ -797,7 +798,7 @@ var enUsLabels = {
797
798
  venueMinOrderSize: "Order size is below the venue minimum. Try a larger amount.",
798
799
  sourceBalanceChanged: "Your balance changed since the quote. Refresh and try again, or pick a smaller amount.",
799
800
  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.",
801
+ dflowWalletUnverified: "This route is unavailable for your wallet. Check your account connection and try again.",
801
802
  venueNoQuotePath: "No active quote path for this market right now. Try a different size, or wait a moment and re-quote.",
802
803
  solanaBlockhashExpired: "Solana transaction expired before submission. Please re-quote and try again.",
803
804
  venueRateLimited: "The venue is rate-limiting requests right now. Please wait a moment and try again.",
@@ -841,6 +842,25 @@ var enUsLabels = {
841
842
  kycSuccessTitle: "Verification successful",
842
843
  kycSuccessDescription: "Your identity has been confirmed and you now have full access to trade on Kalshi markets.",
843
844
  kycSuccessDone: "Done",
845
+ sharedKyc: {
846
+ required: "KYC required",
847
+ completeToTrade: "Complete KYC to trade",
848
+ checkingStatus: "Checking verification status",
849
+ modal: {
850
+ ariaLabel: "Identity verification",
851
+ title: "Verify Your Identity",
852
+ freeDescription: "Complete a one-time identity verification to trade all KYC-required venues.",
853
+ pendingTitle: "Verification pending",
854
+ pendingDescription: "Your verification is being reviewed. Check back for approval before trading.",
855
+ checkStatus: "Check verification status",
856
+ startVerification: "Start verification",
857
+ doItLater: "Do it later",
858
+ successTitle: "Verification successful",
859
+ successDescription: "Your identity has been verified. You can now trade on all KYC-required venues.",
860
+ done: "Done",
861
+ error: "We couldn't confirm your verification."
862
+ }
863
+ },
844
864
  connectKalshi: "Connect to trade Kalshi",
845
865
  tradingAccessVenues: "Venues",
846
866
  tradingAccessAvailable: "Available",
@@ -885,9 +905,13 @@ var enUsLabels = {
885
905
  insufficientVenueInventory: (sharesLabel, priceLabel) => `Only ${sharesLabel} \xB7 ${priceLabel}`,
886
906
  viewAllRoutes: (count) => `View all (${count})`,
887
907
  venueUnavailableInRegion: "Unavailable in your region",
908
+ venueTemporarilyUnavailable: "Temporarily unavailable",
888
909
  verified: "Verified",
889
910
  platformFee: "0% platform fees",
890
911
  estimatedFees: "Estimated fees",
912
+ executionReserve: "Execution reserve",
913
+ executionReserveTooltipAria: "Why funds are reserved",
914
+ executionReserveDescription: "Held for price movement or possible venue charges, not a confirmed fee. Unused funds are returned after execution.",
891
915
  estimatedFeesTooltipAria: "Estimated fees breakdown",
892
916
  feeBreakdownVenueFees: "Venue",
893
917
  feeBreakdownBridgeFees: "Bridging",
@@ -918,6 +942,7 @@ var enUsLabels = {
918
942
  depositingFunds: (amount, tokenSymbol, destinationChain) => `Depositing ${amount} ${tokenSymbol} to ${destinationChain}...`,
919
943
  fundsDeposited: (amount, tokenSymbol, destinationChain) => `Deposited ${amount} ${tokenSymbol} to ${destinationChain}`,
920
944
  fillingOnVenue: (venueLabel) => `Filling on ${venueLabel}...`,
945
+ orderStillSettling: "Still settling. This can take a bit \u2014 check your activity feed. You can keep trading.",
921
946
  venueFilledAtPriceWithAmount: (venueLabel, amountLabel, priceLabel) => `${venueLabel} filled ${amountLabel} at ${priceLabel}`,
922
947
  executionShares: (value) => `${value} shares`,
923
948
  confirmTransactionInWallet: "Confirm the transaction in your wallet",
@@ -1162,6 +1187,35 @@ var enUsLabels = {
1162
1187
  bannerAria: "Site header",
1163
1188
  logoAria: "Home"
1164
1189
  },
1190
+ paperTrading: {
1191
+ badge: "Paper trading",
1192
+ badgeTooltip: "Trade real prediction markets with simulated funds. No real money at risk.",
1193
+ profile: {
1194
+ buyingPower: "Paper Buying Power",
1195
+ earnings: "Paper Earnings",
1196
+ earningsCaption: "Keep what you earn"
1197
+ },
1198
+ onboarding: {
1199
+ stepEyebrow: ({ current, total }) => `STEP ${current} OF ${total}`,
1200
+ skip: "Skip",
1201
+ back: "Back",
1202
+ next: "Next",
1203
+ // Figma reads "Get Strated" (node 4772:31236) — a typo, not copy.
1204
+ done: "Get started",
1205
+ realMarkets: {
1206
+ title: "Real markets, real prices",
1207
+ body: "Follow live prediction markets and trade using real-time market prices from leading venues."
1208
+ },
1209
+ zeroRisk: {
1210
+ title: "Paper trading, zero risk",
1211
+ body: ({ amount }) => `Start with ${amount} in simulated funds. No deposit, no real money, and no risk.`
1212
+ },
1213
+ readyToTrade: {
1214
+ title: "You're ready to trade",
1215
+ body: "Pick a market, make your prediction, and track your performance."
1216
+ }
1217
+ }
1218
+ },
1165
1219
  notifications: {
1166
1220
  order: {
1167
1221
  filledTitle: "Order filled",
@@ -1329,6 +1383,7 @@ var defaultAggUiConfig = {
1329
1383
  // src/core/providers/contexts.ts
1330
1384
  var AggClientContext = (0, import_react2.createContext)(null);
1331
1385
  var AggUiContext = (0, import_react2.createContext)(defaultAggUiConfig);
1386
+ var AggExecutionModeContext = (0, import_react2.createContext)(null);
1332
1387
  var AggLabelsContext = (0, import_react2.createContext)(defaultAggUiConfig.general.labels);
1333
1388
  var AggAuthContext = (0, import_react2.createContext)(null);
1334
1389
  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-MIWXPZNP.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-SFSGE25P.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';
@@ -16,6 +16,7 @@ declare enum Venue {
16
16
  limitless = "limitless",
17
17
  opinion = "opinion",
18
18
  predict = "predict",
19
+ pred = "pred",
19
20
  probable = "probable",
20
21
  myriad = "myriad",
21
22
  hyperliquid = "hyperliquid",
@@ -160,6 +161,21 @@ type UnifiedBalanceResponse = {
160
161
  portfolioValueCents?: number | undefined;
161
162
  updatedAt: string;
162
163
  }[];
164
+ /**
165
+ * Paper-account summary. Present only when the request resolved to paper
166
+ * mode; absent in a live response. Mirrors `UnifiedBalanceResponseSchemaTB`
167
+ * in `typebox/schemas/trading.ts` — keep the two in sync. All dollars.
168
+ */
169
+ paper?: {
170
+ startingBalance: number;
171
+ cashBalance: number;
172
+ positionsValue: number;
173
+ /** Banked P&L from closed trades — account-level, not summable from positions. */
174
+ realizedPnl: number;
175
+ unrealizedPnl: number;
176
+ /** realized + unrealized. */
177
+ earnings: number;
178
+ };
163
179
  };
164
180
  type GetOrdersQuery = {
165
181
  status?: OrderStatus | undefined;
@@ -1196,7 +1212,7 @@ interface AggUiLabels {
1196
1212
  */
1197
1213
  venueMarketResolved: string;
1198
1214
  /**
1199
- * dFlow wallet KYC required (verify at dflow.net/proof).
1215
+ * Legacy dFlow wallet eligibility error; Kalshi v2 does not initiate KYC.
1200
1216
  */
1201
1217
  dflowWalletUnverified: string;
1202
1218
  /**
@@ -1253,6 +1269,25 @@ interface AggUiLabels {
1253
1269
  kycSuccessTitle: string;
1254
1270
  kycSuccessDescription: string;
1255
1271
  kycSuccessDone: string;
1272
+ sharedKyc: {
1273
+ required: string;
1274
+ completeToTrade: string;
1275
+ checkingStatus: string;
1276
+ modal: {
1277
+ ariaLabel: string;
1278
+ title: string;
1279
+ freeDescription: string;
1280
+ pendingTitle: string;
1281
+ pendingDescription: string;
1282
+ checkStatus: string;
1283
+ startVerification: string;
1284
+ doItLater: string;
1285
+ successTitle: string;
1286
+ successDescription: string;
1287
+ done: string;
1288
+ error: string;
1289
+ };
1290
+ };
1256
1291
  connectKalshi: string;
1257
1292
  tradingAccessVenues: string;
1258
1293
  tradingAccessAvailable: string;
@@ -1292,9 +1327,13 @@ interface AggUiLabels {
1292
1327
  insufficientVenueInventory: (sharesLabel: string, priceLabel: string) => string;
1293
1328
  viewAllRoutes: (count: number) => string;
1294
1329
  venueUnavailableInRegion: string;
1330
+ venueTemporarilyUnavailable: string;
1295
1331
  verified: string;
1296
1332
  platformFee: string;
1297
1333
  estimatedFees: string;
1334
+ executionReserve: string;
1335
+ executionReserveTooltipAria: string;
1336
+ executionReserveDescription: string;
1298
1337
  estimatedFeesTooltipAria: string;
1299
1338
  feeBreakdownVenueFees: string;
1300
1339
  feeBreakdownBridgeFees: string;
@@ -1325,6 +1364,7 @@ interface AggUiLabels {
1325
1364
  depositingFunds: (amount: string, tokenSymbol: string, destinationChain: string) => string;
1326
1365
  fundsDeposited: (amount: string, tokenSymbol: string, destinationChain: string) => string;
1327
1366
  fillingOnVenue: (venueLabel: string) => string;
1367
+ orderStillSettling: string;
1328
1368
  venueFilledAtPriceWithAmount: (venueLabel: string, amountLabel: string, priceLabel: string) => string;
1329
1369
  executionShares: (value: string) => string;
1330
1370
  confirmTransactionInWallet: string;
@@ -1555,6 +1595,62 @@ interface AggUiLabels {
1555
1595
  bannerAria: string;
1556
1596
  logoAria: string;
1557
1597
  };
1598
+ /**
1599
+ * Copy for app-level paper trading mode (SNA-2964). Every paper string in
1600
+ * the UI resolves through here — components must not render literals, and
1601
+ * tests should assert against these keys rather than their values. The
1602
+ * wording below is placeholder: the design was drawn against an earlier
1603
+ * daily-allowance model and copy is still being revised, so treat these as
1604
+ * defaults to be overridden, not as spec.
1605
+ *
1606
+ * Money figures are passed in already formatted by the caller, sourced from
1607
+ * the server's `paperStartingBalance`, so no amount is ever hardcoded here.
1608
+ */
1609
+ paperTrading: {
1610
+ /** Header pill marking the whole app as simulated. */
1611
+ badge: string;
1612
+ /** Tooltip shown on the header pill. */
1613
+ badgeTooltip: string;
1614
+ profile: {
1615
+ /** Card title for simulated cash available to trade. */
1616
+ buyingPower: string;
1617
+ /** Card title for cumulative simulated P&L. */
1618
+ earnings: string;
1619
+ /**
1620
+ * Small caption beside the earnings figure. There is deliberately no
1621
+ * matching caption for buying power: Figma's "Resets daily" describes
1622
+ * the daily-allowance model, which the one-time grant replaced.
1623
+ */
1624
+ earningsCaption: string;
1625
+ };
1626
+ onboarding: {
1627
+ /** e.g. "STEP 1 OF 3". Derived, never a literal per card. */
1628
+ stepEyebrow: (params: {
1629
+ current: number;
1630
+ total: number;
1631
+ }) => string;
1632
+ /** Secondary action on step 1, where there is nothing to go back to. */
1633
+ skip: string;
1634
+ back: string;
1635
+ next: string;
1636
+ done: string;
1637
+ realMarkets: {
1638
+ title: string;
1639
+ body: string;
1640
+ };
1641
+ zeroRisk: {
1642
+ title: string;
1643
+ /** `amount` arrives pre-formatted, e.g. "$10,000". */
1644
+ body: (params: {
1645
+ amount: string;
1646
+ }) => string;
1647
+ };
1648
+ readyToTrade: {
1649
+ title: string;
1650
+ body: string;
1651
+ };
1652
+ };
1653
+ };
1558
1654
  /**
1559
1655
  * Copy for the global notification bridge (`AggNotificationEventsProvider`).
1560
1656
  * Each leaf is read from a websocket / activity-feed lifecycle event and
@@ -2853,6 +2949,22 @@ declare const venueKeyQueryKeys: {
2853
2949
  };
2854
2950
  declare const useVenueKeyStatus: (venue: Venue$1, enabled?: boolean) => _tanstack_react_query.UseQueryResult<VenueKeyStatus, Error>;
2855
2951
 
2952
+ declare const sharedKycQueryKeys: {
2953
+ status: (userId: string | null) => readonly ["agg", "shared-kyc", string | null];
2954
+ };
2955
+ /** Shared CH-backed identity state; legacy venue flags and callback query strings are not approval. */
2956
+ declare const useSharedKyc: () => {
2957
+ status: "verified" | "loading" | "unverified";
2958
+ refreshStatus: () => Promise<"verified" | "unverified">;
2959
+ initiateVerification: ({ venue, redirectUri }: {
2960
+ venue: string;
2961
+ redirectUri: string;
2962
+ }) => Promise<{
2963
+ status: string;
2964
+ kycUrl?: string;
2965
+ }>;
2966
+ };
2967
+
2856
2968
  interface UseAggAuthOptions {
2857
2969
  signMessage?: (message: string) => Promise<string>;
2858
2970
  address?: string;
@@ -4277,12 +4389,11 @@ interface UseMarketOrderbookResult {
4277
4389
  /**
4278
4390
  * Subscribe to a live orderbook for the selected outcome(s).
4279
4391
  *
4280
- * Entirely WS-driven — subscribes to outcome IDs, receives snapshots +
4281
- * deltas via the gateway, reads from the React Query live cache that
4282
- * the ws-provider maintains. No REST fetch needed.
4392
+ * WS-driven in steady state: subscribes to outcome IDs, receives snapshots
4393
+ * + deltas via the gateway, reads from the React Query live cache.
4283
4394
  *
4284
- * When switching outcomes, the subscription changes and a new snapshot
4285
- * arrives for the selected outcome.
4395
+ * REST-seeds `GET /orderbook/outcome/:id` so the book still renders when the
4396
+ * websocket is down or the snapshot never arrives. WS overwrites the seed.
4286
4397
  */
4287
4398
  declare function useMarketOrderbook(options: UseMarketOrderbookOptions): UseMarketOrderbookResult;
4288
4399
 
@@ -6705,17 +6816,49 @@ interface UseVisibleIdsResult {
6705
6816
  */
6706
6817
  declare function useVisibleIds(options?: UseVisibleIdsOptions): UseVisibleIdsResult;
6707
6818
 
6819
+ /**
6820
+ * App config is per-App data, and `tradingMode` on it is the client-side
6821
+ * trading authority (SNA-2964). Two `AggClient`s for different Apps under one
6822
+ * `QueryClient` — a partner switching Apps, an admin previewing one — must not
6823
+ * read each other's entry, or a live app paints paper chrome and vice versa.
6824
+ */
6825
+ declare const appConfigQueryKey: (appId: string | undefined) => readonly ["agg", "app-config", string];
6708
6826
  interface UseAppConfigResult {
6709
6827
  disabledVenues: AppClientConfigResponse["disabledVenues"];
6710
6828
  disabledCategoryPresets: AppClientConfigResponse["disabledCategoryPresets"];
6711
6829
  earlyAccessEnabled: AppClientConfigResponse["earlyAccessEnabled"];
6712
6830
  authOptions: AppClientConfigResponse["authOptions"];
6831
+ /**
6832
+ * Server-owned paper/live mode. `undefined` until `/app/config` resolves —
6833
+ * deliberately NOT defaulted here, so callers can tell "not loaded yet"
6834
+ * apart from "the server said live". Resolve it via
6835
+ * `useResolvedExecutionMode`, not by reading this directly.
6836
+ */
6837
+ tradingMode: AppClientConfigResponse["tradingMode"] | undefined;
6838
+ /** One-time paper grant in dollars; `undefined` until config resolves. */
6839
+ paperStartingBalance: number | undefined;
6713
6840
  isLoading: boolean;
6714
6841
  error: unknown;
6715
6842
  }
6716
6843
  /**
6717
- * Fetch the current App's UI config (disabled venues + category presets).
6718
- * Cached for 5 minutes — config rarely changes at runtime.
6844
+ * Fetch the current App's UI config (disabled venues, category presets, and
6845
+ * the server-owned paper/live mode).
6846
+ *
6847
+ * Cadence is deliberately the 5 minutes this hook has always used. The only
6848
+ * field here that changes at runtime is `tradingMode`, and a stale one is
6849
+ * COSMETIC: the API resolves mode from the App on every request
6850
+ * (`resolveTradingMode`), so a client that still believes the old value
6851
+ * renders the wrong chrome but cannot execute in the wrong mode or spend real
6852
+ * funds. That does not justify polling a partner's app every minute.
6853
+ *
6854
+ * A bounded `refetchInterval` is still worth having — without one, a tab left
6855
+ * open on a single screen never learns about a flip at all — but it matches
6856
+ * `staleTime` rather than undercutting it.
6857
+ *
6858
+ * `refetchOnWindowFocus`/`refetchOnReconnect` are deliberately left at the
6859
+ * host's defaults. Forcing `"always"` here would override a partner's own
6860
+ * `QueryClient` settings (the demo sets `refetchOnWindowFocus: false`), which
6861
+ * is not this hook's call to make.
6719
6862
  */
6720
6863
  declare function useAppConfig(): UseAppConfigResult;
6721
6864
  /**
@@ -6724,4 +6867,62 @@ declare function useAppConfig(): UseAppConfigResult;
6724
6867
  */
6725
6868
  declare function useCachedAppConfig(): UseAppConfigResult;
6726
6869
 
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 };
6870
+ interface UsePaperOnboardingResult {
6871
+ /** Whether the intro should be on screen right now. */
6872
+ isOpen: boolean;
6873
+ /** Dismiss and never show again for this user. Idempotent. */
6874
+ dismiss: () => void;
6875
+ }
6876
+ /**
6877
+ * Decides whether to show the paper-trading intro.
6878
+ *
6879
+ * Shown once per user, and only in a paper app. All four conditions must hold:
6880
+ *
6881
+ * 1. the app resolved to paper mode (never in a live app),
6882
+ * 2. mode resolution has finished (otherwise a live app flashes the intro
6883
+ * before `/app/config` answers),
6884
+ * 3. the user is signed in and we know who they are (the flag is per-user),
6885
+ * 4. that user has not dismissed it before.
6886
+ */
6887
+ declare function usePaperOnboarding(): UsePaperOnboardingResult;
6888
+
6889
+ interface UseResolvedExecutionModeResult {
6890
+ /**
6891
+ * The mode every execution surface must trade against. Once `/app/config`
6892
+ * resolves this is the server's value, unconditionally.
6893
+ */
6894
+ executionMode: AppTradingMode;
6895
+ /** Convenience for the common branch. */
6896
+ isPaperMode: boolean;
6897
+ /**
6898
+ * True while `/app/config` is still in flight, so the value above is a
6899
+ * locally-configured guess rather than the server's answer. Surfaces that
6900
+ * render mode-specific chrome (a paper badge, a hidden Limit tab, hidden
6901
+ * deposit controls) should hold or skeleton until this is false — otherwise
6902
+ * a paper app briefly paints live chrome, and vice versa.
6903
+ */
6904
+ isResolving: boolean;
6905
+ }
6906
+ /**
6907
+ * Resolve the app's execution mode with the server as the source of truth.
6908
+ *
6909
+ * Paper/live is an app-level setting owned by the partner admin (SNA-2964);
6910
+ * end users cannot change it, and a partner's own `trading.executionMode`
6911
+ * provider config cannot override it. That local value survives only as the
6912
+ * pre-resolution guess and as the answer for callers running without a
6913
+ * reachable `/app/config`.
6914
+ *
6915
+ * The API enforces the same decision independently — a client that ignores
6916
+ * this hook still cannot place a live order against a paper app.
6917
+ */
6918
+ declare function useResolvedExecutionMode(
6919
+ /**
6920
+ * Per-surface `executionMode` prop, where one exists (`EventMarketPage`,
6921
+ * `UserProfilePage`, `PlaceOrder`, …). Kept for source compatibility and
6922
+ * honoured only BEFORE the server answers — an app-level mode cannot be
6923
+ * overridden per surface, so the documented "live panel inside a paper app"
6924
+ * pattern no longer applies.
6925
+ */
6926
+ override?: AppTradingMode): UseResolvedExecutionModeResult;
6927
+
6928
+ 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 };