@usherlabs/cex-broker 0.2.12 → 0.2.13
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/README.md +206 -14
- package/dist/commands/cli.js +9985 -8160
- package/dist/handlers/execute-action/context.d.ts +40 -0
- package/dist/handlers/execute-action/deposit.d.ts +2 -0
- package/dist/handlers/execute-action/handler.d.ts +14 -0
- package/dist/handlers/execute-action/index.d.ts +10 -0
- package/dist/handlers/execute-action/internal-transfer.d.ts +2 -0
- package/dist/handlers/execute-action/order-book-call.d.ts +3 -0
- package/dist/handlers/execute-action/orders.d.ts +2 -0
- package/dist/handlers/execute-action/pass-through.d.ts +2 -0
- package/dist/handlers/execute-action/perp-config.d.ts +2 -0
- package/dist/handlers/execute-action/registry.d.ts +5 -0
- package/dist/handlers/execute-action/treasury-call.d.ts +2 -0
- package/dist/handlers/execute-action/withdraw.d.ts +2 -0
- package/dist/handlers/subscribe/handler.d.ts +12 -0
- package/dist/handlers/subscribe/index.d.ts +1 -0
- package/dist/handlers/types.d.ts +23 -0
- package/dist/helpers/auth.d.ts +5 -0
- package/dist/helpers/binance-user-data-stream.d.ts +28 -0
- package/dist/helpers/broker.d.ts +38 -0
- package/dist/helpers/constants.d.ts +2 -0
- package/dist/helpers/deposit.d.ts +5 -0
- package/dist/helpers/exchange-credentials.d.ts +10 -0
- package/dist/helpers/grpc/broker.d.ts +5 -0
- package/dist/helpers/grpc/callbacks.d.ts +9 -0
- package/dist/helpers/grpc/payload.d.ts +9 -0
- package/dist/helpers/grpc/status.d.ts +8 -0
- package/dist/helpers/index.d.ts +8 -41
- package/dist/helpers/market-type.d.ts +16 -0
- package/dist/helpers/order-book.d.ts +79 -0
- package/dist/helpers/order-telemetry.d.ts +48 -0
- package/dist/helpers/shared/errors.d.ts +2 -0
- package/dist/helpers/shared/guards.d.ts +2 -0
- package/dist/helpers/transfer-network.d.ts +12 -0
- package/dist/helpers/treasury-discovery.d.ts +17 -0
- package/dist/helpers/verity.d.ts +5 -0
- package/dist/index.js +9736 -7911
- package/dist/index.js.map +78 -49
- package/dist/proto/node.descriptor.d.ts +2 -0
- package/dist/proto/node.descriptor.ts +3 -1
- package/dist/proto/node.proto +2 -0
- package/dist/schemas/action-payloads.d.ts +22 -0
- package/dist/server.d.ts +1 -1
- package/package.json +3 -2
package/dist/proto/node.proto
CHANGED
|
@@ -35,8 +35,28 @@ export declare const CreateOrderPayloadSchema: z.ZodObject<{
|
|
|
35
35
|
fromToken: z.ZodString;
|
|
36
36
|
toToken: z.ZodString;
|
|
37
37
|
price: z.ZodCoercedNumber<unknown>;
|
|
38
|
+
marketType: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
spot: "spot";
|
|
40
|
+
swap: "swap";
|
|
41
|
+
future: "future";
|
|
42
|
+
perp: "perp";
|
|
43
|
+
futures: "futures";
|
|
44
|
+
}>>;
|
|
38
45
|
params: z.ZodDefault<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>>;
|
|
39
46
|
}, z.core.$strip>;
|
|
47
|
+
export declare const GetPerpConfigStatePayloadSchema: z.ZodObject<{
|
|
48
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
49
|
+
params: z.ZodDefault<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export declare const SetPerpConfigStatePayloadSchema: z.ZodObject<{
|
|
52
|
+
symbol: z.ZodString;
|
|
53
|
+
leverage: z.ZodCoercedNumber<unknown>;
|
|
54
|
+
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
cross: "cross";
|
|
56
|
+
isolated: "isolated";
|
|
57
|
+
}>>;
|
|
58
|
+
params: z.ZodDefault<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
40
60
|
export declare const GetOrderDetailsPayloadSchema: z.ZodObject<{
|
|
41
61
|
orderId: z.ZodString;
|
|
42
62
|
params: z.ZodDefault<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>>;
|
|
@@ -55,6 +75,8 @@ export type FetchDepositAddressesPayload = z.infer<typeof FetchDepositAddressesP
|
|
|
55
75
|
export type WithdrawPayload = z.infer<typeof WithdrawPayloadSchema>;
|
|
56
76
|
export type InternalTransferPayload = z.infer<typeof InternalTransferPayloadSchema>;
|
|
57
77
|
export type CreateOrderPayload = z.infer<typeof CreateOrderPayloadSchema>;
|
|
78
|
+
export type GetPerpConfigStatePayload = z.infer<typeof GetPerpConfigStatePayloadSchema>;
|
|
79
|
+
export type SetPerpConfigStatePayload = z.infer<typeof SetPerpConfigStatePayloadSchema>;
|
|
58
80
|
export type GetOrderDetailsPayload = z.infer<typeof GetOrderDetailsPayloadSchema>;
|
|
59
81
|
export type CancelOrderPayload = z.infer<typeof CancelOrderPayloadSchema>;
|
|
60
82
|
export type FetchFeesPayload = z.infer<typeof FetchFeesPayloadSchema>;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as grpc from "@grpc/grpc-js";
|
|
2
|
-
import {
|
|
2
|
+
import type { BrokerPoolEntry } from "./helpers";
|
|
3
3
|
import type { OtelMetrics } from "./helpers/otel";
|
|
4
4
|
import type { PolicyConfig } from "./types";
|
|
5
5
|
export declare function getServer(policy: PolicyConfig, brokers: Record<string, BrokerPoolEntry>, whitelistIps: string[], useVerity: boolean, verityProverUrl: string, otelMetrics?: OtelMetrics): grpc.Server;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usherlabs/cex-broker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "Unified gRPC API to CEXs by Usher Labs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@biomejs/biome": "2.
|
|
17
|
+
"@biomejs/biome": "^2.4.16",
|
|
18
18
|
"@types/bun": "latest",
|
|
19
19
|
"bun-plugin-dts": "latest",
|
|
20
20
|
"bun-types": "latest",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"lint:fix": "bunx biome lint --write",
|
|
44
44
|
"check": "bunx biome check",
|
|
45
45
|
"check:fix": "bunx biome check --write",
|
|
46
|
+
"check:server-lines": "bash scripts/check-server-line-budget.sh",
|
|
46
47
|
"copy:dts": "cpx \"build/**/*.d.ts\" ./dist/",
|
|
47
48
|
"copy:proto": "cpx \"src/proto/*.proto\" ./dist/proto",
|
|
48
49
|
"prepare": "bunx husky"
|