@polyester/sdk 0.21.1 → 0.22.1

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 (64) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +5 -0
  3. package/dist/catalogs/snapshot-validation.js +0 -1
  4. package/dist/catalogs/snapshot-validation.js.map +1 -1
  5. package/dist/catalogs/zipper-catalog.d.ts +0 -3
  6. package/dist/catalogs/zipper-catalog.d.ts.map +1 -1
  7. package/dist/catalogs/zipper-catalog.js +0 -1
  8. package/dist/catalogs/zipper-catalog.js.map +1 -1
  9. package/dist/environment.d.ts +2 -1
  10. package/dist/environment.d.ts.map +1 -1
  11. package/dist/environment.js +44 -2
  12. package/dist/environment.js.map +1 -1
  13. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +0 -6
  14. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts.map +1 -1
  15. package/dist/gen/chain/zipper/v1/zipper_pb.js +1 -1
  16. package/dist/gen/chain/zipper/v1/zipper_pb.js.map +1 -1
  17. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +236 -8
  18. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts.map +1 -1
  19. package/dist/gen/marketoverview/v1/marketoverview_pb.js +50 -2
  20. package/dist/gen/marketoverview/v1/marketoverview_pb.js.map +1 -1
  21. package/dist/gen/orders/v1/orders_pb.d.ts +9 -6
  22. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  23. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  24. package/dist/gen/orders/v1/orders_read_pb.d.ts +2 -1
  25. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  26. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  27. package/dist/index.d.ts +3 -3
  28. package/dist/index.js +2 -2
  29. package/dist/services/candles/candles.schemas.d.ts +10 -10
  30. package/dist/services/heatmap/heatmap.schemas.d.ts +9 -9
  31. package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
  32. package/dist/services/market-overview/index.d.ts +2 -2
  33. package/dist/services/market-overview/market-overview.d.ts +9 -1
  34. package/dist/services/market-overview/market-overview.d.ts.map +1 -1
  35. package/dist/services/market-overview/market-overview.js +15 -1
  36. package/dist/services/market-overview/market-overview.js.map +1 -1
  37. package/dist/services/market-overview/market-overview.schemas.d.ts +163 -4
  38. package/dist/services/market-overview/market-overview.schemas.d.ts.map +1 -1
  39. package/dist/services/market-overview/market-overview.schemas.js +46 -1
  40. package/dist/services/market-overview/market-overview.schemas.js.map +1 -1
  41. package/dist/services/market-overview/market-overview.types.d.ts +2 -2
  42. package/dist/services/orders/orders-batch.schemas.d.ts +14 -14
  43. package/dist/services/orders/orders-output.schemas.d.ts +12 -12
  44. package/dist/services/orders/orders.d.ts +1 -1
  45. package/dist/services/orders/orders.d.ts.map +1 -1
  46. package/dist/services/orders/orders.js +10 -3
  47. package/dist/services/orders/orders.js.map +1 -1
  48. package/dist/services/subaccounts/subaccounts.schemas.d.ts +3 -3
  49. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
  50. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +3 -5
  51. package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
  52. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  53. package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
  54. package/dist/services/zipper/zipper.schemas.d.ts.map +1 -1
  55. package/dist/services/zipper/zipper.schemas.js +0 -1
  56. package/dist/services/zipper/zipper.schemas.js.map +1 -1
  57. package/dist/shared/catalog-config.d.ts +0 -1
  58. package/dist/shared/catalog-config.d.ts.map +1 -1
  59. package/dist/shared/catalog-config.js.map +1 -1
  60. package/dist/shared/errors.d.ts +3 -2
  61. package/dist/shared/errors.d.ts.map +1 -1
  62. package/dist/shared/errors.js +3 -2
  63. package/dist/shared/errors.js.map +1 -1
  64. package/package.json +2 -2
@@ -7,7 +7,7 @@ declare const LifecycleAssetIdsSchema: v.ObjectSchema<{
7
7
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
8
8
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
9
9
  }, undefined>;
10
- declare const LifecycleFlowStateEnumSchema: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowState, undefined>, v.TransformAction<FlowState, "unspecified" | "failed" | "pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "dropped" | "refunded">]>;
10
+ declare const LifecycleFlowStateEnumSchema: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowState, undefined>, v.TransformAction<FlowState, "unspecified" | "pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "failed" | "dropped" | "refunded">]>;
11
11
  declare const LifecycleZipperReasonSchema: v.ObjectSchema<{
12
12
  readonly code: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
13
13
  readonly reasonId: v.StringSchema<undefined>;
@@ -17,7 +17,7 @@ declare const ListLifecycleFlowsInputSchema: v.SchemaWithPipe<readonly [v.Strict
17
17
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 500, undefined>]>, 100>;
18
18
  readonly sort: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["newest", "oldest"], undefined>, "newest">, v.TransformAction<"newest" | "oldest", Sort.NEWEST | Sort.OLDEST>]>;
19
19
  readonly flowKind: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["deposit", "withdraw", "transfer"], undefined>, undefined>, v.TransformAction<"deposit" | "withdraw" | "transfer" | undefined, FlowKind>]>;
20
- readonly flowState: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["pending_source", "pending_polyester_chain", "pending_ledger", "completed", "failed", "dropped", "refunded"], undefined>, undefined>, v.TransformAction<"failed" | "pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "dropped" | "refunded" | undefined, FlowState>]>;
20
+ readonly flowState: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["pending_source", "pending_polyester_chain", "pending_ledger", "completed", "failed", "dropped", "refunded"], undefined>, undefined>, v.TransformAction<"pending_source" | "pending_polyester_chain" | "pending_ledger" | "completed" | "failed" | "dropped" | "refunded" | undefined, FlowState>]>;
21
21
  readonly txRef: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "txHash is required.">, v.CheckAction<string, "txHash must be a valid EVM hash or chain-native transaction id.">, v.TransformAction<string, string>]>, undefined>;
22
22
  readonly scope: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["all", "open", "terminal"], undefined>, "all">, v.TransformAction<"open" | "all" | "terminal", ListScope.LIST_ALL | ListScope.LIST_OPEN_ONLY | ListScope.LIST_TERMINAL_ONLY>]>;
