@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.mjs
CHANGED
|
@@ -188,6 +188,19 @@ var PredictClient = class {
|
|
|
188
188
|
return await httpPost(url, body);
|
|
189
189
|
}
|
|
190
190
|
// -------------------------------------------------------------------------
|
|
191
|
+
// KYC
|
|
192
|
+
// -------------------------------------------------------------------------
|
|
193
|
+
/**
|
|
194
|
+
* Check DFlow KYC verification status for a wallet address.
|
|
195
|
+
*
|
|
196
|
+
* Maps to `GET /api/v1/kyc/dflow?wallet_address=...`.
|
|
197
|
+
*/
|
|
198
|
+
async checkDFlowKYC(walletAddress) {
|
|
199
|
+
const query = buildQuery({ wallet_address: walletAddress });
|
|
200
|
+
const url = `${this.endpoint}/api/v1/kyc/dflow${query}`;
|
|
201
|
+
return await httpGet(url);
|
|
202
|
+
}
|
|
203
|
+
// -------------------------------------------------------------------------
|
|
191
204
|
// Trades by wallet
|
|
192
205
|
// -------------------------------------------------------------------------
|
|
193
206
|
/** Maps to `GET /api/v1/trades?source=...&wallet=...`. */
|
|
@@ -935,7 +948,7 @@ function useOrderbook(params, queryOptions = {}) {
|
|
|
935
948
|
queryKey: orderbookQueryKey(params.slug, params.source),
|
|
936
949
|
queryFn: () => client.getOrderbook(params.slug, params.source),
|
|
937
950
|
enabled: Boolean(params.slug),
|
|
938
|
-
refetchInterval:
|
|
951
|
+
refetchInterval: 3e4,
|
|
939
952
|
...queryOptions
|
|
940
953
|
});
|
|
941
954
|
}
|
|
@@ -1100,6 +1113,19 @@ function useDFlowSubmit(mutationOptions = {}) {
|
|
|
1100
1113
|
...mutationOptions
|
|
1101
1114
|
});
|
|
1102
1115
|
}
|
|
1116
|
+
function dflowKYCQueryKey(walletAddress) {
|
|
1117
|
+
return ["predict", "kyc", "dflow", walletAddress];
|
|
1118
|
+
}
|
|
1119
|
+
function useDFlowKYC(walletAddress, queryOptions = {}) {
|
|
1120
|
+
const client = usePredictClient();
|
|
1121
|
+
return useQuery({
|
|
1122
|
+
queryKey: dflowKYCQueryKey(walletAddress ?? ""),
|
|
1123
|
+
queryFn: () => client.checkDFlowKYC(walletAddress),
|
|
1124
|
+
enabled: !!walletAddress,
|
|
1125
|
+
staleTime: 6e4,
|
|
1126
|
+
...queryOptions
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1103
1129
|
function usePredictWsClient() {
|
|
1104
1130
|
const context = useContext(PredictContext);
|
|
1105
1131
|
if (!context) {
|
|
@@ -1485,6 +1511,6 @@ function useCreatePolymarketOrder(mutationOptions = {}) {
|
|
|
1485
1511
|
});
|
|
1486
1512
|
}
|
|
1487
1513
|
|
|
1488
|
-
export { CLOB_AUTH_DOMAIN, CLOB_AUTH_TYPES, CTF_EXCHANGE_ADDRESS, CTF_ORDER_TYPES, ChartRange, NEG_RISK_CTF_EXCHANGE_ADDRESS, ORDER_TYPE, POLYGON_CHAIN_ID, PolymarketContext, PolymarketProvider, PredictClient, PredictContext, PredictProvider, PredictWsClient, SIDE, USDC_ADDRESS, balanceQueryKey, buildClobAuthMessage, buildCtfExchangeDomain, buildOrderMessage, buildPolymarketL2Headers, buildSignedOrder, candlesticksQueryKey, createPredictClient, createPredictWsClient, derivePolymarketApiKey, dflowQuoteQueryKey, eventQueryKey, eventsQueryKey, fetchEvent, fetchEvents, fetchEventsPage, fetchMarket, hmacSha256Base64, infiniteEventsQueryKey, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, positionsQueryKey, priceHistoryQueryKey, resolveEventsParams, resolveTagSlug, 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 };
|
|
1514
|
+
export { CLOB_AUTH_DOMAIN, CLOB_AUTH_TYPES, CTF_EXCHANGE_ADDRESS, CTF_ORDER_TYPES, ChartRange, NEG_RISK_CTF_EXCHANGE_ADDRESS, ORDER_TYPE, POLYGON_CHAIN_ID, PolymarketContext, PolymarketProvider, PredictClient, PredictContext, PredictProvider, PredictWsClient, SIDE, USDC_ADDRESS, balanceQueryKey, buildClobAuthMessage, buildCtfExchangeDomain, buildOrderMessage, buildPolymarketL2Headers, buildSignedOrder, candlesticksQueryKey, createPredictClient, createPredictWsClient, derivePolymarketApiKey, dflowKYCQueryKey, dflowQuoteQueryKey, eventQueryKey, eventsQueryKey, fetchEvent, fetchEvents, fetchEventsPage, fetchMarket, hmacSha256Base64, infiniteEventsQueryKey, infiniteOrdersQueryKey, infiniteTradesQueryKey, marketQueryKey, marketTradesQueryKey, orderQueryKey, orderbookQueryKey, ordersQueryKey, positionsQueryKey, priceHistoryQueryKey, resolveEventsParams, resolveTagSlug, 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 };
|
|
1489
1515
|
//# sourceMappingURL=index.mjs.map
|
|
1490
1516
|
//# sourceMappingURL=index.mjs.map
|