@liberfi.io/ui-predict 4.0.13 → 4.0.15

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,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup } from '@liberfi.io/react-predict';
2
+ import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup } from '@liberfi.io/react-predict';
3
3
  export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, PolymarketRedeemInput, PolymarketRedeemResponse, PositionsResponse, PredictClient, PredictContext, PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictPosition, PredictProvider, PredictProviderProps, PredictTag, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, PricePoint, ProviderMeta, ProviderSource, ResolveEventsParamsInput, SettlementSource, SimilarEventsParams, TradeType, createPredictClient, createPredictWsClient, eventStatsQueryKey, fetchMatchMarketsPage, fetchMatchesPage, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useRedeemPosition, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
4
4
  import { LinkComponentType } from '@liberfi.io/ui';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -390,6 +390,69 @@ interface EventDetailWidgetProps {
390
390
  }
391
391
  declare function EventDetailWidget({ eventSlug, source, onTradeAction, }: EventDetailWidgetProps): react_jsx_runtime.JSX.Element;
392
392
 
393
+ /** Default page size for list queries */
394
+ declare const DEFAULT_PAGE_SIZE = 24;
395
+ /** Maximum number of markets to display in price history chart */
396
+ declare const MAX_PRICE_HISTORY_MARKETS = 4;
397
+ /**
398
+ * Candlestick period intervals in minutes (granularity for API queries)
399
+ */
400
+ declare const CandlestickPeriod: {
401
+ /** 1 minute */
402
+ readonly ONE_MINUTE: 1;
403
+ /** 1 hour (60 minutes) */
404
+ readonly ONE_HOUR: 60;
405
+ /** 1 day (1440 minutes) */
406
+ readonly ONE_DAY: 1440;
407
+ };
408
+ type CandlestickPeriodType = (typeof CandlestickPeriod)[keyof typeof CandlestickPeriod];
409
+ /**
410
+ * Chart range options (the user-facing time range selector)
411
+ */
412
+ declare const ChartRange: {
413
+ /** 1 day */
414
+ readonly ONE_DAY: "1d";
415
+ /** 1 week */
416
+ readonly ONE_WEEK: "1w";
417
+ /** 1 month */
418
+ readonly ONE_MONTH: "1m";
419
+ /** All time */
420
+ readonly ALL: "all";
421
+ };
422
+ type ChartRangeType = (typeof ChartRange)[keyof typeof ChartRange];
423
+ /** Default chart range */
424
+ declare const DEFAULT_CHART_RANGE: "all";
425
+ /** Candlestick granularity derived from chart range (1D → minute, 1W/1M → hourly, ALL → daily) */
426
+ declare const CHART_RANGE_PERIOD: Record<ChartRangeType, CandlestickPeriodType>;
427
+ /** Chart sampling interval in seconds (used to downsample candlestick data for display) */
428
+ declare const CHART_RANGE_SAMPLE_INTERVAL: Record<ChartRangeType, number>;
429
+ /** Duration in seconds for each chart range (null = all time) */
430
+ declare const CHART_RANGE_DURATION: Record<ChartRangeType, number | null>;
431
+ /** Minimum order quantity (contracts / shares for sell) */
432
+ declare const ORDER_MIN_QUANTITY = 1;
433
+ /** Minimum marketable BUY order in USDC (applies to Polymarket & Kalshi) */
434
+ declare const ORDER_MIN_USDC = 1;
435
+ /** Price step size in cents */
436
+ declare const ORDER_PRICE_STEP = 1;
437
+ /** Minimum price in cents */
438
+ declare const ORDER_MIN_PRICE = 1;
439
+ /** Maximum price in cents */
440
+ declare const ORDER_MAX_PRICE = 99;
441
+ /** @deprecated Use ChartRange instead */
442
+ declare const PriceHistoryInterval: {
443
+ readonly ONE_HOUR: "1h";
444
+ readonly SIX_HOURS: "6h";
445
+ readonly ONE_DAY: "1d";
446
+ readonly ONE_WEEK: "1w";
447
+ readonly MAX: "max";
448
+ };
449
+ /** @deprecated Use ChartRangeType instead */
450
+ type PriceHistoryIntervalType = (typeof PriceHistoryInterval)[keyof typeof PriceHistoryInterval];
451
+ /** @deprecated Use DEFAULT_CHART_RANGE instead */
452
+ declare const DEFAULT_PRICE_HISTORY_INTERVAL: "1w";
453
+ /** @deprecated */
454
+ declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, number>;
455
+
393
456
  interface UseEventDetailParams {
394
457
  /** Event slug (canonical business key). */
395
458
  eventSlug: string;
@@ -398,7 +461,7 @@ interface UseEventDetailParams {
398
461
  /** Market slugs to query candlesticks for. Default: top 4 by yesAsk. */
399
462
  candlestickMarketSlugs?: string[];
400
463
  /** Chart time range (1d / 1w / 1m / all). */
401
- chartRange?: ChartRangeType$1;
464
+ chartRange?: ChartRangeType;
402
465
  }
403
466
  declare const useEventDetail: (params: UseEventDetailParams) => {
404
467
  event: PredictEvent | undefined;
@@ -1102,69 +1165,6 @@ interface SetupModalProps {
1102
1165
  }
1103
1166
  declare function SetupModal({ isOpen, onClose, safeDeployed, tokenApproved, onDeployAndApprove, }: SetupModalProps): react_jsx_runtime.JSX.Element;
1104
1167
 
1105
- /** Default page size for list queries */
1106
- declare const DEFAULT_PAGE_SIZE = 24;
1107
- /** Maximum number of markets to display in price history chart */
1108
- declare const MAX_PRICE_HISTORY_MARKETS = 4;
1109
- /**
1110
- * Candlestick period intervals in minutes (granularity for API queries)
1111
- */
1112
- declare const CandlestickPeriod: {
1113
- /** 1 minute */
1114
- readonly ONE_MINUTE: 1;
1115
- /** 1 hour (60 minutes) */
1116
- readonly ONE_HOUR: 60;
1117
- /** 1 day (1440 minutes) */
1118
- readonly ONE_DAY: 1440;
1119
- };
1120
- type CandlestickPeriodType = (typeof CandlestickPeriod)[keyof typeof CandlestickPeriod];
1121
- /**
1122
- * Chart range options (the user-facing time range selector)
1123
- */
1124
- declare const ChartRange: {
1125
- /** 1 day */
1126
- readonly ONE_DAY: "1d";
1127
- /** 1 week */
1128
- readonly ONE_WEEK: "1w";
1129
- /** 1 month */
1130
- readonly ONE_MONTH: "1m";
1131
- /** All time */
1132
- readonly ALL: "all";
1133
- };
1134
- type ChartRangeType = (typeof ChartRange)[keyof typeof ChartRange];
1135
- /** Default chart range */
1136
- declare const DEFAULT_CHART_RANGE: "all";
1137
- /** Candlestick granularity derived from chart range (1D → minute, 1W/1M → hourly, ALL → daily) */
1138
- declare const CHART_RANGE_PERIOD: Record<ChartRangeType, CandlestickPeriodType>;
1139
- /** Chart sampling interval in seconds (used to downsample candlestick data for display) */
1140
- declare const CHART_RANGE_SAMPLE_INTERVAL: Record<ChartRangeType, number>;
1141
- /** Duration in seconds for each chart range (null = all time) */
1142
- declare const CHART_RANGE_DURATION: Record<ChartRangeType, number | null>;
1143
- /** Minimum order quantity (contracts / shares for sell) */
1144
- declare const ORDER_MIN_QUANTITY = 1;
1145
- /** Minimum marketable BUY order in USDC (applies to Polymarket & Kalshi) */
1146
- declare const ORDER_MIN_USDC = 1;
1147
- /** Price step size in cents */
1148
- declare const ORDER_PRICE_STEP = 1;
1149
- /** Minimum price in cents */
1150
- declare const ORDER_MIN_PRICE = 1;
1151
- /** Maximum price in cents */
1152
- declare const ORDER_MAX_PRICE = 99;
1153
- /** @deprecated Use ChartRange instead */
1154
- declare const PriceHistoryInterval: {
1155
- readonly ONE_HOUR: "1h";
1156
- readonly SIX_HOURS: "6h";
1157
- readonly ONE_DAY: "1d";
1158
- readonly ONE_WEEK: "1w";
1159
- readonly MAX: "max";
1160
- };
1161
- /** @deprecated Use ChartRangeType instead */
1162
- type PriceHistoryIntervalType = (typeof PriceHistoryInterval)[keyof typeof PriceHistoryInterval];
1163
- /** @deprecated Use DEFAULT_CHART_RANGE instead */
1164
- declare const DEFAULT_PRICE_HISTORY_INTERVAL: "1w";
1165
- /** @deprecated */
1166
- declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, number>;
1167
-
1168
1168
  interface PredictWalletContextValue {
1169
1169
  /** Connected Solana wallet address (for Kalshi). */
1170
1170
  solanaAddress: string | undefined;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ChartRangeType as ChartRangeType$1, ListCandlesticksParams, Candlestick, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup } from '@liberfi.io/react-predict';
2
+ import { EventSortField, ProviderSource, PredictEvent, PredictMarket, TagSlugSelection as TagSlugSelection$1, EventStatus, ResolveEventsParamsInput, EventStats, ListCandlesticksParams, Candlestick, PredictPosition, PredictPage, MatchMarketFlat, MatchLeg, MatchSortField, MatchGroup } from '@liberfi.io/react-predict';
3
3
  export { BalanceResponse, CancelOrderResult, Candlestick, CreateOrderInput, DFlowKYCStatus, DFlowOrderContext, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventSortField, EventStats, EventStatus, EventSummary, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, MarketOutcome, MarketResult, MarketStatus, MarketSummary, MatchConfidenceTier, MatchGroup, MatchGroupEntry, MatchGroupMarket, MatchGroupPage, MatchMarketFlat, MatchMarketPage, MatchMarketParams, MatchSortField, MatchStatus, MatchesParams, MatchesStats, OrderSide, OrderStatus, Orderbook, OrderbookLevel, PolymarketOrderType, PolymarketRedeemInput, PolymarketRedeemResponse, PositionsResponse, PredictClient, PredictContext, PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictPosition, PredictProvider, PredictProviderProps, PredictTag, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, PricePoint, ProviderMeta, ProviderSource, ResolveEventsParamsInput, SettlementSource, SimilarEventsParams, TradeType, createPredictClient, createPredictWsClient, eventStatsQueryKey, fetchMatchMarketsPage, fetchMatchesPage, matchMarketsQueryKey, matchQueryKey, matchesQueryKey, useBalance, useCancelOrder, useCandlesticks, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEventStats, useEvents, useInfiniteEvents, useInfiniteMatchMarkets, useInfiniteMatches, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useMatch, useOrder, useOrderbook, useOrders, usePositions, usePredictClient, usePriceHistory, useRedeemPosition, useSearchEvents, useSimilarEvents, useTrades } from '@liberfi.io/react-predict';
4
4
  import { LinkComponentType } from '@liberfi.io/ui';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -390,6 +390,69 @@ interface EventDetailWidgetProps {
390
390
  }
391
391
  declare function EventDetailWidget({ eventSlug, source, onTradeAction, }: EventDetailWidgetProps): react_jsx_runtime.JSX.Element;
392
392
 
393
+ /** Default page size for list queries */
394
+ declare const DEFAULT_PAGE_SIZE = 24;
395
+ /** Maximum number of markets to display in price history chart */
396
+ declare const MAX_PRICE_HISTORY_MARKETS = 4;
397
+ /**
398
+ * Candlestick period intervals in minutes (granularity for API queries)
399
+ */
400
+ declare const CandlestickPeriod: {
401
+ /** 1 minute */
402
+ readonly ONE_MINUTE: 1;
403
+ /** 1 hour (60 minutes) */
404
+ readonly ONE_HOUR: 60;
405
+ /** 1 day (1440 minutes) */
406
+ readonly ONE_DAY: 1440;
407
+ };
408
+ type CandlestickPeriodType = (typeof CandlestickPeriod)[keyof typeof CandlestickPeriod];
409
+ /**
410
+ * Chart range options (the user-facing time range selector)
411
+ */
412
+ declare const ChartRange: {
413
+ /** 1 day */
414
+ readonly ONE_DAY: "1d";
415
+ /** 1 week */
416
+ readonly ONE_WEEK: "1w";
417
+ /** 1 month */
418
+ readonly ONE_MONTH: "1m";
419
+ /** All time */
420
+ readonly ALL: "all";
421
+ };
422
+ type ChartRangeType = (typeof ChartRange)[keyof typeof ChartRange];
423
+ /** Default chart range */
424
+ declare const DEFAULT_CHART_RANGE: "all";
425
+ /** Candlestick granularity derived from chart range (1D → minute, 1W/1M → hourly, ALL → daily) */
426
+ declare const CHART_RANGE_PERIOD: Record<ChartRangeType, CandlestickPeriodType>;
427
+ /** Chart sampling interval in seconds (used to downsample candlestick data for display) */
428
+ declare const CHART_RANGE_SAMPLE_INTERVAL: Record<ChartRangeType, number>;
429
+ /** Duration in seconds for each chart range (null = all time) */
430
+ declare const CHART_RANGE_DURATION: Record<ChartRangeType, number | null>;
431
+ /** Minimum order quantity (contracts / shares for sell) */
432
+ declare const ORDER_MIN_QUANTITY = 1;
433
+ /** Minimum marketable BUY order in USDC (applies to Polymarket & Kalshi) */
434
+ declare const ORDER_MIN_USDC = 1;
435
+ /** Price step size in cents */
436
+ declare const ORDER_PRICE_STEP = 1;
437
+ /** Minimum price in cents */
438
+ declare const ORDER_MIN_PRICE = 1;
439
+ /** Maximum price in cents */
440
+ declare const ORDER_MAX_PRICE = 99;
441
+ /** @deprecated Use ChartRange instead */
442
+ declare const PriceHistoryInterval: {
443
+ readonly ONE_HOUR: "1h";
444
+ readonly SIX_HOURS: "6h";
445
+ readonly ONE_DAY: "1d";
446
+ readonly ONE_WEEK: "1w";
447
+ readonly MAX: "max";
448
+ };
449
+ /** @deprecated Use ChartRangeType instead */
450
+ type PriceHistoryIntervalType = (typeof PriceHistoryInterval)[keyof typeof PriceHistoryInterval];
451
+ /** @deprecated Use DEFAULT_CHART_RANGE instead */
452
+ declare const DEFAULT_PRICE_HISTORY_INTERVAL: "1w";
453
+ /** @deprecated */
454
+ declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, number>;
455
+
393
456
  interface UseEventDetailParams {
394
457
  /** Event slug (canonical business key). */
395
458
  eventSlug: string;
@@ -398,7 +461,7 @@ interface UseEventDetailParams {
398
461
  /** Market slugs to query candlesticks for. Default: top 4 by yesAsk. */
399
462
  candlestickMarketSlugs?: string[];
400
463
  /** Chart time range (1d / 1w / 1m / all). */
401
- chartRange?: ChartRangeType$1;
464
+ chartRange?: ChartRangeType;
402
465
  }
403
466
  declare const useEventDetail: (params: UseEventDetailParams) => {
404
467
  event: PredictEvent | undefined;
@@ -1102,69 +1165,6 @@ interface SetupModalProps {
1102
1165
  }
1103
1166
  declare function SetupModal({ isOpen, onClose, safeDeployed, tokenApproved, onDeployAndApprove, }: SetupModalProps): react_jsx_runtime.JSX.Element;
1104
1167
 
1105
- /** Default page size for list queries */
1106
- declare const DEFAULT_PAGE_SIZE = 24;
1107
- /** Maximum number of markets to display in price history chart */
1108
- declare const MAX_PRICE_HISTORY_MARKETS = 4;
1109
- /**
1110
- * Candlestick period intervals in minutes (granularity for API queries)
1111
- */
1112
- declare const CandlestickPeriod: {
1113
- /** 1 minute */
1114
- readonly ONE_MINUTE: 1;
1115
- /** 1 hour (60 minutes) */
1116
- readonly ONE_HOUR: 60;
1117
- /** 1 day (1440 minutes) */
1118
- readonly ONE_DAY: 1440;
1119
- };
1120
- type CandlestickPeriodType = (typeof CandlestickPeriod)[keyof typeof CandlestickPeriod];
1121
- /**
1122
- * Chart range options (the user-facing time range selector)
1123
- */
1124
- declare const ChartRange: {
1125
- /** 1 day */
1126
- readonly ONE_DAY: "1d";
1127
- /** 1 week */
1128
- readonly ONE_WEEK: "1w";
1129
- /** 1 month */
1130
- readonly ONE_MONTH: "1m";
1131
- /** All time */
1132
- readonly ALL: "all";
1133
- };
1134
- type ChartRangeType = (typeof ChartRange)[keyof typeof ChartRange];
1135
- /** Default chart range */
1136
- declare const DEFAULT_CHART_RANGE: "all";
1137
- /** Candlestick granularity derived from chart range (1D → minute, 1W/1M → hourly, ALL → daily) */
1138
- declare const CHART_RANGE_PERIOD: Record<ChartRangeType, CandlestickPeriodType>;
1139
- /** Chart sampling interval in seconds (used to downsample candlestick data for display) */
1140
- declare const CHART_RANGE_SAMPLE_INTERVAL: Record<ChartRangeType, number>;
1141
- /** Duration in seconds for each chart range (null = all time) */
1142
- declare const CHART_RANGE_DURATION: Record<ChartRangeType, number | null>;
1143
- /** Minimum order quantity (contracts / shares for sell) */
1144
- declare const ORDER_MIN_QUANTITY = 1;
1145
- /** Minimum marketable BUY order in USDC (applies to Polymarket & Kalshi) */
1146
- declare const ORDER_MIN_USDC = 1;
1147
- /** Price step size in cents */
1148
- declare const ORDER_PRICE_STEP = 1;
1149
- /** Minimum price in cents */
1150
- declare const ORDER_MIN_PRICE = 1;
1151
- /** Maximum price in cents */
1152
- declare const ORDER_MAX_PRICE = 99;
1153
- /** @deprecated Use ChartRange instead */
1154
- declare const PriceHistoryInterval: {
1155
- readonly ONE_HOUR: "1h";
1156
- readonly SIX_HOURS: "6h";
1157
- readonly ONE_DAY: "1d";
1158
- readonly ONE_WEEK: "1w";
1159
- readonly MAX: "max";
1160
- };
1161
- /** @deprecated Use ChartRangeType instead */
1162
- type PriceHistoryIntervalType = (typeof PriceHistoryInterval)[keyof typeof PriceHistoryInterval];
1163
- /** @deprecated Use DEFAULT_CHART_RANGE instead */
1164
- declare const DEFAULT_PRICE_HISTORY_INTERVAL: "1w";
1165
- /** @deprecated */
1166
- declare const PRICE_HISTORY_SAMPLE_INTERVAL: Record<PriceHistoryIntervalType, number>;
1167
-
1168
1168
  interface PredictWalletContextValue {
1169
1169
  /** Connected Solana wallet address (for Kalshi). */
1170
1170
  solanaAddress: string | undefined;