@usherlabs/cex-broker 0.2.9 → 0.2.11
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/dist/commands/cli.js +231 -293
- package/dist/helpers/constants.d.ts +30 -0
- package/dist/helpers/index.d.ts +7 -17
- package/dist/index.js +232 -294
- package/dist/index.js.map +7 -10
- package/dist/proto/node.descriptor.ts +2 -1
- package/dist/proto/node.proto +1 -0
- package/dist/schemas/action-payloads.d.ts +6 -3
- package/package.json +1 -1
- package/dist/proto/cex_broker/Action.d.ts +0 -17
- package/dist/proto/cex_broker/ActionRequest.d.ts +0 -17
- package/dist/proto/cex_broker/ActionResponse.d.ts +0 -8
- package/dist/proto/cex_broker/SubscribeRequest.d.ts +0 -17
- package/dist/proto/cex_broker/SubscribeResponse.d.ts +0 -14
- package/dist/proto/cex_broker/SubscriptionType.d.ts +0 -11
- package/dist/proto/cex_broker/cex_service.d.ts +0 -28
- package/dist/proto/node.d.ts +0 -20
- package/dist/proto/node.descriptor.d.ts +0 -124
|
@@ -1 +1,31 @@
|
|
|
1
1
|
export declare const CCXT_METHODS_WITH_VERITY: string[];
|
|
2
|
+
export declare const Action: {
|
|
3
|
+
readonly NoAction: 0;
|
|
4
|
+
readonly Deposit: 1;
|
|
5
|
+
readonly Withdraw: 2;
|
|
6
|
+
readonly CreateOrder: 3;
|
|
7
|
+
readonly GetOrderDetails: 4;
|
|
8
|
+
readonly CancelOrder: 5;
|
|
9
|
+
readonly FetchBalances: 6;
|
|
10
|
+
readonly FetchDepositAddresses: 7;
|
|
11
|
+
readonly FetchTicker: 8;
|
|
12
|
+
readonly FetchCurrency: 9;
|
|
13
|
+
readonly Call: 10;
|
|
14
|
+
readonly FetchAccountId: 11;
|
|
15
|
+
readonly FetchFees: 12;
|
|
16
|
+
readonly InternalTransfer: 13;
|
|
17
|
+
};
|
|
18
|
+
export declare const SubscriptionType: {
|
|
19
|
+
readonly NO_ACTION: 0;
|
|
20
|
+
readonly ORDERBOOK: 1;
|
|
21
|
+
readonly TRADES: 2;
|
|
22
|
+
readonly TICKER: 3;
|
|
23
|
+
readonly OHLCV: 4;
|
|
24
|
+
readonly BALANCE: 5;
|
|
25
|
+
readonly ORDERS: 6;
|
|
26
|
+
};
|
|
27
|
+
export type Action = (typeof Action)[keyof typeof Action];
|
|
28
|
+
export type SubscriptionType = (typeof SubscriptionType)[keyof typeof SubscriptionType];
|
|
29
|
+
export declare function getActionName(action: unknown): string;
|
|
30
|
+
export declare function getSubscriptionTypeName(subscriptionType: number): string;
|
|
31
|
+
export declare function resolveSubscriptionType(type: SubscriptionType | undefined): SubscriptionType;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -14,9 +14,8 @@ export type BrokerPoolEntry = {
|
|
|
14
14
|
primary: BrokerAccount;
|
|
15
15
|
secondaryBrokers: BrokerAccount[];
|
|
16
16
|
};
|
|
17
|
-
export declare class
|
|
18
|
-
|
|
19
|
-
export declare class WithdrawRoutingUnavailableError extends WithdrawRoutingError {
|
|
17
|
+
export declare class BrokerAccountPreconditionError extends Error {
|
|
18
|
+
constructor(message: string);
|
|
20
19
|
}
|
|
21
20
|
export declare function authenticateRequest<T, E>(call: ServerUnaryCall<T, E>, whitelistIps: string[]): boolean;
|
|
22
21
|
export declare function createVerityHttpClientOverride(verityProverUrl: string, onProofCallback: (proof: string, notaryPubKey?: string) => void): (redact: string, proofTimeout: number) => HttpClientOverride;
|
|
@@ -47,20 +46,11 @@ export declare function validateWithdraw(policy: PolicyConfig, exchange: string,
|
|
|
47
46
|
valid: boolean;
|
|
48
47
|
error?: string;
|
|
49
48
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
code: string;
|
|
56
|
-
amount: number;
|
|
57
|
-
recipientAddress: string;
|
|
58
|
-
network: string;
|
|
59
|
-
params?: Record<string, string | number>;
|
|
60
|
-
routeViaMaster?: boolean;
|
|
61
|
-
sourceAccount?: string;
|
|
62
|
-
masterAccount?: string;
|
|
63
|
-
}): Promise<import("@usherlabs/ccxt").Transaction>;
|
|
49
|
+
/**
|
|
50
|
+
* Routes an internal transfer to the correct Binance SAPI endpoint
|
|
51
|
+
* based on source and destination account types.
|
|
52
|
+
*/
|
|
53
|
+
export declare function transferBinanceInternal(source: BrokerAccount, dest: BrokerAccount, code: string, amount: number): Promise<unknown>;
|
|
64
54
|
/**
|
|
65
55
|
* Validates order request against policy rules
|
|
66
56
|
*/
|