@liberfi.io/react-predict 0.1.7 → 0.1.9
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 +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -2
- package/dist/index.mjs.map +1 -1
- package/dist/server-cst0UoFG.d.mts +1010 -0
- package/dist/server-cst0UoFG.d.ts +1010 -0
- package/dist/server.d.mts +1 -997
- package/dist/server.d.ts +1 -997
- package/dist/server.js +13 -0
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +13 -0
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PredictClient, PredictWsClient, ListEventsParams, PredictPage, PredictEvent, ProviderSource, EventStatus, SimilarEventsParams, PredictMarket, Orderbook, ListMarketTradesParams, PredictTrade, PriceHistoryRange, PriceHistoryResponse, ListCandlesticksParams, Candlestick, PositionsResponse, BalanceResponse, ListOrdersParams, PredictOrder, CancelOrderResult, ListTradesParams, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitResponse, DFlowSubmitRequest, WsConnectionStatus, WsDataMessage, WsPriceEvent, WsOrderbookEvent, WsTradeEvent, CreateOrderInput } from './server.mjs';
|
|
2
|
-
export { BuildClobAuthMessageInput, BuildOrderMessageInput, BuildSignedOrderInput, CLOB_AUTH_DOMAIN, CLOB_AUTH_TYPES, CTF_EXCHANGE_ADDRESS, CTF_ORDER_TYPES, DFlowOrderContext, EventSortField, EventSummary, HttpMethod, MarketOutcome, MarketResult, MarketStatus, MarketSummary, NEG_RISK_CTF_EXCHANGE_ADDRESS, ORDER_TYPE, OrderMessage, OrderSide, OrderStatus, OrderbookLevel, POLYGON_CHAIN_ID, PolymarketL2Headers, PolymarketL2HeadersInput, PolymarketOrderType, PredictPosition, PredictTag, PredictWsClientConfig, PricePoint, ProviderMeta, ResolveEventsParamsInput, SIDE, SettlementSource, SignedOrder, TagSlugSelection, TradeType, USDC_ADDRESS, WsChannel, WsChannelEvent, WsClientMessage, WsErrorCode, WsErrorMessage, WsPingMessage, WsPongMessage, WsServerMessage, WsSubscribeMessage, WsSubscribedMessage, buildClobAuthMessage, buildCtfExchangeDomain, buildOrderMessage, buildPolymarketL2Headers, buildSignedOrder, createPredictClient, createPredictWsClient, derivePolymarketApiKey, eventQueryKey, fetchEvent, fetchEventsPage, fetchMarket, hmacSha256Base64, infiniteEventsQueryKey, marketQueryKey, resolveEventsParams, resolveTagSlug } from './server.mjs';
|
|
1
|
+
import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStatus, S as SimilarEventsParams, e as PredictMarket, O as Orderbook, f as ListMarketTradesParams, g as PredictTrade, h as PriceHistoryRange, i as PriceHistoryResponse, j as ListCandlesticksParams, C as Candlestick, k as PositionsResponse, B as BalanceResponse, l as ListOrdersParams, m as PredictOrder, n as CancelOrderResult, o as ListTradesParams, D as DFlowQuoteRequest, p as DFlowQuoteResponse, q as DFlowSubmitResponse, r as DFlowSubmitRequest, s as DFlowKYCStatus, W as WsConnectionStatus, t as WsDataMessage, u as WsPriceEvent, v as WsOrderbookEvent, w as WsTradeEvent, x as CreateOrderInput } from './server-cst0UoFG.mjs';
|
|
2
|
+
export { as as BuildClobAuthMessageInput, aD as BuildOrderMessageInput, aF as BuildSignedOrderInput, aj as CLOB_AUTH_DOMAIN, ak as CLOB_AUTH_TYPES, at as CTF_EXCHANGE_ADDRESS, ay as CTF_ORDER_TYPES, Z as DFlowOrderContext, K as EventSortField, Q as EventSummary, ap as HttpMethod, J as MarketOutcome, I as MarketResult, M as MarketStatus, R as MarketSummary, au as NEG_RISK_CTF_EXCHANGE_ADDRESS, az as ORDER_TYPE, aE as OrderMessage, Y as OrderSide, X as OrderStatus, N as OrderbookLevel, aw as POLYGON_CHAIN_ID, ar as PolymarketL2Headers, aq as PolymarketL2HeadersInput, _ as PolymarketOrderType, V as PredictPosition, G as PredictTag, A as PredictWsClientConfig, U as PricePoint, F as ProviderMeta, af as ResolveEventsParamsInput, aA as SIDE, H as SettlementSource, aG as SignedOrder, ag as TagSlugSelection, T as TradeType, av as USDC_ADDRESS, $ as WsChannel, a0 as WsChannelEvent, a1 as WsClientMessage, a7 as WsErrorCode, a8 as WsErrorMessage, a3 as WsPingMessage, a5 as WsPongMessage, a4 as WsServerMessage, a2 as WsSubscribeMessage, a6 as WsSubscribedMessage, al as buildClobAuthMessage, ax as buildCtfExchangeDomain, aB as buildOrderMessage, an as buildPolymarketL2Headers, aC as buildSignedOrder, y as createPredictClient, z as createPredictWsClient, ao as derivePolymarketApiKey, a9 as eventQueryKey, aa as fetchEvent, ae as fetchEventsPage, ai as fetchMarket, am as hmacSha256Base64, ad as infiniteEventsQueryKey, ah as marketQueryKey, ac as resolveEventsParams, ab as resolveTagSlug } from './server-cst0UoFG.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { PropsWithChildren } from 'react';
|
|
@@ -390,6 +390,15 @@ declare function useDFlowQuote(params: DFlowQuoteRequest, queryOptions?: Omit<Us
|
|
|
390
390
|
|
|
391
391
|
declare function useDFlowSubmit(mutationOptions?: Omit<UseMutationOptions<DFlowSubmitResponse, Error, DFlowSubmitRequest>, "mutationFn">): _tanstack_react_query.UseMutationResult<DFlowSubmitResponse, Error, DFlowSubmitRequest, unknown>;
|
|
392
392
|
|
|
393
|
+
declare function dflowKYCQueryKey(walletAddress: string): unknown[];
|
|
394
|
+
/**
|
|
395
|
+
* Query hook that checks DFlow KYC verification status for a Solana wallet.
|
|
396
|
+
*
|
|
397
|
+
* @param walletAddress - Solana wallet address to check.
|
|
398
|
+
* @param queryOptions - React Query options (pass `enabled` to control when the query runs).
|
|
399
|
+
*/
|
|
400
|
+
declare function useDFlowKYC(walletAddress?: string, queryOptions?: Omit<UseQueryOptions<DFlowKYCStatus, Error, DFlowKYCStatus, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<DFlowKYCStatus, Error>;
|
|
401
|
+
|
|
393
402
|
interface UsePredictWsClientResult {
|
|
394
403
|
/** The WebSocket client instance, or `null` if not provided via `PredictProvider`. */
|
|
395
404
|
wsClient: PredictWsClient | null;
|
|
@@ -610,4 +619,4 @@ interface CreatePolymarketOrderVariables {
|
|
|
610
619
|
*/
|
|
611
620
|
declare function useCreatePolymarketOrder(mutationOptions?: Omit<UseMutationOptions<PredictOrder, Error, CreatePolymarketOrderVariables>, "mutationFn">): _tanstack_react_query.UseMutationResult<PredictOrder, Error, CreatePolymarketOrderVariables, unknown>;
|
|
612
621
|
|
|
613
|
-
export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePositions, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription };
|
|
622
|
+
export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePositions, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PredictClient, PredictWsClient, ListEventsParams, PredictPage, PredictEvent, ProviderSource, EventStatus, SimilarEventsParams, PredictMarket, Orderbook, ListMarketTradesParams, PredictTrade, PriceHistoryRange, PriceHistoryResponse, ListCandlesticksParams, Candlestick, PositionsResponse, BalanceResponse, ListOrdersParams, PredictOrder, CancelOrderResult, ListTradesParams, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitResponse, DFlowSubmitRequest, WsConnectionStatus, WsDataMessage, WsPriceEvent, WsOrderbookEvent, WsTradeEvent, CreateOrderInput } from './server.js';
|
|
2
|
-
export { BuildClobAuthMessageInput, BuildOrderMessageInput, BuildSignedOrderInput, CLOB_AUTH_DOMAIN, CLOB_AUTH_TYPES, CTF_EXCHANGE_ADDRESS, CTF_ORDER_TYPES, DFlowOrderContext, EventSortField, EventSummary, HttpMethod, MarketOutcome, MarketResult, MarketStatus, MarketSummary, NEG_RISK_CTF_EXCHANGE_ADDRESS, ORDER_TYPE, OrderMessage, OrderSide, OrderStatus, OrderbookLevel, POLYGON_CHAIN_ID, PolymarketL2Headers, PolymarketL2HeadersInput, PolymarketOrderType, PredictPosition, PredictTag, PredictWsClientConfig, PricePoint, ProviderMeta, ResolveEventsParamsInput, SIDE, SettlementSource, SignedOrder, TagSlugSelection, TradeType, USDC_ADDRESS, WsChannel, WsChannelEvent, WsClientMessage, WsErrorCode, WsErrorMessage, WsPingMessage, WsPongMessage, WsServerMessage, WsSubscribeMessage, WsSubscribedMessage, buildClobAuthMessage, buildCtfExchangeDomain, buildOrderMessage, buildPolymarketL2Headers, buildSignedOrder, createPredictClient, createPredictWsClient, derivePolymarketApiKey, eventQueryKey, fetchEvent, fetchEventsPage, fetchMarket, hmacSha256Base64, infiniteEventsQueryKey, marketQueryKey, resolveEventsParams, resolveTagSlug } from './server.js';
|
|
1
|
+
import { P as PredictClient, a as PredictWsClient, L as ListEventsParams, b as PredictPage, c as PredictEvent, d as ProviderSource, E as EventStatus, S as SimilarEventsParams, e as PredictMarket, O as Orderbook, f as ListMarketTradesParams, g as PredictTrade, h as PriceHistoryRange, i as PriceHistoryResponse, j as ListCandlesticksParams, C as Candlestick, k as PositionsResponse, B as BalanceResponse, l as ListOrdersParams, m as PredictOrder, n as CancelOrderResult, o as ListTradesParams, D as DFlowQuoteRequest, p as DFlowQuoteResponse, q as DFlowSubmitResponse, r as DFlowSubmitRequest, s as DFlowKYCStatus, W as WsConnectionStatus, t as WsDataMessage, u as WsPriceEvent, v as WsOrderbookEvent, w as WsTradeEvent, x as CreateOrderInput } from './server-cst0UoFG.js';
|
|
2
|
+
export { as as BuildClobAuthMessageInput, aD as BuildOrderMessageInput, aF as BuildSignedOrderInput, aj as CLOB_AUTH_DOMAIN, ak as CLOB_AUTH_TYPES, at as CTF_EXCHANGE_ADDRESS, ay as CTF_ORDER_TYPES, Z as DFlowOrderContext, K as EventSortField, Q as EventSummary, ap as HttpMethod, J as MarketOutcome, I as MarketResult, M as MarketStatus, R as MarketSummary, au as NEG_RISK_CTF_EXCHANGE_ADDRESS, az as ORDER_TYPE, aE as OrderMessage, Y as OrderSide, X as OrderStatus, N as OrderbookLevel, aw as POLYGON_CHAIN_ID, ar as PolymarketL2Headers, aq as PolymarketL2HeadersInput, _ as PolymarketOrderType, V as PredictPosition, G as PredictTag, A as PredictWsClientConfig, U as PricePoint, F as ProviderMeta, af as ResolveEventsParamsInput, aA as SIDE, H as SettlementSource, aG as SignedOrder, ag as TagSlugSelection, T as TradeType, av as USDC_ADDRESS, $ as WsChannel, a0 as WsChannelEvent, a1 as WsClientMessage, a7 as WsErrorCode, a8 as WsErrorMessage, a3 as WsPingMessage, a5 as WsPongMessage, a4 as WsServerMessage, a2 as WsSubscribeMessage, a6 as WsSubscribedMessage, al as buildClobAuthMessage, ax as buildCtfExchangeDomain, aB as buildOrderMessage, an as buildPolymarketL2Headers, aC as buildSignedOrder, y as createPredictClient, z as createPredictWsClient, ao as derivePolymarketApiKey, a9 as eventQueryKey, aa as fetchEvent, ae as fetchEventsPage, ai as fetchMarket, am as hmacSha256Base64, ad as infiniteEventsQueryKey, ah as marketQueryKey, ac as resolveEventsParams, ab as resolveTagSlug } from './server-cst0UoFG.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { PropsWithChildren } from 'react';
|
|
@@ -390,6 +390,15 @@ declare function useDFlowQuote(params: DFlowQuoteRequest, queryOptions?: Omit<Us
|
|
|
390
390
|
|
|
391
391
|
declare function useDFlowSubmit(mutationOptions?: Omit<UseMutationOptions<DFlowSubmitResponse, Error, DFlowSubmitRequest>, "mutationFn">): _tanstack_react_query.UseMutationResult<DFlowSubmitResponse, Error, DFlowSubmitRequest, unknown>;
|
|
392
392
|
|
|
393
|
+
declare function dflowKYCQueryKey(walletAddress: string): unknown[];
|
|
394
|
+
/**
|
|
395
|
+
* Query hook that checks DFlow KYC verification status for a Solana wallet.
|
|
396
|
+
*
|
|
397
|
+
* @param walletAddress - Solana wallet address to check.
|
|
398
|
+
* @param queryOptions - React Query options (pass `enabled` to control when the query runs).
|
|
399
|
+
*/
|
|
400
|
+
declare function useDFlowKYC(walletAddress?: string, queryOptions?: Omit<UseQueryOptions<DFlowKYCStatus, Error, DFlowKYCStatus, unknown[]>, "queryKey" | "queryFn">): _tanstack_react_query.UseQueryResult<DFlowKYCStatus, Error>;
|
|
401
|
+
|
|
393
402
|
interface UsePredictWsClientResult {
|
|
394
403
|
/** The WebSocket client instance, or `null` if not provided via `PredictProvider`. */
|
|
395
404
|
wsClient: PredictWsClient | null;
|
|
@@ -610,4 +619,4 @@ interface CreatePolymarketOrderVariables {
|
|
|
610
619
|
*/
|
|
611
620
|
declare function useCreatePolymarketOrder(mutationOptions?: Omit<UseMutationOptions<PredictOrder, Error, CreatePolymarketOrderVariables>, "mutationFn">): _tanstack_react_query.UseMutationResult<PredictOrder, Error, CreatePolymarketOrderVariables, unknown>;
|
|
612
621
|
|
|
613
|
-
export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePositions, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription };
|
|
622
|
+
export { BalanceResponse, CancelOrderResult, type CancelOrderVariables, Candlestick, ChartRange, type ChartRangeType, CreateOrderInput, type CreatePolymarketOrderVariables, DFlowKYCStatus, DFlowQuoteRequest, DFlowQuoteResponse, DFlowSubmitRequest, DFlowSubmitResponse, EventStatus, ListCandlesticksParams, ListEventsParams, ListMarketTradesParams, ListOrdersParams, ListTradesParams, type MarketHistoryPoint, type MarketHistorySeries, Orderbook, PolymarketContext, type PolymarketContextValue, type PolymarketCredentials, PolymarketProvider, type PolymarketProviderProps, type PolymarketSigner, PositionsResponse, PredictClient, PredictContext, type PredictContextValue, PredictEvent, PredictMarket, PredictOrder, PredictPage, PredictProvider, type PredictProviderProps, PredictTrade, PredictWsClient, PriceHistoryRange, PriceHistoryResponse, ProviderSource, SimilarEventsParams, type UseBalanceParams, type UseCandlesticksParams, type UseEventParams, type UseInfiniteOrdersParams, type UseInfiniteTradesParams, type UseMarketHistoryResult, type UseMarketParams, type UseMarketTradesParams, type UseOrderParams, type UseOrderbookParams, type UseOrderbookSubscriptionParams, type UseOrderbookSubscriptionResult, type UsePositionsParams, type UsePredictWsClientResult, type UsePriceHistoryParams, type UsePricesSubscriptionParams, type UsePricesSubscriptionResult, type UseRealtimeOrderbookParams, type UseRealtimePricesParams, type UseRealtimeTradesParams, type UseRealtimeTradesResult, type UseSearchEventsParams, type UseSimilarEventsParams, type UseTradesSubscriptionParams, type UseTradesSubscriptionResult, WsConnectionStatus, WsDataMessage, WsOrderbookEvent, WsPriceEvent, WsTradeEvent, balanceQueryKey, candlesticksQueryKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventsQueryKey, fetchEvents, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, positionsQueryKey, priceHistoryQueryKey, similarEventsQueryKey, tradesQueryKey, useBalance, useCancelOrder, useCandlesticks, useCreatePolymarketOrder, useDFlowKYC, useDFlowQuote, useDFlowSubmit, useEvent, useEvents, useInfiniteEvents, useInfiniteOrders, useInfiniteTrades, useMarket, useMarketHistory, useMarketTrades, useOrder, useOrderbook, useOrderbookSubscription, useOrders, usePolymarket, usePositions, usePredictClient, usePredictWsClient, usePriceHistory, usePricesSubscription, useRealtimeOrderbook, useRealtimePrices, useRealtimeTrades, useSearchEvents, useSimilarEvents, useTrades, useTradesSubscription };
|
package/dist/index.js
CHANGED
|
@@ -190,6 +190,19 @@ var PredictClient = class {
|
|
|
190
190
|
return await utils.httpPost(url, body);
|
|
191
191
|
}
|
|
192
192
|
// -------------------------------------------------------------------------
|
|
193
|
+
// KYC
|
|
194
|
+
// -------------------------------------------------------------------------
|
|
195
|
+
/**
|
|
196
|
+
* Check DFlow KYC verification status for a wallet address.
|
|
197
|
+
*
|
|
198
|
+
* Maps to `GET /api/v1/kyc/dflow?wallet_address=...`.
|
|
199
|
+
*/
|
|
200
|
+
async checkDFlowKYC(walletAddress) {
|
|
201
|
+
const query = buildQuery({ wallet_address: walletAddress });
|
|
202
|
+
const url = `${this.endpoint}/api/v1/kyc/dflow${query}`;
|
|
203
|
+
return await utils.httpGet(url);
|
|
204
|
+
}
|
|
205
|
+
// -------------------------------------------------------------------------
|
|
193
206
|
// Trades by wallet
|
|
194
207
|
// -------------------------------------------------------------------------
|
|
195
208
|
/** Maps to `GET /api/v1/trades?source=...&wallet=...`. */
|
|
@@ -937,7 +950,7 @@ function useOrderbook(params, queryOptions = {}) {
|
|
|
937
950
|
queryKey: orderbookQueryKey(params.slug, params.source),
|
|
938
951
|
queryFn: () => client.getOrderbook(params.slug, params.source),
|
|
939
952
|
enabled: Boolean(params.slug),
|
|
940
|
-
refetchInterval:
|
|
953
|
+
refetchInterval: 3e4,
|
|
941
954
|
...queryOptions
|
|
942
955
|
});
|
|
943
956
|
}
|
|
@@ -1102,6 +1115,19 @@ function useDFlowSubmit(mutationOptions = {}) {
|
|
|
1102
1115
|
...mutationOptions
|
|
1103
1116
|
});
|
|
1104
1117
|
}
|
|
1118
|
+
function dflowKYCQueryKey(walletAddress) {
|
|
1119
|
+
return ["predict", "kyc", "dflow", walletAddress];
|
|
1120
|
+
}
|
|
1121
|
+
function useDFlowKYC(walletAddress, queryOptions = {}) {
|
|
1122
|
+
const client = usePredictClient();
|
|
1123
|
+
return reactQuery.useQuery({
|
|
1124
|
+
queryKey: dflowKYCQueryKey(walletAddress ?? ""),
|
|
1125
|
+
queryFn: () => client.checkDFlowKYC(walletAddress),
|
|
1126
|
+
enabled: !!walletAddress,
|
|
1127
|
+
staleTime: 6e4,
|
|
1128
|
+
...queryOptions
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1105
1131
|
function usePredictWsClient() {
|
|
1106
1132
|
const context = react.useContext(PredictContext);
|
|
1107
1133
|
if (!context) {
|
|
@@ -1513,6 +1539,7 @@ exports.candlesticksQueryKey = candlesticksQueryKey;
|
|
|
1513
1539
|
exports.createPredictClient = createPredictClient;
|
|
1514
1540
|
exports.createPredictWsClient = createPredictWsClient;
|
|
1515
1541
|
exports.derivePolymarketApiKey = derivePolymarketApiKey;
|
|
1542
|
+
exports.dflowKYCQueryKey = dflowKYCQueryKey;
|
|
1516
1543
|
exports.dflowQuoteQueryKey = dflowQuoteQueryKey;
|
|
1517
1544
|
exports.eventQueryKey = eventQueryKey;
|
|
1518
1545
|
exports.eventsQueryKey = eventsQueryKey;
|
|
@@ -1539,6 +1566,7 @@ exports.useBalance = useBalance;
|
|
|
1539
1566
|
exports.useCancelOrder = useCancelOrder;
|
|
1540
1567
|
exports.useCandlesticks = useCandlesticks;
|
|
1541
1568
|
exports.useCreatePolymarketOrder = useCreatePolymarketOrder;
|
|
1569
|
+
exports.useDFlowKYC = useDFlowKYC;
|
|
1542
1570
|
exports.useDFlowQuote = useDFlowQuote;
|
|
1543
1571
|
exports.useDFlowSubmit = useDFlowSubmit;
|
|
1544
1572
|
exports.useEvent = useEvent;
|