@bulletxyz/bullet-sdk 0.32.1 → 0.32.3

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.
@@ -4,17 +4,17 @@ import { z } from "zod";
4
4
  * Zod 4: Primitive integer schemas with rich metadata
5
5
  * Using z.pipe() for explicit conversions (14x faster than z.coerce)
6
6
  */
7
- export declare const I64Schema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
8
- export declare const U8Schema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
9
- export declare const U16Schema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
10
- export declare const U32Schema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
11
- export declare const U64Schema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
12
- export declare const U128Schema: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
7
+ export declare const I64Schema: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
8
+ export declare const U8Schema: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
9
+ export declare const U16Schema: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
10
+ export declare const U32Schema: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
11
+ export declare const U64Schema: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
12
+ export declare const U128Schema: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
13
13
  /**
14
14
  * Zod 4: High-precision decimal schema
15
15
  * Accepts string or number, returns Decimal.js instance
16
16
  */
17
- export declare const DecimalSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<Decimal, string | number>>;
17
+ export declare const DecimalSchema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, Decimal, string | number>;
18
18
  /**
19
19
  * Zod 4: Solana address validation with rich metadata
20
20
  */
@@ -24,14 +24,14 @@ export declare const Base58Address: z.ZodString;
24
24
  * Note: Using type aliases instead of .brand() to maintain backwards compatibility
25
25
  * For full type safety, consider using .brand() after migrating existing code
26
26
  */
27
- export declare const AssetId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
28
- export declare const MarketId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
29
- export declare const OrderId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
30
- export declare const TradeId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
31
- export declare const ClientOrderId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
32
- export declare const TriggerOrderId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
33
- export declare const Amount: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
34
- export declare const UnixTimestampMillis: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
27
+ export declare const AssetId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
28
+ export declare const MarketId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
29
+ export declare const OrderId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
30
+ export declare const TradeId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
31
+ export declare const ClientOrderId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
32
+ export declare const TriggerOrderId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
33
+ export declare const Amount: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
34
+ export declare const UnixTimestampMillis: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
35
35
  /**
36
36
  * Zod 4: Type-safe map builder for JSON-serialized Maps
37
37
  * Converts object representation to native Map with typed keys
@@ -43,29 +43,29 @@ export declare const UnixTimestampMillis: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonl
43
43
  export declare const createJsonMap: <K extends z.ZodTypeAny, V extends z.ZodTypeAny>(keySchema: K, valueSchema: V, options?: {
44
44
  description?: string;
45
45
  example?: Record<string, unknown>;
46
- }) => z.ZodPipe<z.ZodRecord<z.ZodString, V>, z.ZodTransform<Map<z.core.output<K>, z.core.output<V>>, Record<string, z.core.output<V>>>>;
46
+ }) => z.ZodEffects<z.ZodRecord<z.ZodString, V>, Map<z.TypeOf<K>, z.TypeOf<V>>, Record<string, V["_input"]>>;
47
47
  /**
48
48
  * Zod 4: Schema registry for centralized validation and JSON Schema generation
49
49
  * Enables runtime introspection and API documentation generation
50
50
  */
51
51
  export declare const PrimitiveSchemas: {
52
- readonly I64: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
53
- readonly U8: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
54
- readonly U16: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
55
- readonly U32: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
56
- readonly U64: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
57
- readonly U128: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
58
- readonly Decimal: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<Decimal, string | number>>;
52
+ readonly I64: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
53
+ readonly U8: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
54
+ readonly U16: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
55
+ readonly U32: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
56
+ readonly U64: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
57
+ readonly U128: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
58
+ readonly Decimal: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, Decimal, string | number>;
59
59
  readonly Base58Address: z.ZodString;
60
60
  };
61
61
  export declare const DomainSchemas: {
62
- readonly AssetId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
63
- readonly MarketId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>;
64
- readonly OrderId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
65
- readonly TradeId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
66
- readonly ClientOrderId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
67
- readonly TriggerOrderId: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
68
- readonly Amount: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
69
- readonly UnixTimestampMillis: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>;
62
+ readonly AssetId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
63
+ readonly MarketId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, number, string | number>, z.ZodNumber>;
64
+ readonly OrderId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
65
+ readonly TradeId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
66
+ readonly ClientOrderId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
67
+ readonly TriggerOrderId: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
68
+ readonly Amount: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
69
+ readonly UnixTimestampMillis: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>, bigint, string | number | bigint>, z.ZodBigInt>;
70
70
  };
71
71
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zod-types/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;GAGG;AACH,eAAO,MAAM,SAAS,mJAIc,CAAC;AAErC,eAAO,MAAM,QAAQ,6HAIwB,CAAC;AAE9C,eAAO,MAAM,SAAS,6HAI0B,CAAC;AAEjD,eAAO,MAAM,SAAS,6HAIgB,CAAC;AAEvC,eAAO,MAAM,SAAS,mJAIgB,CAAC;AAEvC,eAAO,MAAM,UAAU,mJAIkC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,aAAa,sGAamC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,aAKgD,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,OAAO,6HAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ,6HAEpB,CAAC;AAEF,eAAO,MAAM,OAAO,mJAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,mJAEnB,CAAC;AAEF,eAAO,MAAM,aAAa,mJAEzB,CAAC;AAEF,eAAO,MAAM,cAAc,mJAE1B,CAAC;AAEF,eAAO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