@arbiwallet/contracts 1.0.40 → 1.0.42

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/payout.ts ADDED
@@ -0,0 +1,49 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.4
4
+ // protoc v7.34.0
5
+ // source: payout.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "payout.v1";
12
+
13
+ export interface ParsePromptPayQrRequest {
14
+ qrString: string;
15
+ userId: string;
16
+ }
17
+
18
+ export interface ParsePromptPayQrResponse {
19
+ payloadJson: string;
20
+ }
21
+
22
+ export const PAYOUT_V1_PACKAGE_NAME = "payout.v1";
23
+
24
+ export interface PayoutServiceClient {
25
+ parsePromptPayQr(request: ParsePromptPayQrRequest): Observable<ParsePromptPayQrResponse>;
26
+ }
27
+
28
+ export interface PayoutServiceController {
29
+ parsePromptPayQr(
30
+ request: ParsePromptPayQrRequest,
31
+ ): Promise<ParsePromptPayQrResponse> | Observable<ParsePromptPayQrResponse> | ParsePromptPayQrResponse;
32
+ }
33
+
34
+ export function PayoutServiceControllerMethods() {
35
+ return function (constructor: Function) {
36
+ const grpcMethods: string[] = ["parsePromptPayQr"];
37
+ for (const method of grpcMethods) {
38
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
39
+ GrpcMethod("PayoutService", method)(constructor.prototype[method], method, descriptor);
40
+ }
41
+ const grpcStreamMethods: string[] = [];
42
+ for (const method of grpcStreamMethods) {
43
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
44
+ GrpcStreamMethod("PayoutService", method)(constructor.prototype[method], method, descriptor);
45
+ }
46
+ };
47
+ }
48
+
49
+ export const PAYOUT_SERVICE_NAME = "PayoutService";
package/gen/withdrawal.ts CHANGED
@@ -41,6 +41,27 @@ export interface GetMonthlyWithdrawalLimitRequest {
41
41
  userId: string;
42
42
  }
43
43
 
