@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.
@@ -115,7 +115,8 @@ const descriptor = {
115
115
  "FetchCurrency": 9,
116
116
  "Call": 10,
117
117
  "FetchAccountId": 11,
118
- "FetchFees": 12
118
+ "FetchFees": 12,
119
+ "InternalTransfer": 13
119
120
  }
120
121
  }
121
122
  }
@@ -57,4 +57,5 @@ enum Action {
57
57
  Call=10;
58
58
  FetchAccountId=11;
59
59
  FetchFees= 12;
60
+ InternalTransfer= 13;
60
61
  }
@@ -19,11 +19,13 @@ export declare const WithdrawPayloadSchema: z.ZodObject<{
19
19
  recipientAddress: z.ZodString;
20
20
  amount: z.ZodCoercedNumber<unknown>;
21
21
  chain: z.ZodString;
22
- routeViaMaster: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>>;
23
- sourceAccount: z.ZodOptional<z.ZodString>;
24
- masterAccount: z.ZodOptional<z.ZodString>;
25
22
  params: z.ZodDefault<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>>;
26
23
  }, z.core.$strip>;
24
+ export declare const InternalTransferPayloadSchema: z.ZodObject<{
25
+ amount: z.ZodCoercedNumber<unknown>;
26
+ fromAccount: z.ZodOptional<z.ZodString>;
27
+ toAccount: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>;
27
29
  export declare const CreateOrderPayloadSchema: z.ZodObject<{
28
30
  orderType: z.ZodDefault<z.ZodEnum<{
29
31
  limit: "limit";
@@ -51,6 +53,7 @@ export type DepositPayload = z.infer<typeof DepositPayloadSchema>;
51
53
  export type CallPayload = z.infer<typeof CallPayloadSchema>;
52
54
  export type FetchDepositAddressesPayload = z.infer<typeof FetchDepositAddressesPayloadSchema>;
53
55
  export type WithdrawPayload = z.infer<typeof WithdrawPayloadSchema>;
56
+ export type InternalTransferPayload = z.infer<typeof InternalTransferPayloadSchema>;
54
57
  export type CreateOrderPayload = z.infer<typeof CreateOrderPayloadSchema>;
55
58
  export type GetOrderDetailsPayload = z.infer<typeof GetOrderDetailsPayloadSchema>;
56
59
  export type CancelOrderPayload = z.infer<typeof CancelOrderPayloadSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usherlabs/cex-broker",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Unified gRPC API to CEXs by Usher Labs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,17 +0,0 @@
1
- export declare const Action: {
2
- readonly NoAction: 0;
3
- readonly Deposit: 1;
4
- readonly Withdraw: 2;
5
- readonly CreateOrder: 3;
6
- readonly GetOrderDetails: 4;
7
- readonly CancelOrder: 5;
8
- readonly FetchBalances: 6;
9
- readonly FetchDepositAddresses: 7;
10
- readonly FetchTicker: 8;
11
- readonly FetchCurrency: 9;
12
- readonly Call: 10;
13
- readonly FetchAccountId: 11;
14
- readonly FetchFees: 12;
15
- };
16
- export type Action = 'NoAction' | 0 | 'Deposit' | 1 | 'Withdraw' | 2 | 'CreateOrder' | 3 | 'GetOrderDetails' | 4 | 'CancelOrder' | 5 | 'FetchBalances' | 6 | 'FetchDepositAddresses' | 7 | 'FetchTicker' | 8 | 'FetchCurrency' | 9 | 'Call' | 10 | 'FetchAccountId' | 11 | 'FetchFees' | 12;
17
- export type Action__Output = typeof Action[keyof typeof Action];
@@ -1,17 +0,0 @@
1
- import type { Action as _cex_broker_Action, Action__Output as _cex_broker_Action__Output } from '../cex_broker/Action';
2
- export interface ActionRequest {
3
- 'action'?: (_cex_broker_Action);
4
- 'payload'?: ({
5
- [key: string]: string;
6
- });
7
- 'cex'?: (string);
8
- 'symbol'?: (string);
9
- }
10
- export interface ActionRequest__Output {
11
- 'action'?: (_cex_broker_Action__Output);
12
- 'payload'?: ({
13
- [key: string]: string;
14
- });
15
- 'cex'?: (string);
16
- 'symbol'?: (string);
17
- }
@@ -1,8 +0,0 @@
1
- export interface ActionResponse {
2
- 'result'?: (string);
3
- 'proof'?: (string);
4
- }
5
- export interface ActionResponse__Output {
6
- 'result'?: (string);
7
- 'proof'?: (string);
8
- }
@@ -1,17 +0,0 @@
1
- import type { SubscriptionType as _cex_broker_SubscriptionType, SubscriptionType__Output as _cex_broker_SubscriptionType__Output } from '../cex_broker/SubscriptionType';
2
- export interface SubscribeRequest {
3
- 'cex'?: (string);
4
- 'symbol'?: (string);
5
- 'type'?: (_cex_broker_SubscriptionType);
6
- 'options'?: ({
7
- [key: string]: string;
8
- });
9
- }
10
- export interface SubscribeRequest__Output {
11
- 'cex'?: (string);
12
- 'symbol'?: (string);
13
- 'type'?: (_cex_broker_SubscriptionType__Output);
14
- 'options'?: ({
15
- [key: string]: string;
16
- });
17
- }
@@ -1,14 +0,0 @@
1
- import type { SubscriptionType as _cex_broker_SubscriptionType, SubscriptionType__Output as _cex_broker_SubscriptionType__Output } from '../cex_broker/SubscriptionType';
2
- import type { Long } from '@grpc/proto-loader';
3
- export interface SubscribeResponse {
4
- 'data'?: (string);
5
- 'timestamp'?: (number | string | Long);
6
- 'symbol'?: (string);
7
- 'type'?: (_cex_broker_SubscriptionType);
8
- }
9
- export interface SubscribeResponse__Output {
10
- 'data'?: (string);
11
- 'timestamp'?: (Long);
12
- 'symbol'?: (string);
13
- 'type'?: (_cex_broker_SubscriptionType__Output);
14
- }
@@ -1,11 +0,0 @@
1
- export declare const SubscriptionType: {
2
- readonly NO_ACTION: 0;
3
- readonly ORDERBOOK: 1;
4
- readonly TRADES: 2;
5
- readonly TICKER: 3;
6
- readonly OHLCV: 4;
7
- readonly BALANCE: 5;
8
- readonly ORDERS: 6;
9
- };
10
- export type SubscriptionType = 'NO_ACTION' | 0 | 'ORDERBOOK' | 1 | 'TRADES' | 2 | 'TICKER' | 3 | 'OHLCV' | 4 | 'BALANCE' | 5 | 'ORDERS' | 6;
11
- export type SubscriptionType__Output = typeof SubscriptionType[keyof typeof SubscriptionType];
@@ -1,28 +0,0 @@
1
- import type * as grpc from '@grpc/grpc-js';
2
- import type { MethodDefinition } from '@grpc/proto-loader';
3
- import type { ActionRequest as _cex_broker_ActionRequest, ActionRequest__Output as _cex_broker_ActionRequest__Output } from '../cex_broker/ActionRequest';
4
- import type { ActionResponse as _cex_broker_ActionResponse, ActionResponse__Output as _cex_broker_ActionResponse__Output } from '../cex_broker/ActionResponse';
5
- import type { SubscribeRequest as _cex_broker_SubscribeRequest, SubscribeRequest__Output as _cex_broker_SubscribeRequest__Output } from '../cex_broker/SubscribeRequest';
6
- import type { SubscribeResponse as _cex_broker_SubscribeResponse, SubscribeResponse__Output as _cex_broker_SubscribeResponse__Output } from '../cex_broker/SubscribeResponse';
7
- export interface cex_serviceClient extends grpc.Client {
8
- ExecuteAction(argument: _cex_broker_ActionRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
9
- ExecuteAction(argument: _cex_broker_ActionRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
10
- ExecuteAction(argument: _cex_broker_ActionRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
11
- ExecuteAction(argument: _cex_broker_ActionRequest, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
12
- executeAction(argument: _cex_broker_ActionRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
13
- executeAction(argument: _cex_broker_ActionRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
14
- executeAction(argument: _cex_broker_ActionRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
15
- executeAction(argument: _cex_broker_ActionRequest, callback: grpc.requestCallback<_cex_broker_ActionResponse__Output>): grpc.ClientUnaryCall;
16
- Subscribe(argument: _cex_broker_SubscribeRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_cex_broker_SubscribeResponse__Output>;
17
- Subscribe(argument: _cex_broker_SubscribeRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_cex_broker_SubscribeResponse__Output>;
18
- subscribe(argument: _cex_broker_SubscribeRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_cex_broker_SubscribeResponse__Output>;
19
- subscribe(argument: _cex_broker_SubscribeRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_cex_broker_SubscribeResponse__Output>;
20
- }
21
- export interface cex_serviceHandlers extends grpc.UntypedServiceImplementation {
22
- ExecuteAction: grpc.handleUnaryCall<_cex_broker_ActionRequest__Output, _cex_broker_ActionResponse>;
23
- Subscribe: grpc.handleServerStreamingCall<_cex_broker_SubscribeRequest__Output, _cex_broker_SubscribeResponse>;
24
- }
25
- export interface cex_serviceDefinition extends grpc.ServiceDefinition {
26
- ExecuteAction: MethodDefinition<_cex_broker_ActionRequest, _cex_broker_ActionResponse, _cex_broker_ActionRequest__Output, _cex_broker_ActionResponse__Output>;
27
- Subscribe: MethodDefinition<_cex_broker_SubscribeRequest, _cex_broker_SubscribeResponse, _cex_broker_SubscribeRequest__Output, _cex_broker_SubscribeResponse__Output>;
28
- }
@@ -1,20 +0,0 @@
1
- import type * as grpc from '@grpc/grpc-js';
2
- import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader';
3
- import type { cex_serviceClient as _cex_broker_cex_serviceClient, cex_serviceDefinition as _cex_broker_cex_serviceDefinition } from './cex_broker/cex_service';
4
- type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = {
5
- new (...args: ConstructorParameters<Constructor>): Subtype;
6
- };
7
- export interface ProtoGrpcType {
8
- cex_broker: {
9
- Action: EnumTypeDefinition;
10
- ActionRequest: MessageTypeDefinition;
11
- ActionResponse: MessageTypeDefinition;
12
- SubscribeRequest: MessageTypeDefinition;
13
- SubscribeResponse: MessageTypeDefinition;
14
- SubscriptionType: EnumTypeDefinition;
15
- cex_service: SubtypeConstructor<typeof grpc.Client, _cex_broker_cex_serviceClient> & {
16
- service: _cex_broker_cex_serviceDefinition;
17
- };
18
- };
19
- }
20
- export {};
@@ -1,124 +0,0 @@
1
- declare const descriptor: {
2
- readonly nested: {
3
- readonly cex_broker: {
4
- readonly nested: {
5
- readonly ActionRequest: {
6
- readonly fields: {
7
- readonly action: {
8
- readonly type: "Action";
9
- readonly id: 1;
10
- };
11
- readonly payload: {
12
- readonly keyType: "string";
13
- readonly type: "string";
14
- readonly id: 2;
15
- };
16
- readonly cex: {
17
- readonly type: "string";
18
- readonly id: 3;
19
- };
20
- readonly symbol: {
21
- readonly type: "string";
22
- readonly id: 4;
23
- };
24
- };
25
- };
26
- readonly ActionResponse: {
27
- readonly fields: {
28
- readonly result: {
29
- readonly type: "string";
30
- readonly id: 1;
31
- };
32
- readonly proof: {
33
- readonly type: "string";
34
- readonly id: 2;
35
- };
36
- };
37
- };
38
- readonly SubscribeRequest: {
39
- readonly fields: {
40
- readonly cex: {
41
- readonly type: "string";
42
- readonly id: 1;
43
- };
44
- readonly symbol: {
45
- readonly type: "string";
46
- readonly id: 2;
47
- };
48
- readonly type: {
49
- readonly type: "SubscriptionType";
50
- readonly id: 3;
51
- };
52
- readonly options: {
53
- readonly keyType: "string";
54
- readonly type: "string";
55
- readonly id: 4;
56
- };
57
- };
58
- };
59
- readonly SubscribeResponse: {
60
- readonly fields: {
61
- readonly data: {
62
- readonly type: "string";
63
- readonly id: 1;
64
- };
65
- readonly timestamp: {
66
- readonly type: "int64";
67
- readonly id: 2;
68
- };
69
- readonly symbol: {
70
- readonly type: "string";
71
- readonly id: 3;
72
- };
73
- readonly type: {
74
- readonly type: "SubscriptionType";
75
- readonly id: 4;
76
- };
77
- };
78
- };
79
- readonly SubscriptionType: {
80
- readonly values: {
81
- readonly NO_ACTION: 0;
82
- readonly ORDERBOOK: 1;
83
- readonly TRADES: 2;
84
- readonly TICKER: 3;
85
- readonly OHLCV: 4;
86
- readonly BALANCE: 5;
87
- readonly ORDERS: 6;
88
- };
89
- };
90
- readonly cex_service: {
91
- readonly methods: {
92
- readonly ExecuteAction: {
93
- readonly requestType: "ActionRequest";
94
- readonly responseType: "ActionResponse";
95
- };
96
- readonly Subscribe: {
97
- readonly requestType: "SubscribeRequest";
98
- readonly responseType: "SubscribeResponse";
99
- readonly responseStream: true;
100
- };
101
- };
102
- };
103
- readonly Action: {
104
- readonly values: {
105
- readonly NoAction: 0;
106
- readonly Deposit: 1;
107
- readonly Withdraw: 2;
108
- readonly CreateOrder: 3;
109
- readonly GetOrderDetails: 4;
110
- readonly CancelOrder: 5;
111
- readonly FetchBalances: 6;
112
- readonly FetchDepositAddresses: 7;
113
- readonly FetchTicker: 8;
114
- readonly FetchCurrency: 9;
115
- readonly Call: 10;
116
- readonly FetchAccountId: 11;
117
- readonly FetchFees: 12;
118
- };
119
- };
120
- };
121
- };
122
- };
123
- };
124
- export default descriptor;