@polyester/sdk 0.33.0 → 0.33.1-devnet-20261105174258

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @polyester/sdk
2
2
 
3
+ ## 0.33.1-devnet-20261105174258
4
+
5
+ ### Patch Changes
6
+
7
+ - `ValidationError` messages name the field that failed. When an input matches none of the shapes a method accepts, the message now comes from the closest shape and is prefixed with its path, such as `items.0.symbolId: Invalid key: Expected "symbolId" but received undefined` for `orders.batchCreate` with `symbolId` on the request instead of each item. Before, this was the generic `Invalid type: Expected Object but received Object`. The same applies to an unsupported `execution.clientRefPrice` on `orders.create`, and `triggers.create` now reports `sliceIntervalMs cannot exceed durationMs` for a TWAP. Messages that already name their field are unchanged. ([#228](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/228))
8
+
3
9
  ## 0.33.0
4
10
 
5
11
  ### Minor Changes
@@ -297,7 +297,7 @@ declare const AddressBookSchema: v.ObjectSchema<{
297
297
  rootAccountId: string;
298
298
  subaccountId: bigint;
299
299
  }, AddressBookAccountScope>]>, undefined>;
300
- readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
300
+ readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
301
301
  readonly label: v.StringSchema<undefined>;
302
302
  readonly ownerUsername: v.StringSchema<undefined>;
303
303
  readonly smartAccountAddress: v.StringSchema<undefined>;
@@ -1102,7 +1102,7 @@ declare const AddressBookViewSchema: v.ObjectSchema<{
1102
1102
  rootAccountId: string;
1103
1103
  subaccountId: bigint;
1104
1104
  }, AddressBookAccountScope>]>, undefined>;
1105
- readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
1105
+ readonly callerRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
1106
1106
  readonly label: v.StringSchema<undefined>;
1107
1107
  readonly ownerUsername: v.StringSchema<undefined>;
1108
1108
  readonly smartAccountAddress: v.StringSchema<undefined>;
@@ -49,7 +49,7 @@ declare const CheckpointBiggestTradeSchema: v.SchemaWithPipe<readonly [v.ObjectS
49
49
  side: number;
50
50
  at: number;
51
51
  }, {
52
- side: "buy" | "sell" | "unspecified";
52
+ side: "unspecified" | "buy" | "sell";
53
53
  symbolId: number;
54
54
  symbol: string;
55
55
  at: number;
@@ -229,7 +229,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
229
229
  side: number;
230
230
  at: number;
231
231
  }, {
232
- side: "buy" | "sell" | "unspecified";
232
+ side: "unspecified" | "buy" | "sell";
233
233
  symbolId: number;
234
234
  symbol: string;
235
235
  at: number;
@@ -14,7 +14,7 @@ type TimestampInit = {
14
14
  declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
15
15
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
16
16
  readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1h" | "1m" | "1s" | "5m", HeatmapInterval>]>;
17
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 500 | 1000 | 200 | 50, HeatmapDepth>]>;
17
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 500 | 200 | 50 | 1000, HeatmapDepth>]>;
18
18
  readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
19
19
  readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
20
20
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
@@ -227,7 +227,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
227
227
  declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
228
228
  readonly symbolId: v.NumberSchema<undefined>;
229
229
  readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
230
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 | 200 | 50>]>;
230
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 5 | 10 | 20 | 100 | 500 | 200 | 50 | 1000>]>;
231
231
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
232
232
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
233
233
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -287,7 +287,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
287
287
  }, undefined>, v.TransformAction<{
288
288
  symbolId: number;
289
289
  interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
290
- depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 | 200 | 50;
290
+ depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 500 | 200 | 50 | 1000;
291
291
  chain?: {
292
292
  baseKeyframe?: {
293
293
  tsSec: number;
@@ -347,7 +347,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
347
347
  }, {
348
348
  symbolId: number;
349
349
  interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
350
- depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 | 200 | 50;
350
+ depth: 1 | "unspecified" | 5 | 10 | 20 | 100 | 500 | 200 | 50 | 1000;
351
351
  chain: {
352
352
  baseKeyframe: {
353
353
  tsSec: number;
@@ -213,7 +213,7 @@ declare const LifecycleFlowStepActivitySchema: v.SchemaWithPipe<readonly [v.Obje
213
213
  }>]>;
214
214
  declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
215
215
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
216
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
216
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
217
217
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
218
218
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
219
219
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -356,7 +356,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
356
356
  }>]>, undefined>, readonly []>;
357
357
  }, undefined>, v.TransformAction<{
358
358
  sequence: number;
359
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
359
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
360
360
  assetIds?: {
361
361
  zippedAssetId: number;
362
362
  unifiedAssetId: number;
@@ -419,7 +419,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
419
419
  })[];
420
420
  }, Omit<{
421
421
  sequence: number;
422
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
422
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
423
423
  assetIds?: {
424
424
  zippedAssetId: number;
425
425
  unifiedAssetId: number;
@@ -485,7 +485,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
485
485
  }>]>;
486
486
  declare const LifecycleFlowTimelineItemSchema: v.ObjectSchema<{
487
487
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
488
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
488
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
489
489
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
490
490
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
491
491
  }, undefined>;
@@ -505,7 +505,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
505
505
  readonly smartAccountAddress: v.StringSchema<undefined>;
506
506
  readonly flowId: v.StringSchema<undefined>;
507
507
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
508
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
508
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
509
509
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
510
510
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
511
511
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -585,7 +585,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
585
585
  }, undefined>, undefined>;
