@liberfi.io/ui-predict 4.0.33 → 4.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +50 -6
- package/dist/index.d.ts +50 -6
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictComment, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup } from '@liberfi.io/react-predict';
|
|
2
|
+
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictComment, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup, PolymarketWalletKind } from '@liberfi.io/react-predict';
|
|
3
3
|
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, PolymarketRedeemInput, PolymarketRedeemResponse, PositionsResponse, PredictClient, PredictContext, PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictPosition, PredictProvider, PredictProviderProps, PredictTag, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, PricePoint, ProviderMeta, ProviderSource, ResolveEventsParamsInput, SettlementSource, SimilarEventsParams, TradeType, createPredictClient, createPredictWsClient, eventStatsQueryKey, fetchMatchMarketsPage, fetchMatchesPage, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useRedeemPosition, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
|
|
4
4
|
import { LinkComponentType } from '@liberfi.io/ui';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -96,8 +96,13 @@ interface EventsFilterState {
|
|
|
96
96
|
minLiquidity?: string;
|
|
97
97
|
}
|
|
98
98
|
declare const DEFAULT_FILTER_STATE: EventsFilterState;
|
|
99
|
-
/**
|
|
100
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Count how many non-default filters are active (excluding sortPreset).
|
|
101
|
+
*
|
|
102
|
+
* When `enableKalshi` is false the platform filter is hidden and `source` is
|
|
103
|
+
* pinned to a fixed provider, so it must not be counted as an active filter.
|
|
104
|
+
*/
|
|
105
|
+
declare function countActiveFilters(state: EventsFilterState, enableKalshi?: boolean): number;
|
|
101
106
|
interface EventsFilterUIProps {
|
|
102
107
|
/** Whether the modal is open */
|
|
103
108
|
isOpen: boolean;
|
|
@@ -107,8 +112,14 @@ interface EventsFilterUIProps {
|
|
|
107
112
|
value: EventsFilterState;
|
|
108
113
|
/** Callback when "Show Results" is pressed with the new filter state */
|
|
109
114
|
onChange: (state: EventsFilterState) => void;
|
|
115
|
+
/**
|
|
116
|
+
* When false, the Kalshi venue is disabled app-wide: the platform filter
|
|
117
|
+
* section is hidden and resetting keeps `source` pinned to Polymarket.
|
|
118
|
+
* Defaults to true.
|
|
119
|
+
*/
|
|
120
|
+
enableKalshi?: boolean;
|
|
110
121
|
}
|
|
111
|
-
declare function EventsFilterUI({ isOpen, onClose, value, onChange, }: EventsFilterUIProps): react_jsx_runtime.JSX.Element;
|
|
122
|
+
declare function EventsFilterUI({ isOpen, onClose, value, onChange, enableKalshi, }: EventsFilterUIProps): react_jsx_runtime.JSX.Element;
|
|
112
123
|
|
|
113
124
|
interface EventsPageProps {
|
|
114
125
|
/** Callback when an event card is selected */
|
|
@@ -129,8 +140,14 @@ interface EventsPageProps {
|
|
|
129
140
|
* market's source. Use this to open a Fund Wallet / deposit flow.
|
|
130
141
|
*/
|
|
131
142
|
onInsufficientBalance?: (source: ProviderSource) => void;
|
|
143
|
+
/**
|
|
144
|
+
* When false, the Kalshi venue is disabled: the events list defaults to
|
|
145
|
+
* querying Polymarket only and the platform (Kalshi / Polymarket) filter is
|
|
146
|
+
* hidden. Defaults to true.
|
|
147
|
+
*/
|
|
148
|
+
enableKalshi?: boolean;
|
|
132
149
|
}
|
|
133
|
-
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
150
|
+
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
134
151
|
|
|
135
152
|
interface EventsWidgetProps {
|
|
136
153
|
/** Category / tag selection from the categories widget. */
|
|
@@ -1213,6 +1230,15 @@ interface SetupModalProps {
|
|
|
1213
1230
|
isOpen: boolean;
|
|
1214
1231
|
onClose: () => void;
|
|
1215
1232
|
evmAddress: string;
|
|
1233
|
+
/**
|
|
1234
|
+
* Which Polymarket wallet model is being set up. `deposit` wallets deploy
|
|
1235
|
+
* gaslessly server-side (no signature) and only require one approval
|
|
1236
|
+
* signature; `safe` wallets require a deploy signature + an approval
|
|
1237
|
+
* signature. Informational only — the actual deploy path is decided by the
|
|
1238
|
+
* caller-provided `onDeployAndApprove`; this modal does not branch on it.
|
|
1239
|
+
*/
|
|
1240
|
+
walletKind?: "safe" | "deposit";
|
|
1241
|
+
/** Whether the active wallet (Safe or deposit wallet) is deployed. */
|
|
1216
1242
|
safeDeployed: boolean;
|
|
1217
1243
|
tokenApproved: boolean;
|
|
1218
1244
|
onDeployAndApprove: () => Promise<void>;
|
|
@@ -1224,7 +1250,25 @@ interface PredictWalletContextValue {
|
|
|
1224
1250
|
solanaAddress: string | undefined;
|
|
1225
1251
|
/** Connected EVM wallet address (for Polymarket). */
|
|
1226
1252
|
evmAddress: string | undefined;
|
|
1227
|
-
/**
|
|
1253
|
+
/**
|
|
1254
|
+
* Which Polymarket wallet model the user is on:
|
|
1255
|
+
* - `safe`: legacy Gnosis Safe (signatureType=2, USDC.e).
|
|
1256
|
+
* - `deposit`: CLOB V2 deposit wallet (signatureType=3 / POLY_1271, pUSD).
|
|
1257
|
+
*/
|
|
1258
|
+
polymarketWalletKind: PolymarketWalletKind | undefined;
|
|
1259
|
+
/**
|
|
1260
|
+
* Active Polymarket wallet address the app should use as the order funder
|
|
1261
|
+
* (deposit wallet for `deposit`, Safe for `safe`).
|
|
1262
|
+
*/
|
|
1263
|
+
polymarketWalletAddress: string | undefined;
|
|
1264
|
+
/** Polymarket CLOB V2 deposit wallet address (when on the deposit path). */
|
|
1265
|
+
polymarketDepositWalletAddress: string | undefined;
|
|
1266
|
+
/** Whether the active Polymarket wallet has been deployed on Polygon. */
|
|
1267
|
+
polymarketWalletDeployed: boolean;
|
|
1268
|
+
/**
|
|
1269
|
+
* Polymarket Safe (proxy) wallet address, derived from EOA via CREATE2.
|
|
1270
|
+
* @deprecated Prefer `polymarketWalletAddress`; kept for backward compat.
|
|
1271
|
+
*/
|
|
1228
1272
|
polymarketSafeAddress: string | undefined;
|
|
1229
1273
|
/** `null` when no wallet is connected or data has not loaded yet. */
|
|
1230
1274
|
kalshiUsdcBalance: number | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictComment, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup } from '@liberfi.io/react-predict';
|
|
2
|
+
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictComment, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup, PolymarketWalletKind } from '@liberfi.io/react-predict';
|
|
3
3
|
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, PolymarketRedeemInput, PolymarketRedeemResponse, PositionsResponse, PredictClient, PredictContext, PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictPosition, PredictProvider, PredictProviderProps, PredictTag, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, PricePoint, ProviderMeta, ProviderSource, ResolveEventsParamsInput, SettlementSource, SimilarEventsParams, TradeType, createPredictClient, createPredictWsClient, eventStatsQueryKey, fetchMatchMarketsPage, fetchMatchesPage, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useRedeemPosition, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
|
|
4
4
|
import { LinkComponentType } from '@liberfi.io/ui';
|
|
5
5
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -96,8 +96,13 @@ interface EventsFilterState {
|
|
|
96
96
|
minLiquidity?: string;
|
|
97
97
|
}
|
|
98
98
|
declare const DEFAULT_FILTER_STATE: EventsFilterState;
|
|
99
|
-
/**
|
|
100
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Count how many non-default filters are active (excluding sortPreset).
|
|
101
|
+
*
|
|
102
|
+
* When `enableKalshi` is false the platform filter is hidden and `source` is
|
|
103
|
+
* pinned to a fixed provider, so it must not be counted as an active filter.
|
|
104
|
+
*/
|
|
105
|
+
declare function countActiveFilters(state: EventsFilterState, enableKalshi?: boolean): number;
|
|
101
106
|
interface EventsFilterUIProps {
|
|
102
107
|
/** Whether the modal is open */
|
|
103
108
|
isOpen: boolean;
|
|
@@ -107,8 +112,14 @@ interface EventsFilterUIProps {
|
|
|
107
112
|
value: EventsFilterState;
|
|
108
113
|
/** Callback when "Show Results" is pressed with the new filter state */
|
|
109
114
|
onChange: (state: EventsFilterState) => void;
|
|
115
|
+
/**
|
|
116
|
+
* When false, the Kalshi venue is disabled app-wide: the platform filter
|
|
117
|
+
* section is hidden and resetting keeps `source` pinned to Polymarket.
|
|
118
|
+
* Defaults to true.
|
|
119
|
+
*/
|
|
120
|
+
enableKalshi?: boolean;
|
|
110
121
|
}
|
|
111
|
-
declare function EventsFilterUI({ isOpen, onClose, value, onChange, }: EventsFilterUIProps): react_jsx_runtime.JSX.Element;
|
|
122
|
+
declare function EventsFilterUI({ isOpen, onClose, value, onChange, enableKalshi, }: EventsFilterUIProps): react_jsx_runtime.JSX.Element;
|
|
112
123
|
|
|
113
124
|
interface EventsPageProps {
|
|
114
125
|
/** Callback when an event card is selected */
|
|
@@ -129,8 +140,14 @@ interface EventsPageProps {
|
|
|
129
140
|
* market's source. Use this to open a Fund Wallet / deposit flow.
|
|
130
141
|
*/
|
|
131
142
|
onInsufficientBalance?: (source: ProviderSource) => void;
|
|
143
|
+
/**
|
|
144
|
+
* When false, the Kalshi venue is disabled: the events list defaults to
|
|
145
|
+
* querying Polymarket only and the platform (Kalshi / Polymarket) filter is
|
|
146
|
+
* hidden. Defaults to true.
|
|
147
|
+
*/
|
|
148
|
+
enableKalshi?: boolean;
|
|
132
149
|
}
|
|
133
|
-
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
150
|
+
declare function EventsPage({ onSelect, onSelectOutcome, getEventHref, LinkComponent, onHover, bgImageSrc: _bgImageSrc, onInsufficientBalance, enableKalshi, }: EventsPageProps): react_jsx_runtime.JSX.Element;
|
|
134
151
|
|
|
135
152
|
interface EventsWidgetProps {
|
|
136
153
|
/** Category / tag selection from the categories widget. */
|
|
@@ -1213,6 +1230,15 @@ interface SetupModalProps {
|
|
|
1213
1230
|
isOpen: boolean;
|
|
1214
1231
|
onClose: () => void;
|
|
1215
1232
|
evmAddress: string;
|
|
1233
|
+
/**
|
|
1234
|
+
* Which Polymarket wallet model is being set up. `deposit` wallets deploy
|
|
1235
|
+
* gaslessly server-side (no signature) and only require one approval
|
|
1236
|
+
* signature; `safe` wallets require a deploy signature + an approval
|
|
1237
|
+
* signature. Informational only — the actual deploy path is decided by the
|
|
1238
|
+
* caller-provided `onDeployAndApprove`; this modal does not branch on it.
|
|
1239
|
+
*/
|
|
1240
|
+
walletKind?: "safe" | "deposit";
|
|
1241
|
+
/** Whether the active wallet (Safe or deposit wallet) is deployed. */
|
|
1216
1242
|
safeDeployed: boolean;
|
|
1217
1243
|
tokenApproved: boolean;
|
|
1218
1244
|
onDeployAndApprove: () => Promise<void>;
|
|
@@ -1224,7 +1250,25 @@ interface PredictWalletContextValue {
|
|
|
1224
1250
|
solanaAddress: string | undefined;
|
|
1225
1251
|
/** Connected EVM wallet address (for Polymarket). */
|
|
1226
1252
|
evmAddress: string | undefined;
|
|
1227
|
-
/**
|
|
1253
|
+
/**
|
|
1254
|
+
* Which Polymarket wallet model the user is on:
|
|
1255
|
+
* - `safe`: legacy Gnosis Safe (signatureType=2, USDC.e).
|
|
1256
|
+
* - `deposit`: CLOB V2 deposit wallet (signatureType=3 / POLY_1271, pUSD).
|
|
1257
|
+
*/
|
|
1258
|
+
polymarketWalletKind: PolymarketWalletKind | undefined;
|
|
1259
|
+
/**
|
|
1260
|
+
* Active Polymarket wallet address the app should use as the order funder
|
|
1261
|
+
* (deposit wallet for `deposit`, Safe for `safe`).
|
|
1262
|
+
*/
|
|
1263
|
+
polymarketWalletAddress: string | undefined;
|
|
1264
|
+
/** Polymarket CLOB V2 deposit wallet address (when on the deposit path). */
|
|
1265
|
+
polymarketDepositWalletAddress: string | undefined;
|
|
1266
|
+
/** Whether the active Polymarket wallet has been deployed on Polygon. */
|
|
1267
|
+
polymarketWalletDeployed: boolean;
|
|
1268
|
+
/**
|
|
1269
|
+
* Polymarket Safe (proxy) wallet address, derived from EOA via CREATE2.
|
|
1270
|
+
* @deprecated Prefer `polymarketWalletAddress`; kept for backward compat.
|
|
1271
|
+
*/
|
|
1228
1272
|
polymarketSafeAddress: string | undefined;
|
|
1229
1273
|
/** `null` when no wallet is connected or data has not loaded yet. */
|
|
1230
1274
|
kalshiUsdcBalance: number | null;
|