23
23
  readonly accountSelector: v.OptionalSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"kind", [v.StrictObjectSchema<{
@@ -209,7 +209,7 @@ declare const LifecycleFlowStepActivitySchema: v.SchemaWithPipe<readonly [v.Obje
209
209
  }>]>;
210
210
  declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
211
211
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
212
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
212
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
213
213
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
214
214
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
215
215
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -346,7 +346,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
346
346
  }>]>, undefined>, readonly []>;
347
347
  }, undefined>, v.TransformAction<{
348
348
  sequence: number;
349
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
349
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
350
350
  assetIds?: {
351
351
  zippedAssetId: number;
352
352
  unifiedAssetId: number;
@@ -407,7 +407,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
407
407
  })[];
408
408
  }, Omit<{
409
409
  sequence: number;
410
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
410
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
411
411
  assetIds?: {
412
412
  zippedAssetId: number;
413
413
  unifiedAssetId: number;
@@ -471,7 +471,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
471
471
  }>]>;
472
472
  declare const LifecycleFlowTimelineItemSchema: v.ObjectSchema<{
473
473
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
474
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
474
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
475
475
  readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowTimelineStatus, undefined>, v.TransformAction<FlowTimelineStatus, "unspecified" | "completed" | "current" | "planned">]>;
476
476
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
477
477
  }, undefined>;
@@ -491,7 +491,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
491
491
  readonly smartAccountAddress: v.StringSchema<undefined>;
492
492
  readonly flowId: v.StringSchema<undefined>;
493
493
  readonly flowKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowKind, undefined>, v.TransformAction<FlowKind, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
494
- readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
494
+ readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
495
495
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
496
496
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
497
497
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -571,7 +571,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
571
571
  }, undefined>, undefined>;
572
572
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
573
573
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
574
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
574
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
575
575
  readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowTimelineStatus, undefined>, v.TransformAction<FlowTimelineStatus, "unspecified" | "completed" | "current" | "planned">]>;
576
576
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
577
577
  }, undefined>, undefined>, readonly []>;
@@ -581,7 +581,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
581
581
  smartAccountAddress: string;
582
582
  flowId: string;
583
583
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
584
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
584
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
585
585
  assetIds?: {
586
586
  zippedAssetId: number;
587
587
  unifiedAssetId: number;
@@ -633,7 +633,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
633
633
  } | undefined;
634
634
  progressTimeline: {
635
635
  sequence: number;
636
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
636
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
637
637
  status: "unspecified" | "completed" | "current" | "planned";
638
638
  expectedDurationMs: number;
639
639
  }[];
@@ -643,7 +643,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
643
643
  smartAccountAddress: string;
644
644
  flowId: string;
645
645
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
646
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
646
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
647
647
  assetIds?: {
648
648
  zippedAssetId: number;
649
649
  unifiedAssetId: number;
@@ -695,7 +695,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
695
695
  } | undefined;
696
696
  progressTimeline: {
697
697
  sequence: number;
698
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
698
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
699
699
  status: "unspecified" | "completed" | "current" | "planned";
700
700
  expectedDurationMs: number;
701
701
  }[];
@@ -709,7 +709,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
709
709
  readonly smartAccountAddress: v.StringSchema<undefined>;
710
710
  readonly flowId: v.StringSchema<undefined>;
711
711
  readonly flowKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowKind, undefined>, v.TransformAction<FlowKind, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
712
- readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
712
+ readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
713
713
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
714
714
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
715
715
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -789,7 +789,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
789
789
  }, undefined>, undefined>;
790
790
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
791
791
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
792
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
792
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
793
793
  readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowTimelineStatus, undefined>, v.TransformAction<FlowTimelineStatus, "unspecified" | "completed" | "current" | "planned">]>;
794
794
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
795
795
  }, undefined>, undefined>, readonly []>;
@@ -799,7 +799,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
799
799
  smartAccountAddress: string;
800
800
  flowId: string;
801
801
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
802
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
802
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
803
803
  assetIds?: {
804
804
  zippedAssetId: number;
805
805
  unifiedAssetId: number;
@@ -851,7 +851,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
851
851
  } | undefined;
852
852
  progressTimeline: {
853
853
  sequence: number;
854
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
854
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
855
855
  status: "unspecified" | "completed" | "current" | "planned";
856
856
  expectedDurationMs: number;
857
857
  }[];
@@ -861,7 +861,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
861
861
  smartAccountAddress: string;
862
862
  flowId: string;
863
863
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
864
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
864
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
865
865
  assetIds?: {
866
866
  zippedAssetId: number;
867
867
  unifiedAssetId: number;
@@ -913,7 +913,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
913
913
  } | undefined;
914
914
  progressTimeline: {
915
915
  sequence: number;
916
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
916
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
917
917
  status: "unspecified" | "completed" | "current" | "planned";
918
918
  expectedDurationMs: number;
919
919
  }[];
@@ -923,7 +923,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
923
923
  }>]>, undefined>;
924
924
  readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
925
925
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
926
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
926
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
927
927
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
928
928
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
929
929
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1060,7 +1060,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
1060
1060
  }>]>, undefined>, readonly []>;
1061
1061
  }, undefined>, v.TransformAction<{
1062
1062
  sequence: number;
1063
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1063
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1064
1064
  assetIds?: {
1065
1065
  zippedAssetId: number;
1066
1066
  unifiedAssetId: number;
@@ -1121,7 +1121,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
1121
1121
  })[];
1122
1122
  }, Omit<{
1123
1123
  sequence: number;
1124
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1124
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1125
1125
  assetIds?: {
1126
1126
  zippedAssetId: number;
1127
1127
  unifiedAssetId: number;
@@ -1191,7 +1191,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1191
1191
  readonly smartAccountAddress: v.StringSchema<undefined>;
1192
1192
  readonly flowId: v.StringSchema<undefined>;
1193
1193
  readonly flowKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowKind, undefined>, v.TransformAction<FlowKind, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
1194
- readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1194
+ readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1195
1195
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1196
1196
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1197
1197
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1271,7 +1271,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1271
1271
  }, undefined>, undefined>;
1272
1272
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1273
1273
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1274
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1274
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1275
1275
  readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowTimelineStatus, undefined>, v.TransformAction<FlowTimelineStatus, "unspecified" | "completed" | "current" | "planned">]>;
1276
1276
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
1277
1277
  }, undefined>, undefined>, readonly []>;
@@ -1281,7 +1281,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1281
1281
  smartAccountAddress: string;
1282
1282
  flowId: string;
