@illalabs/interfaces 0.14.1 → 0.15.0-canary-dev-6c22f040
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/schemas/polymarketBody.d.ts +113 -0
- package/dist/schemas/polymarketBody.d.ts.map +1 -1
- package/dist/schemas/polymarketBody.js +50 -2
- package/dist/schemas/polymarketBody.js.map +1 -1
- package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +60 -5
- package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -116,6 +116,59 @@ export declare const postOrderBodySchema: z.ZodObject<{
|
|
|
116
116
|
safeAddress: string;
|
|
117
117
|
eoaAddress: string;
|
|
118
118
|
operation: 0 | 1;
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
type: z.ZodLiteral<"WALLET_CREATE">;
|
|
121
|
+
ownerAddress: z.ZodString;
|
|
122
|
+
depositWalletAddress: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
type: "WALLET_CREATE";
|
|
125
|
+
ownerAddress: string;
|
|
126
|
+
depositWalletAddress: string;
|
|
127
|
+
}, {
|
|
128
|
+
type: "WALLET_CREATE";
|
|
129
|
+
ownerAddress: string;
|
|
130
|
+
depositWalletAddress: string;
|
|
131
|
+
}>, z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<"WALLET_BATCH">;
|
|
133
|
+
ownerAddress: z.ZodString;
|
|
134
|
+
depositWalletAddress: z.ZodString;
|
|
135
|
+
nonce: z.ZodString;
|
|
136
|
+
deadline: z.ZodString;
|
|
137
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
138
|
+
target: z.ZodString;
|
|
139
|
+
value: z.ZodString;
|
|
140
|
+
data: z.ZodString;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
data: string;
|
|
143
|
+
value: string;
|
|
144
|
+
target: string;
|
|
145
|
+
}, {
|
|
146
|
+
data: string;
|
|
147
|
+
value: string;
|
|
148
|
+
target: string;
|
|
149
|
+
}>, "many">;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
type: "WALLET_BATCH";
|
|
152
|
+
nonce: string;
|
|
153
|
+
ownerAddress: string;
|
|
154
|
+
depositWalletAddress: string;
|
|
155
|
+
deadline: string;
|
|
156
|
+
calls: {
|
|
157
|
+
data: string;
|
|
158
|
+
value: string;
|
|
159
|
+
target: string;
|
|
160
|
+
}[];
|
|
161
|
+
}, {
|
|
162
|
+
type: "WALLET_BATCH";
|
|
163
|
+
nonce: string;
|
|
164
|
+
ownerAddress: string;
|
|
165
|
+
depositWalletAddress: string;
|
|
166
|
+
deadline: string;
|
|
167
|
+
calls: {
|
|
168
|
+
data: string;
|
|
169
|
+
value: string;
|
|
170
|
+
target: string;
|
|
171
|
+
}[];
|
|
119
172
|
}>]>;
|
|
120
173
|
}, "strip", z.ZodTypeAny, {
|
|
121
174
|
id: string;
|
|
@@ -132,6 +185,21 @@ export declare const postOrderBodySchema: z.ZodObject<{
|
|
|
132
185
|
safeAddress: string;
|
|
133
186
|
eoaAddress: string;
|
|
134
187
|
operation: 0 | 1;
|
|
188
|
+
} | {
|
|
189
|
+
type: "WALLET_CREATE";
|
|
190
|
+
ownerAddress: string;
|
|
191
|
+
depositWalletAddress: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: "WALLET_BATCH";
|
|
194
|
+
nonce: string;
|
|
195
|
+
ownerAddress: string;
|
|
196
|
+
depositWalletAddress: string;
|
|
197
|
+
deadline: string;
|
|
198
|
+
calls: {
|
|
199
|
+
data: string;
|
|
200
|
+
value: string;
|
|
201
|
+
target: string;
|
|
202
|
+
}[];
|
|
135
203
|
};
|
|
136
204
|
signature: string;
|
|
137
205
|
}, {
|
|
@@ -149,6 +217,21 @@ export declare const postOrderBodySchema: z.ZodObject<{
|
|
|
149
217
|
safeAddress: string;
|
|
150
218
|
eoaAddress: string;
|
|
151
219
|
operation: 0 | 1;
|
|
220
|
+
} | {
|
|
221
|
+
type: "WALLET_CREATE";
|
|
222
|
+
ownerAddress: string;
|
|
223
|
+
depositWalletAddress: string;
|
|
224
|
+
} | {
|
|
225
|
+
type: "WALLET_BATCH";
|
|
226
|
+
nonce: string;
|
|
227
|
+
ownerAddress: string;
|
|
228
|
+
depositWalletAddress: string;
|
|
229
|
+
deadline: string;
|
|
230
|
+
calls: {
|
|
231
|
+
data: string;
|
|
232
|
+
value: string;
|
|
233
|
+
target: string;
|
|
234
|
+
}[];
|
|
152
235
|
};
|
|
153
236
|
signature: string;
|
|
154
237
|
}>, "many">>;
|
|
@@ -192,6 +275,21 @@ export declare const postOrderBodySchema: z.ZodObject<{
|
|
|
192
275
|
safeAddress: string;
|
|
193
276
|
eoaAddress: string;
|
|
194
277
|
operation: 0 | 1;
|
|
278
|
+
} | {
|
|
279
|
+
type: "WALLET_CREATE";
|
|
280
|
+
ownerAddress: string;
|
|
281
|
+
depositWalletAddress: string;
|
|
282
|
+
} | {
|
|
283
|
+
type: "WALLET_BATCH";
|
|
284
|
+
nonce: string;
|
|
285
|
+
ownerAddress: string;
|
|
286
|
+
depositWalletAddress: string;
|
|
287
|
+
deadline: string;
|
|
288
|
+
calls: {
|
|
289
|
+
data: string;
|
|
290
|
+
value: string;
|
|
291
|
+
target: string;
|
|
292
|
+
}[];
|
|
195
293
|
};
|
|
196
294
|
signature: string;
|
|
197
295
|
}[] | undefined;
|
|
@@ -232,6 +330,21 @@ export declare const postOrderBodySchema: z.ZodObject<{
|
|
|
232
330
|
safeAddress: string;
|
|
233
331
|
eoaAddress: string;
|
|
234
332
|
operation: 0 | 1;
|
|
333
|
+
} | {
|
|
334
|
+
type: "WALLET_CREATE";
|
|
335
|
+
ownerAddress: string;
|
|
336
|
+
depositWalletAddress: string;
|
|
337
|
+
} | {
|
|
338
|
+
type: "WALLET_BATCH";
|
|
339
|
+
nonce: string;
|
|
340
|
+
ownerAddress: string;
|
|
341
|
+
depositWalletAddress: string;
|
|
342
|
+
deadline: string;
|
|
343
|
+
calls: {
|
|
344
|
+
data: string;
|
|
345
|
+
value: string;
|
|
346
|
+
target: string;
|
|
347
|
+
}[];
|
|
235
348
|
};
|
|
236
349
|
signature: string;
|
|
237
350
|
}[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymarketBody.d.ts","sourceRoot":"","sources":["../../src/schemas/polymarketBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"polymarketBody.d.ts","sourceRoot":"","sources":["../../src/schemas/polymarketBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwIxB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;QArH5B;;;;WAIG;;QAEH;;;;WAIG;;QAKH;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwHL,CAAC;AAEH,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAiBhE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwB,CAAC;AAE1D,sDAAsD;AACtD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwB,CAAC;AAE5D,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AAEH,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEH,uDAAuD;AACvD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -55,7 +55,30 @@ const authDataSchema = z.object({
|
|
|
55
55
|
});
|
|
56
56
|
/** Zod schema for Safe operation types. */
|
|
57
57
|
const safeOperationSchema = z.union([z.literal(0), z.literal(1)]);
|
|
58
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Zod schema for a single batched call inside a `WALLET_BATCH` deposit-wallet
|
|
60
|
+
* operation. Each call describes one external contract call the deposit
|
|
61
|
+
* wallet should execute on-chain (target, ETH value, calldata).
|
|
62
|
+
*/
|
|
63
|
+
const depositWalletBatchCallSchema = z.object({
|
|
64
|
+
target: z.string(),
|
|
65
|
+
value: z.string(),
|
|
66
|
+
data: z.string(),
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Zod schema for relayer-operation metadata.
|
|
70
|
+
*
|
|
71
|
+
* The post-order flow can carry signed prerequisites for two different
|
|
72
|
+
* trading-wallet kinds:
|
|
73
|
+
*
|
|
74
|
+
* - **Safe** (legacy users) — `SAFE_CREATE` / `SAFE_EXECUTE`.
|
|
75
|
+
* - **Deposit wallet** (post-2026-05-04 ERC-1967 wallets, Polymarket's new
|
|
76
|
+
* onboarding path) — `WALLET_CREATE` / `WALLET_BATCH`.
|
|
77
|
+
*
|
|
78
|
+
* Both branches reach the same backend dispatcher (`processWalletOperations`),
|
|
79
|
+
* which switches on `metadata.type`. Keeping the variants in one discriminated
|
|
80
|
+
* union here means the request body validates regardless of wallet kind.
|
|
81
|
+
*/
|
|
59
82
|
const operationMetadataSchema = z.union([
|
|
60
83
|
z.object({
|
|
61
84
|
type: z.literal("SAFE_CREATE"),
|
|
@@ -72,8 +95,33 @@ const operationMetadataSchema = z.union([
|
|
|
72
95
|
data: z.string(),
|
|
73
96
|
operation: safeOperationSchema,
|
|
74
97
|
}),
|
|
98
|
+
z.object({
|
|
99
|
+
// Deploys an ERC-1967 deposit wallet via the relayer. No user
|
|
100
|
+
// signature needed — the relayer accepts requests authenticated
|
|
101
|
+
// only with our builder HMAC. The deposit wallet address is
|
|
102
|
+
// CREATE2-derived from `ownerAddress`, so the relayer recomputes
|
|
103
|
+
// it server-side and the value here is informational.
|
|
104
|
+
type: z.literal("WALLET_CREATE"),
|
|
105
|
+
ownerAddress: z.string(),
|
|
106
|
+
depositWalletAddress: z.string(),
|
|
107
|
+
}),
|
|
108
|
+
z.object({
|
|
109
|
+
// Runs a set of calls through an already-deployed deposit wallet.
|
|
110
|
+
// Signed by the wallet's owner over the EIP-712 `DepositWallet.Batch`
|
|
111
|
+
// struct (plain 65-byte ECDSA, NOT ERC-7739).
|
|
112
|
+
type: z.literal("WALLET_BATCH"),
|
|
113
|
+
ownerAddress: z.string(),
|
|
114
|
+
depositWalletAddress: z.string(),
|
|
115
|
+
nonce: z.string(),
|
|
116
|
+
deadline: z.string(),
|
|
117
|
+
calls: z.array(depositWalletBatchCallSchema),
|
|
118
|
+
}),
|
|
75
119
|
]);
|
|
76
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Zod schema for additional signed operations attached to a post-order
|
|
122
|
+
* request — Safe deploy/approvals on the legacy path, deposit-wallet
|
|
123
|
+
* create/batch on the new path.
|
|
124
|
+
*/
|
|
77
125
|
const signedOperationSchema = z.object({
|
|
78
126
|
id: z.string(),
|
|
79
127
|
signature: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymarketBody.js","sourceRoot":"","sources":["../../src/schemas/polymarketBody.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IACzE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;IAC3F,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IACzF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAClE;;;;OAIG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACzF;;;;OAIG;IACH,QAAQ,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6DAA6D,CAAC;I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CAAC,CAAC"}
|
|
@@ -42,7 +42,10 @@ export type AuthDataSchema = z.ZodObject<{
|
|
|
42
42
|
address: z.ZodString;
|
|
43
43
|
}>;
|
|
44
44
|
/**
|
|
45
|
-
* Schema for SAFE_CREATE operation metadata
|
|
45
|
+
* Schema for SAFE_CREATE operation metadata.
|
|
46
|
+
*
|
|
47
|
+
* Carried in `additionalSignatures` for legacy Safe-backed users. The
|
|
48
|
+
* relayer deploys a fresh Gnosis Safe via the SafeProxyFactory.
|
|
46
49
|
*/
|
|
47
50
|
export type SafeCreateMetadataSchema = z.ZodObject<{
|
|
48
51
|
type: z.ZodLiteral<"SAFE_CREATE">;
|
|
@@ -51,7 +54,10 @@ export type SafeCreateMetadataSchema = z.ZodObject<{
|
|
|
51
54
|
safeFactory: z.ZodOptional<z.ZodString>;
|
|
52
55
|
}>;
|
|
53
56
|
/**
|
|
54
|
-
* Schema for SAFE_EXECUTE operation metadata
|
|
57
|
+
* Schema for SAFE_EXECUTE operation metadata.
|
|
58
|
+
*
|
|
59
|
+
* Carried in `additionalSignatures` for Safe-backed approvals / token
|
|
60
|
+
* pre-approvals before order placement.
|
|
55
61
|
*/
|
|
56
62
|
export type SafeExecuteMetadataSchema = z.ZodObject<{
|
|
57
63
|
type: z.ZodLiteral<"SAFE_EXECUTE">;
|
|
@@ -63,14 +69,63 @@ export type SafeExecuteMetadataSchema = z.ZodObject<{
|
|
|
63
69
|
operation: z.ZodNumber;
|
|
64
70
|
}>;
|
|
65
71
|
/**
|
|
66
|
-
*
|
|
72
|
+
* Schema for one batched call inside a `WALLET_BATCH` operation.
|
|
73
|
+
*
|
|
74
|
+
* Each entry is a single external contract call the deposit wallet
|
|
75
|
+
* executes (`target.call{value}(data)`).
|
|
76
|
+
*/
|
|
77
|
+
export type DepositWalletBatchCallSchema = z.ZodObject<{
|
|
78
|
+
target: z.ZodString;
|
|
79
|
+
value: z.ZodString;
|
|
80
|
+
data: z.ZodString;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Schema for WALLET_CREATE operation metadata.
|
|
84
|
+
*
|
|
85
|
+
* Deposit-wallet equivalent of `SAFE_CREATE` — deploys an ERC-1967 deposit
|
|
86
|
+
* wallet via the Polymarket relayer for users on the post-2026-05-04
|
|
87
|
+
* onboarding path. The relayer accepts the request authenticated with our
|
|
88
|
+
* builder HMAC; no user signature is required (the operation's `signature`
|
|
89
|
+
* field is an empty string in practice).
|
|
90
|
+
*/
|
|
91
|
+
export type DepositWalletCreateMetadataSchema = z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"WALLET_CREATE">;
|
|
93
|
+
ownerAddress: z.ZodString;
|
|
94
|
+
depositWalletAddress: z.ZodString;
|
|
95
|
+
}>;
|
|
96
|
+
/**
|
|
97
|
+
* Schema for WALLET_BATCH operation metadata.
|
|
98
|
+
*
|
|
99
|
+
* Deposit-wallet equivalent of `SAFE_EXECUTE` — runs an arbitrary set of
|
|
100
|
+
* calls through an already-deployed deposit wallet. Signed by the wallet
|
|
101
|
+
* owner over the EIP-712 `DepositWallet.Batch` struct (plain 65-byte
|
|
102
|
+
* ECDSA, NOT ERC-7739).
|
|
103
|
+
*/
|
|
104
|
+
export type DepositWalletBatchMetadataSchema = z.ZodObject<{
|
|
105
|
+
type: z.ZodLiteral<"WALLET_BATCH">;
|
|
106
|
+
ownerAddress: z.ZodString;
|
|
107
|
+
depositWalletAddress: z.ZodString;
|
|
108
|
+
nonce: z.ZodString;
|
|
109
|
+
deadline: z.ZodString;
|
|
110
|
+
calls: z.ZodArray<DepositWalletBatchCallSchema>;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Union schema for relayer-operation metadata.
|
|
114
|
+
*
|
|
115
|
+
* Covers both wallet kinds the post-order flow can carry sigs for —
|
|
116
|
+
* Safe (legacy) and deposit wallet (Polymarket's new path). The backend
|
|
117
|
+
* dispatcher discriminates on `metadata.type`.
|
|
67
118
|
*/
|
|
68
119
|
export type OperationMetadataSchema = z.ZodUnion<[
|
|
69
120
|
SafeCreateMetadataSchema,
|
|
70
|
-
SafeExecuteMetadataSchema
|
|
121
|
+
SafeExecuteMetadataSchema,
|
|
122
|
+
DepositWalletCreateMetadataSchema,
|
|
123
|
+
DepositWalletBatchMetadataSchema
|
|
71
124
|
]>;
|
|
72
125
|
/**
|
|
73
|
-
* Schema for additional signed operations
|
|
126
|
+
* Schema for additional signed operations attached to a post-order
|
|
127
|
+
* request — Safe deploy/approvals on legacy users, deposit-wallet
|
|
128
|
+
* create/batch on the new path.
|
|
74
129
|
*/
|
|
75
130
|
export type SignedOperationSchema = z.ZodObject<{
|
|
76
131
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymarketPostOrderAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/polymarketPostOrderAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,SAAS,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC;IAClB,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;IACpB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5B,sEAAsE;IACtE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtC,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,8DAA8D;IAC9D,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,SAAS,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;IACnB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;CACxB,CAAC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"polymarketPostOrderAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/polymarketPostOrderAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,SAAS,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC;IAClB,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC;IACpB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC5B,sEAAsE;IACtE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtC,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,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