@keystrokehq/polymarket 0.0.8 → 0.0.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/_official/index.d.mts +1 -1
- package/dist/_official/index.mjs +1 -1
- package/dist/data.d.mts +6 -6
- package/dist/data.mjs +1 -1
- package/dist/discovery.d.mts +9 -9
- package/dist/discovery.mjs +1 -1
- package/dist/events.d.mts +5 -5
- package/dist/events.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{integration-CTzLOy9r.d.mts → integration-B_E07iTd.d.mts} +3 -4
- package/dist/integration-Bf-3OGOJ.mjs +117 -0
- package/dist/markets.d.mts +7 -7
- package/dist/markets.mjs +1 -1
- package/dist/orderbook.d.mts +4 -4
- package/dist/orderbook.mjs +1 -1
- package/dist/pricing.d.mts +6 -6
- package/dist/pricing.mjs +1 -1
- package/dist/{schemas-BHjW8Fcf.mjs → schemas-DGLbQgHc.mjs} +1 -2
- package/package.json +3 -3
- package/dist/integration-KDxC97JC.mjs +0 -27
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as polymarketBundle } from "../integration-
|
|
1
|
+
import { r as polymarketBundle } from "../integration-B_E07iTd.mjs";
|
|
2
2
|
export { polymarketBundle };
|
package/dist/_official/index.mjs
CHANGED
package/dist/data.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/data.d.ts
|
|
6
6
|
declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -30,7 +30,7 @@ declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
30
30
|
bucket_index: z.ZodOptional<z.ZodNumber>;
|
|
31
31
|
owner: z.ZodOptional<z.ZodString>;
|
|
32
32
|
type: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, z.core.$catchall<z.ZodJSONSchema>>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
33
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
34
34
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
35
35
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
36
36
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -62,7 +62,7 @@ declare const getUserPositions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
62
62
|
icon: z.ZodOptional<z.ZodString>;
|
|
63
63
|
eventSlug: z.ZodOptional<z.ZodString>;
|
|
64
64
|
eventTitle: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
65
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
66
66
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
67
67
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
68
68
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -77,7 +77,7 @@ declare const getMarketHolders: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
77
77
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
78
78
|
value: z.ZodOptional<z.ZodNumber>;
|
|
79
79
|
position: z.ZodOptional<z.ZodString>;
|
|
80
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
80
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
81
81
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
82
82
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
83
83
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -87,7 +87,7 @@ declare const getOpenInterest: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
87
87
|
}, z.core.$strip>, z.ZodObject<{
|
|
88
88
|
conditionId: z.ZodOptional<z.ZodString>;
|
|
89
89
|
openInterest: z.ZodOptional<z.ZodNumber>;
|
|
90
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
90
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
91
91
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
92
92
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
93
93
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -97,7 +97,7 @@ declare const getLiveVolume: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
97
97
|
}, z.core.$strip>, z.ZodObject<{
|
|
98
98
|
volume: z.ZodOptional<z.ZodNumber>;
|
|
99
99
|
volume24hr: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
100
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
101
101
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
102
102
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
103
103
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/data.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, T as tradeSchema, a as holderSchema, c as liveVolumeSchema, m as positionSchema, u as openInterestSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, T as tradeSchema, a as holderSchema, c as liveVolumeSchema, m as positionSchema, u as openInterestSchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/data.ts
|
package/dist/discovery.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/discovery.d.ts
|
|
6
6
|
declare const listTags: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
7
7
|
id: z.ZodString;
|
|
8
8
|
label: z.ZodString;
|
|
9
9
|
slug: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
10
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
11
11
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
12
12
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
13
13
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -17,7 +17,7 @@ declare const listSeries: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$s
|
|
|
17
17
|
title: z.ZodString;
|
|
18
18
|
slug: z.ZodOptional<z.ZodString>;
|
|
19
19
|
description: z.ZodOptional<z.ZodString>;
|
|
20
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
20
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
21
21
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
22
22
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
23
23
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -29,7 +29,7 @@ declare const getSeries: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
29
29
|
title: z.ZodString;
|
|
30
30
|
slug: z.ZodOptional<z.ZodString>;
|
|
31
31
|
description: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
32
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
33
33
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
34
34
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
35
35
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -44,7 +44,7 @@ declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
44
44
|
hasMore: z.ZodOptional<z.ZodBoolean>;
|
|
45
45
|
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
46
46
|
}, z.core.$strip>>;
|
|
47
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
47
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
48
48
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
49
49
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
50
50
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -57,22 +57,22 @@ declare const getProfile: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
57
57
|
bio: z.ZodOptional<z.ZodString>;
|
|
58
58
|
profileImage: z.ZodOptional<z.ZodString>;
|
|
59
59
|
displayUsernamePublic: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
60
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
61
61
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
62
62
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
63
63
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
64
64
|
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
65
|
-
declare const getSportsMetadata: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
65
|
+
declare const getSportsMetadata: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
66
66
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
67
67
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
68
68
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
69
69
|
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
70
|
-
declare const getSportsMarketTypes: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
70
|
+
declare const getSportsMarketTypes: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
71
71
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
72
72
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
73
73
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
74
74
|
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
75
|
-
declare const getSportsTeams: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"
|
|
75
|
+
declare const getSportsTeams: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
76
76
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
77
77
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
78
78
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/discovery.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, S as sportsTeamSchema, _ as profileSchema, b as sportsMarketTypeSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, S as sportsTeamSchema, _ as profileSchema, b as sportsMarketTypeSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/discovery.ts
|
package/dist/events.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/events.d.ts
|
|
6
6
|
declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -75,7 +75,7 @@ declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
75
75
|
slug: z.ZodOptional<z.ZodString>;
|
|
76
76
|
}, z.core.$loose>>>;
|
|
77
77
|
categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
78
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
78
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
79
79
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
80
80
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
81
81
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -133,7 +133,7 @@ declare const getEvent: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
133
133
|
slug: z.ZodOptional<z.ZodString>;
|
|
134
134
|
}, z.core.$loose>>>;
|
|
135
135
|
categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
136
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
136
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
137
137
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
138
138
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
139
139
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -191,7 +191,7 @@ declare const getEventBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
191
191
|
slug: z.ZodOptional<z.ZodString>;
|
|
192
192
|
}, z.core.$loose>>>;
|
|
193
193
|
categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
194
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
194
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
195
195
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
196
196
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
197
197
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -202,7 +202,7 @@ declare const getEventTags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
202
202
|
id: z.ZodString;
|
|
203
203
|
label: z.ZodString;
|
|
204
204
|
slug: z.ZodOptional<z.ZodString>;
|
|
205
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
205
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
206
206
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
207
207
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
208
208
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/events.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, i as eventSchema, o as listEventsParamsSchema, w as tagSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, i as eventSchema, o as listEventsParamsSchema, w as tagSchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/events.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as polymarket, t as PolymarketCredentials } from "./integration-
|
|
1
|
+
import { n as polymarket, t as PolymarketCredentials } from "./integration-B_E07iTd.mjs";
|
|
2
2
|
import { getLiveVolume, getMarketHolders, getOpenInterest, getUserPositions, listTrades } from "./data.mjs";
|
|
3
3
|
import { getProfile, getSeries, getSportsMarketTypes, getSportsMetadata, getSportsTeams, listSeries, listTags, search } from "./discovery.mjs";
|
|
4
4
|
import { getEvent, getEventBySlug, getEventTags, listEvents } from "./events.mjs";
|
|
@@ -90,10 +90,10 @@ declare const listMarketsParamsSchema: z.ZodObject<{
|
|
|
90
90
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
91
91
|
order: z.ZodOptional<z.ZodEnum<{
|
|
92
92
|
volume24hr: "volume24hr";
|
|
93
|
-
volumeNum: "volumeNum";
|
|
94
|
-
liquidityNum: "liquidityNum";
|
|
95
93
|
startDate: "startDate";
|
|
96
94
|
endDate: "endDate";
|
|
95
|
+
volumeNum: "volumeNum";
|
|
96
|
+
liquidityNum: "liquidityNum";
|
|
97
97
|
competitive: "competitive";
|
|
98
98
|
closedTime: "closedTime";
|
|
99
99
|
}>>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as spreadSchema, D as createPolymarketClient, S as sportsTeamSchema, T as tradeSchema, _ as profileSchema, a as holderSchema, b as sportsMarketTypeSchema, c as liveVolumeSchema, d as orderBookEntrySchema, f as orderBookSummarySchema, g as priceHistoryResponseSchema, h as priceHistoryPointSchema, i as eventSchema, l as marketSchema, m as positionSchema, n as clobPriceSchema, o as listEventsParamsSchema, p as paginationParamsSchema, r as clobPricesMapSchema, s as listMarketsParamsSchema, t as clobMidpointSchema, u as openInterestSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-
|
|
2
|
-
import { t as polymarket } from "./integration-
|
|
1
|
+
import { C as spreadSchema, D as createPolymarketClient, S as sportsTeamSchema, T as tradeSchema, _ as profileSchema, a as holderSchema, b as sportsMarketTypeSchema, c as liveVolumeSchema, d as orderBookEntrySchema, f as orderBookSummarySchema, g as priceHistoryResponseSchema, h as priceHistoryPointSchema, i as eventSchema, l as marketSchema, m as positionSchema, n as clobPriceSchema, o as listEventsParamsSchema, p as paginationParamsSchema, r as clobPricesMapSchema, s as listMarketsParamsSchema, t as clobMidpointSchema, u as openInterestSchema, v as searchResultSchema, w as tagSchema, x as sportsMetadataSchema, y as seriesSchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
|
+
import { t as polymarket } from "./integration-Bf-3OGOJ.mjs";
|
|
3
3
|
import { getLiveVolume, getMarketHolders, getOpenInterest, getUserPositions, listTrades } from "./data.mjs";
|
|
4
4
|
import { getProfile, getSeries, getSportsMarketTypes, getSportsMetadata, getSportsTeams, listSeries, listTags, search } from "./discovery.mjs";
|
|
5
5
|
import { getEvent, getEventBySlug, getEventTags, listEvents } from "./events.mjs";
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
3
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
5
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
6
5
|
|
|
7
6
|
//#region src/integration.d.ts
|
|
8
|
-
declare const polymarketBundle:
|
|
7
|
+
declare const polymarketBundle: undefined<"polymarket", z.ZodObject<{
|
|
9
8
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
10
9
|
}, z.core.$strip>>;
|
|
11
|
-
declare const polymarket: _keystrokehq_core0.CredentialSet<"
|
|
10
|
+
declare const polymarket: _keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
12
11
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
13
12
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
14
13
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CredentialSet, Operation } from "@keystrokehq/core";
|
|
3
|
+
|
|
4
|
+
//#region ../../packages/integration-authoring/dist/official/runtime.mjs
|
|
5
|
+
const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
|
|
6
|
+
function getRegistry() {
|
|
7
|
+
const globalStore = globalThis;
|
|
8
|
+
if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
return globalStore[REGISTRY_KEY];
|
|
10
|
+
}
|
|
11
|
+
function registerOfficialOperation(operation, metadata) {
|
|
12
|
+
getRegistry().set(operation, Object.freeze({ ...metadata }));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region ../../packages/integration-authoring/dist/official/index.mjs
|
|
17
|
+
const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
|
|
18
|
+
function stripOfficialCredentialSetIdPrefix(id) {
|
|
19
|
+
return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates a factory for Keystroke-official integration operations.
|
|
23
|
+
*
|
|
24
|
+
* It keeps the same flat `run(input, credentials)` ergonomics as the generic
|
|
25
|
+
* operation factory, while registering official metadata for builder/runtime
|
|
26
|
+
* operation metadata.
|
|
27
|
+
*/
|
|
28
|
+
function createOfficialOperationFactory(credentialSet) {
|
|
29
|
+
const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
|
|
30
|
+
return (config) => {
|
|
31
|
+
const wrappedRun = async (input, ctx) => {
|
|
32
|
+
const creds = ctx.credentials[credentialSet.id];
|
|
33
|
+
return config.run(input, creds);
|
|
34
|
+
};
|
|
35
|
+
const operation = new Operation({
|
|
36
|
+
id: config.id,
|
|
37
|
+
name: config.name,
|
|
38
|
+
description: config.description,
|
|
39
|
+
input: config.input,
|
|
40
|
+
output: config.output,
|
|
41
|
+
credentialSets: [credentialSet],
|
|
42
|
+
...config.tags !== void 0 ? { tags: config.tags } : {},
|
|
43
|
+
...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
|
|
44
|
+
...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
|
|
45
|
+
...config.retries !== void 0 ? { retries: config.retries } : {},
|
|
46
|
+
...config.timeout !== void 0 ? { timeout: config.timeout } : {},
|
|
47
|
+
...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
|
|
48
|
+
run: wrappedRun
|
|
49
|
+
});
|
|
50
|
+
registerOfficialOperation(operation, { integrationId });
|
|
51
|
+
return operation;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates an official integration bundle from a single config object.
|
|
56
|
+
*
|
|
57
|
+
* - Creates the public `CredentialSet` internally.
|
|
58
|
+
* - Accepts optional `internal` fields for Keystroke-owned platform credentials.
|
|
59
|
+
*/
|
|
60
|
+
function defineOfficialIntegration(config) {
|
|
61
|
+
const internalCredentialSets = config.internal ?? {};
|
|
62
|
+
const allInternalCredentialSets = [
|
|
63
|
+
...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
|
|
64
|
+
...internalCredentialSets.providerAppVariants ?? [],
|
|
65
|
+
...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
|
|
66
|
+
...internalCredentialSets.other ?? []
|
|
67
|
+
];
|
|
68
|
+
const credentialSet = new CredentialSet({
|
|
69
|
+
id: config.id,
|
|
70
|
+
name: config.name,
|
|
71
|
+
description: config.description,
|
|
72
|
+
auth: config.auth,
|
|
73
|
+
...config.connections ? { connections: config.connections } : {},
|
|
74
|
+
...config.proxy ? { proxy: config.proxy } : {},
|
|
75
|
+
...config.needsRawSecret === true ? { needsRawSecret: true } : {}
|
|
76
|
+
});
|
|
77
|
+
return Object.freeze({
|
|
78
|
+
integration: {
|
|
79
|
+
id: config.id,
|
|
80
|
+
name: config.name,
|
|
81
|
+
...config.description !== void 0 ? { description: config.description } : {},
|
|
82
|
+
auth: config.auth,
|
|
83
|
+
...config.proxy ? { proxy: config.proxy } : {},
|
|
84
|
+
...config.needsRawSecret === true ? { needsRawSecret: true } : {},
|
|
85
|
+
...config.connections ? { connections: config.connections } : {}
|
|
86
|
+
},
|
|
87
|
+
credentialSet,
|
|
88
|
+
internalCredentialSets,
|
|
89
|
+
allInternalCredentialSets
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/integration.ts
|
|
95
|
+
const polymarketAuthSchema = z.object({ POLYMARKET_API_KEY: z.string().optional() });
|
|
96
|
+
/**
|
|
97
|
+
* Polymarket integration — prediction market data via three public APIs.
|
|
98
|
+
*
|
|
99
|
+
* The API key is stored as a credential and included as a header when present.
|
|
100
|
+
* This enables future support for authenticated CLOB trading endpoints.
|
|
101
|
+
*/
|
|
102
|
+
const polymarketOfficialIntegration = {
|
|
103
|
+
id: "polymarket",
|
|
104
|
+
name: "Polymarket",
|
|
105
|
+
description: "Polymarket — decentralized prediction market data",
|
|
106
|
+
auth: polymarketAuthSchema,
|
|
107
|
+
proxy: { hosts: [
|
|
108
|
+
"gamma-api.polymarket.com",
|
|
109
|
+
"clob.polymarket.com",
|
|
110
|
+
"data-api.polymarket.com"
|
|
111
|
+
] }
|
|
112
|
+
};
|
|
113
|
+
const polymarketBundle = defineOfficialIntegration(polymarketOfficialIntegration);
|
|
114
|
+
const polymarket = polymarketBundle.credentialSet;
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { polymarketBundle as n, createOfficialOperationFactory as r, polymarket as t };
|
package/dist/markets.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/markets.d.ts
|
|
6
6
|
declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -8,10 +8,10 @@ declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
8
8
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
9
9
|
order: z.ZodOptional<z.ZodEnum<{
|
|
10
10
|
volume24hr: "volume24hr";
|
|
11
|
-
volumeNum: "volumeNum";
|
|
12
|
-
liquidityNum: "liquidityNum";
|
|
13
11
|
startDate: "startDate";
|
|
14
12
|
endDate: "endDate";
|
|
13
|
+
volumeNum: "volumeNum";
|
|
14
|
+
liquidityNum: "liquidityNum";
|
|
15
15
|
competitive: "competitive";
|
|
16
16
|
closedTime: "closedTime";
|
|
17
17
|
}>>;
|
|
@@ -60,7 +60,7 @@ declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
60
60
|
enableOrderBook: z.ZodOptional<z.ZodBoolean>;
|
|
61
61
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
62
62
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
63
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
63
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
64
64
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
65
65
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
66
66
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -96,7 +96,7 @@ declare const getMarket: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
96
96
|
enableOrderBook: z.ZodOptional<z.ZodBoolean>;
|
|
97
97
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
98
98
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
99
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
99
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
100
100
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
101
101
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
102
102
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -132,7 +132,7 @@ declare const getMarketBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
132
132
|
enableOrderBook: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
134
134
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
135
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
135
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
136
136
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
137
137
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
138
138
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -143,7 +143,7 @@ declare const getMarketTags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
143
143
|
id: z.ZodString;
|
|
144
144
|
label: z.ZodString;
|
|
145
145
|
slug: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
146
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
147
147
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
148
148
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
149
149
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/markets.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, l as marketSchema, s as listMarketsParamsSchema, w as tagSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, l as marketSchema, s as listMarketsParamsSchema, w as tagSchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/markets.ts
|
package/dist/orderbook.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/orderbook.d.ts
|
|
6
6
|
declare const getOrderBook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -21,7 +21,7 @@ declare const getOrderBook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
21
21
|
min_order_size: z.ZodOptional<z.ZodString>;
|
|
22
22
|
tick_size: z.ZodOptional<z.ZodString>;
|
|
23
23
|
neg_risk: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
24
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
25
25
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
26
26
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
27
27
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -44,7 +44,7 @@ declare const batchGetOrderBooks: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
44
44
|
min_order_size: z.ZodOptional<z.ZodString>;
|
|
45
45
|
tick_size: z.ZodOptional<z.ZodString>;
|
|
46
46
|
neg_risk: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
47
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
48
48
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
49
49
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
50
50
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -56,7 +56,7 @@ declare const batchGetSpreads: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
56
56
|
spread: z.ZodString;
|
|
57
57
|
bid: z.ZodOptional<z.ZodString>;
|
|
58
58
|
ask: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
59
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
60
60
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
61
61
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
62
62
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/orderbook.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as spreadSchema, D as createPolymarketClient, E as polymarketOperation, f as orderBookSummarySchema } from "./schemas-
|
|
1
|
+
import { C as spreadSchema, D as createPolymarketClient, E as polymarketOperation, f as orderBookSummarySchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/orderbook.ts
|
package/dist/pricing.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
|
|
5
5
|
//#region src/pricing.d.ts
|
|
6
6
|
declare const getPrice: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -11,7 +11,7 @@ declare const getPrice: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
11
11
|
}>;
|
|
12
12
|
}, z.core.$strip>, z.ZodObject<{
|
|
13
13
|
price: z.ZodString;
|
|
14
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
14
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
15
15
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
17
17
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -20,7 +20,7 @@ declare const getMidpoint: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
20
20
|
tokenID: z.ZodString;
|
|
21
21
|
}, z.core.$strip>, z.ZodObject<{
|
|
22
22
|
mid: z.ZodString;
|
|
23
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
23
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
24
24
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
25
25
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
26
26
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -28,7 +28,7 @@ declare const getMidpoint: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
28
28
|
declare const listPrices: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
29
29
|
BUY: z.ZodString;
|
|
30
30
|
SELL: z.ZodString;
|
|
31
|
-
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
31
|
+
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
32
32
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
33
33
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
34
34
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -38,7 +38,7 @@ declare const batchGetPrices: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
38
38
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
39
39
|
BUY: z.ZodString;
|
|
40
40
|
SELL: z.ZodString;
|
|
41
|
-
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
41
|
+
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
42
42
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
43
43
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
44
44
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
@@ -54,7 +54,7 @@ declare const getPriceHistory: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
54
54
|
t: z.ZodNumber;
|
|
55
55
|
p: z.ZodNumber;
|
|
56
56
|
}, z.core.$strip>>;
|
|
57
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"
|
|
57
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
58
58
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
59
59
|
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
60
60
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
package/dist/pricing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as createPolymarketClient, E as polymarketOperation, g as priceHistoryResponseSchema, n as clobPriceSchema, r as clobPricesMapSchema, t as clobMidpointSchema } from "./schemas-
|
|
1
|
+
import { D as createPolymarketClient, E as polymarketOperation, g as priceHistoryResponseSchema, n as clobPriceSchema, r as clobPricesMapSchema, t as clobMidpointSchema } from "./schemas-DGLbQgHc.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/pricing.ts
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { t as polymarket } from "./integration-
|
|
1
|
+
import { r as createOfficialOperationFactory, t as polymarket } from "./integration-Bf-3OGOJ.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { createOfficialOperationFactory } from "@keystrokehq/integration-authoring/official";
|
|
4
3
|
|
|
5
4
|
//#region src/client.ts
|
|
6
5
|
const POLYMARKET_HOSTS = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/polymarket",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@keystrokehq/integration-authoring": "^0.0.8",
|
|
48
47
|
"zod": "^4.3.6"
|
|
49
48
|
},
|
|
50
49
|
"peerDependencies": {
|
|
@@ -55,8 +54,9 @@
|
|
|
55
54
|
"tsdown": "^0.20.3",
|
|
56
55
|
"typescript": "^5.9.3",
|
|
57
56
|
"vitest": "^4.0.18",
|
|
58
|
-
"@keystrokehq/core": "^0.0.
|
|
57
|
+
"@keystrokehq/core": "^0.0.12",
|
|
59
58
|
"@keystrokehq/test-utils": "0.0.0",
|
|
59
|
+
"@keystrokehq/integration-authoring": "0.0.9",
|
|
60
60
|
"@keystrokehq/typescript-config": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"keywords": [
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { defineOfficialIntegration } from "@keystrokehq/integration-authoring/official";
|
|
3
|
-
|
|
4
|
-
//#region src/integration.ts
|
|
5
|
-
const polymarketAuthSchema = z.object({ POLYMARKET_API_KEY: z.string().optional() });
|
|
6
|
-
/**
|
|
7
|
-
* Polymarket integration — prediction market data via three public APIs.
|
|
8
|
-
*
|
|
9
|
-
* The API key is stored as a credential and included as a header when present.
|
|
10
|
-
* This enables future support for authenticated CLOB trading endpoints.
|
|
11
|
-
*/
|
|
12
|
-
const polymarketOfficialIntegration = {
|
|
13
|
-
id: "polymarket",
|
|
14
|
-
name: "Polymarket",
|
|
15
|
-
description: "Polymarket — decentralized prediction market data",
|
|
16
|
-
auth: polymarketAuthSchema,
|
|
17
|
-
proxy: { hosts: [
|
|
18
|
-
"gamma-api.polymarket.com",
|
|
19
|
-
"clob.polymarket.com",
|
|
20
|
-
"data-api.polymarket.com"
|
|
21
|
-
] }
|
|
22
|
-
};
|
|
23
|
-
const polymarketBundle = defineOfficialIntegration(polymarketOfficialIntegration);
|
|
24
|
-
const polymarket = polymarketBundle.credentialSet;
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
export { polymarketBundle as n, polymarket as t };
|