@polyester/sdk 0.30.1 → 0.31.0
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/browser-core.d.ts.map +1 -1
- package/dist/browser-core.js +24 -2
- package/dist/browser-core.js.map +1 -1
- package/dist/catalogs/snapshot-validation.js +6 -1
- package/dist/catalogs/snapshot-validation.js.map +1 -1
- package/dist/catalogs/zipper-supply.d.ts.map +1 -1
- package/dist/catalogs/zipper-supply.js +3 -3
- package/dist/catalogs/zipper-supply.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/realtime/snapshot-then-stream.js +1 -1
- package/dist/realtime/snapshot-then-stream.js.map +1 -1
- package/dist/services/address-book/address-book.schemas.d.ts +2 -2
- package/dist/services/auth/account-signer-auth.d.ts +6 -0
- package/dist/services/auth/account-signer-auth.d.ts.map +1 -1
- package/dist/services/auth/account-signer-auth.js +19 -0
- package/dist/services/auth/account-signer-auth.js.map +1 -1
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/order-errors.schemas.d.ts +1 -1
- package/dist/services/orders/orders-batch.schemas.d.ts +32 -32
- package/dist/services/orders/orders-input.schemas.d.ts +3 -3
- package/dist/services/orders/orders-output.schemas.d.ts +6 -6
- package/dist/services/subaccounts/subaccounts.schemas.d.ts +11 -11
- package/dist/services/trades/trades.schemas.d.ts +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.d.ts +7 -0
- package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
- package/dist/services/trading-withdraws/trading-withdraws.js +13 -4
- package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
- package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
- package/dist/services/whiteboard/whiteboard.schemas.d.ts +49 -49
- package/dist/shared/errors.d.ts +21 -3
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +17 -1
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/rate-limit.schemas.d.ts +1 -1
- package/dist/shared/subscription-errors.d.ts +6 -6
- package/dist/shared/subscription-errors.d.ts.map +1 -1
- package/dist/shared/subscription-errors.js +20 -29
- package/dist/shared/subscription-errors.js.map +1 -1
- package/package.json +1 -1
|
@@ -2710,7 +2710,7 @@ declare function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolId
|
|
|
2710
2710
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2711
2711
|
readonly operationId: v.StringSchema<undefined>;
|
|
2712
2712
|
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
2713
|
-
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "
|
|
2713
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
2714
2714
|
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
2715
2715
|
}, undefined>, undefined>;
|
|
2716
2716
|
}, undefined>, undefined>;
|
|
@@ -2751,7 +2751,7 @@ declare function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolId
|
|
|
2751
2751
|
policyVersion?: string | undefined;
|
|
2752
2752
|
operationId: string;
|
|
2753
2753
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
2754
|
-
scope: "symbol" | "unspecified" | "
|
|
2754
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
2755
2755
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
2756
2756
|
} | undefined;
|
|
2757
2757
|
} | undefined;
|
|
@@ -2792,7 +2792,7 @@ declare function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolId
|
|
|
2792
2792
|
policyVersion?: string | undefined;
|
|
2793
2793
|
operationId: string;
|
|
2794
2794
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
2795
|
-
scope: "symbol" | "unspecified" | "
|
|
2795
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
2796
2796
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
2797
2797
|
} | undefined;
|
|
2798
2798
|
} | undefined;
|
|
@@ -2833,7 +2833,7 @@ declare function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolId
|
|
|
2833
2833
|
policyVersion?: string | undefined;
|
|
2834
2834
|
operationId: string;
|
|
2835
2835
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
2836
|
-
scope: "symbol" | "unspecified" | "
|
|
2836
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
2837
2837
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
2838
2838
|
} | undefined;
|
|
2839
2839
|
} | undefined;
|
|
@@ -2862,7 +2862,7 @@ declare function createBatchCreateOrdersResultSchema(scales: SdkScales, symbolId
|
|
|
2862
2862
|
policyVersion?: string | undefined;
|
|
2863
2863
|
operationId: string;
|
|
2864
2864
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
2865
|
-
scope: "symbol" | "unspecified" | "
|
|
2865
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
2866
2866
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
2867
2867
|
} | undefined;
|
|
2868
2868
|
} | undefined;
|
|
@@ -2921,7 +2921,7 @@ declare const BatchReplaceAdmissionItemSchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
2921
2921
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
2922
2922
|
readonly operationId: v.StringSchema<undefined>;
|
|
2923
2923
|
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
2924
|
-
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "
|
|
2924
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
2925
2925
|
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
2926
2926
|
}, undefined>, undefined>;
|
|
2927
2927
|
}, undefined>, undefined>;
|
|
@@ -2948,7 +2948,7 @@ declare const BatchReplaceAdmissionItemSchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
2948
2948
|
policyVersion?: string | undefined;
|
|
2949
2949
|
operationId: string;
|
|
2950
2950
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
2951
|
-
scope: "symbol" | "unspecified" | "
|
|
2951
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
2952
2952
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
2953
2953
|
} | undefined;
|
|
2954
2954
|
} | undefined;
|
|
@@ -2975,7 +2975,7 @@ declare const BatchReplaceAdmissionItemSchema: v.SchemaWithPipe<readonly [v.Obje
|
|
|
2975
2975
|
policyVersion?: string | undefined;
|
|
2976
2976
|
operationId: string;
|
|
2977
2977
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
2978
|
-
scope: "symbol" | "unspecified" | "
|
|
2978
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
2979
2979
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
2980
2980
|
} | undefined;
|
|
2981
2981
|
} | undefined;
|
|
@@ -3007,7 +3007,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3007
3007
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3008
3008
|
readonly operationId: v.StringSchema<undefined>;
|
|
3009
3009
|
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3010
|
-
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "
|
|
3010
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3011
3011
|
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
3012
3012
|
}, undefined>, undefined>;
|
|
3013
3013
|
}, undefined>, undefined>;
|
|
@@ -3034,7 +3034,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3034
3034
|
policyVersion?: string | undefined;
|
|
3035
3035
|
operationId: string;
|
|
3036
3036
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3037
|
-
scope: "symbol" | "unspecified" | "
|
|
3037
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3038
3038
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3039
3039
|
} | undefined;
|
|
3040
3040
|
} | undefined;
|
|
@@ -3061,7 +3061,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3061
3061
|
policyVersion?: string | undefined;
|
|
3062
3062
|
operationId: string;
|
|
3063
3063
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3064
|
-
scope: "symbol" | "unspecified" | "
|
|
3064
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3065
3065
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3066
3066
|
} | undefined;
|
|
3067
3067
|
} | undefined;
|
|
@@ -3095,7 +3095,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3095
3095
|
policyVersion?: string | undefined;
|
|
3096
3096
|
operationId: string;
|
|
3097
3097
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3098
|
-
scope: "symbol" | "unspecified" | "
|
|
3098
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3099
3099
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3100
3100
|
} | undefined;
|
|
3101
3101
|
} | undefined;
|
|
@@ -3129,7 +3129,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3129
3129
|
policyVersion?: string | undefined;
|
|
3130
3130
|
operationId: string;
|
|
3131
3131
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3132
|
-
scope: "symbol" | "unspecified" | "
|
|
3132
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3133
3133
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3134
3134
|
} | undefined;
|
|
3135
3135
|
} | undefined;
|
|
@@ -3163,7 +3163,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3163
3163
|
policyVersion?: string | undefined;
|
|
3164
3164
|
operationId: string;
|
|
3165
3165
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3166
|
-
scope: "symbol" | "unspecified" | "
|
|
3166
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3167
3167
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3168
3168
|
} | undefined;
|
|
3169
3169
|
} | undefined;
|
|
@@ -3199,7 +3199,7 @@ declare const BatchReplaceOrdersResultSchema: v.SchemaWithPipe<readonly [v.Objec
|
|
|
3199
3199
|
policyVersion?: string | undefined;
|
|
3200
3200
|
operationId: string;
|
|
3201
3201
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3202
|
-
scope: "symbol" | "unspecified" | "
|
|
3202
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3203
3203
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3204
3204
|
} | undefined;
|
|
3205
3205
|
} | undefined;
|
|
@@ -3228,7 +3228,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3228
3228
|
readonly admissionStatus: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "admitted" | "partially_admitted">]>;
|
|
3229
3229
|
readonly items: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3230
3230
|
readonly itemIndex: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
3231
|
-
readonly phase: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
3231
|
+
readonly phase: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "working" | "rejected" | "terminal" | "admitted">]>;
|
|
3232
3232
|
readonly oldOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3233
3233
|
readonly replacementOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3234
3234
|
readonly actionTaken: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "AMENDED" | "REPLACED">]>;
|
|
@@ -3237,7 +3237,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3237
3237
|
readonly updatedTsNs: v.BigintSchema<undefined>;
|
|
3238
3238
|
}, undefined>, v.TransformAction<{
|
|
3239
3239
|
itemIndex: number;
|
|
3240
|
-
phase: "unspecified" | "
|
|
3240
|
+
phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
|
|
3241
3241
|
oldOrderId?: string | undefined;
|
|
3242
3242
|
replacementOrderId?: string | undefined;
|
|
3243
3243
|
actionTaken: "unspecified" | "AMENDED" | "REPLACED";
|
|
@@ -3249,7 +3249,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3249
3249
|
updatedTs: number;
|
|
3250
3250
|
updatedTsNs: string;
|
|
3251
3251
|
itemIndex: number;
|
|
3252
|
-
phase: "unspecified" | "
|
|
3252
|
+
phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
|
|
3253
3253
|
oldOrderId?: string | undefined;
|
|
3254
3254
|
replacementOrderId?: string | undefined;
|
|
3255
3255
|
actionTaken: "unspecified" | "AMENDED" | "REPLACED";
|
|
@@ -3267,7 +3267,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3267
3267
|
updatedTs: number;
|
|
3268
3268
|
updatedTsNs: string;
|
|
3269
3269
|
itemIndex: number;
|
|
3270
|
-
phase: "unspecified" | "
|
|
3270
|
+
phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
|
|
3271
3271
|
oldOrderId?: string | undefined;
|
|
3272
3272
|
replacementOrderId?: string | undefined;
|
|
3273
3273
|
actionTaken: "unspecified" | "AMENDED" | "REPLACED";
|
|
@@ -3285,7 +3285,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3285
3285
|
updatedTs: number;
|
|
3286
3286
|
updatedTsNs: string;
|
|
3287
3287
|
itemIndex: number;
|
|
3288
|
-
phase: "unspecified" | "
|
|
3288
|
+
phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
|
|
3289
3289
|
oldOrderId?: string | undefined;
|
|
3290
3290
|
replacementOrderId?: string | undefined;
|
|
3291
3291
|
actionTaken: "unspecified" | "AMENDED" | "REPLACED";
|
|
@@ -3303,7 +3303,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3303
3303
|
updatedTs: number;
|
|
3304
3304
|
updatedTsNs: string;
|
|
3305
3305
|
itemIndex: number;
|
|
3306
|
-
phase: "unspecified" | "
|
|
3306
|
+
phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
|
|
3307
3307
|
oldOrderId?: string | undefined;
|
|
3308
3308
|
replacementOrderId?: string | undefined;
|
|
3309
3309
|
actionTaken: "unspecified" | "AMENDED" | "REPLACED";
|
|
@@ -3325,7 +3325,7 @@ declare const GetBatchReplaceStatusResultSchema: v.SchemaWithPipe<readonly [v.Ob
|
|
|
3325
3325
|
updatedTs: number;
|
|
3326
3326
|
updatedTsNs: string;
|
|
3327
3327
|
itemIndex: number;
|
|
3328
|
-
phase: "unspecified" | "
|
|
3328
|
+
phase: "unspecified" | "working" | "rejected" | "terminal" | "admitted";
|
|
3329
3329
|
oldOrderId?: string | undefined;
|
|
3330
3330
|
replacementOrderId?: string | undefined;
|
|
3331
3331
|
actionTaken: "unspecified" | "AMENDED" | "REPLACED";
|
|
@@ -3424,7 +3424,7 @@ declare const BatchCancelOrdersInputSchema: v.SchemaWithPipe<readonly [v.StrictO
|
|
|
3424
3424
|
}>]>;
|
|
3425
3425
|
type BatchCancelOrdersInput = v.InferInput<typeof BatchCancelOrdersInputSchema>;
|
|
3426
3426
|
declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
3427
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
3427
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "accepted">]>;
|
|
3428
3428
|
readonly orderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3429
3429
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
3430
3430
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -3443,7 +3443,7 @@ declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
|
3443
3443
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3444
3444
|
readonly operationId: v.StringSchema<undefined>;
|
|
3445
3445
|
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3446
|
-
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "
|
|
3446
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3447
3447
|
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
3448
3448
|
}, undefined>, undefined>;
|
|
3449
3449
|
}, undefined>, undefined>;
|
|
@@ -3451,7 +3451,7 @@ declare const BatchCancelOrderResultSchema: v.ObjectSchema<{
|
|
|
3451
3451
|
type BatchCancelOrderResult = v.InferOutput<typeof BatchCancelOrderResultSchema>;
|
|
3452
3452
|
declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3453
3453
|
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
3454
|
-
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
3454
|
+
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rejected" | "accepted">]>;
|
|
3455
3455
|
readonly orderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3456
3456
|
readonly clientOrderId: v.StringSchema<undefined>;
|
|
3457
3457
|
readonly code: v.StringSchema<undefined>;
|
|
@@ -3470,7 +3470,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3470
3470
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3471
3471
|
readonly operationId: v.StringSchema<undefined>;
|
|
3472
3472
|
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3473
|
-
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "
|
|
3473
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3474
3474
|
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
3475
3475
|
}, undefined>, undefined>;
|
|
3476
3476
|
}, undefined>, undefined>;
|
|
@@ -3480,7 +3480,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3480
3480
|
readonly tsNs: v.BigintSchema<undefined>;
|
|
3481
3481
|
}, undefined>, v.CheckAction<{
|
|
3482
3482
|
results: {
|
|
3483
|
-
status: "unspecified" | "
|
|
3483
|
+
status: "unspecified" | "rejected" | "accepted";
|
|
3484
3484
|
orderId?: string | undefined;
|
|
3485
3485
|
clientOrderId: string;
|
|
3486
3486
|
code: string;
|
|
@@ -3499,7 +3499,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3499
3499
|
policyVersion?: string | undefined;
|
|
3500
3500
|
operationId: string;
|
|
3501
3501
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3502
|
-
scope: "symbol" | "unspecified" | "
|
|
3502
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3503
3503
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3504
3504
|
} | undefined;
|
|
3505
3505
|
} | undefined;
|
|
@@ -3509,7 +3509,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3509
3509
|
tsNs: bigint;
|
|
3510
3510
|
}, "Batch cancel result counts do not match the returned results.">, v.TransformAction<{
|
|
3511
3511
|
results: {
|
|
3512
|
-
status: "unspecified" | "
|
|
3512
|
+
status: "unspecified" | "rejected" | "accepted";
|
|
3513
3513
|
orderId?: string | undefined;
|
|
3514
3514
|
clientOrderId: string;
|
|
3515
3515
|
code: string;
|
|
@@ -3528,7 +3528,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3528
3528
|
policyVersion?: string | undefined;
|
|
3529
3529
|
operationId: string;
|
|
3530
3530
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3531
|
-
scope: "symbol" | "unspecified" | "
|
|
3531
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3532
3532
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3533
3533
|
} | undefined;
|
|
3534
3534
|
} | undefined;
|
|
@@ -3540,7 +3540,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3540
3540
|
ts: number;
|
|
3541
3541
|
tsNs: string;
|
|
3542
3542
|
results: {
|
|
3543
|
-
status: "unspecified" | "
|
|
3543
|
+
status: "unspecified" | "rejected" | "accepted";
|
|
3544
3544
|
orderId?: string | undefined;
|
|
3545
3545
|
clientOrderId: string;
|
|
3546
3546
|
code: string;
|
|
@@ -3559,7 +3559,7 @@ declare const BatchCancelOrdersResultSchema: v.SchemaWithPipe<readonly [v.Object
|
|
|
3559
3559
|
policyVersion?: string | undefined;
|
|
3560
3560
|
operationId: string;
|
|
3561
3561
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3562
|
-
scope: "symbol" | "unspecified" | "
|
|
3562
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3563
3563
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3564
3564
|
} | undefined;
|
|
3565
3565
|
} | undefined;
|
|
@@ -3813,7 +3813,7 @@ declare function createPreviewOrderResultSchema(scales: SdkScales, symbolId: num
|
|
|
3813
3813
|
readonly policyVersion: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
|
|
3814
3814
|
readonly operationId: v.StringSchema<undefined>;
|
|
3815
3815
|
readonly policyClass: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider">]>;
|
|
3816
|
-
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "
|
|
3816
|
+
readonly scope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject">]>;
|
|
3817
3817
|
readonly refillModel: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "continuous" | "fixed_window" | "rolling_window">]>;
|
|
3818
3818
|
}, undefined>, undefined>;
|
|
3819
3819
|
}, undefined>, undefined>;
|
|
@@ -3843,7 +3843,7 @@ declare function createPreviewOrderResultSchema(scales: SdkScales, symbolId: num
|
|
|
3843
3843
|
policyVersion?: string | undefined;
|
|
3844
3844
|
operationId: string;
|
|
3845
3845
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3846
|
-
scope: "symbol" | "unspecified" | "
|
|
3846
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3847
3847
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3848
3848
|
} | undefined;
|
|
3849
3849
|
} | undefined;
|
|
@@ -3869,7 +3869,7 @@ declare function createPreviewOrderResultSchema(scales: SdkScales, symbolId: num
|
|
|
3869
3869
|
policyVersion?: string | undefined;
|
|
3870
3870
|
operationId: string;
|
|
3871
3871
|
policyClass: "unspecified" | "auth_public" | "trading_place" | "trading_cancel" | "trading_read" | "account_admin" | "public_read" | "account_security" | "deposit_create" | "internal_transfer" | "withdraw_submit" | "withdraw_validate" | "guard_sign" | "social_provider";
|
|
3872
|
-
scope: "symbol" | "unspecified" | "
|
|
3872
|
+
scope: "symbol" | "unspecified" | "client_ip" | "api_key" | "account" | "subaccount" | "connection" | "service" | "region" | "auth_subject";
|
|
3873
3873
|
refillModel: "unspecified" | "continuous" | "fixed_window" | "rolling_window";
|
|
3874
3874
|
} | undefined;
|
|
3875
3875
|
} | undefined;
|
|
@@ -260,7 +260,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
260
260
|
attachedRisk: {
|
|
261
261
|
takeProfit: {
|
|
262
262
|
state: {
|
|
263
|
-
status: "unspecified" | "failed" | "canceled" | "
|
|
263
|
+
status: "unspecified" | "failed" | "canceled" | "not_configured" | "created" | "armed" | "running" | "completed" | "paused";
|
|
264
264
|
armedTs: number | undefined;
|
|
265
265
|
armedTsNs: string | undefined;
|
|
266
266
|
terminalTs: number | undefined;
|
|
@@ -279,7 +279,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
279
279
|
} | undefined;
|
|
280
280
|
stopLoss: {
|
|
281
281
|
state: {
|
|
282
|
-
status: "unspecified" | "failed" | "canceled" | "
|
|
282
|
+
status: "unspecified" | "failed" | "canceled" | "not_configured" | "created" | "armed" | "running" | "completed" | "paused";
|
|
283
283
|
armedTs: number | undefined;
|
|
284
284
|
armedTsNs: string | undefined;
|
|
285
285
|
terminalTs: number | undefined;
|
|
@@ -298,7 +298,7 @@ declare function createOrderSchema(scales: SdkScales): v.SchemaWithPipe<readonly
|
|
|
298
298
|
} | undefined;
|
|
299
299
|
trailingStop: {
|
|
300
300
|
state: {
|
|
301
|
-
status: "unspecified" | "failed" | "canceled" | "
|
|
301
|
+
status: "unspecified" | "failed" | "canceled" | "not_configured" | "created" | "armed" | "running" | "completed" | "paused";
|
|
302
302
|
armedTs: number | undefined;
|
|
303
303
|
armedTsNs: string | undefined;
|
|
304
304
|
terminalTs: number | undefined;
|
|
@@ -631,7 +631,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
631
631
|
attachedRisk: {
|
|
632
632
|
takeProfit: {
|
|
633
633
|
state: {
|
|
634
|
-
status: "unspecified" | "failed" | "canceled" | "
|
|
634
|
+
status: "unspecified" | "failed" | "canceled" | "not_configured" | "created" | "armed" | "running" | "completed" | "paused";
|
|
635
635
|
armedTs: number | undefined;
|
|
636
636
|
armedTsNs: string | undefined;
|
|
637
637
|
terminalTs: number | undefined;
|
|
@@ -650,7 +650,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
650
650
|
} | undefined;
|
|
651
651
|
stopLoss: {
|
|
652
652
|
state: {
|
|
653
|
-
status: "unspecified" | "failed" | "canceled" | "
|
|
653
|
+
status: "unspecified" | "failed" | "canceled" | "not_configured" | "created" | "armed" | "running" | "completed" | "paused";
|
|
654
654
|
armedTs: number | undefined;
|
|
655
655
|
armedTsNs: string | undefined;
|
|
656
656
|
terminalTs: number | undefined;
|
|
@@ -669,7 +669,7 @@ declare function createOrderDetailsSchema(scales: SdkScales): v.ObjectSchema<{
|
|
|
669
669
|
} | undefined;
|
|
670
670
|
trailingStop: {
|
|
671
671
|
state: {
|
|
672
|
-
status: "unspecified" | "failed" | "canceled" | "
|
|
672
|
+
status: "unspecified" | "failed" | "canceled" | "not_configured" | "created" | "armed" | "running" | "completed" | "paused";
|
|
673
673
|
armedTs: number | undefined;
|
|
674
674
|
armedTsNs: string | undefined;
|
|
675
675
|
terminalTs: number | undefined;
|
|
@@ -13,7 +13,7 @@ declare const SubaccountPermissionDefinitionSchema: v.ObjectSchema<{
|
|
|
13
13
|
}, undefined>;
|
|
14
14
|
type SubaccountPermissionDefinition = v.InferOutput<typeof SubaccountPermissionDefinitionSchema>;
|
|
15
15
|
declare const SubaccountRoleDefinitionSchema: v.ObjectSchema<{
|
|
16
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
16
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
17
17
|
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
18
18
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
19
19
|
readonly assignable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -28,7 +28,7 @@ declare const SubaccountRoleCatalogSchema: v.ObjectSchema<{
|
|
|
28
28
|
readonly policyAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book">]>;
|
|
29
29
|
}, undefined>, undefined>, readonly []>;
|
|
30
30
|
readonly roles: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
31
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
31
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
32
32
|
readonly displayName: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
33
33
|
readonly description: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
34
34
|
readonly assignable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
@@ -37,7 +37,7 @@ declare const SubaccountRoleCatalogSchema: v.ObjectSchema<{
|
|
|
37
37
|
}, undefined>;
|
|
38
38
|
type SubaccountRoleCatalog = v.InferOutput<typeof SubaccountRoleCatalogSchema>;
|
|
39
39
|
declare const EffectiveSubaccountPermissionsSchema: v.ObjectSchema<{
|
|
40
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
40
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
41
41
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "internal_transfer" | "read_subaccount" | "update_subaccount" | "read_balances" | "read_spot" | "trade_spot" | "read_internal_transfers" | "external_withdraw" | "read_address_book" | "manage_address_book" | "read_members" | "manage_members" | "read_invites" | "manage_invites" | "read_api_keys" | "manage_api_keys" | "read_subaccount_policy" | "manage_subaccount_policy" | "read_activity" | "read_activity_security_details" | "manage_member_mfa_requirement" | "create_deposit_address" | "read_deposit_addresses" | "read_guard_signer_status" | "manage_guard_signer">]>, undefined>, readonly []>;
|
|
42
42
|
readonly subaccountPolicyId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
43
43
|
}, undefined>;
|
|
@@ -158,7 +158,7 @@ declare const ProtoSubaccountStatusSchema: v.SchemaWithPipe<readonly [v.NumberSc
|
|
|
158
158
|
type SubaccountStatus = v.InferOutput<typeof ProtoSubaccountStatusSchema>;
|
|
159
159
|
declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
160
160
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
161
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
161
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
162
162
|
readonly label: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
163
163
|
readonly icon: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
164
164
|
readonly color: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
@@ -177,7 +177,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
177
177
|
readonly revision: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
178
178
|
}, undefined>, v.TransformAction<{
|
|
179
179
|
id: string;
|
|
180
|
-
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
180
|
+
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
181
181
|
label: string;
|
|
182
182
|
icon: string;
|
|
183
183
|
color: string;
|
|
@@ -198,7 +198,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
198
198
|
updatedAt: number | undefined;
|
|
199
199
|
updatedAtNs: string | undefined;
|
|
200
200
|
id: string;
|
|
201
|
-
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
201
|
+
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
202
202
|
label: string;
|
|
203
203
|
icon: string;
|
|
204
204
|
color: string;
|
|
@@ -215,7 +215,7 @@ declare const SubaccountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
215
215
|
type Subaccount = v.InferOutput<typeof SubaccountSchema>;
|
|
216
216
|
declare const SubaccountMemberSchema: v.ObjectSchema<{
|
|
217
217
|
readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
218
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
218
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
219
219
|
readonly username: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
220
220
|
readonly smartAccountAddress: v.StringSchema<undefined>;
|
|
221
221
|
readonly avatarUrl: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
@@ -227,7 +227,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
227
227
|
readonly subaccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
228
228
|
readonly granteeAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
229
229
|
readonly inviterAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
230
|
-
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
230
|
+
readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer">]>;
|
|
231
231
|
readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "cancelled" | "pending" | "accepted" | "declined">]>;
|
|
232
232
|
readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
|
|
233
233
|
readonly seconds: v.BigintSchema<undefined>;
|
|
@@ -254,7 +254,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
254
254
|
subaccountId: string;
|
|
255
255
|
granteeAccountId: string;
|
|
256
256
|
inviterAccountId: string;
|
|
257
|
-
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
257
|
+
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
258
258
|
status: "unspecified" | "cancelled" | "pending" | "accepted" | "declined";
|
|
259
259
|
createdAt?: number | undefined;
|
|
260
260
|
respondedAt?: number | undefined;
|
|
@@ -272,7 +272,7 @@ declare const SubaccountInviteSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
|
|
|
272
272
|
id: string;
|
|
273
273
|
granteeAccountId: string;
|
|
274
274
|
inviterAccountId: string;
|
|
275
|
-
role: "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer"
|
|
275
|
+
role: "unspecified" | "owner" | "admin" | "treasury" | "leveraged_trader" | "trader" | "viewer";
|
|
276
276
|
status: "unspecified" | "cancelled" | "pending" | "accepted" | "declined";
|
|
277
277
|
createdAt?: number | undefined;
|
|
278
278
|
respondedAt?: number | undefined;
|
|
@@ -295,7 +295,7 @@ declare const SubaccountActivityEventSchema: v.ObjectSchema<{
|
|
|
295
295
|
seconds: bigint;
|
|
296
296
|
nanos: number;
|
|
297
297
|
} | undefined, number | undefined>]>;
|
|
298
|
-
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "
|
|
298
|
+
readonly entityKind: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "api_key" | "account" | "subaccount" | "destination" | "session" | "policy" | "member" | "invite" | "security">]>;
|
|
299
299
|
readonly eventAction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "disabled" | "revoked" | "failed" | "enabled" | "created" | "updated" | "deleted" | "removed" | "role_set" | "received" | "replied" | "blocked" | "hold_placed" | "hold_released">]>;
|
|
300
300
|
readonly source: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "web" | "mobile" | "api">]>;
|
|
301
301
|
readonly ip: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -168,7 +168,7 @@ declare const GetUserTradesInputSchema: v.SchemaWithPipe<readonly [v.UnionSchema
|
|
|
168
168
|
readonly orderId: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
169
169
|
readonly lineageId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>, v.CheckAction<bigint, `${string} must be greater than zero`>]>;
|
|
170
170
|
readonly throughGeneration: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
|
|
171
|
-
}, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.
|
|
171
|
+
}, undefined>], undefined>], ({ input }: v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.MinLengthIssue<string, 1> | v.CheckIssue<bigint> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.MaxValueIssue<number, 1000> | v.NeverIssue | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.MinLengthIssue<string, 1> | v.CheckIssue<bigint> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.MaxValueIssue<number, 1000> | v.NeverIssue> | v.CheckIssue<number> | v.UnionIssue<v.NumberIssue | v.StringIssue | v.BooleanIssue | v.IntegerIssue<number> | v.MinValueIssue<number, 1> | v.MaxValueIssue<number, 4294967295> | v.MinLengthIssue<string, 1> | v.CheckIssue<bigint> | v.StrictObjectIssue | v.PicklistIssue | v.UnionIssue<v.StringIssue | v.MinLengthIssue<string, 1> | v.StrictObjectIssue | v.PicklistIssue> | v.MaxValueIssue<number, 1000> | v.NeverIssue | v.CheckIssue<number>>>) => "symbolId is required when afterMatchId is set" | "Provide at most one of orderId or lineageId" | "throughGeneration requires lineageId">, v.TransformAction<{
|
|
172
172
|
symbolId?: number | undefined;
|
|
173
173
|
afterMatchId?: undefined;
|
|
174
174
|
side?: Side.BUY | Side.SELL | undefined;
|
|
@@ -26,6 +26,13 @@ type CreateTradingWithdrawToExternalChainServiceInput = CreateTradingWithdrawToE
|
|
|
26
26
|
walletSigner?: TradingWithdrawWalletSigner;
|
|
27
27
|
};
|
|
28
28
|
type PreparedTradingWithdraw = Readonly<{
|
|
29
|
+
/** When the backend stops accepting this signed request. */
|
|
30
|
+
deadline: Date;
|
|
31
|
+
/**
|
|
32
|
+
* True once the deadline is less than a minute away. Prepare again (same input,
|
|
33
|
+
* same idempotency key) instead of submitting, e.g. after a slow MFA enrollment.
|
|
34
|
+
*/
|
|
35
|
+
isExpired: () => boolean;
|
|
29
36
|
/**
|
|
30
37
|
* Submits the exact payload and signature produced during preparation.
|
|
31
38
|
* Repeated calls only change transport options such as the step-up token.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trading-withdraws.d.ts","names":[],"sources":["../../../src/services/trading-withdraws/trading-withdraws.ts"],"mappings":";;;;;;;;KAmCY;EACR;EACA;;;;;EAKA,cAAc,oBAAoB,QAAQ;;KAGlC;EACR;EACA,uBAAuB;;KAGf,6CAA6C;EACrD,eAAe;;KAGP,mDACR;EACI,eAAe;;KAGX,0BAA0B;;;;;
|
|
1
|
+
{"version":3,"file":"trading-withdraws.d.ts","names":[],"sources":["../../../src/services/trading-withdraws/trading-withdraws.ts"],"mappings":";;;;;;;;KAmCY;EACR;EACA;;;;;EAKA,cAAc,oBAAoB,QAAQ;;KAGlC;EACR;EACA,uBAAuB;;KAGf,6CAA6C;EACrD,eAAe;;KAGP,mDACR;EACI,eAAe;;KAGX,0BAA0B;;EAElC,UAAU;;;;;EAKV;;;;;EAKA,SAAS,UAAU,6BAA6B,QAAQ;;;;;cAkF/C;;EAYL,YAAA,YAAY,mBACZ,UAAU,gCACV,eAAe,8BACf,QAAQ,WACR,UAAU;;;;EAeR,oBACF,OAAO,kCACP,UAAU,0BACX,QAAQ;;;;EAYL,gBACF,OAAO,4CACP,UAAU,2BACX,QAAQ;;;;;EASL,iBACF,OAAO,6CACR,QAAQ;;;;EAWL,sBACF,OAAO,kDACP,UAAU,2BACX,QAAQ;;;;;EASL,uBACF,OAAO,mDACR,QAAQ"}
|
|
@@ -10,6 +10,15 @@ import { CreateTradingWithdrawResultSchema, CreateWalletTradingWithdrawResultSch
|
|
|
10
10
|
import { buildTradingWithdrawWalletMessage } from "./wallet-message.js";
|
|
11
11
|
import { createClient } from "@connectrpc/connect";
|
|
12
12
|
//#region src/services/trading-withdraws/trading-withdraws.ts
|
|
13
|
+
const PREPARED_WITHDRAW_EXPIRY_MARGIN_MS = 6e4;
|
|
14
|
+
function preparedWithdraw(payload, submit) {
|
|
15
|
+
const deadline = /* @__PURE__ */ new Date(Number(payload.deadlineTsSec) * 1e3);
|
|
16
|
+
return {
|
|
17
|
+
deadline,
|
|
18
|
+
isExpired: () => Date.now() >= deadline.getTime() - PREPARED_WITHDRAW_EXPIRY_MARGIN_MS,
|
|
19
|
+
submit
|
|
20
|
+
};
|
|
21
|
+
}
|
|
13
22
|
function resolveTradingWithdrawTargetAccountId(params) {
|
|
14
23
|
if (params.subaccountId !== void 0) return params.subaccountId;
|
|
15
24
|
return idToBigInt(params.rootAccountId, "targetAccountId");
|
|
@@ -128,20 +137,20 @@ var TradingWithdrawsService = class {
|
|
|
128
137
|
signerWallet: walletSignature.signerWallet,
|
|
129
138
|
payloadSignature: walletSignature.payloadSignature
|
|
130
139
|
});
|
|
131
|
-
return
|
|
140
|
+
return preparedWithdraw(validated.payload, async (options) => {
|
|
132
141
|
const response = await this.#client.createWalletTradingWithdraw(request, toConnectCallOptions(options));
|
|
133
142
|
return parse(CreateWalletTradingWithdrawResultSchema, response);
|
|
134
|
-
}
|
|
143
|
+
});
|
|
135
144
|
}
|
|
136
145
|
if (!validated.payloadSignature) throw new ValidationError("Trading withdraw requires a wallet signer or payload signature.");
|
|
137
146
|
const request = removeUndefined({
|
|
138
147
|
payload: validated.payload,
|
|
139
148
|
payloadSignature: validated.payloadSignature
|
|
140
149
|
});
|
|
141
|
-
return
|
|
150
|
+
return preparedWithdraw(validated.payload, async (options) => {
|
|
142
151
|
const response = await this.#client.createTradingWithdraw(request, toConnectCallOptions(options));
|
|
143
152
|
return parse(CreateTradingWithdrawResultSchema, response);
|
|
144
|
-
}
|
|
153
|
+
});
|
|
145
154
|
}
|
|
146
155
|
};
|
|
147
156
|
//#endregion
|