44
+ export interface GetWithdrawalLimitsRequest {
45
+ userId: string;
46
+ }
47
+
48
+ export interface WithdrawalLimits {
49
+ userId: string;
50
+ minWithdrawalAmount: string;
51
+ dailyLimit: string;
52
+ monthlyLimit: string;
53
+ dailyUsed: string;
54
+ dailyRemaining: string;
55
+ monthlyUsed: string;
56
+ monthlyRemaining: string;
57
+ kycTier: string;
58
+ isCustomLimit: boolean;
59
+ dayStartUtc: string;
60
+ dayEndExclusiveUtc: string;
61
+ monthStartUtc: string;
62
+ monthEndExclusiveUtc: string;
63
+ }
64
+
44
65
  export interface MonthlyWithdrawalLimit {
45
66
  userId: string;
46
67
  monthlyLimitUsdt: string;
@@ -49,6 +70,13 @@ export interface MonthlyWithdrawalLimit {
49
70
  remainingThisMonthUsdt: string;
50
71
  monthStartUtc: string;
51
72
  monthEndExclusiveUtc: string;
73
+ dailyLimitUsdt?: string | undefined;
74
+ usedThisDayUsdt?: string | undefined;
75
+ remainingThisDayUsdt?: string | undefined;
76
+ dayStartUtc?: string | undefined;
77
+ dayEndExclusiveUtc?: string | undefined;
78
+ kycTier?: string | undefined;
79
+ isCustomLimit?: boolean | undefined;
52
80
  }
53
81
 
54
82
  export interface AdminSetMonthlyWithdrawalLimitRequest {
@@ -62,6 +90,20 @@ export interface AdminSetMonthlyWithdrawalLimitResponse {
62
90
  monthlyLimitUsdt: string;
63
91
  }
64
92
 
93
+ export interface AdminSetUserWithdrawalLimitsRequest {
94
+ adminApiKey: string;
95
+ userId: string;
96
+ customDailyLimitUsdt?: string | undefined;
97
+ customMonthlyLimitUsdt?: string | undefined;
98
+ clearCustomLimits: boolean;
99
+ }
100
+
101
+ export interface AdminSetUserWithdrawalLimitsResponse {
102
+ userId: string;
103
+ customDailyLimitUsdt?: string | undefined;
104
+ customMonthlyLimitUsdt?: string | undefined;
105
+ }
106
+
65
107
  export interface AdminRejectWithdrawalRequest {
66
108
  adminApiKey: string;
67
109
  withdrawRequestId: string;
@@ -102,10 +144,16 @@ export interface WithdrawalServiceClient {
102
144
 
103
145
  getMonthlyWithdrawalLimit(request: GetMonthlyWithdrawalLimitRequest): Observable<MonthlyWithdrawalLimit>;
104
146
 
147
+ getWithdrawalLimits(request: GetWithdrawalLimitsRequest): Observable<WithdrawalLimits>;
148
+
105
149
  adminSetMonthlyWithdrawalLimit(
106
150
  request: AdminSetMonthlyWithdrawalLimitRequest,
107
151
  ): Observable<AdminSetMonthlyWithdrawalLimitResponse>;
108
152
 
153
+ adminSetUserWithdrawalLimits(
154
+ request: AdminSetUserWithdrawalLimitsRequest,
155
+ ): Observable<AdminSetUserWithdrawalLimitsResponse>;
156
+
109
157
  adminRejectWithdrawal(request: AdminRejectWithdrawalRequest): Observable<Withdrawal>;
110
158
  }
111
159
 
@@ -122,6 +170,10 @@ export interface WithdrawalServiceController {
122
170
  request: GetMonthlyWithdrawalLimitRequest,
123
171
  ): Promise<MonthlyWithdrawalLimit> | Observable<MonthlyWithdrawalLimit> | MonthlyWithdrawalLimit;
124
172
 
173
+ getWithdrawalLimits(
174
+ request: GetWithdrawalLimitsRequest,
175
+ ): Promise<WithdrawalLimits> | Observable<WithdrawalLimits> | WithdrawalLimits;
176
+
125
177
  adminSetMonthlyWithdrawalLimit(
126
178
  request: AdminSetMonthlyWithdrawalLimitRequest,
127
179
  ):
@@ -129,6 +181,13 @@ export interface WithdrawalServiceController {
129
181
  | Observable<AdminSetMonthlyWithdrawalLimitResponse>
130
182
  | AdminSetMonthlyWithdrawalLimitResponse;
131
183
 
184
+ adminSetUserWithdrawalLimits(
185
+ request: AdminSetUserWithdrawalLimitsRequest,
186
+ ):
187
+ | Promise<AdminSetUserWithdrawalLimitsResponse>
188
+ | Observable<AdminSetUserWithdrawalLimitsResponse>
189
+ | AdminSetUserWithdrawalLimitsResponse;
190
+
132
191
  adminRejectWithdrawal(
133
192
  request: AdminRejectWithdrawalRequest,
134
193
  ): Promise<Withdrawal> | Observable<Withdrawal> | Withdrawal;
@@ -141,7 +200,9 @@ export function WithdrawalServiceControllerMethods() {
141
200
  "getWithdrawal",
142
201
  "listWithdrawals",
143
202
  "getMonthlyWithdrawalLimit",
203
+ "getWithdrawalLimits",
144
204
  "adminSetMonthlyWithdrawalLimit",
205
+ "adminSetUserWithdrawalLimits",
145
206
  "adminRejectWithdrawal",
146
207
  ];
147
208
  for (const method of grpcMethods) {
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.40",
4
+ "version": "1.0.42",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -0,0 +1,20 @@
1
+ syntax = "proto3";
2
+
3
+ package payout.v1;
4
+
5
+ option csharp_namespace = "Payout.V1";
6
+ option java_multiple_files = true;
7
+ option java_package = "com.arbiwallet.payout.v1";
8
+
9
+ service PayoutService {
10
+ rpc ParsePromptPayQr(ParsePromptPayQrRequest) returns (ParsePromptPayQrResponse);
11
+ }
12
+
13
+ message ParsePromptPayQrRequest {
14
+ string qr_string = 1;
15
+ string user_id = 2;
16
+ }
17
+
18
+ message ParsePromptPayQrResponse {
19
+ string payload_json = 1;
20
+ }
@@ -12,7 +12,9 @@ service WithdrawalService {
12
12
  rpc GetWithdrawal(GetWithdrawalRequest) returns (Withdrawal);
13
13
  rpc ListWithdrawals(ListWithdrawalsRequest) returns (ListWithdrawalsResponse);
14
14
  rpc GetMonthlyWithdrawalLimit(GetMonthlyWithdrawalLimitRequest) returns (MonthlyWithdrawalLimit);
15
+ rpc GetWithdrawalLimits(GetWithdrawalLimitsRequest) returns (WithdrawalLimits);
15
16
  rpc AdminSetMonthlyWithdrawalLimit(AdminSetMonthlyWithdrawalLimitRequest) returns (AdminSetMonthlyWithdrawalLimitResponse);
17
+ rpc AdminSetUserWithdrawalLimits(AdminSetUserWithdrawalLimitsRequest) returns (AdminSetUserWithdrawalLimitsResponse);
16
18
  rpc AdminRejectWithdrawal(AdminRejectWithdrawalRequest) returns (Withdrawal);
17
19
  }
18
20
 
@@ -47,6 +49,27 @@ message GetMonthlyWithdrawalLimitRequest {
47
49
  string user_id = 1;
48
50
  }
49
51
 
52
+ message GetWithdrawalLimitsRequest {
53
+ string user_id = 1;
54
+ }
55
+
56
+ message WithdrawalLimits {
57
+ string user_id = 1;
58
+ string min_withdrawal_amount = 2;
59
+ string daily_limit = 3;
60
+ string monthly_limit = 4;
61
+ string daily_used = 5;
62
+ string daily_remaining = 6;
63
+ string monthly_used = 7;
64
+ string monthly_remaining = 8;
65
+ string kyc_tier = 9;
66
+ bool is_custom_limit = 10;
67
+ string day_start_utc = 11;
68
+ string day_end_exclusive_utc = 12;
69
+ string month_start_utc = 13;
70
+ string month_end_exclusive_utc = 14;
71
+ }
72
+
50
73
  message MonthlyWithdrawalLimit {
51
74
  string user_id = 1;
52
75
  string monthly_limit_usdt = 2;
@@ -55,6 +78,13 @@ message MonthlyWithdrawalLimit {
55
78
  string remaining_this_month_usdt = 5;
56
79
  string month_start_utc = 6;
57
80
  string month_end_exclusive_utc = 7;
81
+ optional string daily_limit_usdt = 8;
82
+ optional string used_this_day_usdt = 9;
83
+ optional string remaining_this_day_usdt = 10;
84
+ optional string day_start_utc = 11;
85
+ optional string day_end_exclusive_utc = 12;
86
+ optional string kyc_tier = 13;
87
+ optional bool is_custom_limit = 14;
58
88
  }
59
89
 
60
90
  message AdminSetMonthlyWithdrawalLimitRequest {
@@ -68,6 +98,20 @@ message AdminSetMonthlyWithdrawalLimitResponse {
68
98
  string monthly_limit_usdt = 2;
69
99
  }
70
100
 
101
+ message AdminSetUserWithdrawalLimitsRequest {
102
+ string admin_api_key = 1;
103
+ string user_id = 2;
104
+ optional string custom_daily_limit_usdt = 3;
105
+ optional string custom_monthly_limit_usdt = 4;
106
+ bool clear_custom_limits = 5;
107
+ }
108
+
109
+ message AdminSetUserWithdrawalLimitsResponse {
110
+ string user_id = 1;
111
+ optional string custom_daily_limit_usdt = 2;
112
+ optional string custom_monthly_limit_usdt = 3;
113
+ }
114
+
71
115
  message AdminRejectWithdrawalRequest {
72
116
  string admin_api_key = 1;
73
117
  string withdraw_request_id = 2;