@polyester/sdk 0.20.1 → 0.21.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.
- package/CHANGELOG.md +24 -0
- package/README.md +9 -9
- package/dist/catalogs/market-data-catalog.d.ts +5 -14
- package/dist/catalogs/market-data-catalog.d.ts.map +1 -1
- package/dist/catalogs/market-data-catalog.js +1 -11
- package/dist/catalogs/market-data-catalog.js.map +1 -1
- package/dist/catalogs/snapshot-validation.js +4 -1
- package/dist/catalogs/snapshot-validation.js.map +1 -1
- package/dist/catalogs/zipper-catalog.d.ts +3 -0
- package/dist/catalogs/zipper-catalog.d.ts.map +1 -1
- package/dist/catalogs/zipper-catalog.js +2 -9
- package/dist/catalogs/zipper-catalog.js.map +1 -1
- package/dist/environment.d.ts +2 -2
- package/dist/environment.d.ts.map +1 -1
- package/dist/environment.js +4 -4
- package/dist/environment.js.map +1 -1
- package/dist/gen/auth/v1/social_verification_pb.d.ts +12 -9
- package/dist/gen/auth/v1/social_verification_pb.d.ts.map +1 -1
- package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +20 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.js +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +138 -13
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts.map +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.js +23 -6
- package/dist/gen/marketoverview/v1/marketoverview_pb.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/services/candles/candles.schemas.d.ts +19 -10
- package/dist/services/candles/candles.schemas.d.ts.map +1 -1
- package/dist/services/candles/candles.schemas.js +6 -0
- package/dist/services/candles/candles.schemas.js.map +1 -1
- package/dist/services/deposit/deposit.schemas.d.ts +1 -1
- package/dist/services/deposit/deposit.schemas.js +1 -1
- package/dist/services/deposit/deposit.schemas.js.map +1 -1
- package/dist/services/fees/fees.schemas.d.ts +1 -1
- package/dist/services/fees/fees.schemas.js +1 -1
- package/dist/services/fees/fees.schemas.js.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +9 -9
- package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.js +1 -1
- package/dist/services/internal-transfers/internal-transfers.schemas.js.map +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/market-overview/index.d.ts +2 -2
- package/dist/services/market-overview/market-overview.codecs.js +2 -2
- package/dist/services/market-overview/market-overview.codecs.js.map +1 -1
- package/dist/services/market-overview/market-overview.d.ts +7 -1
- package/dist/services/market-overview/market-overview.d.ts.map +1 -1
- package/dist/services/market-overview/market-overview.js +11 -1
- package/dist/services/market-overview/market-overview.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts +75 -15
- package/dist/services/market-overview/market-overview.schemas.d.ts.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.js +30 -7
- package/dist/services/market-overview/market-overview.schemas.js.map +1 -1
- package/dist/services/market-overview/market-overview.types.d.ts +2 -2
- package/dist/services/orders/orders-batch.schemas.d.ts +14 -14
- package/dist/services/orders/orders-input.schemas.d.ts +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +12 -12
- package/dist/services/social-verification/social-verification.d.ts +1 -1
- package/dist/services/social-verification/social-verification.js +1 -1
- package/dist/services/social-verification/social-verification.js.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.d.ts +17 -11
- package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
- package/dist/services/social-verification/social-verification.schemas.js +12 -5
- package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +4 -4
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +16 -16
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +1 -2
- package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
- package/dist/shared/validation.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketoverview_pb.js","names":[],"sources":["../../../../src/gen/marketoverview/v1/marketoverview_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file marketoverview/v1/marketoverview.proto (package marketoverview.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport { file_polyester_api_options } from \"../../polyester/api/options_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file marketoverview/v1/marketoverview.proto.\n */\nexport const file_marketoverview_v1_marketoverview: GenFile = /*@__PURE__*/\n fileDesc(\"CiZtYXJrZXRvdmVydmlldy92MS9tYXJrZXRvdmVydmlldy5wcm90bxIRbWFya2V0b3ZlcnZpZXcudjEiOQoLRXJyb3JEZXRhaWwSKgoEY29kZRgBIAEoDjIcLm1hcmtldG92ZXJ2aWV3LnYxLkVycm9yQ29kZSJaCglTcGFya2xpbmUSOAoIaW50ZXJ2YWwYASABKA4yJC5tYXJrZXRvdmVydmlldy52MS5TcGFya2xpbmVJbnRlcnZhbEIAEhMKC2Nsb3NlX3RpY2tzGAIgAygDIqwDCg5NYXJrZXRPdmVydmlldxIRCglzeW1ib2xfaWQYASABKA0SGAoQbGFzdF9wcmljZV90aWNrcxgDIAEoAxIYChBsYXN0X3RyYWRlX3RzX25zGAQgASgEEhYKDmNoYW5nZV8yNGhfYnBzGAUgASgFEhYKDmhpZ2hfMjRoX3R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bBIiCh5TUEFSS0xJTkVfSU5URVJWQUxfVU5TUEVDSUZJRUQQABIQCgxTUEFSS0xJTkVfMUgQARIRCg1TUEFSS0xJTkVfMjRIEAISEAoMU1BBUktMSU5FXzFXEAMSEAoMU1BBUktMSU5FXzFNEAQqngEKDU1hcmtldE9yZGVyQnkSHwobTUFSS0VUX09SREVSX0JZX1VOU1BFQ0lGSUVEEAASGwoXT1JERVJfQllfQ0hBTkdFXzI0SF9CUFMQARIdChlPUkRFUl9CWV9WT0xVTUVfMjRIX1FVT1RFEAISFwoTT1JERVJfQllfTEFTVF9QUklDRRADEhcKE09SREVSX0JZX0RBVEVfQURERUQQBCpMCg1Tb3J0RGlyZWN0aW9uEh4KGlNPUlRfRElSRUNUSU9OX1VOU1BFQ0lGSUVEEAASDAoIU09SVF9BU0MQARINCglTT1JUX0RFU0MQAiq5AQoJRXJyb3JDb2RlEhoKFkVSUk9SX0NPREVfVU5TUEVDSUZJRUQQABIaChZFUlJPUl9DT0RFX0JBRF9SRVFVRVNUEAESHwobRVJST1JfQ09ERV9JTlZBTElEX0FSR1VNRU5UEAISGAoURVJST1JfQ09ERV9OT1RfRk9VTkQQAxIaChZFUlJPUl9DT0RFX1VOQVZBSUxBQkxFEAQSHQoZRVJST1JfQ09ERV9VUFNUUkVBTV9FUlJPUhAFMowBChVNYXJrZXRPdmVydmlld1NlcnZpY2UScwoSTGlzdE1hcmtldE92ZXJ2aWV3EiwubWFya2V0b3ZlcnZpZXcudjEuTGlzdE1hcmtldE92ZXJ2aWV3UmVxdWVzdBotLm1hcmtldG92ZXJ2aWV3LnYxLkxpc3RNYXJrZXRPdmVydmlld1Jlc3BvbnNlIgBCUFpOZ2l0aHViLmNvbS9GYWJyaWMtTGFicy9wb2x5ZXN0ZXItc2RrLWdvL2dlbi9tYXJrZXRvdmVydmlldy92MTttYXJrZXRvdmVydmlld3YxYgZwcm90bzM=\", [file_polyester_api_options]);\n\n/**\n * ErrorDetail carries a typed domain error code for machine-readable handling.\n *\n * @generated from message marketoverview.v1.ErrorDetail\n */\nexport type ErrorDetail = Message<\"marketoverview.v1.ErrorDetail\"> & {\n /**\n * Stable error code for programmatic matching.\n *\n * @generated from field: marketoverview.v1.ErrorCode code = 1;\n */\n code: ErrorCode;\n};\n\n/**\n * Describes the message marketoverview.v1.ErrorDetail.\n * Use `create(ErrorDetailSchema)` to create a new message.\n */\nexport const ErrorDetailSchema: GenMessage<ErrorDetail> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 0);\n\n/**\n * Sparkline contains newest-first close prices for one time range.\n *\n * @generated from message marketoverview.v1.Sparkline\n */\nexport type Sparkline = Message<\"marketoverview.v1.Sparkline\"> & {\n /**\n * Time range and sampling resolution represented by these close prices.\n *\n * @generated from field: marketoverview.v1.SparklineInterval interval = 1;\n */\n interval: SparklineInterval;\n\n /**\n * Newest-first close prices in quote units scaled by 1e6.\n *\n * @generated from field: repeated int64 close_ticks = 2;\n */\n closeTicks: bigint[];\n};\n\n/**\n * Describes the message marketoverview.v1.Sparkline.\n * Use `create(SparklineSchema)` to create a new message.\n */\nexport const SparklineSchema: GenMessage<Sparkline> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 1);\n\n/**\n * @generated from message marketoverview.v1.MarketOverview\n */\nexport type MarketOverview = Message<\"marketoverview.v1.MarketOverview\"> & {\n /**\n * Numeric spot market identifier.\n *\n * @generated from field: uint32 symbol_id = 1;\n */\n symbolId: number;\n\n /**\n * Last traded price in quote units scaled by 1e6.\n *\n * @generated from field: int64 last_price_ticks = 3;\n */\n lastPriceTicks: bigint;\n\n /**\n * Last trade timestamp in nanoseconds since epoch.\n *\n * @generated from field: uint64 last_trade_ts_ns = 4;\n */\n lastTradeTsNs: bigint;\n\n /**\n * Rolling 24h change expressed in basis points (bp). Example: +123 = +1.23%.\n *\n * @generated from field: int32 change_24h_bps = 5;\n */\n change24hBps: number;\n\n /**\n * Rolling 24h stats.\n * Highest traded price in the 24h window, in quote units scaled by 1e6.\n *\n * @generated from field: int64 high_24h_ticks = 6;\n */\n high24hTicks: bigint;\n\n /**\n * Lowest traded price in the 24h window, in quote units scaled by 1e6.\n *\n * @generated from field: int64 low_24h_ticks = 7;\n */\n low24hTicks: bigint;\n\n /**\n * Rolling 24h base volume scaled by the pair's base_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from field: int64 volume_24h_base_scaled = 8;\n */\n volume24hBaseScaled: bigint;\n\n /**\n * Rolling 24h quote volume scaled by the pair's quote_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from field: int64 volume_24h_quote_scaled = 14;\n */\n volume24hQuoteScaled: bigint;\n\n /**\n * Listing timestamp in nanoseconds since epoch.\n *\n * @generated from field: uint64 listed_ts_ns = 15;\n */\n listedTsNs: bigint;\n\n /**\n * Current best bid price in quote units scaled by 1e6.\n *\n * @generated from field: int64 best_bid_ticks = 9;\n */\n bestBidTicks: bigint;\n\n /**\n * Best bid quantity scaled by the pair's base_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from field: int64 best_bid_qty_scaled = 10;\n */\n bestBidQtyScaled: bigint;\n\n /**\n * Current best ask price in quote units scaled by 1e6.\n *\n * @generated from field: int64 best_ask_ticks = 11;\n */\n bestAskTicks: bigint;\n\n /**\n * Best ask quantity scaled by the pair's base_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from field: int64 best_ask_qty_scaled = 12;\n */\n bestAskQtyScaled: bigint;\n\n /**\n * Optional sparklines (requested explicitly).\n *\n * @generated from field: repeated marketoverview.v1.Sparkline sparklines = 13;\n */\n sparklines: Sparkline[];\n\n /**\n * Current multi-venue index price in quote units scaled by 1e6.\n * Zero when no fresh, valid index price is available.\n *\n * @generated from field: int64 index_price_ticks = 16;\n */\n indexPriceTicks: bigint;\n};\n\n/**\n * Describes the message marketoverview.v1.MarketOverview.\n * Use `create(MarketOverviewSchema)` to create a new message.\n */\nexport const MarketOverviewSchema: GenMessage<MarketOverview> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 2);\n\n/**\n * @generated from message marketoverview.v1.ListMarketOverviewRequest\n */\nexport type ListMarketOverviewRequest = Message<\"marketoverview.v1.ListMarketOverviewRequest\"> & {\n /**\n * Filter by stable numeric pair IDs from GetSpotConfig. When empty, returns\n * all enabled markets.\n *\n * @generated from field: repeated uint32 symbol_id = 1;\n */\n symbolId: number[];\n\n /**\n * Maximum number of markets to return. Defaults to 50 when omitted; maximum\n * is 2000.\n *\n * @generated from field: uint32 limit = 2;\n */\n limit: number;\n\n /**\n * Opaque keyset cursor from a previous response. The cursor is exclusive and\n * bound to symbol IDs, sort key, and sort direction. Sparkline options\n * affect only response enrichment and may change between pages.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n\n /**\n * Sort key. When unset/UNSPECIFIED, defaults to 24h quote volume.\n *\n * @generated from field: marketoverview.v1.MarketOrderBy order_by = 4;\n */\n orderBy: MarketOrderBy;\n\n /**\n * Sort direction (DESC=newest/highest first).\n *\n * @generated from field: marketoverview.v1.SortDirection sort = 5;\n */\n sort: SortDirection;\n\n /**\n * When true, include sparklines in each MarketOverview.\n *\n * @generated from field: bool include_sparklines = 6;\n */\n includeSparklines: boolean;\n\n /**\n * Which sparklines to include. If empty and include_sparklines is true,\n * server defaults to 24h.\n *\n * @generated from field: repeated marketoverview.v1.SparklineInterval sparkline_intervals = 7;\n */\n sparklineIntervals: SparklineInterval[];\n};\n\n/**\n * Describes the message marketoverview.v1.ListMarketOverviewRequest.\n * Use `create(ListMarketOverviewRequestSchema)` to create a new message.\n */\nexport const ListMarketOverviewRequestSchema: GenMessage<ListMarketOverviewRequest> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 3);\n\n/**\n * @generated from message marketoverview.v1.ListMarketOverviewResponse\n */\nexport type ListMarketOverviewResponse = Message<\"marketoverview.v1.ListMarketOverviewResponse\"> & {\n /**\n * Market overview rows for the requested page.\n *\n * @generated from field: repeated marketoverview.v1.MarketOverview markets = 1;\n */\n markets: MarketOverview[];\n\n /**\n * Opaque cursor for the next page. Empty when no more results exist.\n *\n * @generated from field: string next_page_token = 2;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message marketoverview.v1.ListMarketOverviewResponse.\n * Use `create(ListMarketOverviewResponseSchema)` to create a new message.\n */\nexport const ListMarketOverviewResponseSchema: GenMessage<ListMarketOverviewResponse> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 4);\n\n/**\n * MarketOverviewBatch is a websocket payload carrying batched market overview\n * updates. It is published to a single all-markets channel at a fixed cadence.\n *\n * @generated from message marketoverview.v1.MarketOverviewBatch\n */\nexport type MarketOverviewBatch = Message<\"marketoverview.v1.MarketOverviewBatch\"> & {\n /**\n * Market overviews included in this batch.\n *\n * @generated from field: repeated marketoverview.v1.MarketOverview markets = 1;\n */\n markets: MarketOverview[];\n\n /**\n * Batch publish timestamp in nanoseconds since epoch.\n *\n * @generated from field: uint64 ts_ns = 2;\n */\n tsNs: bigint;\n};\n\n/**\n * Describes the message marketoverview.v1.MarketOverviewBatch.\n * Use `create(MarketOverviewBatchSchema)` to create a new message.\n */\nexport const MarketOverviewBatchSchema: GenMessage<MarketOverviewBatch> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 5);\n\n/**\n * SparklineInterval identifies the time range and sampling resolution for a\n * sparkline.\n *\n * @generated from enum marketoverview.v1.SparklineInterval\n */\nexport enum SparklineInterval {\n /**\n * Unspecified interval. When requested, server may default to 24H.\n *\n * @generated from enum value: SPARKLINE_INTERVAL_UNSPECIFIED = 0;\n */\n SPARKLINE_INTERVAL_UNSPECIFIED = 0,\n\n /**\n * 1 hour sparkline. Typically returns up to 60 points (1-minute buckets).\n *\n * @generated from enum value: SPARKLINE_1H = 1;\n */\n SPARKLINE_1H = 1,\n\n /**\n * 24 hour sparkline. Typically returns up to 96 points (15-minute buckets).\n *\n * @generated from enum value: SPARKLINE_24H = 2;\n */\n SPARKLINE_24H = 2,\n\n /**\n * 1 week sparkline. Typically returns up to 168 points (1-hour buckets).\n *\n * @generated from enum value: SPARKLINE_1W = 3;\n */\n SPARKLINE_1W = 3,\n\n /**\n * 1 month sparkline. Typically returns up to 180 points (4-hour buckets).\n *\n * @generated from enum value: SPARKLINE_1M = 4;\n */\n SPARKLINE_1M = 4,\n}\n\n/**\n * Describes the enum marketoverview.v1.SparklineInterval.\n */\nexport const SparklineIntervalSchema: GenEnum<SparklineInterval> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 0);\n\n/**\n * @generated from enum marketoverview.v1.MarketOrderBy\n */\nexport enum MarketOrderBy {\n /**\n * @generated from enum value: MARKET_ORDER_BY_UNSPECIFIED = 0;\n */\n MARKET_ORDER_BY_UNSPECIFIED = 0,\n\n /**\n * Sort by absolute 24h change (basis points).\n *\n * @generated from enum value: ORDER_BY_CHANGE_24H_BPS = 1;\n */\n ORDER_BY_CHANGE_24H_BPS = 1,\n\n /**\n * Sort by 24h quote volume scaled by the pair's quote_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from enum value: ORDER_BY_VOLUME_24H_QUOTE = 2;\n */\n ORDER_BY_VOLUME_24H_QUOTE = 2,\n\n /**\n * Sort by last price in quote units scaled by 1e6.\n *\n * @generated from enum value: ORDER_BY_LAST_PRICE = 3;\n */\n ORDER_BY_LAST_PRICE = 3,\n\n /**\n * Sort by listing time (new listings first).\n *\n * @generated from enum value: ORDER_BY_DATE_ADDED = 4;\n */\n ORDER_BY_DATE_ADDED = 4,\n}\n\n/**\n * Describes the enum marketoverview.v1.MarketOrderBy.\n */\nexport const MarketOrderBySchema: GenEnum<MarketOrderBy> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 1);\n\n/**\n * @generated from enum marketoverview.v1.SortDirection\n */\nexport enum SortDirection {\n /**\n * @generated from enum value: SORT_DIRECTION_UNSPECIFIED = 0;\n */\n SORT_DIRECTION_UNSPECIFIED = 0,\n\n /**\n * Ascending (oldest/lowest first).\n *\n * @generated from enum value: SORT_ASC = 1;\n */\n SORT_ASC = 1,\n\n /**\n * Descending (newest/highest first).\n *\n * @generated from enum value: SORT_DESC = 2;\n */\n SORT_DESC = 2,\n}\n\n/**\n * Describes the enum marketoverview.v1.SortDirection.\n */\nexport const SortDirectionSchema: GenEnum<SortDirection> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 2);\n\n/**\n * ErrorCode is a stable domain error code enum for Market Overview.\n * It is used for consistent error surfaces across ConnectRPC and REST.\n *\n * @generated from enum marketoverview.v1.ErrorCode\n */\nexport enum ErrorCode {\n /**\n * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: ERROR_CODE_BAD_REQUEST = 1;\n */\n BAD_REQUEST = 1,\n\n /**\n * @generated from enum value: ERROR_CODE_INVALID_ARGUMENT = 2;\n */\n INVALID_ARGUMENT = 2,\n\n /**\n * @generated from enum value: ERROR_CODE_NOT_FOUND = 3;\n */\n NOT_FOUND = 3,\n\n /**\n * @generated from enum value: ERROR_CODE_UNAVAILABLE = 4;\n */\n UNAVAILABLE = 4,\n\n /**\n * @generated from enum value: ERROR_CODE_UPSTREAM_ERROR = 5;\n */\n UPSTREAM_ERROR = 5,\n}\n\n/**\n * Describes the enum marketoverview.v1.ErrorCode.\n */\nexport const ErrorCodeSchema: GenEnum<ErrorCode> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 3);\n\n/**\n * List ticker-style market overview rows with optional sparklines.\n * Supports symbol filtering, sorting, and pagination controls.\n *\n * @generated from service marketoverview.v1.MarketOverviewService\n */\nexport const MarketOverviewService: GenService<{\n /**\n * @generated from rpc marketoverview.v1.MarketOverviewService.ListMarketOverview\n */\n listMarketOverview: {\n methodKind: \"unary\";\n input: typeof ListMarketOverviewRequestSchema;\n output: typeof ListMarketOverviewResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_marketoverview_v1_marketoverview, 0);\n\n"],"mappings":";;;;;;;;;;;;;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AAA;;;;CAKA,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,sBAAA,KAAA;;;;CAKA,UAAA,UAAA,eAAA,KAAA;;;;CAKA,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,oBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,kBACX,uBAAS,uCAAuC,CAAC;;;;;;;AAQnD,MAAa,wBAUX,0BAAY,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"marketoverview_pb.js","names":[],"sources":["../../../../src/gen/marketoverview/v1/marketoverview_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file marketoverview/v1/marketoverview.proto (package marketoverview.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport { file_polyester_api_options } from \"../../polyester/api/options_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file marketoverview/v1/marketoverview.proto.\n */\nexport const file_marketoverview_v1_marketoverview: GenFile = /*@__PURE__*/\n fileDesc(\"CiZtYXJrZXRvdmVydmlldy92MS9tYXJrZXRvdmVydmlldy5wcm90bxIRbWFya2V0b3ZlcnZpZXcudjEiOQoLRXJyb3JEZXRhaWwSKgoEY29kZRgBIAEoDjIcLm1hcmtldG92ZXJ2aWV3LnYxLkVycm9yQ29kZSJaCglTcGFya2xpbmUSOAoIaW50ZXJ2YWwYASABKA4yJC5tYXJrZXRvdmVydmlldy52MS5TcGFya2xpbmVJbnRlcnZhbEIAEhMKC2Nsb3NlX3RpY2tzGAIgAygDIqsECg5NYXJrZXRPdmVydmlldxIRCglzeW1ib2xfaWQYASABKA0SGAoQbGFzdF9wcmljZV90aWNrcxgDIAEoAxIYChBsYXN0X3RyYWRlX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ZJRUQQABIMCghTT1JUX0FTQxABEg0KCVNPUlRfREVTQxACKrkBCglFcnJvckNvZGUSGgoWRVJST1JfQ09ERV9VTlNQRUNJRklFRBAAEhoKFkVSUk9SX0NPREVfQkFEX1JFUVVFU1QQARIfChtFUlJPUl9DT0RFX0lOVkFMSURfQVJHVU1FTlQQAhIYChRFUlJPUl9DT0RFX05PVF9GT1VORBADEhoKFkVSUk9SX0NPREVfVU5BVkFJTEFCTEUQBBIdChlFUlJPUl9DT0RFX1VQU1RSRUFNX0VSUk9SEAUyhwIKFU1hcmtldE92ZXJ2aWV3U2VydmljZRJ5ChRHZXRTcG90Vm9sdW1lSGlzdG9yeRIuLm1hcmtldG92ZXJ2aWV3LnYxLkdldFNwb3RWb2x1bWVIaXN0b3J5UmVxdWVzdBovLm1hcmtldG92ZXJ2aWV3LnYxLkdldFNwb3RWb2x1bWVIaXN0b3J5UmVzcG9uc2UiABJzChJMaXN0TWFya2V0T3ZlcnZpZXcSLC5tYXJrZXRvdmVydmlldy52MS5MaXN0TWFya2V0T3ZlcnZpZXdSZXF1ZXN0Gi0ubWFya2V0b3ZlcnZpZXcudjEuTGlzdE1hcmtldE92ZXJ2aWV3UmVzcG9uc2UiAEJQWk5naXRodWIuY29tL0ZhYnJpYy1MYWJzL3BvbHllc3Rlci1zZGstZ28vZ2VuL21hcmtldG92ZXJ2aWV3L3YxO21hcmtldG92ZXJ2aWV3djFiBnByb3RvMw==\", [file_polyester_api_options]);\n\n/**\n * ErrorDetail carries a typed domain error code for machine-readable handling.\n *\n * @generated from message marketoverview.v1.ErrorDetail\n */\nexport type ErrorDetail = Message<\"marketoverview.v1.ErrorDetail\"> & {\n /**\n * Stable error code for programmatic matching.\n *\n * @generated from field: marketoverview.v1.ErrorCode code = 1;\n */\n code: ErrorCode;\n};\n\n/**\n * Describes the message marketoverview.v1.ErrorDetail.\n * Use `create(ErrorDetailSchema)` to create a new message.\n */\nexport const ErrorDetailSchema: GenMessage<ErrorDetail> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 0);\n\n/**\n * Sparkline contains newest-first close prices for one time range.\n *\n * @generated from message marketoverview.v1.Sparkline\n */\nexport type Sparkline = Message<\"marketoverview.v1.Sparkline\"> & {\n /**\n * Time range and sampling resolution represented by these close prices.\n *\n * @generated from field: marketoverview.v1.SparklineInterval interval = 1;\n */\n interval: SparklineInterval;\n\n /**\n * Newest-first close prices in quote units scaled by 1e6.\n *\n * @generated from field: repeated int64 close_ticks = 2;\n */\n closeTicks: bigint[];\n};\n\n/**\n * Describes the message marketoverview.v1.Sparkline.\n * Use `create(SparklineSchema)` to create a new message.\n */\nexport const SparklineSchema: GenMessage<Sparkline> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 1);\n\n/**\n * @generated from message marketoverview.v1.MarketOverview\n */\nexport type MarketOverview = Message<\"marketoverview.v1.MarketOverview\"> & {\n /**\n * Numeric spot market identifier.\n *\n * @generated from field: uint32 symbol_id = 1;\n */\n symbolId: number;\n\n /**\n * Last traded price in quote units scaled by 1e6.\n *\n * @generated from field: int64 last_price_ticks = 3;\n */\n lastPriceTicks: bigint;\n\n /**\n * Last trade timestamp in nanoseconds since epoch.\n *\n * @generated from field: uint64 last_trade_ts_ns = 4;\n */\n lastTradeTsNs: bigint;\n\n /**\n * Rolling 24h change expressed in basis points (bp). Example: +123 = +1.23%.\n *\n * @generated from field: int32 change_24h_bps = 5;\n */\n change24hBps: number;\n\n /**\n * Rolling 24h stats.\n * Highest traded price in the 24h window, in quote units scaled by 1e6.\n *\n * @generated from field: int64 high_24h_ticks = 6;\n */\n high24hTicks: bigint;\n\n /**\n * Lowest traded price in the 24h window, in quote units scaled by 1e6.\n *\n * @generated from field: int64 low_24h_ticks = 7;\n */\n low24hTicks: bigint;\n\n /**\n * Rolling 24h base volume scaled by the pair's base_quantity_scale from\n * GetSpotConfig. Omitted if the amount exceeds the signed 64-bit range.\n *\n * @generated from field: optional int64 volume_24h_base_scaled = 8;\n */\n volume24hBaseScaled?: bigint | undefined;\n\n /**\n * Rolling 24h quote volume scaled by the pair's quote_quantity_scale from\n * GetSpotConfig. Omitted if the amount exceeds the signed 64-bit range.\n *\n * @generated from field: optional int64 volume_24h_quote_scaled = 14;\n */\n volume24hQuoteScaled?: bigint | undefined;\n\n /**\n * Rolling 24h USD volume, scaled by 1e6 (one unit is 0.000001 USD).\n * Omitted if any contributing volume cannot be valued reliably. Quote volumes\n * use execution prices; USD conversion uses historical quarter-hour marks.\n * Covers the 24 hours ending at the latest completed UTC minute.\n * Refreshed every 15 seconds after completed minutes become available.\n *\n * @generated from field: optional int64 volume_24h_usd_scaled = 17;\n */\n volume24hUsdScaled?: bigint | undefined;\n\n /**\n * Listing timestamp in nanoseconds since epoch.\n *\n * @generated from field: uint64 listed_ts_ns = 15;\n */\n listedTsNs: bigint;\n\n /**\n * Current best bid price in quote units scaled by 1e6.\n *\n * @generated from field: int64 best_bid_ticks = 9;\n */\n bestBidTicks: bigint;\n\n /**\n * Best bid quantity scaled by the pair's base_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from field: int64 best_bid_qty_scaled = 10;\n */\n bestBidQtyScaled: bigint;\n\n /**\n * Current best ask price in quote units scaled by 1e6.\n *\n * @generated from field: int64 best_ask_ticks = 11;\n */\n bestAskTicks: bigint;\n\n /**\n * Best ask quantity scaled by the pair's base_quantity_scale from\n * GetSpotConfig.\n *\n * @generated from field: int64 best_ask_qty_scaled = 12;\n */\n bestAskQtyScaled: bigint;\n\n /**\n * Optional sparklines (requested explicitly).\n *\n * @generated from field: repeated marketoverview.v1.Sparkline sparklines = 13;\n */\n sparklines: Sparkline[];\n\n /**\n * Current multi-venue index price in quote units scaled by 1e6.\n * Zero when no fresh, valid index price is available.\n *\n * @generated from field: int64 index_price_ticks = 16;\n */\n indexPriceTicks: bigint;\n};\n\n/**\n * Describes the message marketoverview.v1.MarketOverview.\n * Use `create(MarketOverviewSchema)` to create a new message.\n */\nexport const MarketOverviewSchema: GenMessage<MarketOverview> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 2);\n\n/**\n * @generated from message marketoverview.v1.ListMarketOverviewRequest\n */\nexport type ListMarketOverviewRequest = Message<\"marketoverview.v1.ListMarketOverviewRequest\"> & {\n /**\n * Filter by stable numeric pair IDs from GetSpotConfig. When empty, returns\n * all enabled markets.\n *\n * @generated from field: repeated uint32 symbol_id = 1;\n */\n symbolId: number[];\n\n /**\n * Maximum number of markets to return. Defaults to 50 when omitted; maximum\n * is 2000.\n *\n * @generated from field: uint32 limit = 2;\n */\n limit: number;\n\n /**\n * Opaque keyset cursor from a previous response. The cursor is exclusive and\n * bound to symbol IDs, sort key, and sort direction. Sparkline options\n * affect only response enrichment and may change between pages.\n *\n * @generated from field: string page_token = 3;\n */\n pageToken: string;\n\n /**\n * Sort key. When unset/UNSPECIFIED, defaults to descending 24h USD volume.\n *\n * @generated from field: marketoverview.v1.MarketOrderBy order_by = 4;\n */\n orderBy: MarketOrderBy;\n\n /**\n * Sort direction (DESC=newest/highest first).\n *\n * @generated from field: marketoverview.v1.SortDirection sort = 5;\n */\n sort: SortDirection;\n\n /**\n * When true, include sparklines in each MarketOverview.\n *\n * @generated from field: bool include_sparklines = 6;\n */\n includeSparklines: boolean;\n\n /**\n * Which sparklines to include. If empty and include_sparklines is true,\n * server defaults to 24h.\n *\n * @generated from field: repeated marketoverview.v1.SparklineInterval sparkline_intervals = 7;\n */\n sparklineIntervals: SparklineInterval[];\n};\n\n/**\n * Describes the message marketoverview.v1.ListMarketOverviewRequest.\n * Use `create(ListMarketOverviewRequestSchema)` to create a new message.\n */\nexport const ListMarketOverviewRequestSchema: GenMessage<ListMarketOverviewRequest> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 3);\n\n/**\n * @generated from message marketoverview.v1.ListMarketOverviewResponse\n */\nexport type ListMarketOverviewResponse = Message<\"marketoverview.v1.ListMarketOverviewResponse\"> & {\n /**\n * Market overview rows for the requested page.\n *\n * @generated from field: repeated marketoverview.v1.MarketOverview markets = 1;\n */\n markets: MarketOverview[];\n\n /**\n * Opaque cursor for the next page. Empty when no more results exist.\n *\n * @generated from field: string next_page_token = 2;\n */\n nextPageToken: string;\n};\n\n/**\n * Describes the message marketoverview.v1.ListMarketOverviewResponse.\n * Use `create(ListMarketOverviewResponseSchema)` to create a new message.\n */\nexport const ListMarketOverviewResponseSchema: GenMessage<ListMarketOverviewResponse> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 4);\n\n/**\n * MarketOverviewBatch is a websocket payload carrying batched market overview\n * updates. It is published to a single all-markets channel at a fixed cadence.\n *\n * @generated from message marketoverview.v1.MarketOverviewBatch\n */\nexport type MarketOverviewBatch = Message<\"marketoverview.v1.MarketOverviewBatch\"> & {\n /**\n * Market overviews included in this batch.\n *\n * @generated from field: repeated marketoverview.v1.MarketOverview markets = 1;\n */\n markets: MarketOverview[];\n\n /**\n * Batch publish timestamp in nanoseconds since epoch.\n *\n * @generated from field: uint64 ts_ns = 2;\n */\n tsNs: bigint;\n};\n\n/**\n * Describes the message marketoverview.v1.MarketOverviewBatch.\n * Use `create(MarketOverviewBatchSchema)` to create a new message.\n */\nexport const MarketOverviewBatchSchema: GenMessage<MarketOverviewBatch> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 5);\n\n/**\n * A finite spot-volume chart request; no pagination or arbitrary time range.\n *\n * @generated from message marketoverview.v1.GetSpotVolumeHistoryRequest\n */\nexport type GetSpotVolumeHistoryRequest = Message<\"marketoverview.v1.GetSpotVolumeHistoryRequest\"> & {\n /**\n * Pair IDs from GetSpotConfig; empty selects every configured pair separately.\n * At most 2000 distinct positive IDs. Unknown IDs are rejected. If the full\n * universe exceeds 2000 pairs, specify a filter; results are never truncated.\n *\n * @generated from field: repeated uint32 symbol_id = 1;\n */\n symbolId: number[];\n};\n\n/**\n * Describes the message marketoverview.v1.GetSpotVolumeHistoryRequest.\n * Use `create(GetSpotVolumeHistoryRequestSchema)` to create a new message.\n */\nexport const GetSpotVolumeHistoryRequestSchema: GenMessage<GetSpotVolumeHistoryRequest> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 6);\n\n/**\n * One pair appears exactly once, regardless of its base and quote assets.\n * REST renders the scaled amounts as decimal strings in volumeUsd.\n *\n * @generated from message marketoverview.v1.SpotPairVolumeSeries\n */\nexport type SpotPairVolumeSeries = Message<\"marketoverview.v1.SpotPairVolumeSeries\"> & {\n /**\n * Stable numeric pair ID; clients may group these series by base asset.\n *\n * @generated from field: uint32 symbol_id = 1;\n */\n symbolId: number;\n\n /**\n * Trailing-24h USD amounts scaled by 1e6, oldest first. Exactly points values,\n * aligned with the shared response grid. Zero means no executed trades in\n * the window. USD values round down once per contributing 15-minute bucket.\n *\n * @generated from field: repeated sint64 volume_usd_scaled = 2;\n */\n volumeUsdScaled: bigint[];\n};\n\n/**\n * Describes the message marketoverview.v1.SpotPairVolumeSeries.\n * Use `create(SpotPairVolumeSeriesSchema)` to create a new message.\n */\nexport const SpotPairVolumeSeriesSchema: GenMessage<SpotPairVolumeSeries> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 7);\n\n/**\n * Aligned columnar trailing-24h USD series over the most recent 24 hours.\n * The grid always contains 97 samples ending at the latest completed UTC\n * quarter-hour. Index i maps to start_ts_sec + i * 900 seconds. Each sample\n * covers [sample time - 24h, sample time); only the preceding 48 hours contribute.\n * USD conversion uses the latest trustworthy quote/USD mark at or before each\n * bucket's start. Stablecoin quotes also require historical USD prices.\n * If any contributing trade cannot be valued, or a USD amount overflows,\n * the RPC fails as unavailable; partial or zero-filled valuations are not returned.\n * Intervals without executed trades are zero. Results may be reused for 15 seconds.\n *\n * @generated from message marketoverview.v1.GetSpotVolumeHistoryResponse\n */\nexport type GetSpotVolumeHistoryResponse = Message<\"marketoverview.v1.GetSpotVolumeHistoryResponse\"> & {\n /**\n * Sampling interval between points; currently always \"15m\".\n *\n * @generated from field: string bucket = 1;\n */\n bucket: string;\n\n /**\n * First sample timestamp in seconds since Unix epoch (UTC), inclusive.\n *\n * @generated from field: fixed32 start_ts_sec = 2;\n */\n startTsSec: number;\n\n /**\n * Last sample timestamp in seconds since Unix epoch (UTC), inclusive.\n *\n * @generated from field: fixed32 end_ts_sec = 3;\n */\n endTsSec: number;\n\n /**\n * Number of aligned values in every pair array and the total array; always 97.\n *\n * @generated from field: uint32 points = 4;\n */\n points: number;\n\n /**\n * Pairs ordered by ascending symbol_id; at most 2000, each included once.\n *\n * @generated from field: repeated marketoverview.v1.SpotPairVolumeSeries pairs = 5;\n */\n pairs: SpotPairVolumeSeries[];\n\n /**\n * Sum across selected pairs, USD scaled by 1e6. Exactly points values,\n * oldest first. REST renders decimal strings in totalVolumeUsd.\n * Do not sum overlapping trailing-24h samples to obtain period traded volume.\n *\n * @generated from field: repeated sint64 total_volume_usd_scaled = 6;\n */\n totalVolumeUsdScaled: bigint[];\n};\n\n/**\n * Describes the message marketoverview.v1.GetSpotVolumeHistoryResponse.\n * Use `create(GetSpotVolumeHistoryResponseSchema)` to create a new message.\n */\nexport const GetSpotVolumeHistoryResponseSchema: GenMessage<GetSpotVolumeHistoryResponse> = /*@__PURE__*/\n messageDesc(file_marketoverview_v1_marketoverview, 8);\n\n/**\n * SparklineInterval identifies the time range and sampling resolution for a\n * sparkline.\n *\n * @generated from enum marketoverview.v1.SparklineInterval\n */\nexport enum SparklineInterval {\n /**\n * Unspecified interval. When requested, server may default to 24H.\n *\n * @generated from enum value: SPARKLINE_INTERVAL_UNSPECIFIED = 0;\n */\n SPARKLINE_INTERVAL_UNSPECIFIED = 0,\n\n /**\n * 1 hour sparkline. Typically returns up to 60 points (1-minute buckets).\n *\n * @generated from enum value: SPARKLINE_1H = 1;\n */\n SPARKLINE_1H = 1,\n\n /**\n * 24 hour sparkline. Typically returns up to 96 points (15-minute buckets).\n *\n * @generated from enum value: SPARKLINE_24H = 2;\n */\n SPARKLINE_24H = 2,\n\n /**\n * 1 week sparkline. Typically returns up to 168 points (1-hour buckets).\n *\n * @generated from enum value: SPARKLINE_1W = 3;\n */\n SPARKLINE_1W = 3,\n\n /**\n * 1 month sparkline. Typically returns up to 180 points (4-hour buckets).\n *\n * @generated from enum value: SPARKLINE_1M = 4;\n */\n SPARKLINE_1M = 4,\n}\n\n/**\n * Describes the enum marketoverview.v1.SparklineInterval.\n */\nexport const SparklineIntervalSchema: GenEnum<SparklineInterval> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 0);\n\n/**\n * @generated from enum marketoverview.v1.MarketOrderBy\n */\nexport enum MarketOrderBy {\n /**\n * @generated from enum value: MARKET_ORDER_BY_UNSPECIFIED = 0;\n */\n MARKET_ORDER_BY_UNSPECIFIED = 0,\n\n /**\n * Sort by absolute 24h change (basis points).\n *\n * @generated from enum value: ORDER_BY_CHANGE_24H_BPS = 1;\n */\n ORDER_BY_CHANGE_24H_BPS = 1,\n\n /**\n * Sort by canonical USD 24h volume. Unvalued markets sort last in either direction.\n *\n * @generated from enum value: ORDER_BY_VOLUME_24H_USD = 2;\n */\n ORDER_BY_VOLUME_24H_USD = 2,\n\n /**\n * Sort by last price in quote units scaled by 1e6.\n *\n * @generated from enum value: ORDER_BY_LAST_PRICE = 3;\n */\n ORDER_BY_LAST_PRICE = 3,\n\n /**\n * Sort by listing time (new listings first).\n *\n * @generated from enum value: ORDER_BY_DATE_ADDED = 4;\n */\n ORDER_BY_DATE_ADDED = 4,\n}\n\n/**\n * Describes the enum marketoverview.v1.MarketOrderBy.\n */\nexport const MarketOrderBySchema: GenEnum<MarketOrderBy> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 1);\n\n/**\n * @generated from enum marketoverview.v1.SortDirection\n */\nexport enum SortDirection {\n /**\n * @generated from enum value: SORT_DIRECTION_UNSPECIFIED = 0;\n */\n SORT_DIRECTION_UNSPECIFIED = 0,\n\n /**\n * Ascending (oldest/lowest first).\n *\n * @generated from enum value: SORT_ASC = 1;\n */\n SORT_ASC = 1,\n\n /**\n * Descending (newest/highest first).\n *\n * @generated from enum value: SORT_DESC = 2;\n */\n SORT_DESC = 2,\n}\n\n/**\n * Describes the enum marketoverview.v1.SortDirection.\n */\nexport const SortDirectionSchema: GenEnum<SortDirection> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 2);\n\n/**\n * ErrorCode is a stable domain error code enum for Market Overview.\n * It is used for consistent error surfaces across ConnectRPC and REST.\n *\n * @generated from enum marketoverview.v1.ErrorCode\n */\nexport enum ErrorCode {\n /**\n * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0;\n */\n UNSPECIFIED = 0,\n\n /**\n * @generated from enum value: ERROR_CODE_BAD_REQUEST = 1;\n */\n BAD_REQUEST = 1,\n\n /**\n * @generated from enum value: ERROR_CODE_INVALID_ARGUMENT = 2;\n */\n INVALID_ARGUMENT = 2,\n\n /**\n * @generated from enum value: ERROR_CODE_NOT_FOUND = 3;\n */\n NOT_FOUND = 3,\n\n /**\n * @generated from enum value: ERROR_CODE_UNAVAILABLE = 4;\n */\n UNAVAILABLE = 4,\n\n /**\n * @generated from enum value: ERROR_CODE_UPSTREAM_ERROR = 5;\n */\n UPSTREAM_ERROR = 5,\n}\n\n/**\n * Describes the enum marketoverview.v1.ErrorCode.\n */\nexport const ErrorCodeSchema: GenEnum<ErrorCode> = /*@__PURE__*/\n enumDesc(file_marketoverview_v1_marketoverview, 3);\n\n/**\n * List ticker-style market overview rows with optional sparklines.\n * Supports symbol filtering, sorting, and pagination controls.\n *\n * @generated from service marketoverview.v1.MarketOverviewService\n */\nexport const MarketOverviewService: GenService<{\n /**\n * Get aligned pair-level and total trailing-24h USD volume, sampled every\n * 15 minutes over the latest day. Unavailable valuations fail the request.\n *\n * @generated from rpc marketoverview.v1.MarketOverviewService.GetSpotVolumeHistory\n */\n getSpotVolumeHistory: {\n methodKind: \"unary\";\n input: typeof GetSpotVolumeHistoryRequestSchema;\n output: typeof GetSpotVolumeHistoryResponseSchema;\n },\n /**\n * @generated from rpc marketoverview.v1.MarketOverviewService.ListMarketOverview\n */\n listMarketOverview: {\n methodKind: \"unary\";\n input: typeof ListMarketOverviewRequestSchema;\n output: typeof ListMarketOverviewResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_marketoverview_v1_marketoverview, 0);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,wCACX,uBAAS,4vGAA4vG,CAAC,0BAA0B,CAAC;;;;;AAoBnyG,MAAa,oBACX,0BAAY,uCAAuC,CAAC;;;;;AA2BtD,MAAa,kBACX,0BAAY,uCAAuC,CAAC;;;;;AAqItD,MAAa,uBACX,0BAAY,uCAAuC,CAAC;;;;;AAiEtD,MAAa,kCACX,0BAAY,uCAAuC,CAAC;;;;;AAyBtD,MAAa,mCACX,0BAAY,uCAAuC,CAAC;;;;;AA4BtD,MAAa,4BACX,0BAAY,uCAAuC,CAAC;;;;;AAsBtD,MAAa,oCACX,0BAAY,uCAAuC,CAAC;;;;;AA8BtD,MAAa,6BACX,0BAAY,uCAAuC,CAAC;;;;;AAiEtD,MAAa,qCACX,0BAAY,uCAAuC,CAAC;;;;;;;AAQtD,IAAY,oBAAL,yBAAA,mBAAA;;;;;;CAML,kBAAA,kBAAA,oCAAA,KAAA;;;;;;CAOA,kBAAA,kBAAA,kBAAA,KAAA;;;;;;CAOA,kBAAA,kBAAA,mBAAA,KAAA;;;;;;CAOA,kBAAA,kBAAA,kBAAA,KAAA;;;;;;CAOA,kBAAA,kBAAA,kBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,0BACX,uBAAS,uCAAuC,CAAC;;;;AAKnD,IAAY,gBAAL,yBAAA,eAAA;;;;CAIL,cAAA,cAAA,iCAAA,KAAA;;;;;;CAOA,cAAA,cAAA,6BAAA,KAAA;;;;;;CAOA,cAAA,cAAA,6BAAA,KAAA;;;;;;CAOA,cAAA,cAAA,yBAAA,KAAA;;;;;;CAOA,cAAA,cAAA,yBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,sBACX,uBAAS,uCAAuC,CAAC;;;;AAKnD,IAAY,gBAAL,yBAAA,eAAA;;;;CAIL,cAAA,cAAA,gCAAA,KAAA;;;;;;CAOA,cAAA,cAAA,cAAA,KAAA;;;;;;CAOA,cAAA,cAAA,eAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,sBACX,uBAAS,uCAAuC,CAAC;;;;;;;AAQnD,IAAY,YAAL,yBAAA,WAAA;;;;CAIL,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,sBAAA,KAAA;;;;CAKA,UAAA,UAAA,eAAA,KAAA;;;;CAKA,UAAA,UAAA,iBAAA,KAAA;;;;CAKA,UAAA,UAAA,oBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,kBACX,uBAAS,uCAAuC,CAAC;;;;;;;AAQnD,MAAa,wBAqBX,0BAAY,uCAAuC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccountSigner, AccountSignerConfig, AccountSignerFactory, HexAddress } from "./account-signer/types.js";
|
|
2
|
-
import { CreatePolyesterEnvironmentParams,
|
|
2
|
+
import { CreatePolyesterEnvironmentParams, POLYESTER_DEVNET_ENVIRONMENT, PolyesterAccountAbstractionEnvironment, PolyesterContractsEnvironment, PolyesterEntryPointConfig, PolyesterEnvironment, PolyesterSafeDeploymentConfig, createPolyesterEnvironment } from "./environment.js";
|
|
3
3
|
import { CreatePolyesterAccountSignerParams } from "./account-signer/create-polyester-account-signer.js";
|
|
4
4
|
import "./account-signer/index.js";
|
|
5
5
|
import { AssetConfig, DepositWithdrawConfig, PairConfig, PairStatus, SpotConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig } from "./shared/catalog-config.js";
|
|
@@ -23,7 +23,7 @@ import { CreateSubaccountInput, CreateSubaccountResult as CreateSubaccountResult
|
|
|
23
23
|
import { Candle, CandleColumnar, CandleColumnarInt, CandleInt, GetCandlesColumnsInput, GetCandlesInput, Timeframe } from "./services/candles/candles.schemas.js";
|
|
24
24
|
import { ChainAnalyticsRange, GetUnifiedAssetBalancesInput, GetZippedAssetSupplyGroupInput, GetZippedAssetSupplyInput, UnifiedAssetBalancesResponse, ZippedAssetSupplyGroupResponse, ZippedAssetSupplyResponse, ZippedAssetSupplySeries } from "./services/chain-analytics/chain-analytics.schemas.js";
|
|
25
25
|
import { GetMarketTradesInput, MarketTrade } from "./services/market-data/market-data.schemas.js";
|
|
26
|
-
import { ListMarketOverviewInput, MarketOverview, MarketOverviewOrderBy, MarketOverviewSort, MarketOverviewSparkline, SparklineIntervalName } from "./services/market-overview/market-overview.schemas.js";
|
|
26
|
+
import { ListMarketOverviewInput, MarketOverview, MarketOverviewOrderBy, MarketOverviewSort, MarketOverviewSparkline, SparklineIntervalName, SpotPairVolumeSeries, SpotVolumeHistoryInput, SpotVolumeHistoryResponse } from "./services/market-overview/market-overview.schemas.js";
|
|
27
27
|
import { GetOrderbookInput, OrderbookData, OrderbookLevel } from "./services/orderbook/orderbook.schemas.js";
|
|
28
28
|
import { CreateOrderbookSubscriptionInput, OrderbookStreamHandlers, OrderbookSubscription } from "./services/orderbook/orderbook.js";
|
|
29
29
|
import { HeatmapDepthValue, HeatmapIntervalValue, HeatmapQuantityModeValue } from "./services/heatmap/heatmap.codecs.js";
|
|
@@ -105,4 +105,4 @@ import "./services/triggers/triggers.types.js";
|
|
|
105
105
|
import "./services/vip/vip.types.js";
|
|
106
106
|
import "./services/whiteboard/whiteboard.types.js";
|
|
107
107
|
import "./services/zipper/zipper.types.js";
|
|
108
|
-
export { type AccountCodeValue, type AccountIdentity, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type ActiveAccountInfo, type AddressBook, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type ArchiveWhiteboardBoardInput, type ArchiveWhiteboardBoardResult, type AssetConfig, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOrderInput, type CancelOrderResult, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, type ColumnarTimeWindow, type CompleteMfaChallengeResult, ConfigurationError, type ConnectChannelParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWhiteboardBoardInput, type CreateWhiteboardBoardResult, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWhiteboardBoardInput, type GetWhiteboardBoardResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferDestination, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListDepositAddressesInput, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type ListWhiteboardBoardsInput, type ListWhiteboardBoardsResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MintWhiteboardJoinTokenInput, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, type Nonce, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorDetail, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PreparedTradingWithdraw, type PreviewOrderResult, type Profile, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetSubaccountMemberMfaRequirementInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type TakeProfitInput, type Timeframe, TimeoutError, type Trade, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TradingWithdrawWalletTypedData, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, type UpdateWhiteboardBoardAclInput, type UpdateWhiteboardBoardAclResult, type UpdateWhiteboardBoardInput, type UpdateWhiteboardBoardResult, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipStatus, type VipTier, type VipTierCatalog, type WhiteboardAccess, type WhiteboardAclEntry, type WhiteboardAclEntryInput, type WhiteboardAclSubjectType, type WhiteboardAudience, type WhiteboardBoard, type WhiteboardBoardDetails, type WhiteboardBoardListItem, type WhiteboardJoinTokenResult, type WhiteboardPermissions, type WhiteboardPresencePayload, type WhiteboardResolvedRole, type WhiteboardSnapshot, type WhiteboardWritableRole, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, keccak256Hex, mergeLedgerBalances, normalizeErrorMessage, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
|
108
|
+
export { type AccountCodeValue, type AccountIdentity, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type ActiveAccountInfo, type AddressBook, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type ArchiveWhiteboardBoardInput, type ArchiveWhiteboardBoardResult, type AssetConfig, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOrderInput, type CancelOrderResult, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, type ColumnarTimeWindow, type CompleteMfaChallengeResult, ConfigurationError, type ConnectChannelParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWhiteboardBoardInput, type CreateWhiteboardBoardResult, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWhiteboardBoardInput, type GetWhiteboardBoardResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferDestination, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListDepositAddressesInput, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type ListWhiteboardBoardsInput, type ListWhiteboardBoardsResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MintWhiteboardJoinTokenInput, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, type Nonce, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_SESSION_COOKIE_NAME, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorDetail, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PreparedTradingWithdraw, type PreviewOrderResult, type Profile, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetSubaccountMemberMfaRequirementInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeRate, type SpotPairVolumeSeries, type SpotVolumeHistoryInput, type SpotVolumeHistoryResponse, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type TakeProfitInput, type Timeframe, TimeoutError, type Trade, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TradingWithdrawWalletTypedData, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, type UpdateWhiteboardBoardAclInput, type UpdateWhiteboardBoardAclResult, type UpdateWhiteboardBoardInput, type UpdateWhiteboardBoardResult, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipStatus, type VipTier, type VipTierCatalog, type WhiteboardAccess, type WhiteboardAclEntry, type WhiteboardAclEntryInput, type WhiteboardAclSubjectType, type WhiteboardAudience, type WhiteboardBoard, type WhiteboardBoardDetails, type WhiteboardBoardListItem, type WhiteboardJoinTokenResult, type WhiteboardPermissions, type WhiteboardPresencePayload, type WhiteboardResolvedRole, type WhiteboardSnapshot, type WhiteboardWritableRole, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, keccak256Hex, mergeLedgerBalances, normalizeErrorMessage, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AlreadyExistsError, AuthenticationError, ConfigurationError, InternalSe
|
|
|
2
2
|
import { tsObjToNsString } from "./utils/time.js";
|
|
3
3
|
import { connectErrorToPolyesterError, createErrorMappingInterceptor, toPolyesterError } from "./shared/connect-error-mapping.js";
|
|
4
4
|
import { checksumEvmAddress, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, isEvmAddress, isEvmAddressStrict, keccak256Hex } from "./utils/evm.js";
|
|
5
|
-
import {
|
|
5
|
+
import { POLYESTER_DEVNET_ENVIRONMENT, createPolyesterEnvironment } from "./environment.js";
|
|
6
6
|
import { formatConnectError, formatUserFacingError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError } from "./utils/errors.js";
|
|
7
7
|
import { compareUnsignedIntegerStrings, shouldApplyReconciliationUpdate } from "./shared/reconciliation.js";
|
|
8
8
|
import { mergeLedgerBalances } from "./services/balances/balances.merge.js";
|
|
@@ -14,4 +14,4 @@ import { PolyesterBrowserClient } from "./browser-client.js";
|
|
|
14
14
|
import { PolyesterServerClient, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest } from "./server-client.js";
|
|
15
15
|
import { isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isSessionElevationRequiredError } from "./utils/connect-mfa-errors.js";
|
|
16
16
|
import { columnarTimestampSecAt, expandColumnarTimestampsSec } from "./utils/columnar-time.js";
|
|
17
|
-
export { AlreadyExistsError, AuthenticationError, ConfigurationError, InternalServerError, MfaEnrollmentRequiredError, MfaLastFactorRequiredError, MfaRequiredError, MfaVerificationError, NetworkError, POLYESTER_AUTH_TOKEN_COOKIE_NAME,
|
|
17
|
+
export { AlreadyExistsError, AuthenticationError, ConfigurationError, InternalServerError, MfaEnrollmentRequiredError, MfaLastFactorRequiredError, MfaRequiredError, MfaVerificationError, NetworkError, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_SESSION_COOKIE_NAME, PermissionError, PolicyInUseError, PolicyLockedError, PolicyScopeMismatchError, PolyesterBrowserClient, PolyesterClient, PolyesterError, PolyesterServerClient, PreconditionFailedError, RateLimitError, RequestError, ResourceNotFoundError, RevisionConflictError, ServiceUnavailableError, SessionElevationRequiredError, StaleQuoteError, StepUpRequiredError, TimeoutError, TransientError, ValidationError, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, keccak256Hex, mergeLedgerBalances, normalizeErrorMessage, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
|
|
@@ -11,45 +11,49 @@ type TimestampInit = {
|
|
|
11
11
|
};
|
|
12
12
|
declare function createCandleRowSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
13
13
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
14
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
14
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
|
|
15
15
|
readonly tsSec: v.BigintSchema<undefined>;
|
|
16
16
|
readonly open: v.BigintSchema<undefined>;
|
|
17
17
|
readonly high: v.BigintSchema<undefined>;
|
|
18
18
|
readonly low: v.BigintSchema<undefined>;
|
|
19
19
|
readonly close: v.BigintSchema<undefined>;
|
|
20
20
|
readonly volume: v.BigintSchema<undefined>;
|
|
21
|
+
readonly quoteVolume: v.StringSchema<undefined>;
|
|
21
22
|
readonly isClosed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
22
23
|
}, undefined>, v.TransformAction<{
|
|
23
24
|
symbolId: number;
|
|
24
|
-
timeframe: DecodedEnum<"1d" | "
|
|
25
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
|
|
25
26
|
tsSec: bigint;
|
|
26
27
|
open: bigint;
|
|
27
28
|
high: bigint;
|
|
28
29
|
low: bigint;
|
|
29
30
|
close: bigint;
|
|
30
31
|
volume: bigint;
|
|
32
|
+
quoteVolume: string;
|
|
31
33
|
isClosed: boolean;
|
|
32
34
|
}, {
|
|
33
35
|
symbolId: number;
|
|
34
|
-
timeframe: DecodedEnum<"1d" | "
|
|
36
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
|
|
35
37
|
time: number;
|
|
36
38
|
open: string;
|
|
37
39
|
high: string;
|
|
38
40
|
low: string;
|
|
39
41
|
close: string;
|
|
40
42
|
volume: string;
|
|
43
|
+
quoteVolume: string;
|
|
41
44
|
isClosed: boolean;
|
|
42
45
|
}>]>;
|
|
43
46
|
declare const createCandleRowIntSchema: typeof createCandleRowSchema;
|
|
44
47
|
declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
45
48
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
46
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
49
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
|
|
47
50
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
48
51
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
49
52
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
50
53
|
readonly low: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
51
54
|
readonly close: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
52
55
|
readonly volume: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
56
|
+
readonly quoteVolume: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
53
57
|
readonly referenceTsSec: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
54
58
|
readonly referenceOpen: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
55
59
|
readonly referenceHigh: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
@@ -59,13 +63,14 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
59
63
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
60
64
|
}, undefined>, v.TransformAction<{
|
|
61
65
|
symbolId: number;
|
|
62
|
-
timeframe: DecodedEnum<"1d" | "
|
|
66
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
|
|
63
67
|
tsSec: bigint[];
|
|
64
68
|
open: bigint[];
|
|
65
69
|
high: bigint[];
|
|
66
70
|
low: bigint[];
|
|
67
71
|
close: bigint[];
|
|
68
72
|
volume: bigint[];
|
|
73
|
+
quoteVolume: string[];
|
|
69
74
|
referenceTsSec: bigint[];
|
|
70
75
|
referenceOpen: bigint[];
|
|
71
76
|
referenceHigh: bigint[];
|
|
@@ -75,13 +80,14 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
75
80
|
nextPageToken: string;
|
|
76
81
|
}, {
|
|
77
82
|
symbolId: number;
|
|
78
|
-
timeframe: DecodedEnum<"1d" | "
|
|
83
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
|
|
79
84
|
time: number[];
|
|
80
85
|
open: string[];
|
|
81
86
|
high: string[];
|
|
82
87
|
low: string[];
|
|
83
88
|
close: string[];
|
|
84
89
|
volume: string[];
|
|
90
|
+
quoteVolume: string[];
|
|
85
91
|
nextPageToken: string;
|
|
86
92
|
reference: {
|
|
87
93
|
time: number[];
|
|
@@ -94,13 +100,14 @@ declare function createCandleColumnarSchema(scales: SdkScales): v.SchemaWithPipe
|
|
|
94
100
|
}>]>;
|
|
95
101
|
declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
96
102
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
97
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "
|
|
103
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.EnumSchema<typeof Timeframe$1, undefined>, v.TransformAction<Timeframe$1, DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">>]>;
|
|
98
104
|
readonly tsSec: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
99
105
|
readonly open: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
100
106
|
readonly high: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
101
107
|
readonly low: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
102
108
|
readonly close: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
103
109
|
readonly volume: v.ArraySchema<v.BigintSchema<undefined>, undefined>;
|
|
110
|
+
readonly quoteVolume: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
104
111
|
readonly referenceTsSec: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
105
112
|
readonly referenceOpen: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
106
113
|
readonly referenceHigh: v.OptionalSchema<v.ArraySchema<v.BigintSchema<undefined>, undefined>, readonly []>;
|
|
@@ -110,13 +117,14 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
110
117
|
readonly nextPageToken: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
111
118
|
}, undefined>, v.TransformAction<{
|
|
112
119
|
symbolId: number;
|
|
113
|
-
timeframe: DecodedEnum<"1d" | "
|
|
120
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
|
|
114
121
|
tsSec: bigint[];
|
|
115
122
|
open: bigint[];
|
|
116
123
|
high: bigint[];
|
|
117
124
|
low: bigint[];
|
|
118
125
|
close: bigint[];
|
|
119
126
|
volume: bigint[];
|
|
127
|
+
quoteVolume: string[];
|
|
120
128
|
referenceTsSec: bigint[];
|
|
121
129
|
referenceOpen: bigint[];
|
|
122
130
|
referenceHigh: bigint[];
|
|
@@ -126,13 +134,14 @@ declare function createCandleColumnarIntSchema(scales: SdkScales): v.SchemaWithP
|
|
|
126
134
|
nextPageToken: string;
|
|
127
135
|
}, {
|
|
128
136
|
symbolId: number;
|
|
129
|
-
timeframe: DecodedEnum<"1d" | "
|
|
137
|
+
timeframe: DecodedEnum<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo">;
|
|
130
138
|
tsSec: number[];
|
|
131
139
|
open: string[];
|
|
132
140
|
high: string[];
|
|
133
141
|
low: string[];
|
|
134
142
|
close: string[];
|
|
135
143
|
volume: string[];
|
|
144
|
+
quoteVolume: string[];
|
|
136
145
|
nextPageToken: string;
|
|
137
146
|
reference: {
|
|
138
147
|
tsSec: number[];
|
|
@@ -149,7 +158,7 @@ type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema
|
|
|
149
158
|
type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;
|
|
150
159
|
declare function createListCandlesInputSchema(): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
151
160
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
152
|
-
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "
|
|
161
|
+
readonly timeframe: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["1s", "1m", "5m", "15m", "30m", "1h", "4h", "12h", "1d", "1w", "1mo"], undefined>, v.TransformAction<"1d" | "1s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "1w" | "1mo", Timeframe$1.SEC_1 | Timeframe$1.MIN_1 | Timeframe$1.MIN_5 | Timeframe$1.MIN_15 | Timeframe$1.MIN_30 | Timeframe$1.HOUR_1 | Timeframe$1.HOUR_4 | Timeframe$1.DAY_1 | Timeframe$1.HOUR_12 | Timeframe$1.WEEK_1 | Timeframe$1.MONTH_1>]>;
|
|
153
162
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 10000, undefined>]>, undefined>;
|
|
154
163
|
readonly includeIncomplete: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
155
164
|
readonly includeReference: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candles.schemas.d.ts","names":[],"sources":["../../../src/services/candles/candles.schemas.ts"],"mappings":";;;;;cASa,iBAAe,EAAA;KAEhB,YAAY,EAAE,mBAAmB;KAsBxC;EAAkB;EAAiB;;
|
|
1
|
+
{"version":3,"file":"candles.schemas.d.ts","names":[],"sources":["../../../src/services/candles/candles.schemas.ts"],"mappings":";;;;;cASa,iBAAe,EAAA;KAEhB,YAAY,EAAE,mBAAmB;KAsBxC;EAAkB;EAAiB;;iBAsBxB,sBAAsB,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqB1C,iCAAwB;iBAuCrB,2BAA2B,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC5C,8BAA8B,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkCnD,SAAS,EAAE,YAAY,kBAAkB;KAGzC,YAAY,EAAE,YAAY,kBAAkB;KAC5C,iBAAiB,EAAE,YAAY,kBAAkB;KAGjD,oBAAoB,EAAE,YAAY,kBAAkB;iBAyBhD,gCAA4B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIhC,kBAAkB,EAAE,WAAW,kBAAkB;KAEjD,yBAAyB,EAAE,WAAW,kBAAkB"}
|
|
@@ -28,6 +28,7 @@ const CandleRowRawSchema = v.object({
|
|
|
28
28
|
low: v.bigint(),
|
|
29
29
|
close: v.bigint(),
|
|
30
30
|
volume: v.bigint(),
|
|
31
|
+
quoteVolume: v.string(),
|
|
31
32
|
isClosed: v.optional(v.boolean(), false)
|
|
32
33
|
});
|
|
33
34
|
function createCandleRowSchema(scales) {
|
|
@@ -42,6 +43,7 @@ function createCandleRowSchema(scales) {
|
|
|
42
43
|
low: scaledToDecimalOutput(data.low, priceScale),
|
|
43
44
|
close: scaledToDecimalOutput(data.close, priceScale),
|
|
44
45
|
volume: scaledToDecimalOutput(data.volume, scales.baseQty(data.symbolId)),
|
|
46
|
+
quoteVolume: data.quoteVolume,
|
|
45
47
|
isClosed: data.isClosed
|
|
46
48
|
};
|
|
47
49
|
}));
|
|
@@ -54,6 +56,7 @@ const CandlePointSchema = v.object({
|
|
|
54
56
|
low: v.bigint(),
|
|
55
57
|
close: v.bigint(),
|
|
56
58
|
volume: v.bigint(),
|
|
59
|
+
quoteVolume: v.string(),
|
|
57
60
|
isClosed: v.optional(v.boolean(), false)
|
|
58
61
|
});
|
|
59
62
|
const CandleColumnarRawSchema = v.object({
|
|
@@ -65,6 +68,7 @@ const CandleColumnarRawSchema = v.object({
|
|
|
65
68
|
low: v.array(v.bigint()),
|
|
66
69
|
close: v.array(v.bigint()),
|
|
67
70
|
volume: v.array(v.bigint()),
|
|
71
|
+
quoteVolume: v.array(v.string()),
|
|
68
72
|
referenceTsSec: v.optional(v.array(v.bigint()), []),
|
|
69
73
|
referenceOpen: v.optional(v.array(v.bigint()), []),
|
|
70
74
|
referenceHigh: v.optional(v.array(v.bigint()), []),
|
|
@@ -91,6 +95,7 @@ function createCandleColumnarSchema(scales) {
|
|
|
91
95
|
low: scaledArrayToDecimal(d.low, priceScale),
|
|
92
96
|
close: scaledArrayToDecimal(d.close, priceScale),
|
|
93
97
|
volume: scaledArrayToDecimal(d.volume, volumeScale),
|
|
98
|
+
quoteVolume: d.quoteVolume,
|
|
94
99
|
nextPageToken: d.nextPageToken,
|
|
95
100
|
reference: hasReference ? {
|
|
96
101
|
time: referenceTsSec.map((t) => Number(t)),
|
|
@@ -117,6 +122,7 @@ function createCandleColumnarIntSchema(scales) {
|
|
|
117
122
|
low: scaledArrayToDecimal(d.low, priceScale),
|
|
118
123
|
close: scaledArrayToDecimal(d.close, priceScale),
|
|
119
124
|
volume: scaledArrayToDecimal(d.volume, volumeScale),
|
|
125
|
+
quoteVolume: d.quoteVolume,
|
|
120
126
|
nextPageToken: d.nextPageToken,
|
|
121
127
|
reference: referenceTsSec.length > 0 ? {
|
|
122
128
|
tsSec: referenceTsSec.map((t) => Number(t)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candles.schemas.js","names":["Proto.Timeframe"],"sources":["../../../src/services/candles/candles.schemas.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketdata/v1/marketdata_pb.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport * as v from \"valibot\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport { OptionalTimestampSecondsInputSchema } from \"../../shared/schemas.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { TIMEFRAMES, TimeframeCodec } from \"./candles.codecs.js\";\n\nexport const TimeframeSchema = v.picklist(TIMEFRAMES);\n\nexport type Timeframe = v.InferOutput<typeof TimeframeSchema>;\n\nfunction timeframeFromProto(value: Proto.Timeframe, schemaName: string): DecodedEnum<Timeframe> {\n return requiredEnumLabel(\n TimeframeCodec.protoToOutput,\n value,\n `CandlesService.${schemaName}`,\n \"timeframe\",\n );\n}\n\nconst TimeframeInputSchema = v.pipe(\n TimeframeSchema,\n v.transform((value) => TimeframeCodec.inputToProto[value]),\n);\n\nconst OptionalPositiveNumberSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(10_000)),\n);\n\nconst OptionalBooleanSchema = v.optional(v.boolean(), false);\n\ntype TimestampInit = { seconds: bigint; nanos: number };\n\nfunction timestampFromTsSec(tsSec: bigint): TimestampInit {\n return { seconds: tsSec, nanos: 0 };\n}\n\nconst CandleRowRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.enum(Proto.Timeframe),\n v.transform((v) => timeframeFromProto(v, \"CandleRowSchema\")),\n ),\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nexport function createCandleRowSchema(scales: SdkScales) {\n return v.pipe(\n CandleRowRawSchema,\n v.transform((data) => {\n const priceScale = scales.price();\n return {\n symbolId: data.symbolId,\n timeframe: data.timeframe,\n time: Number(data.tsSec),\n open: scaledToDecimalOutput(data.open, priceScale),\n high: scaledToDecimalOutput(data.high, priceScale),\n low: scaledToDecimalOutput(data.low, priceScale),\n close: scaledToDecimalOutput(data.close, priceScale),\n volume: scaledToDecimalOutput(data.volume, scales.baseQty(data.symbolId)),\n isClosed: data.isClosed,\n };\n }),\n );\n}\n\nexport const createCandleRowIntSchema = createCandleRowSchema;\n\nexport const CandlePointSchema = v.object({\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nconst CandleColumnarRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.enum(Proto.Timeframe),\n v.transform((v) => timeframeFromProto(v, \"CandleColumnarSchema\")),\n ),\n tsSec: v.array(v.bigint()),\n open: v.array(v.bigint()),\n high: v.array(v.bigint()),\n low: v.array(v.bigint()),\n close: v.array(v.bigint()),\n volume: v.array(v.bigint()),\n referenceTsSec: v.optional(v.array(v.bigint()), []),\n referenceOpen: v.optional(v.array(v.bigint()), []),\n referenceHigh: v.optional(v.array(v.bigint()), []),\n referenceLow: v.optional(v.array(v.bigint()), []),\n referenceClose: v.optional(v.array(v.bigint()), []),\n referenceVolume: v.optional(v.array(v.bigint()), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nfunction scaledArrayToDecimal(values: bigint[], scale: number): string[] {\n return values.map((value) => scaledToDecimalOutput(value, scale));\n}\n\nexport function createCandleColumnarSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const volumeScale = scales.baseQty(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n const hasReference = referenceTsSec.length > 0;\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n time: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n nextPageToken: d.nextPageToken,\n reference: hasReference\n ? {\n time: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.referenceOpen ?? [], priceScale),\n high: scaledArrayToDecimal(d.referenceHigh ?? [], priceScale),\n low: scaledArrayToDecimal(d.referenceLow ?? [], priceScale),\n close: scaledArrayToDecimal(d.referenceClose ?? [], priceScale),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport function createCandleColumnarIntSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const volumeScale = scales.baseQty(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n tsSec: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n nextPageToken: d.nextPageToken,\n reference:\n referenceTsSec.length > 0\n ? {\n tsSec: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.referenceOpen ?? [], priceScale),\n high: scaledArrayToDecimal(d.referenceHigh ?? [], priceScale),\n low: scaledArrayToDecimal(d.referenceLow ?? [], priceScale),\n close: scaledArrayToDecimal(d.referenceClose ?? [], priceScale),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport type Candle = v.InferOutput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleInput = v.InferInput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleIntInput = v.InferInput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleInt = v.InferOutput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarInput = v.InferInput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarIntInput = v.InferInput<ReturnType<typeof createCandleColumnarIntSchema>>;\nexport type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;\n\nexport const ListCandlesInputSchema = v.pipe(\n v.object({\n symbolId: SymbolIdInputSchema,\n timeframe: TimeframeInputSchema,\n limit: OptionalPositiveNumberSchema,\n includeIncomplete: v.optional(v.boolean(), false),\n includeReference: OptionalBooleanSchema,\n startTsSec: OptionalTimestampSecondsInputSchema,\n endTsSec: OptionalTimestampSecondsInputSchema,\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform((d) => ({\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n limit: d.limit,\n includeIncomplete: d.includeIncomplete,\n includeReference: d.includeReference,\n startTime: d.startTsSec != null ? timestampFromTsSec(d.startTsSec) : undefined,\n endTime: d.endTsSec != null ? timestampFromTsSec(d.endTsSec) : undefined,\n pageToken: d.pageToken,\n })),\n);\n\nexport function createListCandlesInputSchema() {\n return ListCandlesInputSchema;\n}\n\nexport type GetCandlesInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\nexport const createGetCandlesColumnsInputSchema = createListCandlesInputSchema;\nexport type GetCandlesColumnsInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\n"],"mappings":";;;;;;;;AASA,MAAa,kBAAkB,EAAE,SAAS,UAAU;AAIpD,SAAS,mBAAmB,OAAwB,YAA4C;CAC5F,OAAO,kBACH,eAAe,eACf,OACA,kBAAkB,cAClB,WACJ;AACJ;AAEA,MAAM,uBAAuB,EAAE,KAC3B,iBACA,EAAE,WAAW,UAAU,eAAe,aAAa,MAAM,CAC7D;AAEA,MAAM,+BAA+B,EAAE,SACnC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAM,CAAC,CACpE;AAEA,MAAM,wBAAwB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAI3D,SAAS,mBAAmB,OAA8B;CACtD,OAA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AAE,iBAAiB,CAAC,GAAG,UAAU;IAC5D,KAAK,qBAAqB,EAAE,gBAAgB,CAAC,GAAG,UAAU;IAC1D,OAAO,qBAAqB,EAAE,kBAAkB,CAAC,GAAG,UAAU;IAC9D,QAAQ,qBAAqB,EAAE,mBAAmB,CAAC,GAAG,WAAW;GACrE,IACA;EACd;CACJ,CAAC,CACL;AACJ;AAWA,MAAa,yBAAyB,EAAE,KACpC,EAAE,OAAO;CACL,UAAU;CACV,WAAW;CACX,OAAO;CACP,mBAAmB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;CAChD,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AAC1D,CAAC,GACD,EAAE,WAAW,OAAO;CAChB,UAAU,EAAE;CACZ,WAAW,EAAE;CACb,OAAO,EAAE;CACT,mBAAmB,EAAE;CACrB,kBAAkB,EAAE;CACpB,WAAW,EAAE,cAAc,OAAO,mBAAmB,EAAE,UAAU,IAAI,KAAA;CACrE,SAAS,EAAE,YAAY,OAAO,mBAAmB,EAAE,QAAQ,IAAI,KAAA;CAC/D,WAAW,EAAE;AACjB,EAAE,CACN"}
|
|
1
|
+
{"version":3,"file":"candles.schemas.js","names":["Proto.Timeframe"],"sources":["../../../src/services/candles/candles.schemas.ts"],"sourcesContent":["import * as Proto from \"../../gen/marketdata/v1/marketdata_pb.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport * as v from \"valibot\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport { OptionalTimestampSecondsInputSchema } from \"../../shared/schemas.js\";\nimport { requiredEnumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { TIMEFRAMES, TimeframeCodec } from \"./candles.codecs.js\";\n\nexport const TimeframeSchema = v.picklist(TIMEFRAMES);\n\nexport type Timeframe = v.InferOutput<typeof TimeframeSchema>;\n\nfunction timeframeFromProto(value: Proto.Timeframe, schemaName: string): DecodedEnum<Timeframe> {\n return requiredEnumLabel(\n TimeframeCodec.protoToOutput,\n value,\n `CandlesService.${schemaName}`,\n \"timeframe\",\n );\n}\n\nconst TimeframeInputSchema = v.pipe(\n TimeframeSchema,\n v.transform((value) => TimeframeCodec.inputToProto[value]),\n);\n\nconst OptionalPositiveNumberSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(10_000)),\n);\n\nconst OptionalBooleanSchema = v.optional(v.boolean(), false);\n\ntype TimestampInit = { seconds: bigint; nanos: number };\n\nfunction timestampFromTsSec(tsSec: bigint): TimestampInit {\n return { seconds: tsSec, nanos: 0 };\n}\n\nconst CandleRowRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.enum(Proto.Timeframe),\n v.transform((v) => timeframeFromProto(v, \"CandleRowSchema\")),\n ),\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n quoteVolume: v.string(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nexport function createCandleRowSchema(scales: SdkScales) {\n return v.pipe(\n CandleRowRawSchema,\n v.transform((data) => {\n const priceScale = scales.price();\n return {\n symbolId: data.symbolId,\n timeframe: data.timeframe,\n time: Number(data.tsSec),\n open: scaledToDecimalOutput(data.open, priceScale),\n high: scaledToDecimalOutput(data.high, priceScale),\n low: scaledToDecimalOutput(data.low, priceScale),\n close: scaledToDecimalOutput(data.close, priceScale),\n volume: scaledToDecimalOutput(data.volume, scales.baseQty(data.symbolId)),\n quoteVolume: data.quoteVolume,\n isClosed: data.isClosed,\n };\n }),\n );\n}\n\nexport const createCandleRowIntSchema = createCandleRowSchema;\n\nexport const CandlePointSchema = v.object({\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n quoteVolume: v.string(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nconst CandleColumnarRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.enum(Proto.Timeframe),\n v.transform((v) => timeframeFromProto(v, \"CandleColumnarSchema\")),\n ),\n tsSec: v.array(v.bigint()),\n open: v.array(v.bigint()),\n high: v.array(v.bigint()),\n low: v.array(v.bigint()),\n close: v.array(v.bigint()),\n volume: v.array(v.bigint()),\n quoteVolume: v.array(v.string()),\n referenceTsSec: v.optional(v.array(v.bigint()), []),\n referenceOpen: v.optional(v.array(v.bigint()), []),\n referenceHigh: v.optional(v.array(v.bigint()), []),\n referenceLow: v.optional(v.array(v.bigint()), []),\n referenceClose: v.optional(v.array(v.bigint()), []),\n referenceVolume: v.optional(v.array(v.bigint()), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nfunction scaledArrayToDecimal(values: bigint[], scale: number): string[] {\n return values.map((value) => scaledToDecimalOutput(value, scale));\n}\n\nexport function createCandleColumnarSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const volumeScale = scales.baseQty(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n const hasReference = referenceTsSec.length > 0;\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n time: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n quoteVolume: d.quoteVolume,\n nextPageToken: d.nextPageToken,\n reference: hasReference\n ? {\n time: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.referenceOpen ?? [], priceScale),\n high: scaledArrayToDecimal(d.referenceHigh ?? [], priceScale),\n low: scaledArrayToDecimal(d.referenceLow ?? [], priceScale),\n close: scaledArrayToDecimal(d.referenceClose ?? [], priceScale),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport function createCandleColumnarIntSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const volumeScale = scales.baseQty(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n tsSec: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n quoteVolume: d.quoteVolume,\n nextPageToken: d.nextPageToken,\n reference:\n referenceTsSec.length > 0\n ? {\n tsSec: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.referenceOpen ?? [], priceScale),\n high: scaledArrayToDecimal(d.referenceHigh ?? [], priceScale),\n low: scaledArrayToDecimal(d.referenceLow ?? [], priceScale),\n close: scaledArrayToDecimal(d.referenceClose ?? [], priceScale),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport type Candle = v.InferOutput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleInput = v.InferInput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleIntInput = v.InferInput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleInt = v.InferOutput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarInput = v.InferInput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarIntInput = v.InferInput<ReturnType<typeof createCandleColumnarIntSchema>>;\nexport type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;\n\nexport const ListCandlesInputSchema = v.pipe(\n v.object({\n symbolId: SymbolIdInputSchema,\n timeframe: TimeframeInputSchema,\n limit: OptionalPositiveNumberSchema,\n includeIncomplete: v.optional(v.boolean(), false),\n includeReference: OptionalBooleanSchema,\n startTsSec: OptionalTimestampSecondsInputSchema,\n endTsSec: OptionalTimestampSecondsInputSchema,\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform((d) => ({\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n limit: d.limit,\n includeIncomplete: d.includeIncomplete,\n includeReference: d.includeReference,\n startTime: d.startTsSec != null ? timestampFromTsSec(d.startTsSec) : undefined,\n endTime: d.endTsSec != null ? timestampFromTsSec(d.endTsSec) : undefined,\n pageToken: d.pageToken,\n })),\n);\n\nexport function createListCandlesInputSchema() {\n return ListCandlesInputSchema;\n}\n\nexport type GetCandlesInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\nexport const createGetCandlesColumnsInputSchema = createListCandlesInputSchema;\nexport type GetCandlesColumnsInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\n"],"mappings":";;;;;;;;AASA,MAAa,kBAAkB,EAAE,SAAS,UAAU;AAIpD,SAAS,mBAAmB,OAAwB,YAA4C;CAC5F,OAAO,kBACH,eAAe,eACf,OACA,kBAAkB,cAClB,WACJ;AACJ;AAEA,MAAM,uBAAuB,EAAE,KAC3B,iBACA,EAAE,WAAW,UAAU,eAAe,aAAa,MAAM,CAC7D;AAEA,MAAM,+BAA+B,EAAE,SACnC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAM,CAAC,CACpE;AAEA,MAAM,wBAAwB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAI3D,SAAS,mBAAmB,OAA8B;CACtD,OAAO;EAAE,SAAS;EAAO,OAAO;CAAE;AACtC;AAEA,MAAM,qBAAqB,EAAE,OAAO;CAChC,UAAU,EAA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,EAAE,iBAAiB,CAAC,GAAG,UAAU;IAC5D,MAAM,qBAAqB,EAAE,iBAAiB,CAAC,GAAG,UAAU;IAC5D,KAAK,qBAAqB,EAAE,gBAAgB,CAAC,GAAG,UAAU;IAC1D,OAAO,qBAAqB,EAAE,kBAAkB,CAAC,GAAG,UAAU;IAC9D,QAAQ,qBAAqB,EAAE,mBAAmB,CAAC,GAAG,WAAW;GACrE,IACA;EACd;CACJ,CAAC,CACL;AACJ;AAWA,MAAa,yBAAyB,EAAE,KACpC,EAAE,OAAO;CACL,UAAU;CACV,WAAW;CACX,OAAO;CACP,mBAAmB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;CAChD,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AAC1D,CAAC,GACD,EAAE,WAAW,OAAO;CAChB,UAAU,EAAE;CACZ,WAAW,EAAE;CACb,OAAO,EAAE;CACT,mBAAmB,EAAE;CACrB,kBAAkB,EAAE;CACpB,WAAW,EAAE,cAAc,OAAO,mBAAmB,EAAE,UAAU,IAAI,KAAA;CACrE,SAAS,EAAE,YAAY,OAAO,mBAAmB,EAAE,QAAQ,IAAI,KAAA;CAC/D,WAAW,EAAE;AACjB,EAAE,CACN"}
|
|
@@ -31,7 +31,7 @@ declare function createListDepositAddressesInputSchema(): v.SchemaWithPipe<reado
|
|
|
31
31
|
}>]>;
|
|
32
32
|
type ListDepositAddressesInput = v.InferInput<ReturnType<typeof createListDepositAddressesInputSchema>>;
|
|
33
33
|
declare const DepositAddressSchema: v.ObjectSchema<{
|
|
34
|
-
readonly chainId: v.
|
|
34
|
+
readonly chainId: v.NumberSchema<undefined>;
|
|
35
35
|
readonly depositAddress: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
36
36
|
}, undefined>;
|
|
37
37
|
type DepositAddress = v.InferOutput<typeof DepositAddressSchema>;
|
|
@@ -17,7 +17,7 @@ const ListDepositAddressesInputSchema = v.pipe(v.strictObject({
|
|
|
17
17
|
subaccountId: accountScopeToSubaccountId(account)
|
|
18
18
|
})));
|
|
19
19
|
const DepositAddressSchema = v.object({
|
|
20
|
-
chainId:
|
|
20
|
+
chainId: v.number(),
|
|
21
21
|
depositAddress: v.pipe(v.string(), v.trim(), v.minLength(1))
|
|
22
22
|
});
|
|
23
23
|
const DepositAddressesSchema = v.array(DepositAddressSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deposit.schemas.js","names":[],"sources":["../../../src/services/deposit/deposit.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\n\nexport const CreateDepositAddressInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n chainId: PositiveUint32InputSchema,\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport function createCreateDepositAddressInputSchema() {\n return CreateDepositAddressInputSchema;\n}\n\nexport type CreateDepositAddressInput = v.InferInput<\n ReturnType<typeof createCreateDepositAddressInputSchema>\n>;\nexport type CreateDepositAddressRequest = v.InferOutput<\n ReturnType<typeof createCreateDepositAddressInputSchema>\n>;\n\nexport const ListDepositAddressesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n chainId: v.optional(PositiveUint32InputSchema),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport function createListDepositAddressesInputSchema() {\n return ListDepositAddressesInputSchema;\n}\n\nexport type ListDepositAddressesInput = v.InferInput<\n ReturnType<typeof createListDepositAddressesInputSchema>\n>;\nexport type ListDepositAddressesRequest = v.InferOutput<\n ReturnType<typeof createListDepositAddressesInputSchema>\n>;\n\nexport const DepositAddressSchema = v.object({\n chainId:
|
|
1
|
+
{"version":3,"file":"deposit.schemas.js","names":[],"sources":["../../../src/services/deposit/deposit.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\n\nexport const CreateDepositAddressInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n chainId: PositiveUint32InputSchema,\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport function createCreateDepositAddressInputSchema() {\n return CreateDepositAddressInputSchema;\n}\n\nexport type CreateDepositAddressInput = v.InferInput<\n ReturnType<typeof createCreateDepositAddressInputSchema>\n>;\nexport type CreateDepositAddressRequest = v.InferOutput<\n ReturnType<typeof createCreateDepositAddressInputSchema>\n>;\n\nexport const ListDepositAddressesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n chainId: v.optional(PositiveUint32InputSchema),\n }),\n v.transform(({ account, ...input }) => ({\n ...input,\n subaccountId: accountScopeToSubaccountId(account),\n })),\n);\n\nexport function createListDepositAddressesInputSchema() {\n return ListDepositAddressesInputSchema;\n}\n\nexport type ListDepositAddressesInput = v.InferInput<\n ReturnType<typeof createListDepositAddressesInputSchema>\n>;\nexport type ListDepositAddressesRequest = v.InferOutput<\n ReturnType<typeof createListDepositAddressesInputSchema>\n>;\n\nexport const DepositAddressSchema = v.object({\n chainId: v.number(),\n depositAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n});\n\nexport type DepositAddress = v.InferOutput<typeof DepositAddressSchema>;\n\nexport const DepositAddressesSchema = v.array(DepositAddressSchema);\n"],"mappings":";;;;AAOA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;CACX,GAAG;CACH,SAAS;AACb,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,GAAG,aAAa;CACpC,GAAG;CACH,cAAc,2BAA2B,OAAO;AACpD,EAAE,CACN;AAaA,MAAa,kCAAkC,EAAE,KAC7C,EAAE,aAAa;CACX,GAAG;CACH,SAAS,EAAE,SAAS,yBAAyB;AACjD,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,GAAG,aAAa;CACpC,GAAG;CACH,cAAc,2BAA2B,OAAO;AACpD,EAAE,CACN;AAaA,MAAa,uBAAuB,EAAE,OAAO;CACzC,SAAS,EAAE,OAAO;CAClB,gBAAgB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAC/D,CAAC;AAID,MAAa,yBAAyB,EAAE,MAAM,oBAAoB"}
|
|
@@ -16,7 +16,7 @@ declare const GetSpotFeeRatesInputSchema: v.SchemaWithPipe<readonly [v.StrictObj
|
|
|
16
16
|
}>]>;
|
|
17
17
|
type GetSpotFeeRatesInput = v.InferInput<typeof GetSpotFeeRatesInputSchema>;
|
|
18
18
|
declare const SpotFeeRateSchema: v.ObjectSchema<{
|
|
19
|
-
readonly symbolId: v.
|
|
19
|
+
readonly symbolId: v.NumberSchema<undefined>;
|
|
20
20
|
readonly makerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
21
21
|
readonly takerFeeRatePercent: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
22
22
|
readonly vipTier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -12,7 +12,7 @@ const GetSpotFeeRatesInputSchema = v.pipe(v.strictObject({
|
|
|
12
12
|
symbolId: symbolIds
|
|
13
13
|
})));
|
|
14
14
|
const SpotFeeRateSchema = v.object({
|
|
15
|
-
symbolId:
|
|
15
|
+
symbolId: v.number(),
|
|
16
16
|
makerFeeRatePercent: DecimalStringSchema,
|
|
17
17
|
takerFeeRatePercent: DecimalStringSchema,
|
|
18
18
|
vipTier: VipTierNumberSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.schemas.js","names":[],"sources":["../../../src/services/fees/fees.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport { VipTierNumberSchema } from \"../vip/vip.schemas.js\";\n\nconst DecimalStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const GetSpotFeeRatesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolIds: v.optional(\n v.pipe(\n v.array(SymbolIdInputSchema),\n v.transform((ids) => [...new Set(ids)]),\n v.maxLength(100),\n ),\n [],\n ),\n }),\n v.transform(({ account, symbolIds }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n symbolId: symbolIds,\n })),\n);\n\nexport type GetSpotFeeRatesInput = v.InferInput<typeof GetSpotFeeRatesInputSchema>;\nexport type GetSpotFeeRatesRequest = v.InferOutput<typeof GetSpotFeeRatesInputSchema>;\n\nexport const SpotFeeRateSchema = v.object({\n symbolId:
|
|
1
|
+
{"version":3,"file":"fees.schemas.js","names":[],"sources":["../../../src/services/fees/fees.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport { VipTierNumberSchema } from \"../vip/vip.schemas.js\";\n\nconst DecimalStringSchema = v.pipe(v.string(), v.trim(), v.minLength(1));\n\nexport const GetSpotFeeRatesInputSchema = v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n symbolIds: v.optional(\n v.pipe(\n v.array(SymbolIdInputSchema),\n v.transform((ids) => [...new Set(ids)]),\n v.maxLength(100),\n ),\n [],\n ),\n }),\n v.transform(({ account, symbolIds }) => ({\n subaccountId: accountScopeToSubaccountId(account),\n symbolId: symbolIds,\n })),\n);\n\nexport type GetSpotFeeRatesInput = v.InferInput<typeof GetSpotFeeRatesInputSchema>;\nexport type GetSpotFeeRatesRequest = v.InferOutput<typeof GetSpotFeeRatesInputSchema>;\n\nexport const SpotFeeRateSchema = v.object({\n symbolId: v.number(),\n makerFeeRatePercent: DecimalStringSchema,\n takerFeeRatePercent: DecimalStringSchema,\n vipTier: VipTierNumberSchema,\n});\n\nexport type SpotFeeRate = v.InferOutput<typeof SpotFeeRateSchema>;\n\nexport const SpotFeeRatesSchema = v.array(SpotFeeRateSchema);\n"],"mappings":";;;;;AAQA,MAAM,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,UAAU,CAAC,CAAC;AAEvE,MAAa,6BAA6B,EAAE,KACxC,EAAE,aAAa;CACX,GAAG;CACH,WAAW,EAAE,SACT,EAAE,KACE,EAAE,MAAM,mBAAmB,GAC3B,EAAE,WAAW,QAAQ,CAAC,GAAG,IAAI,IAAI,GAAG,CAAC,CAAC,GACtC,EAAE,UAAU,GAAG,CACnB,GACA,CAAC,CACL;AACJ,CAAC,GACD,EAAE,WAAW,EAAE,SAAS,iBAAiB;CACrC,cAAc,2BAA2B,OAAO;CAChD,UAAU;AACd,EAAE,CACN;AAKA,MAAa,oBAAoB,EAAE,OAAO;CACtC,UAAU,EAAE,OAAO;CACnB,qBAAqB;CACrB,qBAAqB;CACrB,SAAS;AACb,CAAC;AAID,MAAa,qBAAqB,EAAE,MAAM,iBAAiB"}
|