586
586
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
587
587
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
588
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
588
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
589
589
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
590
590
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
591
591
  }, undefined>, undefined>, readonly []>;
@@ -597,7 +597,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
597
597
  smartAccountAddress: string;
598
598
  flowId: string;
599
599
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
600
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
600
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
601
601
  assetIds?: {
602
602
  zippedAssetId: number;
603
603
  unifiedAssetId: number;
@@ -649,7 +649,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
649
649
  } | undefined;
650
650
  progressTimeline: {
651
651
  sequence: number;
652
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
652
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
653
653
  status: "unspecified" | "planned" | "completed" | "current";
654
654
  expectedDurationMs: number;
655
655
  }[];
@@ -660,7 +660,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
660
660
  smartAccountAddress: string;
661
661
  flowId: string;
662
662
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
663
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
663
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
664
664
  assetIds?: {
665
665
  zippedAssetId: number;
666
666
  unifiedAssetId: number;
@@ -712,7 +712,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
712
712
  } | undefined;
713
713
  progressTimeline: {
714
714
  sequence: number;
715
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
715
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
716
716
  status: "unspecified" | "planned" | "completed" | "current";
717
717
  expectedDurationMs: number;
718
718
  }[];
@@ -727,7 +727,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
727
727
  readonly smartAccountAddress: v.StringSchema<undefined>;
728
728
  readonly flowId: v.StringSchema<undefined>;
729
729
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
730
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
730
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
731
731
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
732
732
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
733
733
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -807,7 +807,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
807
807
  }, undefined>, undefined>;
808
808
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
809
809
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
810
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
810
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
811
811
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
812
812
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
813
813
  }, undefined>, undefined>, readonly []>;
@@ -819,7 +819,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
819
819
  smartAccountAddress: string;
820
820
  flowId: string;
821
821
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
822
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
822
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
823
823
  assetIds?: {
824
824
  zippedAssetId: number;
825
825
  unifiedAssetId: number;
@@ -871,7 +871,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
871
871
  } | undefined;
872
872
  progressTimeline: {
873
873
  sequence: number;
874
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
874
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
875
875
  status: "unspecified" | "planned" | "completed" | "current";
876
876
  expectedDurationMs: number;
877
877
  }[];
@@ -882,7 +882,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
882
882
  smartAccountAddress: string;
883
883
  flowId: string;
884
884
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
885
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
885
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
886
886
  assetIds?: {
887
887
  zippedAssetId: number;
888
888
  unifiedAssetId: number;
@@ -934,7 +934,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
934
934
  } | undefined;
935
935
  progressTimeline: {
936
936
  sequence: number;
937
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
937
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
938
938
  status: "unspecified" | "planned" | "completed" | "current";
939
939
  expectedDurationMs: number;
940
940
  }[];
@@ -945,7 +945,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
945
945
  }>]>, undefined>;
946
946
  readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
947
947
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
948
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
948
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
949
949
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
950
950
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
951
951
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1088,7 +1088,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
1088
1088
  }>]>, undefined>, readonly []>;
1089
1089
  }, undefined>, v.TransformAction<{
1090
1090
  sequence: number;
1091
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1091
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1092
1092
  assetIds?: {
1093
1093
  zippedAssetId: number;
1094
1094
  unifiedAssetId: number;
@@ -1151,7 +1151,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
1151
1151
  })[];
1152
1152
  }, Omit<{
1153
1153
  sequence: number;
1154
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1154
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1155
1155
  assetIds?: {
1156
1156
  zippedAssetId: number;
1157
1157
  unifiedAssetId: number;
@@ -1223,7 +1223,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1223
1223
  readonly smartAccountAddress: v.StringSchema<undefined>;
1224
1224
  readonly flowId: v.StringSchema<undefined>;
1225
1225
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
1226
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1226
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1227
1227
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1228
1228
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1229
1229
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1303,7 +1303,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1303
1303
  }, undefined>, undefined>;
1304
1304
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1305
1305
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1306
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1306
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1307
1307
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
1308
1308
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
1309
1309
  }, undefined>, undefined>, readonly []>;
@@ -1315,7 +1315,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1315
1315
  smartAccountAddress: string;
1316
1316
  flowId: string;
1317
1317
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1318
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1318
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1319
1319
  assetIds?: {
1320
1320
  zippedAssetId: number;
1321
1321
  unifiedAssetId: number;
@@ -1367,7 +1367,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1367
1367
  } | undefined;
1368
1368
  progressTimeline: {
1369
1369
  sequence: number;
1370
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1370
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1371
1371
  status: "unspecified" | "planned" | "completed" | "current";
1372
1372
  expectedDurationMs: number;
1373
1373
  }[];
@@ -1378,7 +1378,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1378
1378
  smartAccountAddress: string;
1379
1379
  flowId: string;
1380
1380
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1381
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1381
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1382
1382
  assetIds?: {
1383
1383
  zippedAssetId: number;
1384
1384
  unifiedAssetId: number;
@@ -1430,7 +1430,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1430
1430
  } | undefined;
1431
1431
  progressTimeline: {
1432
1432
  sequence: number;
1433
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1433
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1434
1434
  status: "unspecified" | "planned" | "completed" | "current";
1435
1435
  expectedDurationMs: number;
1436
1436
  }[];
@@ -1448,7 +1448,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1448
1448
  readonly smartAccountAddress: v.StringSchema<undefined>;
1449
1449
  readonly flowId: v.StringSchema<undefined>;
1450
1450
  readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
1451
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1451
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1452
1452
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1453
1453
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1454
1454
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1528,7 +1528,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1528
1528
  }, undefined>, undefined>;
