@polyester/sdk 0.0.0 → 0.0.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 +6 -0
- package/dist/gen/auth/v1/address_book_pb.d.ts +1 -1
- package/dist/gen/auth/v1/api_keys_pb.d.ts +1 -1
- package/dist/gen/auth/v1/auth_pb.d.ts +1 -1
- package/dist/gen/auth/v1/mfa_pb.d.ts +1 -1
- package/dist/gen/auth/v1/policies_pb.d.ts +1 -1
- package/dist/gen/auth/v1/profile_pb.d.ts +1 -1
- package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
- package/dist/gen/auth/v1/social_verification_pb.d.ts +1 -1
- package/dist/gen/auth/v1/subaccounts_pb.d.ts +1 -1
- package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
- package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
- package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
- package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +1 -1
- package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +1 -1
- package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +1 -1
- package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
- package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +1 -1
- package/dist/gen/collab/v1/whiteboard_pb.d.ts +1 -1
- package/dist/gen/index.js +17 -17
- package/dist/gen/layout/v1/layout_pb.d.ts +1 -1
- package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/heatmap_pb.d.ts +1 -1
- package/dist/gen/marketdata/v1/marketdata_pb.d.ts +1 -1
- package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
- package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
- package/dist/gen/orders/v1/orders_pb.d.ts +1 -1
- package/dist/gen/orders/v1/orders_read_pb.d.ts +1 -1
- package/dist/gen/orders/v1/orders_read_pb.js +1 -1
- package/dist/gen/polychart/events/v1/polychart_events_pb.d.ts +1 -1
- package/dist/gen/polychart/v1/polychart_pb.d.ts +1 -1
- package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
- package/dist/gen/tradews/v1/trade_ws_pb.d.ts +1 -1
- package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +1 -1
- package/dist/gen/triggers/v1/triggers_pb.d.ts +1 -1
- package/dist/services/address-book/address-book.js +1 -1
- package/dist/services/address-book/address-book.schemas.js +2 -2
- package/dist/services/api-keys/api-keys.js +1 -1
- package/dist/services/api-keys/api-keys.schemas.js +1 -1
- package/dist/services/auth/profile/profile.js +1 -1
- package/dist/services/balances/balances.js +1 -1
- package/dist/services/balances/balances.schemas.js +1 -1
- package/dist/services/candles/candles.js +1 -1
- package/dist/services/candles/candles.schemas.js +1 -1
- package/dist/services/chain-analytics/chain-analytics.js +1 -1
- package/dist/services/chain-analytics/chain-analytics.schemas.js +1 -1
- package/dist/services/deposit/deposit.js +1 -1
- package/dist/services/guard-signer/guard-signer.js +1 -1
- package/dist/services/heatmap/heatmap.js +1 -1
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/internal-transfers/internal-transfers.js +1 -1
- package/dist/services/lifecycle/lifecycle.js +1 -1
- package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
- package/dist/services/market-data/market-data.js +1 -1
- package/dist/services/market-overview/market-overview.js +1 -1
- package/dist/services/market-overview/market-overview.schemas.js +1 -1
- package/dist/services/orderbook/orderbook.js +1 -1
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +14 -14
- package/dist/services/orders/orders-batch.schemas.js +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/orders/orders-output.schemas.js +1 -1
- package/dist/services/orders/orders.js +1 -1
- package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
- package/dist/services/policies/shared.js +1 -1
- package/dist/services/policies/subaccount-policies/subaccount-policies.js +1 -1
- package/dist/services/social-verification/social-verification.js +1 -1
- package/dist/services/subaccounts/subaccounts.js +2 -2
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +1 -1
- package/dist/services/subaccounts/subaccounts.schemas.js +1 -1
- package/dist/services/trades/trades.js +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
- package/dist/services/transfers/transfers.js +1 -1
- package/dist/services/transfers/transfers.schemas.js +1 -1
- package/dist/services/triggers/trigger-child-order.schemas.js +1 -1
- package/dist/services/triggers/trigger-input.schemas.js +1 -1
- package/dist/services/triggers/triggers-output.schemas.js +1 -1
- package/dist/services/triggers/triggers.codecs.js +1 -1
- package/dist/services/triggers/triggers.js +1 -1
- package/dist/services/whiteboard/whiteboard.js +1 -1
- package/dist/services/whiteboard/whiteboard.schemas.js +1 -1
- package/dist/services/zipper/zipper.js +1 -1
- package/dist/shared/connect-error-mapping.js +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/wired-services.js +16 -16
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ type TimestampInit = {
|
|
|
14
14
|
declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
15
15
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>]>;
|
|
16
16
|
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
|
|
17
|
-
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 200 | 500 |
|
|
17
|
+
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 200 | 500 | 1000 | 100 | 50, HeatmapDepth>]>;
|
|
18
18
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
|
|
19
19
|
readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>, undefined>;
|
|
20
20
|
readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
|
|
@@ -227,7 +227,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
|
|
|
227
227
|
declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
228
228
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
229
229
|
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
230
|
-
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | 200 | "unspecified" | 500 |
|
|
230
|
+
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | 200 | "unspecified" | 500 | 1000 | 100 | 50>]>;
|
|
231
231
|
readonly chain: v.OptionalSchema<v.ObjectSchema<{
|
|
232
232
|
readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
|
|
233
233
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -287,7 +287,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
289
|
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
290
|
-
depth: 1 | 5 | 10 | 20 | 200 | "unspecified" | 500 |
|
|
290
|
+
depth: 1 | 5 | 10 | 20 | 200 | "unspecified" | 500 | 1000 | 100 | 50;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
293
293
|
tsSec: number;
|
|
@@ -347,7 +347,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
349
|
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
350
|
-
depth: 1 | 5 | 10 | 20 | 200 | "unspecified" | 500 |
|
|
350
|
+
depth: 1 | 5 | 10 | 20 | 200 | "unspecified" | 500 | 1000 | 100 | 50;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
353
353
|
tsSec: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
3
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
4
|
+
import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
|
|
5
5
|
import { createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema } from "./internal-transfers.schemas.js";
|
|
6
6
|
import { createClient } from "@connectrpc/connect";
|
|
7
7
|
import * as v from "valibot";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FlowDetailViewSchema, FlowSummaryViewSchema, GetFlowByIdRequestSchema, LifecycleReadService } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { isDev } from "../../utils/is-dev.js";
|
|
3
|
+
import { FlowDetailViewSchema, FlowSummaryViewSchema, GetFlowByIdRequestSchema, LifecycleReadService } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
4
4
|
import { GetLifecycleFlowInputSchema, GetLifecycleFlowOutputSchema, LifecycleFlowDetailSchema, LifecycleFlowSummarySchema, ListLifecycleFlowsByTxInputSchema, ListLifecycleFlowsByTxOutputSchema, ListLifecycleFlowsInputSchema, ListLifecycleFlowsOutputSchema } from "./lifecycle.schemas.js";
|
|
5
5
|
import { create } from "@bufbuild/protobuf";
|
|
6
6
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FlowDomain, FlowKind, FlowState, LifecycleSource, RequestFeeStatus } from "../../gen/chain/lifecycle/v1/types_pb.js";
|
|
2
|
-
import { FlowStep, FlowStepActivityKind, FlowTimelineStatus } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
3
1
|
import { idToBigInt } from "../../utils/base58-id.js";
|
|
4
2
|
import { PublicIdSchema } from "../../shared/schemas.js";
|
|
5
3
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
6
4
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
7
5
|
import { fromU128 } from "../../utils/u128.js";
|
|
6
|
+
import { FlowDomain, FlowKind, FlowState, LifecycleSource, RequestFeeStatus } from "../../gen/chain/lifecycle/v1/types_pb.js";
|
|
7
|
+
import { FlowStep, FlowStepActivityKind, FlowTimelineStatus } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
|
|
8
8
|
import { LIFECYCLE_FLOW_KIND_VALUES, LIFECYCLE_FLOW_STATE_VALUES, LIFECYCLE_LIST_ORDER_BY_VALUES, LIFECYCLE_LIST_SCOPE_VALUES, LIFECYCLE_SORT_VALUES, LIFECYCLE_TX_LOOKUP_KIND_VALUES, LifecycleFlowDomainCodec, LifecycleFlowKindCodec, LifecycleFlowStateCodec, LifecycleFlowStepActivityKindCodec, LifecycleFlowStepCodec, LifecycleFlowTimelineStatusCodec, LifecycleListOrderByCodec, LifecycleListScopeCodec, LifecycleRequestFeeStatusCodec, LifecycleSortCodec, LifecycleSourceCodec, LifecycleTxLookupKindCodec, lifecycleReasonFromCode } from "./lifecycle.codecs.js";
|
|
9
9
|
import * as v from "valibot";
|
|
10
10
|
//#region src/services/lifecycle/lifecycle.schemas.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MarketDataService as MarketDataService$1, MarketTradeSchema } from "../../gen/marketdata/v1/marketdata_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
3
|
+
import { MarketDataService as MarketDataService$1, MarketTradeSchema } from "../../gen/marketdata/v1/marketdata_pb.js";
|
|
4
4
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
5
5
|
import { GetMarketTradesInputSchema, SpotConfigSchema, createMarketTradeSchema } from "./market-data.schemas.js";
|
|
6
6
|
import { isDev } from "../../utils/is-dev.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MarketOverviewBatchSchema, MarketOverviewService as MarketOverviewService$1 } from "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
4
3
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
4
|
+
import { MarketOverviewBatchSchema, MarketOverviewService as MarketOverviewService$1 } from "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
5
5
|
import { snapshotThenStream } from "../../realtime/snapshot-then-stream.js";
|
|
6
6
|
import { ListMarketOverviewInputSchema, createMarketOverviewSchema } from "./market-overview.schemas.js";
|
|
7
7
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SparklineInterval } from "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
2
1
|
import { tsNsToMs } from "../../utils/time.js";
|
|
3
2
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
4
3
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
4
|
+
import { SparklineInterval } from "../../gen/marketoverview/v1/marketoverview_pb.js";
|
|
5
5
|
import { MARKET_OVERVIEW_ORDER_BY_VALUES, MARKET_OVERVIEW_SORT_VALUES, MarketOverviewOrderByCodec, MarketOverviewSortCodec, SPARKLINE_INTERVAL_VALUES, SparklineIntervalCodec } from "./market-overview.codecs.js";
|
|
6
6
|
import * as v from "valibot";
|
|
7
7
|
//#region src/services/market-overview/market-overview.schemas.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { GetOrderBookResponseSchema, OrderBookDeltaSchema, OrderbookService as OrderbookService$1 } from "../../gen/orderbook/v1/orderbook_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
4
3
|
import { createReadyGate, decimalInputToScaled } from "../../shared/decimal-surface.js";
|
|
5
4
|
import { isResourceNotFoundError } from "../../utils/errors.js";
|
|
6
5
|
import { snapshotThenStream } from "../../realtime/snapshot-then-stream.js";
|
|
6
|
+
import { GetOrderBookResponseSchema, OrderBookDeltaSchema, OrderbookService as OrderbookService$1 } from "../../gen/orderbook/v1/orderbook_pb.js";
|
|
7
7
|
import { GetOrderbookInputSchema, createOrderbookDataSchema, formatOrderbookLevel } from "./orderbook.schemas.js";
|
|
8
8
|
import { toBig } from "../../utils/u128.js";
|
|
9
9
|
import { create } from "@bufbuild/protobuf";
|
|
@@ -11,7 +11,7 @@ declare const GetOrderbookInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema
|
|
|
11
11
|
depth: number;
|
|
12
12
|
}, {
|
|
13
13
|
symbol: string;
|
|
14
|
-
depth: 1 | 5 | 10 | 20 | 200 | 500 |
|
|
14
|
+
depth: 1 | 5 | 10 | 20 | 200 | 500 | 1000 | 100 | 50;
|
|
15
15
|
protoDepth: Depth;
|
|
16
16
|
}>]>;
|
|
17
17
|
type GetOrderbookInput = v.InferInput<typeof GetOrderbookInputSchema>;
|
|
@@ -2736,18 +2736,18 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
2736
2736
|
readonly admissionStatus: v.SchemaWithPipe<readonly [v.EnumSchema<typeof BatchReplaceAdmissionStatus, undefined>, v.TransformAction<BatchReplaceAdmissionStatus, "unspecified" | "rejected" | "admitted" | "partially_admitted">]>;
|
|
2737
2737
|
readonly items: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2738
2738
|
readonly itemIndex: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
2739
|
-
readonly phase: v.SchemaWithPipe<readonly [v.EnumSchema<typeof BatchReplacePhase, undefined>, v.TransformAction<BatchReplacePhase, "unspecified" | "terminal" | "
|
|
2739
|
+
readonly phase: v.SchemaWithPipe<readonly [v.EnumSchema<typeof BatchReplacePhase, undefined>, v.TransformAction<BatchReplacePhase, "unspecified" | "terminal" | "rejected" | "admitted" | "working">]>;
|
|
2740
2740
|
readonly oldOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2741
2741
|
readonly replacementOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2742
|
-
readonly orderStatus: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "
|
|
2742
|
+
readonly orderStatus: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled">]>;
|
|
2743
2743
|
readonly code: v.StringSchema<undefined>;
|
|
2744
2744
|
readonly updatedTsNs: v.BigintSchema<undefined>;
|
|
2745
2745
|
}, undefined>, v.TransformAction<{
|
|
2746
2746
|
itemIndex: number;
|
|
2747
|
-
phase: "unspecified" | "terminal" | "
|
|
2747
|
+
phase: "unspecified" | "terminal" | "rejected" | "admitted" | "working";
|
|
2748
2748
|
oldOrderId?: string | undefined;
|
|
2749
2749
|
replacementOrderId?: string | undefined;
|
|
2750
|
-
orderStatus: "pending" | "unspecified" | "canceled" | "
|
|
2750
|
+
orderStatus: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
2751
2751
|
code: string;
|
|
2752
2752
|
updatedTsNs: bigint;
|
|
2753
2753
|
}, {
|
|
@@ -2755,10 +2755,10 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
2755
2755
|
updatedTs: number;
|
|
2756
2756
|
updatedTsNs: string;
|
|
2757
2757
|
itemIndex: number;
|
|
2758
|
-
phase: "unspecified" | "terminal" | "
|
|
2758
|
+
phase: "unspecified" | "terminal" | "rejected" | "admitted" | "working";
|
|
2759
2759
|
oldOrderId?: string | undefined;
|
|
2760
2760
|
replacementOrderId?: string | undefined;
|
|
2761
|
-
orderStatus: "pending" | "unspecified" | "canceled" | "
|
|
2761
|
+
orderStatus: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
2762
2762
|
}>]>, undefined>;
|
|
2763
2763
|
readonly acceptedCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
2764
2764
|
readonly rejectedCount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -2772,10 +2772,10 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
2772
2772
|
updatedTs: number;
|
|
2773
2773
|
updatedTsNs: string;
|
|
2774
2774
|
itemIndex: number;
|
|
2775
|
-
phase: "unspecified" | "terminal" | "
|
|
2775
|
+
phase: "unspecified" | "terminal" | "rejected" | "admitted" | "working";
|
|
2776
2776
|
oldOrderId?: string | undefined;
|
|
2777
2777
|
replacementOrderId?: string | undefined;
|
|
2778
|
-
orderStatus: "pending" | "unspecified" | "canceled" | "
|
|
2778
|
+
orderStatus: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
2779
2779
|
}[];
|
|
2780
2780
|
acceptedCount: number;
|
|
2781
2781
|
rejectedCount: number;
|
|
@@ -2789,10 +2789,10 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
2789
2789
|
updatedTs: number;
|
|
2790
2790
|
updatedTsNs: string;
|
|
2791
2791
|
itemIndex: number;
|
|
2792
|
-
phase: "unspecified" | "terminal" | "
|
|
2792
|
+
phase: "unspecified" | "terminal" | "rejected" | "admitted" | "working";
|
|
2793
2793
|
oldOrderId?: string | undefined;
|
|
2794
2794
|
replacementOrderId?: string | undefined;
|
|
2795
|
-
orderStatus: "pending" | "unspecified" | "canceled" | "
|
|
2795
|
+
orderStatus: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
2796
2796
|
}[];
|
|
2797
2797
|
acceptedCount: number;
|
|
2798
2798
|
rejectedCount: number;
|
|
@@ -2806,10 +2806,10 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
2806
2806
|
updatedTs: number;
|
|
2807
2807
|
updatedTsNs: string;
|
|
2808
2808
|
itemIndex: number;
|
|
2809
|
-
phase: "unspecified" | "terminal" | "
|
|
2809
|
+
phase: "unspecified" | "terminal" | "rejected" | "admitted" | "working";
|
|
2810
2810
|
oldOrderId?: string | undefined;
|
|
2811
2811
|
replacementOrderId?: string | undefined;
|
|
2812
|
-
orderStatus: "pending" | "unspecified" | "canceled" | "
|
|
2812
|
+
orderStatus: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
2813
2813
|
}[];
|
|
2814
2814
|
acceptedCount: number;
|
|
2815
2815
|
rejectedCount: number;
|
|
@@ -2827,10 +2827,10 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
2827
2827
|
updatedTs: number;
|
|
2828
2828
|
updatedTsNs: string;
|
|
2829
2829
|
itemIndex: number;
|
|
2830
|
-
phase: "unspecified" | "terminal" | "
|
|
2830
|
+
phase: "unspecified" | "terminal" | "rejected" | "admitted" | "working";
|
|
2831
2831
|
oldOrderId?: string | undefined;
|
|
2832
2832
|
replacementOrderId?: string | undefined;
|
|
2833
|
-
orderStatus: "pending" | "unspecified" | "canceled" | "
|
|
2833
|
+
orderStatus: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
2834
2834
|
}[];
|
|
2835
2835
|
acceptedCount: number;
|
|
2836
2836
|
rejectedCount: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BatchReplaceAdmissionStatus, BatchReplaceItemAdmissionStatus, RiskPolicySchema } from "../../gen/orders/v1/orders_pb.js";
|
|
2
|
-
import { BatchReplacePhase, OrderStatus } from "../../gen/orders/v1/orders_read_pb.js";
|
|
3
2
|
import { formatId } from "../../utils/base58-id.js";
|
|
4
3
|
import { tsNsToMs } from "../../utils/time.js";
|
|
5
4
|
import { OptionalPublicIdSchema, PublicIdSchema, idInputSchema } from "../../shared/schemas.js";
|
|
@@ -7,6 +6,7 @@ import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
|
7
6
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
8
7
|
import { positiveDecimalInputToScaled, scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
9
8
|
import { SideSchema } from "../shared.js";
|
|
9
|
+
import { BatchReplacePhase, OrderStatus } from "../../gen/orders/v1/orders_read_pb.js";
|
|
10
10
|
import { OrderSideCodec } from "./order-enums.codecs.js";
|
|
11
11
|
import { BatchReplaceAdmissionStatusCodec, BatchReplaceItemAdmissionStatusCodec, BatchReplacePhaseCodec, OrderStatusCodec } from "./orders.codecs.js";
|
|
12
12
|
import { createRequiredRiskPolicyInputSchema } from "./orders-risk.schemas.js";
|
|
@@ -9,7 +9,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
9
9
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
10
10
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
11
11
|
readonly side: v.EnumSchema<typeof Side, undefined>;
|
|
12
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "
|
|
12
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled">]>;
|
|
13
13
|
readonly orderType: v.NumberSchema<undefined>;
|
|
14
14
|
readonly timeInForce: v.NumberSchema<undefined>;
|
|
15
15
|
readonly selfTradePreventionMode: v.NumberSchema<undefined>;
|
|
@@ -90,7 +90,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
90
90
|
symbolId: number;
|
|
91
91
|
clientOrderId: string;
|
|
92
92
|
side: Side;
|
|
93
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
93
|
+
status: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
94
94
|
orderType: number;
|
|
95
95
|
timeInForce: number;
|
|
96
96
|
selfTradePreventionMode: number;
|
|
@@ -182,7 +182,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
182
182
|
orderId: string;
|
|
183
183
|
symbolId: number;
|
|
184
184
|
clientOrderId: string;
|
|
185
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
185
|
+
status: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled" | "partial";
|
|
186
186
|
side: "unspecified" | "buy" | "sell";
|
|
187
187
|
orderType: "unspecified" | "limit" | "market";
|
|
188
188
|
timeInForce: "unspecified" | "GTC" | "IOC" | "FOK";
|
|
@@ -283,7 +283,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
283
283
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
284
284
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
285
285
|
readonly side: v.EnumSchema<typeof Side, undefined>;
|
|
286
|
-
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "
|
|
286
|
+
readonly status: v.SchemaWithPipe<readonly [v.EnumSchema<typeof OrderStatus, undefined>, v.TransformAction<OrderStatus, "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled">]>;
|
|
287
287
|
readonly orderType: v.NumberSchema<undefined>;
|
|
288
288
|
readonly timeInForce: v.NumberSchema<undefined>;
|
|
289
289
|
readonly selfTradePreventionMode: v.NumberSchema<undefined>;
|
|
@@ -364,7 +364,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
364
364
|
symbolId: number;
|
|
365
365
|
clientOrderId: string;
|
|
366
366
|
side: Side;
|
|
367
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
367
|
+
status: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled";
|
|
368
368
|
orderType: number;
|
|
369
369
|
timeInForce: number;
|
|
370
370
|
selfTradePreventionMode: number;
|
|
@@ -456,7 +456,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
456
456
|
orderId: string;
|
|
457
457
|
symbolId: number;
|
|
458
458
|
clientOrderId: string;
|
|
459
|
-
status: "pending" | "unspecified" | "canceled" | "
|
|
459
|
+
status: "pending" | "unspecified" | "canceled" | "rejected" | "working" | "pending_cancel" | "filled" | "partial";
|
|
460
460
|
side: "unspecified" | "buy" | "sell";
|
|
461
461
|
orderType: "unspecified" | "limit" | "market";
|
|
462
462
|
timeInForce: "unspecified" | "GTC" | "IOC" | "FOK";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Side } from "../../gen/orders/v1/orders_pb.js";
|
|
2
|
-
import { OrderOriginScope, OrderStatus, OrderTriggerType } from "../../gen/orders/v1/orders_read_pb.js";
|
|
3
2
|
import { formatId } from "../../utils/base58-id.js";
|
|
4
3
|
import { tsNsToMs } from "../../utils/time.js";
|
|
5
4
|
import { OptionalPublicIdSchema } from "../../shared/schemas.js";
|
|
6
5
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
7
6
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
8
7
|
import { fromU128 } from "../../utils/u128.js";
|
|
8
|
+
import { OrderOriginScope, OrderStatus, OrderTriggerType } from "../../gen/orders/v1/orders_read_pb.js";
|
|
9
9
|
import { FeeAssetCodec, OrderSideCodec, OrderTypeCodec, SelfTradePreventionModeCodec, TimeInForceCodec } from "./order-enums.codecs.js";
|
|
10
10
|
import { OrderOriginScopeCodec, OrderStatusCodec, OrderTriggerTypeCodec } from "./orders.codecs.js";
|
|
11
11
|
import { createUserTradeSchema } from "../trades/trades.schemas.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OrdersService as OrdersService$1 } from "../../gen/orders/v1/orders_pb.js";
|
|
2
|
-
import { OrderSchema, OrdersReadService } from "../../gen/orders/v1/orders_read_pb.js";
|
|
3
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
3
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
5
4
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
6
5
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
7
6
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
7
|
+
import { OrderSchema, OrdersReadService } from "../../gen/orders/v1/orders_read_pb.js";
|
|
8
8
|
import { CancelAllOrdersInputSchema, CancelAllOrdersResponseSchema, CancelOrderInputSchema, CancelOrderResultSchema, GetOrderDetailsInputSchema, OpenOrdersInputSchema, OrderHistoryInputSchema, createCreateOrderResultSchema, createNewOrderInputSchema, createPreviewOrderResultSchema } from "./orders-input.schemas.js";
|
|
9
9
|
import { ModifyOrderResultSchema, assertKnownModifyOrderInputKeys, createModifyOrderInputSchema } from "./orders-modify.schemas.js";
|
|
10
10
|
import { BatchCancelOrdersInputSchema, BatchCancelOrdersResultSchema, BatchReplaceOrdersResultSchema, CancelAllAfterInputSchema, CancelAllAfterResultSchema, GetBatchReplaceStatusInputSchema, GetBatchReplaceStatusResultSchema, assertKnownBatchReplaceOrderItemInputKeys, createBatchCreateOrdersInputSchema, createBatchCreateOrdersResultSchema, createBatchReplaceOrdersInputSchema } from "./orders-batch.schemas.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PolicyService } from "../../../gen/auth/v1/policies_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../../shared/request-options.js";
|
|
3
2
|
import { removeUndefined } from "../../../utils/remove-undefined.js";
|
|
3
|
+
import { PolicyService } from "../../../gen/auth/v1/policies_pb.js";
|
|
4
4
|
import { PolicyIdSchema } from "../shared.js";
|
|
5
5
|
import { ApiKeyPolicySchema, ApplyApiKeyPolicyInputSchema, CreateApiKeyPolicyInputSchema, DEFAULT_API_KEY_POLICY, GetApiKeyPolicyInputSchema, ListApiKeyPoliciesInputSchema, ListApiKeyPoliciesResponseSchema, UpdateApiKeyPolicyInputSchema } from "./api-key-policies.schemas.js";
|
|
6
6
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MarketScope_Value, PolicyAction } from "../../gen/auth/v1/policies_pb.js";
|
|
2
1
|
import { idToBigInt } from "../../utils/base58-id.js";
|
|
2
|
+
import { MarketScope_Value, PolicyAction } from "../../gen/auth/v1/policies_pb.js";
|
|
3
3
|
import * as v from "valibot";
|
|
4
4
|
//#region src/services/policies/shared.ts
|
|
5
5
|
const SpotMarketRuleSchema = v.object({ symbol: v.string() });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PolicyService, SubaccountPolicyViewSchema } from "../../../gen/auth/v1/policies_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../../shared/request-options.js";
|
|
3
2
|
import { removeUndefined } from "../../../utils/remove-undefined.js";
|
|
4
3
|
import { resolveAccountScopedInput } from "../../subaccount-resolver.js";
|
|
4
|
+
import { PolicyService, SubaccountPolicyViewSchema } from "../../../gen/auth/v1/policies_pb.js";
|
|
5
5
|
import { ApplySubaccountPolicyInputSchema, CreateSubaccountPolicyInputSchema, GetSubaccountPolicyInputSchema, ListSubaccountPoliciesInputSchema, PolicyIdSchema, SubaccountPolicySchema, UpdateSubaccountPolicyInputSchema } from "./subaccount-policies.schemas.js";
|
|
6
6
|
import { createClient } from "@connectrpc/connect";
|
|
7
7
|
import * as v from "valibot";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SocialVerificationService as SocialVerificationService$1 } from "../../gen/auth/v1/social_verification_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
2
|
+
import { SocialVerificationService as SocialVerificationService$1 } from "../../gen/auth/v1/social_verification_pb.js";
|
|
3
3
|
import { GetVerificationResponseSchema, SocialProviderInputSchema, StartVerificationInputSchema, StartVerificationResponseSchema, VerificationReadyResponseSchema } from "./social-verification.schemas.js";
|
|
4
4
|
import { createClient } from "@connectrpc/connect";
|
|
5
5
|
import * as v from "valibot";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ApiKeySchema } from "../../gen/auth/v1/api_keys_pb.js";
|
|
2
|
-
import { SubaccountSchema, SubaccountService, SubaccountViewService } from "../../gen/auth/v1/subaccounts_pb.js";
|
|
3
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
2
|
import { formatId } from "../../utils/base58-id.js";
|
|
3
|
+
import { ApiKeySchema } from "../../gen/auth/v1/api_keys_pb.js";
|
|
5
4
|
import { ApiKeySchema as ApiKeySchema$1 } from "../api-keys/api-keys.schemas.js";
|
|
5
|
+
import { SubaccountSchema, SubaccountService, SubaccountViewService } from "../../gen/auth/v1/subaccounts_pb.js";
|
|
6
6
|
import { DEFAULT_SUBACCOUNT_POLICY, SubaccountPolicySchema } from "../policies/subaccount-policies/subaccount-policies.schemas.js";
|
|
7
7
|
import { SubaccountPoliciesService } from "../policies/subaccount-policies/subaccount-policies.js";
|
|
8
8
|
import { CreateSubaccountInputSchema, CreateSubaccountResultSchema, DeleteSubaccountInputSchema, InviteSubaccountMemberInputSchema, ListSubaccountInvitesInputSchema, RemoveSubaccountMemberInputSchema, RespondSubaccountInviteInputSchema, SetSubaccountMemberMfaRequirementInputSchema, SubaccountActivityEventSchema, SubaccountActivityInputSchema, SubaccountIdInputSchema, SubaccountInviteSchema, SubaccountMemberSchema, SubaccountMutationResultSchema, SubaccountSchema as SubaccountSchema$1, UpdateSubaccountInputSchema, UpdateSubaccountMemberRoleInputSchema } from "./subaccounts.schemas.js";
|
|
@@ -244,7 +244,7 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
244
244
|
nanos: number;
|
|
245
245
|
} | undefined, number | undefined>]>;
|
|
246
246
|
readonly entityKind: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEntityKind, undefined>, v.TransformAction<ActivityEntityKind, "account" | "unspecified" | "subaccount" | "destination" | "session" | "policy" | "api_key" | "member" | "invite" | "security">]>;
|
|
247
|
-
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "enabled" | "disabled" | "unspecified" | "
|
|
247
|
+
readonly eventAction: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventAction, undefined>, v.TransformAction<ActivityEventAction, "enabled" | "disabled" | "unspecified" | "revoked" | "failed" | "deleted" | "created" | "updated" | "removed" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
248
248
|
readonly source: v.SchemaWithPipe<readonly [v.EnumSchema<typeof ActivityEventSource, undefined>, v.TransformAction<ActivityEventSource, "unspecified" | "web" | "mobile" | "api">]>;
|
|
249
249
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
250
250
|
readonly userAgent: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ActivityEntityKind, ActivityEventAction, ActivityEventSource, SubaccountInviteStatus, SubaccountRole } from "../../gen/auth/v1/subaccounts_pb.js";
|
|
2
1
|
import { tsObjToMs, tsObjToNsString } from "../../utils/time.js";
|
|
3
2
|
import { BigIntStringSchema, OptionalTimestampMsSchema, PublicIdSchema, TimestampSchema, idInputSchema, positiveBigintStringInputSchema } from "../../shared/schemas.js";
|
|
4
3
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
5
4
|
import { buildProtoPatch, defineProtoPatchFields } from "../../utils/proto-patch.js";
|
|
5
|
+
import { ActivityEntityKind, ActivityEventAction, ActivityEventSource, SubaccountInviteStatus, SubaccountRole } from "../../gen/auth/v1/subaccounts_pb.js";
|
|
6
6
|
import { ActivityEntityKindCodec, ActivityEventActionCodec, ActivityEventSourceCodec, InviteActionCodec, InviteStatusCodec, SUBACCOUNT_STATUS_VALUES, SubaccountRoleCodec, SubaccountStatusCodec } from "./subaccounts.codecs.js";
|
|
7
7
|
import * as v from "valibot";
|
|
8
8
|
const SubaccountRoleSchema = v.picklist([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OrdersReadService, UserTradeSchema } from "../../gen/orders/v1/orders_read_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
3
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
5
4
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
6
5
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
6
|
+
import { OrdersReadService, UserTradeSchema } from "../../gen/orders/v1/orders_read_pb.js";
|
|
7
7
|
import { GetUserTradesInputSchema, createUserTradeSchema } from "./trades.schemas.js";
|
|
8
8
|
import { createClient } from "@connectrpc/connect";
|
|
9
9
|
import * as v from "valibot";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { WithdrawService } from "../../gen/chain/withdraw/v1/withdraw_pb.js";
|
|
2
1
|
import { ValidationError } from "../../shared/errors.js";
|
|
3
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
3
|
import { idToBigInt } from "../../utils/base58-id.js";
|
|
5
4
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
6
5
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
7
6
|
import { checksumEvmAddress, evmHexToBytes, evmUtf8ToBytes, keccak256Hex } from "../../utils/evm.js";
|
|
7
|
+
import { WithdrawService } from "../../gen/chain/withdraw/v1/withdraw_pb.js";
|
|
8
8
|
import { CreateTradingWithdrawResultSchema, CreateWalletTradingWithdrawResultSchema, createCreateTradingWithdrawToExternalChainInputSchema, createCreateTradingWithdrawToFundingInputSchema } from "./trading-withdraws.schemas.js";
|
|
9
9
|
import { createClient } from "@connectrpc/connect";
|
|
10
10
|
import * as v from "valibot";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LedgerReadService, TransferRowSchema } from "../../gen/ledger/read/v1/ledger_read_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
3
|
+
import { LedgerReadService, TransferRowSchema } from "../../gen/ledger/read/v1/ledger_read_pb.js";
|
|
4
4
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
5
5
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
6
6
|
import { ListTransfersInputSchema, createLedgerTransferSchema } from "./transfers.schemas.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { TransferSideKind } from "../../gen/ledger/read/v1/ledger_read_pb.js";
|
|
2
1
|
import { wireTimestampToMs } from "../../utils/time.js";
|
|
3
2
|
import { OptionalPublicIdSchema, OptionalTimestampMsToUsInputSchema } from "../../shared/schemas.js";
|
|
4
3
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
5
4
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
5
|
+
import { TransferSideKind } from "../../gen/ledger/read/v1/ledger_read_pb.js";
|
|
6
6
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
7
7
|
import { fromU128 } from "../../utils/u128.js";
|
|
8
8
|
import { AccountCodeCodec, TRANSFER_CODE_VALUES, TransferCodeCodec } from "../../shared/ledger-codes.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TriggerLimitFokSchema, TriggerLimitGtcSchema, TriggerLimitIocSchema, TriggerMarketIocSchema, TwapLimitGtcSchema, TwapMarketIocSchema } from "../../gen/triggers/v1/triggers_pb.js";
|
|
2
1
|
import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
|
|
3
2
|
import { positiveDecimalInputToScaled } from "../../shared/decimal-surface.js";
|
|
4
3
|
import { FEE_ASSET_VALUES, FeeAssetCodec, ORDER_SIDE_VALUES, OrderSideCodec, SELF_TRADE_PREVENTION_MODE_VALUES, SelfTradePreventionModeCodec } from "../orders/order-enums.codecs.js";
|
|
4
|
+
import { TriggerLimitFokSchema, TriggerLimitGtcSchema, TriggerLimitIocSchema, TriggerMarketIocSchema, TwapLimitGtcSchema, TwapMarketIocSchema } from "../../gen/triggers/v1/triggers_pb.js";
|
|
5
5
|
import { create } from "@bufbuild/protobuf";
|
|
6
6
|
import * as v from "valibot";
|
|
7
7
|
//#region src/services/triggers/trigger-child-order.schemas.ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "../../gen/orders/v1/orders_pb.js";
|
|
2
|
-
import "../../gen/triggers/v1/triggers_pb.js";
|
|
3
2
|
import { idToBigInt } from "../../utils/base58-id.js";
|
|
4
3
|
import { parseOptionalPositiveIntLike } from "../../utils/numbers.js";
|
|
5
4
|
import { idInputSchema } from "../../shared/schemas.js";
|
|
@@ -8,6 +7,7 @@ import { CatalogConversionError } from "../../catalogs/types.js";
|
|
|
8
7
|
import { positiveDecimalInputToScaled } from "../../shared/decimal-surface.js";
|
|
9
8
|
import { BpsStringOrNumberInputSchema, NoneInputSchema } from "../shared.js";
|
|
10
9
|
import { OrderSideCodec } from "../orders/order-enums.codecs.js";
|
|
10
|
+
import "../../gen/triggers/v1/triggers_pb.js";
|
|
11
11
|
import { TRIGGER_EVENT_TYPE_VALUES, TRIGGER_STATUS_FILTER_VALUES, TRIGGER_TYPE_VALUES, TriggerEventTypeCodec, TriggerStatusCodec, TriggerTypeCodec } from "./triggers.codecs.js";
|
|
12
12
|
import { BaseTriggerFieldsSchema, ConditionalExecutionInputSchema, DecimalInputStringSchema, LimitConditionalExecutionInputSchema, TriggerSideInputSchema, TwapExecutionInputSchema, buildConditionalExecution, buildTriggerIntentBase, buildTwapExecution } from "./trigger-child-order.schemas.js";
|
|
13
13
|
import * as v from "valibot";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FeeAsset, SelfTradePreventionMode, Side, TriggerDirection, TriggerPriceSource } from "../../gen/orders/v1/orders_pb.js";
|
|
2
|
-
import { LadderDistribution, TriggerEventType, TriggerStatus, TriggerType } from "../../gen/triggers/v1/triggers_pb.js";
|
|
3
2
|
import { formatId } from "../../utils/base58-id.js";
|
|
4
3
|
import { tsNsToMs } from "../../utils/time.js";
|
|
5
4
|
import { BigIntStringSchema, OptionalTimestampMsSchema, PublicIdSchema, TimestampSchema } from "../../shared/schemas.js";
|
|
6
5
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
7
6
|
import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
|
|
8
7
|
import { FeeAssetCodec, OrderSideCodec, SelfTradePreventionModeCodec, TriggerPriceSourceCodec } from "../orders/order-enums.codecs.js";
|
|
8
|
+
import { LadderDistribution, TriggerEventType, TriggerStatus, TriggerType } from "../../gen/triggers/v1/triggers_pb.js";
|
|
9
9
|
import { LadderDistributionCodec, TriggerDirectionCodec, TriggerEventTypeCodec, TriggerStatusCodec, TriggerTypeCodec } from "./triggers.codecs.js";
|
|
10
10
|
import * as v from "valibot";
|
|
11
11
|
//#region src/services/triggers/triggers-output.schemas.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../gen/orders/v1/orders_pb.js";
|
|
2
|
-
import "../../gen/triggers/v1/triggers_pb.js";
|
|
3
2
|
import { FEE_ASSET_VALUES, FeeAssetCodec, ORDER_SIDE_VALUES, OrderSideCodec, SELF_TRADE_PREVENTION_MODE_VALUES, SelfTradePreventionModeCodec, TriggerPriceSourceCodec } from "../orders/order-enums.codecs.js";
|
|
3
|
+
import "../../gen/triggers/v1/triggers_pb.js";
|
|
4
4
|
//#region src/services/triggers/triggers.codecs.ts
|
|
5
5
|
const TRIGGER_TYPE_VALUES = [
|
|
6
6
|
"stop_loss",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TriggerEventSchema, TriggerSchema, TriggersService as TriggersService$1 } from "../../gen/triggers/v1/triggers_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
4
3
|
import { resolveAccountScopedInput } from "../subaccount-resolver.js";
|
|
5
4
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
6
5
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
6
|
+
import { TriggerEventSchema, TriggerSchema, TriggersService as TriggersService$1 } from "../../gen/triggers/v1/triggers_pb.js";
|
|
7
7
|
import { CancelTriggerInputSchema, GetTriggerInputSchema, ListTriggerEventsInputSchema, ListTriggersInputSchema, PauseTriggerInputSchema, ResumeTriggerInputSchema, createCreateTriggerInputSchema, createModifyTriggerInputSchema } from "./trigger-input.schemas.js";
|
|
8
8
|
import { CancelTriggerResultSchema, CreateTriggerResultSchema, ModifyTriggerResultSchema, PauseTriggerResultSchema, ResumeTriggerResultSchema, createTriggerEventSchema, createTriggerSchema } from "./triggers-output.schemas.js";
|
|
9
9
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WhiteboardService as WhiteboardService$1 } from "../../gen/collab/v1/whiteboard_pb.js";
|
|
2
1
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
3
2
|
import { removeUndefined } from "../../utils/remove-undefined.js";
|
|
3
|
+
import { WhiteboardService as WhiteboardService$1 } from "../../gen/collab/v1/whiteboard_pb.js";
|
|
4
4
|
import { ArchiveWhiteboardBoardInputSchema, ArchiveWhiteboardBoardResultSchema, CreateWhiteboardBoardInputSchema, CreateWhiteboardBoardResultSchema, GetWhiteboardBoardInputSchema, GetWhiteboardBoardResultSchema, ListWhiteboardBoardsInputSchema, ListWhiteboardBoardsResultSchema, MintWhiteboardJoinTokenInputSchema, UpdateWhiteboardBoardAclInputSchema, UpdateWhiteboardBoardAclResultSchema, UpdateWhiteboardBoardInputSchema, UpdateWhiteboardBoardResultSchema, WhiteboardJoinTokenResultSchema } from "./whiteboard.schemas.js";
|
|
5
5
|
import { createClient } from "@connectrpc/connect";
|
|
6
6
|
import * as v from "valibot";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BoardAclSubjectType, BoardAudience, BoardRole } from "../../gen/collab/v1/whiteboard_pb.js";
|
|
2
1
|
import { idToBigInt } from "../../utils/base58-id.js";
|
|
3
2
|
import { JsonObjectSchema, OptionalTimestampMsSchema, PublicIdSchema } from "../../shared/schemas.js";
|
|
4
3
|
import { requiredEnumLabel } from "../../shared/proto-enum-codec.js";
|
|
4
|
+
import { BoardAclSubjectType, BoardAudience, BoardRole } from "../../gen/collab/v1/whiteboard_pb.js";
|
|
5
5
|
import { WHITEBOARD_ACL_SUBJECT_TYPE_VALUES, WHITEBOARD_AUDIENCE_VALUES, WHITEBOARD_RESOLVED_ROLE_VALUES, WHITEBOARD_WRITABLE_ROLE_VALUES, WhiteboardAclSubjectTypeCodec, WhiteboardAudienceCodec, WhiteboardRoleCodec } from "./whiteboard.codecs.js";
|
|
6
6
|
import * as v from "valibot";
|
|
7
7
|
//#region src/services/whiteboard/whiteboard.schemas.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ZippedAssetSupplyBatchSchema, ZipperService as ZipperService$1 } from "../../gen/chain/zipper/v1/zipper_pb.js";
|
|
2
1
|
import { ConfigurationError } from "../../shared/errors.js";
|
|
3
2
|
import { toConnectCallOptions } from "../../shared/request-options.js";
|
|
4
3
|
import { publicationHandlerErrorContext } from "../../shared/subscription-errors.js";
|
|
5
4
|
import { createReadyGate } from "../../shared/decimal-surface.js";
|
|
6
5
|
import { snapshotThenStream } from "../../realtime/snapshot-then-stream.js";
|
|
6
|
+
import { ZippedAssetSupplyBatchSchema, ZipperService as ZipperService$1 } from "../../gen/chain/zipper/v1/zipper_pb.js";
|
|
7
7
|
import { DepositWithdrawConfigSchema, createZippedAssetSupplyBatchSchema } from "./zipper.schemas.js";
|
|
8
8
|
import { create } from "@bufbuild/protobuf";
|
|
9
9
|
import { createClient } from "@connectrpc/connect";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { AlreadyExistsError, AuthenticationError, InternalServerError, MfaEnrollmentRequiredError, MfaLastFactorRequiredError, MfaVerificationError, PermissionError, PolicyInUseError, PolicyLockedError, PolicyScopeMismatchError, PolyesterError, PreconditionFailedError, RateLimitError, ResourceNotFoundError, RevisionConflictError, ServiceUnavailableError, SessionElevationRequiredError, StaleQuoteError, StepUpRequiredError, TimeoutError, TransientError, ValidationError, isAbortError, normalizeErrorMessage } from "./errors.js";
|
|
1
2
|
import { AuthErrorDetailSchema } from "../gen/auth/v1/auth_pb.js";
|
|
2
3
|
import { ErrorDetailSchema } from "../gen/orders/v1/orders_pb.js";
|
|
3
|
-
import { AlreadyExistsError, AuthenticationError, InternalServerError, MfaEnrollmentRequiredError, MfaLastFactorRequiredError, MfaVerificationError, PermissionError, PolicyInUseError, PolicyLockedError, PolicyScopeMismatchError, PolyesterError, PreconditionFailedError, RateLimitError, ResourceNotFoundError, RevisionConflictError, ServiceUnavailableError, SessionElevationRequiredError, StaleQuoteError, StepUpRequiredError, TimeoutError, TransientError, ValidationError, isAbortError, normalizeErrorMessage } from "./errors.js";
|
|
4
4
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
5
5
|
//#region src/shared/connect-error-mapping.ts
|
|
6
6
|
function getAuthErrorDetails(err) {
|
package/dist/utils/errors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuthErrorDetailSchema } from "../gen/auth/v1/auth_pb.js";
|
|
2
1
|
import { NetworkError, PolicyInUseError, PolicyLockedError, PolicyScopeMismatchError, PolyesterError, RateLimitError, ResourceNotFoundError, RevisionConflictError, ServiceUnavailableError, TimeoutError, isAbortError } from "../shared/errors.js";
|
|
2
|
+
import { AuthErrorDetailSchema } from "../gen/auth/v1/auth_pb.js";
|
|
3
3
|
import { getNormalizedConnectMessage, toPolyesterError } from "../shared/connect-error-mapping.js";
|
|
4
4
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
5
5
|
//#region src/utils/errors.ts
|