@arbiwallet/contracts 1.0.244 → 1.0.245
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/gen/exchange_core.ts +69 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +70 -0
package/gen/exchange_core.ts
CHANGED
|
@@ -99,6 +99,65 @@ export interface GetExchangeDealsResponse {
|
|
|
99
99
|
results: GetExchangeDealsItem[];
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
export interface GetExchangeDealDetailsRequest {
|
|
103
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
104
|
+
id: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface GetExchangeDealDetailsResult {
|
|
108
|
+
id: string;
|
|
109
|
+
userId: string;
|
|
110
|
+
customerId: string;
|
|
111
|
+
customerFullName: string;
|
|
112
|
+
customerChatLink?: string | undefined;
|
|
113
|
+
customerUrl?: string | undefined;
|
|
114
|
+
referrerId?: string | undefined;
|
|
115
|
+
referrerFullName?: string | undefined;
|
|
116
|
+
referrerUrl?: string | undefined;
|
|
117
|
+
referrerPercent?: number | undefined;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
inputAmount: number;
|
|
120
|
+
inputCurrencyId: string;
|
|
121
|
+
inputCurrencyShortName?: string | undefined;
|
|
122
|
+
inputWalletId: string;
|
|
123
|
+
inputWalletName?: string | undefined;
|
|
124
|
+
methodId: string;
|
|
125
|
+
methodName?: string | undefined;
|
|
126
|
+
outputAmount: number;
|
|
127
|
+
outputCurrencyId: string;
|
|
128
|
+
outputCurrencyShortName?: string | undefined;
|
|
129
|
+
outputWalletId: string;
|
|
130
|
+
outputWalletName?: string | undefined;
|
|
131
|
+
oneCurrencyExchange: boolean;
|
|
132
|
+
receivedFromDealer: boolean;
|
|
133
|
+
receivedFromDealerWalletId?: string | undefined;
|
|
134
|
+
receivedFromDealerWalletName?: string | undefined;
|
|
135
|
+
exchangeStatusId?: string | undefined;
|
|
136
|
+
exchangeStatusName?: string | undefined;
|
|
137
|
+
payed: boolean;
|
|
138
|
+
buyPrice?: number | undefined;
|
|
139
|
+
sellPrice?: number | undefined;
|
|
140
|
+
profitPercent?: number | undefined;
|
|
141
|
+
profit?: number | undefined;
|
|
142
|
+
profitCurrencyId?: string | undefined;
|
|
143
|
+
profitCurrencyShortName?: string | undefined;
|
|
144
|
+
usdtRate?: number | undefined;
|
|
145
|
+
usdtProfit?: number | undefined;
|
|
146
|
+
profitAccounting: boolean;
|
|
147
|
+
profitDate?: string | undefined;
|
|
148
|
+
expensesCurrencyId?: string | undefined;
|
|
149
|
+
expensesCurrencyShortName?: string | undefined;
|
|
150
|
+
expensesForCourier?: number | undefined;
|
|
151
|
+
expensesForReferrer?: number | undefined;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface GetExchangeDealDetailsResponse {
|
|
155
|
+
ok: boolean;
|
|
156
|
+
result?: GetExchangeDealDetailsResult | undefined;
|
|
157
|
+
error?: string | undefined;
|
|
158
|
+
validationErrors?: { [key: string]: any } | undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
102
161
|
export interface UpdateExchangeDealRequest {
|
|
103
162
|
authManagerContext: AuthManagerContext | undefined;
|
|
104
163
|
id: string;
|
|
@@ -483,6 +542,8 @@ export interface ExchangeCoreServiceClient {
|
|
|
483
542
|
|
|
484
543
|
getExchangeDeals(request: GetExchangeDealsRequest): Observable<GetExchangeDealsResponse>;
|
|
485
544
|
|
|
545
|
+
getExchangeDealDetails(request: GetExchangeDealDetailsRequest): Observable<GetExchangeDealDetailsResponse>;
|
|
546
|
+
|
|
486
547
|
updateExchangeDeal(request: UpdateExchangeDealRequest): Observable<UpdateExchangeDealResponse>;
|
|
487
548
|
|
|
488
549
|
completeExchangeDeal(request: CompleteExchangeDealRequest): Observable<CompleteExchangeDealResponse>;
|
|
@@ -521,6 +582,13 @@ export interface ExchangeCoreServiceController {
|
|
|
521
582
|
request: GetExchangeDealsRequest,
|
|
522
583
|
): Promise<GetExchangeDealsResponse> | Observable<GetExchangeDealsResponse> | GetExchangeDealsResponse;
|
|
523
584
|
|
|
585
|
+
getExchangeDealDetails(
|
|
586
|
+
request: GetExchangeDealDetailsRequest,
|
|
587
|
+
):
|
|
588
|
+
| Promise<GetExchangeDealDetailsResponse>
|
|
589
|
+
| Observable<GetExchangeDealDetailsResponse>
|
|
590
|
+
| GetExchangeDealDetailsResponse;
|
|
591
|
+
|
|
524
592
|
updateExchangeDeal(
|
|
525
593
|
request: UpdateExchangeDealRequest,
|
|
526
594
|
): Promise<UpdateExchangeDealResponse> | Observable<UpdateExchangeDealResponse> | UpdateExchangeDealResponse;
|
|
@@ -586,6 +654,7 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
586
654
|
const grpcMethods: string[] = [
|
|
587
655
|
"createExchangeDeal",
|
|
588
656
|
"getExchangeDeals",
|
|
657
|
+
"getExchangeDealDetails",
|
|
589
658
|
"updateExchangeDeal",
|
|
590
659
|
"completeExchangeDeal",
|
|
591
660
|
"cancelExchangeDeal",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbiwallet/contracts",
|
|
3
3
|
"descriptions": "Generate and manage smart contracts for ArbiWallet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.245",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -11,6 +11,7 @@ option java_package = "com.arbiwallet.exchange.core";
|
|
|
11
11
|
service ExchangeCoreService {
|
|
12
12
|
rpc CreateExchangeDeal(CreateExchangeDealRequest) returns (CreateExchangeDealResponse);
|
|
13
13
|
rpc GetExchangeDeals(GetExchangeDealsRequest) returns (GetExchangeDealsResponse);
|
|
14
|
+
rpc GetExchangeDealDetails(GetExchangeDealDetailsRequest) returns (GetExchangeDealDetailsResponse);
|
|
14
15
|
rpc UpdateExchangeDeal(UpdateExchangeDealRequest) returns (UpdateExchangeDealResponse);
|
|
15
16
|
rpc CompleteExchangeDeal(CompleteExchangeDealRequest) returns (CompleteExchangeDealResponse);
|
|
16
17
|
rpc CancelExchangeDeal(CancelExchangeDealRequest) returns (CancelExchangeDealResponse);
|
|
@@ -126,6 +127,75 @@ message GetExchangeDealsResponse {
|
|
|
126
127
|
repeated GetExchangeDealsItem results = 4;
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
message GetExchangeDealDetailsRequest {
|
|
131
|
+
AuthManagerContext auth_manager_context = 1;
|
|
132
|
+
string id = 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
message GetExchangeDealDetailsResult {
|
|
136
|
+
string id = 1;
|
|
137
|
+
string user_id = 2;
|
|
138
|
+
|
|
139
|
+
string customer_id = 3;
|
|
140
|
+
string customer_full_name = 4;
|
|
141
|
+
optional string customer_chat_link = 5;
|
|
142
|
+
optional string customer_url = 6;
|
|
143
|
+
|
|
144
|
+
optional string referrer_id = 7;
|
|
145
|
+
optional string referrer_full_name = 8;
|
|
146
|
+
optional string referrer_url = 9;
|
|
147
|
+
optional double referrer_percent = 10;
|
|
148
|
+
|
|
149
|
+
string created_at = 11;
|
|
150
|
+
|
|
151
|
+
double input_amount = 12;
|
|
152
|
+
string input_currency_id = 13;
|
|
153
|
+
optional string input_currency_short_name = 14;
|
|
154
|
+
string input_wallet_id = 15;
|
|
155
|
+
optional string input_wallet_name = 16;
|
|
156
|
+
string method_id = 17;
|
|
157
|
+
optional string method_name = 18;
|
|
158
|
+
|
|
159
|
+
double output_amount = 19;
|
|
160
|
+
string output_currency_id = 20;
|
|
161
|
+
optional string output_currency_short_name = 21;
|
|
162
|
+
string output_wallet_id = 22;
|
|
163
|
+
optional string output_wallet_name = 23;
|
|
164
|
+
|
|
165
|
+
bool one_currency_exchange = 24;
|
|
166
|
+
bool received_from_dealer = 25;
|
|
167
|
+
optional string received_from_dealer_wallet_id = 26;
|
|
168
|
+
optional string received_from_dealer_wallet_name = 27;
|
|
169
|
+
|
|
170
|
+
optional string exchange_status_id = 28;
|
|
171
|
+
optional string exchange_status_name = 29;
|
|
172
|
+
bool payed = 30;
|
|
173
|
+
|
|
174
|
+
optional double buy_price = 31;
|
|
175
|
+
optional double sell_price = 32;
|
|
176
|
+
optional double profit_percent = 33;
|
|
177
|
+
optional double profit = 34;
|
|
178
|
+
|
|
179
|
+
optional string profit_currency_id = 35;
|
|
180
|
+
optional string profit_currency_short_name = 36;
|
|
181
|
+
optional double usdt_rate = 37;
|
|
182
|
+
optional double usdt_profit = 38;
|
|
183
|
+
bool profit_accounting = 39;
|
|
184
|
+
optional string profit_date = 40;
|
|
185
|
+
|
|
186
|
+
optional string expenses_currency_id = 41;
|
|
187
|
+
optional string expenses_currency_short_name = 42;
|
|
188
|
+
optional double expenses_for_courier = 43;
|
|
189
|
+
optional double expenses_for_referrer = 44;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
message GetExchangeDealDetailsResponse {
|
|
193
|
+
bool ok = 1;
|
|
194
|
+
optional GetExchangeDealDetailsResult result = 2;
|
|
195
|
+
optional string error = 3;
|
|
196
|
+
optional google.protobuf.Struct validationErrors = 4;
|
|
197
|
+
}
|
|
198
|
+
|
|
129
199
|
message UpdateExchangeDealRequest {
|
|
130
200
|
AuthManagerContext auth_manager_context = 1;
|
|
131
201
|
string id = 2;
|