1529
1529
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1530
1530
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1531
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1531
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1532
1532
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
1533
1533
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
1534
1534
  }, undefined>, undefined>, readonly []>;
@@ -1540,7 +1540,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1540
1540
  smartAccountAddress: string;
1541
1541
  flowId: string;
1542
1542
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1543
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1543
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1544
1544
  assetIds?: {
1545
1545
  zippedAssetId: number;
1546
1546
  unifiedAssetId: number;
@@ -1592,7 +1592,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1592
1592
  } | undefined;
1593
1593
  progressTimeline: {
1594
1594
  sequence: number;
1595
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1595
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1596
1596
  status: "unspecified" | "planned" | "completed" | "current";
1597
1597
  expectedDurationMs: number;
1598
1598
  }[];
@@ -1603,7 +1603,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1603
1603
  smartAccountAddress: string;
1604
1604
  flowId: string;
1605
1605
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1606
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1606
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1607
1607
  assetIds?: {
1608
1608
  zippedAssetId: number;
1609
1609
  unifiedAssetId: number;
@@ -1655,7 +1655,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1655
1655
  } | undefined;
1656
1656
  progressTimeline: {
1657
1657
  sequence: number;
1658
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1658
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1659
1659
  status: "unspecified" | "planned" | "completed" | "current";
1660
1660
  expectedDurationMs: number;
1661
1661
  }[];
@@ -1666,7 +1666,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1666
1666
  }>]>, undefined>;
1667
1667
  readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
1668
1668
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1669
- readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1669
+ readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1670
1670
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1671
1671
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1672
1672
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1809,7 +1809,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1809
1809
  }>]>, undefined>, readonly []>;
1810
1810
  }, undefined>, v.TransformAction<{
1811
1811
  sequence: number;
1812
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1812
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1813
1813
  assetIds?: {
1814
1814
  zippedAssetId: number;
1815
1815
  unifiedAssetId: number;
@@ -1872,7 +1872,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1872
1872
  })[];
1873
1873
  }, Omit<{
1874
1874
  sequence: number;
1875
- step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1875
+ step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1876
1876
  assetIds?: {
1877
1877
  zippedAssetId: number;
1878
1878
  unifiedAssetId: number;
@@ -1949,7 +1949,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1949
1949
  readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
1950
1950
  readonly sourceDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
1951
1951
  readonly destinationDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
1952
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1952
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1953
1953
  readonly isOpen: v.BooleanSchema<undefined>;
1954
1954
  readonly isTerminal: v.BooleanSchema<undefined>;
1955
1955
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
@@ -1983,7 +1983,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1983
1983
  txOccurrenceIndex?: number | undefined;
1984
1984
  sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
1985
1985
  destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
1986
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
1986
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1987
1987
  isOpen: boolean;
1988
1988
  isTerminal: boolean;
1989
1989
  assetIds?: {
@@ -2011,7 +2011,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
2011
2011
  txOccurrenceIndex?: number | undefined;
2012
2012
  sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
2013
2013
  destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
2014
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
2014
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2015
2015
  isOpen: boolean;
2016
2016
  isTerminal: boolean;
2017
2017
  assetIds?: {
@@ -2044,7 +2044,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2044
2044
  readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
2045
2045
  readonly sourceDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
2046
2046
  readonly destinationDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
2047
- readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
2047
+ readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
2048
2048
  readonly isOpen: v.BooleanSchema<undefined>;
2049
2049
  readonly isTerminal: v.BooleanSchema<undefined>;
2050
2050
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
@@ -2078,7 +2078,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2078
2078
  txOccurrenceIndex?: number | undefined;
2079
2079
  sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
2080
2080
  destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
2081
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
2081
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2082
2082
  isOpen: boolean;
2083
2083
  isTerminal: boolean;
2084
2084
  assetIds?: {
@@ -2106,7 +2106,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2106
2106
  txOccurrenceIndex?: number | undefined;
2107
2107
  sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
2108
2108
  destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
2109
- currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
2109
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2110
2110
  isOpen: boolean;
2111
2111
  isTerminal: boolean;
2112
2112
  assetIds?: {
@@ -10,7 +10,7 @@ declare const GetOrderbookInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
10
10
  depth: number;
11
11
  }, {
12
12
  symbolId: number;
13
- depth: 1 | 5 | 10 | 20 | 100 | 500 | 1000 | 200 | 50;
13
+ depth: 1 | 5 | 10 | 20 | 100 | 500 | 200 | 50 | 1000;
14
14
  protoDepth: Depth;
15
15
  }>]>;
16
16
  type GetOrderbookInput = v.InferInput<typeof GetOrderbookInputSchema>;
@@ -3754,7 +3754,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3754
3754
  readonly admissionStatus: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "admitted" | "partially_admitted">]>;
3755
3755
  readonly items: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
3756
3756
  readonly itemIndex: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
3757
- readonly phase: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "working" | "rejected" | "terminal" | "admitted">]>;
3757
+ readonly phase: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "terminal" | "working" | "rejected" | "admitted">]>;
3758
3758
  readonly oldOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
3759
3759
  readonly replacementOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
3760
3760
  readonly actionTaken: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "AMENDED" | "REPLACED">]>;
@@ -3763,7 +3763,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3763
3763
  readonly updatedTsNs: v.BigintSchema<undefined>;
