@polyester/sdk 0.33.1-devnet-20261105174258 → 0.34.0-devnet-20261105175510

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/services/address-book/address-book.schemas.d.ts +2 -2
  3. package/dist/services/balances/balances.d.ts.map +1 -1
  4. package/dist/services/balances/balances.js +3 -8
  5. package/dist/services/balances/balances.js.map +1 -1
  6. package/dist/services/balances/balances.schemas.d.ts +0 -5
  7. package/dist/services/balances/balances.schemas.d.ts.map +1 -1
  8. package/dist/services/balances/balances.schemas.js +34 -20
  9. package/dist/services/balances/balances.schemas.js.map +1 -1
  10. package/dist/services/candles/candles.d.ts.map +1 -1
  11. package/dist/services/candles/candles.js +7 -20
  12. package/dist/services/candles/candles.js.map +1 -1
  13. package/dist/services/candles/candles.schemas.d.ts +10 -10
  14. package/dist/services/candles/candles.schemas.d.ts.map +1 -1
  15. package/dist/services/candles/candles.schemas.js +35 -20
  16. package/dist/services/candles/candles.schemas.js.map +1 -1
  17. package/dist/services/heatmap/heatmap.schemas.d.ts +13 -13
  18. package/dist/services/lifecycle/lifecycle.schemas.d.ts +40 -40
  19. package/dist/services/market-data/market-data.d.ts.map +1 -1
  20. package/dist/services/market-data/market-data.js +3 -6
  21. package/dist/services/market-data/market-data.js.map +1 -1
  22. package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
  23. package/dist/services/market-data/market-data.schemas.js +22 -23
  24. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  25. package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
  26. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  27. package/dist/services/orders/order-errors.schemas.d.ts +1 -1
  28. package/dist/services/orders/orders-batch.schemas.d.ts +27 -27
  29. package/dist/services/orders/orders-input.schemas.d.ts +5 -5
  30. package/dist/services/orders/orders-input.schemas.js +2 -2
  31. package/dist/services/orders/orders-input.schemas.js.map +1 -1
  32. package/dist/services/orders/orders-output.schemas.d.ts +1 -0
  33. package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
  34. package/dist/services/orders/orders-output.schemas.js +100 -83
  35. package/dist/services/orders/orders-output.schemas.js.map +1 -1
  36. package/dist/services/orders/orders.d.ts +2 -2
  37. package/dist/services/orders/orders.d.ts.map +1 -1
  38. package/dist/services/orders/orders.js +8 -11
  39. package/dist/services/orders/orders.js.map +1 -1
  40. package/dist/services/rewards/rewards.schemas.d.ts +3 -3
  41. package/dist/services/social-verification/social-verification.codecs.js +2 -2
  42. package/dist/services/social-verification/social-verification.codecs.js.map +1 -1
  43. package/dist/services/social-verification/social-verification.schemas.d.ts +2 -2
  44. package/dist/services/subaccounts/subaccounts.codecs.js +1 -1
  45. package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
  46. package/dist/services/subaccounts/subaccounts.schemas.d.ts +16 -16
  47. package/dist/services/subaccounts/subaccounts.schemas.js +1 -1
  48. package/dist/services/subaccounts/subaccounts.schemas.js.map +1 -1
  49. package/dist/services/trades/trades.d.ts.map +1 -1
  50. package/dist/services/trades/trades.js +3 -5
  51. package/dist/services/trades/trades.js.map +1 -1
  52. package/dist/services/trades/trades.schemas.d.ts +2 -1
  53. package/dist/services/trades/trades.schemas.d.ts.map +1 -1
  54. package/dist/services/trades/trades.schemas.js +42 -35
  55. package/dist/services/trades/trades.schemas.js.map +1 -1
  56. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  57. package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
  58. package/dist/services/triggers/triggers.codecs.js +3 -3
  59. package/dist/services/triggers/triggers.codecs.js.map +1 -1
  60. package/dist/shared/connect-error-mapping.d.ts +1 -1
  61. package/dist/shared/connect-error-mapping.js +1 -1
  62. package/dist/shared/connect-error-mapping.js.map +1 -1
  63. package/dist/shared/rate-limit.schemas.d.ts +1 -1
  64. package/dist/shared/request-options.d.ts +1 -1
  65. package/dist/shared/request-options.js.map +1 -1
  66. package/dist/smart-account/smart-account.js.map +1 -1
  67. package/package.json +1 -1
