@arbiwallet/contracts 1.0.208 → 1.0.209
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_rates.ts +40 -0
- package/package.json +1 -1
- package/proto/exchange_rates.proto +28 -0
package/gen/exchange_rates.ts
CHANGED
|
@@ -63,6 +63,32 @@ export interface GetExchangeRatesResponse {
|
|
|
63
63
|
result?: string | undefined;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
export interface MarketRate {
|
|
67
|
+
id: string;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
inputCurrency: string;
|
|
70
|
+
outputCurrency: string;
|
|
71
|
+
rate: number;
|
|
72
|
+
market?: string | undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface GetMarketRatesRequest {
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface GetMarketRatesResponse {
|
|
79
|
+
exist: boolean;
|
|
80
|
+
rates: MarketRate[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface GetMarketRateRequest {
|
|
84
|
+
id: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface GetMarketRateResponse {
|
|
88
|
+
exist: boolean;
|
|
89
|
+
rate?: MarketRate | undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
66
92
|
export interface PrimeRate {
|
|
67
93
|
id: string;
|
|
68
94
|
inputCurrencyId: string;
|
|
@@ -324,6 +350,10 @@ export interface ExchangeRatesServiceClient {
|
|
|
324
350
|
|
|
325
351
|
getExchangeRates(request: GetExchangeRatesRequest): Observable<GetExchangeRatesResponse>;
|
|
326
352
|
|
|
353
|
+
getMarketRates(request: GetMarketRatesRequest): Observable<GetMarketRatesResponse>;
|
|
354
|
+
|
|
355
|
+
getMarketRate(request: GetMarketRateRequest): Observable<GetMarketRateResponse>;
|
|
356
|
+
|
|
327
357
|
getCustomRates(request: GetCustomRatesRequest): Observable<GetCustomRatesResponse>;
|
|
328
358
|
|
|
329
359
|
updateCustomRate(request: UpdateCustomRateRequest): Observable<UpdateCustomRateResponse>;
|
|
@@ -374,6 +404,14 @@ export interface ExchangeRatesServiceController {
|
|
|
374
404
|
request: GetExchangeRatesRequest,
|
|
375
405
|
): Promise<GetExchangeRatesResponse> | Observable<GetExchangeRatesResponse> | GetExchangeRatesResponse;
|
|
376
406
|
|
|
407
|
+
getMarketRates(
|
|
408
|
+
request: GetMarketRatesRequest,
|
|
409
|
+
): Promise<GetMarketRatesResponse> | Observable<GetMarketRatesResponse> | GetMarketRatesResponse;
|
|
410
|
+
|
|
411
|
+
getMarketRate(
|
|
412
|
+
request: GetMarketRateRequest,
|
|
413
|
+
): Promise<GetMarketRateResponse> | Observable<GetMarketRateResponse> | GetMarketRateResponse;
|
|
414
|
+
|
|
377
415
|
getCustomRates(
|
|
378
416
|
request: GetCustomRatesRequest,
|
|
379
417
|
): Promise<GetCustomRatesResponse> | Observable<GetCustomRatesResponse> | GetCustomRatesResponse;
|
|
@@ -420,6 +458,8 @@ export function ExchangeRatesServiceControllerMethods() {
|
|
|
420
458
|
"updatePrimeRate",
|
|
421
459
|
"deletePrimeRate",
|
|
422
460
|
"getExchangeRates",
|
|
461
|
+
"getMarketRates",
|
|
462
|
+
"getMarketRate",
|
|
423
463
|
"getCustomRates",
|
|
424
464
|
"updateCustomRate",
|
|
425
465
|
"getBybitRateProfit",
|
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.209",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -20,6 +20,9 @@ service ExchangeRatesService {
|
|
|
20
20
|
|
|
21
21
|
rpc GetExchangeRates(GetExchangeRatesRequest) returns (GetExchangeRatesResponse);
|
|
22
22
|
|
|
23
|
+
rpc GetMarketRates(GetMarketRatesRequest) returns (GetMarketRatesResponse);
|
|
24
|
+
rpc GetMarketRate(GetMarketRateRequest) returns (GetMarketRateResponse);
|
|
25
|
+
|
|
23
26
|
rpc GetCustomRates(GetCustomRatesRequest) returns (GetCustomRatesResponse);
|
|
24
27
|
rpc UpdateCustomRate(UpdateCustomRateRequest) returns (UpdateCustomRateResponse);
|
|
25
28
|
|
|
@@ -80,6 +83,31 @@ message GetExchangeRatesResponse {
|
|
|
80
83
|
optional string result = 2;
|
|
81
84
|
}
|
|
82
85
|
|
|
86
|
+
message MarketRate {
|
|
87
|
+
string id = 1;
|
|
88
|
+
string updated_at = 2;
|
|
89
|
+
string input_currency = 3;
|
|
90
|
+
string output_currency = 4;
|
|
91
|
+
double rate = 5;
|
|
92
|
+
optional string market = 6;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
message GetMarketRatesRequest {}
|
|
96
|
+
|
|
97
|
+
message GetMarketRatesResponse {
|
|
98
|
+
bool exist = 1;
|
|
99
|
+
repeated MarketRate rates = 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message GetMarketRateRequest {
|
|
103
|
+
string id = 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message GetMarketRateResponse {
|
|
107
|
+
bool exist = 1;
|
|
108
|
+
optional MarketRate rate = 2;
|
|
109
|
+
}
|
|
110
|
+
|
|
83
111
|
message PrimeRate {
|
|
84
112
|
string id = 1;
|
|
85
113
|
string input_currency_id = 2;
|