1283
1283
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1284
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1284
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1285
1285
  assetIds?: {
1286
1286
  zippedAssetId: number;
1287
1287
  unifiedAssetId: number;
@@ -1333,7 +1333,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1333
1333
  } | undefined;
1334
1334
  progressTimeline: {
1335
1335
  sequence: number;
1336
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1336
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1337
1337
  status: "unspecified" | "completed" | "current" | "planned";
1338
1338
  expectedDurationMs: number;
1339
1339
  }[];
@@ -1343,7 +1343,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1343
1343
  smartAccountAddress: string;
1344
1344
  flowId: string;
1345
1345
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1346
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1346
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1347
1347
  assetIds?: {
1348
1348
  zippedAssetId: number;
1349
1349
  unifiedAssetId: number;
@@ -1395,7 +1395,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
1395
1395
  } | undefined;
1396
1396
  progressTimeline: {
1397
1397
  sequence: number;
1398
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1398
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1399
1399
  status: "unspecified" | "completed" | "current" | "planned";
1400
1400
  expectedDurationMs: number;
1401
1401
  }[];
@@ -1412,7 +1412,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1412
1412
  readonly smartAccountAddress: v.StringSchema<undefined>;
1413
1413
  readonly flowId: v.StringSchema<undefined>;
1414
1414
  readonly flowKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowKind, undefined>, v.TransformAction<FlowKind, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
1415
- readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1415
+ readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1416
1416
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1417
1417
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1418
1418
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1492,7 +1492,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1492
1492
  }, undefined>, undefined>;
1493
1493
  readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
1494
1494
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1495
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1495
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1496
1496
  readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowTimelineStatus, undefined>, v.TransformAction<FlowTimelineStatus, "unspecified" | "completed" | "current" | "planned">]>;
1497
1497
  readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
1498
1498
  }, undefined>, undefined>, readonly []>;
@@ -1502,7 +1502,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1502
1502
  smartAccountAddress: string;
1503
1503
  flowId: string;
1504
1504
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1505
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1505
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1506
1506
  assetIds?: {
1507
1507
  zippedAssetId: number;
1508
1508
  unifiedAssetId: number;
@@ -1554,7 +1554,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1554
1554
  } | undefined;
1555
1555
  progressTimeline: {
1556
1556
  sequence: number;
1557
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1557
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1558
1558
  status: "unspecified" | "completed" | "current" | "planned";
1559
1559
  expectedDurationMs: number;
1560
1560
  }[];
@@ -1564,7 +1564,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1564
1564
  smartAccountAddress: string;
1565
1565
  flowId: string;
1566
1566
  flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
1567
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1567
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1568
1568
  assetIds?: {
1569
1569
  zippedAssetId: number;
1570
1570
  unifiedAssetId: number;
@@ -1616,7 +1616,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1616
1616
  } | undefined;
1617
1617
  progressTimeline: {
1618
1618
  sequence: number;
1619
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1619
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1620
1620
  status: "unspecified" | "completed" | "current" | "planned";
1621
1621
  expectedDurationMs: number;
1622
1622
  }[];
@@ -1626,7 +1626,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1626
1626
  }>]>, undefined>;
1627
1627
  readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
1628
1628
  readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1629
- readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1629
+ readonly step: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1630
1630
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
1631
1631
  readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
1632
1632
  readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -1763,7 +1763,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1763
1763
  }>]>, undefined>, readonly []>;
1764
1764
  }, undefined>, v.TransformAction<{
1765
1765
  sequence: number;
1766
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1766
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1767
1767
  assetIds?: {
1768
1768
  zippedAssetId: number;
1769
1769
  unifiedAssetId: number;
@@ -1824,7 +1824,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
1824
1824
  })[];
