@polyester/sdk 0.36.0-devnet-20261119050221 → 0.36.0-devnet-20261119181946
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/dist/gen/ai/v1/assistant_pb.d.ts +1 -1
- package/dist/gen/ai/v1/assistant_pb.js +1 -1
- package/dist/gen/alerts/v1/price_alerts_pb.d.ts +1 -1
- package/dist/gen/auth/v1/activity_pb.d.ts +1 -1
- package/dist/gen/auth/v1/address_book_pb.d.ts +1 -1
- package/dist/gen/auth/v1/api_keys_pb.d.ts +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +1 -1
- package/dist/gen/auth/v1/connected_apps_pb.d.ts +1 -1
- package/dist/gen/auth/v1/mfa_pb.d.ts +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +1 -1
- package/dist/gen/auth/v1/profile_pb.d.ts +1 -1
- package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
- package/dist/gen/auth/v1/social_verification_pb.d.ts +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.js +1 -1
- package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
- package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +1 -1
- package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +1 -1
- package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
- package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +1 -1
- package/dist/gen/changelog/v1/changelog_pb.d.ts +1 -1
- package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1 -1
- package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
- package/dist/gen/fees/v1/fees_pb.d.ts +1 -1
- package/dist/gen/index.js +24 -24
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +1 -1
- package/dist/gen/ledger/read/v1/statement_export_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/asset_info_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/heatmap_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
- package/dist/gen/notifications/v1/notifications_pb.d.ts +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +1 -1
- package/dist/gen/polyester/api/v1/request_error_pb.d.ts +1 -1
- package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +1 -1
- package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
- package/dist/gen/privatews/v1/private_ws_pb.d.ts +1 -1
- package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +1 -1
- package/dist/gen/rewards/v1/rewards_pb.d.ts +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +1 -1
- package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +1 -1
- package/dist/gen/swap/v1/swap_pb.d.ts +1 -1
- package/dist/gen/system/v1/system_pb.d.ts +1 -1
- package/dist/gen/tradews/v1/trade_ws_pb.d.ts +1 -1
- package/dist/gen/transfer/v1/dust_conversion_pb.d.ts +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +1 -1
- package/dist/gen/vip/v1/vip_pb.d.ts +1 -1
- package/dist/services/account-activity/account-activity.js +1 -1
- package/dist/services/account-activity/account-activity.schemas.d.ts +4 -4
- package/dist/services/accounts/accounts.js +1 -1
- package/dist/services/accounts/accounts.schemas.js +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +2 -2
- package/dist/services/api-keys/api-keys.schemas.d.ts +6 -6
- package/dist/services/assistant/assistant-events.schemas.d.ts +26 -55
- package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
- package/dist/services/assistant/assistant.js +1 -1
- package/dist/services/assistant/assistant.schemas.d.ts +1 -1
- package/dist/services/auth/account-signer-auth.d.ts.map +1 -1
- package/dist/services/auth/account-signer-auth.js +10 -2
- package/dist/services/auth/account-signer-auth.js.map +1 -1
- package/dist/services/auth/profile/profile.js +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.js +1 -1
- package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +22 -22
- package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -1
- package/dist/services/candles/candles.js +1 -1
- package/dist/services/chain-analytics/chain-analytics.js +1 -1
- package/dist/services/changelog/changelog.js +1 -1
- package/dist/services/changelog/changelog.schemas.d.ts +22 -22
- package/dist/services/checkpoints/checkpoints.js +1 -1
- package/dist/services/claims/claims.js +1 -1
- package/dist/services/claims/claims.schemas.js +1 -1
- package/dist/services/connected-apps/connected-apps.js +1 -1
- package/dist/services/deposit/deposit.js +1 -1
- package/dist/services/dust-conversion/dust-conversion.js +1 -1
- package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +6 -6
- package/dist/services/dust-conversion/dust-conversion.schemas.js +1 -1
- package/dist/services/fees/fees.js +1 -1
- package/dist/services/guard-signer/guard-signer.js +1 -1
- package/dist/services/heatmap/heatmap.js +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.js +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +1 -1
- package/dist/services/lifecycle/lifecycle.js +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +53 -53
- package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
- package/dist/services/market-data/market-data.js +1 -1
- package/dist/services/market-overview/market-overview.js +9 -2
- package/dist/services/market-overview/market-overview.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.js +1 -1
- package/dist/services/notifications/notifications.js +1 -1
- package/dist/services/orderbook/orderbook.d.ts +1 -1
- package/dist/services/orderbook/orderbook.js +9 -3
- package/dist/services/orderbook/orderbook.js.map +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +3 -3
- package/dist/services/orders/order-errors.schemas.js +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +52 -52
- package/dist/services/orders/orders-batch.schemas.js +1 -1
- package/dist/services/orders/orders-identifiers.schemas.js +2 -2
- package/dist/services/orders/orders-identifiers.schemas.js.map +1 -1
- package/dist/services/orders/orders-input.schemas.d.ts +14 -14
- package/dist/services/orders/orders-input.schemas.js +1 -1
- package/dist/services/orders/orders-modify.schemas.d.ts +3 -3
- package/dist/services/orders/orders-modify.schemas.js +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +12 -12
- package/dist/services/orders/orders-risk.schemas.js +2 -2
- package/dist/services/orders/orders.js +2 -2
- package/dist/services/price-alerts/price-alerts.js +1 -1
- package/dist/services/price-alerts/price-alerts.schemas.d.ts +21 -21
- package/dist/services/rate-limits/rate-limits.js +1 -1
- package/dist/services/rewards/rewards.js +1 -1
- package/dist/services/rewards/rewards.schemas.d.ts +4 -4
- package/dist/services/social-verification/social-verification.js +1 -1
- package/dist/services/social-verification/social-verification.schemas.d.ts +2 -2
- package/dist/services/social-verification/social-verification.schemas.js +1 -1
- package/dist/services/statement-exports/statement-exports.js +1 -1
- package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +17 -17
- package/dist/services/system/system.js +1 -1
- package/dist/services/system/system.schemas.d.ts +13 -13
- package/dist/services/trades/trades.js +1 -1
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -1
- package/dist/services/trading-withdraws/wallet-message.js +1 -1
- package/dist/services/triggers/trigger-child-order.schemas.js +2 -2
- package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
- package/dist/services/triggers/trigger-input.schemas.js +2 -2
- package/dist/services/triggers/triggers-output.schemas.d.ts +27 -27
- package/dist/services/triggers/triggers.js +1 -1
- package/dist/services/vip/vip.js +1 -1
- package/dist/services/vip/vip.schemas.d.ts +3 -3
- package/dist/services/vip/vip.schemas.js +1 -1
- package/dist/services/zipper/zipper.js +1 -1
- package/dist/services/zipper/zipper.schemas.js +1 -1
- package/dist/shared/connect-error-mapping.js +17 -1
- package/dist/shared/connect-error-mapping.js.map +1 -1
- package/dist/shared/error-details/alerts.js +1 -1
- package/dist/shared/error-details/assistant.js +1 -1
- package/dist/shared/error-details/auth.js +1 -1
- package/dist/shared/error-details/claims.js +1 -1
- package/dist/shared/error-details/internal-transfer.js +1 -1
- package/dist/shared/error-details/ledger.js +1 -1
- package/dist/shared/error-details/market-overview.js +1 -1
- package/dist/shared/error-details/notifications.js +1 -1
- package/dist/shared/error-details/orders.js +1 -1
- package/dist/shared/error-details/profile.js +1 -1
- package/dist/shared/error-details/rate-limit.js +1 -1
- package/dist/shared/error-details/withdraw.js +1 -1
- package/dist/shared/rate-limit.schemas.d.ts +1 -1
- package/dist/shared/rate-limit.schemas.js +1 -1
- package/dist/wired-services.js +19 -19
- package/package.json +1 -1
|
@@ -277,7 +277,7 @@ declare const LifecycleFlowStepActivitySchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
277
277
|
}>]>;
|
|
278
278
|
declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
279
279
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
280
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
280
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
281
281
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
282
282
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
283
283
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -426,7 +426,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
|
|
|
426
426
|
readonly refundAddress: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
427
427
|
}, undefined>, v.TransformAction<{
|
|
428
428
|
sequence: number;
|
|
429
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
429
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
430
430
|
assetIds?: {
|
|
431
431
|
zippedAssetId: number;
|
|
432
432
|
unifiedAssetId: number;
|
|
@@ -490,7 +490,7 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
|
|
|
490
490
|
refundAddress: string;
|
|
491
491
|
}, Omit<{
|
|
492
492
|
sequence: number;
|
|
493
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
493
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
494
494
|
assetIds?: {
|
|
495
495
|
zippedAssetId: number;
|
|
496
496
|
unifiedAssetId: number;
|
|
@@ -557,8 +557,8 @@ declare const LifecycleFlowStepSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
|
|
|
557
557
|
}>]>;
|
|
558
558
|
declare const LifecycleFlowTimelineItemSchema: v.ObjectSchema<{
|
|
559
559
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
560
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
561
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
560
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
561
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
|
|
562
562
|
readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
563
563
|
}, undefined>;
|
|
564
564
|
declare const LifecycleFlowSummaryProgressSchema: v.ObjectSchema<{
|
|
@@ -576,7 +576,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
576
576
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
577
577
|
readonly flowId: v.StringSchema<undefined>;
|
|
578
578
|
readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
|
|
579
|
-
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
579
|
+
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
580
580
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
581
581
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
582
582
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -656,8 +656,8 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
656
656
|
}, undefined>, undefined>;
|
|
657
657
|
readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
658
658
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
659
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
660
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
659
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
660
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
|
|
661
661
|
readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
662
662
|
}, undefined>, undefined>, readonly []>;
|
|
663
663
|
readonly estimatedCompletionUnixMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -674,7 +674,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
674
674
|
smartAccountAddress: string;
|
|
675
675
|
flowId: string;
|
|
676
676
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
677
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
677
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
678
678
|
assetIds?: {
|
|
679
679
|
zippedAssetId: number;
|
|
680
680
|
unifiedAssetId: number;
|
|
@@ -726,8 +726,8 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
726
726
|
} | undefined;
|
|
727
727
|
progressTimeline: {
|
|
728
728
|
sequence: number;
|
|
729
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
730
|
-
status: "unspecified" | "
|
|
729
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
730
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
731
731
|
expectedDurationMs: number;
|
|
732
732
|
}[];
|
|
733
733
|
estimatedCompletionUnixMs: number;
|
|
@@ -737,7 +737,7 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
737
737
|
smartAccountAddress: string;
|
|
738
738
|
flowId: string;
|
|
739
739
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
740
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
740
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
741
741
|
assetIds?: {
|
|
742
742
|
zippedAssetId: number;
|
|
743
743
|
unifiedAssetId: number;
|
|
@@ -789,8 +789,8 @@ declare const LifecycleFlowSummarySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
789
789
|
} | undefined;
|
|
790
790
|
progressTimeline: {
|
|
791
791
|
sequence: number;
|
|
792
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
793
|
-
status: "unspecified" | "
|
|
792
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
793
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
794
794
|
expectedDurationMs: number;
|
|
795
795
|
}[];
|
|
796
796
|
estimatedCompletionUnixMs: number;
|
|
@@ -804,7 +804,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
804
804
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
805
805
|
readonly flowId: v.StringSchema<undefined>;
|
|
806
806
|
readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
|
|
807
|
-
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
807
|
+
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
808
808
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
809
809
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
810
810
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -884,8 +884,8 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
884
884
|
}, undefined>, undefined>;
|
|
885
885
|
readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
886
886
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
887
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
888
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
887
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
888
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
|
|
889
889
|
readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
890
890
|
}, undefined>, undefined>, readonly []>;
|
|
891
891
|
readonly estimatedCompletionUnixMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -902,7 +902,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
902
902
|
smartAccountAddress: string;
|
|
903
903
|
flowId: string;
|
|
904
904
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
905
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
905
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
906
906
|
assetIds?: {
|
|
907
907
|
zippedAssetId: number;
|
|
908
908
|
unifiedAssetId: number;
|
|
@@ -954,8 +954,8 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
954
954
|
} | undefined;
|
|
955
955
|
progressTimeline: {
|
|
956
956
|
sequence: number;
|
|
957
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
958
|
-
status: "unspecified" | "
|
|
957
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
958
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
959
959
|
expectedDurationMs: number;
|
|
960
960
|
}[];
|
|
961
961
|
estimatedCompletionUnixMs: number;
|
|
@@ -965,7 +965,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
965
965
|
smartAccountAddress: string;
|
|
966
966
|
flowId: string;
|
|
967
967
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
968
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
968
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
969
969
|
assetIds?: {
|
|
970
970
|
zippedAssetId: number;
|
|
971
971
|
unifiedAssetId: number;
|
|
@@ -1017,8 +1017,8 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
1017
1017
|
} | undefined;
|
|
1018
1018
|
progressTimeline: {
|
|
1019
1019
|
sequence: number;
|
|
1020
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1021
|
-
status: "unspecified" | "
|
|
1020
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1021
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
1022
1022
|
expectedDurationMs: number;
|
|
1023
1023
|
}[];
|
|
1024
1024
|
estimatedCompletionUnixMs: number;
|
|
@@ -1029,7 +1029,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
1029
1029
|
}>]>, undefined>;
|
|
1030
1030
|
readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1031
1031
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1032
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
1032
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
1033
1033
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
1034
1034
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1035
1035
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -1178,7 +1178,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
1178
1178
|
readonly refundAddress: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
1179
1179
|
}, undefined>, v.TransformAction<{
|
|
1180
1180
|
sequence: number;
|
|
1181
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1181
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1182
1182
|
assetIds?: {
|
|
1183
1183
|
zippedAssetId: number;
|
|
1184
1184
|
unifiedAssetId: number;
|
|
@@ -1242,7 +1242,7 @@ declare const LifecycleFlowDetailSchema: v.ObjectSchema<{
|
|
|
1242
1242
|
refundAddress: string;
|
|
1243
1243
|
}, Omit<{
|
|
1244
1244
|
sequence: number;
|
|
1245
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1245
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1246
1246
|
assetIds?: {
|
|
1247
1247
|
zippedAssetId: number;
|
|
1248
1248
|
unifiedAssetId: number;
|
|
@@ -1314,7 +1314,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
|
|
|
1314
1314
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
1315
1315
|
readonly flowId: v.StringSchema<undefined>;
|
|
1316
1316
|
readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
|
|
1317
|
-
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
1317
|
+
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
1318
1318
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
1319
1319
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1320
1320
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -1394,8 +1394,8 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
|
|
|
1394
1394
|
}, undefined>, undefined>;
|
|
1395
1395
|
readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1396
1396
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1397
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
1398
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
1397
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
1398
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
|
|
1399
1399
|
readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
1400
1400
|
}, undefined>, undefined>, readonly []>;
|
|
1401
1401
|
readonly estimatedCompletionUnixMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -1412,7 +1412,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
|
|
|
1412
1412
|
smartAccountAddress: string;
|
|
1413
1413
|
flowId: string;
|
|
1414
1414
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
1415
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
1415
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1416
1416
|
assetIds?: {
|
|
1417
1417
|
zippedAssetId: number;
|
|
1418
1418
|
unifiedAssetId: number;
|
|
@@ -1464,8 +1464,8 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
|
|
|
1464
1464
|
} | undefined;
|
|
1465
1465
|
progressTimeline: {
|
|
1466
1466
|
sequence: number;
|
|
1467
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1468
|
-
status: "unspecified" | "
|
|
1467
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1468
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
1469
1469
|
expectedDurationMs: number;
|
|
1470
1470
|
}[];
|
|
1471
1471
|
estimatedCompletionUnixMs: number;
|
|
@@ -1475,7 +1475,7 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
|
|
|
1475
1475
|
smartAccountAddress: string;
|
|
1476
1476
|
flowId: string;
|
|
1477
1477
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
1478
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
1478
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1479
1479
|
assetIds?: {
|
|
1480
1480
|
zippedAssetId: number;
|
|
1481
1481
|
unifiedAssetId: number;
|
|
@@ -1527,8 +1527,8 @@ declare const ListLifecycleFlowsOutputSchema: v.ObjectSchema<{
|
|
|
1527
1527
|
} | undefined;
|
|
1528
1528
|
progressTimeline: {
|
|
1529
1529
|
sequence: number;
|
|
1530
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1531
|
-
status: "unspecified" | "
|
|
1530
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1531
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
1532
1532
|
expectedDurationMs: number;
|
|
1533
1533
|
}[];
|
|
1534
1534
|
estimatedCompletionUnixMs: number;
|
|
@@ -1545,7 +1545,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1545
1545
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
1546
1546
|
readonly flowId: v.StringSchema<undefined>;
|
|
1547
1547
|
readonly flowKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "deposit" | "withdraw" | "transfer">]>;
|
|
1548
|
-
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
1548
|
+
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
1549
1549
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
1550
1550
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1551
1551
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -1625,8 +1625,8 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1625
1625
|
}, undefined>, undefined>;
|
|
1626
1626
|
readonly progressTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1627
1627
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1628
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
1629
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
1628
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
1629
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "planned" | "completed" | "current">]>;
|
|
1630
1630
|
readonly expectedDurationMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
1631
1631
|
}, undefined>, undefined>, readonly []>;
|
|
1632
1632
|
readonly estimatedCompletionUnixMs: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -1643,7 +1643,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1643
1643
|
smartAccountAddress: string;
|
|
1644
1644
|
flowId: string;
|
|
1645
1645
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
1646
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
1646
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1647
1647
|
assetIds?: {
|
|
1648
1648
|
zippedAssetId: number;
|
|
1649
1649
|
unifiedAssetId: number;
|
|
@@ -1695,8 +1695,8 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1695
1695
|
} | undefined;
|
|
1696
1696
|
progressTimeline: {
|
|
1697
1697
|
sequence: number;
|
|
1698
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1699
|
-
status: "unspecified" | "
|
|
1698
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1699
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
1700
1700
|
expectedDurationMs: number;
|
|
1701
1701
|
}[];
|
|
1702
1702
|
estimatedCompletionUnixMs: number;
|
|
@@ -1706,7 +1706,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1706
1706
|
smartAccountAddress: string;
|
|
1707
1707
|
flowId: string;
|
|
1708
1708
|
flowKind: "unspecified" | "deposit" | "withdraw" | "transfer";
|
|
1709
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
1709
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1710
1710
|
assetIds?: {
|
|
1711
1711
|
zippedAssetId: number;
|
|
1712
1712
|
unifiedAssetId: number;
|
|
@@ -1758,8 +1758,8 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1758
1758
|
} | undefined;
|
|
1759
1759
|
progressTimeline: {
|
|
1760
1760
|
sequence: number;
|
|
1761
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1762
|
-
status: "unspecified" | "
|
|
1761
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1762
|
+
status: "unspecified" | "planned" | "completed" | "current";
|
|
1763
1763
|
expectedDurationMs: number;
|
|
1764
1764
|
}[];
|
|
1765
1765
|
estimatedCompletionUnixMs: number;
|
|
@@ -1770,7 +1770,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1770
1770
|
}>]>, undefined>;
|
|
1771
1771
|
readonly observedSteps: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1772
1772
|
readonly sequence: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1773
|
-
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
1773
|
+
readonly step: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
1774
1774
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
1775
1775
|
readonly zippedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1776
1776
|
readonly unifiedAssetId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -1919,7 +1919,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1919
1919
|
readonly refundAddress: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
1920
1920
|
}, undefined>, v.TransformAction<{
|
|
1921
1921
|
sequence: number;
|
|
1922
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1922
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1923
1923
|
assetIds?: {
|
|
1924
1924
|
zippedAssetId: number;
|
|
1925
1925
|
unifiedAssetId: number;
|
|
@@ -1983,7 +1983,7 @@ declare const GetLifecycleFlowOutputSchema: v.ObjectSchema<{
|
|
|
1983
1983
|
refundAddress: string;
|
|
1984
1984
|
}, Omit<{
|
|
1985
1985
|
sequence: number;
|
|
1986
|
-
step: "validation" | "unspecified" | "failed" | "source" | "
|
|
1986
|
+
step: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
1987
1987
|
assetIds?: {
|
|
1988
1988
|
zippedAssetId: number;
|
|
1989
1989
|
unifiedAssetId: number;
|
|
@@ -2060,7 +2060,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
2060
2060
|
readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
|
|
2061
2061
|
readonly sourceDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
|
|
2062
2062
|
readonly destinationDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
|
|
2063
|
-
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
2063
|
+
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
2064
2064
|
readonly isOpen: v.BooleanSchema<undefined>;
|
|
2065
2065
|
readonly isTerminal: v.BooleanSchema<undefined>;
|
|
2066
2066
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -2093,7 +2093,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
2093
2093
|
txOccurrenceIndex?: number | undefined;
|
|
2094
2094
|
sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2095
2095
|
destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2096
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
2096
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
2097
2097
|
isOpen: boolean;
|
|
2098
2098
|
isTerminal: boolean;
|
|
2099
2099
|
assetIds?: {
|
|
@@ -2120,7 +2120,7 @@ declare const LifecycleFlowTxMatchSchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
2120
2120
|
txOccurrenceIndex?: number | undefined;
|
|
2121
2121
|
sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2122
2122
|
destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2123
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
2123
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
2124
2124
|
isOpen: boolean;
|
|
2125
2125
|
isTerminal: boolean;
|
|
2126
2126
|
assetIds?: {
|
|
@@ -2152,7 +2152,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
|
|
|
2152
2152
|
readonly txOccurrenceIndex: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, number>]>;
|
|
2153
2153
|
readonly sourceDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
|
|
2154
2154
|
readonly destinationDomain: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending">]>;
|
|
2155
|
-
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "
|
|
2155
|
+
readonly currentStep: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement">]>;
|
|
2156
2156
|
readonly isOpen: v.BooleanSchema<undefined>;
|
|
2157
2157
|
readonly isTerminal: v.BooleanSchema<undefined>;
|
|
2158
2158
|
readonly assetIds: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -2185,7 +2185,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
|
|
|
2185
2185
|
txOccurrenceIndex?: number | undefined;
|
|
2186
2186
|
sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2187
2187
|
destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2188
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
2188
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
2189
2189
|
isOpen: boolean;
|
|
2190
2190
|
isTerminal: boolean;
|
|
2191
2191
|
assetIds?: {
|
|
@@ -2212,7 +2212,7 @@ declare const ListLifecycleFlowsByTxOutputSchema: v.ObjectSchema<{
|
|
|
2212
2212
|
txOccurrenceIndex?: number | undefined;
|
|
2213
2213
|
sourceDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2214
2214
|
destinationDomain: "unspecified" | "trading" | "funding" | "external_chain" | "zipper" | "lending";
|
|
2215
|
-
currentStep: "validation" | "unspecified" | "failed" | "source" | "
|
|
2215
|
+
currentStep: "validation" | "unspecified" | "failed" | "source" | "transfer" | "dropped" | "refunded" | "request" | "execution" | "bridge_fulfillment" | "fulfilling" | "settlement";
|
|
2216
2216
|
isOpen: boolean;
|
|
2217
2217
|
isTerminal: boolean;
|
|
2218
2218
|
assetIds?: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../../gen/chain/lifecycle/v1/types_pb.js";
|
|
2
|
-
import "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
3
1
|
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
4
2
|
import { fromU128 } from "../../utils/u128.js";
|
|
5
3
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
6
4
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
5
|
+
import "../../gen/chain/lifecycle/v1/types_pb.js";
|
|
6
|
+
import "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
7
7
|
import { LIFECYCLE_FLOW_KIND_VALUES, LIFECYCLE_FLOW_PARTICIPATION_VALUES, LIFECYCLE_FLOW_STATE_VALUES, LIFECYCLE_LIST_ORDER_BY_VALUES, LIFECYCLE_LIST_SCOPE_VALUES, LIFECYCLE_SORT_VALUES, LIFECYCLE_TX_LOOKUP_KIND_VALUES, LifecycleFlowDomainCodec, LifecycleFlowKindCodec, LifecycleFlowParticipationCodec, LifecycleFlowStateCodec, LifecycleFlowStepActivityKindCodec, LifecycleFlowStepCodec, LifecycleFlowTimelineStatusCodec, LifecycleListOrderByCodec, LifecycleListScopeCodec, LifecycleRequestFeeStatusCodec, LifecycleSortCodec, LifecycleSourceCodec, LifecycleTxLookupKindCodec, lifecycleReasonFromCode, zipperReasonFromCode } from "./lifecycle.codecs.js";
|
|
8
8
|
import * as v from "valibot";
|
|
9
9
|
//#region src/services/lifecycle/lifecycle.schemas.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MarketDataService as MarketDataService$1, MarketTradeBatchSchema } from "../../gen/marketdata/v1/marketdata_pb.js";
|
|
2
1
|
import { parse } from "../../shared/validation.js";
|
|
3
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
3
|
import { deliverBatch } from "../../shared/subscription-errors.js";
|
|
5
4
|
import { SymbolIdInputSchema } from "../shared.js";
|
|
5
|
+
import { MarketDataService as MarketDataService$1, MarketTradeBatchSchema } from "../../gen/marketdata/v1/marketdata_pb.js";
|
|
6
6
|
import { connectReadyGatedProtoChannel } from "../../realtime/ready-gated-subscription.js";
|
|
7
7
|
import { isDev } from "../../utils/is-dev.js";
|
|
8
8
|
import { AssetInfoSchema, GetMarketTradesInputSchema, ListAssetInfoInputSchema, SpotConfigSchema, TradeBackfillSchema, formatMarketTrade } from "./market-data.schemas.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MarketOverviewBatchSchema, MarketOverviewService as MarketOverviewService$1 } from "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
2
1
|
import { parse } from "../../shared/validation.js";
|
|
3
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
3
|
import { CatalogLookupError } from "../../catalogs/types.js";
|
|
5
4
|
import { isDev } from "../../utils/is-dev.js";
|
|
5
|
+
import { MarketOverviewBatchSchema, MarketOverviewService as MarketOverviewService$1 } from "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
6
6
|
import { snapshotThenStream } from "../../realtime/snapshot-then-stream.js";
|
|
7
7
|
import { CurrencyConversionConfigSchema, CurrencyConversionRatesSchema, ListMarketOverviewInputSchema, SpotVolumeHistoryInputSchema, SpotVolumeHistoryResponseSchema, createMarketOverviewSchema } from "./market-overview.schemas.js";
|
|
8
8
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -94,7 +94,14 @@ var MarketOverviewService = class {
|
|
|
94
94
|
return symbolIds.size === 0 || symbolIds.has(market.symbolId);
|
|
95
95
|
}
|
|
96
96
|
function applyMarkets(markets) {
|
|
97
|
-
for (const market of markets)
|
|
97
|
+
for (const market of markets) {
|
|
98
|
+
if (!matchesSymbol(market)) continue;
|
|
99
|
+
const sparklines = bySymbolId.get(market.symbolId)?.sparklines;
|
|
100
|
+
bySymbolId.set(market.symbolId, market.sparklines.length === 0 && sparklines ? {
|
|
101
|
+
...market,
|
|
102
|
+
sparklines
|
|
103
|
+
} : market);
|
|
104
|
+
}
|
|
98
105
|
}
|
|
99
106
|
async function fetchSnapshot() {
|
|
100
107
|
return (await listMarketOverview({
|
|
@@ -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 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. A symbol ID that names no configured market is rejected as an invalid argument instead of returning an empty page.\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 symbolIds = new Set(input.symbolIds);\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 matchesSymbol(market: { symbolId: number }): boolean {\n return symbolIds.size === 0 || symbolIds.has(market.symbolId);\n }\n\n function applyMarkets(markets: readonly MarketOverview[]): void {\n for (const market of markets) {\n if (matchesSymbol(market)) bySymbolId.set(market.symbolId, 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.filter(matchesSymbol),\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":"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"}
|
|
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. A symbol ID that names no configured market is rejected as an invalid argument instead of returning an empty page.\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 symbolIds = new Set(input.symbolIds);\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 matchesSymbol(market: { symbolId: number }): boolean {\n return symbolIds.size === 0 || symbolIds.has(market.symbolId);\n }\n\n function applyMarkets(markets: readonly MarketOverview[]): void {\n for (const market of markets) {\n if (!matchesSymbol(market)) continue;\n // The live channel carries no sparklines; keep the snapshot's.\n const sparklines = bySymbolId.get(market.symbolId)?.sparklines;\n bySymbolId.set(\n market.symbolId,\n market.sparklines.length === 0 && sparklines\n ? { ...market, sparklines }\n : market,\n );\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.filter(matchesSymbol),\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":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
2
1
|
import { tsNsToMs } from "../../utils/time.js";
|
|
3
2
|
import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
|
|
4
3
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
5
4
|
import { PositiveUint32InputSchema, SymbolIdInputSchema } from "../shared.js";
|
|
5
|
+
import "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
6
6
|
import { MARKET_OVERVIEW_ORDER_BY_VALUES, MARKET_OVERVIEW_SORT_VALUES, MarketOverviewOrderByCodec, MarketOverviewSortCodec, SPARKLINE_INTERVAL_VALUES, SparklineIntervalCodec } from "./market-overview.codecs.js";
|
|
7
7
|
import * as v from "valibot";
|
|
8
8
|
//#region src/services/market-overview/market-overview.schemas.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NotificationService } from "../../gen/notifications/v1/notifications_pb.js";
|
|
2
1
|
import { InternalServerError } from "../../shared/errors.js";
|
|
3
2
|
import { parse } from "../../shared/validation.js";
|
|
4
3
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
5
4
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
5
|
+
import { NotificationService } from "../../gen/notifications/v1/notifications_pb.js";
|
|
6
6
|
import { GetNotificationInputSchema, ListNotificationsInputSchema, MarkAllNotificationsReadInputSchema, MarkNotificationsInputSchema, formatNotification, formatNotificationCounts } from "./notifications.schemas.js";
|
|
7
7
|
import { createClient } from "@connectrpc/connect";
|
|
8
8
|
//#region src/services/notifications/notifications.ts
|
|
@@ -33,7 +33,7 @@ declare class OrderbookService {
|
|
|
33
33
|
*/
|
|
34
34
|
subscribe(input: SubscribeOrderbookInput): () => void;
|
|
35
35
|
/**
|
|
36
|
-
* Creates a stateful order book subscription that first fetches a snapshot, buffers proto deltas from public:spot:orderbook:deltas:depth:{depth}:{symbolId}:proto, applies each delta only when it chains onto the book, and refetches on reconnects. After a sequence gap the book holds its last state until the server's next reset, sent about every 30 seconds and after gaps. A snapshot whose book is not available fails with ServiceUnavailableError through onError and is retried
|
|
36
|
+
* Creates a stateful order book subscription that first fetches a snapshot, buffers proto deltas from public:spot:orderbook:deltas:depth:{depth}:{symbolId}:proto, applies each delta only when it chains onto the book, and refetches on reconnects. After a sequence gap the book holds its last state until the server's next reset, sent about every 30 seconds and after gaps. A snapshot whose book is not available fails with ServiceUnavailableError through onError and is retried. A snapshot error that is not retried (such as a 500) leaves the book to the server's next reset, which rebuilds it. The snapshot is fetched once the channel opens, so a socket that cannot connect reports a retryable RealtimeError with type "transport" through onError instead, once per outage; onOpen follows when it recovers. The returned handle can unsubscribe or change local price bucket aggregation without reconnecting.
|
|
37
37
|
*
|
|
38
38
|
* `depth` above 500 throws ValidationError, since only REST serves 1000 and 5000; other depths ride the smallest published channel depth that covers it (see ORDERBOOK_WS_DEPTHS); levels are sliced back to the requested depth locally.
|
|
39
39
|
*
|