@agg-build/hooks 2.5.1 → 2.7.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/{chunk-PK2JGXQV.mjs → chunk-DP6VYGAX.mjs} +1 -1
- package/dist/{chunk-DPY6RZNW.mjs → chunk-Q4FRCMP6.mjs} +1 -1
- package/dist/{chunk-5NJBAP42.mjs → chunk-TJRQ55UC.mjs} +52 -10
- package/dist/deposit.js +32 -0
- package/dist/deposit.mjs +2 -2
- package/dist/index.d.mts +97 -3
- package/dist/index.d.ts +97 -3
- package/dist/index.js +266 -84
- package/dist/index.mjs +168 -31
- package/dist/withdraw.js +32 -0
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useOnWithdrawalLifecycle,
|
|
12
12
|
useSyncBalances,
|
|
13
13
|
useWithdrawManaged
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TJRQ55UC.mjs";
|
|
15
15
|
|
|
16
16
|
// src/withdraw/use-withdraw-flow.ts
|
|
17
17
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -483,6 +483,8 @@ var enUsLabels = {
|
|
|
483
483
|
balance: {
|
|
484
484
|
availableBalance: "Available Balance",
|
|
485
485
|
reservedForOpenOrders: (amount) => `${amount} reserved for open orders`,
|
|
486
|
+
positionsValue: "Positions Value",
|
|
487
|
+
kalshiBalance: "Kalshi Balance",
|
|
486
488
|
balanceByNetwork: "Balance by network",
|
|
487
489
|
paperModeNetwork: "Paper",
|
|
488
490
|
paperModeWarning: "Paper mode is enabled. These are simulated funds for paper trading.",
|
|
@@ -817,6 +819,24 @@ var enUsLabels = {
|
|
|
817
819
|
noBidsAboveMinPrice: "No venue bids above the minimum price.",
|
|
818
820
|
signInToTrade: "Sign in to trade",
|
|
819
821
|
deposit: "Deposit",
|
|
822
|
+
addFundsToKalshi: "Add funds to Kalshi",
|
|
823
|
+
fundKalshiModal: {
|
|
824
|
+
ariaLabel: "Fund your Kalshi account",
|
|
825
|
+
title: "Fund Your Kalshi Account",
|
|
826
|
+
description: "Kalshi manages its own account balances, so funds can't be deposited through agg.market. Add funds directly in Kalshi, then return here to trade with your updated balance.",
|
|
827
|
+
howItWorks: "How it works",
|
|
828
|
+
kalshiLinkLabel: "Kalshi",
|
|
829
|
+
kalshiUrl: "https://kalshi.com",
|
|
830
|
+
firstStepPrefix: "Go to",
|
|
831
|
+
firstStepSuffix: "and sign in to your account.",
|
|
832
|
+
remainingSteps: [
|
|
833
|
+
"Click Add Funds.",
|
|
834
|
+
"Complete your deposit using your preferred payment method.",
|
|
835
|
+
"Return here - your Kalshi balance will be available automatically."
|
|
836
|
+
],
|
|
837
|
+
doItLater: "I'll do it later",
|
|
838
|
+
done: "Done"
|
|
839
|
+
},
|
|
820
840
|
kycRequired: "Verify to trade Kalshi",
|
|
821
841
|
kycNotVerifiedTooltip: "You have not been verified yet",
|
|
822
842
|
kycVerify: "Verify Identity",
|
|
@@ -827,6 +847,10 @@ var enUsLabels = {
|
|
|
827
847
|
kycSuccessTitle: "Verification successful",
|
|
828
848
|
kycSuccessDescription: "Your identity has been confirmed and you now have full access to trade on Kalshi markets.",
|
|
829
849
|
kycSuccessDone: "Done",
|
|
850
|
+
connectKalshi: "Connect to trade Kalshi",
|
|
851
|
+
tradingAccessVenues: "Venues",
|
|
852
|
+
tradingAccessAvailable: "Available",
|
|
853
|
+
tradingAccessAddKalshiAccount: "Add Kalshi Account",
|
|
830
854
|
outcome: (label) => `Outcome: ${label}`,
|
|
831
855
|
smartRouting: "Smart Routing",
|
|
832
856
|
orderTypeMarket: "Market",
|
|
@@ -1018,6 +1042,11 @@ var enUsLabels = {
|
|
|
1018
1042
|
cancel: "Cancel",
|
|
1019
1043
|
verifyConnection: "Verify Connection"
|
|
1020
1044
|
},
|
|
1045
|
+
success: {
|
|
1046
|
+
title: "Kalshi Account Connected",
|
|
1047
|
+
description: "Your Kalshi account is now connected to AGG. You can start trading Kalshi markets.",
|
|
1048
|
+
done: "Done"
|
|
1049
|
+
},
|
|
1021
1050
|
fallbackError: "Verification failed. Please check your credentials and try again."
|
|
1022
1051
|
}
|
|
1023
1052
|
},
|
|
@@ -1067,6 +1096,9 @@ var enUsLabels = {
|
|
|
1067
1096
|
moreMarketsTitle: "More markets",
|
|
1068
1097
|
gameLinesTab: "Game Lines",
|
|
1069
1098
|
halvesTab: "Halves",
|
|
1099
|
+
quartersTab: "Quarters",
|
|
1100
|
+
setsTab: "Sets",
|
|
1101
|
+
playerPropsTab: "Player Props",
|
|
1070
1102
|
exactScoreTab: "Exact Score",
|
|
1071
1103
|
cornersTab: "Corners",
|
|
1072
1104
|
goalsTab: "Goals",
|
|
@@ -1485,6 +1517,7 @@ var EMPTY_MANAGED_BALANCES = {
|
|
|
1485
1517
|
positions: []
|
|
1486
1518
|
};
|
|
1487
1519
|
function AggBalanceProvider({ children }) {
|
|
1520
|
+
var _a;
|
|
1488
1521
|
const client = useContext(AggClientContext);
|
|
1489
1522
|
const authContext = useContext(AggAuthContext);
|
|
1490
1523
|
const {
|
|
@@ -1529,8 +1562,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1529
1562
|
if (!isUsdBasedToken(token.tokenSymbol)) return sum;
|
|
1530
1563
|
const tokenAcrossChains = token.chains.reduce(
|
|
1531
1564
|
(chainSum, chain) => {
|
|
1532
|
-
var
|
|
1533
|
-
return chainSum + toTokenUnits(chain.balanceRaw, (
|
|
1565
|
+
var _a2;
|
|
1566
|
+
return chainSum + toTokenUnits(chain.balanceRaw, (_a2 = chain.decimals) != null ? _a2 : token.decimals);
|
|
1534
1567
|
},
|
|
1535
1568
|
0
|
|
1536
1569
|
);
|
|
@@ -1545,8 +1578,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1545
1578
|
}
|
|
1546
1579
|
return sum + token.chains.reduce(
|
|
1547
1580
|
(chainSum, chain) => {
|
|
1548
|
-
var
|
|
1549
|
-
return chainSum + toTokenUnits((
|
|
1581
|
+
var _a2, _b;
|
|
1582
|
+
return chainSum + toTokenUnits((_a2 = chain.availableRaw) != null ? _a2 : chain.balanceRaw, (_b = chain.decimals) != null ? _b : token.decimals);
|
|
1550
1583
|
},
|
|
1551
1584
|
0
|
|
1552
1585
|
);
|
|
@@ -1560,8 +1593,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1560
1593
|
}
|
|
1561
1594
|
return sum + token.chains.reduce(
|
|
1562
1595
|
(chainSum, chain) => {
|
|
1563
|
-
var
|
|
1564
|
-
return chainSum + toTokenUnits((
|
|
1596
|
+
var _a2, _b;
|
|
1597
|
+
return chainSum + toTokenUnits((_a2 = chain.heldRaw) != null ? _a2 : "0", (_b = chain.decimals) != null ? _b : token.decimals);
|
|
1565
1598
|
},
|
|
1566
1599
|
0
|
|
1567
1600
|
);
|
|
@@ -1569,13 +1602,13 @@ function AggBalanceProvider({ children }) {
|
|
|
1569
1602
|
}, [managedBalances]);
|
|
1570
1603
|
const buildBalanceBreakdown = useCallback(
|
|
1571
1604
|
(rawForChain) => {
|
|
1572
|
-
var
|
|
1605
|
+
var _a2, _b;
|
|
1573
1606
|
const byChain = /* @__PURE__ */ new Map();
|
|
1574
1607
|
const cash = managedBalances.cash;
|
|
1575
1608
|
for (const token of cash) {
|
|
1576
1609
|
if (!isUsdBasedToken(token.tokenSymbol)) continue;
|
|
1577
1610
|
for (const chain of token.chains) {
|
|
1578
|
-
const current = (
|
|
1611
|
+
const current = (_a2 = byChain.get(chain.chainId)) != null ? _a2 : {
|
|
1579
1612
|
label: chainLabelFromId(chain.chainId),
|
|
1580
1613
|
balance: 0,
|
|
1581
1614
|
accountCount: 0
|
|
@@ -1600,8 +1633,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1600
1633
|
}, [buildBalanceBreakdown]);
|
|
1601
1634
|
const availableBalanceBreakdown = useMemo(() => {
|
|
1602
1635
|
return buildBalanceBreakdown((chain) => {
|
|
1603
|
-
var
|
|
1604
|
-
return (
|
|
1636
|
+
var _a2;
|
|
1637
|
+
return (_a2 = chain.availableRaw) != null ? _a2 : chain.balanceRaw;
|
|
1605
1638
|
});
|
|
1606
1639
|
}, [buildBalanceBreakdown]);
|
|
1607
1640
|
const positionsBalanceTotal = useMemo(() => {
|
|
@@ -1611,6 +1644,9 @@ function AggBalanceProvider({ children }) {
|
|
|
1611
1644
|
0
|
|
1612
1645
|
);
|
|
1613
1646
|
}, [managedBalances]);
|
|
1647
|
+
const kalshiVenueCash = (_a = managedBalances.venueCash) == null ? void 0 : _a.find((item) => item.venue === "kalshi");
|
|
1648
|
+
const kalshiBalance = kalshiVenueCash ? kalshiVenueCash.balanceCents / 100 : null;
|
|
1649
|
+
const kalshiPortfolioValue = (kalshiVenueCash == null ? void 0 : kalshiVenueCash.portfolioValueCents) == null ? null : kalshiVenueCash.portfolioValueCents / 100;
|
|
1614
1650
|
const refetch = useCallback(() => {
|
|
1615
1651
|
if (!isAuthenticated) return;
|
|
1616
1652
|
void refetchBalances();
|
|
@@ -1627,6 +1663,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1627
1663
|
availableBalance: 0,
|
|
1628
1664
|
reservedBalance: 0,
|
|
1629
1665
|
positionsBalanceTotal: 0,
|
|
1666
|
+
kalshiBalance: null,
|
|
1667
|
+
kalshiPortfolioValue: null,
|
|
1630
1668
|
balanceBreakdown: [],
|
|
1631
1669
|
availableBalanceBreakdown: [],
|
|
1632
1670
|
connectedVenues: [],
|
|
@@ -1643,6 +1681,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1643
1681
|
availableBalance,
|
|
1644
1682
|
reservedBalance,
|
|
1645
1683
|
positionsBalanceTotal,
|
|
1684
|
+
kalshiBalance,
|
|
1685
|
+
kalshiPortfolioValue,
|
|
1646
1686
|
balanceBreakdown,
|
|
1647
1687
|
availableBalanceBreakdown,
|
|
1648
1688
|
connectedVenues,
|
|
@@ -1659,6 +1699,8 @@ function AggBalanceProvider({ children }) {
|
|
|
1659
1699
|
connectedVenues,
|
|
1660
1700
|
isBalancesLoading,
|
|
1661
1701
|
isAuthenticated,
|
|
1702
|
+
kalshiBalance,
|
|
1703
|
+
kalshiPortfolioValue,
|
|
1662
1704
|
managedBalances,
|
|
1663
1705
|
positionsBalanceTotal,
|
|
1664
1706
|
refetch,
|
package/dist/deposit.js
CHANGED
|
@@ -408,6 +408,8 @@ var enUsLabels = {
|
|
|
408
408
|
balance: {
|
|
409
409
|
availableBalance: "Available Balance",
|
|
410
410
|
reservedForOpenOrders: (amount) => `${amount} reserved for open orders`,
|
|
411
|
+
positionsValue: "Positions Value",
|
|
412
|
+
kalshiBalance: "Kalshi Balance",
|
|
411
413
|
balanceByNetwork: "Balance by network",
|
|
412
414
|
paperModeNetwork: "Paper",
|
|
413
415
|
paperModeWarning: "Paper mode is enabled. These are simulated funds for paper trading.",
|
|
@@ -742,6 +744,24 @@ var enUsLabels = {
|
|
|
742
744
|
noBidsAboveMinPrice: "No venue bids above the minimum price.",
|
|
743
745
|
signInToTrade: "Sign in to trade",
|
|
744
746
|
deposit: "Deposit",
|
|
747
|
+
addFundsToKalshi: "Add funds to Kalshi",
|
|
748
|
+
fundKalshiModal: {
|
|
749
|
+
ariaLabel: "Fund your Kalshi account",
|
|
750
|
+
title: "Fund Your Kalshi Account",
|
|
751
|
+
description: "Kalshi manages its own account balances, so funds can't be deposited through agg.market. Add funds directly in Kalshi, then return here to trade with your updated balance.",
|
|
752
|
+
howItWorks: "How it works",
|
|
753
|
+
kalshiLinkLabel: "Kalshi",
|
|
754
|
+
kalshiUrl: "https://kalshi.com",
|
|
755
|
+
firstStepPrefix: "Go to",
|
|
756
|
+
firstStepSuffix: "and sign in to your account.",
|
|
757
|
+
remainingSteps: [
|
|
758
|
+
"Click Add Funds.",
|
|
759
|
+
"Complete your deposit using your preferred payment method.",
|
|
760
|
+
"Return here - your Kalshi balance will be available automatically."
|
|
761
|
+
],
|
|
762
|
+
doItLater: "I'll do it later",
|
|
763
|
+
done: "Done"
|
|
764
|
+
},
|
|
745
765
|
kycRequired: "Verify to trade Kalshi",
|
|
746
766
|
kycNotVerifiedTooltip: "You have not been verified yet",
|
|
747
767
|
kycVerify: "Verify Identity",
|
|
@@ -752,6 +772,10 @@ var enUsLabels = {
|
|
|
752
772
|
kycSuccessTitle: "Verification successful",
|
|
753
773
|
kycSuccessDescription: "Your identity has been confirmed and you now have full access to trade on Kalshi markets.",
|
|
754
774
|
kycSuccessDone: "Done",
|
|
775
|
+
connectKalshi: "Connect to trade Kalshi",
|
|
776
|
+
tradingAccessVenues: "Venues",
|
|
777
|
+
tradingAccessAvailable: "Available",
|
|
778
|
+
tradingAccessAddKalshiAccount: "Add Kalshi Account",
|
|
755
779
|
outcome: (label) => `Outcome: ${label}`,
|
|
756
780
|
smartRouting: "Smart Routing",
|
|
757
781
|
orderTypeMarket: "Market",
|
|
@@ -943,6 +967,11 @@ var enUsLabels = {
|
|
|
943
967
|
cancel: "Cancel",
|
|
944
968
|
verifyConnection: "Verify Connection"
|
|
945
969
|
},
|
|
970
|
+
success: {
|
|
971
|
+
title: "Kalshi Account Connected",
|
|
972
|
+
description: "Your Kalshi account is now connected to AGG. You can start trading Kalshi markets.",
|
|
973
|
+
done: "Done"
|
|
974
|
+
},
|
|
946
975
|
fallbackError: "Verification failed. Please check your credentials and try again."
|
|
947
976
|
}
|
|
948
977
|
},
|
|
@@ -992,6 +1021,9 @@ var enUsLabels = {
|
|
|
992
1021
|
moreMarketsTitle: "More markets",
|
|
993
1022
|
gameLinesTab: "Game Lines",
|
|
994
1023
|
halvesTab: "Halves",
|
|
1024
|
+
quartersTab: "Quarters",
|
|
1025
|
+
setsTab: "Sets",
|
|
1026
|
+
playerPropsTab: "Player Props",
|
|
995
1027
|
exactScoreTab: "Exact Score",
|
|
996
1028
|
cornersTab: "Corners",
|
|
997
1029
|
goalsTab: "Goals",
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q4FRCMP6.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-
|
|
14
|
+
} from "./chunk-TJRQ55UC.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, QuoteManagedResponse, QuoteManagedParams, ExecuteManagedResponse, ExecuteManagedParams, PlaceLimitOrderResponse, PlaceLimitOrderParams, CancelManagedExecutionResponse, GetPositionsParams, WsOrderSubmitted, WsBalanceUpdate, RedeemResponse, RedeemRequest, WsRedeemEvent, AggWebSocket, WsOrderEvent, WsWithdrawalLifecycleEvent, WsCandleInterval, WsTrade, AggregatedOrderbookResponse, AggLinkAccountBody, AggLinkAccountResult, AggLinkAccountConfirmResult, Category, UserActivityQuery, UserActivityItem, PaginatedResponse, CandleInterval, OrderbookState, OrderbookQuoteResponse, OrderListQuery, TradeExecutorOrder, SmartRouteSide, ExecutionMode, SmartRouteResponse, RecurrenceFilter, MidpointRow, BatchMidpointsResponse, AppClientConfigResponse } from '@agg-build/sdk';
|
|
5
|
+
import { CandleBuilder, AggAuthStartBody, AggAuthStartResult, AggClientSessionInput, AggClient, RampQuote, RampQuoteRequest, RampWidgetSession, RampSessionRequest, QuoteManagedResponse, QuoteManagedParams, ExecuteManagedResponse, ExecuteManagedParams, PlaceLimitOrderResponse, PlaceLimitOrderParams, CancelManagedExecutionResponse, GetPositionsParams, WsOrderSubmitted, WsBalanceUpdate, RedeemResponse, RedeemRequest, WsRedeemEvent, AggWebSocket, WsOrderEvent, WsWithdrawalLifecycleEvent, WsCandleInterval, WsTrade, AggregatedOrderbookResponse, Venue as Venue$1, VenueKeyStatus, AggLinkAccountBody, AggLinkAccountResult, AggLinkAccountConfirmResult, Category, UserActivityQuery, UserActivityItem, PaginatedResponse, CandleInterval, OrderbookState, OrderbookQuoteResponse, OrderListQuery, TradeExecutorOrder, SmartRouteSide, ExecutionMode, SmartRouteResponse, RecurrenceFilter, MidpointRow, BatchMidpointsResponse, AppClientConfigResponse } from '@agg-build/sdk';
|
|
6
6
|
export { 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';
|
|
@@ -152,6 +152,12 @@ type UnifiedBalanceResponse = {
|
|
|
152
152
|
unrealizedPnl: number;
|
|
153
153
|
realizedPnl: number;
|
|
154
154
|
}[];
|
|
155
|
+
venueCash?: {
|
|
156
|
+
venue: Venue;
|
|
157
|
+
balanceCents: number;
|
|
158
|
+
portfolioValueCents?: number | undefined;
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
}[];
|
|
155
161
|
};
|
|
156
162
|
type GetOrdersQuery = {
|
|
157
163
|
status?: OrderStatus | undefined;
|
|
@@ -763,6 +769,8 @@ interface AggUiLabels {
|
|
|
763
769
|
balance: {
|
|
764
770
|
availableBalance: string;
|
|
765
771
|
reservedForOpenOrders: (amount: string) => string;
|
|
772
|
+
positionsValue: string;
|
|
773
|
+
kalshiBalance: string;
|
|
766
774
|
balanceByNetwork: string;
|
|
767
775
|
paperModeNetwork: string;
|
|
768
776
|
paperModeWarning: string;
|
|
@@ -1136,6 +1144,20 @@ interface AggUiLabels {
|
|
|
1136
1144
|
noBidsAboveMinPrice: string;
|
|
1137
1145
|
signInToTrade: string;
|
|
1138
1146
|
deposit: string;
|
|
1147
|
+
addFundsToKalshi: string;
|
|
1148
|
+
fundKalshiModal: {
|
|
1149
|
+
ariaLabel: string;
|
|
1150
|
+
title: string;
|
|
1151
|
+
description: string;
|
|
1152
|
+
howItWorks: string;
|
|
1153
|
+
kalshiLinkLabel: string;
|
|
1154
|
+
kalshiUrl: string;
|
|
1155
|
+
firstStepPrefix: string;
|
|
1156
|
+
firstStepSuffix: string;
|
|
1157
|
+
remainingSteps: [string, string, string];
|
|
1158
|
+
doItLater: string;
|
|
1159
|
+
done: string;
|
|
1160
|
+
};
|
|
1139
1161
|
kycRequired: string;
|
|
1140
1162
|
kycNotVerifiedTooltip: string;
|
|
1141
1163
|
kycVerify: string;
|
|
@@ -1146,6 +1168,10 @@ interface AggUiLabels {
|
|
|
1146
1168
|
kycSuccessTitle: string;
|
|
1147
1169
|
kycSuccessDescription: string;
|
|
1148
1170
|
kycSuccessDone: string;
|
|
1171
|
+
connectKalshi: string;
|
|
1172
|
+
tradingAccessVenues: string;
|
|
1173
|
+
tradingAccessAvailable: string;
|
|
1174
|
+
tradingAccessAddKalshiAccount: string;
|
|
1149
1175
|
outcome: (label: string) => string;
|
|
1150
1176
|
smartRouting: string;
|
|
1151
1177
|
orderTypeMarket: string;
|
|
@@ -1323,6 +1349,11 @@ interface AggUiLabels {
|
|
|
1323
1349
|
cancel: string;
|
|
1324
1350
|
verifyConnection: string;
|
|
1325
1351
|
};
|
|
1352
|
+
success: {
|
|
1353
|
+
title: string;
|
|
1354
|
+
description: string;
|
|
1355
|
+
done: string;
|
|
1356
|
+
};
|
|
1326
1357
|
fallbackError: string;
|
|
1327
1358
|
};
|
|
1328
1359
|
};
|
|
@@ -1372,6 +1403,9 @@ interface AggUiLabels {
|
|
|
1372
1403
|
moreMarketsTitle: string;
|
|
1373
1404
|
gameLinesTab: string;
|
|
1374
1405
|
halvesTab: string;
|
|
1406
|
+
quartersTab: string;
|
|
1407
|
+
setsTab: string;
|
|
1408
|
+
playerPropsTab: string;
|
|
1375
1409
|
exactScoreTab: string;
|
|
1376
1410
|
cornersTab: string;
|
|
1377
1411
|
goalsTab: string;
|
|
@@ -1736,6 +1770,8 @@ interface AggBalanceContextValue {
|
|
|
1736
1770
|
/** Cash currently reserved for pending and open orders. */
|
|
1737
1771
|
reservedBalance: number;
|
|
1738
1772
|
positionsBalanceTotal: number;
|
|
1773
|
+
kalshiBalance: number | null;
|
|
1774
|
+
kalshiPortfolioValue: number | null;
|
|
1739
1775
|
connectedVenues: Venue[];
|
|
1740
1776
|
isLoading: boolean;
|
|
1741
1777
|
error: Error | null;
|
|
@@ -2467,12 +2503,23 @@ declare const getVisibleVenuesByConfig: <TVenue extends {
|
|
|
2467
2503
|
id: string;
|
|
2468
2504
|
}>(venues: readonly TVenue[], disabledVenues?: readonly string[]) => TVenue[];
|
|
2469
2505
|
declare const getVisibleVenueIdsByConfig: <TVenueId extends string>(venueIds: readonly TVenueId[], disabledVenues?: readonly string[]) => TVenueId[];
|
|
2470
|
-
declare const getVenueAvailabilityState: ({ venueId, disabledVenues, isLocationBlocked, }: {
|
|
2506
|
+
declare const getVenueAvailabilityState: ({ venueId, disabledVenues, isConfigLoading, isLocationBlocked, }: {
|
|
2471
2507
|
venueId: string;
|
|
2472
2508
|
disabledVenues?: readonly string[];
|
|
2509
|
+
/**
|
|
2510
|
+
* Treat unresolved app configuration as hidden so venue-specific UI does not
|
|
2511
|
+
* flash before `/app/config` resolves.
|
|
2512
|
+
*/
|
|
2513
|
+
isConfigLoading?: boolean;
|
|
2473
2514
|
isLocationBlocked?: boolean;
|
|
2474
2515
|
}) => VenueAvailabilityState;
|
|
2475
2516
|
|
|
2517
|
+
declare const venueKeyQueryKeys: {
|
|
2518
|
+
all: readonly ["agg", "venue-keys"];
|
|
2519
|
+
status: (venue: Venue$1) => readonly ["agg", "venue-keys", Venue$1, "status"];
|
|
2520
|
+
};
|
|
2521
|
+
declare const useVenueKeyStatus: (venue: Venue$1, enabled?: boolean) => _tanstack_react_query.UseQueryResult<VenueKeyStatus, Error>;
|
|
2522
|
+
|
|
2476
2523
|
interface UseAggAuthOptions {
|
|
2477
2524
|
signMessage?: (message: string) => Promise<string>;
|
|
2478
2525
|
address?: string;
|
|
@@ -4330,6 +4377,14 @@ interface UseSmartRouteOptions {
|
|
|
4330
4377
|
slipCapBps?: number;
|
|
4331
4378
|
/** Include venue-by-venue comparison quotes. */
|
|
4332
4379
|
compareVenues?: boolean;
|
|
4380
|
+
/**
|
|
4381
|
+
* Sell-only cache scope. Position freshness and account identity affect the
|
|
4382
|
+
* server-side sellable inventory even when the requested amount is unchanged.
|
|
4383
|
+
*/
|
|
4384
|
+
sellCacheScope?: {
|
|
4385
|
+
accountId?: string | null;
|
|
4386
|
+
positionVersion?: number | null;
|
|
4387
|
+
};
|
|
4333
4388
|
/**
|
|
4334
4389
|
* Opt in to the deep cost-estimate surface — response `feeBreakdown`
|
|
4335
4390
|
* gains `setupCosts` (chain approvals + Kalshi ATAs) with `alreadyPaid`
|
|
@@ -4383,6 +4438,45 @@ interface UseSmartRouteResult {
|
|
|
4383
4438
|
*/
|
|
4384
4439
|
declare function useSmartRoute(options: UseSmartRouteOptions): UseSmartRouteResult;
|
|
4385
4440
|
|
|
4441
|
+
interface VenueSellQuoteRequest {
|
|
4442
|
+
venue: Venue$1;
|
|
4443
|
+
requestedSellShares: number;
|
|
4444
|
+
sellShares: number;
|
|
4445
|
+
availableShares: number;
|
|
4446
|
+
}
|
|
4447
|
+
interface UseVenueSellQuotesOptions {
|
|
4448
|
+
venueMarketOutcomeId?: string | null;
|
|
4449
|
+
accountId?: string | null;
|
|
4450
|
+
positionVersion?: number | null;
|
|
4451
|
+
requests: VenueSellQuoteRequest[];
|
|
4452
|
+
mode?: ExecutionMode | null;
|
|
4453
|
+
slipCapBps?: number;
|
|
4454
|
+
enabled?: boolean;
|
|
4455
|
+
staleTimeMs?: number;
|
|
4456
|
+
refreshContext?: UseSmartRouteOptions["refreshContext"];
|
|
4457
|
+
}
|
|
4458
|
+
interface VenueSellQuoteResult {
|
|
4459
|
+
request: VenueSellQuoteRequest;
|
|
4460
|
+
data: SmartRouteResponse | null;
|
|
4461
|
+
isLoading: boolean;
|
|
4462
|
+
isFetching: boolean;
|
|
4463
|
+
error: Error | null;
|
|
4464
|
+
refetch: () => Promise<unknown>;
|
|
4465
|
+
}
|
|
4466
|
+
interface UseVenueSellQuotesResult {
|
|
4467
|
+
quotes: VenueSellQuoteResult[];
|
|
4468
|
+
isLoading: boolean;
|
|
4469
|
+
isFetching: boolean;
|
|
4470
|
+
error: Error | null;
|
|
4471
|
+
refetch: () => Promise<unknown>;
|
|
4472
|
+
}
|
|
4473
|
+
/**
|
|
4474
|
+
* Fetches one independently executable SELL quote for every eligible venue.
|
|
4475
|
+
* Each query owns its quoteId and is cache-scoped to the exact account,
|
|
4476
|
+
* position snapshot, venue, requested amount, and clamped venue amount.
|
|
4477
|
+
*/
|
|
4478
|
+
declare const useVenueSellQuotes: (options: UseVenueSellQuotesOptions) => UseVenueSellQuotesResult;
|
|
4479
|
+
|
|
4386
4480
|
interface UseUserHoldingsOptions {
|
|
4387
4481
|
venue: Venue;
|
|
4388
4482
|
venueMarketId?: string;
|
|
@@ -5839,4 +5933,4 @@ declare function useAppConfig(): UseAppConfigResult;
|
|
|
5839
5933
|
*/
|
|
5840
5934
|
declare function useCachedAppConfig(): UseAppConfigResult;
|
|
5841
5935
|
|
|
5842
|
-
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 UseCancelManagedOrderOptions, 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 UsePlaceLimitOrderOptions, 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, useCancelManagedOrder, 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, usePlaceLimitOrder, usePositions, useQuoteManaged, useRampQuotes, useRampSession, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueMarketMidpoints, useVenueMarkets, useViewportMidpoints, useVisibleIds, userActivityQueryKeys };
|
|
5936
|
+
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 UseCancelManagedOrderOptions, 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 UsePlaceLimitOrderOptions, 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 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, 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, useCancelManagedOrder, 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, usePlaceLimitOrder, usePositions, useQuoteManaged, useRampQuotes, useRampSession, useRedeem, useRedeemEligibleCount, useRedeemLifecycle, useRedeemLifecycles, useRollingChartWindow, useSdkLabels, useSdkUiConfig, useSearch, useSmartRoute, useUserActivity, useUserHoldings, useVenueEvent, useVenueEvents, useVenueKeyStatus, useVenueMarketMidpoints, useVenueMarkets, useVenueSellQuotes, useViewportMidpoints, useVisibleIds, userActivityQueryKeys, venueKeyQueryKeys };
|