1825
1825
  }, Omit<{
1826
1826
  sequence: number;
1827
- step: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1827
+ step: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1828
1828
  assetIds?: {
1829
1829
  zippedAssetId: number;
1830
1830
  unifiedAssetId: number;
@@ -1899,7 +1899,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1899
1899
  readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
1900
1900
  readonly sourceDomain: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowDomain, undefined>, v.TransformAction<FlowDomain, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1901
1901
  readonly destinationDomain: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowDomain, undefined>, v.TransformAction<FlowDomain, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1902
- readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1902
+ readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1903
1903
  readonly isOpen: v.BooleanSchema<undefined>;
1904
1904
  readonly isTerminal: v.BooleanSchema<undefined>;
1905
1905
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
@@ -1933,7 +1933,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1933
1933
  txOccurrenceIndex?: number | undefined;
1934
1934
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1935
1935
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1936
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1936
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1937
1937
  isOpen: boolean;
1938
1938
  isTerminal: boolean;
1939
1939
  assetIds?: {
@@ -1961,7 +1961,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
1961
1961
  txOccurrenceIndex?: number | undefined;
1962
1962
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1963
1963
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
1964
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1964
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
1965
1965
  isOpen: boolean;
1966
1966
  isTerminal: boolean;
1967
1967
  assetIds?: {
@@ -1994,7 +1994,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
1994
1994
  readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
1995
1995
  readonly sourceDomain: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowDomain, undefined>, v.TransformAction<FlowDomain, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1996
1996
  readonly destinationDomain: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowDomain, undefined>, v.TransformAction<FlowDomain, "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending">]>;
1997
- readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1997
+ readonly currentStep: v.SchemaWithPipe<readonly [v.EnumSchema<typeof FlowStep, undefined>, v.TransformAction<FlowStep, "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
1998
1998
  readonly isOpen: v.BooleanSchema<undefined>;
1999
1999
  readonly isTerminal: v.BooleanSchema<undefined>;
2000
2000
  readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
@@ -2028,7 +2028,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2028
2028
  txOccurrenceIndex?: number | undefined;
2029
2029
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2030
2030
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2031
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2031
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2032
2032
  isOpen: boolean;
2033
2033
  isTerminal: boolean;
2034
2034
  assetIds?: {
@@ -2056,7 +2056,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
2056
2056
  txOccurrenceIndex?: number | undefined;
2057
2057
  sourceDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2058
2058
  destinationDomain: "unspecified" | "funding" | "trading" | "external_chain" | "zipper" | "lending";
2059
- currentStep: "validation" | "unspecified" | "source" | "request" | "failed" | "transfer" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2059
+ currentStep: "validation" | "unspecified" | "source" | "request" | "transfer" | "failed" | "dropped" | "refunded" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
2060
2060
  isOpen: boolean;
2061
2061
  isTerminal: boolean;
2062
2062
  assetIds?: {
@@ -1,4 +1,4 @@
1
1
  import { MarketOrderBy, SortDirection, SparklineInterval } from "../../gen/marketoverview/v1/marketoverview_pb.js";
2
- import { ListMarketOverviewInput, ListMarketOverviewInputSchema, MarketOverview, MarketOverviewOrderBy, MarketOverviewOrderBySchema, MarketOverviewSort, MarketOverviewSortSchema, MarketOverviewSparkline, SparklineIntervalName, SparklineIntervalSchema, SpotPairVolumeSeries, SpotPairVolumeSeriesSchema, SpotVolumeHistoryInput, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponse, SpotVolumeHistoryResponseSchema, createMarketOverviewSchema } from "./market-overview.schemas.js";
2
+ import { CurrencyConversionConfig, CurrencyConversionConfigSchema, CurrencyConversionRates, CurrencyConversionRatesSchema, CurrencyMetadata, CurrencyMetadataSchema, FiatConversionRate, FiatConversionRateSchema, FiatConversionSnapshot, FiatConversionSnapshotSchema, ListMarketOverviewInput, ListMarketOverviewInputSchema, MarketOverview, MarketOverviewOrderBy, MarketOverviewOrderBySchema, MarketOverviewSort, MarketOverviewSortSchema, MarketOverviewSparkline, SparklineIntervalName, SparklineIntervalSchema, SpotPairVolumeSeries, SpotPairVolumeSeriesSchema, SpotVolumeHistoryInput, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponse, SpotVolumeHistoryResponseSchema, StablecoinConversionRate, StablecoinConversionRateSchema, createMarketOverviewSchema } from "./market-overview.schemas.js";
3
3
  import { MarketOverviewService } from "./market-overview.js";
4
- export { ListMarketOverviewInput, ListMarketOverviewInputSchema, MarketOverview, MarketOverviewOrderBy, MarketOverviewOrderBySchema, MarketOverviewService, MarketOverviewSort, MarketOverviewSortSchema, MarketOverviewSparkline, SparklineIntervalName, SparklineIntervalSchema, SpotPairVolumeSeries, SpotPairVolumeSeriesSchema, SpotVolumeHistoryInput, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponse, SpotVolumeHistoryResponseSchema, createMarketOverviewSchema };
4
+ export { CurrencyConversionConfig, CurrencyConversionConfigSchema, CurrencyConversionRates, CurrencyConversionRatesSchema, CurrencyMetadata, CurrencyMetadataSchema, FiatConversionRate, FiatConversionRateSchema, FiatConversionSnapshot, FiatConversionSnapshotSchema, ListMarketOverviewInput, ListMarketOverviewInputSchema, MarketOverview, MarketOverviewOrderBy, MarketOverviewOrderBySchema, MarketOverviewService, MarketOverviewSort, MarketOverviewSortSchema, MarketOverviewSparkline, SparklineIntervalName, SparklineIntervalSchema, SpotPairVolumeSeries, SpotPairVolumeSeriesSchema, SpotVolumeHistoryInput, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponse, SpotVolumeHistoryResponseSchema, StablecoinConversionRate, StablecoinConversionRateSchema, createMarketOverviewSchema };
@@ -3,7 +3,7 @@ import { PolyesterRequestOptions } from "../../shared/request-options.js";
3
3
  import { PolyesterRealtime } from "../../realtime/types.js";
4
4
  import { BaseSubscribeInput } from "../../shared/types.js";
5
5
  import { SdkScales } from "../../shared/decimal-surface.js";
6
- import { ListMarketOverviewInput, MarketOverview, SparklineIntervalName, SpotVolumeHistoryInput, SpotVolumeHistoryResponse } from "./market-overview.schemas.js";
6
+ import { CurrencyConversionConfig, CurrencyConversionRates, ListMarketOverviewInput, MarketOverview, SparklineIntervalName, SpotVolumeHistoryInput, SpotVolumeHistoryResponse } from "./market-overview.schemas.js";
7
7
  //#region src/services/market-overview/market-overview.d.ts
8
8
  interface SubscribeMarketOverviewInput extends BaseSubscribeInput<MarketOverview[]> {
9
9
  symbolIds?: number[];
@@ -29,6 +29,14 @@ declare class MarketOverviewService {
29
29
  * as period volume. Unavailable valuations reject the request.
30
30
  */
31
31
  getSpotVolumeHistory(input?: SpotVolumeHistoryInput, options?: PolyesterRequestOptions): Promise<SpotVolumeHistoryResponse>;
32
+ /** Returns cacheable display metadata, even before rates have been observed. */
33
+ getCurrencyConversionConfig(options?: PolyesterRequestOptions): Promise<CurrencyConversionConfig>;
34
+ /**
35
+ * Returns exact decimal rates with observation times and backend staleness flags.
36
+ * Fiat is units per USD; stablecoins are USD per unit. Unobserved rates remain absent.
37
+ * Rejects as unavailable before any observation exists.
38
+ */
39
+ getCurrencyConversionRates(options?: PolyesterRequestOptions): Promise<CurrencyConversionRates>;
32
40
  /**
33
41
  * Subscribes to public:spot:market_overview:updates:proto, fetches an initial snapshot, buffers updates until ready, and emits the merged set of latest market rows. On reconnect it refetches the snapshot before resuming updates.
34
42
  */
@@ -1 +1 @@
1
- {"version":3,"file":"market-overview.d.ts","names":[],"sources":["../../../src/services/market-overview/market-overview.ts"],"mappings":";;;;;;;UA0BU,qCAAqC,mBAAmB;EAC9D;EACA;EACA,qBAAqB;;;;;cAMZ;;EAMG,YAAA,YAAY,qBAAqB,UAAU,mBAAmB,QAAQ;;;;EAU5E,KACF,QAAO,yBACP,UAAU,0BACX;IAAU,SAAS;IAAkB;;;;;;;EAkBlC,qBACF,QAAO,wBACP,UAAU,0BACX,QAAQ;;;;EA0CX,UAAU,OAAO"}
1
+ {"version":3,"file":"market-overview.d.ts","names":[],"sources":["../../../src/services/market-overview/market-overview.ts"],"mappings":";;;;;;;UA8BU,qCAAqC,mBAAmB;EAC9D;EACA;EACA,qBAAqB;;;;;cAMZ;;EAMG,YAAA,YAAY,qBAAqB,UAAU,mBAAmB,QAAQ;;;;EAU5E,KACF,QAAO,yBACP,UAAU,0BACX;IAAU,SAAS;IAAkB;;;;;;;EAkBlC,qBACF,QAAO,wBACP,UAAU,0BACX,QAAQ;;EAUL,4BACF,UAAU,0BACX,QAAQ;;;;;;EAaL,2BACF,UAAU,0BACX,QAAQ;;;;EAyCX,UAAU,OAAO"}
@@ -4,7 +4,7 @@ import { toConnectCallOptions } from "../../shared/request-options.js";
4
4
  import { CatalogLookupError } from "../../catalogs/types.js";
5
5
  import { isDev } from "../../utils/is-dev.js";
6
6
  import { snapshotThenStream } from "../../realtime/snapshot-then-stream.js";
7
- import { ListMarketOverviewInputSchema, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponseSchema, createMarketOverviewSchema } from "./market-overview.schemas.js";
7
+ import { CurrencyConversionConfigSchema, CurrencyConversionRatesSchema, ListMarketOverviewInputSchema, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponseSchema, createMarketOverviewSchema } from "./market-overview.schemas.js";
8
8
  import { createClient } from "@connectrpc/connect";
9
9
  //#region src/services/market-overview/market-overview.ts
10
10
  /**
@@ -43,6 +43,20 @@ var MarketOverviewService = class {
43
43
  const response = await this.#client.getSpotVolumeHistory(validated, toConnectCallOptions(options));
44
44
  return parse(SpotVolumeHistoryResponseSchema, response);
45
45
  }
46
+ /** Returns cacheable display metadata, even before rates have been observed. */
47
+ async getCurrencyConversionConfig(options) {
48
+ const response = await this.#client.getCurrencyConversionConfig({}, toConnectCallOptions(options));
49
+ return parse(CurrencyConversionConfigSchema, response);
50
+ }
51
+ /**
52
+ * Returns exact decimal rates with observation times and backend staleness flags.
53
+ * Fiat is units per USD; stablecoins are USD per unit. Unobserved rates remain absent.
54
+ * Rejects as unavailable before any observation exists.
55
+ */
56
+ async getCurrencyConversionRates(options) {
57
+ const response = await this.#client.getCurrencyConversionRates({}, toConnectCallOptions(options));
58
+ return parse(CurrencyConversionRatesSchema, response);
59
+ }
46
60
  /**
47
61
  * Decodes market rows, skipping any whose symbolId the catalog cannot resolve
48
62
  * (unknown or disabled pairs the backend still reports). Other errors propagate.
@@ -1 +1 @@
1
- {"version":3,"file":"market-overview.js","names":["#client","Proto.MarketOverviewService","#realtime","#scales","#marketOverviewSchema","#decodeMarkets","Proto.MarketOverviewBatchSchema"],"sources":["../../../src/services/market-overview/market-overview.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketoverview/v1/marketoverview_pb.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { parse } from \"../../shared/validation.js\";\nimport { CatalogLookupError } from \"../../catalogs/types.js\";\nimport { isDev } from \"../../utils/is-dev.js\";\nimport type { PolyesterRealtime } from \"../../realtime/types.js\";\nimport { snapshotThenStream } from \"../../realtime/snapshot-then-stream.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.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 SpotVolumeHistoryInputSchema,\n SpotVolumeHistoryResponseSchema,\n type SpotVolumeHistoryInput,\n type SpotVolumeHistoryResponse,\n ListMarketOverviewInputSchema,\n createMarketOverviewSchema,\n type SparklineIntervalName,\n type ListMarketOverviewInput,\n type MarketOverview,\n} from \"./market-overview.schemas.js\";\n\ninterface SubscribeMarketOverviewInput extends BaseSubscribeInput<MarketOverview[]> {\n symbolIds?: number[];\n includeSparklines?: boolean;\n sparklineIntervals?: SparklineIntervalName[];\n}\n\n/**\n * Provides ticker-style per-market stats and a live merged overview stream.\n */\nexport class MarketOverviewService {\n #client: Client<typeof Proto.MarketOverviewService>;\n #realtime: PolyesterRealtime;\n #scales: SdkScales;\n #marketOverviewSchema: ReturnType<typeof createMarketOverviewSchema>;\n\n constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales) {\n this.#client = createClient(Proto.MarketOverviewService, transports.publicApi);\n this.#realtime = realtime;\n this.#scales = scales;\n this.#marketOverviewSchema = createMarketOverviewSchema(scales);\n }\n\n /**\n * Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection.\n */\n async list(\n input: ListMarketOverviewInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<{ markets: MarketOverview[]; nextPageToken: string }> {\n const validatedInput = parse(ListMarketOverviewInputSchema, input);\n await this.#scales.ready();\n const res = await this.#client.listMarketOverview(\n validatedInput,\n toConnectCallOptions(options),\n );\n return {\n markets: this.#decodeMarkets(res.markets),\n nextPageToken: res.nextPageToken,\n };\n }\n\n /**\n * Returns 97 aligned trailing-24h USD volume samples at 15-minute intervals.\n * Empty symbolIds selects all pairs. Samples overlap and must not be summed\n * as period volume. Unavailable valuations reject the request.\n */\n async getSpotVolumeHistory(\n input: SpotVolumeHistoryInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<SpotVolumeHistoryResponse> {\n const validated = parse(SpotVolumeHistoryInputSchema, input);\n const response = await this.#client.getSpotVolumeHistory(\n validated,\n toConnectCallOptions(options),\n );\n return parse(SpotVolumeHistoryResponseSchema, response);\n }\n\n /**\n * Decodes market rows, skipping any whose symbolId the catalog cannot resolve\n * (unknown or disabled pairs the backend still reports). Other errors propagate.\n */\n #decodeMarkets(markets: readonly Proto.MarketOverview[]): MarketOverview[] {\n const decoded: MarketOverview[] = [];\n const skipped: number[] = [];\n for (const m of markets) {\n try {\n decoded.push(parse(this.#marketOverviewSchema, m));\n } catch (error) {\n if (\n error instanceof CatalogLookupError &&\n error.domain === \"market\" &&\n error.lookup === \"symbolId\"\n ) {\n skipped.push(m.symbolId);\n continue;\n }\n throw error;\n }\n }\n if (skipped.length > 0 && isDev()) {\n console.warn(\n `[market-overview] skipped ${skipped.length} row(s) with unknown symbolId: ${skipped.join(\", \")}`,\n );\n }\n return decoded;\n }\n\n /**\n * Subscribes to public:spot:market_overview:updates:proto, fetches an initial snapshot, buffers updates until ready, and emits the merged set of latest market rows. On reconnect it refetches the snapshot before resuming updates.\n */\n subscribe(input: SubscribeMarketOverviewInput): () => void {\n const channel = \"public:spot:market_overview:updates:proto\";\n const bySymbolId = new Map<number, MarketOverview>();\n const includeSparklines = input.includeSparklines ?? true;\n const sparklineIntervals = input.sparklineIntervals ?? [\"24h\"];\n const listMarketOverview = this.list.bind(this);\n const parseMarkets = this.#decodeMarkets.bind(this);\n function emit(): void {\n input.onEvent(Array.from(bySymbolId.values()));\n }\n\n function handleMarketUpdate(m: MarketOverview): void {\n bySymbolId.set(m.symbolId, m);\n }\n\n function applyMarkets(markets: readonly MarketOverview[]): void {\n for (const market of markets) {\n handleMarketUpdate(market);\n }\n }\n\n async function fetchSnapshot(): Promise<MarketOverview[]> {\n const result = await listMarketOverview({\n symbolIds: input.symbolIds,\n includeSparklines,\n sparklineIntervals,\n });\n return result.markets;\n }\n\n const stream = snapshotThenStream({\n realtime: this.#realtime,\n channel,\n schema: Proto.MarketOverviewBatchSchema,\n maxBufferedPublications: 2000,\n snapshotErrorLog: \"Failed to fetch market overview\",\n fetchSnapshot,\n readPublication: (batch) => batch.markets ?? [],\n bufferPublicationKey: (market) => market.symbolId,\n applySnapshot: (markets, bufferedMarkets) => {\n bySymbolId.clear();\n applyMarkets(markets);\n applyMarkets(parseMarkets(bufferedMarkets));\n emit();\n },\n applyLivePublications: (markets) => {\n applyMarkets(parseMarkets(markets));\n emit();\n },\n onOpen: input.onOpen,\n onClose: input.onClose,\n onError: input.onError,\n });\n\n function dispose(): void {\n stream.unsubscribe();\n }\n\n return dispose;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAmCA,IAAa,wBAAb,MAAmC;CAC/B;CACA;CACA;CACA;CAEA,YAAY,YAAiC,UAA6B,QAAmB;EACzF,KAAKA,UAAU,aAAaC,yBAA6B,WAAW,SAAS;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,wBAAwB,2BAA2B,MAAM;CAClE;;;;CAKA,MAAM,KACF,QAAiC,CAAC,GAClC,SAC6D;EAC7D,MAAM,iBAAiB,MAAM,+BAA+B,KAAK;EACjE,MAAM,KAAKD,QAAQ,MAAM;EACzB,MAAM,MAAM,MAAM,KAAKH,QAAQ,mBAC3B,gBACA,qBAAqB,OAAO,CAChC;EACA,OAAO;GACH,SAAS,KAAKK,eAAe,IAAI,OAAO;GACxC,eAAe,IAAI;EACvB;CACJ;;;;;;CAOA,MAAM,qBACF,QAAgC,CAAC,GACjC,SACkC;EAClC,MAAM,YAAY,MAAM,8BAA8B,KAAK;EAC3D,MAAM,WAAW,MAAM,KAAKL,QAAQ,qBAChC,WACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,QAAQ;CAC1D;;;;;CAMA,eAAe,SAA4D;EACvE,MAAM,UAA4B,CAAC;EACnC,MAAM,UAAoB,CAAC;EAC3B,KAAK,MAAM,KAAK,SACZ,IAAI;GACA,QAAQ,KAAK,MAAM,KAAKI,uBAAuB,CAAC,CAAC;EACrD,SAAS,OAAO;GACZ,IACI,iBAAiB,sBACjB,MAAM,WAAW,YACjB,MAAM,WAAW,YACnB;IACE,QAAQ,KAAK,EAAE,QAAQ;IACvB;GACJ;GACA,MAAM;EACV;EAEJ,IAAI,QAAQ,SAAS,KAAK,MAAM,GAC5B,QAAQ,KACJ,6BAA6B,QAAQ,OAAO,iCAAiC,QAAQ,KAAK,IAAI,GAClG;EAEJ,OAAO;CACX;;;;CAKA,UAAU,OAAiD;EACvD,MAAM,UAAU;EAChB,MAAM,6BAAa,IAAI,IAA4B;EACnD,MAAM,oBAAoB,MAAM,qBAAqB;EACrD,MAAM,qBAAqB,MAAM,sBAAsB,CAAC,KAAK;EAC7D,MAAM,qBAAqB,KAAK,KAAK,KAAK,IAAI;EAC9C,MAAM,eAAe,KAAKC,eAAe,KAAK,IAAI;EAClD,SAAS,OAAa;GAClB,MAAM,QAAQ,MAAM,KAAK,WAAW,OAAO,CAAC,CAAC;EACjD;EAEA,SAAS,mBAAmB,GAAyB;GACjD,WAAW,IAAI,EAAE,UAAU,CAAC;EAChC;EAEA,SAAS,aAAa,SAA0C;GAC5D,KAAK,MAAM,UAAU,SACjB,mBAAmB,MAAM;EAEjC;EAEA,eAAe,gBAA2C;GAMtD,QAAO,MALc,mBAAmB;IACpC,WAAW,MAAM;IACjB;IACA;GACJ,CAAC,EAAA,CACa;EAClB;EAEA,MAAM,SAAS,mBAAmB;GAC9B,UAAU,KAAKH;GACf;GACA,QAAQI;GACR,yBAAyB;GACzB,kBAAkB;GAClB;GACA,kBAAkB,UAAU,MAAM,WAAW,CAAC;GAC9C,uBAAuB,WAAW,OAAO;GACzC,gBAAgB,SAAS,oBAAoB;IACzC,WAAW,MAAM;IACjB,aAAa,OAAO;IACpB,aAAa,aAAa,eAAe,CAAC;IAC1C,KAAK;GACT;GACA,wBAAwB,YAAY;IAChC,aAAa,aAAa,OAAO,CAAC;IAClC,KAAK;GACT;GACA,QAAQ,MAAM;GACd,SAAS,MAAM;GACf,SAAS,MAAM;EACnB,CAAC;EAED,SAAS,UAAgB;GACrB,OAAO,YAAY;EACvB;EAEA,OAAO;CACX;AACJ"}
1
+ {"version":3,"file":"market-overview.js","names":["#client","Proto.MarketOverviewService","#realtime","#scales","#marketOverviewSchema","#decodeMarkets","Proto.MarketOverviewBatchSchema"],"sources":["../../../src/services/market-overview/market-overview.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketoverview/v1/marketoverview_pb.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport { parse } from \"../../shared/validation.js\";\nimport { CatalogLookupError } from \"../../catalogs/types.js\";\nimport { isDev } from \"../../utils/is-dev.js\";\nimport type { PolyesterRealtime } from \"../../realtime/types.js\";\nimport { snapshotThenStream } from \"../../realtime/snapshot-then-stream.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.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 CurrencyConversionConfigSchema,\n CurrencyConversionRatesSchema,\n type CurrencyConversionConfig,\n type CurrencyConversionRates,\n SpotVolumeHistoryInputSchema,\n SpotVolumeHistoryResponseSchema,\n type SpotVolumeHistoryInput,\n type SpotVolumeHistoryResponse,\n ListMarketOverviewInputSchema,\n createMarketOverviewSchema,\n type SparklineIntervalName,\n type ListMarketOverviewInput,\n type MarketOverview,\n} from \"./market-overview.schemas.js\";\n\ninterface SubscribeMarketOverviewInput extends BaseSubscribeInput<MarketOverview[]> {\n symbolIds?: number[];\n includeSparklines?: boolean;\n sparklineIntervals?: SparklineIntervalName[];\n}\n\n/**\n * Provides ticker-style per-market stats and a live merged overview stream.\n */\nexport class MarketOverviewService {\n #client: Client<typeof Proto.MarketOverviewService>;\n #realtime: PolyesterRealtime;\n #scales: SdkScales;\n #marketOverviewSchema: ReturnType<typeof createMarketOverviewSchema>;\n\n constructor(transports: PublicApiTransports, realtime: PolyesterRealtime, scales: SdkScales) {\n this.#client = createClient(Proto.MarketOverviewService, transports.publicApi);\n this.#realtime = realtime;\n this.#scales = scales;\n this.#marketOverviewSchema = createMarketOverviewSchema(scales);\n }\n\n /**\n * Returns market overview rows with last and index prices, 24h stats, top-of-book values, listing timestamp, and optional sparklines. Supports symbol ID filtering, sorting, pagination, and sparkline interval selection.\n */\n async list(\n input: ListMarketOverviewInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<{ markets: MarketOverview[]; nextPageToken: string }> {\n const validatedInput = parse(ListMarketOverviewInputSchema, input);\n await this.#scales.ready();\n const res = await this.#client.listMarketOverview(\n validatedInput,\n toConnectCallOptions(options),\n );\n return {\n markets: this.#decodeMarkets(res.markets),\n nextPageToken: res.nextPageToken,\n };\n }\n\n /**\n * Returns 97 aligned trailing-24h USD volume samples at 15-minute intervals.\n * Empty symbolIds selects all pairs. Samples overlap and must not be summed\n * as period volume. Unavailable valuations reject the request.\n */\n async getSpotVolumeHistory(\n input: SpotVolumeHistoryInput = {},\n options?: PolyesterRequestOptions,\n ): Promise<SpotVolumeHistoryResponse> {\n const validated = parse(SpotVolumeHistoryInputSchema, input);\n const response = await this.#client.getSpotVolumeHistory(\n validated,\n toConnectCallOptions(options),\n );\n return parse(SpotVolumeHistoryResponseSchema, response);\n }\n\n /** Returns cacheable display metadata, even before rates have been observed. */\n async getCurrencyConversionConfig(\n options?: PolyesterRequestOptions,\n ): Promise<CurrencyConversionConfig> {\n const response = await this.#client.getCurrencyConversionConfig(\n {},\n toConnectCallOptions(options),\n );\n return parse(CurrencyConversionConfigSchema, response);\n }\n\n /**\n * Returns exact decimal rates with observation times and backend staleness flags.\n * Fiat is units per USD; stablecoins are USD per unit. Unobserved rates remain absent.\n * Rejects as unavailable before any observation exists.\n */\n async getCurrencyConversionRates(\n options?: PolyesterRequestOptions,\n ): Promise<CurrencyConversionRates> {\n const response = await this.#client.getCurrencyConversionRates(\n {},\n toConnectCallOptions(options),\n );\n return parse(CurrencyConversionRatesSchema, response);\n }\n\n /**\n * Decodes market rows, skipping any whose symbolId the catalog cannot resolve\n * (unknown or disabled pairs the backend still reports). Other errors propagate.\n */\n #decodeMarkets(markets: readonly Proto.MarketOverview[]): MarketOverview[] {\n const decoded: MarketOverview[] = [];\n const skipped: number[] = [];\n for (const m of markets) {\n try {\n decoded.push(parse(this.#marketOverviewSchema, m));\n } catch (error) {\n if (\n error instanceof CatalogLookupError &&\n error.domain === \"market\" &&\n error.lookup === \"symbolId\"\n ) {\n skipped.push(m.symbolId);\n continue;\n }\n throw error;\n }\n }\n if (skipped.length > 0 && isDev()) {\n console.warn(\n `[market-overview] skipped ${skipped.length} row(s) with unknown symbolId: ${skipped.join(\", \")}`,\n );\n }\n return decoded;\n }\n\n /**\n * Subscribes to public:spot:market_overview:updates:proto, fetches an initial snapshot, buffers updates until ready, and emits the merged set of latest market rows. On reconnect it refetches the snapshot before resuming updates.\n */\n subscribe(input: SubscribeMarketOverviewInput): () => void {\n const channel = \"public:spot:market_overview:updates:proto\";\n const bySymbolId = new Map<number, MarketOverview>();\n const includeSparklines = input.includeSparklines ?? true;\n const sparklineIntervals = input.sparklineIntervals ?? [\"24h\"];\n const listMarketOverview = this.list.bind(this);\n const parseMarkets = this.#decodeMarkets.bind(this);\n function emit(): void {\n input.onEvent(Array.from(bySymbolId.values()));\n }\n\n function handleMarketUpdate(m: MarketOverview): void {\n bySymbolId.set(m.symbolId, m);\n }\n\n function applyMarkets(markets: readonly MarketOverview[]): void {\n for (const market of markets) {\n handleMarketUpdate(market);\n }\n }\n\n async function fetchSnapshot(): Promise<MarketOverview[]> {\n const result = await listMarketOverview({\n symbolIds: input.symbolIds,\n includeSparklines,\n sparklineIntervals,\n });\n return result.markets;\n }\n\n const stream = snapshotThenStream({\n realtime: this.#realtime,\n channel,\n schema: Proto.MarketOverviewBatchSchema,\n maxBufferedPublications: 2000,\n snapshotErrorLog: \"Failed to fetch market overview\",\n fetchSnapshot,\n readPublication: (batch) => batch.markets ?? [],\n bufferPublicationKey: (market) => market.symbolId,\n applySnapshot: (markets, bufferedMarkets) => {\n bySymbolId.clear();\n applyMarkets(markets);\n applyMarkets(parseMarkets(bufferedMarkets));\n emit();\n },\n applyLivePublications: (markets) => {\n applyMarkets(parseMarkets(markets));\n emit();\n },\n onOpen: input.onOpen,\n onClose: input.onClose,\n onError: input.onError,\n });\n\n function dispose(): void {\n stream.unsubscribe();\n }\n\n return dispose;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAuCA,IAAa,wBAAb,MAAmC;CAC/B;CACA;CACA;CACA;CAEA,YAAY,YAAiC,UAA6B,QAAmB;EACzF,KAAKA,UAAU,aAAaC,yBAA6B,WAAW,SAAS;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,wBAAwB,2BAA2B,MAAM;CAClE;;;;CAKA,MAAM,KACF,QAAiC,CAAC,GAClC,SAC6D;EAC7D,MAAM,iBAAiB,MAAM,+BAA+B,KAAK;EACjE,MAAM,KAAKD,QAAQ,MAAM;EACzB,MAAM,MAAM,MAAM,KAAKH,QAAQ,mBAC3B,gBACA,qBAAqB,OAAO,CAChC;EACA,OAAO;GACH,SAAS,KAAKK,eAAe,IAAI,OAAO;GACxC,eAAe,IAAI;EACvB;CACJ;;;;;;CAOA,MAAM,qBACF,QAAgC,CAAC,GACjC,SACkC;EAClC,MAAM,YAAY,MAAM,8BAA8B,KAAK;EAC3D,MAAM,WAAW,MAAM,KAAKL,QAAQ,qBAChC,WACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,QAAQ;CAC1D;;CAGA,MAAM,4BACF,SACiC;EACjC,MAAM,WAAW,MAAM,KAAKA,QAAQ,4BAChC,CAAC,GACD,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,gCAAgC,QAAQ;CACzD;;;;;;CAOA,MAAM,2BACF,SACgC;EAChC,MAAM,WAAW,MAAM,KAAKA,QAAQ,2BAChC,CAAC,GACD,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,+BAA+B,QAAQ;CACxD;;;;;CAMA,eAAe,SAA4D;EACvE,MAAM,UAA4B,CAAC;EACnC,MAAM,UAAoB,CAAC;EAC3B,KAAK,MAAM,KAAK,SACZ,IAAI;GACA,QAAQ,KAAK,MAAM,KAAKI,uBAAuB,CAAC,CAAC;EACrD,SAAS,OAAO;GACZ,IACI,iBAAiB,sBACjB,MAAM,WAAW,YACjB,MAAM,WAAW,YACnB;IACE,QAAQ,KAAK,EAAE,QAAQ;IACvB;GACJ;GACA,MAAM;EACV;EAEJ,IAAI,QAAQ,SAAS,KAAK,MAAM,GAC5B,QAAQ,KACJ,6BAA6B,QAAQ,OAAO,iCAAiC,QAAQ,KAAK,IAAI,GAClG;EAEJ,OAAO;CACX;;;;CAKA,UAAU,OAAiD;EACvD,MAAM,UAAU;EAChB,MAAM,6BAAa,IAAI,IAA4B;EACnD,MAAM,oBAAoB,MAAM,qBAAqB;EACrD,MAAM,qBAAqB,MAAM,sBAAsB,CAAC,KAAK;EAC7D,MAAM,qBAAqB,KAAK,KAAK,KAAK,IAAI;EAC9C,MAAM,eAAe,KAAKC,eAAe,KAAK,IAAI;EAClD,SAAS,OAAa;GAClB,MAAM,QAAQ,MAAM,KAAK,WAAW,OAAO,CAAC,CAAC;EACjD;EAEA,SAAS,mBAAmB,GAAyB;GACjD,WAAW,IAAI,EAAE,UAAU,CAAC;EAChC;EAEA,SAAS,aAAa,SAA0C;GAC5D,KAAK,MAAM,UAAU,SACjB,mBAAmB,MAAM;EAEjC;EAEA,eAAe,gBAA2C;GAMtD,QAAO,MALc,mBAAmB;IACpC,WAAW,MAAM;IACjB;IACA;GACJ,CAAC,EAAA,CACa;EAClB;EAEA,MAAM,SAAS,mBAAmB;GAC9B,UAAU,KAAKH;GACf;GACA,QAAQI;GACR,yBAAyB;GACzB,kBAAkB;GAClB;GACA,kBAAkB,UAAU,MAAM,WAAW,CAAC;GAC9C,uBAAuB,WAAW,OAAO;GACzC,gBAAgB,SAAS,oBAAoB;IACzC,WAAW,MAAM;IACjB,aAAa,OAAO;IACpB,aAAa,aAAa,eAAe,CAAC;IAC1C,KAAK;GACT;GACA,wBAAwB,YAAY;IAChC,aAAa,aAAa,OAAO,CAAC;IAClC,KAAK;GACT;GACA,QAAQ,MAAM;GACd,SAAS,MAAM;GACf,SAAS,MAAM;EACnB,CAAC;EAED,SAAS,UAAgB;GACrB,OAAO,YAAY;EACvB;EAEA,OAAO;CACX;AACJ"}