@liberfi.io/ui-predict 0.1.95 → 0.1.97

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPage, MatchSortField, MatchGroup, PredictPosition } 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, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchSortField, MatchStatus, MatchesParams, MatchesStats, 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, fetchMatchesPage, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
2
+ import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPage, MatchMarketFlat, MatchSortField, MatchGroup, PredictPosition } 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, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, 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, fetchMatchMarketsPage, fetchMatchesPage, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, 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 * as react from 'react';
@@ -13,7 +13,7 @@ declare global {
13
13
  };
14
14
  }
15
15
  }
16
- declare const _default: "0.1.95";
16
+ declare const _default: "0.1.97";
17
17
 
18
18
  /**
19
19
  * A single category entry in the static navigation model.
@@ -411,6 +411,7 @@ type PredictTradeModalParams = {
411
411
  event: PredictEvent;
412
412
  market: PredictMarket;
413
413
  initialOutcome?: TradeOutcome;
414
+ initialSide?: TradeSide;
414
415
  chain?: string;
415
416
  };
416
417
  type PredictTradeModalResult = void;
@@ -652,13 +653,18 @@ type SearchWidgetProps = {
652
653
  declare function SearchWidget({ onKeywordChange, onSelectEvent, getEventHref, LinkComponent, onHover, onEscape, source, }: SearchWidgetProps): react_jsx_runtime.JSX.Element;
653
654
 
654
655
  interface MatchesPageProps {
655
- onSelectEntry?: (event: PredictEvent) => void;
656
- getEventHref?: (event: PredictEvent) => string;
656
+ onSelect?: (match: MatchMarketFlat, source: ProviderSource) => void;
657
+ onHover?: (match: MatchMarketFlat) => void;
658
+ getMarketHref?: (match: MatchMarketFlat, source: ProviderSource) => string | undefined;
657
659
  LinkComponent?: LinkComponentType;
658
660
  /** Path to the hero background image (e.g. "/matches-bg.webp") */
659
661
  bgImageSrc?: string;
662
+ /** @deprecated Use onSelect instead */
663
+ onSelectEntry?: (event: never) => void;
664
+ /** @deprecated Use getMarketHref instead */
665
+ getEventHref?: (event: never) => string;
660
666
  }
661
- declare function MatchesPage({ onSelectEntry, getEventHref, LinkComponent, bgImageSrc, }: MatchesPageProps): react_jsx_runtime.JSX.Element;
667
+ declare function MatchesPage({ onSelect, onHover, getMarketHref, LinkComponent, bgImageSrc, }: MatchesPageProps): react_jsx_runtime.JSX.Element;
662
668
 
