@arbiwallet/contracts 1.0.228 → 1.0.230

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.
@@ -272,21 +272,96 @@ export interface GetPaymentsSummaryResponse {
272
272
  items: PaymentsSummaryItem[];
273
273
  }
274
274
 
275
- export interface GetExchangeDealsCountsResponse {
276
- withExchangeCount: number;
277
- completedCount: number;
275
+ export interface WalletItem {
276
+ id: string;
277
+ name: string;
278
+ sort: number;
279
+ balance: number;
280
+ status: boolean;
281
+ managerId?: string | undefined;
282
+ managerChanged?: string | undefined;
283
+ isGeneral: boolean;
284
+ showOnBalances: boolean;
285
+ cryptoAddress?: string | undefined;
286
+ cryptoNetwork?: number | undefined;
287
+ isActive: boolean;
288
+ currencyIds: string[];
289
+ }
290
+
291
+ export interface GetWalletsRequest {
292
+ authManagerContext: AuthManagerContext | undefined;
293
+ search?: string | undefined;
294
+ isActive?: boolean | undefined;
295
+ page?: number | undefined;
296
+ pageSize?: number | undefined;
297
+ }
298
+
299
+ export interface GetWalletsResponse {
300
+ count: number;
301
+ next?: string | undefined;
302
+ previous?: string | undefined;
303
+ results: WalletItem[];
304
+ }
305
+
306
+ export interface CreateWalletRequest {
307
+ authManagerContext: AuthManagerContext | undefined;
308
+ name: string;
309
+ sort?: number | undefined;
310
+ isGeneral?: boolean | undefined;
311
+ showOnBalances?: boolean | undefined;
312
+ cryptoAddress?: string | undefined;
313
+ cryptoNetwork?: number | undefined;
314
+ isActive?: boolean | undefined;
315
+ status?: boolean | undefined;
316
+ managerId?: string | undefined;
317
+ currencyIds: string[];
318
+ }
319
+
320
+ export interface CreateWalletResponse {
321
+ ok: boolean;
322
+ result?: WalletItem | undefined;
323
+ error?: string | undefined;
324
+ validationErrors?: { [key: string]: any } | undefined;
325
+ }
326
+
327
+ export interface UpdateWalletRequest {
328
+ authManagerContext: AuthManagerContext | undefined;
329
+ id: string;
330
+ name?: string | undefined;
331
+ sort?: number | undefined;
332
+ isGeneral?: boolean | undefined;
333
+ showOnBalances?: boolean | undefined;
334
+ cryptoAddress?: string | undefined;
335
+ cryptoNetwork?: number | undefined;
336
+ isActive?: boolean | undefined;
337
+ status?: boolean | undefined;
338
+ managerId?: string | undefined;
339
+ currencyIds: string[];
340
+ }
341
+
342
+ export interface UpdateWalletResponse {
343
+ ok: boolean;
344
+ result?: WalletItem | undefined;
345
+ error?: string | undefined;
346
+ validationErrors?: { [key: string]: any } | undefined;
347
+ }
348
+
349
+ export interface DeleteWalletRequest {
350
+ authManagerContext: AuthManagerContext | undefined;
351
+ id: string;
352
+ }
353
+
354
+ export interface DeleteWalletResponse {
355
+ success: boolean;
356
+ message?: string | undefined;
357
+ error?: string | undefined;
358
+ validationErrors?: { [key: string]: any } | undefined;
278
359
  }
279
360
 
280
361
  export const EXCHANGE_CORE_PACKAGE_NAME = "exchange_core";
281
362
 
282
363
  wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
283
364
 
284
- /**
285
- * rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
286
- * rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
287
- * rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
288
- */
289
-
290
365
  export interface ExchangeCoreServiceClient {
291
366
  createExchangeDeal(request: CreateExchangeDealRequest): Observable<CreateExchangeDealResponse>;
292
367
 
@@ -304,14 +379,14 @@ export interface ExchangeCoreServiceClient {
304
379
 
305
380
  getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
306
381
 
307
- getExchangeDealsCounts(request: ExchangeCalculationsFiltersRequest): Observable<GetExchangeDealsCountsResponse>;
308
- }
382
+ getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
383
+
384
+ createWallet(request: CreateWalletRequest): Observable<CreateWalletResponse>;
309
385
 
310
- /**
311
- * rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
312
- * rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
313
- * rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
314
- */
386
+ updateWallet(request: UpdateWalletRequest): Observable<UpdateWalletResponse>;
387
+
388
+ deleteWallet(request: DeleteWalletRequest): Observable<DeleteWalletResponse>;
389
+ }
315
390
 
316
391
  export interface ExchangeCoreServiceController {
317
392
  createExchangeDeal(
@@ -349,12 +424,21 @@ export interface ExchangeCoreServiceController {
349
424
  request: ExchangeCalculationsFiltersRequest,
350
425
  ): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
351
426
 
352
- getExchangeDealsCounts(
353
- request: ExchangeCalculationsFiltersRequest,
354
- ):
355
- | Promise<GetExchangeDealsCountsResponse>
356
- | Observable<GetExchangeDealsCountsResponse>
357
- | GetExchangeDealsCountsResponse;
427
+ getWallets(
428
+ request: GetWalletsRequest,
429
+ ): Promise<GetWalletsResponse> | Observable<GetWalletsResponse> | GetWalletsResponse;
430
+
431
+ createWallet(
432
+ request: CreateWalletRequest,
433
+ ): Promise<CreateWalletResponse> | Observable<CreateWalletResponse> | CreateWalletResponse;
434
+
435
+ updateWallet(
436
+ request: UpdateWalletRequest,
437
+ ): Promise<UpdateWalletResponse> | Observable<UpdateWalletResponse> | UpdateWalletResponse;
438
+
439
+ deleteWallet(
440
+ request: DeleteWalletRequest,
441
+ ): Promise<DeleteWalletResponse> | Observable<DeleteWalletResponse> | DeleteWalletResponse;
358
442
  }
359
443
 
360
444
  export function ExchangeCoreServiceControllerMethods() {
@@ -368,7 +452,10 @@ export function ExchangeCoreServiceControllerMethods() {
368
452
  "getTransactions",
369
453
  "getTransactionsSummary",
370
454
  "getPaymentsSummary",
371
- "getExchangeDealsCounts",
455
+ "getWallets",
456
+ "createWallet",
457
+ "updateWallet",
458
+ "deleteWallet",
372
459
  ];
373
460
  for (const method of grpcMethods) {
374
461
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -364,11 +364,6 @@ export interface GetExchangeCalculationHistoryResponse {
364
364
  pagination?: ExchangeCalculationHistoryPagination | undefined;
365
365
  }
366
366
 
367
- export interface GetCalculationCountsResponse {
368
- totalCount: number;
369
- uniqueCustomers: number;
370
- }
371
-
372
367
  export interface CalculationsInputCurrencySummaryItem {
373
368
  currency: string;
374
369
  total: number;
@@ -376,7 +371,9 @@ export interface CalculationsInputCurrencySummaryItem {
376
371
  inProgress: number;
377
372
  }
378
373
 
379
- export interface GetCalculationsInputCurrencySummaryResponse {
374
+ export interface GetExchangeCalculationStatsResponse {
375
+ totalCount: number;
376
+ uniqueCustomers: number;
380
377
  withExchangeCount: number;
381
378
  completedCount: number;
382
379
  items: CalculationsInputCurrencySummaryItem[];
@@ -423,11 +420,9 @@ export interface ExchangeRatesServiceClient {
423
420
  request: GetExchangeCalculationHistoryRequest,
424
421
  ): Observable<GetExchangeCalculationHistoryResponse>;
425
422
 
426
- getCalculationCounts(request: ExchangeCalculationFiltersRequest): Observable<GetCalculationCountsResponse>;
427
-
428
- getCalculationsInputCurrencySummary(
423
+ getExchangeCalculationStats(
429
424
  request: ExchangeCalculationFiltersRequest,
430
- ): Observable<GetCalculationsInputCurrencySummaryResponse>;
425
+ ): Observable<GetExchangeCalculationStatsResponse>;
431
426
  }
432
427
 
433
428
  export interface ExchangeRatesServiceController {
@@ -505,16 +500,12 @@ export interface ExchangeRatesServiceController {
505
500
  | Observable<GetExchangeCalculationHistoryResponse>
506
501
  | GetExchangeCalculationHistoryResponse;
507
502
 
508
- getCalculationCounts(
509
- request: ExchangeCalculationFiltersRequest,
510
- ): Promise<GetCalculationCountsResponse> | Observable<GetCalculationCountsResponse> | GetCalculationCountsResponse;
511
-
512
- getCalculationsInputCurrencySummary(
503
+ getExchangeCalculationStats(
513
504
  request: ExchangeCalculationFiltersRequest,
514
505
  ):
515
- | Promise<GetCalculationsInputCurrencySummaryResponse>
516
- | Observable<GetCalculationsInputCurrencySummaryResponse>
517
- | GetCalculationsInputCurrencySummaryResponse;
506
+ | Promise<GetExchangeCalculationStatsResponse>
507
+ | Observable<GetExchangeCalculationStatsResponse>
508
+ | GetExchangeCalculationStatsResponse;
518
509
  }
519
510
 
520
511
  export function ExchangeRatesServiceControllerMethods() {
@@ -537,8 +528,7 @@ export function ExchangeRatesServiceControllerMethods() {
537
528
  "calculateExchange",
538
529
  "getExchangeCalculation",
539
530
  "getExchangeCalculationHistory",
540
- "getCalculationCounts",
541
- "getCalculationsInputCurrencySummary",
531
+ "getExchangeCalculationStats",
542
532
  ];
543
533
  for (const method of grpcMethods) {
544
534
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
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.228",
4
+ "version": "1.0.230",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -9,10 +9,6 @@ option java_multiple_files = true;
9
9
  option java_package = "com.arbiwallet.exchange.core";
10
10
 
11
11
  service ExchangeCoreService {
12
- // rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
13
- // rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
14
- // rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
15
-
16
12
  rpc CreateExchangeDeal(CreateExchangeDealRequest) returns (CreateExchangeDealResponse);
17
13
  rpc GetExchangeDeals(GetExchangeDealsRequest) returns (GetExchangeDealsResponse);
18
14
  rpc UpdateExchangeDeal(UpdateExchangeDealRequest) returns (UpdateExchangeDealResponse);
@@ -23,74 +19,12 @@ service ExchangeCoreService {
23
19
  rpc GetTransactionsSummary(GetTransactionsSummaryRequest) returns (GetTransactionsSummaryResponse);
24
20
 
25
21
  rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
26
- rpc GetExchangeDealsCounts(ExchangeCalculationsFiltersRequest) returns (GetExchangeDealsCountsResponse);
27
- }
28
-
29
- // message CreateExchangePaymentRequest {
30
- // optional string manager_user_id = 1;
31
- // optional string manager_id = 2;
32
-
33
- // optional string calculation_id = 3;
34
- // int32 agent_id = 4;
35
- // optional double amount = 5;
36
- // optional string user_id = 6;
37
- // optional string crypto_network = 7;
38
- // optional string customer_source = 8;
39
- // optional string customer_referrer = 9;
40
- // }
41
-
42
- // message CreateExchangePaymentResult {
43
- // string payment_id = 1;
44
- // string payment_uuid = 2;
45
- // double amount = 3;
46
- // int32 status = 4;
47
- // string agent = 5;
48
- // optional string wallet_id = 6;
49
- // optional string crypto_network = 7;
50
- // optional string crypto_address = 8;
51
- // optional string arbi_link = 9;
52
- // optional string payment_link = 10;
53
- // }
54
-
55
- // message CreateExchangePaymentResponse {
56
- // bool ok = 1;
57
- // optional CreateExchangePaymentResult result = 2;
58
- // optional string error = 3;
59
- // optional google.protobuf.Struct validationErrors = 4;
60
- // }
61
-
62
- // message HandlePaymentWebhookRequest {
63
- // string json_payload = 1;
64
- // }
65
-
66
- // message HandlePaymentWebhookResponse {
67
- // bool ok = 1;
68
- // string status = 2;
69
- // }
70
-
71
- // message GetExchangePaymentsRequest {
72
- // optional int32 page = 1;
73
- // optional int32 limit = 2;
74
- // }
75
-
76
- // message GetExchangePaymentsItem {
77
- // string payment_id = 1;
78
- // string payment_uuid = 2;
79
- // double amount = 3;
80
- // int32 status = 4;
81
- // optional string payment_agent_status = 5;
82
- // optional string payment_link = 6;
83
- // optional string qr_link = 7;
84
- // optional string crypto_address = 8;
85
- // }
86
-
87
- // message GetExchangePaymentsResponse {
88
- // repeated GetExchangePaymentsItem payments = 1;
89
- // int32 page = 2;
90
- // int32 limit = 3;
91
- // int32 total = 4;
92
- // int32 total_pages = 5;
93
- // }
22
+
23
+ rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
24
+ rpc CreateWallet(CreateWalletRequest) returns (CreateWalletResponse);
25
+ rpc UpdateWallet(UpdateWalletRequest) returns (UpdateWalletResponse);
26
+ rpc DeleteWallet(DeleteWalletRequest) returns (DeleteWalletResponse);
27
+ }
94
28
 
95
29
  message AuthManagerContext {
96
30
  string manager_id = 1;
@@ -360,7 +294,88 @@ message GetPaymentsSummaryResponse {
360
294
  repeated PaymentsSummaryItem items = 2;
361
295
  }
362
296
 
363
- message GetExchangeDealsCountsResponse {
364
- int32 with_exchange_count = 1;
365
- int32 completed_count = 2;
297
+ message WalletItem {
298
+ string id = 1;
299
+ string name = 2;
300
+ int32 sort = 3;
301
+ double balance = 4;
302
+ bool status = 5;
303
+ optional string manager_id = 6;
304
+ optional string manager_changed = 7;
305
+ bool is_general = 8;
306
+ bool show_on_balances = 9;
307
+ optional string crypto_address = 10;
308
+ optional int32 crypto_network = 11;
309
+ bool is_active = 12;
310
+ repeated string currency_ids = 13;
311
+ }
312
+
313
+ message GetWalletsRequest {
314
+ AuthManagerContext auth_manager_context = 1;
315
+ optional string search = 2;
316
+ optional bool is_active = 3;
317
+ optional int32 page = 4;
318
+ optional int32 page_size = 5;
319
+ }
320
+
321
+ message GetWalletsResponse {
322
+ int32 count = 1;
323
+ optional string next = 2;
324
+ optional string previous = 3;
325
+ repeated WalletItem results = 4;
326
+ }
327
+
328
+ message CreateWalletRequest {
329
+ AuthManagerContext auth_manager_context = 1;
330
+ string name = 2;
331
+ optional int32 sort = 3;
332
+ optional bool is_general = 4;
333
+ optional bool show_on_balances = 5;
334
+ optional string crypto_address = 6;
335
+ optional int32 crypto_network = 7;
336
+ optional bool is_active = 8;
337
+ optional bool status = 9;
338
+ optional string manager_id = 10;
339
+ repeated string currency_ids = 11;
340
+ }
341
+
342
+ message CreateWalletResponse {
343
+ bool ok = 1;
344
+ optional WalletItem result = 2;
345
+ optional string error = 3;
346
+ optional google.protobuf.Struct validationErrors = 4;
347
+ }
348
+
349
+ message UpdateWalletRequest {
350
+ AuthManagerContext auth_manager_context = 1;
351
+ string id = 2;
352
+ optional string name = 3;
353
+ optional int32 sort = 4;
354
+ optional bool is_general = 5;
355
+ optional bool show_on_balances = 6;
356
+ optional string crypto_address = 7;
357
+ optional int32 crypto_network = 8;
358
+ optional bool is_active = 9;
359
+ optional bool status = 10;
360
+ optional string manager_id = 11;
361
+ repeated string currency_ids = 12;
362
+ }
363
+
364
+ message UpdateWalletResponse {
365
+ bool ok = 1;
366
+ optional WalletItem result = 2;
367
+ optional string error = 3;
368
+ optional google.protobuf.Struct validationErrors = 4;
369
+ }
370
+
371
+ message DeleteWalletRequest {
372
+ AuthManagerContext auth_manager_context = 1;
373
+ string id = 2;
374
+ }
375
+
376
+ message DeleteWalletResponse {
377
+ bool success = 1;
378
+ optional string message = 2;
379
+ optional string error = 3;
380
+ optional google.protobuf.Struct validationErrors = 4;
366
381
  }
@@ -32,9 +32,7 @@ service ExchangeRatesService {
32
32
  rpc CalculateExchange(CalculateExchangeRequest) returns (CalculateExchangeResponse);
33
33
  rpc GetExchangeCalculation(GetExchangeCalculationRequest) returns (GetExchangeCalculationResponse);
34
34
  rpc GetExchangeCalculationHistory(GetExchangeCalculationHistoryRequest) returns (GetExchangeCalculationHistoryResponse);
35
-
36
- rpc GetCalculationCounts(ExchangeCalculationFiltersRequest) returns (GetCalculationCountsResponse);
37
- rpc GetCalculationsInputCurrencySummary(ExchangeCalculationFiltersRequest) returns (GetCalculationsInputCurrencySummaryResponse);
35
+ rpc GetExchangeCalculationStats(ExchangeCalculationFiltersRequest) returns (GetExchangeCalculationStatsResponse);
38
36
  }
39
37
 
40
38
  message CurrencySetting {
@@ -376,11 +374,6 @@ message GetExchangeCalculationHistoryResponse {
376
374
  optional ExchangeCalculationHistoryPagination pagination = 5;
377
375
  }
378
376
 
379
- message GetCalculationCountsResponse {
380
- int32 total_count = 1;
381
- int32 unique_customers = 2;
382
- }
383
-
384
377
  message CalculationsInputCurrencySummaryItem {
385
378
  string currency = 1;
386
379
  double total = 2;
@@ -388,8 +381,10 @@ message CalculationsInputCurrencySummaryItem {
388
381
  double in_progress = 4;
389
382
  }
390
383
 
391
- message GetCalculationsInputCurrencySummaryResponse {
392
- int32 with_exchange_count = 1;
393
- int32 completed_count = 2;
394
- repeated CalculationsInputCurrencySummaryItem items = 3;
384
+ message GetExchangeCalculationStatsResponse {
385
+ int32 total_count = 1;
386
+ int32 unique_customers = 2;
387
+ int32 with_exchange_count = 3;
388
+ int32 completed_count = 4;
389
+ repeated CalculationsInputCurrencySummaryItem items = 5;
395
390
  }