3764
3764
  }, undefined>, v.TransformAction<{
3765
3765
  itemIndex: number;
3766
- phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
3766
+ phase: "unspecified" | "terminal" | "working" | "rejected" | "admitted";
3767
3767
  oldOrderId?: string | undefined;
3768
3768
  replacementOrderId?: string | undefined;
3769
3769
  actionTaken: "unspecified" | "AMENDED" | "REPLACED";
@@ -3775,7 +3775,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3775
3775
  updatedTs: number;
3776
3776
  updatedTsNs: string;
3777
3777
  itemIndex: number;
3778
- phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
3778
+ phase: "unspecified" | "terminal" | "working" | "rejected" | "admitted";
3779
3779
  oldOrderId?: string | undefined;
3780
3780
  replacementOrderId?: string | undefined;
3781
3781
  actionTaken: "unspecified" | "AMENDED" | "REPLACED";
@@ -3793,7 +3793,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3793
3793
  updatedTs: number;
3794
3794
  updatedTsNs: string;
3795
3795
  itemIndex: number;
3796
- phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
3796
+ phase: "unspecified" | "terminal" | "working" | "rejected" | "admitted";
3797
3797
  oldOrderId?: string | undefined;
3798
3798
  replacementOrderId?: string | undefined;
3799
3799
  actionTaken: "unspecified" | "AMENDED" | "REPLACED";
@@ -3811,7 +3811,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3811
3811
  updatedTs: number;
3812
3812
  updatedTsNs: string;
3813
3813
  itemIndex: number;
3814
- phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
3814
+ phase: "unspecified" | "terminal" | "working" | "rejected" | "admitted";
3815
3815
  oldOrderId?: string | undefined;
3816
3816
  replacementOrderId?: string | undefined;
3817
3817
  actionTaken: "unspecified" | "AMENDED" | "REPLACED";
@@ -3829,7 +3829,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3829
3829
  updatedTs: number;
3830
3830
  updatedTsNs: string;
3831
3831
  itemIndex: number;
3832
- phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
3832
+ phase: "unspecified" | "terminal" | "working" | "rejected" | "admitted";
3833
3833
  oldOrderId?: string | undefined;
3834
3834
  replacementOrderId?: string | undefined;
3835
3835
  actionTaken: "unspecified" | "AMENDED" | "REPLACED";
@@ -3851,7 +3851,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
3851
3851
  updatedTs: number;
3852
3852
  updatedTsNs: string;
3853
3853
  itemIndex: number;
3854
- phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
3854
+ phase: "unspecified" | "terminal" | "working" | "rejected" | "admitted";
3855
3855
  oldOrderId?: string | undefined;
3856
3856
  replacementOrderId?: string | undefined;
3857
3857
  actionTaken: "unspecified" | "AMENDED" | "REPLACED";
@@ -364,7 +364,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
364
364
  symbolId: number;
365
365
  clientOrderId: string;
366
366
  status: "unspecified" | "canceled" | "pending" | "pending_cancel" | "working" | "filled" | "rejected" | "partial";
367
- side: "buy" | "sell" | "unspecified";
367
+ side: "unspecified" | "buy" | "sell";
368
368
  orderType: "unspecified" | "limit" | "market";
369
369
  timeInForce: "unspecified" | "GTC" | "IOC" | "FOK" | "GTD";
370
370
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
@@ -785,7 +785,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
785
785
  symbolId: number;
786
786
  clientOrderId: string;
787
787
  status: "unspecified" | "canceled" | "pending" | "pending_cancel" | "working" | "filled" | "rejected" | "partial";
788
- side: "buy" | "sell" | "unspecified";
788
+ side: "unspecified" | "buy" | "sell";
789
789
  orderType: "unspecified" | "limit" | "market";
790
790
  timeInForce: "unspecified" | "GTC" | "IOC" | "FOK" | "GTD";
791
791
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
@@ -862,7 +862,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
862
862
  referralShare?: string | undefined;
863
863
  orderId: string;
864
864
  symbolId: number;
865
- sideLabel: "buy" | "sell" | "unspecified";
865
+ sideLabel: "unspecified" | "buy" | "sell";
866
866
  liquidityLabel: "maker" | "taker";
867
867
  feeAsset: "unspecified" | "quote" | "base";
868
868
  qty: string;
@@ -19,7 +19,7 @@ declare const RewardAwardSchema: v.ObjectSchema<{
19
19
  readonly assetId: v.NumberSchema<undefined>;
20
20
  readonly amountBaseUnits: v.StringSchema<undefined>;
21
21
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
22
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "awaiting_destination" | "ready_for_payout" | "paid" | "failed" | "canceled">]>;
22
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
23
23
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
24
24
  readonly seconds: v.BigintSchema<undefined>;
25
25
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -41,7 +41,7 @@ declare const ListRewardAwardsResultSchema: v.ObjectSchema<{
41
41
  readonly assetId: v.NumberSchema<undefined>;
42
42
  readonly amountBaseUnits: v.StringSchema<undefined>;
43
43
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
44
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "awaiting_destination" | "ready_for_payout" | "paid" | "failed" | "canceled">]>;
44
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
45
45
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
46
46
  readonly seconds: v.BigintSchema<undefined>;
47
47
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -65,7 +65,7 @@ declare const SetRewardDestinationResultSchema: v.ObjectSchema<{
65
65
  readonly assetId: v.NumberSchema<undefined>;
66
66
  readonly amountBaseUnits: v.StringSchema<undefined>;
67
67
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
68
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "awaiting_destination" | "ready_for_payout" | "paid" | "failed" | "canceled">]>;
68
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
69
69
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
70
70
  readonly seconds: v.BigintSchema<undefined>;
71
71
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -13,7 +13,7 @@ declare const SubaccountPermissionDefinitionSchema: v.ObjectSchema<{
13
13
  }, undefined>;
14
14
  type SubaccountPermissionDefinition = v.InferOutput<typeof SubaccountPermissionDefinitionSchema>;
15
15
  declare const SubaccountRoleDefinitionSchema: v.ObjectSchema<{
16
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
16
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
17
17
  readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, "">;
18
18
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, "">;
19
19
  readonly assignable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
@@ -28,7 +28,7 @@ declare const SubaccountRoleCatalogSchema: v.ObjectSchema<{
28
28
  readonly policyAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw">]>;
29
29
  }, undefined>, undefined>, readonly []>;
30
30
  readonly roles: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
31
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
31
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
32
32
  readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, "">;
33
33
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, "">;
34
34
  readonly assignable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
@@ -37,7 +37,7 @@ declare const SubaccountRoleCatalogSchema: v.ObjectSchema<{
37
37
  }, undefined>;
38
38
  type SubaccountRoleCatalog = v.InferOutput<typeof SubaccountRoleCatalogSchema>;
39
39
  declare const EffectiveSubaccountPermissionsSchema: v.ObjectSchema<{
40
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
40
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
41
41
  readonly permissions: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "internal_transfer" | "read_subaccount" | "update_subaccount" | "read_balances" | "read_spot" | "trade_spot" | "read_internal_transfers" | "external_withdraw" | "read_address_book" | "manage_address_book" | "read_members" | "manage_members" | "read_invites" | "manage_invites" | "read_api_keys" | "manage_api_keys" | "read_subaccount_policy" | "manage_subaccount_policy" | "read_activity" | "read_activity_security_details" | "manage_member_mfa_requirement" | "create_deposit_address" | "read_deposit_addresses" | "read_guard_signer_status" | "manage_guard_signer" | "read_auto_withdraw" | "manage_auto_withdraw" | "swap">]>, undefined>, readonly []>;
42
42
  readonly subaccountPolicyId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
43
43
  }, undefined>;
@@ -163,7 +163,7 @@ declare const ProtoSubaccountStatusSchema: v.SchemaWithPipe<readonly [v.NumberSc
163
163
  type SubaccountStatus = v.InferOutput<typeof ProtoSubaccountStatusSchema>;
164
164
  declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
165
165
  readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
166
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
166
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
167
167
  readonly label: v.OptionalSchema<v.StringSchema<undefined>, "">;
168
168
  readonly icon: v.OptionalSchema<v.StringSchema<undefined>, "">;
169
169
  readonly color: v.OptionalSchema<v.StringSchema<undefined>, "">;
@@ -182,7 +182,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
182
182
  readonly revision: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
183
183
  }, undefined>, v.TransformAction<{
184
184
  id: string;
185
- role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
185
+ role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
186
186
  label: string;
187
187
  icon: string;
188
188
  color: string;
@@ -203,7 +203,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
203
203
  updatedAt: number | undefined;
204
204
  updatedAtNs: string | undefined;
205
205
  id: string;
206
- role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
206
+ role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
207
207
  label: string;
208
208
  icon: string;
209
209
  color: string;
@@ -220,7 +220,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
220
220
  type Subaccount = v.InferOutput<typeof SubaccountSchema>;
221
221
  declare const SubaccountMemberSchema: v.ObjectSchema<{
222
222
  readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
223
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
223
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
224
224
  readonly username: v.OptionalSchema<v.StringSchema<undefined>, "">;
225
225
  readonly smartAccountAddress: v.StringSchema<undefined>;
226
226
  readonly avatarUrl: v.OptionalSchema<v.StringSchema<undefined>, "">;
@@ -232,8 +232,8 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
232
232
  readonly subaccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
233
233
  readonly granteeAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
234
234
  readonly inviterAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
235
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
236
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "pending" | "cancelled" | "accepted" | "declined">]>;
235
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified">]>;
236
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "cancelled" | "pending" | "accepted" | "declined">]>;
237
237
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
238
238
  readonly seconds: v.BigintSchema<undefined>;
239
239
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -259,8 +259,8 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
259
259
  subaccountId: string;
260
260
  granteeAccountId: string;
261
261
  inviterAccountId: string;
262
- role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
263
- status: "unspecified" | "pending" | "cancelled" | "accepted" | "declined";
262
+ role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
263
+ status: "unspecified" | "cancelled" | "pending" | "accepted" | "declined";
264
264
  createdAt?: number | undefined;
265
265
  respondedAt?: number | undefined;
266
266
  granteeUsername: string;
@@ -277,8 +277,8 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
277
277
  id: string;
278
278
  granteeAccountId: string;
279
279
  inviterAccountId: string;
280
- role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
281
- status: "unspecified" | "pending" | "cancelled" | "accepted" | "declined";
280
+ role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer" | "unspecified";
281
+ status: "unspecified" | "cancelled" | "pending" | "accepted" | "declined";
282
282
  createdAt?: number | undefined;
283
283
  respondedAt?: number | undefined;
284
284
  granteeUsername: string;
@@ -300,7 +300,7 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
300
300
  seconds: bigint;
301
301
  nanos: number;
302
302
  } | undefined, number | undefined>]>;