663
669
  interface MatchesHeroStats {
664
670
  activePairs: number;
@@ -678,10 +684,15 @@ interface MatchesWidgetProps {
678
684
  sortBy: MatchSortField;
679
685
  sortAsc: boolean;
680
686
  minVolume?: number;
681
- onSelectEntry?: (event: PredictEvent) => void;
682
- getEventHref?: (event: PredictEvent) => string;
687
+ onSelect?: (match: MatchMarketFlat, source: ProviderSource) => void;
688
+ onHover?: (match: MatchMarketFlat) => void;
689
+ getMarketHref?: (match: MatchMarketFlat, source: ProviderSource) => string | undefined;
683
690
  LinkComponent?: LinkComponentType;
684
691
  onStatsChange?: (stats: MatchesHeroStats) => void;
692
+ /** @deprecated Use onSelect instead */
693
+ onSelectEntry?: (event: never) => void;
694
+ /** @deprecated Use getMarketHref instead */
695
+ getEventHref?: (event: never) => string;
685
696
  }
686
697
  declare const MatchesWidget: react.ForwardRefExoticComponent<MatchesWidgetProps & react.RefAttributes<MatchesWidgetRef>>;
687
698
 
@@ -693,6 +704,15 @@ interface MatchGroupCardProps {
693
704
  }
694
705
  declare function MatchGroupCard({ group, onSelectEntry, getEventHref, LinkComponent, }: MatchGroupCardProps): react_jsx_runtime.JSX.Element;
695
706
 
707
+ interface MatchMarketCardProps {
708
+ match: MatchMarketFlat;
709
+ onSelect?: (match: MatchMarketFlat, source: ProviderSource) => void;
710
+ onHover?: (match: MatchMarketFlat) => void;
711
+ getMarketHref?: (match: MatchMarketFlat, source: ProviderSource) => string | undefined;
712
+ LinkComponent?: LinkComponentType;
713
+ }
714
+ declare function MatchMarketCard({ match, onSelect, onHover, getMarketHref, LinkComponent, }: MatchMarketCardProps): react_jsx_runtime.JSX.Element;
715
+
696
716
  interface MatchesStatsBarProps {
697
717
  matches: MatchGroup[];
698
718
  total?: number;
@@ -743,6 +763,37 @@ interface ProfilePageProps {
743
763
  }
744
764
  declare function ProfilePage({ solanaAddress, evmAddress, onClosePosition, onEventClick, }: ProfilePageProps): react_jsx_runtime.JSX.Element;
745
765
 
766
+ interface KycModalProps {
767
+ isOpen: boolean;
768
+ onClose: () => void;
769
+ kycUrl: string | null;
770
+ }
771
+ declare function KycModal({ isOpen, onClose, kycUrl }: KycModalProps): react_jsx_runtime.JSX.Element;
772
+
773
+ interface SetupModalProps {
774
+ isOpen: boolean;
775
+ onClose: () => void;
776
+ evmAddress: string;
777
+ safeDeployed: boolean;
778
+ tokenApproved: boolean;
779
+ /**
780
+ * Whether Polymarket L2 API credentials are already derived.
781
+ * Comes from `PolymarketContext.credentials !== null`.
782
+ */
783
+ keysConnected: boolean;
784
+ /**
785
+ * Callback to deploy Safe + approve tokens (Steps 1-2).
786
+ * The consuming app provides the implementation using RelayClient.
787
+ */
788
+ onDeployAndApprove: () => Promise<void>;
789
+ /**
790
+ * Callback to trigger L2 key derivation (Step 3).
791
+ * Provided by the consuming app that has access to the wallet signer.
792
+ */
793
+ onConnectKeys?: () => Promise<void>;
794
+ }
795
+ declare function SetupModal({ isOpen, onClose, evmAddress, safeDeployed, tokenApproved, keysConnected, onDeployAndApprove, onConnectKeys, }: SetupModalProps): react_jsx_runtime.JSX.Element;
796
+
746
797
  /** Default page size for list queries */
747
798
  declare const DEFAULT_PAGE_SIZE = 48;
748
799
  /** Maximum number of markets to display in price history chart */
@@ -805,15 +856,34 @@ declare const DEFAULT_PRICE_HISTORY_INTERVAL: "1w";
805
856
  declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, number>;
806
857
 
807
858
  interface PredictWalletContextValue {
808
- /** Connected Solana wallet address (for DFlow). */
859
+ /** Connected Solana wallet address (for Kalshi). */
809
860
  solanaAddress: string | undefined;
810
861
  /** Connected EVM wallet address (for Polymarket). */
811
862
  evmAddress: string | undefined;
863
+ /** Polymarket Safe (proxy) wallet address, derived from EOA via CREATE2. */
864
+ polymarketSafeAddress: string | undefined;
812
865
  /** `null` when no wallet is connected or data has not loaded yet. */
813
- dflowUsdcBalance: number | null;
814
- /** `null` when no wallet is connected or data has not loaded yet. */
866
+ kalshiUsdcBalance: number | null;
867
+ /** `null` when wallet not connected or setup not complete. */
815
868
  polymarketUsdcBalance: number | null;
869
+ /** Whether the Solana wallet has completed Kalshi/DFlow KYC verification. */
870
+ kalshiKycVerified: boolean;
871
+ /** URL to redirect for KYC onboarding, or `null` if unavailable. */
872
+ kalshiKycUrl: string | null;
873
+ /** `true` while the KYC status query is loading for the first time. */
874
+ kalshiKycLoading: boolean;
875
+ /** Whether Polymarket wallet setup is fully complete (Safe deployed + USDC.e approved). */
876
+ polymarketSetupVerified: boolean;
877
+ /** Whether the Safe wallet has been deployed on Polygon. */
878
+ polymarketSafeDeployed: boolean;
879
+ /** Whether USDC.e is approved for the CTF Exchange. */
880
+ polymarketTokenApproved: boolean;
881
+ /** `true` while the Polymarket setup status is loading. */
882
+ polymarketSetupLoading: boolean;
883
+ /** `true` only on initial load when there is no cached data yet. */
816
884
  isLoading: boolean;
885
+ /** `true` whenever a request is in-flight (including background refetches). */
886
+ isFetching: boolean;
817
887
  error: Error | null;
818
888
  }
819
889
  declare function usePredictWallet(): PredictWalletContextValue;
@@ -823,4 +893,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
823
893
  }>;
824
894
  declare function PredictWalletProvider({ pollingInterval, enabled, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
825
895
 
826
- 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, type DurationUnit, 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, type ExpirationPreset, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, 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_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, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, 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, 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 UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, countActiveFilters, formatKMB, getSourceMeta, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };
896
+ 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, type DurationUnit, 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, 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_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, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, 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, 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 UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, countActiveFilters, formatKMB, getSourceMeta, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, 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
- import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPage, MatchSortField, MatchGroup, PredictPosition } 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, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchSortField, MatchStatus, MatchesParams, MatchesStats, 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, fetchMatchesPage, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
2
+ import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPage, MatchMarketFlat, MatchSortField, MatchGroup, PredictPosition } 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, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, 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, fetchMatchMarketsPage, fetchMatchesPage, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, 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 * as react from 'react';
@@ -13,7 +13,7 @@ declare global {
13
13
  };
