@pear-protocol/types 1.28.0 → 1.29.0
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/misc/responses.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export declare const LighterUdaTransaction: z.ZodObject<{
|
|
|
104
104
|
fromAmountBaseUnit: z.ZodString;
|
|
105
105
|
toChainId: z.ZodString;
|
|
106
106
|
toTokenAddress: z.ZodString;
|
|
107
|
-
txHash: z.ZodString
|
|
107
|
+
txHash: z.ZodOptional<z.ZodString>;
|
|
108
108
|
createdTimeMs: z.ZodNumber;
|
|
109
109
|
status: z.ZodString;
|
|
110
110
|
depositAddr: z.ZodString;
|
|
@@ -117,7 +117,7 @@ export declare const ListLighterUdaDepositsResult: z.ZodObject<{
|
|
|
117
117
|
fromAmountBaseUnit: z.ZodString;
|
|
118
118
|
toChainId: z.ZodString;
|
|
119
119
|
toTokenAddress: z.ZodString;
|
|
120
|
-
txHash: z.ZodString
|
|
120
|
+
txHash: z.ZodOptional<z.ZodString>;
|
|
121
121
|
createdTimeMs: z.ZodNumber;
|
|
122
122
|
status: z.ZodString;
|
|
123
123
|
depositAddr: z.ZodString;
|
package/dist/misc/responses.js
CHANGED
|
@@ -65,7 +65,8 @@ const LighterUdaTransaction = z.object({
|
|
|
65
65
|
fromAmountBaseUnit: z.string(),
|
|
66
66
|
toChainId: z.string(),
|
|
67
67
|
toTokenAddress: z.string(),
|
|
68
|
-
|
|
68
|
+
// Failed bridge transactions can stop before Fun.xyz assigns a transaction hash.
|
|
69
|
+
txHash: z.string().optional(),
|
|
69
70
|
createdTimeMs: z.number(),
|
|
70
71
|
status: z.string(),
|
|
71
72
|
depositAddr: z.string()
|
|
@@ -156,6 +156,16 @@ export declare const CreateTriggerConditionCloseStatic: z.ZodDiscriminatedUnion<
|
|
|
156
156
|
}>;
|
|
157
157
|
threshold: z.ZodNumber;
|
|
158
158
|
}, z.core.$strip>;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
161
|
+
data: z.ZodObject<{
|
|
162
|
+
source: z.ZodEnum<{
|
|
163
|
+
kalshi: "kalshi";
|
|
164
|
+
polymarket: "polymarket";
|
|
165
|
+
}>;
|
|
166
|
+
marketKey: z.ZodString;
|
|
167
|
+
threshold: z.ZodNumber;
|
|
168
|
+
}, z.core.$strip>;
|
|
159
169
|
}, z.core.$strip>], "type">;
|
|
160
170
|
export declare const CreateTriggerConditionCloseTrailing: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
161
171
|
type: z.ZodLiteral<"ratio_trailing">;
|
|
@@ -308,6 +318,9 @@ export type CreateTriggerConditionUpnlCloseStatic = Extract<CreateTriggerConditi
|
|
|
308
318
|
export type CreateTriggerConditionUpnlBpsCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
|
|
309
319
|
type: 'upnl_bps';
|
|
310
320
|
}>;
|
|
321
|
+
export type CreateTriggerConditionPredictionMarketCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
|
|
322
|
+
type: 'prediction_market';
|
|
323
|
+
}>;
|
|
311
324
|
export type CreateTriggerConditionCloseTrailing = z.output<typeof CreateTriggerConditionCloseTrailing>;
|
|
312
325
|
export type CreateTriggerConditionRatioCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, {
|
|
313
326
|
type: 'ratio_trailing';
|
|
@@ -123,6 +123,17 @@ const UpnlBpsCloseStatic = z.object({
|
|
|
123
123
|
threshold: z.number()
|
|
124
124
|
})
|
|
125
125
|
});
|
|
126
|
+
const PredictionMarketCloseStatic = z.object({
|
|
127
|
+
type: z.literal("prediction_market"),
|
|
128
|
+
data: z.object({
|
|
129
|
+
source: z.enum([
|
|
130
|
+
"kalshi",
|
|
131
|
+
"polymarket"
|
|
132
|
+
]),
|
|
133
|
+
marketKey: z.string().min(1),
|
|
134
|
+
threshold: TriggerThreshold
|
|
135
|
+
})
|
|
136
|
+
});
|
|
126
137
|
const RatioCloseTrailing = z.object({
|
|
127
138
|
type: z.literal("ratio_trailing"),
|
|
128
139
|
data: z.object({
|
|
@@ -177,7 +188,8 @@ const CreateTriggerConditionCloseStatic = z.discriminatedUnion("type", [
|
|
|
177
188
|
WeightedRatioCloseStatic,
|
|
178
189
|
NotionalCloseStatic,
|
|
179
190
|
UpnlCloseStatic,
|
|
180
|
-
UpnlBpsCloseStatic
|
|
191
|
+
UpnlBpsCloseStatic,
|
|
192
|
+
PredictionMarketCloseStatic
|
|
181
193
|
]);
|
|
182
194
|
const CreateTriggerConditionCloseTrailing = z.discriminatedUnion("type", [
|
|
183
195
|
RatioCloseTrailing,
|
|
@@ -621,6 +621,16 @@ export declare const CreateTriggerMarketCloseStatic: z.ZodObject<{
|
|
|
621
621
|
}>;
|
|
622
622
|
threshold: z.ZodNumber;
|
|
623
623
|
}, z.core.$strip>;
|
|
624
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
625
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
626
|
+
data: z.ZodObject<{
|
|
627
|
+
source: z.ZodEnum<{
|
|
628
|
+
kalshi: "kalshi";
|
|
629
|
+
polymarket: "polymarket";
|
|
630
|
+
}>;
|
|
631
|
+
marketKey: z.ZodString;
|
|
632
|
+
threshold: z.ZodNumber;
|
|
633
|
+
}, z.core.$strip>;
|
|
624
634
|
}, z.core.$strip>], "type">;
|
|
625
635
|
clientId: z.ZodOptional<z.ZodString>;
|
|
626
636
|
}, z.core.$strip>;
|
|
@@ -776,6 +786,16 @@ export declare const CreateTriggerMarketClose: z.ZodUnion<readonly [z.ZodObject<
|
|
|
776
786
|
}>;
|
|
777
787
|
threshold: z.ZodNumber;
|
|
778
788
|
}, z.core.$strip>;
|
|
789
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
790
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
791
|
+
data: z.ZodObject<{
|
|
792
|
+
source: z.ZodEnum<{
|
|
793
|
+
kalshi: "kalshi";
|
|
794
|
+
polymarket: "polymarket";
|
|
795
|
+
}>;
|
|
796
|
+
marketKey: z.ZodString;
|
|
797
|
+
threshold: z.ZodNumber;
|
|
798
|
+
}, z.core.$strip>;
|
|
779
799
|
}, z.core.$strip>], "type">;
|
|
780
800
|
clientId: z.ZodOptional<z.ZodString>;
|
|
781
801
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1248,6 +1268,16 @@ export declare const CreateTriggerClose: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1248
1268
|
}>;
|
|
1249
1269
|
threshold: z.ZodNumber;
|
|
1250
1270
|
}, z.core.$strip>;
|
|
1271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1272
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
1273
|
+
data: z.ZodObject<{
|
|
1274
|
+
source: z.ZodEnum<{
|
|
1275
|
+
kalshi: "kalshi";
|
|
1276
|
+
polymarket: "polymarket";
|
|
1277
|
+
}>;
|
|
1278
|
+
marketKey: z.ZodString;
|
|
1279
|
+
threshold: z.ZodNumber;
|
|
1280
|
+
}, z.core.$strip>;
|
|
1251
1281
|
}, z.core.$strip>], "type">;
|
|
1252
1282
|
clientId: z.ZodOptional<z.ZodString>;
|
|
1253
1283
|
}, z.core.$strip>, z.ZodObject<{
|