303
- readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "destination" | "session" | "member" | "policy" | "invite" | "security">]>;
303
+ readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "subaccount" | "api_key" | "account" | "session" | "destination" | "member" | "policy" | "invite" | "security">]>;
304
304
  readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "removed" | "revoked" | "failed" | "enabled" | "created" | "updated" | "deleted" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
305
305
  readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api" | "web" | "mobile">]>;
306
306
  readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -62,7 +62,7 @@ declare function createUserTradeSchema(scales: SdkScales): v.SchemaWithPipe<read
62
62
  referralShare?: string | undefined;
63
63
  orderId: string;
64
64
  symbolId: number;
65
- sideLabel: "buy" | "sell" | "unspecified";
65
+ sideLabel: "unspecified" | "buy" | "sell";
66
66
  liquidityLabel: "maker" | "taker";
67
67
  feeAsset: "unspecified" | "quote" | "base";
68
68
  qty: string;
@@ -168,7 +168,7 @@ declare const GetUserTradesInputSchema: v.SchemaWithPipe<readonly [v.UnionSchema
168
168
  readonly orderId: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
169
169
  readonly lineageId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>, v.CheckAction<bigint, `${string} must be greater than zero`>]>;
170
170
  readonly throughGeneration: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
171
- }, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.GtValueIssue<number, 0> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000> | v.UnionIssue<v.NumberIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.GtValueIssue<number, 0> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000>>>) => "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId" | "symbolId is required when afterMatchId is set" | "Invalid trade filters">, v.TransformAction<{
171
+ }, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.UnionIssue<v.StringIssue | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1>> | v.GtValueIssue<number, 0> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000> | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1> | v.UnionIssue<v.StringIssue | v.StrictObjectIssue | v.PicklistIssue | v.MinLengthIssue<string, 1>> | v.GtValueIssue<number, 0> | v.CheckIssue<bigint> | v.NeverIssue | v.MaxValueIssue<number, 1000>>>) => "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId" | "symbolId is required when afterMatchId is set" | "Invalid trade filters">, v.TransformAction<{
172
172
  symbolId?: number | undefined;
173
173
  afterMatchId?: undefined;
174
174
  side?: Side.BUY | Side.SELL | undefined;
@@ -1108,7 +1108,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
1108
1108
  declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1109
1109
  readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
1110
1110
  readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
1111
- readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
1111
+ readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
1112
1112
  readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop" | undefined, TriggerType>]>;
1113
1113
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
1114
1114
  readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
29
29
  type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
30
30
  declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
31
31
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
32
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
32
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
33
33
  readonly tsNs: v.BigintSchema<undefined>;
34
34
  }, undefined>, v.TransformAction<{
35
35
  triggerId: string;
36
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
36
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
37
37
  tsNs: bigint;
38
38
  }, {
39
39
  ts: number;
40
40
  tsNs: string;
41
41
  triggerId: string;
42
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
42
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
43
43
  }>]>;