14
14
  }
15
15
  }
16
- declare const _default: "0.1.95";
16
+ declare const _default: "0.1.97";
17
17
 
18
18
  /**
19
19
  * A single category entry in the static navigation model.
@@ -411,6 +411,7 @@ type PredictTradeModalParams = {
411
411
  event: PredictEvent;
412
412
  market: PredictMarket;
413
413
  initialOutcome?: TradeOutcome;
414
+ initialSide?: TradeSide;
414
415
  chain?: string;
415
416
  };
416
417
  type PredictTradeModalResult = void;
@@ -652,13 +653,18 @@ type SearchWidgetProps = {
652
653
  declare function SearchWidget({ onKeywordChange, onSelectEvent, getEventHref, LinkComponent, onHover, onEscape, source, }: SearchWidgetProps): react_jsx_runtime.JSX.Element;
653
654
 
654
655
  interface MatchesPageProps {
655
- onSelectEntry?: (event: PredictEvent) => void;
656
- getEventHref?: (event: PredictEvent) => string;
656
+ onSelect?: (match: MatchMarketFlat, source: ProviderSource) => void;
657
+ onHover?: (match: MatchMarketFlat) => void;
658
+ getMarketHref?: (match: MatchMarketFlat, source: ProviderSource) => string | undefined;
657
659
  LinkComponent?: LinkComponentType;
658
660
  /** Path to the hero background image (e.g. "/matches-bg.webp") */
659
661
  bgImageSrc?: string;
662
+ /** @deprecated Use onSelect instead */
663
+ onSelectEntry?: (event: never) => void;
664
+ /** @deprecated Use getMarketHref instead */
665
+ getEventHref?: (event: never) => string;
660
666
  }
