@liberfi.io/ui-predict 4.0.45 → 4.0.47
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 +55 -2
- package/dist/index.d.ts +55 -2
- 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
|
@@ -312,6 +312,49 @@ declare function roundToTickSize(price: number, tickSize: string): number;
|
|
|
312
312
|
* Floor a number to the given number of decimal places (never rounds up).
|
|
313
313
|
*/
|
|
314
314
|
declare function floorToDecimals(value: number, decimals: number): number;
|
|
315
|
+
/**
|
|
316
|
+
* Price-dependent factor in Polymarket's taker-fee formula:
|
|
317
|
+
* `min(1, (1 − price) / price)` (equivalently `min(price, 1−price) / price`).
|
|
318
|
+
* Capped at 1 (the worst case, reached when `price ≤ 0.5`). Falls back to the
|
|
319
|
+
* worst case (1) when the price is unknown/degenerate.
|
|
320
|
+
*/
|
|
321
|
+
declare function polymarketFeeFactor(pricePerShare: number): number;
|
|
322
|
+
interface ComputeMaxBuyAmountParams {
|
|
323
|
+
source: string;
|
|
324
|
+
usdcBalance: number | null | undefined;
|
|
325
|
+
safetyBufferUsd?: number;
|
|
326
|
+
/**
|
|
327
|
+
* Polymarket base fee in basis points (from `GET /fee-rate/{token_id}`).
|
|
328
|
+
* Polymarket reserves a taker fee on top of the order amount, so the largest
|
|
329
|
+
* spendable amount must leave room for it. Defaults to 0 (fee-free markets).
|
|
330
|
+
*/
|
|
331
|
+
feeRateBps?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Per-share price (0–1) used to price the fee precisely. Omit to reserve the
|
|
334
|
+
* worst-case fee (factor = 1). Safe for buys: adverse fills push the price up,
|
|
335
|
+
* which only lowers the fee factor.
|
|
336
|
+
*/
|
|
337
|
+
pricePerShare?: number;
|
|
338
|
+
}
|
|
339
|
+
declare function computeMaxBuyAmount({ source, usdcBalance, safetyBufferUsd, feeRateBps, pricePerShare, }: ComputeMaxBuyAmountParams): number;
|
|
340
|
+
interface EstimatePolymarketBuyFeeParams {
|
|
341
|
+
/** USDC amount the user intends to spend. */
|
|
342
|
+
usdcAmount: number;
|
|
343
|
+
/** Per-share execution price (0–1). */
|
|
344
|
+
pricePerShare: number;
|
|
345
|
+
/** Base fee in basis points (from `GET /fee-rate/{token_id}`). */
|
|
346
|
+
feeRateBps: number;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Estimate the Polymarket taker fee (USDC) for a buy, mirroring Polymarket's
|
|
350
|
+
* fee formula:
|
|
351
|
+
*
|
|
352
|
+
* fee = baseFeeRate × min(price, 1 − price) × shares, shares = amount / price
|
|
353
|
+
*
|
|
354
|
+
* which simplifies to `amount × r × min(1, (1 − price) / price)`. When the
|
|
355
|
+
* price is unknown/degenerate we fall back to the worst case (`amount × r`).
|
|
356
|
+
*/
|
|
357
|
+
declare function estimatePolymarketBuyFee({ usdcAmount, pricePerShare, feeRateBps, }: EstimatePolymarketBuyFeeParams): number;
|
|
315
358
|
/**
|
|
316
359
|
* Parse a Polymarket CLOB API error message into a user-friendly string.
|
|
317
360
|
* Falls back to the raw message (with order-hash stripped) if no pattern matches.
|
|
@@ -356,6 +399,11 @@ interface UseTradeFormResult {
|
|
|
356
399
|
limitPrice: number;
|
|
357
400
|
shares: number;
|
|
358
401
|
estimatedCost: number;
|
|
402
|
+
/**
|
|
403
|
+
* Estimated Polymarket taker fee (USDC) reserved on top of the order amount.
|
|
404
|
+
* 0 for fee-free markets and for non-Polymarket sources.
|
|
405
|
+
*/
|
|
406
|
+
estimatedFee: number;
|
|
359
407
|
potentialPayout: number;
|
|
360
408
|
potentialProfit: number;
|
|
361
409
|
/**
|
|
@@ -364,6 +412,8 @@ interface UseTradeFormResult {
|
|
|
364
412
|
*/
|
|
365
413
|
pricePerShare: number;
|
|
366
414
|
usdcBalance: number | null;
|
|
415
|
+
maxBuyAmount: number;
|
|
416
|
+
spendableUsdcBalance: number | null;
|
|
367
417
|
isBalanceLoading: boolean;
|
|
368
418
|
isMarketDataLoading: boolean;
|
|
369
419
|
isSubmitting: boolean;
|
|
@@ -691,6 +741,8 @@ interface TradeFormUIProps {
|
|
|
691
741
|
limitPrice: number;
|
|
692
742
|
shares: number;
|
|
693
743
|
estimatedCost: number;
|
|
744
|
+
/** Estimated Polymarket taker fee (USDC). 0 hides the fee row. */
|
|
745
|
+
estimatedFee?: number;
|
|
694
746
|
potentialPayout: number;
|
|
695
747
|
potentialProfit: number;
|
|
696
748
|
isMarketDataLoading: boolean;
|
|
@@ -706,6 +758,7 @@ interface TradeFormUIProps {
|
|
|
706
758
|
/** Invoked when the user presses submit while balance is insufficient. */
|
|
707
759
|
onInsufficientBalance?: () => void;
|
|
708
760
|
supportsLimitOrder: boolean;
|
|
761
|
+
maxBuyAmount?: number;
|
|
709
762
|
kycRequired: boolean;
|
|
710
763
|
/** True when the user must complete KYC before the deposit flow is allowed. */
|
|
711
764
|
needsKyc: boolean;
|
|
@@ -728,7 +781,7 @@ interface TradeFormUIProps {
|
|
|
728
781
|
onCustomDurationUnitChange: (u: DurationUnit) => void;
|
|
729
782
|
onSubmit: () => void;
|
|
730
783
|
}
|
|
731
|
-
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, potentialProfit, potentialPayout, estimatedCost, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
784
|
+
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, potentialProfit, potentialPayout, estimatedCost, estimatedFee, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, maxBuyAmount, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
732
785
|
|
|
733
786
|
interface TradeFormWidgetProps {
|
|
734
787
|
event?: PredictEvent;
|
|
@@ -1377,4 +1430,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
|
|
|
1377
1430
|
}>;
|
|
1378
1431
|
declare function PredictWalletProvider({ pollingInterval, enabled, enableKalshi, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
|
|
1379
1432
|
|
|
1380
|
-
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, CommentItemUI, type CommentItemUIProps, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, type DurationUnit, EventCommentsWidget, type EventCommentsWidgetProps, 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, EventsHero, type EventsHeroProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, type ExpirationPreset, KycModal, type KycModalProps, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, MatchMarketCard, type MatchMarketCardProps, MatchesFilterBar, type MatchesFilterBarProps, MatchesHero, type MatchesHeroProps, type MatchesHeroStats, MatchesPage, type MatchesPageProps, MatchesStatsBar, type MatchesStatsBarProps, MatchesWidget, type MatchesWidgetProps, type MatchesWidgetRef, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_MIN_USDC, ORDER_PRICE_STEP, type OddsFormatter, type OrderType, PREDICT_REDEEM_MODAL_ID, PREDICT_SEARCH_MODAL_ID, PREDICT_SELL_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictRedeemModal, type PredictRedeemModalParams, type PredictRedeemModalResult, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictSellModal, type PredictSellModalParams, type PredictSellModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, RedeemFormWidget, type RedeemFormWidgetProps, 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, SellFormUI, type SellFormUIProps, SellFormWidget, type SellFormWidgetProps, SetupModal, type SetupModalProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, SourceBadge, type SourceBadgeProps, SpreadIndicator, type SpreadIndicatorProps, 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 UseSellFormParams, type UseSellFormResult, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, countActiveFilters, fireCelebration, floorToDecimals, formatKMB, formatShares, getSourceMeta, parsePolymarketError, resolveExpiration, roundToTickSize, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useSellForm, useTradeForm };
|
|
1433
|
+
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, CommentItemUI, type CommentItemUIProps, type ComputeMaxBuyAmountParams, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, type DurationUnit, type EstimatePolymarketBuyFeeParams, EventCommentsWidget, type EventCommentsWidgetProps, 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, EventsHero, type EventsHeroProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, type ExpirationPreset, KycModal, type KycModalProps, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, MatchMarketCard, type MatchMarketCardProps, MatchesFilterBar, type MatchesFilterBarProps, MatchesHero, type MatchesHeroProps, type MatchesHeroStats, MatchesPage, type MatchesPageProps, MatchesStatsBar, type MatchesStatsBarProps, MatchesWidget, type MatchesWidgetProps, type MatchesWidgetRef, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_MIN_USDC, ORDER_PRICE_STEP, type OddsFormatter, type OrderType, PREDICT_REDEEM_MODAL_ID, PREDICT_SEARCH_MODAL_ID, PREDICT_SELL_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictRedeemModal, type PredictRedeemModalParams, type PredictRedeemModalResult, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictSellModal, type PredictSellModalParams, type PredictSellModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, RedeemFormWidget, type RedeemFormWidgetProps, 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, SellFormUI, type SellFormUIProps, SellFormWidget, type SellFormWidgetProps, SetupModal, type SetupModalProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, SourceBadge, type SourceBadgeProps, SpreadIndicator, type SpreadIndicatorProps, 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 UseSellFormParams, type UseSellFormResult, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, computeMaxBuyAmount, countActiveFilters, estimatePolymarketBuyFee, fireCelebration, floorToDecimals, formatKMB, formatShares, getSourceMeta, parsePolymarketError, polymarketFeeFactor, resolveExpiration, roundToTickSize, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useSellForm, useTradeForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -312,6 +312,49 @@ declare function roundToTickSize(price: number, tickSize: string): number;
|
|
|
312
312
|
* Floor a number to the given number of decimal places (never rounds up).
|
|
313
313
|
*/
|
|
314
314
|
declare function floorToDecimals(value: number, decimals: number): number;
|
|
315
|
+
/**
|
|
316
|
+
* Price-dependent factor in Polymarket's taker-fee formula:
|
|
317
|
+
* `min(1, (1 − price) / price)` (equivalently `min(price, 1−price) / price`).
|
|
318
|
+
* Capped at 1 (the worst case, reached when `price ≤ 0.5`). Falls back to the
|
|
319
|
+
* worst case (1) when the price is unknown/degenerate.
|
|
320
|
+
*/
|
|
321
|
+
declare function polymarketFeeFactor(pricePerShare: number): number;
|
|
322
|
+
interface ComputeMaxBuyAmountParams {
|
|
323
|
+
source: string;
|
|
324
|
+
usdcBalance: number | null | undefined;
|
|
325
|
+
safetyBufferUsd?: number;
|
|
326
|
+
/**
|
|
327
|
+
* Polymarket base fee in basis points (from `GET /fee-rate/{token_id}`).
|
|
328
|
+
* Polymarket reserves a taker fee on top of the order amount, so the largest
|
|
329
|
+
* spendable amount must leave room for it. Defaults to 0 (fee-free markets).
|
|
330
|
+
*/
|
|
331
|
+
feeRateBps?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Per-share price (0–1) used to price the fee precisely. Omit to reserve the
|
|
334
|
+
* worst-case fee (factor = 1). Safe for buys: adverse fills push the price up,
|
|
335
|
+
* which only lowers the fee factor.
|
|
336
|
+
*/
|
|
337
|
+
pricePerShare?: number;
|
|
338
|
+
}
|
|
339
|
+
declare function computeMaxBuyAmount({ source, usdcBalance, safetyBufferUsd, feeRateBps, pricePerShare, }: ComputeMaxBuyAmountParams): number;
|
|
340
|
+
interface EstimatePolymarketBuyFeeParams {
|
|
341
|
+
/** USDC amount the user intends to spend. */
|
|
342
|
+
usdcAmount: number;
|
|
343
|
+
/** Per-share execution price (0–1). */
|
|
344
|
+
pricePerShare: number;
|
|
345
|
+
/** Base fee in basis points (from `GET /fee-rate/{token_id}`). */
|
|
346
|
+
feeRateBps: number;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Estimate the Polymarket taker fee (USDC) for a buy, mirroring Polymarket's
|
|
350
|
+
* fee formula:
|
|
351
|
+
*
|
|
352
|
+
* fee = baseFeeRate × min(price, 1 − price) × shares, shares = amount / price
|
|
353
|
+
*
|
|
354
|
+
* which simplifies to `amount × r × min(1, (1 − price) / price)`. When the
|
|
355
|
+
* price is unknown/degenerate we fall back to the worst case (`amount × r`).
|
|
356
|
+
*/
|
|
357
|
+
declare function estimatePolymarketBuyFee({ usdcAmount, pricePerShare, feeRateBps, }: EstimatePolymarketBuyFeeParams): number;
|
|
315
358
|
/**
|
|
316
359
|
* Parse a Polymarket CLOB API error message into a user-friendly string.
|
|
317
360
|
* Falls back to the raw message (with order-hash stripped) if no pattern matches.
|
|
@@ -356,6 +399,11 @@ interface UseTradeFormResult {
|
|
|
356
399
|
limitPrice: number;
|
|
357
400
|
shares: number;
|
|
358
401
|
estimatedCost: number;
|
|
402
|
+
/**
|
|
403
|
+
* Estimated Polymarket taker fee (USDC) reserved on top of the order amount.
|
|
404
|
+
* 0 for fee-free markets and for non-Polymarket sources.
|
|
405
|
+
*/
|
|
406
|
+
estimatedFee: number;
|
|
359
407
|
potentialPayout: number;
|
|
360
408
|
potentialProfit: number;
|
|
361
409
|
/**
|
|
@@ -364,6 +412,8 @@ interface UseTradeFormResult {
|
|
|
364
412
|
*/
|
|
365
413
|
pricePerShare: number;
|
|
366
414
|
usdcBalance: number | null;
|
|
415
|
+
maxBuyAmount: number;
|
|
416
|
+
spendableUsdcBalance: number | null;
|
|
367
417
|
isBalanceLoading: boolean;
|
|
368
418
|
isMarketDataLoading: boolean;
|
|
369
419
|
isSubmitting: boolean;
|
|
@@ -691,6 +741,8 @@ interface TradeFormUIProps {
|
|
|
691
741
|
limitPrice: number;
|
|
692
742
|
shares: number;
|
|
693
743
|
estimatedCost: number;
|
|
744
|
+
/** Estimated Polymarket taker fee (USDC). 0 hides the fee row. */
|
|
745
|
+
estimatedFee?: number;
|
|
694
746
|
potentialPayout: number;
|
|
695
747
|
potentialProfit: number;
|
|
696
748
|
isMarketDataLoading: boolean;
|
|
@@ -706,6 +758,7 @@ interface TradeFormUIProps {
|
|
|
706
758
|
/** Invoked when the user presses submit while balance is insufficient. */
|
|
707
759
|
onInsufficientBalance?: () => void;
|
|
708
760
|
supportsLimitOrder: boolean;
|
|
761
|
+
maxBuyAmount?: number;
|
|
709
762
|
kycRequired: boolean;
|
|
710
763
|
/** True when the user must complete KYC before the deposit flow is allowed. */
|
|
711
764
|
needsKyc: boolean;
|
|
@@ -728,7 +781,7 @@ interface TradeFormUIProps {
|
|
|
728
781
|
onCustomDurationUnitChange: (u: DurationUnit) => void;
|
|
729
782
|
onSubmit: () => void;
|
|
730
783
|
}
|
|
731
|
-
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, potentialProfit, potentialPayout, estimatedCost, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
784
|
+
declare function TradeFormUI({ event, market, variant, outcome, orderType, quantity, limitPrice, shares, potentialProfit, potentialPayout, estimatedCost, estimatedFee, usdcBalance, isBalanceLoading, isMarketDataLoading, isSubmitting, authStatus, isValid, validationErrors, isInsufficientBalance, onInsufficientBalance, supportsLimitOrder, maxBuyAmount, kycRequired, needsKyc, needsSetup, kycUrl, expirationEnabled, expirationPreset, customDuration, customDurationUnit, oddsFormatter, onOutcomeChange, onOrderTypeChange, onQuantityChange, onLimitPriceChange, onExpirationEnabledChange, onExpirationPresetChange, onCustomDurationChange, onCustomDurationUnitChange, onSubmit, }: TradeFormUIProps): react_jsx_runtime.JSX.Element;
|
|
732
785
|
|
|
733
786
|
interface TradeFormWidgetProps {
|
|
734
787
|
event?: PredictEvent;
|
|
@@ -1377,4 +1430,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
|
|
|
1377
1430
|
}>;
|
|
1378
1431
|
declare function PredictWalletProvider({ pollingInterval, enabled, enableKalshi, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
|
|
1379
1432
|
|
|
1380
|
-
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, CommentItemUI, type CommentItemUIProps, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, type DurationUnit, EventCommentsWidget, type EventCommentsWidgetProps, 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, EventsHero, type EventsHeroProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, type ExpirationPreset, KycModal, type KycModalProps, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, MatchMarketCard, type MatchMarketCardProps, MatchesFilterBar, type MatchesFilterBarProps, MatchesHero, type MatchesHeroProps, type MatchesHeroStats, MatchesPage, type MatchesPageProps, MatchesStatsBar, type MatchesStatsBarProps, MatchesWidget, type MatchesWidgetProps, type MatchesWidgetRef, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_MIN_USDC, ORDER_PRICE_STEP, type OddsFormatter, type OrderType, PREDICT_REDEEM_MODAL_ID, PREDICT_SEARCH_MODAL_ID, PREDICT_SELL_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictRedeemModal, type PredictRedeemModalParams, type PredictRedeemModalResult, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictSellModal, type PredictSellModalParams, type PredictSellModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, RedeemFormWidget, type RedeemFormWidgetProps, 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, SellFormUI, type SellFormUIProps, SellFormWidget, type SellFormWidgetProps, SetupModal, type SetupModalProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, SourceBadge, type SourceBadgeProps, SpreadIndicator, type SpreadIndicatorProps, 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 UseSellFormParams, type UseSellFormResult, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, countActiveFilters, fireCelebration, floorToDecimals, formatKMB, formatShares, getSourceMeta, parsePolymarketError, resolveExpiration, roundToTickSize, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useSellForm, useTradeForm };
|
|
1433
|
+
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, CommentItemUI, type CommentItemUIProps, type ComputeMaxBuyAmountParams, DEFAULT_CHART_RANGE, DEFAULT_FILTER_STATE, DEFAULT_PAGE_SIZE, DEFAULT_PRICE_HISTORY_INTERVAL, type DepthLevel, type DepthSlot, type DurationUnit, type EstimatePolymarketBuyFeeParams, EventCommentsWidget, type EventCommentsWidgetProps, 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, EventsHero, type EventsHeroProps, EventsPage, type EventsPageProps, EventsPageSkeleton, type EventsPageSkeletonProps, EventsSkeleton, type EventsSkeletonProps, EventsToolbarUI, type EventsToolbarUIProps, EventsUI, type EventsUIProps, EventsWidget, type EventsWidgetProps, type ExpirationPreset, KycModal, type KycModalProps, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, MatchMarketCard, type MatchMarketCardProps, MatchesFilterBar, type MatchesFilterBarProps, MatchesHero, type MatchesHeroProps, type MatchesHeroStats, MatchesPage, type MatchesPageProps, MatchesStatsBar, type MatchesStatsBarProps, MatchesWidget, type MatchesWidgetProps, type MatchesWidgetRef, ORDER_MAX_PRICE, ORDER_MIN_PRICE, ORDER_MIN_QUANTITY, ORDER_MIN_USDC, ORDER_PRICE_STEP, type OddsFormatter, type OrderType, PREDICT_REDEEM_MODAL_ID, PREDICT_SEARCH_MODAL_ID, PREDICT_SELL_MODAL_ID, PREDICT_TRADE_MODAL_ID, PRICE_HISTORY_SAMPLE_INTERVAL, PredictRedeemModal, type PredictRedeemModalParams, type PredictRedeemModalResult, PredictSearchModal, type PredictSearchModalParams, type PredictSearchModalResult, PredictSellModal, type PredictSellModalParams, type PredictSellModalResult, PredictTradeModal, type PredictTradeModalParams, type PredictTradeModalResult, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, RedeemFormWidget, type RedeemFormWidgetProps, 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, SellFormUI, type SellFormUIProps, SellFormWidget, type SellFormWidgetProps, SetupModal, type SetupModalProps, SimilarEventCard, type SimilarEventCardProps, SimilarEventsSection, type SimilarEventsSectionProps, type SortPreset, SourceBadge, type SourceBadgeProps, SpreadIndicator, type SpreadIndicatorProps, 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 UseSellFormParams, type UseSellFormResult, type UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, computeMaxBuyAmount, countActiveFilters, estimatePolymarketBuyFee, fireCelebration, floorToDecimals, formatKMB, formatShares, getSourceMeta, parsePolymarketError, polymarketFeeFactor, resolveExpiration, roundToTickSize, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useSellForm, useTradeForm };
|