44
44
  type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
45
45
  declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
46
46
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
47
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
47
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
48
48
  readonly tsNs: v.BigintSchema<undefined>;
49
49
  }, undefined>, v.TransformAction<{
50
50
  triggerId: string;
51
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
51
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
52
52
  tsNs: bigint;
53
53
  }, {
54
54
  ts: number;
55
55
  tsNs: string;
56
56
  triggerId: string;
57
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
57
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
58
58
  }>]>;
59
59
  type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
60
60
  declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
61
61
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
62
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
62
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
63
63
  readonly tsNs: v.BigintSchema<undefined>;
64
64
  }, undefined>, v.TransformAction<{
65
65
  triggerId: string;
66
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
66
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
67
67
  tsNs: bigint;
68
68
  }, {
69
69
  ts: number;
70
70
  tsNs: string;
71
71
  triggerId: string;
72
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
72
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
73
73
  }>]>;
74
74
  type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
75
75
  declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
76
76
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
77
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused">]>;
77
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused">]>;
78
78
  readonly tsNs: v.BigintSchema<undefined>;
79
79
  }, undefined>, v.TransformAction<{
80
80
  triggerId: string;
81
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
81
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
82
82
  tsNs: bigint;
83
83
  }, {
84
84
  ts: number;
85
85
  tsNs: string;
86
86
  triggerId: string;
87
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
87
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
88
88
  }>]>;
89
89
  type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