@@ -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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
359
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
422
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
600
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
652
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
663
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
715
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
822
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
874
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
885
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
937
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1091
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1154
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1318
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1370
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1381
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1433
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1543
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1595
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1606
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1658
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1812
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1875
+ step: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1986
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2014
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
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">]>;
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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2081
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "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" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2109
+ currentStep: "validation" | "unspecified" | "failed" | "source" | "execution" | "transfer" | "dropped" | "refunded" | "request" | "bridge_fulfillment" | "fulfilling" | "settlement";
2110
2110
  isOpen: boolean;
2111
2111
  isTerminal: boolean;
2112
2112
  assetIds?: {
@@ -1 +1 @@
1
- {"version":3,"file":"market-data.d.ts","names":[],"sources":["../../../src/services/market-data/market-data.ts"],"mappings":";;;;;;;;UA8BU,6BAA6B,mBAAmB;EACtD;;;;;cAMS;;EAMG,YAAA,YAAY,qBAAqB,UAAU,mBAAmB,QAAQ;;;;;;;;;;EAgB5E,WACF,OAAO,sBACP,UAAU,0BACX;IAAU,QAAQ;IAAe;IAAuB,WAAW;;;;;;;;;EAsBhE,cAAc,UAAU,0BAA0B,QAAQ;;;;;;EAUhE,gBAAgB,OAAO"}
1
+ {"version":3,"file":"market-data.d.ts","names":[],"sources":["../../../src/services/market-data/market-data.ts"],"mappings":";;;;;;;;UA6BU,6BAA6B,mBAAmB;EACtD;;;;;cAMS;;EAKG,YAAA,YAAY,qBAAqB,UAAU,mBAAmB,QAAQ;;;;;;;;;;EAe5E,WACF,OAAO,sBACP,UAAU,0BACX;IAAU,QAAQ;IAAe;IAAuB,WAAW;;;;;;;;;EAsBhE,cAAc,UAAU,0BAA0B,QAAQ;;;;;;EAUhE,gBAAgB,OAAO"}
@@ -5,9 +5,8 @@ import { SymbolIdInputSchema } from "../shared.js";
5
5
  import { connectReadyGatedProtoChannel } from "../../realtime/ready-gated-subscription.js";
6
6
  import { MarketDataService as MarketDataService$1, MarketTradeBatchSchema } from "../../gen/marketdata/v1/marketdata_pb.js";
7
7
  import { isDev } from "../../utils/is-dev.js";
8
- import { GetMarketTradesInputSchema, SpotConfigSchema, TradeBackfillSchema, createMarketTradeSchema } from "./market-data.schemas.js";
8
+ import { GetMarketTradesInputSchema, SpotConfigSchema, TradeBackfillSchema, formatMarketTrade } from "./market-data.schemas.js";
9
9
  import { createClient } from "@connectrpc/connect";
10
- import * as v from "valibot";
11
10
  //#region src/services/market-data/market-data.ts
12
11
  /**
13
12
  * Exposes public spot trades, spot configuration, and live trade streams.
@@ -16,12 +15,10 @@ var MarketDataService = class {
16
15
  #client;
17
16
  #realtime;
18
17
  #scales;
19
- #marketTradeSchema;
20
18
  constructor(transports, realtime, scales) {
21
19
  this.#client = createClient(MarketDataService$1, transports.publicApi);
22
20
  this.#realtime = realtime;
23
21
  this.#scales = scales;
24
- this.#marketTradeSchema = createMarketTradeSchema(scales);
25
22
  }
26
23
  /**
27
24
  * Returns recent public trades for one spot market, ordered newest-first by execution timestamp with match id as a tie-breaker. Supports limit, time bounds, side filtering, and match-id pagination.
@@ -36,7 +33,7 @@ var MarketDataService = class {
36
33
  await this.#scales.ready();
37
34
  const validatedInput = parse(GetMarketTradesInputSchema, input);
38
35
  const res = await this.#client.getTrades(validatedInput, toConnectCallOptions(options));
39
- const trades = parse(v.array(this.#marketTradeSchema), res.trades);
36
+ const trades = res.trades.map((trade) => formatMarketTrade(this.#scales, trade));
40
37
  if (validatedInput.afterTradeId === void 0) return {
41
38
  trades,
42
39
  nextPageToken: res.nextPageToken
@@ -73,7 +70,7 @@ var MarketDataService = class {
73
70
  channel,
74
71
  schema: MarketTradeBatchSchema,
75
72
  ready: () => this.#scales.ready(),
76
- onPublication: (batch) => deliverBatch(channel, batch.events, (trade) => input.onEvent(parse(this.#marketTradeSchema, trade)), notifyError),
73
+ onPublication: (batch) => deliverBatch(channel, batch.events, (trade) => input.onEvent(formatMarketTrade(this.#scales, trade)), notifyError),
77
74
  onConnected: () => input.onOpen?.(),
78
75
  onDisconnected: () => input.onClose?.(),
79
76
  onError: notifyError
@@ -1 +1 @@
1
- {"version":3,"file":"market-data.js","names":["#client","Proto.MarketDataService","#realtime","#scales","#marketTradeSchema","Proto.MarketTradeBatchSchema"],"sources":["../../../src/services/market-data/market-data.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketdata/v1/marketdata_pb.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport type { PolyesterRealtime } from \"../../realtime/types.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport {\n deliverBatch,\n type SdkSubscriptionErrorContext,\n} from \"../../shared/subscription-errors.js\";\nimport * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport { connectReadyGatedProtoChannel } from \"../../realtime/ready-gated-subscription.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { PublicApiTransports } from \"../../shared/transports.js\";\nimport {\n GetMarketTradesInputSchema,\n createMarketTradeSchema,\n type GetMarketTradesInput,\n type SpotConfig,\n SpotConfigSchema,\n type MarketTrade,\n TradeBackfillSchema,\n type TradeBackfill,\n} from \"./market-data.schemas.js\";\nimport { isDev } from \"../../utils/is-dev.js\";\n\ninterface SubscribeTradesInput extends BaseSubscribeInput<MarketTrade> {\n symbolId: number;\n}\n\n/**\n * Exposes public spot trades, spot configuration, and live trade streams.\n */\nexport class MarketDataService {\n #client: Client<typeof Proto.MarketDataService>;\n #realtime: PolyesterRealtime;\n #scales: SdkScales;\n #marketTradeSchema: ReturnType<typeof createMarketTradeSchema>;\n\n constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales) {\n this.#client = createClient(Proto.MarketDataService, transports.publicApi);\n this.#realtime = realtime;\n this.#scales = scales;\n this.#marketTradeSchema = createMarketTradeSchema(scales);\n }\n\n /**\n * Returns recent public trades for one spot market, ordered newest-first by execution timestamp with match id as a tie-breaker. Supports limit, time bounds, side filtering, and match-id pagination.\n *\n * With `afterTradeId`, it instead walks the symbol's trades by `matchId`, oldest first and\n * gap-free, to backfill trades missed on a live stream, and the result carries `backfill`.\n * Start from `\"0\"`, then pass `backfill.nextAfterTradeId`; when it equals the `afterTradeId`\n * sent, nothing newer is available yet, so retry later with backoff. `afterTradeId` cannot\n * be combined with `side`, `startTsNs`, `endTsNs` or `pageToken`.\n */\n async listTrades(\n input: GetMarketTradesInput,\n options?: PolyesterRequestOptions,\n ): Promise<{ trades: MarketTrade[]; nextPageToken: string; backfill?: TradeBackfill }> {\n await this.#scales.ready();\n const validatedInput = parse(GetMarketTradesInputSchema, input);\n const res = await this.#client.getTrades(validatedInput, toConnectCallOptions(options));\n const trades = parse(v.array(this.#marketTradeSchema), res.trades);\n if (validatedInput.afterTradeId === undefined) {\n return { trades, nextPageToken: res.nextPageToken };\n }\n return {\n trades,\n nextPageToken: res.nextPageToken,\n backfill: parse(TradeBackfillSchema, res),\n };\n }\n\n /**\n * Returns the cacheable spot reference-data snapshot, including asset metadata, pair trading constraints, display scales, statuses, and market slippage defaults.\n *\n * This is the catalog's own data source, so it must never wait on catalog\n * readiness (that would deadlock the initial catalog refresh) and carries\n * no decimal conversion.\n */\n async getSpotConfig(options?: PolyesterRequestOptions): Promise<SpotConfig> {\n const res = await this.#client.getSpotConfig({}, toConnectCallOptions(options));\n return parse(SpotConfigSchema, res);\n }\n\n /**\n * Subscribes to public trade prints on public:spot:market:trades:{symbolId}:proto for the requested symbol and emits parsed market trades.\n * Each publication batches trades, emitted one at a time in execution order; a trade\n * whose `matchId` was already emitted replaces the earlier copy.\n */\n subscribeTrades(input: SubscribeTradesInput): () => void {\n const symbolId = parse(SymbolIdInputSchema, input.symbolId);\n const channel = `public:spot:market:trades:${symbolId}:proto`;\n const notifyError = (error: SdkSubscriptionErrorContext) => {\n if (isDev()) {\n console.error(\"Market trades subscription error\", error);\n }\n input.onError?.(error);\n };\n return connectReadyGatedProtoChannel(this.#realtime, {\n channel,\n schema: Proto.MarketTradeBatchSchema,\n ready: () => this.#scales.ready(),\n onPublication: (batch) =>\n deliverBatch(\n channel,\n batch.events,\n (trade) => input.onEvent(parse(this.#marketTradeSchema, trade)),\n notifyError,\n ),\n onConnected: () => input.onOpen?.(),\n onDisconnected: () => input.onClose?.(),\n onError: notifyError,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAqCA,IAAa,oBAAb,MAA+B;CAC3B;CACA;CACA;CACA;CAEA,YAAY,YAAiC,UAA6B,QAAmB;EACzF,KAAKA,UAAU,aAAaC,qBAAyB,WAAW,SAAS;EACzE,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,qBAAqB,wBAAwB,MAAM;CAC5D;;;;;;;;;;CAWA,MAAM,WACF,OACA,SACmF;EACnF,MAAM,KAAKD,QAAQ,MAAM;EACzB,MAAM,iBAAiB,MAAM,4BAA4B,KAAK;EAC9D,MAAM,MAAM,MAAM,KAAKH,QAAQ,UAAU,gBAAgB,qBAAqB,OAAO,CAAC;EACtF,MAAM,SAAS,MAAM,EAAE,MAAM,KAAKI,kBAAkB,GAAG,IAAI,MAAM;EACjE,IAAI,eAAe,iBAAiB,KAAA,GAChC,OAAO;GAAE;GAAQ,eAAe,IAAI;EAAc;EAEtD,OAAO;GACH;GACA,eAAe,IAAI;GACnB,UAAU,MAAM,qBAAqB,GAAG;EAC5C;CACJ;;;;;;;;CASA,MAAM,cAAc,SAAwD;EACxE,MAAM,MAAM,MAAM,KAAKJ,QAAQ,cAAc,CAAC,GAAG,qBAAqB,OAAO,CAAC;EAC9E,OAAO,MAAM,kBAAkB,GAAG;CACtC;;;;;;CAOA,gBAAgB,OAAyC;EAErD,MAAM,UAAU,6BADC,MAAM,qBAAqB,MAAM,QACE,EAAE;EACtD,MAAM,eAAe,UAAuC;GACxD,IAAI,MAAM,GACN,QAAQ,MAAM,oCAAoC,KAAK;GAE3D,MAAM,UAAU,KAAK;EACzB;EACA,OAAO,8BAA8B,KAAKE,WAAW;GACjD;GACA,QAAQG;GACR,aAAa,KAAKF,QAAQ,MAAM;GAChC,gBAAgB,UACZ,aACI,SACA,MAAM,SACL,UAAU,MAAM,QAAQ,MAAM,KAAKC,oBAAoB,KAAK,CAAC,GAC9D,WACJ;GACJ,mBAAmB,MAAM,SAAS;GAClC,sBAAsB,MAAM,UAAU;GACtC,SAAS;EACb,CAAC;CACL;AACJ"}
1
+ {"version":3,"file":"market-data.js","names":["#client","Proto.MarketDataService","#realtime","#scales","Proto.MarketTradeBatchSchema"],"sources":["../../../src/services/market-data/market-data.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketdata/v1/marketdata_pb.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport type { PolyesterRealtime } from \"../../realtime/types.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport {\n deliverBatch,\n type SdkSubscriptionErrorContext,\n} from \"../../shared/subscription-errors.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport { connectReadyGatedProtoChannel } from \"../../realtime/ready-gated-subscription.js\";\nimport {\n toConnectCallOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { PublicApiTransports } from \"../../shared/transports.js\";\nimport {\n GetMarketTradesInputSchema,\n formatMarketTrade,\n type GetMarketTradesInput,\n type SpotConfig,\n SpotConfigSchema,\n type MarketTrade,\n TradeBackfillSchema,\n type TradeBackfill,\n} from \"./market-data.schemas.js\";\nimport { isDev } from \"../../utils/is-dev.js\";\n\ninterface SubscribeTradesInput extends BaseSubscribeInput<MarketTrade> {\n symbolId: number;\n}\n\n/**\n * Exposes public spot trades, spot configuration, and live trade streams.\n */\nexport class MarketDataService {\n #client: Client<typeof Proto.MarketDataService>;\n #realtime: PolyesterRealtime;\n #scales: SdkScales;\n\n constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales) {\n this.#client = createClient(Proto.MarketDataService, transports.publicApi);\n this.#realtime = realtime;\n this.#scales = scales;\n }\n\n /**\n * Returns recent public trades for one spot market, ordered newest-first by execution timestamp with match id as a tie-breaker. Supports limit, time bounds, side filtering, and match-id pagination.\n *\n * With `afterTradeId`, it instead walks the symbol's trades by `matchId`, oldest first and\n * gap-free, to backfill trades missed on a live stream, and the result carries `backfill`.\n * Start from `\"0\"`, then pass `backfill.nextAfterTradeId`; when it equals the `afterTradeId`\n * sent, nothing newer is available yet, so retry later with backoff. `afterTradeId` cannot\n * be combined with `side`, `startTsNs`, `endTsNs` or `pageToken`.\n */\n async listTrades(\n input: GetMarketTradesInput,\n options?: PolyesterRequestOptions,\n ): Promise<{ trades: MarketTrade[]; nextPageToken: string; backfill?: TradeBackfill }> {\n await this.#scales.ready();\n const validatedInput = parse(GetMarketTradesInputSchema, input);\n const res = await this.#client.getTrades(validatedInput, toConnectCallOptions(options));\n const trades = res.trades.map((trade) => formatMarketTrade(this.#scales, trade));\n if (validatedInput.afterTradeId === undefined) {\n return { trades, nextPageToken: res.nextPageToken };\n }\n return {\n trades,\n nextPageToken: res.nextPageToken,\n backfill: parse(TradeBackfillSchema, res),\n };\n }\n\n /**\n * Returns the cacheable spot reference-data snapshot, including asset metadata, pair trading constraints, display scales, statuses, and market slippage defaults.\n *\n * This is the catalog's own data source, so it must never wait on catalog\n * readiness (that would deadlock the initial catalog refresh) and carries\n * no decimal conversion.\n */\n async getSpotConfig(options?: PolyesterRequestOptions): Promise<SpotConfig> {\n const res = await this.#client.getSpotConfig({}, toConnectCallOptions(options));\n return parse(SpotConfigSchema, res);\n }\n\n /**\n * Subscribes to public trade prints on public:spot:market:trades:{symbolId}:proto for the requested symbol and emits parsed market trades.\n * Each publication batches trades, emitted one at a time in execution order; a trade\n * whose `matchId` was already emitted replaces the earlier copy.\n */\n subscribeTrades(input: SubscribeTradesInput): () => void {\n const symbolId = parse(SymbolIdInputSchema, input.symbolId);\n const channel = `public:spot:market:trades:${symbolId}:proto`;\n const notifyError = (error: SdkSubscriptionErrorContext) => {\n if (isDev()) {\n console.error(\"Market trades subscription error\", error);\n }\n input.onError?.(error);\n };\n return connectReadyGatedProtoChannel(this.#realtime, {\n channel,\n schema: Proto.MarketTradeBatchSchema,\n ready: () => this.#scales.ready(),\n onPublication: (batch) =>\n deliverBatch(\n channel,\n batch.events,\n (trade) => input.onEvent(formatMarketTrade(this.#scales, trade)),\n notifyError,\n ),\n onConnected: () => input.onOpen?.(),\n onDisconnected: () => input.onClose?.(),\n onError: notifyError,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAoCA,IAAa,oBAAb,MAA+B;CAC3B;CACA;CACA;CAEA,YAAY,YAAiC,UAA6B,QAAmB;EACzF,KAAKA,UAAU,aAAaC,qBAAyB,WAAW,SAAS;EACzE,KAAKC,YAAY;EACjB,KAAKC,UAAU;CACnB;;;;;;;;;;CAWA,MAAM,WACF,OACA,SACmF;EACnF,MAAM,KAAKA,QAAQ,MAAM;EACzB,MAAM,iBAAiB,MAAM,4BAA4B,KAAK;EAC9D,MAAM,MAAM,MAAM,KAAKH,QAAQ,UAAU,gBAAgB,qBAAqB,OAAO,CAAC;EACtF,MAAM,SAAS,IAAI,OAAO,KAAK,UAAU,kBAAkB,KAAKG,SAAS,KAAK,CAAC;EAC/E,IAAI,eAAe,iBAAiB,KAAA,GAChC,OAAO;GAAE;GAAQ,eAAe,IAAI;EAAc;EAEtD,OAAO;GACH;GACA,eAAe,IAAI;GACnB,UAAU,MAAM,qBAAqB,GAAG;EAC5C;CACJ;;;;;;;;CASA,MAAM,cAAc,SAAwD;EACxE,MAAM,MAAM,MAAM,KAAKH,QAAQ,cAAc,CAAC,GAAG,qBAAqB,OAAO,CAAC;EAC9E,OAAO,MAAM,kBAAkB,GAAG;CACtC;;;;;;CAOA,gBAAgB,OAAyC;EAErD,MAAM,UAAU,6BADC,MAAM,qBAAqB,MAAM,QACE,EAAE;EACtD,MAAM,eAAe,UAAuC;GACxD,IAAI,MAAM,GACN,QAAQ,MAAM,oCAAoC,KAAK;GAE3D,MAAM,UAAU,KAAK;EACzB;EACA,OAAO,8BAA8B,KAAKE,WAAW;GACjD;GACA,QAAQE;GACR,aAAa,KAAKD,QAAQ,MAAM;GAChC,gBAAgB,UACZ,aACI,SACA,MAAM,SACL,UAAU,MAAM,QAAQ,kBAAkB,KAAKA,SAAS,KAAK,CAAC,GAC/D,WACJ;GACJ,mBAAmB,MAAM,SAAS;GAClC,sBAAsB,MAAM,UAAU;GACtC,SAAS;EACb,CAAC;CACL;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"market-data.schemas.d.ts","names":[],"sources":["../../../src/services/market-data/market-data.schemas.ts"],"mappings":";;;;;iBAoBgB,wBAAwB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;KA0B7C,cAAc,EAAE,YAAY,kBAAkB;;cAiC7C,qBAAmB,EAAA;;;;;;;;;;;;;;KAoBpB,gBAAgB,EAAE,mBAAmB;iBAEjC,oCAAgC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIpC,uBAAuB,EAAE,WACjC,kBAAkB"}
1
+ {"version":3,"file":"market-data.schemas.d.ts","names":[],"sources":["../../../src/services/market-data/market-data.schemas.ts"],"mappings":";;;;;iBA+CgB,wBAAwB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;KAO7C,cAAc,EAAE,YAAY,kBAAkB;;cAiC7C,qBAAmB,EAAA;;;;;;;;;;;;;;KAoBpB,gBAAgB,EAAE,mBAAmB;iBAEjC,oCAAgC,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIpC,uBAAuB,EAAE,WACjC,kBAAkB"}
@@ -7,28 +7,27 @@ import { SideSchema, SymbolIdInputSchema } from "../shared.js";
7
7
  import { timestampToMs, tsNsToTimestamp } from "../../utils/timestamp.js";
8
8
  import { PairStatusCodec, SideFilterCodec } from "./market-data.codecs.js";
9
9
  import * as v from "valibot";
10
- //#region src/services/market-data/market-data.schemas.ts
11
- function createMarketTradeSchema(scales) {
12
- return v.pipe(v.object({
13
- symbolId: v.number(),
14
- matchId: v.bigint(),
15
- isBuy: v.boolean(),
16
- priceTicks: v.bigint(),
17
- qtyScaled: v.bigint(),
18
- tsNs: v.optional(v.bigint(), 0n)
19
- }), v.transform((t) => {
20
- const sideLabel = t.isBuy ? "buy" : "sell";
21
- return {
22
- symbolId: t.symbolId,
23
- matchId: t.matchId.toString(),
24
- isBuy: t.isBuy,
25
- sideLabel,
26
- qty: scaledToDecimalOutput(t.qtyScaled, scales.baseQty(t.symbolId)),
27
- price: scaledToDecimalOutput(t.priceTicks, scales.price()),
28
- tsNs: t.tsNs.toString(),
29
- tsMs: tsNsToMs(t.tsNs)
30
- };
31
- }));
10
+ v.object({
11
+ symbolId: v.number(),
12
+ matchId: v.bigint(),
13
+ isBuy: v.boolean(),
14
+ priceTicks: v.bigint(),
15
+ qtyScaled: v.bigint(),
16
+ tsNs: v.optional(v.bigint(), 0n)
17
+ });
18
+ /** Formats a market trade; protobuf-decoded trades can be passed directly, they need no re-validation. */
19
+ function formatMarketTrade(scales, t) {
20
+ const sideLabel = t.isBuy ? "buy" : "sell";
21
+ return {
22
+ symbolId: t.symbolId,
23
+ matchId: t.matchId.toString(),
24
+ isBuy: t.isBuy,
25
+ sideLabel,
26
+ qty: scaledToDecimalOutput(t.qtyScaled, scales.baseQty(t.symbolId)),
27
+ price: scaledToDecimalOutput(t.priceTicks, scales.price()),
28
+ tsNs: t.tsNs.toString(),
29
+ tsMs: tsNsToMs(t.tsNs)
30
+ };
32
31
  }
33
32
  const GetMarketTradesInputSchema = v.pipe(v.object({
34
33
  symbolId: SymbolIdInputSchema,
@@ -231,6 +230,6 @@ const SpotConfigSchema = v.object({
231
230
  tsSec: v.pipe(v.bigint(), v.transform((v) => Number(v) * 1e3))
232
231
  });
233
232
  //#endregion
234
- export { AssetConfigSchema, GetMarketTradesInputSchema, PairConfigSchema, PairMarketDataConfigSchema, SpotConfigSchema, TradeBackfillSchema, createMarketTradeSchema };
233
+ export { AssetConfigSchema, GetMarketTradesInputSchema, PairConfigSchema, PairMarketDataConfigSchema, SpotConfigSchema, TradeBackfillSchema, formatMarketTrade };
235
234
 
236
235
  //# sourceMappingURL=market-data.schemas.js.map