@pear-protocol/types
Advanced tools
@@ -107,3 +107,3 @@ import { z } from 'zod'; | ||
| toTokenAddress: z.ZodString; | ||
| txHash: z.ZodString; | ||
| txHash: z.ZodOptional<z.ZodString>; | ||
| createdTimeMs: z.ZodNumber; | ||
@@ -121,3 +121,3 @@ status: z.ZodString; | ||
| toTokenAddress: z.ZodString; | ||
| txHash: z.ZodString; | ||
| txHash: z.ZodOptional<z.ZodString>; | ||
| createdTimeMs: z.ZodNumber; | ||
@@ -124,0 +124,0 @@ status: z.ZodString; |
@@ -68,3 +68,4 @@ import { z } from 'zod'; | ||
| toTokenAddress: z.string(), | ||
| txHash: z.string(), | ||
| // Failed bridge transactions can stop before Fun.xyz assigns a transaction hash. | ||
| txHash: z.string().optional(), | ||
| createdTimeMs: z.number(), | ||
@@ -71,0 +72,0 @@ status: z.string(), |
@@ -159,2 +159,12 @@ import { z } from 'zod'; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>, z.ZodObject<{ | ||
| type: z.ZodLiteral<"prediction_market">; | ||
| data: z.ZodObject<{ | ||
| source: z.ZodEnum<{ | ||
| kalshi: "kalshi"; | ||
| polymarket: "polymarket"; | ||
| }>; | ||
| marketKey: z.ZodString; | ||
| threshold: z.ZodNumber; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>], "type">; | ||
@@ -312,2 +322,5 @@ export declare const CreateTriggerConditionCloseTrailing: z.ZodDiscriminatedUnion<[z.ZodObject<{ | ||
| }>; | ||
| export type CreateTriggerConditionPredictionMarketCloseStatic = Extract<CreateTriggerConditionCloseStatic, { | ||
| type: 'prediction_market'; | ||
| }>; | ||
| export type CreateTriggerConditionCloseTrailing = z.output<typeof CreateTriggerConditionCloseTrailing>; | ||
@@ -314,0 +327,0 @@ export type CreateTriggerConditionRatioCloseTrailing = Extract<CreateTriggerConditionCloseTrailing, { |
@@ -126,2 +126,13 @@ import { z } from 'zod'; | ||
| }); | ||
| const PredictionMarketCloseStatic = z.object({ | ||
| type: z.literal("prediction_market"), | ||
| data: z.object({ | ||
| source: z.enum([ | ||
| "kalshi", | ||
| "polymarket" | ||
| ]), | ||
| marketKey: z.string().min(1), | ||
| threshold: TriggerThreshold | ||
| }) | ||
| }); | ||
| const RatioCloseTrailing = z.object({ | ||
@@ -181,3 +192,4 @@ type: z.literal("ratio_trailing"), | ||
| UpnlCloseStatic, | ||
| UpnlBpsCloseStatic | ||
| UpnlBpsCloseStatic, | ||
| PredictionMarketCloseStatic | ||
| ]); | ||
@@ -184,0 +196,0 @@ const CreateTriggerConditionCloseTrailing = z.discriminatedUnion("type", [ |
@@ -624,2 +624,12 @@ import { z } from 'zod'; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>, z.ZodObject<{ | ||
| type: z.ZodLiteral<"prediction_market">; | ||
| data: z.ZodObject<{ | ||
| source: z.ZodEnum<{ | ||
| kalshi: "kalshi"; | ||
| polymarket: "polymarket"; | ||
| }>; | ||
| marketKey: z.ZodString; | ||
| threshold: z.ZodNumber; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>], "type">; | ||
@@ -780,2 +790,12 @@ clientId: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>, z.ZodObject<{ | ||
| type: z.ZodLiteral<"prediction_market">; | ||
| data: z.ZodObject<{ | ||
| source: z.ZodEnum<{ | ||
| kalshi: "kalshi"; | ||
| polymarket: "polymarket"; | ||
| }>; | ||
| marketKey: z.ZodString; | ||
| threshold: z.ZodNumber; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>], "type">; | ||
@@ -1253,2 +1273,12 @@ clientId: z.ZodOptional<z.ZodString>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>, z.ZodObject<{ | ||
| type: z.ZodLiteral<"prediction_market">; | ||
| data: z.ZodObject<{ | ||
| source: z.ZodEnum<{ | ||
| kalshi: "kalshi"; | ||
| polymarket: "polymarket"; | ||
| }>; | ||
| marketKey: z.ZodString; | ||
| threshold: z.ZodNumber; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>], "type">; | ||
@@ -1255,0 +1285,0 @@ clientId: z.ZodOptional<z.ZodString>; |
+1
-1
| { | ||
| "name": "@pear-protocol/types", | ||
| "version": "1.28.0", | ||
| "version": "1.29.0", | ||
| "description": "Pear Protocol Types definitions", | ||
@@ -5,0 +5,0 @@ "private": false, |
873238
0.21%24954
0.22%