@arbiwallet/contracts 1.0.290 → 1.0.291
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 +177 -0
- package/gen/referral.ts +1 -0
- package/package.json +1 -1
- package/proto/exchange_core.proto +110 -0
- package/proto/referral.proto +1 -0
package/gen/exchange_core.ts
CHANGED
|
@@ -513,6 +513,7 @@ export interface GetExchangePaymentsItem {
|
|
|
513
513
|
/** Base amount without network fee (crypto), when stored. */
|
|
514
514
|
amountBase?: number | undefined;
|
|
515
515
|
uuid?: string | undefined;
|
|
516
|
+
realPrimeRateIsFixed?: boolean | undefined;
|
|
516
517
|
}
|
|
517
518
|
|
|
518
519
|
export interface GetExchangePaymentsResponse {
|
|
@@ -531,6 +532,19 @@ export interface GetExchangePaymentResponse {
|
|
|
531
532
|
payment?: GetExchangePaymentsItem | undefined;
|
|
532
533
|
}
|
|
533
534
|
|
|
535
|
+
export interface SetPaymentRealPrimeRateFixedRequest {
|
|
536
|
+
authManagerContext?: AuthManagerContext | undefined;
|
|
537
|
+
paymentId: string;
|
|
538
|
+
isFixed: boolean;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface SetPaymentRealPrimeRateFixedResponse {
|
|
542
|
+
ok: boolean;
|
|
543
|
+
error?: string | undefined;
|
|
544
|
+
paymentId?: string | undefined;
|
|
545
|
+
realPrimeRateIsFixed?: boolean | undefined;
|
|
546
|
+
}
|
|
547
|
+
|
|
534
548
|
export interface SearchExchangePaymentRequest {
|
|
535
549
|
search: string;
|
|
536
550
|
limit: number;
|
|
@@ -655,6 +669,97 @@ export interface GetWalletsMonikaResponse {
|
|
|
655
669
|
wallets: WalletMonikaItem[];
|
|
656
670
|
}
|
|
657
671
|
|
|
672
|
+
export interface PaymentAgentDailyRateItem {
|
|
673
|
+
id: string;
|
|
674
|
+
paymentAgent: number;
|
|
675
|
+
/** YYYY-MM-DD */
|
|
676
|
+
rateDate: string;
|
|
677
|
+
actualCost: number;
|
|
678
|
+
isApplied: boolean;
|
|
679
|
+
affectedPayments: number;
|
|
680
|
+
createdAt: string;
|
|
681
|
+
createdByManagerId?: string | undefined;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export interface ListPaymentAgentDailyRatesRequest {
|
|
685
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface ListPaymentAgentDailyRatesResponse {
|
|
689
|
+
items: PaymentAgentDailyRateItem[];
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export interface CreatePaymentAgentDailyRateRequest {
|
|
693
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
694
|
+
paymentAgent: number;
|
|
695
|
+
/** YYYY-MM-DD */
|
|
696
|
+
rateDate: string;
|
|
697
|
+
actualCost: number;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export interface CreatePaymentAgentDailyRateResponse {
|
|
701
|
+
ok: boolean;
|
|
702
|
+
error?: string | undefined;
|
|
703
|
+
item?: PaymentAgentDailyRateItem | undefined;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export interface PreviewPaymentAgentDailyRateRequest {
|
|
707
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
708
|
+
id: string;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export interface PaymentAgentDailyRatePaymentPreviewItem {
|
|
712
|
+
id: string;
|
|
713
|
+
currentRate?: number | undefined;
|
|
714
|
+
createdAt: string;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export interface PaymentAgentDailyRateExchangePreviewItem {
|
|
718
|
+
id: string;
|
|
719
|
+
paymentId?: string | undefined;
|
|
720
|
+
currentRate1Iter?: number | undefined;
|
|
721
|
+
currentProfit?: number | undefined;
|
|
722
|
+
inputCurrencyId?: string | undefined;
|
|
723
|
+
outputCurrencyId?: string | undefined;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export interface PreviewPaymentAgentDailyRateResponse {
|
|
727
|
+
ok: boolean;
|
|
728
|
+
error?: string | undefined;
|
|
729
|
+
item?: PaymentAgentDailyRateItem | undefined;
|
|
730
|
+
paymentsCount: number;
|
|
731
|
+
exchangesCount: number;
|
|
732
|
+
paymentsFirst: PaymentAgentDailyRatePaymentPreviewItem[];
|
|
733
|
+
paymentsLast: PaymentAgentDailyRatePaymentPreviewItem[];
|
|
734
|
+
exchangesFirst: PaymentAgentDailyRateExchangePreviewItem[];
|
|
735
|
+
exchangesLast: PaymentAgentDailyRateExchangePreviewItem[];
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export interface ApplyPaymentAgentDailyRateRequest {
|
|
739
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
740
|
+
id: string;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export interface ApplyPaymentAgentDailyRateResponse {
|
|
744
|
+
ok: boolean;
|
|
745
|
+
error?: string | undefined;
|
|
746
|
+
item?: PaymentAgentDailyRateItem | undefined;
|
|
747
|
+
paymentsUpdated: number;
|
|
748
|
+
exchangesUpdated: number;
|
|
749
|
+
taskId?: string | undefined;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export interface DeletePaymentAgentDailyRateRequest {
|
|
753
|
+
authManagerContext: AuthManagerContext | undefined;
|
|
754
|
+
id: string;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
export interface DeletePaymentAgentDailyRateResponse {
|
|
758
|
+
ok: boolean;
|
|
759
|
+
error?: string | undefined;
|
|
760
|
+
deleted: boolean;
|
|
761
|
+
}
|
|
762
|
+
|
|
658
763
|
export interface ListExchangePayoutsRequest {
|
|
659
764
|
authManagerContext: AuthManagerContext | undefined;
|
|
660
765
|
page?: number | undefined;
|
|
@@ -783,6 +888,10 @@ export interface ExchangeCoreServiceClient {
|
|
|
783
888
|
|
|
784
889
|
getExchangePayment(request: GetExchangePaymentRequest): Observable<GetExchangePaymentResponse>;
|
|
785
890
|
|
|
891
|
+
setPaymentRealPrimeRateFixed(
|
|
892
|
+
request: SetPaymentRealPrimeRateFixedRequest,
|
|
893
|
+
): Observable<SetPaymentRealPrimeRateFixedResponse>;
|
|
894
|
+
|
|
786
895
|
getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
|
|
787
896
|
|
|
788
897
|
searchExchangePayment(request: SearchExchangePaymentRequest): Observable<SearchExchangePaymentResponse>;
|
|
@@ -798,6 +907,26 @@ export interface ExchangeCoreServiceClient {
|
|
|
798
907
|
getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
|
|
799
908
|
|
|
800
909
|
getWalletsMonika(request: GetWalletsMonikaRequest): Observable<GetWalletsMonikaResponse>;
|
|
910
|
+
|
|
911
|
+
listPaymentAgentDailyRates(
|
|
912
|
+
request: ListPaymentAgentDailyRatesRequest,
|
|
913
|
+
): Observable<ListPaymentAgentDailyRatesResponse>;
|
|
914
|
+
|
|
915
|
+
createPaymentAgentDailyRate(
|
|
916
|
+
request: CreatePaymentAgentDailyRateRequest,
|
|
917
|
+
): Observable<CreatePaymentAgentDailyRateResponse>;
|
|
918
|
+
|
|
919
|
+
previewPaymentAgentDailyRate(
|
|
920
|
+
request: PreviewPaymentAgentDailyRateRequest,
|
|
921
|
+
): Observable<PreviewPaymentAgentDailyRateResponse>;
|
|
922
|
+
|
|
923
|
+
applyPaymentAgentDailyRate(
|
|
924
|
+
request: ApplyPaymentAgentDailyRateRequest,
|
|
925
|
+
): Observable<ApplyPaymentAgentDailyRateResponse>;
|
|
926
|
+
|
|
927
|
+
deletePaymentAgentDailyRate(
|
|
928
|
+
request: DeletePaymentAgentDailyRateRequest,
|
|
929
|
+
): Observable<DeletePaymentAgentDailyRateResponse>;
|
|
801
930
|
}
|
|
802
931
|
|
|
803
932
|
export interface ExchangeCoreServiceController {
|
|
@@ -897,6 +1026,13 @@ export interface ExchangeCoreServiceController {
|
|
|
897
1026
|
request: GetExchangePaymentRequest,
|
|
898
1027
|
): Promise<GetExchangePaymentResponse> | Observable<GetExchangePaymentResponse> | GetExchangePaymentResponse;
|
|
899
1028
|
|
|
1029
|
+
setPaymentRealPrimeRateFixed(
|
|
1030
|
+
request: SetPaymentRealPrimeRateFixedRequest,
|
|
1031
|
+
):
|
|
1032
|
+
| Promise<SetPaymentRealPrimeRateFixedResponse>
|
|
1033
|
+
| Observable<SetPaymentRealPrimeRateFixedResponse>
|
|
1034
|
+
| SetPaymentRealPrimeRateFixedResponse;
|
|
1035
|
+
|
|
900
1036
|
getPaymentsSummary(
|
|
901
1037
|
request: ExchangeCalculationsFiltersRequest,
|
|
902
1038
|
): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
|
|
@@ -927,6 +1063,41 @@ export interface ExchangeCoreServiceController {
|
|
|
927
1063
|
getWalletsMonika(
|
|
928
1064
|
request: GetWalletsMonikaRequest,
|
|
929
1065
|
): Promise<GetWalletsMonikaResponse> | Observable<GetWalletsMonikaResponse> | GetWalletsMonikaResponse;
|
|
1066
|
+
|
|
1067
|
+
listPaymentAgentDailyRates(
|
|
1068
|
+
request: ListPaymentAgentDailyRatesRequest,
|
|
1069
|
+
):
|
|
1070
|
+
| Promise<ListPaymentAgentDailyRatesResponse>
|
|
1071
|
+
| Observable<ListPaymentAgentDailyRatesResponse>
|
|
1072
|
+
| ListPaymentAgentDailyRatesResponse;
|
|
1073
|
+
|
|
1074
|
+
createPaymentAgentDailyRate(
|
|
1075
|
+
request: CreatePaymentAgentDailyRateRequest,
|
|
1076
|
+
):
|
|
1077
|
+
| Promise<CreatePaymentAgentDailyRateResponse>
|
|
1078
|
+
| Observable<CreatePaymentAgentDailyRateResponse>
|
|
1079
|
+
| CreatePaymentAgentDailyRateResponse;
|
|
1080
|
+
|
|
1081
|
+
previewPaymentAgentDailyRate(
|
|
1082
|
+
request: PreviewPaymentAgentDailyRateRequest,
|
|
1083
|
+
):
|
|
1084
|
+
| Promise<PreviewPaymentAgentDailyRateResponse>
|
|
1085
|
+
| Observable<PreviewPaymentAgentDailyRateResponse>
|
|
1086
|
+
| PreviewPaymentAgentDailyRateResponse;
|
|
1087
|
+
|
|
1088
|
+
applyPaymentAgentDailyRate(
|
|
1089
|
+
request: ApplyPaymentAgentDailyRateRequest,
|
|
1090
|
+
):
|
|
1091
|
+
| Promise<ApplyPaymentAgentDailyRateResponse>
|
|
1092
|
+
| Observable<ApplyPaymentAgentDailyRateResponse>
|
|
1093
|
+
| ApplyPaymentAgentDailyRateResponse;
|
|
1094
|
+
|
|
1095
|
+
deletePaymentAgentDailyRate(
|
|
1096
|
+
request: DeletePaymentAgentDailyRateRequest,
|
|
1097
|
+
):
|
|
1098
|
+
| Promise<DeletePaymentAgentDailyRateResponse>
|
|
1099
|
+
| Observable<DeletePaymentAgentDailyRateResponse>
|
|
1100
|
+
| DeletePaymentAgentDailyRateResponse;
|
|
930
1101
|
}
|
|
931
1102
|
|
|
932
1103
|
export function ExchangeCoreServiceControllerMethods() {
|
|
@@ -953,6 +1124,7 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
953
1124
|
"createExchangePayout",
|
|
954
1125
|
"handleExchangePayoutWebhook",
|
|
955
1126
|
"getExchangePayment",
|
|
1127
|
+
"setPaymentRealPrimeRateFixed",
|
|
956
1128
|
"getPaymentsSummary",
|
|
957
1129
|
"searchExchangePayment",
|
|
958
1130
|
"prealoadExchangePaymentForSearch",
|
|
@@ -960,6 +1132,11 @@ export function ExchangeCoreServiceControllerMethods() {
|
|
|
960
1132
|
"getExchangeStatuses",
|
|
961
1133
|
"getWallets",
|
|
962
1134
|
"getWalletsMonika",
|
|
1135
|
+
"listPaymentAgentDailyRates",
|
|
1136
|
+
"createPaymentAgentDailyRate",
|
|
1137
|
+
"previewPaymentAgentDailyRate",
|
|
1138
|
+
"applyPaymentAgentDailyRate",
|
|
1139
|
+
"deletePaymentAgentDailyRate",
|
|
963
1140
|
];
|
|
964
1141
|
for (const method of grpcMethods) {
|
|
965
1142
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/referral.ts
CHANGED
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.291",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
|
@@ -33,6 +33,7 @@ service ExchangeCoreService {
|
|
|
33
33
|
rpc CreateExchangePayout(CreateExchangePayoutRequest) returns (CreateExchangePayoutResponse);
|
|
34
34
|
rpc HandleExchangePayoutWebhook(HandleExchangePayoutWebhookRequest) returns (HandleExchangePayoutWebhookResponse);
|
|
35
35
|
rpc GetExchangePayment(GetExchangePaymentRequest) returns (GetExchangePaymentResponse);
|
|
36
|
+
rpc SetPaymentRealPrimeRateFixed(SetPaymentRealPrimeRateFixedRequest) returns (SetPaymentRealPrimeRateFixedResponse);
|
|
36
37
|
rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
|
|
37
38
|
rpc SearchExchangePayment(SearchExchangePaymentRequest) returns (SearchExchangePaymentResponse);
|
|
38
39
|
rpc PrealoadExchangePaymentForSearch(PrealoadExchangePaymentForSearchRequest) returns (PrealoadExchangePaymentForSearchResponse);
|
|
@@ -42,6 +43,12 @@ service ExchangeCoreService {
|
|
|
42
43
|
|
|
43
44
|
rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
|
|
44
45
|
rpc GetWalletsMonika(GetWalletsMonikaRequest) returns (GetWalletsMonikaResponse);
|
|
46
|
+
|
|
47
|
+
rpc ListPaymentAgentDailyRates(ListPaymentAgentDailyRatesRequest) returns (ListPaymentAgentDailyRatesResponse);
|
|
48
|
+
rpc CreatePaymentAgentDailyRate(CreatePaymentAgentDailyRateRequest) returns (CreatePaymentAgentDailyRateResponse);
|
|
49
|
+
rpc PreviewPaymentAgentDailyRate(PreviewPaymentAgentDailyRateRequest) returns (PreviewPaymentAgentDailyRateResponse);
|
|
50
|
+
rpc ApplyPaymentAgentDailyRate(ApplyPaymentAgentDailyRateRequest) returns (ApplyPaymentAgentDailyRateResponse);
|
|
51
|
+
rpc DeletePaymentAgentDailyRate(DeletePaymentAgentDailyRateRequest) returns (DeletePaymentAgentDailyRateResponse);
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
message AuthManagerContext {
|
|
@@ -552,6 +559,7 @@ message GetExchangePaymentsItem {
|
|
|
552
559
|
/** Base amount without network fee (crypto), when stored. */
|
|
553
560
|
optional double amount_base = 17;
|
|
554
561
|
optional string uuid = 18;
|
|
562
|
+
optional bool real_prime_rate_is_fixed = 19;
|
|
555
563
|
}
|
|
556
564
|
|
|
557
565
|
message GetExchangePaymentsResponse {
|
|
@@ -570,6 +578,19 @@ message GetExchangePaymentResponse {
|
|
|
570
578
|
optional GetExchangePaymentsItem payment = 1;
|
|
571
579
|
}
|
|
572
580
|
|
|
581
|
+
message SetPaymentRealPrimeRateFixedRequest {
|
|
582
|
+
optional AuthManagerContext auth_manager_context = 1;
|
|
583
|
+
string payment_id = 2;
|
|
584
|
+
bool is_fixed = 3;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
message SetPaymentRealPrimeRateFixedResponse {
|
|
588
|
+
bool ok = 1;
|
|
589
|
+
optional string error = 2;
|
|
590
|
+
optional string payment_id = 3;
|
|
591
|
+
optional bool real_prime_rate_is_fixed = 4;
|
|
592
|
+
}
|
|
593
|
+
|
|
573
594
|
message SearchExchangePaymentRequest {
|
|
574
595
|
string search = 1;
|
|
575
596
|
int32 limit = 2;
|
|
@@ -694,6 +715,95 @@ message GetWalletsMonikaResponse {
|
|
|
694
715
|
repeated WalletMonikaItem wallets = 2;
|
|
695
716
|
}
|
|
696
717
|
|
|
718
|
+
message PaymentAgentDailyRateItem {
|
|
719
|
+
string id = 1;
|
|
720
|
+
int32 payment_agent = 2;
|
|
721
|
+
string rate_date = 3; // YYYY-MM-DD
|
|
722
|
+
double actual_cost = 4;
|
|
723
|
+
bool is_applied = 5;
|
|
724
|
+
int32 affected_payments = 6;
|
|
725
|
+
string created_at = 7;
|
|
726
|
+
optional string created_by_manager_id = 8;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
message ListPaymentAgentDailyRatesRequest {
|
|
730
|
+
AuthManagerContext auth_manager_context = 1;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
message ListPaymentAgentDailyRatesResponse {
|
|
734
|
+
repeated PaymentAgentDailyRateItem items = 1;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
message CreatePaymentAgentDailyRateRequest {
|
|
738
|
+
AuthManagerContext auth_manager_context = 1;
|
|
739
|
+
int32 payment_agent = 2;
|
|
740
|
+
string rate_date = 3; // YYYY-MM-DD
|
|
741
|
+
double actual_cost = 4;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
message CreatePaymentAgentDailyRateResponse {
|
|
745
|
+
bool ok = 1;
|
|
746
|
+
optional string error = 2;
|
|
747
|
+
optional PaymentAgentDailyRateItem item = 3;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
message PreviewPaymentAgentDailyRateRequest {
|
|
751
|
+
AuthManagerContext auth_manager_context = 1;
|
|
752
|
+
string id = 2;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
message PaymentAgentDailyRatePaymentPreviewItem {
|
|
756
|
+
string id = 1;
|
|
757
|
+
optional double current_rate = 2;
|
|
758
|
+
string created_at = 3;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
message PaymentAgentDailyRateExchangePreviewItem {
|
|
762
|
+
string id = 1;
|
|
763
|
+
optional string payment_id = 2;
|
|
764
|
+
optional double current_rate_1_iter = 3;
|
|
765
|
+
optional double current_profit = 4;
|
|
766
|
+
optional string input_currency_id = 5;
|
|
767
|
+
optional string output_currency_id = 6;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
message PreviewPaymentAgentDailyRateResponse {
|
|
771
|
+
bool ok = 1;
|
|
772
|
+
optional string error = 2;
|
|
773
|
+
optional PaymentAgentDailyRateItem item = 3;
|
|
774
|
+
int32 payments_count = 4;
|
|
775
|
+
int32 exchanges_count = 5;
|
|
776
|
+
repeated PaymentAgentDailyRatePaymentPreviewItem payments_first = 6;
|
|
777
|
+
repeated PaymentAgentDailyRatePaymentPreviewItem payments_last = 7;
|
|
778
|
+
repeated PaymentAgentDailyRateExchangePreviewItem exchanges_first = 8;
|
|
779
|
+
repeated PaymentAgentDailyRateExchangePreviewItem exchanges_last = 9;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
message ApplyPaymentAgentDailyRateRequest {
|
|
783
|
+
AuthManagerContext auth_manager_context = 1;
|
|
784
|
+
string id = 2;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
message ApplyPaymentAgentDailyRateResponse {
|
|
788
|
+
bool ok = 1;
|
|
789
|
+
optional string error = 2;
|
|
790
|
+
optional PaymentAgentDailyRateItem item = 3;
|
|
791
|
+
int32 payments_updated = 4;
|
|
792
|
+
int32 exchanges_updated = 5;
|
|
793
|
+
optional string task_id = 6;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
message DeletePaymentAgentDailyRateRequest {
|
|
797
|
+
AuthManagerContext auth_manager_context = 1;
|
|
798
|
+
string id = 2;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
message DeletePaymentAgentDailyRateResponse {
|
|
802
|
+
bool ok = 1;
|
|
803
|
+
optional string error = 2;
|
|
804
|
+
bool deleted = 3;
|
|
805
|
+
}
|
|
806
|
+
|
|
697
807
|
// --- Exchange Overpay payouts (CRM «Выплаты по обменам») ---
|
|
698
808
|
|
|
699
809
|
message ListExchangePayoutsRequest {
|
package/proto/referral.proto
CHANGED