@keystrokehq/polymarket 0.0.9 → 0.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/_official/index.d.mts +1 -1
- package/dist/_official/index.mjs +1 -1
- package/dist/data.d.mts +10 -21
- package/dist/data.mjs +1 -1
- package/dist/discovery.d.mts +16 -33
- package/dist/discovery.mjs +1 -1
- package/dist/events.d.mts +8 -17
- package/dist/events.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{integration-B_E07iTd.d.mts → integration-BwWHe7Rh.d.mts} +4 -6
- package/dist/integration-DX7CGwFx.mjs +28 -0
- package/dist/markets.d.mts +10 -19
- package/dist/markets.mjs +1 -1
- package/dist/orderbook.d.mts +6 -13
- package/dist/orderbook.mjs +1 -1
- package/dist/pricing.d.mts +10 -21
- package/dist/pricing.mjs +1 -1
- package/dist/{schemas-DGLbQgHc.mjs → schemas-C_SM7qmm.mjs} +2 -1
- package/package.json +4 -4
- package/dist/integration-Bf-3OGOJ.mjs +0 -117
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as polymarketBundle } from "../integration-
|
|
1
|
+
import { r as polymarketBundle } from "../integration-BwWHe7Rh.mjs";
|
|
2
2
|
export { polymarketBundle };
|
package/dist/_official/index.mjs
CHANGED
package/dist/data.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
3
|
|
|
5
4
|
//#region src/data.d.ts
|
|
6
5
|
declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -30,11 +29,9 @@ declare const listTrades: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
30
29
|
bucket_index: z.ZodOptional<z.ZodNumber>;
|
|
31
30
|
owner: z.ZodOptional<z.ZodString>;
|
|
32
31
|
type: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, z.core.$catchall<z.ZodJSONSchema>>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
32
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
34
33
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
35
|
-
}, z.core.$strip
|
|
36
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
37
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
34
|
+
}, z.core.$strip>>], undefined>;
|
|
38
35
|
declare const getUserPositions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
39
36
|
address: z.ZodString;
|
|
40
37
|
sizeThreshold: z.ZodOptional<z.ZodNumber>;
|
|
@@ -62,11 +59,9 @@ declare const getUserPositions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
62
59
|
icon: z.ZodOptional<z.ZodString>;
|
|
63
60
|
eventSlug: z.ZodOptional<z.ZodString>;
|
|
64
61
|
eventTitle: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
66
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
62
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
68
63
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
69
|
-
}, z.core.$strip>>
|
|
64
|
+
}, z.core.$strip>>], undefined>;
|
|
70
65
|
declare const getMarketHolders: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
71
66
|
conditionId: z.ZodString;
|
|
72
67
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -77,30 +72,24 @@ declare const getMarketHolders: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
77
72
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
78
73
|
value: z.ZodOptional<z.ZodNumber>;
|
|
79
74
|
position: z.ZodOptional<z.ZodString>;
|
|
80
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
81
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
75
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
83
76
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
84
|
-
}, z.core.$strip>>
|
|
77
|
+
}, z.core.$strip>>], undefined>;
|
|
85
78
|
declare const getOpenInterest: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
86
79
|
conditionId: z.ZodString;
|
|
87
80
|
}, z.core.$strip>, z.ZodObject<{
|
|
88
81
|
conditionId: z.ZodOptional<z.ZodString>;
|
|
89
82
|
openInterest: z.ZodOptional<z.ZodNumber>;
|
|
90
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
83
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
91
84
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
92
|
-
}, z.core.$strip
|
|
93
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
94
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
85
|
+
}, z.core.$strip>>], undefined>;
|
|
95
86
|
declare const getLiveVolume: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
96
87
|
eventId: z.ZodString;
|
|
97
88
|
}, z.core.$strip>, z.ZodObject<{
|
|
98
89
|
volume: z.ZodOptional<z.ZodNumber>;
|
|
99
90
|
volume24hr: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
101
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
102
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
91
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
103
92
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
104
|
-
}, z.core.$strip>>
|
|
93
|
+
}, z.core.$strip>>], undefined>;
|
|
105
94
|
//#endregion
|
|
106
95
|
export { getLiveVolume, getMarketHolders, getOpenInterest, getUserPositions, listTrades };
|
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-C_SM7qmm.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/data.ts
|
package/dist/discovery.d.mts
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
3
|
|
|
5
4
|
//#region src/discovery.d.ts
|
|
6
5
|
declare const listTags: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
7
6
|
id: z.ZodString;
|
|
8
7
|
label: z.ZodString;
|
|
9
8
|
slug: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
9
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
11
10
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, z.core.$strip
|
|
13
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
11
|
+
}, z.core.$strip>>], undefined>;
|
|
15
12
|
declare const listSeries: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
16
13
|
id: z.ZodString;
|
|
17
14
|
title: z.ZodString;
|
|
18
15
|
slug: z.ZodOptional<z.ZodString>;
|
|
19
16
|
description: z.ZodOptional<z.ZodString>;
|
|
20
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
21
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
17
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
23
18
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, z.core.$strip>>
|
|
19
|
+
}, z.core.$strip>>], undefined>;
|
|
25
20
|
declare const getSeries: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
26
21
|
id: z.ZodString;
|
|
27
22
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -29,11 +24,9 @@ declare const getSeries: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
29
24
|
title: z.ZodString;
|
|
30
25
|
slug: z.ZodOptional<z.ZodString>;
|
|
31
26
|
description: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
27
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
33
28
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
34
|
-
}, z.core.$strip
|
|
35
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
36
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
29
|
+
}, z.core.$strip>>], undefined>;
|
|
37
30
|
declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
38
31
|
q: z.ZodString;
|
|
39
32
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -44,11 +37,9 @@ declare const search: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
44
37
|
hasMore: z.ZodOptional<z.ZodBoolean>;
|
|
45
38
|
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
46
39
|
}, z.core.$strip>>;
|
|
47
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
48
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
49
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
40
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
50
41
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, z.core.$strip>>
|
|
42
|
+
}, z.core.$strip>>], undefined>;
|
|
52
43
|
declare const getProfile: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
53
44
|
address: z.ZodString;
|
|
54
45
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -57,25 +48,17 @@ declare const getProfile: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
57
48
|
bio: z.ZodOptional<z.ZodString>;
|
|
58
49
|
profileImage: z.ZodOptional<z.ZodString>;
|
|
59
50
|
displayUsernamePublic: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
61
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
62
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
63
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
64
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
65
|
-
declare const getSportsMetadata: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
66
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
68
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
69
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
70
|
-
declare const getSportsMarketTypes: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
51
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
71
52
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
72
|
-
}, z.core.$strip
|
|
53
|
+
}, z.core.$strip>>], undefined>;
|
|
54
|
+
declare const getSportsMetadata: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
73
55
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
74
|
-
}, z.core.$strip>>
|
|
75
|
-
declare const
|
|
56
|
+
}, z.core.$strip>>], undefined>;
|
|
57
|
+
declare const getSportsMarketTypes: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
76
58
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
77
|
-
}, z.core.$strip
|
|
59
|
+
}, z.core.$strip>>], undefined>;
|
|
60
|
+
declare const getSportsTeams: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodUnknown, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
78
61
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
79
|
-
}, z.core.$strip>>
|
|
62
|
+
}, z.core.$strip>>], undefined>;
|
|
80
63
|
//#endregion
|
|
81
64
|
export { getProfile, getSeries, getSportsMarketTypes, getSportsMetadata, getSportsTeams, listSeries, listTags, search };
|
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-C_SM7qmm.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/discovery.ts
|
package/dist/events.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
3
|
|
|
5
4
|
//#region src/events.d.ts
|
|
6
5
|
declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -75,11 +74,9 @@ declare const listEvents: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
75
74
|
slug: z.ZodOptional<z.ZodString>;
|
|
76
75
|
}, z.core.$loose>>>;
|
|
77
76
|
categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
78
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
77
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
79
78
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
80
|
-
}, z.core.$strip
|
|
81
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
79
|
+
}, z.core.$strip>>], undefined>;
|
|
83
80
|
declare const getEvent: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
84
81
|
id: z.ZodString;
|
|
85
82
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -133,11 +130,9 @@ declare const getEvent: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
133
130
|
slug: z.ZodOptional<z.ZodString>;
|
|
134
131
|
}, z.core.$loose>>>;
|
|
135
132
|
categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
136
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
137
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
138
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
133
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
139
134
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
140
|
-
}, z.core.$strip>>
|
|
135
|
+
}, z.core.$strip>>], undefined>;
|
|
141
136
|
declare const getEventBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
142
137
|
slug: z.ZodString;
|
|
143
138
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -191,21 +186,17 @@ declare const getEventBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
191
186
|
slug: z.ZodOptional<z.ZodString>;
|
|
192
187
|
}, z.core.$loose>>>;
|
|
193
188
|
categories: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
194
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
189
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
195
190
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
196
|
-
}, z.core.$strip
|
|
197
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
198
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
191
|
+
}, z.core.$strip>>], undefined>;
|
|
199
192
|
declare const getEventTags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
200
193
|
id: z.ZodString;
|
|
201
194
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
202
195
|
id: z.ZodString;
|
|
203
196
|
label: z.ZodString;
|
|
204
197
|
slug: z.ZodOptional<z.ZodString>;
|
|
205
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
206
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
207
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
198
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
208
199
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
209
|
-
}, z.core.$strip>>
|
|
200
|
+
}, z.core.$strip>>], undefined>;
|
|
210
201
|
//#endregion
|
|
211
202
|
export { getEvent, getEventBySlug, getEventTags, listEvents };
|
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-C_SM7qmm.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-BwWHe7Rh.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
|
-
startDate: "startDate";
|
|
94
|
-
endDate: "endDate";
|
|
95
93
|
volumeNum: "volumeNum";
|
|
96
94
|
liquidityNum: "liquidityNum";
|
|
95
|
+
startDate: "startDate";
|
|
96
|
+
endDate: "endDate";
|
|
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-C_SM7qmm.mjs";
|
|
2
|
+
import { t as polymarket } from "./integration-DX7CGwFx.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,17 +1,15 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
|
|
2
3
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
4
|
import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
|
|
5
5
|
|
|
6
6
|
//#region src/integration.d.ts
|
|
7
|
-
declare const polymarketBundle:
|
|
7
|
+
declare const polymarketBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"polymarket", z.ZodObject<{
|
|
8
8
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
9
9
|
}, z.core.$strip>>;
|
|
10
|
-
declare const polymarket: _keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
10
|
+
declare const polymarket: _keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
11
11
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, z.core.$strip
|
|
13
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, z.core.$strip>>[] | undefined>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
15
13
|
/**
|
|
16
14
|
* Credentials injected into steps.
|
|
17
15
|
* Derived from the integration definition.
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
credentialType: "manual",
|
|
17
|
+
auth: polymarketAuthSchema,
|
|
18
|
+
proxy: { hosts: [
|
|
19
|
+
"gamma-api.polymarket.com",
|
|
20
|
+
"clob.polymarket.com",
|
|
21
|
+
"data-api.polymarket.com"
|
|
22
|
+
] }
|
|
23
|
+
};
|
|
24
|
+
const polymarketBundle = defineOfficialIntegration(polymarketOfficialIntegration);
|
|
25
|
+
const polymarket = polymarketBundle.credentialSet;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { polymarketBundle as n, polymarket as t };
|
package/dist/markets.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
3
|
|
|
5
4
|
//#region src/markets.d.ts
|
|
6
5
|
declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -8,10 +7,10 @@ declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
8
7
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
9
8
|
order: z.ZodOptional<z.ZodEnum<{
|
|
10
9
|
volume24hr: "volume24hr";
|
|
11
|
-
startDate: "startDate";
|
|
12
|
-
endDate: "endDate";
|
|
13
10
|
volumeNum: "volumeNum";
|
|
14
11
|
liquidityNum: "liquidityNum";
|
|
12
|
+
startDate: "startDate";
|
|
13
|
+
endDate: "endDate";
|
|
15
14
|
competitive: "competitive";
|
|
16
15
|
closedTime: "closedTime";
|
|
17
16
|
}>>;
|
|
@@ -60,11 +59,9 @@ declare const listMarkets: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
60
59
|
enableOrderBook: z.ZodOptional<z.ZodBoolean>;
|
|
61
60
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
62
61
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
63
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
62
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
64
63
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, z.core.$strip
|
|
66
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
64
|
+
}, z.core.$strip>>], undefined>;
|
|
68
65
|
declare const getMarket: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
69
66
|
id: z.ZodString;
|
|
70
67
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -96,11 +93,9 @@ declare const getMarket: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
96
93
|
enableOrderBook: z.ZodOptional<z.ZodBoolean>;
|
|
97
94
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
98
95
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
99
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
100
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
101
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
96
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
102
97
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
103
|
-
}, z.core.$strip>>
|
|
98
|
+
}, z.core.$strip>>], undefined>;
|
|
104
99
|
declare const getMarketBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
105
100
|
slug: z.ZodString;
|
|
106
101
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -132,21 +127,17 @@ declare const getMarketBySlug: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
132
127
|
enableOrderBook: z.ZodOptional<z.ZodBoolean>;
|
|
133
128
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
134
129
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
135
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
130
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
136
131
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
137
|
-
}, z.core.$strip
|
|
138
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
139
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
132
|
+
}, z.core.$strip>>], undefined>;
|
|
140
133
|
declare const getMarketTags: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
141
134
|
id: z.ZodString;
|
|
142
135
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
143
136
|
id: z.ZodString;
|
|
144
137
|
label: z.ZodString;
|
|
145
138
|
slug: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
147
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
148
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
139
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
149
140
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, z.core.$strip>>
|
|
141
|
+
}, z.core.$strip>>], undefined>;
|
|
151
142
|
//#endregion
|
|
152
143
|
export { getMarket, getMarketBySlug, getMarketTags, listMarkets };
|
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-C_SM7qmm.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/markets.ts
|
package/dist/orderbook.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
3
|
|
|
5
4
|
//#region src/orderbook.d.ts
|
|
6
5
|
declare const getOrderBook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -21,11 +20,9 @@ declare const getOrderBook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
21
20
|
min_order_size: z.ZodOptional<z.ZodString>;
|
|
22
21
|
tick_size: z.ZodOptional<z.ZodString>;
|
|
23
22
|
neg_risk: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
23
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
25
24
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
26
|
-
}, z.core.$strip
|
|
27
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
25
|
+
}, z.core.$strip>>], undefined>;
|
|
29
26
|
declare const batchGetOrderBooks: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
30
27
|
tokenIDs: z.ZodArray<z.ZodString>;
|
|
31
28
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
@@ -44,11 +41,9 @@ declare const batchGetOrderBooks: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
44
41
|
min_order_size: z.ZodOptional<z.ZodString>;
|
|
45
42
|
tick_size: z.ZodOptional<z.ZodString>;
|
|
46
43
|
neg_risk: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
48
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
49
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
44
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
50
45
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, z.core.$strip>>
|
|
46
|
+
}, z.core.$strip>>], undefined>;
|
|
52
47
|
declare const batchGetSpreads: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
53
48
|
tokenIDs: z.ZodArray<z.ZodString>;
|
|
54
49
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
@@ -56,10 +51,8 @@ declare const batchGetSpreads: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
56
51
|
spread: z.ZodString;
|
|
57
52
|
bid: z.ZodOptional<z.ZodString>;
|
|
58
53
|
ask: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
60
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
61
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
54
|
+
}, z.core.$loose>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
62
55
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
63
|
-
}, z.core.$strip>>
|
|
56
|
+
}, z.core.$strip>>], undefined>;
|
|
64
57
|
//#endregion
|
|
65
58
|
export { batchGetOrderBooks, batchGetSpreads, getOrderBook };
|
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-C_SM7qmm.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/orderbook.ts
|
package/dist/pricing.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
3
|
|
|
5
4
|
//#region src/pricing.d.ts
|
|
6
5
|
declare const getPrice: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -11,38 +10,30 @@ declare const getPrice: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
11
10
|
}>;
|
|
12
11
|
}, z.core.$strip>, z.ZodObject<{
|
|
13
12
|
price: z.ZodString;
|
|
14
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
13
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
15
14
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
16
|
-
}, z.core.$strip
|
|
17
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
18
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
15
|
+
}, z.core.$strip>>], undefined>;
|
|
19
16
|
declare const getMidpoint: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
20
17
|
tokenID: z.ZodString;
|
|
21
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
22
19
|
mid: z.ZodString;
|
|
23
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
24
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
25
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
20
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
26
21
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, z.core.$strip>>
|
|
22
|
+
}, z.core.$strip>>], undefined>;
|
|
28
23
|
declare const listPrices: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
29
24
|
BUY: z.ZodString;
|
|
30
25
|
SELL: z.ZodString;
|
|
31
|
-
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
32
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
26
|
+
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
34
27
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
35
|
-
}, z.core.$strip>>
|
|
28
|
+
}, z.core.$strip>>], undefined>;
|
|
36
29
|
declare const batchGetPrices: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
37
30
|
tokenIDs: z.ZodArray<z.ZodString>;
|
|
38
31
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
39
32
|
BUY: z.ZodString;
|
|
40
33
|
SELL: z.ZodString;
|
|
41
|
-
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
34
|
+
}, z.core.$strip>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
42
35
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
43
|
-
}, z.core.$strip
|
|
44
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
45
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
36
|
+
}, z.core.$strip>>], undefined>;
|
|
46
37
|
declare const getPriceHistory: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
47
38
|
tokenID: z.ZodString;
|
|
48
39
|
interval: z.ZodOptional<z.ZodString>;
|
|
@@ -54,10 +45,8 @@ declare const getPriceHistory: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
|
54
45
|
t: z.ZodNumber;
|
|
55
46
|
p: z.ZodNumber;
|
|
56
47
|
}, z.core.$strip>>;
|
|
57
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"polymarket", z.ZodObject<{
|
|
58
|
-
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
48
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:polymarket", z.ZodObject<{
|
|
60
49
|
POLYMARKET_API_KEY: z.ZodOptional<z.ZodString>;
|
|
61
|
-
}, z.core.$strip>>
|
|
50
|
+
}, z.core.$strip>>], undefined>;
|
|
62
51
|
//#endregion
|
|
63
52
|
export { batchGetPrices, getMidpoint, getPrice, getPriceHistory, listPrices };
|
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-C_SM7qmm.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/pricing.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as polymarket } from "./integration-DX7CGwFx.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { createOfficialOperationFactory } from "@keystrokehq/integration-authoring/official";
|
|
3
4
|
|
|
4
5
|
//#region src/client.ts
|
|
5
6
|
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.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"LICENSE"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
+
"@keystrokehq/integration-authoring": "^0.0.9",
|
|
47
48
|
"zod": "^4.3.6"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
|
-
"@keystrokehq/core": ">=0.0.
|
|
51
|
+
"@keystrokehq/core": ">=0.0.13 <0.1.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@types/node": "^22.19.11",
|
|
54
55
|
"tsdown": "^0.20.3",
|
|
55
56
|
"typescript": "^5.9.3",
|
|
56
57
|
"vitest": "^4.0.18",
|
|
57
|
-
"@keystrokehq/core": "^0.0.
|
|
58
|
+
"@keystrokehq/core": "^0.0.13",
|
|
58
59
|
"@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,117 +0,0 @@
|
|
|
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 };
|