@arbiwallet/contracts 1.0.31 → 1.0.33
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/kyc.ts +25 -0
- package/gen/ledger.ts +24 -0
- package/gen/user.ts +21 -0
- package/package.json +1 -1
- package/proto/kyc.proto +14 -0
- package/proto/ledger.proto +15 -0
- package/proto/user.proto +20 -0
package/gen/kyc.ts
CHANGED
|
@@ -57,6 +57,19 @@ export interface GetVerificationStatusResponse {
|
|
|
57
57
|
updatedAtMs: number;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
export interface GetVerificationStatusesBatchRequest {
|
|
61
|
+
userIds: string[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface VerificationStatusRow {
|
|
65
|
+
userId: string;
|
|
66
|
+
kycStatus: KycStatus;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface GetVerificationStatusesBatchResponse {
|
|
70
|
+
users: VerificationStatusRow[];
|
|
71
|
+
}
|
|
72
|
+
|
|
60
73
|
export interface ApplySumsubWebhookRequest {
|
|
61
74
|
payloadDigest: string;
|
|
62
75
|
payloadDigestAlg: string;
|
|
@@ -99,6 +112,10 @@ export interface KycVerificationClient {
|
|
|
99
112
|
|
|
100
113
|
getVerificationStatus(request: GetVerificationStatusRequest): Observable<GetVerificationStatusResponse>;
|
|
101
114
|
|
|
115
|
+
getVerificationStatusesBatch(
|
|
116
|
+
request: GetVerificationStatusesBatchRequest,
|
|
117
|
+
): Observable<GetVerificationStatusesBatchResponse>;
|
|
118
|
+
|
|
102
119
|
applySumsubWebhook(request: ApplySumsubWebhookRequest): Observable<ApplySumsubWebhookResponse>;
|
|
103
120
|
|
|
104
121
|
getApplicantFullData(request: GetApplicantFullDataRequest): Observable<GetApplicantFullDataResponse>;
|
|
@@ -117,6 +134,13 @@ export interface KycVerificationController {
|
|
|
117
134
|
request: GetVerificationStatusRequest,
|
|
118
135
|
): Promise<GetVerificationStatusResponse> | Observable<GetVerificationStatusResponse> | GetVerificationStatusResponse;
|
|
119
136
|
|
|
137
|
+
getVerificationStatusesBatch(
|
|
138
|
+
request: GetVerificationStatusesBatchRequest,
|
|
139
|
+
):
|
|
140
|
+
| Promise<GetVerificationStatusesBatchResponse>
|
|
141
|
+
| Observable<GetVerificationStatusesBatchResponse>
|
|
142
|
+
| GetVerificationStatusesBatchResponse;
|
|
143
|
+
|
|
120
144
|
applySumsubWebhook(
|
|
121
145
|
request: ApplySumsubWebhookRequest,
|
|
122
146
|
): Promise<ApplySumsubWebhookResponse> | Observable<ApplySumsubWebhookResponse> | ApplySumsubWebhookResponse;
|
|
@@ -132,6 +156,7 @@ export function KycVerificationControllerMethods() {
|
|
|
132
156
|
"startVerification",
|
|
133
157
|
"refreshAccessToken",
|
|
134
158
|
"getVerificationStatus",
|
|
159
|
+
"getVerificationStatusesBatch",
|
|
135
160
|
"applySumsubWebhook",
|
|
136
161
|
"getApplicantFullData",
|
|
137
162
|
];
|
package/gen/ledger.ts
CHANGED
|
@@ -252,6 +252,19 @@ export interface GetBalancesResponse {
|
|
|
252
252
|
balances: BalanceRow[];
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
export interface GetBalancesBatchRequest {
|
|
256
|
+
userIds: string[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface UserBalancesRow {
|
|
260
|
+
userId: string;
|
|
261
|
+
balances: BalanceRow[];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface GetBalancesBatchResponse {
|
|
265
|
+
users: UserBalancesRow[];
|
|
266
|
+
}
|
|
267
|
+
|
|
255
268
|
export interface TransactionFeedItem {
|
|
256
269
|
id: string;
|
|
257
270
|
/** Тип события ленты (строка, см. TransactionFeedType в реализации). */
|
|
@@ -372,6 +385,10 @@ export interface LedgerServiceClient {
|
|
|
372
385
|
|
|
373
386
|
getBalances(request: GetBalancesRequest): Observable<GetBalancesResponse>;
|
|
374
387
|
|
|
388
|
+
/** Балансовые позиции сразу для массива пользователей. */
|
|
389
|
+
|
|
390
|
+
getBalancesBatch(request: GetBalancesBatchRequest): Observable<GetBalancesBatchResponse>;
|
|
391
|
+
|
|
375
392
|
/** Постраничная лента операций пользователя (история для UI); курсор и offset — на усмотрение сервера. */
|
|
376
393
|
|
|
377
394
|
getTransactionFeed(request: GetTransactionFeedRequest): Observable<GetTransactionFeedResponse>;
|
|
@@ -460,6 +477,12 @@ export interface LedgerServiceController {
|
|
|
460
477
|
request: GetBalancesRequest,
|
|
461
478
|
): Promise<GetBalancesResponse> | Observable<GetBalancesResponse> | GetBalancesResponse;
|
|
462
479
|
|
|
480
|
+
/** Балансовые позиции сразу для массива пользователей. */
|
|
481
|
+
|
|
482
|
+
getBalancesBatch(
|
|
483
|
+
request: GetBalancesBatchRequest,
|
|
484
|
+
): Promise<GetBalancesBatchResponse> | Observable<GetBalancesBatchResponse> | GetBalancesBatchResponse;
|
|
485
|
+
|
|
463
486
|
/** Постраничная лента операций пользователя (история для UI); курсор и offset — на усмотрение сервера. */
|
|
464
487
|
|
|
465
488
|
getTransactionFeed(
|
|
@@ -488,6 +511,7 @@ export function LedgerServiceControllerMethods() {
|
|
|
488
511
|
"updateWithdrawalStatus",
|
|
489
512
|
"getBalance",
|
|
490
513
|
"getBalances",
|
|
514
|
+
"getBalancesBatch",
|
|
491
515
|
"getTransactionFeed",
|
|
492
516
|
"internalTransfer",
|
|
493
517
|
];
|
package/gen/user.ts
CHANGED
|
@@ -16,6 +16,17 @@ export enum UserStatus {
|
|
|
16
16
|
UNRECOGNIZED = -1,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export enum UserKycStatus {
|
|
20
|
+
UNVERIFIED = 0,
|
|
21
|
+
NOT_STARTED = 1,
|
|
22
|
+
IN_PROGRESS = 2,
|
|
23
|
+
PENDING_REVIEW = 3,
|
|
24
|
+
APPROVED = 4,
|
|
25
|
+
RETRY_REQUIRED = 5,
|
|
26
|
+
REJECTED = 6,
|
|
27
|
+
UNRECOGNIZED = -1,
|
|
28
|
+
}
|
|
29
|
+
|
|
19
30
|
export enum UserSortBy {
|
|
20
31
|
CREATED_AT = 0,
|
|
21
32
|
STATUS = 1,
|
|
@@ -48,6 +59,8 @@ export interface UserResponse {
|
|
|
48
59
|
avatar?: string | undefined;
|
|
49
60
|
createdAt: string;
|
|
50
61
|
updatedAt: string;
|
|
62
|
+
balances: UserBalance[];
|
|
63
|
+
kycStatus: UserKycStatus;
|
|
51
64
|
}
|
|
52
65
|
|
|
53
66
|
export interface UpdateUserRequest {
|
|
@@ -91,6 +104,14 @@ export interface ResolveUserForTransferResponse {
|
|
|
91
104
|
id: number;
|
|
92
105
|
}
|
|
93
106
|
|
|
107
|
+
export interface UserBalance {
|
|
108
|
+
asset: string;
|
|
109
|
+
network: string;
|
|
110
|
+
available: string;
|
|
111
|
+
reserved: string;
|
|
112
|
+
total: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
94
115
|
export const USER_PACKAGE_NAME = "user";
|
|
95
116
|
|
|
96
117
|
export interface UserServiceClient {
|
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.33",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
package/proto/kyc.proto
CHANGED
|
@@ -6,6 +6,7 @@ service KycVerification {
|
|
|
6
6
|
rpc StartVerification (StartVerificationRequest) returns (StartVerificationResponse);
|
|
7
7
|
rpc RefreshAccessToken (RefreshAccessTokenRequest) returns (RefreshAccessTokenResponse);
|
|
8
8
|
rpc GetVerificationStatus (GetVerificationStatusRequest) returns (GetVerificationStatusResponse);
|
|
9
|
+
rpc GetVerificationStatusesBatch (GetVerificationStatusesBatchRequest) returns (GetVerificationStatusesBatchResponse);
|
|
9
10
|
rpc ApplySumsubWebhook (ApplySumsubWebhookRequest) returns (ApplySumsubWebhookResponse);
|
|
10
11
|
rpc GetApplicantFullData (GetApplicantFullDataRequest) returns (GetApplicantFullDataResponse);
|
|
11
12
|
}
|
|
@@ -58,6 +59,19 @@ message GetVerificationStatusResponse {
|
|
|
58
59
|
int64 updated_at_ms = 9;
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
message GetVerificationStatusesBatchRequest {
|
|
63
|
+
repeated string user_ids = 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message VerificationStatusRow {
|
|
67
|
+
string user_id = 1;
|
|
68
|
+
KycStatus kyc_status = 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message GetVerificationStatusesBatchResponse {
|
|
72
|
+
repeated VerificationStatusRow users = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
61
75
|
message ApplySumsubWebhookRequest {
|
|
62
76
|
string payloadDigest = 1;
|
|
63
77
|
string payloadDigestAlg = 2;
|
package/proto/ledger.proto
CHANGED
|
@@ -33,6 +33,8 @@ service LedgerService {
|
|
|
33
33
|
rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse);
|
|
34
34
|
// Все балансовые позиции пользователя по всем активам и сетям.
|
|
35
35
|
rpc GetBalances(GetBalancesRequest) returns (GetBalancesResponse);
|
|
36
|
+
// Балансовые позиции сразу для массива пользователей.
|
|
37
|
+
rpc GetBalancesBatch(GetBalancesBatchRequest) returns (GetBalancesBatchResponse);
|
|
36
38
|
// Постраничная лента операций пользователя (история для UI); курсор и offset — на усмотрение сервера.
|
|
37
39
|
rpc GetTransactionFeed(GetTransactionFeedRequest) returns (GetTransactionFeedResponse);
|
|
38
40
|
// Внутренний перевод между пользователями приложения (только ledger, без сетевой комиссии).
|
|
@@ -237,6 +239,19 @@ message GetBalancesResponse {
|
|
|
237
239
|
repeated BalanceRow balances = 1;
|
|
238
240
|
}
|
|
239
241
|
|
|
242
|
+
message GetBalancesBatchRequest {
|
|
243
|
+
repeated string user_ids = 1;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
message UserBalancesRow {
|
|
247
|
+
string user_id = 1;
|
|
248
|
+
repeated BalanceRow balances = 2;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
message GetBalancesBatchResponse {
|
|
252
|
+
repeated UserBalancesRow users = 1;
|
|
253
|
+
}
|
|
254
|
+
|
|
240
255
|
message TransactionFeedItem {
|
|
241
256
|
string id = 1;
|
|
242
257
|
string type = 2; // Тип события ленты (строка, см. TransactionFeedType в реализации).
|
package/proto/user.proto
CHANGED
|
@@ -15,6 +15,16 @@ enum UserStatus {
|
|
|
15
15
|
BANNED = 1;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
enum UserKycStatus {
|
|
19
|
+
UNVERIFIED = 0;
|
|
20
|
+
NOT_STARTED = 1;
|
|
21
|
+
IN_PROGRESS = 2;
|
|
22
|
+
PENDING_REVIEW = 3;
|
|
23
|
+
APPROVED = 4;
|
|
24
|
+
RETRY_REQUIRED = 5;
|
|
25
|
+
REJECTED = 6;
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
message GetUserRequest {
|
|
19
29
|
int32 id = 1;
|
|
20
30
|
}
|
|
@@ -34,6 +44,8 @@ message UserResponse {
|
|
|
34
44
|
optional string avatar = 10;
|
|
35
45
|
string created_at = 11;
|
|
36
46
|
string updated_at = 12;
|
|
47
|
+
repeated UserBalance balances = 15;
|
|
48
|
+
UserKycStatus kyc_status = 16;
|
|
37
49
|
}
|
|
38
50
|
|
|
39
51
|
message UpdateUserRequest {
|
|
@@ -87,3 +99,11 @@ message ResolveUserForTransferRequest {
|
|
|
87
99
|
message ResolveUserForTransferResponse {
|
|
88
100
|
int32 id = 1;
|
|
89
101
|
}
|
|
102
|
+
|
|
103
|
+
message UserBalance {
|
|
104
|
+
string asset = 1;
|
|
105
|
+
string network = 2;
|
|
106
|
+
string available = 3;
|
|
107
|
+
string reserved = 4;
|
|
108
|
+
string total = 5;
|
|
109
|
+
}
|