@liberfi.io/react-predict 0.1.15 → 0.1.16

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.mjs CHANGED
@@ -40,8 +40,8 @@ var PredictClient = class {
40
40
  * Maps to `GET /api/v1/events/:slug?source=...`.
41
41
  *
42
42
  * @param slug - Canonical event slug (e.g. "will-trump-win-2024" for Polymarket
43
- * or "KXBTCD-25FEB-T68000" for DFlow).
44
- * @param source - Upstream provider (`"dflow"` or `"polymarket"`).
43
+ * or "KXBTCD-25FEB-T68000" for Kalshi).
44
+ * @param source - Upstream provider (`"kalshi"` or `"polymarket"`).
45
45
  * @returns The matching event.
46
46
  * @throws When the server responds with 404 or any other non-2xx status.
47
47
  */
@@ -69,7 +69,7 @@ var PredictClient = class {
69
69
  * Maps to `GET /api/v1/markets/:slug?source=...`.
70
70
  *
71
71
  * @param slug - Canonical market slug.
72
- * @param source - Upstream provider (`"dflow"` or `"polymarket"`).
72
+ * @param source - Upstream provider (`"kalshi"` or `"polymarket"`).
73
73
  * @returns The matching market.
74
74
  * @throws When the server responds with 404 or any other non-2xx status.
75
75
  */
@@ -124,7 +124,7 @@ var PredictClient = class {
124
124
  *
125
125
  * Maps to `GET /api/v1/balance?source=...&user=...`.
126
126
  *
127
- * @param source - Provider source (`"dflow"` for Solana, `"polymarket"` for Polygon).
127
+ * @param source - Provider source (`"kalshi"` for Solana, `"polymarket"` for Polygon).
128
128
  * @param user - Wallet address.
129
129
  */
130
130
  async getBalance(source, user) {
@@ -177,14 +177,14 @@ var PredictClient = class {
177
177
  // -------------------------------------------------------------------------
178
178
  // DFlow trading
179
179
  // -------------------------------------------------------------------------
180
- /** Maps to `POST /api/v1/orders/dflow/quote`. */
180
+ /** Maps to `POST /api/v1/orders/kalshi/quote`. */
181
181
  async createDFlowQuote(body) {
182
- const url = `${this.endpoint}/api/v1/orders/dflow/quote`;
182
+ const url = `${this.endpoint}/api/v1/orders/kalshi/quote`;
183
183
  return await httpPost(url, body);
184
184
  }
185
- /** Maps to `POST /api/v1/orders/dflow/submit`. */
185
+ /** Maps to `POST /api/v1/orders/kalshi/submit`. */
186
186
  async submitDFlowTransaction(body) {
187
- const url = `${this.endpoint}/api/v1/orders/dflow/submit`;
187
+ const url = `${this.endpoint}/api/v1/orders/kalshi/submit`;
188
188
  return await httpPost(url, body);
189
189
  }
190
190
  // -------------------------------------------------------------------------
@@ -193,11 +193,11 @@ var PredictClient = class {
193
193
  /**
194
194
  * Check DFlow KYC verification status for a wallet address.
195
195
  *
196
- * Maps to `GET /api/v1/kyc/dflow?wallet_address=...`.
196
+ * Maps to `GET /api/v1/kyc/kalshi?wallet_address=...`.
197
197
  */
198
198
  async checkDFlowKYC(walletAddress) {
199
199
  const query = buildQuery({ wallet_address: walletAddress });
200
- const url = `${this.endpoint}/api/v1/kyc/dflow${query}`;
200
+ const url = `${this.endpoint}/api/v1/kyc/kalshi${query}`;
201
201
  return await httpGet(url);
202
202
  }
203
203
  // -------------------------------------------------------------------------
@@ -1344,7 +1344,7 @@ function useRealtimeTrades({
1344
1344
  if (!old) return old;
1345
1345
  const syntheticTrade = {
1346
1346
  id: trade.trade_id ?? `ws-${msg.ts}`,
1347
- source: "dflow",
1347
+ source: "kalshi",
1348
1348
  side: trade.side,
1349
1349
  outcome: trade.outcome ?? "",
1350
1350
  outcome_index: 0,