@liberfi.io/ui-predict 0.1.82 → 0.1.83
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 +25 -27
- package/dist/index.d.ts +25 -27
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPage, PredictPosition } from '@liberfi.io/react-predict';
|
|
3
|
-
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, 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, useBalance, useCancelOrder, useCandlesticks, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
|
|
3
|
+
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, 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, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, 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';
|
|
6
6
|
import { PropsWithChildren } from 'react';
|
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
declare const _default: "0.1.
|
|
15
|
+
declare const _default: "0.1.83";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* A single category entry in the static navigation model.
|
|
@@ -237,6 +237,7 @@ declare function EventDetailPage({ eventSlug, source, chain, walletAddress, onSi
|
|
|
237
237
|
|
|
238
238
|
type TradeOutcome = "yes" | "no";
|
|
239
239
|
type TradeSide = "buy" | "sell";
|
|
240
|
+
type OrderType = "market" | "limit";
|
|
240
241
|
interface TradeFormValidation {
|
|
241
242
|
isValid: boolean;
|
|
242
243
|
errors: string[];
|
|
@@ -250,7 +251,9 @@ interface UseTradeFormParams {
|
|
|
250
251
|
interface UseTradeFormResult {
|
|
251
252
|
outcome: TradeOutcome;
|
|
252
253
|
side: TradeSide;
|
|
254
|
+
orderType: OrderType;
|
|
253
255
|
quantity: number;
|
|
256
|
+
limitPrice: number;
|
|
254
257
|
estimatedCost: number;
|
|
255
258
|
potentialPayout: number;
|
|
256
259
|
potentialProfit: number;
|
|
@@ -260,12 +263,17 @@ interface UseTradeFormResult {
|
|
|
260
263
|
isBalanceLoading: boolean;
|
|
261
264
|
isSubmitting: boolean;
|
|
262
265
|
validation: TradeFormValidation;
|
|
266
|
+
supportsLimitOrder: boolean;
|
|
267
|
+
kycRequired: boolean;
|
|
268
|
+
kycUrl: string | null;
|
|
263
269
|
setOutcome: (outcome: TradeOutcome) => void;
|
|
264
270
|
setSide: (side: TradeSide) => void;
|
|
271
|
+
setOrderType: (type: OrderType) => void;
|
|
265
272
|
setQuantity: (quantity: number) => void;
|
|
273
|
+
setLimitPrice: (price: number) => void;
|
|
266
274
|
submit: () => void;
|
|
267
275
|
}
|
|
268
|
-
declare function useTradeForm({ market,
|
|
276
|
+
declare function useTradeForm({ market, initialOutcome, initialSide, }: UseTradeFormParams): UseTradeFormResult;
|
|
269
277
|
|
|
270
278
|
interface EventDetailUIProps {
|
|
271
279
|
event: PredictEvent;
|
|
@@ -407,46 +415,34 @@ interface StandardMarket {
|
|
|
407
415
|
}
|
|
408
416
|
|
|
409
417
|
interface TradeFormUIProps {
|
|
410
|
-
/** Event data */
|
|
411
418
|
event?: StandardEvent;
|
|
412
|
-
/** Market data */
|
|
413
419
|
market: StandardMarket;
|
|
414
|
-
/** Current outcome */
|
|
415
420
|
outcome: TradeOutcome;
|
|
416
|
-
/** Current side */
|
|
417
421
|
side: TradeSide;
|
|
418
|
-
|
|
422
|
+
orderType: OrderType;
|
|
419
423
|
quantity: number;
|
|
420
|
-
|
|
424
|
+
limitPrice: number;
|
|
421
425
|
estimatedCost: number;
|
|
422
|
-
/** Potential payout in cents */
|
|
423
426
|
potentialPayout: number;
|
|
424
|
-
/** Potential profit in cents */
|
|
425
427
|
potentialProfit: number;
|
|
426
|
-
/** Whether swap is being submitted */
|
|
427
428
|
isSubmitting: boolean;
|
|
428
|
-
/** USDC balance in dollars (null if not loaded) */
|
|
429
429
|
usdcBalance: number | null;
|
|
430
|
-
/** Yes token balance (shares held, for sell side) */
|
|
431
430
|
yesTokenBalance: number | null;
|
|
432
|
-
/** No token balance (shares held, for sell side) */
|
|
433
431
|
noTokenBalance: number | null;
|
|
434
|
-
/** Whether balance is loading */
|
|
435
432
|
isBalanceLoading: boolean;
|
|
436
|
-
/** Whether the form is valid */
|
|
437
433
|
isValid: boolean;
|
|
438
|
-
/** Validation error messages */
|
|
439
434
|
validationErrors: string[];
|
|
440
|
-
|
|
435
|
+
supportsLimitOrder: boolean;
|
|
436
|
+
kycRequired: boolean;
|
|
437
|
+
kycUrl: string | null;
|
|
441
438
|
onOutcomeChange: (outcome: TradeOutcome) => void;
|
|
442
|
-
/** Set side */
|
|
443
439
|
onSideChange: (side: TradeSide) => void;
|
|
444
|
-
|
|
440
|
+
onOrderTypeChange: (type: OrderType) => void;
|
|
445
441
|
onQuantityChange: (quantity: number) => void;
|
|
446
|
-
|
|
442
|
+
onLimitPriceChange: (price: number) => void;
|
|
447
443
|
onSubmit: () => void;
|
|
448
444
|
}
|
|
449
|
-
declare function TradeFormUI({ event, market, outcome, side, quantity, potentialProfit, estimatedCost, usdcBalance, yesTokenBalance, noTokenBalance, isBalanceLoading, isSubmitting, isValid, onOutcomeChange, onSideChange, onQuantityChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
445
|
+
declare function TradeFormUI({ event, market, outcome, side, orderType, quantity, limitPrice, potentialProfit, estimatedCost, usdcBalance, yesTokenBalance, noTokenBalance, isBalanceLoading, isSubmitting, isValid, supportsLimitOrder, kycRequired, kycUrl, onOutcomeChange, onSideChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
450
446
|
|
|
451
447
|
interface TradeFormWidgetProps {
|
|
452
448
|
event?: PredictEvent;
|
|
@@ -684,17 +680,19 @@ declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, nu
|
|
|
684
680
|
|
|
685
681
|
interface UserPredictContextValue {
|
|
686
682
|
positions: PredictPosition[];
|
|
687
|
-
|
|
683
|
+
dflowUsdcBalance: number;
|
|
684
|
+
polymarketUsdcBalance: number;
|
|
688
685
|
isLoading: boolean;
|
|
689
686
|
error: Error | null;
|
|
690
687
|
refetch: () => void;
|
|
691
688
|
}
|
|
692
689
|
type UserPredictProviderProps = PropsWithChildren<{
|
|
693
|
-
|
|
690
|
+
solanaWalletAddress?: string;
|
|
691
|
+
evmWalletAddress?: string;
|
|
694
692
|
source?: ProviderSource;
|
|
695
693
|
pollingInterval?: number;
|
|
696
694
|
enabled?: boolean;
|
|
697
695
|
}>;
|
|
698
|
-
declare function UserPredictProvider({
|
|
696
|
+
declare function UserPredictProvider({ solanaWalletAddress, evmWalletAddress, source, pollingInterval, enabled, children, }: UserPredictProviderProps): react_jsx_runtime.JSX.Element;
|
|
699
697
|
|
|
700
|
-
export { CHART_RANGE_DURATION, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategoryItem, type CategoryListItem, type CategoryTagItem, ChartRange, type ChartRangeType, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItem, type EventItemProps, EventMarketDepthChartUI, type EventMarketDepthChartUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventPriceChart, type EventPriceChartProps, type EventsFilterState, EventsFilterUI, type EventsFilterUIProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, MAX_PRICE_HISTORY_MARKETS, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_PRICE_STEP, PREDICT_SEARCH_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, PriceHistoryInterval, type PriceHistoryIntervalType, SORT_PRESETS, STATIC_CATEGORIES, SearchEventsButton, type SearchEventsButtonProps, SearchHistoryUI, type SearchHistoryUIProps, SearchHistoryWidget, type SearchHistoryWidgetProps, SearchInputUI, type SearchInputUIProps, SearchResultItemUI, type SearchResultItemUIProps, SearchResultListWidget, type SearchResultListWidgetProps, SearchWidget, type SearchWidgetProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, type TagItem, type TagSlugSelection, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, type TradeOutcome, type TradeSide, type UseEventDetailParams, type UseEventsInfiniteParams, type UseEventsInfiniteResult, type UseSearchResultListScriptParams, type UseSearchScriptParams, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, type UserPredictContextValue, UserPredictProvider, type UserPredictProviderProps, countActiveFilters, formatWan, useEventDetail, useEventsInfinite, usePredictSearchHistory, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };
|
|
698
|
+
export { CHART_RANGE_DURATION, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategoryItem, type CategoryListItem, type CategoryTagItem, ChartRange, type ChartRangeType, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItem, type EventItemProps, EventMarketDepthChartUI, type EventMarketDepthChartUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventPriceChart, type EventPriceChartProps, type EventsFilterState, EventsFilterUI, type EventsFilterUIProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, MAX_PRICE_HISTORY_MARKETS, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_PRICE_STEP, type OrderType, PREDICT_SEARCH_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, PriceHistoryInterval, type PriceHistoryIntervalType, SORT_PRESETS, STATIC_CATEGORIES, SearchEventsButton, type SearchEventsButtonProps, SearchHistoryUI, type SearchHistoryUIProps, SearchHistoryWidget, type SearchHistoryWidgetProps, SearchInputUI, type SearchInputUIProps, SearchResultItemUI, type SearchResultItemUIProps, SearchResultListWidget, type SearchResultListWidgetProps, SearchWidget, type SearchWidgetProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, type TagItem, type TagSlugSelection, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, type TradeOutcome, type TradeSide, type UseEventDetailParams, type UseEventsInfiniteParams, type UseEventsInfiniteResult, type UseSearchResultListScriptParams, type UseSearchScriptParams, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, type UserPredictContextValue, UserPredictProvider, type UserPredictProviderProps, countActiveFilters, formatWan, useEventDetail, useEventsInfinite, usePredictSearchHistory, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPage, PredictPosition } from '@liberfi.io/react-predict';
|
|
3
|
-
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, 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, useBalance, useCancelOrder, useCandlesticks, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
|
|
3
|
+
export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, 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, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, 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';
|
|
6
6
|
import { PropsWithChildren } from 'react';
|
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
declare const _default: "0.1.
|
|
15
|
+
declare const _default: "0.1.83";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* A single category entry in the static navigation model.
|
|
@@ -237,6 +237,7 @@ declare function EventDetailPage({ eventSlug, source, chain, walletAddress, onSi
|
|
|
237
237
|
|
|
238
238
|
type TradeOutcome = "yes" | "no";
|
|
239
239
|
type TradeSide = "buy" | "sell";
|
|
240
|
+
type OrderType = "market" | "limit";
|
|
240
241
|
interface TradeFormValidation {
|
|
241
242
|
isValid: boolean;
|
|
242
243
|
errors: string[];
|
|
@@ -250,7 +251,9 @@ interface UseTradeFormParams {
|
|
|
250
251
|
interface UseTradeFormResult {
|
|
251
252
|
outcome: TradeOutcome;
|
|
252
253
|
side: TradeSide;
|
|
254
|
+
orderType: OrderType;
|
|
253
255
|
quantity: number;
|
|
256
|
+
limitPrice: number;
|
|
254
257
|
estimatedCost: number;
|
|
255
258
|
potentialPayout: number;
|
|
256
259
|
potentialProfit: number;
|
|
@@ -260,12 +263,17 @@ interface UseTradeFormResult {
|
|
|
260
263
|
isBalanceLoading: boolean;
|
|
261
264
|
isSubmitting: boolean;
|
|
262
265
|
validation: TradeFormValidation;
|
|
266
|
+
supportsLimitOrder: boolean;
|
|
267
|
+
kycRequired: boolean;
|
|
268
|
+
kycUrl: string | null;
|
|
263
269
|
setOutcome: (outcome: TradeOutcome) => void;
|
|
264
270
|
setSide: (side: TradeSide) => void;
|
|
271
|
+
setOrderType: (type: OrderType) => void;
|
|
265
272
|
setQuantity: (quantity: number) => void;
|
|
273
|
+
setLimitPrice: (price: number) => void;
|
|
266
274
|
submit: () => void;
|
|
267
275
|
}
|
|
268
|
-
declare function useTradeForm({ market,
|
|
276
|
+
declare function useTradeForm({ market, initialOutcome, initialSide, }: UseTradeFormParams): UseTradeFormResult;
|
|
269
277
|
|
|
270
278
|
interface EventDetailUIProps {
|
|
271
279
|
event: PredictEvent;
|
|
@@ -407,46 +415,34 @@ interface StandardMarket {
|
|
|
407
415
|
}
|
|
408
416
|
|
|
409
417
|
interface TradeFormUIProps {
|
|
410
|
-
/** Event data */
|
|
411
418
|
event?: StandardEvent;
|
|
412
|
-
/** Market data */
|
|
413
419
|
market: StandardMarket;
|
|
414
|
-
/** Current outcome */
|
|
415
420
|
outcome: TradeOutcome;
|
|
416
|
-
/** Current side */
|
|
417
421
|
side: TradeSide;
|
|
418
|
-
|
|
422
|
+
orderType: OrderType;
|
|
419
423
|
quantity: number;
|
|
420
|
-
|
|
424
|
+
limitPrice: number;
|
|
421
425
|
estimatedCost: number;
|
|
422
|
-
/** Potential payout in cents */
|
|
423
426
|
potentialPayout: number;
|
|
424
|
-
/** Potential profit in cents */
|
|
425
427
|
potentialProfit: number;
|
|
426
|
-
/** Whether swap is being submitted */
|
|
427
428
|
isSubmitting: boolean;
|
|
428
|
-
/** USDC balance in dollars (null if not loaded) */
|
|
429
429
|
usdcBalance: number | null;
|
|
430
|
-
/** Yes token balance (shares held, for sell side) */
|
|
431
430
|
yesTokenBalance: number | null;
|
|
432
|
-
/** No token balance (shares held, for sell side) */
|
|
433
431
|
noTokenBalance: number | null;
|
|
434
|
-
/** Whether balance is loading */
|
|
435
432
|
isBalanceLoading: boolean;
|
|
436
|
-
/** Whether the form is valid */
|
|
437
433
|
isValid: boolean;
|
|
438
|
-
/** Validation error messages */
|
|
439
434
|
validationErrors: string[];
|
|
440
|
-
|
|
435
|
+
supportsLimitOrder: boolean;
|
|
436
|
+
kycRequired: boolean;
|
|
437
|
+
kycUrl: string | null;
|
|
441
438
|
onOutcomeChange: (outcome: TradeOutcome) => void;
|
|
442
|
-
/** Set side */
|
|
443
439
|
onSideChange: (side: TradeSide) => void;
|
|
444
|
-
|
|
440
|
+
onOrderTypeChange: (type: OrderType) => void;
|
|
445
441
|
onQuantityChange: (quantity: number) => void;
|
|
446
|
-
|
|
442
|
+
onLimitPriceChange: (price: number) => void;
|
|
447
443
|
onSubmit: () => void;
|
|
448
444
|
}
|
|
449
|
-
declare function TradeFormUI({ event, market, outcome, side, quantity, potentialProfit, estimatedCost, usdcBalance, yesTokenBalance, noTokenBalance, isBalanceLoading, isSubmitting, isValid, onOutcomeChange, onSideChange, onQuantityChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
445
|
+
declare function TradeFormUI({ event, market, outcome, side, orderType, quantity, limitPrice, potentialProfit, estimatedCost, usdcBalance, yesTokenBalance, noTokenBalance, isBalanceLoading, isSubmitting, isValid, supportsLimitOrder, kycRequired, kycUrl, onOutcomeChange, onSideChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
450
446
|
|
|
451
447
|
interface TradeFormWidgetProps {
|
|
452
448
|
event?: PredictEvent;
|
|
@@ -684,17 +680,19 @@ declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, nu
|
|
|
684
680
|
|
|
685
681
|
interface UserPredictContextValue {
|
|
686
682
|
positions: PredictPosition[];
|
|
687
|
-
|
|
683
|
+
dflowUsdcBalance: number;
|
|
684
|
+
polymarketUsdcBalance: number;
|
|
688
685
|
isLoading: boolean;
|
|
689
686
|
error: Error | null;
|
|
690
687
|
refetch: () => void;
|
|
691
688
|
}
|
|
692
689
|
type UserPredictProviderProps = PropsWithChildren<{
|
|
693
|
-
|
|
690
|
+
solanaWalletAddress?: string;
|
|
691
|
+
evmWalletAddress?: string;
|
|
694
692
|
source?: ProviderSource;
|
|
695
693
|
pollingInterval?: number;
|
|
696
694
|
enabled?: boolean;
|
|
697
695
|
}>;
|
|
698
|
-
declare function UserPredictProvider({
|
|
696
|
+
declare function UserPredictProvider({ solanaWalletAddress, evmWalletAddress, source, pollingInterval, enabled, children, }: UserPredictProviderProps): react_jsx_runtime.JSX.Element;
|
|
699
697
|
|
|
700
|
-
export { CHART_RANGE_DURATION, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategoryItem, type CategoryListItem, type CategoryTagItem, ChartRange, type ChartRangeType, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItem, type EventItemProps, EventMarketDepthChartUI, type EventMarketDepthChartUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventPriceChart, type EventPriceChartProps, type EventsFilterState, EventsFilterUI, type EventsFilterUIProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, MAX_PRICE_HISTORY_MARKETS, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_PRICE_STEP, PREDICT_SEARCH_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, PriceHistoryInterval, type PriceHistoryIntervalType, SORT_PRESETS, STATIC_CATEGORIES, SearchEventsButton, type SearchEventsButtonProps, SearchHistoryUI, type SearchHistoryUIProps, SearchHistoryWidget, type SearchHistoryWidgetProps, SearchInputUI, type SearchInputUIProps, SearchResultItemUI, type SearchResultItemUIProps, SearchResultListWidget, type SearchResultListWidgetProps, SearchWidget, type SearchWidgetProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, type TagItem, type TagSlugSelection, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, type TradeOutcome, type TradeSide, type UseEventDetailParams, type UseEventsInfiniteParams, type UseEventsInfiniteResult, type UseSearchResultListScriptParams, type UseSearchScriptParams, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, type UserPredictContextValue, UserPredictProvider, type UserPredictProviderProps, countActiveFilters, formatWan, useEventDetail, useEventsInfinite, usePredictSearchHistory, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };
|
|
698
|
+
export { CHART_RANGE_DURATION, CHART_RANGE_PERIOD, CHART_RANGE_SAMPLE_INTERVAL, CandlestickPeriod, type CandlestickPeriodType, CategoriesSkeleton, CategoriesUI, type CategoriesUIProps, CategoriesWidget, type CategoriesWidgetProps, type CategoryItem, type CategoryListItem, type CategoryTagItem, ChartRange, type ChartRangeType, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, EventDetailPage, type EventDetailPageProps, EventDetailSkeleton, type EventDetailSkeletonProps, EventDetailUI, type EventDetailUIProps, EventDetailWidget, type EventDetailWidgetProps, EventItem, type EventItemProps, EventMarketDepthChartUI, type EventMarketDepthChartUIProps, EventMarketDetailWidget, type EventMarketDetailWidgetProps, EventPriceChart, type EventPriceChartProps, type EventsFilterState, EventsFilterUI, type EventsFilterUIProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, MAX_PRICE_HISTORY_MARKETS, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_PRICE_STEP, type OrderType, PREDICT_SEARCH_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, PriceHistoryInterval, type PriceHistoryIntervalType, SORT_PRESETS, STATIC_CATEGORIES, SearchEventsButton, type SearchEventsButtonProps, SearchHistoryUI, type SearchHistoryUIProps, SearchHistoryWidget, type SearchHistoryWidgetProps, SearchInputUI, type SearchInputUIProps, SearchResultItemUI, type SearchResultItemUIProps, SearchResultListWidget, type SearchResultListWidgetProps, SearchWidget, type SearchWidgetProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, type TagItem, type TagSlugSelection, TradeFormSkeleton, TradeFormUI, type TradeFormUIProps, type TradeFormValidation, TradeFormWidget, type TradeFormWidgetProps, type TradeOutcome, type TradeSide, type UseEventDetailParams, type UseEventsInfiniteParams, type UseEventsInfiniteResult, type UseSearchResultListScriptParams, type UseSearchScriptParams, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, type UserPredictContextValue, UserPredictProvider, type UserPredictProviderProps, countActiveFilters, formatWan, useEventDetail, useEventsInfinite, usePredictSearchHistory, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };
|