@polyester/sdk 0.27.1 → 0.27.3
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 +16 -0
- package/dist/catalogs/readers.js +6 -6
- package/dist/catalogs/readers.js.map +1 -1
- package/dist/catalogs/snapshot-validation.js +3 -1
- package/dist/catalogs/snapshot-validation.js.map +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +3 -3
- package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
- package/dist/gen/marketdata/v1/heatmap_pb.d.ts +6 -6
- package/dist/gen/marketdata/v1/heatmap_pb.js.map +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +48 -28
- 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 +11 -10
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts.map +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.js +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.js.map +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +38 -24
- package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_pb.js +3 -3
- package/dist/gen/orders/v1/orders_pb.js.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +17 -10
- package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +3 -3
- package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +40 -26
- package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
- package/dist/gen/triggers/v1/triggers_pb.js +7 -1
- package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
- package/dist/services/candles/candles.schemas.d.ts.map +1 -1
- package/dist/services/candles/candles.schemas.js +13 -11
- package/dist/services/candles/candles.schemas.js.map +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/market-data/market-data.schemas.js +14 -2
- package/dist/services/market-data/market-data.schemas.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.js +2 -1
- package/dist/services/market-overview/market-overview.schemas.js.map +1 -1
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +17 -0
- package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-batch.schemas.js +3 -1
- package/dist/services/orders/orders-batch.schemas.js.map +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/orders/orders.d.ts +4 -4
- package/dist/services/orders/orders.js +4 -4
- package/dist/services/orders/orders.js.map +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +4 -4
- package/dist/services/triggers/triggers-output.schemas.d.ts +22 -18
- package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +4 -2
- package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
- package/dist/services/triggers/triggers.codecs.js +6 -3
- package/dist/services/triggers/triggers.codecs.js.map +1 -1
- package/dist/shared/catalog-config.d.ts +4 -0
- package/dist/shared/catalog-config.d.ts.map +1 -1
- package/dist/shared/catalog-config.js.map +1 -1
- package/dist/shared/decimal-surface.d.ts +4 -0
- package/dist/shared/decimal-surface.d.ts.map +1 -1
- package/dist/shared/decimal-surface.js +6 -1
- package/dist/shared/decimal-surface.js.map +1 -1
- package/dist/utils/numbers.js.map +1 -1
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.codecs.js","names":[],"sources":["../../../src/services/triggers/triggers.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/triggers/v1/triggers_pb.js\";\nimport * as ProtoOrders from \"../../gen/orders/v1/orders_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\nexport {\n FEE_ASSET_VALUES,\n FeeAssetCodec,\n type FeeAssetValue,\n ORDER_SIDE_VALUES as TRIGGER_SIDE_VALUES,\n ORDER_TYPE_VALUES,\n OrderSideCodec as TriggerSideCodec,\n type OrderSideValue as TriggerSideValue,\n OrderTypeCodec,\n type OrderTypeValue,\n SELF_TRADE_PREVENTION_MODE_VALUES,\n SelfTradePreventionModeCodec,\n type SelfTradePreventionModeValue,\n TIME_IN_FORCE_OUTPUT_VALUES,\n TIME_IN_FORCE_VALUES,\n TimeInForceCodec,\n type TimeInForceOutputValue,\n type TimeInForceValue,\n TRIGGER_PRICE_SOURCE_VALUES,\n TriggerPriceSourceCodec,\n type TriggerPriceSourceValue,\n} from \"../orders/order-enums.codecs.js\";\n\nexport const TRIGGER_TYPE_VALUES = [\n \"stop_loss\",\n \"take_profit\",\n \"trailing_stop\",\n \"twap\",\n \"ladder\",\n] as const;\nexport type TriggerTypeValue = (typeof TRIGGER_TYPE_VALUES)[number];\n\nexport const TRIGGER_TYPE_LABEL_VALUES = TRIGGER_TYPE_VALUES;\nexport type TriggerTypeLabelValue = (typeof TRIGGER_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_STATUS_FILTER_VALUES = [\n \"created\",\n \"armed\",\n \"running\",\n \"completed\",\n \"cancelled\",\n \"failed\",\n \"paused\",\n] as const;\nexport type TriggerStatusFilterValue = (typeof TRIGGER_STATUS_FILTER_VALUES)[number];\n\nexport const TRIGGER_STATUS_LABEL_VALUES = TRIGGER_STATUS_FILTER_VALUES;\nexport type TriggerStatusLabelValue = (typeof TRIGGER_STATUS_LABEL_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_VALUES = [\"fired\", \"canceled\", \"updated\", \"failed\"] as const;\nexport type TriggerEventTypeValue = (typeof TRIGGER_EVENT_TYPE_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_LABEL_VALUES = TRIGGER_EVENT_TYPE_VALUES;\nexport type TriggerEventTypeLabelValue = (typeof TRIGGER_EVENT_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_CANCEL_REASON_LABEL_VALUES = [\n \"user_request\",\n \"oco\",\n \"parent_canceled_no_fill\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerCancelReasonLabelValue = (typeof TRIGGER_CANCEL_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_FAILURE_REASON_LABEL_VALUES = [\n \"unknown_symbol\",\n \"pair_disabled\",\n \"min_notional\",\n \"tick_size\",\n \"insufficient_funds\",\n \"risk_limit\",\n \"duplicate_client_id\",\n \"market_halted\",\n \"engine_busy\",\n \"account_unknown\",\n \"order_unknown\",\n \"post_only_cross\",\n \"reduce_only_blocked\",\n \"price_band_violation\",\n \"market_cap_violation\",\n \"empty_book\",\n \"fok_insufficient_liquidity\",\n \"fee_asset_not_allowed\",\n \"market_price_unavailable\",\n \"stale_quote\",\n \"min_quantity\",\n \"step_size\",\n \"invalid_sizing\",\n \"max_quote_debit_too_small\",\n \"fee_ceiling_exceeded\",\n \"trigger_price_invalid\",\n \"trigger_price_source_unsupported\",\n \"trailing_distance_invalid\",\n \"modification_requires_replace\",\n \"order_already_terminal\",\n \"conflict_idempotency_key_reuse\",\n \"rate_limited\",\n \"policy_spot_trade_deny\",\n \"policy_market_deny\",\n \"policy_max_notional\",\n \"policy_max_open_orders\",\n \"policy_trading_halted\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerFailureReasonLabelValue = (typeof TRIGGER_FAILURE_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_DIRECTION_VALUES = [\"above\", \"below\"] as const;\nexport type TriggerDirectionValue = (typeof TRIGGER_DIRECTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_VALUES = [\"linear\"] as const;\nexport type LadderDistributionValue = (typeof LADDER_DISTRIBUTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_LABEL_VALUES = [\n \"linear\",\n \"geometric\",\n \"weighted_favorable\",\n] as const;\nexport type LadderDistributionLabelValue = (typeof LADDER_DISTRIBUTION_LABEL_VALUES)[number];\n\nexport const TriggerTypeCodec = {\n inputToProto: {\n stop_loss: Proto.TriggerType.STOP_LOSS,\n take_profit: Proto.TriggerType.TAKE_PROFIT,\n trailing_stop: Proto.TriggerType.TRAILING_STOP,\n twap: Proto.TriggerType.TWAP,\n ladder: Proto.TriggerType.LADDER,\n } satisfies InputToProto<TriggerTypeValue, Proto.TriggerType>,\n protoToOutput: {\n [Proto.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerType.STOP_LOSS]: \"stop_loss\",\n [Proto.TriggerType.TAKE_PROFIT]: \"take_profit\",\n [Proto.TriggerType.TRAILING_STOP]: \"trailing_stop\",\n [Proto.TriggerType.TWAP]: \"twap\",\n [Proto.TriggerType.LADDER]: \"ladder\",\n } satisfies ProtoToOutput<Proto.TriggerType, TriggerTypeLabelValue>,\n} as const;\n\nexport const TriggerStatusCodec = {\n inputToProto: {\n created: Proto.TriggerStatus.STATUS_CREATED,\n armed: Proto.TriggerStatus.STATUS_ARMED,\n running: Proto.TriggerStatus.STATUS_RUNNING,\n completed: Proto.TriggerStatus.STATUS_COMPLETED,\n cancelled: Proto.TriggerStatus.STATUS_CANCELED,\n failed: Proto.TriggerStatus.STATUS_FAILED,\n paused: Proto.TriggerStatus.STATUS_PAUSED,\n } satisfies InputToProto<TriggerStatusFilterValue, Proto.TriggerStatus>,\n protoToOutput: {\n [Proto.TriggerStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerStatus.STATUS_CREATED]: \"created\",\n [Proto.TriggerStatus.STATUS_ARMED]: \"armed\",\n [Proto.TriggerStatus.STATUS_RUNNING]: \"running\",\n [Proto.TriggerStatus.STATUS_COMPLETED]: \"completed\",\n [Proto.TriggerStatus.STATUS_CANCELED]: \"cancelled\",\n [Proto.TriggerStatus.STATUS_FAILED]: \"failed\",\n [Proto.TriggerStatus.STATUS_PAUSED]: \"paused\",\n } satisfies ProtoToOutput<Proto.TriggerStatus, TriggerStatusLabelValue>,\n} as const;\n\nexport const TriggerEventTypeCodec = {\n inputToProto: {\n fired: Proto.TriggerEventType.EVENT_FIRED,\n canceled: Proto.TriggerEventType.EVENT_CANCELED,\n updated: Proto.TriggerEventType.EVENT_UPDATED,\n failed: Proto.TriggerEventType.EVENT_FAILED,\n } satisfies InputToProto<TriggerEventTypeValue, Proto.TriggerEventType>,\n protoToOutput: {\n [Proto.TriggerEventType.EVENT_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerEventType.EVENT_FIRED]: \"fired\",\n [Proto.TriggerEventType.EVENT_CANCELED]: \"canceled\",\n [Proto.TriggerEventType.EVENT_UPDATED]: \"updated\",\n [Proto.TriggerEventType.EVENT_FAILED]: \"failed\",\n } satisfies ProtoToOutput<Proto.TriggerEventType, TriggerEventTypeLabelValue>,\n} as const;\n\nexport const TriggerCancelReasonCodec = {\n protoToOutput: {\n [Proto.TriggerCancelReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerCancelReason.USER_REQUEST]: \"user_request\",\n [Proto.TriggerCancelReason.OCO]: \"oco\",\n [Proto.TriggerCancelReason.PARENT_CANCELED_NO_FILL]: \"parent_canceled_no_fill\",\n [Proto.TriggerCancelReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerCancelReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerCancelReason, TriggerCancelReasonLabelValue>,\n} as const;\n\nexport const TriggerFailureReasonCodec = {\n protoToOutput: {\n [Proto.TriggerFailureReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerFailureReason.UNKNOWN_SYMBOL]: \"unknown_symbol\",\n [Proto.TriggerFailureReason.PAIR_DISABLED]: \"pair_disabled\",\n [Proto.TriggerFailureReason.MIN_NOTIONAL]: \"min_notional\",\n [Proto.TriggerFailureReason.TICK_SIZE]: \"tick_size\",\n [Proto.TriggerFailureReason.INSUFFICIENT_FUNDS]: \"insufficient_funds\",\n [Proto.TriggerFailureReason.RISK_LIMIT]: \"risk_limit\",\n [Proto.TriggerFailureReason.DUPLICATE_CLIENT_ID]: \"duplicate_client_id\",\n [Proto.TriggerFailureReason.MARKET_HALTED]: \"market_halted\",\n [Proto.TriggerFailureReason.ENGINE_BUSY]: \"engine_busy\",\n [Proto.TriggerFailureReason.ACCOUNT_UNKNOWN]: \"account_unknown\",\n [Proto.TriggerFailureReason.ORDER_UNKNOWN]: \"order_unknown\",\n [Proto.TriggerFailureReason.POST_ONLY_CROSS]: \"post_only_cross\",\n [Proto.TriggerFailureReason.REDUCE_ONLY_BLOCKED]: \"reduce_only_blocked\",\n [Proto.TriggerFailureReason.PRICE_BAND_VIOLATION]: \"price_band_violation\",\n [Proto.TriggerFailureReason.MARKET_CAP_VIOLATION]: \"market_cap_violation\",\n [Proto.TriggerFailureReason.EMPTY_BOOK]: \"empty_book\",\n [Proto.TriggerFailureReason.FOK_INSUFFICIENT_LIQUIDITY]: \"fok_insufficient_liquidity\",\n [Proto.TriggerFailureReason.FEE_ASSET_NOT_ALLOWED]: \"fee_asset_not_allowed\",\n [Proto.TriggerFailureReason.MARKET_PRICE_UNAVAILABLE]: \"market_price_unavailable\",\n [Proto.TriggerFailureReason.STALE_QUOTE]: \"stale_quote\",\n [Proto.TriggerFailureReason.MIN_QUANTITY]: \"min_quantity\",\n [Proto.TriggerFailureReason.STEP_SIZE]: \"step_size\",\n [Proto.TriggerFailureReason.INVALID_SIZING]: \"invalid_sizing\",\n [Proto.TriggerFailureReason.MAX_QUOTE_DEBIT_TOO_SMALL]: \"max_quote_debit_too_small\",\n [Proto.TriggerFailureReason.FEE_CEILING_EXCEEDED]: \"fee_ceiling_exceeded\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_INVALID]: \"trigger_price_invalid\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_SOURCE_UNSUPPORTED]:\n \"trigger_price_source_unsupported\",\n [Proto.TriggerFailureReason.TRAILING_DISTANCE_INVALID]: \"trailing_distance_invalid\",\n [Proto.TriggerFailureReason.MODIFICATION_REQUIRES_REPLACE]: \"modification_requires_replace\",\n [Proto.TriggerFailureReason.ORDER_ALREADY_TERMINAL]: \"order_already_terminal\",\n [Proto.TriggerFailureReason.CONFLICT_IDEMPOTENCY_KEY_REUSE]:\n \"conflict_idempotency_key_reuse\",\n [Proto.TriggerFailureReason.RATE_LIMITED]: \"rate_limited\",\n [Proto.TriggerFailureReason.POLICY_SPOT_TRADE_DENY]: \"policy_spot_trade_deny\",\n [Proto.TriggerFailureReason.POLICY_MARKET_DENY]: \"policy_market_deny\",\n [Proto.TriggerFailureReason.POLICY_MAX_NOTIONAL]: \"policy_max_notional\",\n [Proto.TriggerFailureReason.POLICY_MAX_OPEN_ORDERS]: \"policy_max_open_orders\",\n [Proto.TriggerFailureReason.POLICY_TRADING_HALTED]: \"policy_trading_halted\",\n [Proto.TriggerFailureReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerFailureReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerFailureReason, TriggerFailureReasonLabelValue>,\n} as const;\n\nexport const TriggerDirectionCodec = {\n inputToProto: {\n above: ProtoOrders.TriggerDirection.ABOVE,\n below: ProtoOrders.TriggerDirection.BELOW,\n } satisfies InputToProto<TriggerDirectionValue, ProtoOrders.TriggerDirection>,\n protoToOutput: {\n [ProtoOrders.TriggerDirection.TRIGGER_DIRECTION_UNSPECIFIED]: \"unspecified\",\n [ProtoOrders.TriggerDirection.ABOVE]: \"above\",\n [ProtoOrders.TriggerDirection.BELOW]: \"below\",\n } satisfies ProtoToOutput<ProtoOrders.TriggerDirection, TriggerDirectionValue>,\n} as const;\n\nexport const LadderDistributionCodec = {\n inputToProto: {\n linear: Proto.LadderDistribution.LINEAR,\n } satisfies InputToProto<LadderDistributionValue, Proto.LadderDistribution>,\n protoToOutput: {\n [Proto.LadderDistribution.LADDER_DISTRIBUTION_UNSPECIFIED]: \"unspecified\",\n [Proto.LadderDistribution.LINEAR]: \"linear\",\n [Proto.LadderDistribution.GEOMETRIC]: \"geometric\",\n [Proto.LadderDistribution.WEIGHTED_FAVORABLE]: \"weighted_favorable\",\n } satisfies ProtoToOutput<Proto.LadderDistribution, LadderDistributionLabelValue>,\n} as const;\n"],"mappings":";;;;AA0BA,MAAa,sBAAsB;CAC/B;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,4BAA4B;CAAC;CAAS;CAAY;CAAW;AAAQ;AAuElF,MAAa,mBAAmB;CAC5B,cAAc;EACV,WAAA;EACA,aAAA;EACA,eAAA;EACA,MAAA;EACA,QAAA;CACJ;CACA,eAAe;GACmC,IAAA;GACf,IAAA;GACE,IAAA;GACE,IAAA;GACT,IAAA;GACE,IAAA;CAChC;AACJ;AAEA,MAAa,qBAAqB;CAC9B,cAAc;EACV,SAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;CACJ;CACA,eAAe;GAC+B,IAAA;GACJ,IAAA;GACF,IAAA;GACE,IAAA;GACE,IAAA;GACD,IAAA;GACF,IAAA;GACA,IAAA;CACzC;AACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,UAAA;EACA,SAAA;EACA,QAAA;CACJ;CACA,eAAe;GACiC,IAAA;GACN,IAAA;GACG,IAAA;GACD,IAAA;GACD,IAAA;CAC3C;AACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8B,IAAA;EACC,IAAA;EACT,IAAA;EACoB,IAAA;EACJ,MAAA;EACL,MAAA;AAChD,EACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EAC+B,IAAA;EACG,IAAA;EACD,IAAA;EACD,IAAA;EACH,IAAA;EACS,IAAA;EACR,IAAA;EACS,IAAA;EACN,IAAA;EACF,IAAA;EACI,KAAA;EACF,KAAA;EACE,KAAA;EACI,KAAA;EACC,KAAA;EACA,KAAA;EACV,KAAA;EACgB,KAAA;EACL,KAAA;EACG,KAAA;EACb,KAAA;EACC,KAAA;EACH,KAAA;EACK,KAAA;EACW,KAAA;EACL,KAAA;EACC,KAAA;EAEhD,KAAA;EACoD,KAAA;EACI,KAAA;EACP,KAAA;EAEjD,KAAA;EACuC,KAAA;EACU,KAAA;EACJ,KAAA;EACC,KAAA;EACG,KAAA;EACD,KAAA;EACF,MAAA;EACL,MAAA;AACjD,EACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,OAAA;CACJ;CACA,eAAe;GACmD,IAAA;GACxB,IAAA;GACA,IAAA;CAC1C;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc,EACV,QAAA,EACJ;CACA,eAAe;GACiD,IAAA;GACzB,IAAA;GACG,IAAA;GACS,IAAA;CACnD;AACJ"}
|
|
1
|
+
{"version":3,"file":"triggers.codecs.js","names":[],"sources":["../../../src/services/triggers/triggers.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/triggers/v1/triggers_pb.js\";\nimport * as ProtoOrders from \"../../gen/orders/v1/orders_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\nexport {\n FEE_ASSET_VALUES,\n FeeAssetCodec,\n type FeeAssetValue,\n ORDER_SIDE_VALUES as TRIGGER_SIDE_VALUES,\n ORDER_TYPE_VALUES,\n OrderSideCodec as TriggerSideCodec,\n type OrderSideValue as TriggerSideValue,\n OrderTypeCodec,\n type OrderTypeValue,\n SELF_TRADE_PREVENTION_MODE_VALUES,\n SelfTradePreventionModeCodec,\n type SelfTradePreventionModeValue,\n TIME_IN_FORCE_OUTPUT_VALUES,\n TIME_IN_FORCE_VALUES,\n TimeInForceCodec,\n type TimeInForceOutputValue,\n type TimeInForceValue,\n TRIGGER_PRICE_SOURCE_VALUES,\n TriggerPriceSourceCodec,\n type TriggerPriceSourceValue,\n} from \"../orders/order-enums.codecs.js\";\n\nexport const TRIGGER_TYPE_VALUES = [\n \"stop_loss\",\n \"take_profit\",\n \"trailing_stop\",\n \"twap\",\n \"ladder\",\n] as const;\nexport type TriggerTypeValue = (typeof TRIGGER_TYPE_VALUES)[number];\n\nexport const TRIGGER_TYPE_LABEL_VALUES = TRIGGER_TYPE_VALUES;\nexport type TriggerTypeLabelValue = (typeof TRIGGER_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_STATUS_FILTER_VALUES = [\n \"created\",\n \"armed\",\n \"running\",\n \"completed\",\n \"cancelled\",\n \"failed\",\n \"paused\",\n] as const;\nexport type TriggerStatusFilterValue = (typeof TRIGGER_STATUS_FILTER_VALUES)[number];\n\nexport const TRIGGER_STATUS_LABEL_VALUES = TRIGGER_STATUS_FILTER_VALUES;\nexport type TriggerStatusLabelValue = (typeof TRIGGER_STATUS_LABEL_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_VALUES = [\n \"fired\",\n \"canceled\",\n \"updated\",\n \"failed\",\n \"activated\",\n] as const;\nexport type TriggerEventTypeValue = (typeof TRIGGER_EVENT_TYPE_VALUES)[number];\n\nexport const TRIGGER_EVENT_TYPE_LABEL_VALUES = TRIGGER_EVENT_TYPE_VALUES;\nexport type TriggerEventTypeLabelValue = (typeof TRIGGER_EVENT_TYPE_LABEL_VALUES)[number];\n\nexport const TRIGGER_CANCEL_REASON_LABEL_VALUES = [\n \"user_request\",\n \"oco\",\n \"parent_canceled_no_fill\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerCancelReasonLabelValue = (typeof TRIGGER_CANCEL_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_FAILURE_REASON_LABEL_VALUES = [\n \"unknown_symbol\",\n \"pair_disabled\",\n \"min_notional\",\n \"tick_size\",\n \"insufficient_funds\",\n \"risk_limit\",\n \"duplicate_client_id\",\n \"market_halted\",\n \"engine_busy\",\n \"account_unknown\",\n \"order_unknown\",\n \"post_only_cross\",\n \"reduce_only_blocked\",\n \"price_band_violation\",\n \"market_cap_violation\",\n \"empty_book\",\n \"fok_insufficient_liquidity\",\n \"fee_asset_not_allowed\",\n \"market_price_unavailable\",\n \"stale_quote\",\n \"min_quantity\",\n \"step_size\",\n \"invalid_sizing\",\n \"max_quote_debit_too_small\",\n \"fee_ceiling_exceeded\",\n \"trigger_price_invalid\",\n \"trigger_price_source_unsupported\",\n \"trailing_distance_invalid\",\n \"modification_requires_replace\",\n \"order_already_terminal\",\n \"conflict_idempotency_key_reuse\",\n \"rate_limited\",\n \"policy_spot_trade_deny\",\n \"policy_market_deny\",\n \"policy_max_notional\",\n \"policy_max_open_orders\",\n \"policy_trading_halted\",\n \"missing_reason_code\",\n \"internal_error\",\n] as const;\nexport type TriggerFailureReasonLabelValue = (typeof TRIGGER_FAILURE_REASON_LABEL_VALUES)[number];\n\nexport const TRIGGER_DIRECTION_VALUES = [\"above\", \"below\"] as const;\nexport type TriggerDirectionValue = (typeof TRIGGER_DIRECTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_VALUES = [\"linear\"] as const;\nexport type LadderDistributionValue = (typeof LADDER_DISTRIBUTION_VALUES)[number];\n\nexport const LADDER_DISTRIBUTION_LABEL_VALUES = [\n \"linear\",\n \"geometric\",\n \"weighted_favorable\",\n] as const;\nexport type LadderDistributionLabelValue = (typeof LADDER_DISTRIBUTION_LABEL_VALUES)[number];\n\nexport const TriggerTypeCodec = {\n inputToProto: {\n stop_loss: Proto.TriggerType.STOP_LOSS,\n take_profit: Proto.TriggerType.TAKE_PROFIT,\n trailing_stop: Proto.TriggerType.TRAILING_STOP,\n twap: Proto.TriggerType.TWAP,\n ladder: Proto.TriggerType.LADDER,\n } satisfies InputToProto<TriggerTypeValue, Proto.TriggerType>,\n protoToOutput: {\n [Proto.TriggerType.TRIGGER_TYPE_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerType.STOP_LOSS]: \"stop_loss\",\n [Proto.TriggerType.TAKE_PROFIT]: \"take_profit\",\n [Proto.TriggerType.TRAILING_STOP]: \"trailing_stop\",\n [Proto.TriggerType.TWAP]: \"twap\",\n [Proto.TriggerType.LADDER]: \"ladder\",\n } satisfies ProtoToOutput<Proto.TriggerType, TriggerTypeLabelValue>,\n} as const;\n\nexport const TriggerStatusCodec = {\n inputToProto: {\n created: Proto.TriggerStatus.STATUS_CREATED,\n armed: Proto.TriggerStatus.STATUS_ARMED,\n running: Proto.TriggerStatus.STATUS_RUNNING,\n completed: Proto.TriggerStatus.STATUS_COMPLETED,\n cancelled: Proto.TriggerStatus.STATUS_CANCELED,\n failed: Proto.TriggerStatus.STATUS_FAILED,\n paused: Proto.TriggerStatus.STATUS_PAUSED,\n } satisfies InputToProto<TriggerStatusFilterValue, Proto.TriggerStatus>,\n protoToOutput: {\n [Proto.TriggerStatus.STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerStatus.STATUS_CREATED]: \"created\",\n [Proto.TriggerStatus.STATUS_ARMED]: \"armed\",\n [Proto.TriggerStatus.STATUS_RUNNING]: \"running\",\n [Proto.TriggerStatus.STATUS_COMPLETED]: \"completed\",\n [Proto.TriggerStatus.STATUS_CANCELED]: \"cancelled\",\n [Proto.TriggerStatus.STATUS_FAILED]: \"failed\",\n [Proto.TriggerStatus.STATUS_PAUSED]: \"paused\",\n } satisfies ProtoToOutput<Proto.TriggerStatus, TriggerStatusLabelValue>,\n} as const;\n\nexport const TriggerEventTypeCodec = {\n inputToProto: {\n fired: Proto.TriggerEventType.EVENT_FIRED,\n canceled: Proto.TriggerEventType.EVENT_CANCELED,\n updated: Proto.TriggerEventType.EVENT_UPDATED,\n failed: Proto.TriggerEventType.EVENT_FAILED,\n activated: Proto.TriggerEventType.EVENT_ACTIVATED,\n } satisfies InputToProto<TriggerEventTypeValue, Proto.TriggerEventType>,\n protoToOutput: {\n [Proto.TriggerEventType.EVENT_UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerEventType.EVENT_FIRED]: \"fired\",\n [Proto.TriggerEventType.EVENT_CANCELED]: \"canceled\",\n [Proto.TriggerEventType.EVENT_UPDATED]: \"updated\",\n [Proto.TriggerEventType.EVENT_FAILED]: \"failed\",\n [Proto.TriggerEventType.EVENT_ACTIVATED]: \"activated\",\n } satisfies ProtoToOutput<Proto.TriggerEventType, TriggerEventTypeLabelValue>,\n} as const;\n\nexport const TriggerCancelReasonCodec = {\n protoToOutput: {\n [Proto.TriggerCancelReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerCancelReason.USER_REQUEST]: \"user_request\",\n [Proto.TriggerCancelReason.OCO]: \"oco\",\n [Proto.TriggerCancelReason.PARENT_CANCELED_NO_FILL]: \"parent_canceled_no_fill\",\n [Proto.TriggerCancelReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerCancelReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerCancelReason, TriggerCancelReasonLabelValue>,\n} as const;\n\nexport const TriggerFailureReasonCodec = {\n protoToOutput: {\n [Proto.TriggerFailureReason.UNSPECIFIED]: \"unspecified\",\n [Proto.TriggerFailureReason.UNKNOWN_SYMBOL]: \"unknown_symbol\",\n [Proto.TriggerFailureReason.PAIR_DISABLED]: \"pair_disabled\",\n [Proto.TriggerFailureReason.MIN_NOTIONAL]: \"min_notional\",\n [Proto.TriggerFailureReason.TICK_SIZE]: \"tick_size\",\n [Proto.TriggerFailureReason.INSUFFICIENT_FUNDS]: \"insufficient_funds\",\n [Proto.TriggerFailureReason.RISK_LIMIT]: \"risk_limit\",\n [Proto.TriggerFailureReason.DUPLICATE_CLIENT_ID]: \"duplicate_client_id\",\n [Proto.TriggerFailureReason.MARKET_HALTED]: \"market_halted\",\n [Proto.TriggerFailureReason.ENGINE_BUSY]: \"engine_busy\",\n [Proto.TriggerFailureReason.ACCOUNT_UNKNOWN]: \"account_unknown\",\n [Proto.TriggerFailureReason.ORDER_UNKNOWN]: \"order_unknown\",\n [Proto.TriggerFailureReason.POST_ONLY_CROSS]: \"post_only_cross\",\n [Proto.TriggerFailureReason.REDUCE_ONLY_BLOCKED]: \"reduce_only_blocked\",\n [Proto.TriggerFailureReason.PRICE_BAND_VIOLATION]: \"price_band_violation\",\n [Proto.TriggerFailureReason.MARKET_CAP_VIOLATION]: \"market_cap_violation\",\n [Proto.TriggerFailureReason.EMPTY_BOOK]: \"empty_book\",\n [Proto.TriggerFailureReason.FOK_INSUFFICIENT_LIQUIDITY]: \"fok_insufficient_liquidity\",\n [Proto.TriggerFailureReason.FEE_ASSET_NOT_ALLOWED]: \"fee_asset_not_allowed\",\n [Proto.TriggerFailureReason.MARKET_PRICE_UNAVAILABLE]: \"market_price_unavailable\",\n [Proto.TriggerFailureReason.STALE_QUOTE]: \"stale_quote\",\n [Proto.TriggerFailureReason.MIN_QUANTITY]: \"min_quantity\",\n [Proto.TriggerFailureReason.STEP_SIZE]: \"step_size\",\n [Proto.TriggerFailureReason.INVALID_SIZING]: \"invalid_sizing\",\n [Proto.TriggerFailureReason.MAX_QUOTE_DEBIT_TOO_SMALL]: \"max_quote_debit_too_small\",\n [Proto.TriggerFailureReason.FEE_CEILING_EXCEEDED]: \"fee_ceiling_exceeded\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_INVALID]: \"trigger_price_invalid\",\n [Proto.TriggerFailureReason.TRIGGER_PRICE_SOURCE_UNSUPPORTED]:\n \"trigger_price_source_unsupported\",\n [Proto.TriggerFailureReason.TRAILING_DISTANCE_INVALID]: \"trailing_distance_invalid\",\n [Proto.TriggerFailureReason.MODIFICATION_REQUIRES_REPLACE]: \"modification_requires_replace\",\n [Proto.TriggerFailureReason.ORDER_ALREADY_TERMINAL]: \"order_already_terminal\",\n [Proto.TriggerFailureReason.CONFLICT_IDEMPOTENCY_KEY_REUSE]:\n \"conflict_idempotency_key_reuse\",\n [Proto.TriggerFailureReason.RATE_LIMITED]: \"rate_limited\",\n [Proto.TriggerFailureReason.POLICY_SPOT_TRADE_DENY]: \"policy_spot_trade_deny\",\n [Proto.TriggerFailureReason.POLICY_MARKET_DENY]: \"policy_market_deny\",\n [Proto.TriggerFailureReason.POLICY_MAX_NOTIONAL]: \"policy_max_notional\",\n [Proto.TriggerFailureReason.POLICY_MAX_OPEN_ORDERS]: \"policy_max_open_orders\",\n [Proto.TriggerFailureReason.POLICY_TRADING_HALTED]: \"policy_trading_halted\",\n [Proto.TriggerFailureReason.MISSING_REASON_CODE]: \"missing_reason_code\",\n [Proto.TriggerFailureReason.INTERNAL_ERROR]: \"internal_error\",\n } satisfies ProtoToOutput<Proto.TriggerFailureReason, TriggerFailureReasonLabelValue>,\n} as const;\n\nexport const TriggerDirectionCodec = {\n inputToProto: {\n above: ProtoOrders.TriggerDirection.ABOVE,\n below: ProtoOrders.TriggerDirection.BELOW,\n } satisfies InputToProto<TriggerDirectionValue, ProtoOrders.TriggerDirection>,\n protoToOutput: {\n [ProtoOrders.TriggerDirection.TRIGGER_DIRECTION_UNSPECIFIED]: \"unspecified\",\n [ProtoOrders.TriggerDirection.ABOVE]: \"above\",\n [ProtoOrders.TriggerDirection.BELOW]: \"below\",\n } satisfies ProtoToOutput<ProtoOrders.TriggerDirection, TriggerDirectionValue>,\n} as const;\n\nexport const LadderDistributionCodec = {\n inputToProto: {\n linear: Proto.LadderDistribution.LINEAR,\n } satisfies InputToProto<LadderDistributionValue, Proto.LadderDistribution>,\n protoToOutput: {\n [Proto.LadderDistribution.LADDER_DISTRIBUTION_UNSPECIFIED]: \"unspecified\",\n [Proto.LadderDistribution.LINEAR]: \"linear\",\n [Proto.LadderDistribution.GEOMETRIC]: \"geometric\",\n [Proto.LadderDistribution.WEIGHTED_FAVORABLE]: \"weighted_favorable\",\n } satisfies ProtoToOutput<Proto.LadderDistribution, LadderDistributionLabelValue>,\n} as const;\n"],"mappings":";;;;AA0BA,MAAa,sBAAsB;CAC/B;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAMA,MAAa,4BAA4B;CACrC;CACA;CACA;CACA;CACA;AACJ;AAuEA,MAAa,mBAAmB;CAC5B,cAAc;EACV,WAAA;EACA,aAAA;EACA,eAAA;EACA,MAAA;EACA,QAAA;CACJ;CACA,eAAe;GACmC,IAAA;GACf,IAAA;GACE,IAAA;GACE,IAAA;GACT,IAAA;GACE,IAAA;CAChC;AACJ;AAEA,MAAa,qBAAqB;CAC9B,cAAc;EACV,SAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;CACJ;CACA,eAAe;GAC+B,IAAA;GACJ,IAAA;GACF,IAAA;GACE,IAAA;GACE,IAAA;GACD,IAAA;GACF,IAAA;GACA,IAAA;CACzC;AACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,UAAA;EACA,SAAA;EACA,QAAA;EACA,WAAA;CACJ;CACA,eAAe;GACiC,IAAA;GACN,IAAA;GACG,IAAA;GACD,IAAA;GACD,IAAA;GACG,IAAA;CAC9C;AACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8B,IAAA;EACC,IAAA;EACT,IAAA;EACoB,IAAA;EACJ,MAAA;EACL,MAAA;AAChD,EACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EAC+B,IAAA;EACG,IAAA;EACD,IAAA;EACD,IAAA;EACH,IAAA;EACS,IAAA;EACR,IAAA;EACS,IAAA;EACN,IAAA;EACF,IAAA;EACI,KAAA;EACF,KAAA;EACE,KAAA;EACI,KAAA;EACC,KAAA;EACA,KAAA;EACV,KAAA;EACgB,KAAA;EACL,KAAA;EACG,KAAA;EACb,KAAA;EACC,KAAA;EACH,KAAA;EACK,KAAA;EACW,KAAA;EACL,KAAA;EACC,KAAA;EAEhD,KAAA;EACoD,KAAA;EACI,KAAA;EACP,KAAA;EAEjD,KAAA;EACuC,KAAA;EACU,KAAA;EACJ,KAAA;EACC,KAAA;EACG,KAAA;EACD,KAAA;EACF,MAAA;EACL,MAAA;AACjD,EACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,OAAA;EACA,OAAA;CACJ;CACA,eAAe;GACmD,IAAA;GACxB,IAAA;GACA,IAAA;CAC1C;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc,EACV,QAAA,EACJ;CACA,eAAe;GACiD,IAAA;GACzB,IAAA;GACG,IAAA;GACS,IAAA;CACnD;AACJ"}
|
|
@@ -10,6 +10,8 @@ interface AssetConfig {
|
|
|
10
10
|
name: string;
|
|
11
11
|
quantityDisplayDecimals: number;
|
|
12
12
|
quantityScale: number;
|
|
13
|
+
/** Scale for public candle and market-overview base volume. Absent on older snapshots. */
|
|
14
|
+
marketDataVolumeScale?: number;
|
|
13
15
|
}
|
|
14
16
|
interface PairConfig {
|
|
15
17
|
symbolId: number;
|
|
@@ -27,6 +29,8 @@ interface PairConfig {
|
|
|
27
29
|
marketdata?: PairMarketDataConfig;
|
|
28
30
|
baseQuantityScale: number;
|
|
29
31
|
quoteQuantityScale: number;
|
|
32
|
+
/** Scale for composite reference candle prices. Absent on older snapshots. */
|
|
33
|
+
referencePriceScale?: number;
|
|
30
34
|
listingAt?: number | null;
|
|
31
35
|
delistingAt?: number | null;
|
|
32
36
|
status: PairStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-config.d.ts","names":[],"sources":["../../src/shared/catalog-config.ts"],"mappings":";KAAY;EACR;;KAGQ;cAQC;UAQI;EACb;EACA;EACA;EACA;EACA;;UAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA,QAAQ;;UAGK;EACb,QAAQ;EACR,OAAO;EACP;;UAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGa;EACb;EACA;;UAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;EACb,QAAQ;;UAGK;EACb;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;;UAGa;EACb;EACA;EACA;EACA;EACA;;UAGa;EACb,QAAQ;EACR,QAAQ;EACR,WAAW;EACX"}
|
|
1
|
+
{"version":3,"file":"catalog-config.d.ts","names":[],"sources":["../../src/shared/catalog-config.ts"],"mappings":";KAAY;EACR;;KAGQ;cAQC;UAQI;EACb;EACA;EACA;EACA;EACA;;EAEA;;UAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;EACb;EACA;;EAEA;EACA;EACA;EACA,QAAQ;;UAGK;EACb,QAAQ;EACR,OAAO;EACP;;UAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGa;EACb;EACA;;UAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;EACb,QAAQ;;UAGK;EACb;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;;UAGa;EACb;EACA;EACA;EACA;EACA;;UAGa;EACb,QAAQ;EACR,QAAQ;EACR,WAAW;EACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-config.js","names":[],"sources":["../../src/shared/catalog-config.ts"],"sourcesContent":["export type PairMarketDataConfig = {\n orderbookPriceBuckets: number[];\n};\n\nexport type PairStatus =\n | \"enabled\"\n | \"disabled\"\n | \"cancel_only\"\n | \"post_only\"\n | \"reduce_only\"\n | \"unknown\";\n\nexport const PAIR_STATUSES = [\n \"enabled\",\n \"disabled\",\n \"cancel_only\",\n \"post_only\",\n \"reduce_only\",\n] as const satisfies readonly PairStatus[];\n\nexport interface AssetConfig {\n symbol: string;\n ledgerId: number;\n name: string;\n quantityDisplayDecimals: number;\n quantityScale: number;\n}\n\nexport interface PairConfig {\n symbolId: number;\n symbol: string;\n baseAsset: string;\n quoteAsset: string;\n tickSize: string;\n stepSize: string;\n minNotionalQuote: string;\n minQtyBase: string;\n allowBuyFeeFromBase: boolean;\n defaultMarketSlippagePctBuy: number;\n defaultMarketSlippagePctSell: number;\n maxClientRefDriftPct: number;\n marketdata?: PairMarketDataConfig;\n baseQuantityScale: number;\n quoteQuantityScale: number;\n listingAt?: number | null;\n delistingAt?: number | null;\n status: PairStatus;\n}\n\nexport interface SpotConfig {\n assets: AssetConfig[];\n pairs: PairConfig[];\n tsSec: number;\n}\n\nexport interface ZipperChainConfig {\n chainId: number;\n code: string;\n name: string;\n nativeChainId: string;\n nativeCurrencySymbol: string;\n explorerUrl: string;\n icon: string;\n requiredConfirmations: number;\n confirmationTimeSeconds: number;\n isCaseSensitive: boolean;\n minAddressLength: number;\n maxAddressLength: number;\n}\n\nexport interface ZipperTokenConfig {\n address: string;\n decimals: number;\n}\n\nexport interface ZipperAssetChainVariant {\n zippedAssetId: number;\n chainId: number;\n isNativeAsset: boolean;\n networkFee: string;\n networkFeeTsSec: number;\n depositMinAmount: string;\n withdrawMinAmount: string;\n supply: string;\n sourceToken: ZipperTokenConfig;\n zToken: ZipperTokenConfig;\n}\n\nexport interface ZipperAssetConfig {\n asset: string;\n ledgerId: number;\n name: string;\n icon: string;\n quantityScale: number;\n quantityDisplayDecimals: number;\n variants: ZipperAssetChainVariant[];\n uAssetId: string;\n}\n\nexport interface ZipperChainContractConfig {\n name: string;\n address: string;\n type: string;\n description: string;\n version: number;\n}\n\nexport interface DepositWithdrawConfig {\n chains: ZipperChainConfig[];\n assets: ZipperAssetConfig[];\n contracts: ZipperChainContractConfig[];\n tsMs: number;\n}\n"],"mappings":";AAYA,MAAa,gBAAgB;CACzB;CACA;CACA;CACA;CACA;AACJ"}
|
|
1
|
+
{"version":3,"file":"catalog-config.js","names":[],"sources":["../../src/shared/catalog-config.ts"],"sourcesContent":["export type PairMarketDataConfig = {\n orderbookPriceBuckets: number[];\n};\n\nexport type PairStatus =\n | \"enabled\"\n | \"disabled\"\n | \"cancel_only\"\n | \"post_only\"\n | \"reduce_only\"\n | \"unknown\";\n\nexport const PAIR_STATUSES = [\n \"enabled\",\n \"disabled\",\n \"cancel_only\",\n \"post_only\",\n \"reduce_only\",\n] as const satisfies readonly PairStatus[];\n\nexport interface AssetConfig {\n symbol: string;\n ledgerId: number;\n name: string;\n quantityDisplayDecimals: number;\n quantityScale: number;\n /** Scale for public candle and market-overview base volume. Absent on older snapshots. */\n marketDataVolumeScale?: number;\n}\n\nexport interface PairConfig {\n symbolId: number;\n symbol: string;\n baseAsset: string;\n quoteAsset: string;\n tickSize: string;\n stepSize: string;\n minNotionalQuote: string;\n minQtyBase: string;\n allowBuyFeeFromBase: boolean;\n defaultMarketSlippagePctBuy: number;\n defaultMarketSlippagePctSell: number;\n maxClientRefDriftPct: number;\n marketdata?: PairMarketDataConfig;\n baseQuantityScale: number;\n quoteQuantityScale: number;\n /** Scale for composite reference candle prices. Absent on older snapshots. */\n referencePriceScale?: number;\n listingAt?: number | null;\n delistingAt?: number | null;\n status: PairStatus;\n}\n\nexport interface SpotConfig {\n assets: AssetConfig[];\n pairs: PairConfig[];\n tsSec: number;\n}\n\nexport interface ZipperChainConfig {\n chainId: number;\n code: string;\n name: string;\n nativeChainId: string;\n nativeCurrencySymbol: string;\n explorerUrl: string;\n icon: string;\n requiredConfirmations: number;\n confirmationTimeSeconds: number;\n isCaseSensitive: boolean;\n minAddressLength: number;\n maxAddressLength: number;\n}\n\nexport interface ZipperTokenConfig {\n address: string;\n decimals: number;\n}\n\nexport interface ZipperAssetChainVariant {\n zippedAssetId: number;\n chainId: number;\n isNativeAsset: boolean;\n networkFee: string;\n networkFeeTsSec: number;\n depositMinAmount: string;\n withdrawMinAmount: string;\n supply: string;\n sourceToken: ZipperTokenConfig;\n zToken: ZipperTokenConfig;\n}\n\nexport interface ZipperAssetConfig {\n asset: string;\n ledgerId: number;\n name: string;\n icon: string;\n quantityScale: number;\n quantityDisplayDecimals: number;\n variants: ZipperAssetChainVariant[];\n uAssetId: string;\n}\n\nexport interface ZipperChainContractConfig {\n name: string;\n address: string;\n type: string;\n description: string;\n version: number;\n}\n\nexport interface DepositWithdrawConfig {\n chains: ZipperChainConfig[];\n assets: ZipperAssetConfig[];\n contracts: ZipperChainContractConfig[];\n tsMs: number;\n}\n"],"mappings":";AAYA,MAAa,gBAAgB;CACzB;CACA;CACA;CACA;CACA;AACJ"}
|
|
@@ -10,6 +10,10 @@ interface SdkScales {
|
|
|
10
10
|
price(): number;
|
|
11
11
|
baseQty(pair: PairCatalogKey): number;
|
|
12
12
|
quoteAmount(pair: PairCatalogKey): number;
|
|
13
|
+
/** Base volume in public candles and market overview; falls back to the base quantity scale. */
|
|
14
|
+
marketDataVolume(pair: PairCatalogKey): number;
|
|
15
|
+
/** Composite reference candle prices; falls back to the primary price scale. */
|
|
16
|
+
referencePrice(pair: PairCatalogKey): number;
|
|
13
17
|
ledgerAmount(ledgerAssetId: number): number;
|
|
14
18
|
zippedAssetAmount(zippedAssetId: number): number;
|
|
15
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimal-surface.d.ts","names":[],"sources":["../../src/shared/decimal-surface.ts"],"mappings":";;;;;;;UAwCiB;EACb,SAAS;EACT;EACA,QAAQ,MAAM;EACd,YAAY,MAAM;
|
|
1
|
+
{"version":3,"file":"decimal-surface.d.ts","names":[],"sources":["../../src/shared/decimal-surface.ts"],"mappings":";;;;;;;UAwCiB;EACb,SAAS;EACT;EACA,QAAQ,MAAM;EACd,YAAY,MAAM;;EAElB,iBAAiB,MAAM;;EAEvB,eAAe,MAAM;EACrB,aAAa;EACb,kBAAkB"}
|
|
@@ -10,9 +10,14 @@ function createCatalogSdkScales(getCatalog) {
|
|
|
10
10
|
ready: async () => {
|
|
11
11
|
await getCatalog().ensureReady();
|
|
12
12
|
},
|
|
13
|
-
price: () =>
|
|
13
|
+
price: () => 9,
|
|
14
14
|
baseQty: (pair) => requirePair(getCatalog(), pair).baseAsset.quantityScale,
|
|
15
15
|
quoteAmount: (pair) => requirePair(getCatalog(), pair).quoteAsset.quantityScale,
|
|
16
|
+
marketDataVolume: (pair) => {
|
|
17
|
+
const { baseAsset } = requirePair(getCatalog(), pair);
|
|
18
|
+
return baseAsset.marketDataVolumeScale ?? baseAsset.quantityScale;
|
|
19
|
+
},
|
|
20
|
+
referencePrice: (pair) => requirePair(getCatalog(), pair).referencePriceScale ?? 9,
|
|
16
21
|
ledgerAmount: (ledgerAssetId) => {
|
|
17
22
|
const ledger = getCatalog().ledger;
|
|
18
23
|
if (!ledger.isKnownAssetId(ledgerAssetId)) throw new CatalogLookupError("ledger", "ledgerId", ledgerAssetId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimal-surface.js","names":[],"sources":["../../src/shared/decimal-surface.ts"],"sourcesContent":["/**\n * Internal scaled⇄decimal bridge for the SDK's public decimal-string surface.\n *\n * The wire protocol carries scaled integers (price ticks, per-asset scaled\n * quantities); the public SDK surface carries plain decimal strings. Output\n * schemas convert exactly (no rounding, trailing zeros trimmed); input schemas\n * accept zero padding but reject fractional precision that remains above the\n * scale after trailing zeros are removed. Scaled integers must not escape\n * through any service input or output.\n */\nimport {\n scaledToDecimal,\n tryDecimalToScaled,\n type DecimalToScaledFailure,\n} from \"../catalogs/decimal.js\";\nimport {\n CatalogConversionError,\n CatalogLookupError,\n CatalogNotReadyError,\n type ClientCatalog,\n type PairCatalogKey,\n} from \"../catalogs/types.js\";\nimport { PRICE_SCALE } from \"../catalogs/readers.js\";\nimport { PROTOBUF_INT64_MAX } from \"./wire-bounds.js\";\n\n/** On-chain unified-asset amounts (`amountE18`) are always 18-decimal scaled. */\nexport const E18_SCALE = 18;\n\n/**\n * Policy notional caps (`max_order_notional`) are canonical quote microunits:\n * one unit is 0.000001 USDT, per the `auth.v1` policy contract. Fixed by the\n * protocol rather than per-pair, so it needs no catalog lookup.\n */\nexport const QUOTE_NOTIONAL_SCALE = 6;\n\n/**\n * Resolves wire scales for the SDK's internal decimal conversion. Backed by\n * the client catalog; `ready()` must be awaited before the synchronous lookups\n * are used so the catalog can answer them.\n */\nexport interface SdkScales {\n ready(): Promise<void>;\n price(): number;\n baseQty(pair: PairCatalogKey): number;\n quoteAmount(pair: PairCatalogKey): number;\n ledgerAmount(ledgerAssetId: number): number;\n zippedAssetAmount(zippedAssetId: number): number;\n}\n\n/**\n * Catalog-backed scale resolver. Takes a getter so it can be constructed\n * before the owning client has assigned its catalog.\n */\nexport function createCatalogSdkScales(getCatalog: () => ClientCatalog): SdkScales {\n return {\n ready: async () => {\n await getCatalog().ensureReady();\n },\n price: () => PRICE_SCALE,\n baseQty: (pair) => requirePair(getCatalog(), pair).baseAsset.quantityScale,\n quoteAmount: (pair) => requirePair(getCatalog(), pair).quoteAsset.quantityScale,\n ledgerAmount: (ledgerAssetId) => {\n const ledger = getCatalog().ledger;\n if (!ledger.isKnownAssetId(ledgerAssetId)) {\n throw new CatalogLookupError(\"ledger\", \"ledgerId\", ledgerAssetId);\n }\n return ledger.requireAssetByLedgerId(ledgerAssetId).quantityScale;\n },\n zippedAssetAmount: (zippedAssetId) =>\n getCatalog().zipper.requireAssetChainByZippedAssetId(zippedAssetId).asset.quantityScale,\n };\n}\n\nfunction requirePair(catalog: ClientCatalog, pair: PairCatalogKey) {\n return typeof pair === \"string\" || (typeof pair === \"object\" && \"symbol\" in pair)\n ? catalog.market.requirePairBySymbol(typeof pair === \"string\" ? pair : pair.symbol)\n : catalog.market.requirePairBySymbolId(typeof pair === \"number\" ? pair : pair.symbolId);\n}\n\n/** Output direction: exact scaled→decimal conversion (`1500000n`@6 → `\"1.5\"`). */\nexport function scaledToDecimalOutput(value: bigint, scale: number): string {\n return scaledToDecimal(value, scale);\n}\n\nfunction conversionFailureMessage(\n field: string,\n value: string,\n failure: DecimalToScaledFailure,\n): string {\n return failure.reason === \"precision\"\n ? `${field} supports at most ${failure.maxDecimals} decimal places: ${value}`\n : `${field} must be a non-negative decimal number: ${value}`;\n}\n\n/**\n * Input direction: strict decimal→scaled conversion. Throws\n * CatalogConversionError for non-decimal input or inexact excess precision.\n */\nexport function decimalInputToScaled(field: string, value: string, scale: number): bigint {\n const result = tryDecimalToScaled(value.trim(), scale);\n if (!result.ok) {\n throw new CatalogConversionError(\n field,\n conversionFailureMessage(field, value, result.failure),\n );\n }\n return result.scaled;\n}\n\nfunction unboundedPositiveDecimalInputToScaled(\n field: string,\n value: string,\n scale: number,\n): bigint {\n const scaled = decimalInputToScaled(field, value, scale);\n if (scaled <= 0n) {\n throw new CatalogConversionError(field, `${field} must be greater than 0: ${value}`);\n }\n return scaled;\n}\n\n/**\n * Converts a positive decimal input to a scaled protobuf `int64` value.\n * Rejects values above the wire-format ceiling before serialization.\n */\nexport function positiveDecimalInputToScaled(field: string, value: string, scale: number): bigint {\n const scaled = unboundedPositiveDecimalInputToScaled(field, value, scale);\n if (scaled > PROTOBUF_INT64_MAX) {\n throw new CatalogConversionError(\n field,\n `${field} exceeds the maximum supported value: ${value}`,\n );\n }\n return scaled;\n}\n\n/**\n * Decimal quantity → PolyesterChain E18 ledger units.\n * Input precision is capped at the asset's quantityScale; the wire value is\n * always upscaled to E18 (trading balances / amount_e18 convention).\n */\nexport function quantityInputToE18(params: {\n scales: SdkScales;\n assetId: number;\n quantity: string;\n field?: string;\n}): bigint {\n const field = params.field ?? \"quantity\";\n const assetScale = params.scales.ledgerAmount(params.assetId);\n if (assetScale > E18_SCALE) {\n throw new CatalogConversionError(\n field,\n `${field} asset quantityScale ${assetScale} exceeds E18 ledger scale`,\n );\n }\n return (\n unboundedPositiveDecimalInputToScaled(field, params.quantity, assetScale) *\n 10n ** BigInt(E18_SCALE - assetScale)\n );\n}\n\nexport interface ReadyGate {\n /** Queues or delivers one transition while the gate remains active. */\n run(deliver: () => void): void;\n /** Drops pending transitions and permanently prevents future delivery. */\n close(): void;\n}\n\ninterface ReadyGateHandlers {\n onDeliveryError?: (error: unknown) => void;\n onTerminalError: (error: unknown) => void;\n}\n\nconst READY_GATE_MAX_PENDING_DELIVERIES = 1_024;\n\n/**\n * Transition event delivery behind catalog readiness. Events arriving before the\n * catalog can resolve scales are queued and flushed in arrival order once it\n * is ready. Delivery errors are isolated from the transport. Readiness failure\n * or queue overflow is terminal because dropping an event would break stream\n * continuity; the owning subscription must visibly terminate when notified.\n */\nexport function createReadyGate(\n ready: () => Promise<void>,\n handlers: ReadyGateHandlers,\n): ReadyGate {\n let state: \"pending\" | \"open\" | \"closed\" = \"pending\";\n const queue: Array<() => void> = [];\n\n const deliverIsolated = (deliver: () => void) => {\n try {\n deliver();\n } catch (error) {\n handlers.onDeliveryError?.(error);\n }\n };\n\n const closeWithError = (error: unknown) => {\n if (state === \"closed\") return;\n state = \"closed\";\n queue.length = 0;\n handlers.onTerminalError(error);\n };\n\n Promise.resolve()\n .then(ready)\n .then(\n () => {\n if (state !== \"pending\") return;\n state = \"open\";\n for (const deliver of queue.splice(0)) deliverIsolated(deliver);\n },\n (error) => {\n if (state !== \"pending\") return;\n closeWithError(error);\n },\n );\n\n return {\n run(deliver) {\n if (state === \"open\") deliverIsolated(deliver);\n else if (state === \"pending\") {\n if (queue.length === READY_GATE_MAX_PENDING_DELIVERIES) {\n closeWithError(new CatalogNotReadyError());\n return;\n }\n queue.push(deliver);\n }\n },\n close() {\n if (state === \"closed\") return;\n state = \"closed\";\n queue.length = 0;\n },\n };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"decimal-surface.js","names":[],"sources":["../../src/shared/decimal-surface.ts"],"sourcesContent":["/**\n * Internal scaled⇄decimal bridge for the SDK's public decimal-string surface.\n *\n * The wire protocol carries scaled integers (price ticks, per-asset scaled\n * quantities); the public SDK surface carries plain decimal strings. Output\n * schemas convert exactly (no rounding, trailing zeros trimmed); input schemas\n * accept zero padding but reject fractional precision that remains above the\n * scale after trailing zeros are removed. Scaled integers must not escape\n * through any service input or output.\n */\nimport {\n scaledToDecimal,\n tryDecimalToScaled,\n type DecimalToScaledFailure,\n} from \"../catalogs/decimal.js\";\nimport {\n CatalogConversionError,\n CatalogLookupError,\n CatalogNotReadyError,\n type ClientCatalog,\n type PairCatalogKey,\n} from \"../catalogs/types.js\";\nimport { PRICE_SCALE } from \"../catalogs/readers.js\";\nimport { PROTOBUF_INT64_MAX } from \"./wire-bounds.js\";\n\n/** On-chain unified-asset amounts (`amountE18`) are always 18-decimal scaled. */\nexport const E18_SCALE = 18;\n\n/**\n * Policy notional caps (`max_order_notional`) are canonical quote microunits:\n * one unit is 0.000001 USDT, per the `auth.v1` policy contract. Fixed by the\n * protocol rather than per-pair, so it needs no catalog lookup.\n */\nexport const QUOTE_NOTIONAL_SCALE = 6;\n\n/**\n * Resolves wire scales for the SDK's internal decimal conversion. Backed by\n * the client catalog; `ready()` must be awaited before the synchronous lookups\n * are used so the catalog can answer them.\n */\nexport interface SdkScales {\n ready(): Promise<void>;\n price(): number;\n baseQty(pair: PairCatalogKey): number;\n quoteAmount(pair: PairCatalogKey): number;\n /** Base volume in public candles and market overview; falls back to the base quantity scale. */\n marketDataVolume(pair: PairCatalogKey): number;\n /** Composite reference candle prices; falls back to the primary price scale. */\n referencePrice(pair: PairCatalogKey): number;\n ledgerAmount(ledgerAssetId: number): number;\n zippedAssetAmount(zippedAssetId: number): number;\n}\n\n/**\n * Catalog-backed scale resolver. Takes a getter so it can be constructed\n * before the owning client has assigned its catalog.\n */\nexport function createCatalogSdkScales(getCatalog: () => ClientCatalog): SdkScales {\n return {\n ready: async () => {\n await getCatalog().ensureReady();\n },\n price: () => PRICE_SCALE,\n baseQty: (pair) => requirePair(getCatalog(), pair).baseAsset.quantityScale,\n quoteAmount: (pair) => requirePair(getCatalog(), pair).quoteAsset.quantityScale,\n marketDataVolume: (pair) => {\n const { baseAsset } = requirePair(getCatalog(), pair);\n return baseAsset.marketDataVolumeScale ?? baseAsset.quantityScale;\n },\n referencePrice: (pair) =>\n requirePair(getCatalog(), pair).referencePriceScale ?? PRICE_SCALE,\n ledgerAmount: (ledgerAssetId) => {\n const ledger = getCatalog().ledger;\n if (!ledger.isKnownAssetId(ledgerAssetId)) {\n throw new CatalogLookupError(\"ledger\", \"ledgerId\", ledgerAssetId);\n }\n return ledger.requireAssetByLedgerId(ledgerAssetId).quantityScale;\n },\n zippedAssetAmount: (zippedAssetId) =>\n getCatalog().zipper.requireAssetChainByZippedAssetId(zippedAssetId).asset.quantityScale,\n };\n}\n\nfunction requirePair(catalog: ClientCatalog, pair: PairCatalogKey) {\n return typeof pair === \"string\" || (typeof pair === \"object\" && \"symbol\" in pair)\n ? catalog.market.requirePairBySymbol(typeof pair === \"string\" ? pair : pair.symbol)\n : catalog.market.requirePairBySymbolId(typeof pair === \"number\" ? pair : pair.symbolId);\n}\n\n/** Output direction: exact scaled→decimal conversion (`1500000n`@6 → `\"1.5\"`). */\nexport function scaledToDecimalOutput(value: bigint, scale: number): string {\n return scaledToDecimal(value, scale);\n}\n\nfunction conversionFailureMessage(\n field: string,\n value: string,\n failure: DecimalToScaledFailure,\n): string {\n return failure.reason === \"precision\"\n ? `${field} supports at most ${failure.maxDecimals} decimal places: ${value}`\n : `${field} must be a non-negative decimal number: ${value}`;\n}\n\n/**\n * Input direction: strict decimal→scaled conversion. Throws\n * CatalogConversionError for non-decimal input or inexact excess precision.\n */\nexport function decimalInputToScaled(field: string, value: string, scale: number): bigint {\n const result = tryDecimalToScaled(value.trim(), scale);\n if (!result.ok) {\n throw new CatalogConversionError(\n field,\n conversionFailureMessage(field, value, result.failure),\n );\n }\n return result.scaled;\n}\n\nfunction unboundedPositiveDecimalInputToScaled(\n field: string,\n value: string,\n scale: number,\n): bigint {\n const scaled = decimalInputToScaled(field, value, scale);\n if (scaled <= 0n) {\n throw new CatalogConversionError(field, `${field} must be greater than 0: ${value}`);\n }\n return scaled;\n}\n\n/**\n * Converts a positive decimal input to a scaled protobuf `int64` value.\n * Rejects values above the wire-format ceiling before serialization.\n */\nexport function positiveDecimalInputToScaled(field: string, value: string, scale: number): bigint {\n const scaled = unboundedPositiveDecimalInputToScaled(field, value, scale);\n if (scaled > PROTOBUF_INT64_MAX) {\n throw new CatalogConversionError(\n field,\n `${field} exceeds the maximum supported value: ${value}`,\n );\n }\n return scaled;\n}\n\n/**\n * Decimal quantity → PolyesterChain E18 ledger units.\n * Input precision is capped at the asset's quantityScale; the wire value is\n * always upscaled to E18 (trading balances / amount_e18 convention).\n */\nexport function quantityInputToE18(params: {\n scales: SdkScales;\n assetId: number;\n quantity: string;\n field?: string;\n}): bigint {\n const field = params.field ?? \"quantity\";\n const assetScale = params.scales.ledgerAmount(params.assetId);\n if (assetScale > E18_SCALE) {\n throw new CatalogConversionError(\n field,\n `${field} asset quantityScale ${assetScale} exceeds E18 ledger scale`,\n );\n }\n return (\n unboundedPositiveDecimalInputToScaled(field, params.quantity, assetScale) *\n 10n ** BigInt(E18_SCALE - assetScale)\n );\n}\n\nexport interface ReadyGate {\n /** Queues or delivers one transition while the gate remains active. */\n run(deliver: () => void): void;\n /** Drops pending transitions and permanently prevents future delivery. */\n close(): void;\n}\n\ninterface ReadyGateHandlers {\n onDeliveryError?: (error: unknown) => void;\n onTerminalError: (error: unknown) => void;\n}\n\nconst READY_GATE_MAX_PENDING_DELIVERIES = 1_024;\n\n/**\n * Transition event delivery behind catalog readiness. Events arriving before the\n * catalog can resolve scales are queued and flushed in arrival order once it\n * is ready. Delivery errors are isolated from the transport. Readiness failure\n * or queue overflow is terminal because dropping an event would break stream\n * continuity; the owning subscription must visibly terminate when notified.\n */\nexport function createReadyGate(\n ready: () => Promise<void>,\n handlers: ReadyGateHandlers,\n): ReadyGate {\n let state: \"pending\" | \"open\" | \"closed\" = \"pending\";\n const queue: Array<() => void> = [];\n\n const deliverIsolated = (deliver: () => void) => {\n try {\n deliver();\n } catch (error) {\n handlers.onDeliveryError?.(error);\n }\n };\n\n const closeWithError = (error: unknown) => {\n if (state === \"closed\") return;\n state = \"closed\";\n queue.length = 0;\n handlers.onTerminalError(error);\n };\n\n Promise.resolve()\n .then(ready)\n .then(\n () => {\n if (state !== \"pending\") return;\n state = \"open\";\n for (const deliver of queue.splice(0)) deliverIsolated(deliver);\n },\n (error) => {\n if (state !== \"pending\") return;\n closeWithError(error);\n },\n );\n\n return {\n run(deliver) {\n if (state === \"open\") deliverIsolated(deliver);\n else if (state === \"pending\") {\n if (queue.length === READY_GATE_MAX_PENDING_DELIVERIES) {\n closeWithError(new CatalogNotReadyError());\n return;\n }\n queue.push(deliver);\n }\n },\n close() {\n if (state === \"closed\") return;\n state = \"closed\";\n queue.length = 0;\n },\n };\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.js","names":[],"sources":["../../src/utils/numbers.ts"],"sourcesContent":["// Shared numeric helpers for gRPC/Connect clients.\n\n/**\n * Parse a required uint64 encoded as a base-10 string into bigint.\n * @param raw - The raw string to parse.\n * @param fieldName - The name of the field to parse.\n * @returns The parsed bigint.\n * @throws An error if the field is required and not provided.\n * @throws An error if the field is not a positive integer.\n */\nexport function parseRequiredUint64Decimal(raw: string, fieldName: string): bigint {\n const s = (raw ?? \"\").trim();\n if (!s) throw new Error(`${fieldName} is required`);\n if (!/^[0-9]+$/.test(s)) throw new Error(`${fieldName} must be a positive integer`);\n return BigInt(s);\n}\n\n/**\n * Parse an optional uint64 encoded as a base-10 string into bigint, or undefined on invalid/empty.\n * @param raw - The raw string to parse.\n * @returns The parsed bigint, or undefined if the field is invalid or empty.\n */\nexport function parseOptionalUint64Decimal(raw: string | undefined): bigint | undefined {\n const s = (raw ?? \"\").trim();\n if (!s) return;\n // For optional filters, treat invalid input as \"unset\" rather than surfacing an error.\n if (!/^[0-9]+$/.test(s)) return;\n return BigInt(s);\n}\n\n/**\n * Parse an optional uint64 encoded as a base-10 string into bigint.\n * Empty values are omitted, but supplied invalid values are rejected.\n */\nexport function parseOptionalUint64DecimalStrict(\n raw: string | undefined,\n fieldName: string,\n): bigint | undefined {\n const s = (raw ?? \"\").trim();\n if (!s) return;\n if (!/^[0-9]+$/.test(s)) throw new Error(`${fieldName} must be a positive integer`);\n return BigInt(s);\n}\n\n/**\n * Parse an optional uint64-ish value (string/number/bigint) into bigint, or undefined on invalid/empty.\n * Accepts base-10 strings, numeric inputs (truncated), and bigint inputs.\n */\nexport function parseOptionalUint64Like(\n value: string | number | bigint | undefined | null,\n): bigint | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"bigint\") return value >= 0n ? value : undefined;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) return undefined;\n const n = Math.trunc(value);\n return n >= 0 ? BigInt(n) : undefined;\n }\n return parseOptionalUint64Decimal(value);\n}\n\n/**\n * Parse an optional positive integer-ish value (string/number) into a number, or undefined on invalid/empty.\n * Useful for common \"limit\" fields coming from UI inputs.\n */\nexport function parseOptionalPositiveIntLike(\n value: string | number | undefined | null,\n): number | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"string\") {\n const decimal = value.trim();\n if (!/^\\d+$/.test(decimal)) return undefined;\n const parsed = Number(decimal);\n return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : undefined;\n }\n return Number.isSafeInteger(value) && value > 0 ? value : undefined;\n}\n\n/**\n * Parse a positive integer-like value without losing precision.\n * Decimal strings may exceed JavaScript's safe-integer range; number inputs may not.\n */\nexport function parseOptionalPositiveBigIntLike(\n value: string | number | undefined | null,\n): bigint | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"number\") {\n return Number.isSafeInteger(value) && value > 0 ? BigInt(value) : undefined;\n }\n const decimal = value.trim();\n if (!/^\\d+$/.test(decimal)) return undefined;\n const parsed = BigInt(decimal);\n return parsed > 0n ? parsed : undefined;\n}\n\n/**\n * Convert a decimal string into a scaled bigint (e.g. 18dp quantity, 6dp price).\n * @param raw - The raw string to parse.\n * @param scale - The scale of the number.\n * @param fieldName - The name of the field to parse.\n * @returns The parsed bigint.\n * @throws An error if the field is required and not provided.\n * @throws An error if the field is not a positive number.\n */\nexport function decimalToScaledInt(raw: string, scale: number, fieldName: string): bigint {\n const s = (raw ?? \"\").trim();\n if (!s) throw new Error(`${fieldName} is required`);\n if (!/^[0-9]+(\\.[0-9]+)?$/.test(s)) throw new Error(`${fieldName} must be a positive number`);\n const [intPartRaw, fracRaw = \"\"] = s.split(\".\");\n if (fracRaw.length > scale) {\n throw new Error(`${fieldName} supports at most ${scale} decimal places`);\n }\n const intPart = intPartRaw?.replace(/^0+/, \"\") ?? \"0\";\n const fracPart = fracRaw.padEnd(scale, \"0\");\n const combined = `${intPart}${fracPart}`;\n return BigInt(combined ?? \"0\");\n}\n\n/**\n * Parse a quantity scaled to the given number of decimal places.\n * @param raw - The raw string to parse.\n * @param scale - The number of decimal places to scale to.\n * @param fieldName - The name of the field to parse.\n * @returns The parsed bigint.\n * @throws An error if the field is required and not provided.\n * @throws An error if the field is not a positive number.\n */\nexport function parseQtyScaled(raw: string, scale: number, fieldName: string): bigint {\n return decimalToScaledInt(raw, scale, fieldName);\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"numbers.js","names":[],"sources":["../../src/utils/numbers.ts"],"sourcesContent":["// Shared numeric helpers for gRPC/Connect clients.\n\n/**\n * Parse a required uint64 encoded as a base-10 string into bigint.\n * @param raw - The raw string to parse.\n * @param fieldName - The name of the field to parse.\n * @returns The parsed bigint.\n * @throws An error if the field is required and not provided.\n * @throws An error if the field is not a positive integer.\n */\nexport function parseRequiredUint64Decimal(raw: string, fieldName: string): bigint {\n const s = (raw ?? \"\").trim();\n if (!s) throw new Error(`${fieldName} is required`);\n if (!/^[0-9]+$/.test(s)) throw new Error(`${fieldName} must be a positive integer`);\n return BigInt(s);\n}\n\n/**\n * Parse an optional uint64 encoded as a base-10 string into bigint, or undefined on invalid/empty.\n * @param raw - The raw string to parse.\n * @returns The parsed bigint, or undefined if the field is invalid or empty.\n */\nexport function parseOptionalUint64Decimal(raw: string | undefined): bigint | undefined {\n const s = (raw ?? \"\").trim();\n if (!s) return;\n // For optional filters, treat invalid input as \"unset\" rather than surfacing an error.\n if (!/^[0-9]+$/.test(s)) return;\n return BigInt(s);\n}\n\n/**\n * Parse an optional uint64 encoded as a base-10 string into bigint.\n * Empty values are omitted, but supplied invalid values are rejected.\n */\nexport function parseOptionalUint64DecimalStrict(\n raw: string | undefined,\n fieldName: string,\n): bigint | undefined {\n const s = (raw ?? \"\").trim();\n if (!s) return;\n if (!/^[0-9]+$/.test(s)) throw new Error(`${fieldName} must be a positive integer`);\n return BigInt(s);\n}\n\n/**\n * Parse an optional uint64-ish value (string/number/bigint) into bigint, or undefined on invalid/empty.\n * Accepts base-10 strings, numeric inputs (truncated), and bigint inputs.\n */\nexport function parseOptionalUint64Like(\n value: string | number | bigint | undefined | null,\n): bigint | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"bigint\") return value >= 0n ? value : undefined;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value)) return undefined;\n const n = Math.trunc(value);\n return n >= 0 ? BigInt(n) : undefined;\n }\n return parseOptionalUint64Decimal(value);\n}\n\n/**\n * Parse an optional positive integer-ish value (string/number) into a number, or undefined on invalid/empty.\n * Useful for common \"limit\" fields coming from UI inputs.\n */\nexport function parseOptionalPositiveIntLike(\n value: string | number | undefined | null,\n): number | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"string\") {\n const decimal = value.trim();\n if (!/^\\d+$/.test(decimal)) return undefined;\n const parsed = Number(decimal);\n return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : undefined;\n }\n return Number.isSafeInteger(value) && value > 0 ? value : undefined;\n}\n\n/**\n * Parse a positive integer-like value without losing precision.\n * Decimal strings may exceed JavaScript's safe-integer range; number inputs may not.\n */\nexport function parseOptionalPositiveBigIntLike(\n value: string | number | undefined | null,\n): bigint | undefined {\n if (value === undefined || value === null) return undefined;\n if (typeof value === \"number\") {\n return Number.isSafeInteger(value) && value > 0 ? BigInt(value) : undefined;\n }\n const decimal = value.trim();\n if (!/^\\d+$/.test(decimal)) return undefined;\n const parsed = BigInt(decimal);\n return parsed > 0n ? parsed : undefined;\n}\n\n/**\n * Convert a decimal string into a scaled bigint (e.g. 18dp quantity, 6dp price).\n * @param raw - The raw string to parse.\n * @param scale - The scale of the number.\n * @param fieldName - The name of the field to parse.\n * @returns The parsed bigint.\n * @throws An error if the field is required and not provided.\n * @throws An error if the field is not a positive number.\n */\nexport function decimalToScaledInt(raw: string, scale: number, fieldName: string): bigint {\n const s = (raw ?? \"\").trim();\n if (!s) throw new Error(`${fieldName} is required`);\n if (!/^[0-9]+(\\.[0-9]+)?$/.test(s)) throw new Error(`${fieldName} must be a positive number`);\n const [intPartRaw, fracRaw = \"\"] = s.split(\".\");\n if (fracRaw.length > scale) {\n throw new Error(`${fieldName} supports at most ${scale} decimal places`);\n }\n const intPart = intPartRaw?.replace(/^0+/, \"\") ?? \"0\";\n const fracPart = fracRaw.padEnd(scale, \"0\");\n const combined = `${intPart}${fracPart}`;\n return BigInt(combined ?? \"0\");\n}\n\n/**\n * Parse a quantity scaled to the given number of decimal places.\n * @param raw - The raw string to parse.\n * @param scale - The number of decimal places to scale to.\n * @param fieldName - The name of the field to parse.\n * @returns The parsed bigint.\n * @throws An error if the field is required and not provided.\n * @throws An error if the field is not a positive number.\n */\nexport function parseQtyScaled(raw: string, scale: number, fieldName: string): bigint {\n return decimalToScaledInt(raw, scale, fieldName);\n}\n\n/**\n * Coerce optional UI number into non-negative integer.\n * @param value - The value to coerce.\n * @returns The coerced integer.\n */\nexport function toIntOrZero(value?: number | null): number {\n if (value == null || Number.isNaN(value)) return 0;\n return Math.max(0, Math.trunc(value));\n}\n\n/**\n * Coerce optional UI percentage into non-negative basis points integer.\n * @param value - The value to coerce.\n * @returns The coerced integer.\n */\nexport function toBpsOrZero(value?: number | null): number {\n if (value == null || Number.isNaN(value)) return 0;\n return Math.max(0, Math.trunc(value * 100));\n}\n\n/**\n * Convert basis points to percentage.\n * @param value - The value to convert.\n * @returns The converted percentage.\n */\nexport function bpsToPct(value?: number | null): number {\n if (value == null || Number.isNaN(value)) return 0;\n return value / 100;\n}\n"],"mappings":";;;;;AAkCA,SAAgB,iCACZ,KACA,WACkB;CAClB,MAAM,KAAK,OAAO,GAAA,CAAI,KAAK;CAC3B,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,WAAW,KAAK,CAAC,GAAG,MAAM,IAAI,MAAM,GAAG,UAAU,4BAA4B;CAClF,OAAO,OAAO,CAAC;AACnB;;;;;AAuBA,SAAgB,6BACZ,OACkB;CAClB,IAAI,UAAU,KAAA,KAAa,UAAU,MAAM,OAAO,KAAA;CAClD,IAAI,OAAO,UAAU,UAAU;EAC3B,MAAM,UAAU,MAAM,KAAK;EAC3B,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,KAAA;EACnC,MAAM,SAAS,OAAO,OAAO;EAC7B,OAAO,OAAO,cAAc,MAAM,KAAK,SAAS,IAAI,SAAS,KAAA;CACjE;CACA,OAAO,OAAO,cAAc,KAAK,KAAK,QAAQ,IAAI,QAAQ,KAAA;AAC9D;;;;;AAMA,SAAgB,gCACZ,OACkB;CAClB,IAAI,UAAU,KAAA,KAAa,UAAU,MAAM,OAAO,KAAA;CAClD,IAAI,OAAO,UAAU,UACjB,OAAO,OAAO,cAAc,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,KAAA;CAEtE,MAAM,UAAU,MAAM,KAAK;CAC3B,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,KAAA;CACnC,MAAM,SAAS,OAAO,OAAO;CAC7B,OAAO,SAAS,KAAK,SAAS,KAAA;AAClC;;;;;;AA2CA,SAAgB,YAAY,OAA+B;CACvD,IAAI,SAAS,QAAQ,OAAO,MAAM,KAAK,GAAG,OAAO;CACjD,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,CAAC;AACxC;;;;;;AAOA,SAAgB,YAAY,OAA+B;CACvD,IAAI,SAAS,QAAQ,OAAO,MAAM,KAAK,GAAG,OAAO;CACjD,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,GAAG,CAAC;AAC9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polyester/sdk",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript SDK providing access to APIs on Polyester Exchange.",
|
|
6
6
|
"homepage": "https://github.com/Fabric-Labs/polyester-sdk-typescript#readme",
|
|
@@ -106,7 +106,9 @@
|
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@changesets/cli": "2.31.1",
|
|
108
108
|
"@changesets/get-github-info": "0.8.0",
|
|
109
|
+
"@fast-check/vitest": "0.5.0",
|
|
109
110
|
"@types/bun": "1.3.14",
|
|
111
|
+
"fast-check": "4.10.2",
|
|
110
112
|
"oxfmt": "0.61.0",
|
|
111
113
|
"oxlint": "1.76.0",
|
|
112
114
|
"pkg-pr-new": "0.0.88",
|