661
- declare function MatchesPage({ onSelectEntry, getEventHref, LinkComponent, bgImageSrc, }: MatchesPageProps): react_jsx_runtime.JSX.Element;
667
+ declare function MatchesPage({ onSelect, onHover, getMarketHref, LinkComponent, bgImageSrc, }: MatchesPageProps): react_jsx_runtime.JSX.Element;
662
668
 
663
669
  interface MatchesHeroStats {
664
670
  activePairs: number;
@@ -678,10 +684,15 @@ interface MatchesWidgetProps {
678
684
  sortBy: MatchSortField;
679
685
  sortAsc: boolean;
680
686
  minVolume?: number;
681
- onSelectEntry?: (event: PredictEvent) => void;
682
- getEventHref?: (event: PredictEvent) => string;
687
+ onSelect?: (match: MatchMarketFlat, source: ProviderSource) => void;
688
+ onHover?: (match: MatchMarketFlat) => void;
689
+ getMarketHref?: (match: MatchMarketFlat, source: ProviderSource) => string | undefined;
683
690
  LinkComponent?: LinkComponentType;
684
691
  onStatsChange?: (stats: MatchesHeroStats) => void;
692
+ /** @deprecated Use onSelect instead */
693
+ onSelectEntry?: (event: never) => void;
694
+ /** @deprecated Use getMarketHref instead */
695
+ getEventHref?: (event: never) => string;
685
696
  }
686
697
  declare const MatchesWidget: react.ForwardRefExoticComponent<MatchesWidgetProps & react.RefAttributes<MatchesWidgetRef>>;
687
698
 
@@ -693,6 +704,15 @@ interface MatchGroupCardProps {
693
704
  }
694
705
  declare function MatchGroupCard({ group, onSelectEntry, getEventHref, LinkComponent, }: MatchGroupCardProps): react_jsx_runtime.JSX.Element;
695
706
 
707
+ interface MatchMarketCardProps {
708
+ match: MatchMarketFlat;
709
+ onSelect?: (match: MatchMarketFlat, source: ProviderSource) => void;
710
+ onHover?: (match: MatchMarketFlat) => void;
711
+ getMarketHref?: (match: MatchMarketFlat, source: ProviderSource) => string | undefined;
712
+ LinkComponent?: LinkComponentType;
713
+ }
714
+ declare function MatchMarketCard({ match, onSelect, onHover, getMarketHref, LinkComponent, }: MatchMarketCardProps): react_jsx_runtime.JSX.Element;
715
+
696
716
  interface MatchesStatsBarProps {
697
717
  matches: MatchGroup[];
698
718
  total?: number;
@@ -743,6 +763,37 @@ interface ProfilePageProps {
743
763
  }
744
764
  declare function ProfilePage({ solanaAddress, evmAddress, onClosePosition, onEventClick, }: ProfilePageProps): react_jsx_runtime.JSX.Element;
745
765
 
766
+ interface KycModalProps {
767
+ isOpen: boolean;
768
+ onClose: () => void;
769
+ kycUrl: string | null;
770
+ }
771
+ declare function KycModal({ isOpen, onClose, kycUrl }: KycModalProps): react_jsx_runtime.JSX.Element;
772
+
773
+ interface SetupModalProps {
774
+ isOpen: boolean;
775
+ onClose: () => void;
776
+ evmAddress: string;
777
+ safeDeployed: boolean;
778
+ tokenApproved: boolean;
779
+ /**
780
+ * Whether Polymarket L2 API credentials are already derived.
781
+ * Comes from `PolymarketContext.credentials !== null`.
782
+ */
783
+ keysConnected: boolean;
784
+ /**
785
+ * Callback to deploy Safe + approve tokens (Steps 1-2).
786
+ * The consuming app provides the implementation using RelayClient.
787
+ */
788
+ onDeployAndApprove: () => Promise<void>;
789
+ /**
790
+ * Callback to trigger L2 key derivation (Step 3).
791
+ * Provided by the consuming app that has access to the wallet signer.
792
+ */
793
+ onConnectKeys?: () => Promise<void>;
794
+ }
795
+ declare function SetupModal({ isOpen, onClose, evmAddress, safeDeployed, tokenApproved, keysConnected, onDeployAndApprove, onConnectKeys, }: SetupModalProps): react_jsx_runtime.JSX.Element;
796
+
746
797
  /** Default page size for list queries */
747
798
  declare const DEFAULT_PAGE_SIZE = 48;
748
799
  /** Maximum number of markets to display in price history chart */
@@ -805,15 +856,34 @@ declare const DEFAULT_PRICE_HISTORY_INTERVAL: "1w";
805
856
  declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, number>;
806
857
 
807
858
  interface PredictWalletContextValue {
808
- /** Connected Solana wallet address (for DFlow). */
859
+ /** Connected Solana wallet address (for Kalshi). */
809
860
  solanaAddress: string | undefined;
810
861
  /** Connected EVM wallet address (for Polymarket). */
811
862
  evmAddress: string | undefined;
863
+ /** Polymarket Safe (proxy) wallet address, derived from EOA via CREATE2. */
864
+ polymarketSafeAddress: string | undefined;
812
865
  /** `null` when no wallet is connected or data has not loaded yet. */
813
- dflowUsdcBalance: number | null;
814
- /** `null` when no wallet is connected or data has not loaded yet. */
866
+ kalshiUsdcBalance: number | null;
867
+ /** `null` when wallet not connected or setup not complete. */
815
868
  polymarketUsdcBalance: number | null;
869
+ /** Whether the Solana wallet has completed Kalshi/DFlow KYC verification. */
870
+ kalshiKycVerified: boolean;
871
+ /** URL to redirect for KYC onboarding, or `null` if unavailable. */
872
+ kalshiKycUrl: string | null;
873
+ /** `true` while the KYC status query is loading for the first time. */
874
+ kalshiKycLoading: boolean;
875
+ /** Whether Polymarket wallet setup is fully complete (Safe deployed + USDC.e approved). */
876
+ polymarketSetupVerified: boolean;
877
+ /** Whether the Safe wallet has been deployed on Polygon. */
878
+ polymarketSafeDeployed: boolean;
879
+ /** Whether USDC.e is approved for the CTF Exchange. */
880
+ polymarketTokenApproved: boolean;
881
+ /** `true` while the Polymarket setup status is loading. */
882
+ polymarketSetupLoading: boolean;
883
+ /** `true` only on initial load when there is no cached data yet. */
816
884
  isLoading: boolean;
885
+ /** `true` whenever a request is in-flight (including background refetches). */
886
+ isFetching: boolean;
817
887
  error: Error | null;
818
888
  }
819
889
  declare function usePredictWallet(): PredictWalletContextValue;
@@ -823,4 +893,4 @@ type PredictWalletProviderProps = PropsWithChildren<{
823
893
  }>;
824
894
  declare function PredictWalletProvider({ pollingInterval, enabled, children, }: PredictWalletProviderProps): react_jsx_runtime.JSX.Element;
825
895
 
826
- 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, type DurationUnit, 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, type ExpirationPreset, MAX_PRICE_HISTORY_MARKETS, MatchGroupCard, type MatchGroupCardProps, 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_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, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, 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, 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 UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, countActiveFilters, formatKMB, getSourceMeta, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };
896
+ 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, type DurationUnit, 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, 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_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, type PredictWalletContextValue, PredictWalletProvider, type PredictWalletProviderProps, PriceHistoryInterval, type PriceHistoryIntervalType, ProfilePage, type ProfilePageProps, 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, 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 UseTradeFormParams, type UseTradeFormResult, UserActivitySection, type UserActivitySectionProps, countActiveFilters, formatKMB, getSourceMeta, useEventDetail, useEventsInfinite, usePredictSearchHistory, usePredictWallet, useSearchResultListScript, useSearchScript, useTradeForm, _default as version };