90
90
  type StopDetailsOutput = {
@@ -613,14 +613,14 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
613
613
  triggerId: string;
614
614
  subaccountId: string;
615
615
  symbolId: number;
616
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
616
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
617
617
  parentOrderId: string | undefined;
618
618
  qty: string;
619
619
  feeAsset: "unspecified" | "quote" | "base";
620
620
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
621
621
  configuration: {
622
622
  type: "stop_loss" | "take_profit";
623
- side: "buy" | "sell" | "unspecified";
623
+ side: "unspecified" | "buy" | "sell";
624
624
  triggerPrice: string;
625
625
  execution: {
626
626
  readonly type: "market_ioc";
@@ -672,7 +672,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
672
672
  readonly postOnly?: undefined;
673
673
  } | {
674
674
  type: "trailing_stop";
675
- side: "buy" | "sell" | "unspecified";
675
+ side: "unspecified" | "buy" | "sell";
676
676
  trailingDistance: {
677
677
  kind: "distance";
678
678
  distance: string;
@@ -711,7 +711,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
711
711
  readonly postOnly?: undefined;
712
712
  } | {
713
713
  type: "twap";
714
- side: "buy" | "sell" | "unspecified";
714
+ side: "unspecified" | "buy" | "sell";
715
715
  durationMs: number;
716
716
  sliceIntervalMs: number;
717
717
  execution: {
@@ -750,7 +750,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
750
750
  readonly postOnly?: undefined;
751
751
  } | {
752
752
  type: "ladder";
753
- side: "buy" | "sell" | "unspecified";
753
+ side: "unspecified" | "buy" | "sell";
754
754
  priceMin: string;
755
755
  priceMax: string;
756
756
  levels: number;
@@ -792,14 +792,14 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
792
792
  triggerId: string;
793
793
  subaccountId: string;
794
794
  symbolId: number;
795
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
795
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
796
796
  parentOrderId: string | undefined;
797
797
  qty: string;
798
798
  feeAsset: "unspecified" | "quote" | "base";
799
799
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
800
800
  configuration: {
801
801
  type: "stop_loss" | "take_profit";
802
- side: "buy" | "sell" | "unspecified";
802
+ side: "unspecified" | "buy" | "sell";
803
803
  triggerPrice: string;
804
804
  execution: {
805
805
  readonly type: "market_ioc";
@@ -851,7 +851,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
851
851
  readonly postOnly?: undefined;
852
852
  } | {
853
853
  type: "trailing_stop";
854
- side: "buy" | "sell" | "unspecified";
854
+ side: "unspecified" | "buy" | "sell";
855
855
  trailingDistance: {
856
856
  kind: "distance";
857
857
  distance: string;
@@ -890,7 +890,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
890
890
  readonly postOnly?: undefined;
891
891
  } | {
892
892
  type: "twap";
893
- side: "buy" | "sell" | "unspecified";
893
+ side: "unspecified" | "buy" | "sell";
894
894
  durationMs: number;
895
895
  sliceIntervalMs: number;
896
896
  execution: {
@@ -929,7 +929,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
929
929
  readonly postOnly?: undefined;
930
930
  } | {
931
931
  type: "ladder";
932
- side: "buy" | "sell" | "unspecified";
932
+ side: "unspecified" | "buy" | "sell";
933
933
  priceMin: string;
934
934
  priceMax: string;
935
935
  levels: number;
@@ -971,14 +971,14 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
971
971
  triggerId: string;
972
972
  subaccountId: string;
973
973
  symbolId: number;
974
- status: "unspecified" | "failed" | "completed" | "cancelled" | "created" | "armed" | "running" | "paused";
974
+ status: "unspecified" | "failed" | "cancelled" | "completed" | "created" | "armed" | "running" | "paused";
975
975
  parentOrderId: string | undefined;
976
976
  qty: string;
977
977
  feeAsset: "unspecified" | "quote" | "base";
978
978
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
979
979
  configuration: {
980
980
  type: "stop_loss" | "take_profit";
981
- side: "buy" | "sell" | "unspecified";
981
+ side: "unspecified" | "buy" | "sell";
982
982
  triggerPrice: string;
983
983
  execution: {
984
984
  readonly type: "market_ioc";
@@ -1030,7 +1030,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1030
1030
  readonly postOnly?: undefined;
1031
1031
  } | {
1032
1032
  type: "trailing_stop";
1033
- side: "buy" | "sell" | "unspecified";
1033
+ side: "unspecified" | "buy" | "sell";
1034
1034
  trailingDistance: {
1035
1035
  kind: "distance";
1036
1036
  distance: string;
@@ -1069,7 +1069,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1069
1069
  readonly postOnly?: undefined;
1070
1070
  } | {
1071
1071
  type: "twap";
1072
- side: "buy" | "sell" | "unspecified";
1072
+ side: "unspecified" | "buy" | "sell";
1073
1073
  durationMs: number;
1074
1074
  sliceIntervalMs: number;
1075
1075
  execution: {
@@ -1108,7 +1108,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1108
1108
  readonly postOnly?: undefined;
1109
1109
  } | {
1110
1110
  type: "ladder";
1111
- side: "buy" | "sell" | "unspecified";
1111
+ side: "unspecified" | "buy" | "sell";
1112
1112
  priceMin: string;
1113
1113
  priceMax: string;
1114
1114
  levels: number;
@@ -2,6 +2,27 @@ import { ValidationError } from "./errors.js";
2
2
  import * as v from "valibot";
3
3
  //#region src/shared/validation.ts
4
4
  /**
5
+ * Builds a message from the most specific issue. Valibot's own message is only
6
+ * `issues[0].message`, which for a failed union is a generic "Expected Object
7
+ * but received Object" with the real causes nested in `issue.issues`. Nested
8
+ * issue paths are relative to the union, so the union's path is prefixed.
9
+ */
10
+ function describeIssue(issue) {
11
+ let path = v.getDotPath(issue) ?? "";
12
+ while (issue.type === "union" && issue.issues?.length && hasDefaultMessage(issue)) {
13
+ issue = issue.issues.find((nested) => nested.kind === "validation") ?? issue.issues[0];
14
+ const nestedPath = v.getDotPath(issue);
15
+ if (nestedPath) path = path ? `${path}.${nestedPath}` : nestedPath;
16
+ }
17
+ const field = path.replace(/\.\d+(?=\.|$)/g, "");
18
+ if (!path || issue.message.startsWith(path) || issue.message.startsWith(field)) return issue.message;
19
+ return `${path}: ${issue.message}`;
20
+ }
21
+ /** Unions given a custom message already say what went wrong. */
22
+ function hasDefaultMessage(issue) {
23
+ return issue.message === `Invalid type: Expected ${issue.expected} but received ${issue.received}`;
24
+ }
25
+ /**
5
26
  * Parses a value with Valibot and translates schema failures into the SDK's
6
27
  * public error hierarchy.
7
28
  */
@@ -9,7 +30,7 @@ function parse(schema, input, config) {
9
30
  try {
10
31
  return v.parse(schema, input, config);
11
32
  } catch (error) {
12
- if (v.isValiError(error)) throw new ValidationError(error.message, { cause: error });
33
+ if (v.isValiError(error)) throw new ValidationError(describeIssue(error.issues[0]), { cause: error });
13
34
  throw error;
14
35
  }
15
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validation.js","names":[],"sources":["../../src/shared/validation.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { ValidationError } from \"./errors.js\";\n\n/**\n * Parses a value with Valibot and translates schema failures into the SDK's\n * public error hierarchy.\n */\nexport function parse<const TSchema extends v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>>(\n schema: TSchema,\n input: unknown,\n config?: v.Config<v.InferIssue<TSchema>>,\n): v.InferOutput<TSchema> {\n try {\n return v.parse(schema, input, config);\n } catch (error) {\n if (v.isValiError(error)) throw new ValidationError(error.message, { cause: error });\n throw error;\n }\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,MACZ,QACA,OACA,QACsB;CACtB,IAAI;EACA,OAAO,EAAE,MAAM,QAAQ,OAAO,MAAM;CACxC,SAAS,OAAO;EACZ,IAAI,EAAE,YAAY,KAAK,GAAG,MAAM,IAAI,gBAAgB,MAAM,SAAS,EAAE,OAAO,MAAM,CAAC;EACnF,MAAM;CACV;AACJ"}
1
+ {"version":3,"file":"validation.js","names":[],"sources":["../../src/shared/validation.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { ValidationError } from \"./errors.js\";\n\ntype AnyIssue = v.BaseIssue<unknown>;\n\n/**\n * Builds a message from the most specific issue. Valibot's own message is only\n * `issues[0].message`, which for a failed union is a generic \"Expected Object\n * but received Object\" with the real causes nested in `issue.issues`. Nested\n * issue paths are relative to the union, so the union's path is prefixed.\n */\nfunction describeIssue(issue: AnyIssue): string {\n let path = v.getDotPath(issue) ?? \"\";\n while (issue.type === \"union\" && issue.issues?.length && hasDefaultMessage(issue)) {\n // Nested issues are flattened across branches, so a validation issue\n // (a branch that got past its type checks) stands in for the closest branch.\n issue = issue.issues.find((nested) => nested.kind === \"validation\") ?? issue.issues[0]!;\n const nestedPath = v.getDotPath(issue);\n if (nestedPath) path = path ? `${path}.${nestedPath}` : nestedPath;\n }\n // Some custom messages already name their field, e.g. \"items.orderId must be ...\".\n const field = path.replace(/\\.\\d+(?=\\.|$)/g, \"\");\n if (!path || issue.message.startsWith(path) || issue.message.startsWith(field)) {\n return issue.message;\n }\n return `${path}: ${issue.message}`;\n}\n\n/** Unions given a custom message already say what went wrong. */\nfunction hasDefaultMessage(issue: AnyIssue): boolean {\n return (\n issue.message === `Invalid type: Expected ${issue.expected} but received ${issue.received}`\n );\n}\n\n/**\n * Parses a value with Valibot and translates schema failures into the SDK's\n * public error hierarchy.\n */\nexport function parse<const TSchema extends v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>>(\n schema: TSchema,\n input: unknown,\n config?: v.Config<v.InferIssue<TSchema>>,\n): v.InferOutput<TSchema> {\n try {\n return v.parse(schema, input, config);\n } catch (error) {\n if (v.isValiError(error)) {\n throw new ValidationError(describeIssue(error.issues[0]), { cause: error });\n }\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;AAWA,SAAS,cAAc,OAAyB;CAC5C,IAAI,OAAO,EAAE,WAAW,KAAK,KAAK;CAClC,OAAO,MAAM,SAAS,WAAW,MAAM,QAAQ,UAAU,kBAAkB,KAAK,GAAG;EAG/E,QAAQ,MAAM,OAAO,MAAM,WAAW,OAAO,SAAS,YAAY,KAAK,MAAM,OAAO;EACpF,MAAM,aAAa,EAAE,WAAW,KAAK;EACrC,IAAI,YAAY,OAAO,OAAO,GAAG,KAAK,GAAG,eAAe;CAC5D;CAEA,MAAM,QAAQ,KAAK,QAAQ,kBAAkB,EAAE;CAC/C,IAAI,CAAC,QAAQ,MAAM,QAAQ,WAAW,IAAI,KAAK,MAAM,QAAQ,WAAW,KAAK,GACzE,OAAO,MAAM;CAEjB,OAAO,GAAG,KAAK,IAAI,MAAM;AAC7B;;AAGA,SAAS,kBAAkB,OAA0B;CACjD,OACI,MAAM,YAAY,0BAA0B,MAAM,SAAS,gBAAgB,MAAM;AAEzF;;;;;AAMA,SAAgB,MACZ,QACA,OACA,QACsB;CACtB,IAAI;EACA,OAAO,EAAE,MAAM,QAAQ,OAAO,MAAM;CACxC,SAAS,OAAO;EACZ,IAAI,EAAE,YAAY,KAAK,GACnB,MAAM,IAAI,gBAAgB,cAAc,MAAM,OAAO,EAAE,GAAG,EAAE,OAAO,MAAM,CAAC;EAE9E,MAAM;CACV;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polyester/sdk",
3
- "version": "0.33.0",
3
+ "version": "0.33.1-devnet-20261105174258",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK providing access to APIs on Polyester Exchange.",
6
6
  "homepage": "https://github.com/Fabric-Labs/polyester-sdk-typescript#readme",