@arbiwallet/contracts 1.0.207 → 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.
@@ -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;
@@ -84,6 +110,15 @@ export interface CreatePrimeRateResponse {
84
110
  error?: string | undefined;
85
111
  }
86
112
 
113
+ export interface GetPrimeRateRequest {
114
+ id: string;
115
+ }
116
+
117
+ export interface GetPrimeRateResponse {
118
+ exist: boolean;
119
+ rate?: PrimeRate | undefined;
120
+ }
121
+
87
122
  export interface GetPrimeRatesRequest {
88
123
  }
89
124
 
@@ -305,6 +340,8 @@ export interface ExchangeRatesServiceClient {
305
340
 
306
341
  createPrimeRate(request: CreatePrimeRateRequest): Observable<CreatePrimeRateResponse>;
307
342
 
343
+ getPrimeRate(request: GetPrimeRateRequest): Observable<GetPrimeRateResponse>;
344
+
308
345
  getPrimeRates(request: GetPrimeRatesRequest): Observable<GetPrimeRatesResponse>;
309
346
 
310
347
  updatePrimeRate(request: UpdatePrimeRateRequest): Observable<UpdatePrimeRateResponse>;
@@ -313,6 +350,10 @@ export interface ExchangeRatesServiceClient {
313
350
 
314
351
  getExchangeRates(request: GetExchangeRatesRequest): Observable<GetExchangeRatesResponse>;
315
352
 
353
+ getMarketRates(request: GetMarketRatesRequest): Observable<GetMarketRatesResponse>;
354
+
355
+ getMarketRate(request: GetMarketRateRequest): Observable<GetMarketRateResponse>;
356
+
316
357
  getCustomRates(request: GetCustomRatesRequest): Observable<GetCustomRatesResponse>;
317
358
 
318
359
  updateCustomRate(request: UpdateCustomRateRequest): Observable<UpdateCustomRateResponse>;
@@ -343,6 +384,10 @@ export interface ExchangeRatesServiceController {
343
384
  request: CreatePrimeRateRequest,
344
385
  ): Promise<CreatePrimeRateResponse> | Observable<CreatePrimeRateResponse> | CreatePrimeRateResponse;
345
386
 
387
+ getPrimeRate(
388
+ request: GetPrimeRateRequest,
389
+ ): Promise<GetPrimeRateResponse> | Observable<GetPrimeRateResponse> | GetPrimeRateResponse;
390
+
346
391
  getPrimeRates(
347
392
  request: GetPrimeRatesRequest,
348
393
  ): Promise<GetPrimeRatesResponse> | Observable<GetPrimeRatesResponse> | GetPrimeRatesResponse;
@@ -359,6 +404,14 @@ export interface ExchangeRatesServiceController {
359
404
  request: GetExchangeRatesRequest,
360
405
  ): Promise<GetExchangeRatesResponse> | Observable<GetExchangeRatesResponse> | GetExchangeRatesResponse;
361
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
+
362
415
  getCustomRates(
363
416
  request: GetCustomRatesRequest,
364
417
  ): Promise<GetCustomRatesResponse> | Observable<GetCustomRatesResponse> | GetCustomRatesResponse;
@@ -400,10 +453,13 @@ export function ExchangeRatesServiceControllerMethods() {
400
453
  "getCurrencySettings",
401
454
  "updateCurrencySetting",
402
455
  "createPrimeRate",
456
+ "getPrimeRate",
403
457
  "getPrimeRates",
404
458
  "updatePrimeRate",
405
459
  "deletePrimeRate",
406
460
  "getExchangeRates",
461
+ "getMarketRates",
462
+ "getMarketRate",
407
463
  "getCustomRates",
408
464
  "updateCustomRate",
409
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.207",
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
  },
@@ -13,12 +13,16 @@ service ExchangeRatesService {
13
13
  rpc UpdateCurrencySetting(UpdateCurrencySettingRequest) returns (UpdateCurrencySettingResponse);
14
14
 
15
15
  rpc CreatePrimeRate(CreatePrimeRateRequest) returns (CreatePrimeRateResponse);
16
+ rpc GetPrimeRate(GetPrimeRateRequest) returns (GetPrimeRateResponse);
16
17
  rpc GetPrimeRates(GetPrimeRatesRequest) returns (GetPrimeRatesResponse);
17
18
  rpc UpdatePrimeRate(UpdatePrimeRateRequest) returns (UpdatePrimeRateResponse);
18
19
  rpc DeletePrimeRate(DeletePrimeRateRequest) returns (DeletePrimeRateResponse);
19
20
 
20
21
  rpc GetExchangeRates(GetExchangeRatesRequest) returns (GetExchangeRatesResponse);
21
22
 
23
+ rpc GetMarketRates(GetMarketRatesRequest) returns (GetMarketRatesResponse);
24
+ rpc GetMarketRate(GetMarketRateRequest) returns (GetMarketRateResponse);
25
+
22
26
  rpc GetCustomRates(GetCustomRatesRequest) returns (GetCustomRatesResponse);
23
27
  rpc UpdateCustomRate(UpdateCustomRateRequest) returns (UpdateCustomRateResponse);
24
28
 
@@ -79,6 +83,31 @@ message GetExchangeRatesResponse {
79
83
  optional string result = 2;
80
84
  }
81
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
+
82
111
  message PrimeRate {
83
112
  string id = 1;
84
113
  string input_currency_id = 2;
@@ -100,6 +129,15 @@ message CreatePrimeRateResponse {
100
129
  optional string error = 3;
101
130
  }
102
131
 
132
+ message GetPrimeRateRequest {
133
+ string id = 1;
134
+ }
135
+
136
+ message GetPrimeRateResponse {
137
+ bool exist = 1;
138
+ optional PrimeRate rate = 2;
139
+ }
140
+
103
141
  message GetPrimeRatesRequest {}
104
142
 
105
143
  message GetPrimeRatesResponse {