@arbiwallet/contracts 1.0.56 → 1.0.57
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/card.ts +60 -0
- package/package.json +1 -1
- package/proto/card.proto +45 -0
package/gen/card.ts
CHANGED
|
@@ -64,6 +64,21 @@ export interface CreateCardRequest {
|
|
|
64
64
|
autoTopAmount: string;
|
|
65
65
|
autoTopupLimit: string;
|
|
66
66
|
cardBalanceThreshold: string;
|
|
67
|
+
requiredAmount: string;
|
|
68
|
+
kycRequired: boolean;
|
|
69
|
+
kycApplicantJson: string;
|
|
70
|
+
kycResourcesJson: string;
|
|
71
|
+
kycVerifiedResources: KycVerifiedResource[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface KycVerifiedResource {
|
|
75
|
+
imageId: string;
|
|
76
|
+
idDocType: string;
|
|
77
|
+
fileName: string;
|
|
78
|
+
fileType: string;
|
|
79
|
+
contentType: string;
|
|
80
|
+
contentLength: number;
|
|
81
|
+
fileData: Uint8Array;
|
|
67
82
|
}
|
|
68
83
|
|
|
69
84
|
export interface CreateCardsBatchRequest {
|
|
@@ -110,6 +125,34 @@ export interface GetTopupFeeResponse {
|
|
|
110
125
|
amountToCard: string;
|
|
111
126
|
}
|
|
112
127
|
|
|
128
|
+
export interface GetTopupDepositAddressRequest {
|
|
129
|
+
accountId: number;
|
|
130
|
+
cardId: number;
|
|
131
|
+
invoiceCurrency: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface GetTopupDepositAddressResponse {
|
|
135
|
+
cardId: number;
|
|
136
|
+
invoiceId: string;
|
|
137
|
+
address: string;
|
|
138
|
+
invoiceCurrency: string;
|
|
139
|
+
status: string;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface GetTopupInvoiceRequest {
|
|
143
|
+
accountId: number;
|
|
144
|
+
invoiceId: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface GetTopupInvoiceResponse {
|
|
148
|
+
invoiceId: string;
|
|
149
|
+
status: string;
|
|
150
|
+
address: string;
|
|
151
|
+
invoiceCurrency: string;
|
|
152
|
+
amount: string;
|
|
153
|
+
txHash: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
113
156
|
export interface UpdateAutoTopupRequest {
|
|
114
157
|
accountId: number;
|
|
115
158
|
cardId: number;
|
|
@@ -353,6 +396,10 @@ export interface CardServiceClient {
|
|
|
353
396
|
|
|
354
397
|
getTopupFee(request: GetTopupFeeRequest): Observable<GetTopupFeeResponse>;
|
|
355
398
|
|
|
399
|
+
getTopupDepositAddress(request: GetTopupDepositAddressRequest): Observable<GetTopupDepositAddressResponse>;
|
|
400
|
+
|
|
401
|
+
getTopupInvoice(request: GetTopupInvoiceRequest): Observable<GetTopupInvoiceResponse>;
|
|
402
|
+
|
|
356
403
|
updateAutoTopup(request: UpdateAutoTopupRequest): Observable<AutoTopupResponse>;
|
|
357
404
|
|
|
358
405
|
getAutoTopup(request: GetAutoTopupRequest): Observable<AutoTopupResponse>;
|
|
@@ -407,6 +454,17 @@ export interface CardServiceController {
|
|
|
407
454
|
request: GetTopupFeeRequest,
|
|
408
455
|
): Promise<GetTopupFeeResponse> | Observable<GetTopupFeeResponse> | GetTopupFeeResponse;
|
|
409
456
|
|
|
457
|
+
getTopupDepositAddress(
|
|
458
|
+
request: GetTopupDepositAddressRequest,
|
|
459
|
+
):
|
|
460
|
+
| Promise<GetTopupDepositAddressResponse>
|
|
461
|
+
| Observable<GetTopupDepositAddressResponse>
|
|
462
|
+
| GetTopupDepositAddressResponse;
|
|
463
|
+
|
|
464
|
+
getTopupInvoice(
|
|
465
|
+
request: GetTopupInvoiceRequest,
|
|
466
|
+
): Promise<GetTopupInvoiceResponse> | Observable<GetTopupInvoiceResponse> | GetTopupInvoiceResponse;
|
|
467
|
+
|
|
410
468
|
updateAutoTopup(
|
|
411
469
|
request: UpdateAutoTopupRequest,
|
|
412
470
|
): Promise<AutoTopupResponse> | Observable<AutoTopupResponse> | AutoTopupResponse;
|
|
@@ -477,6 +535,8 @@ export function CardServiceControllerMethods() {
|
|
|
477
535
|
"createCardsBatch",
|
|
478
536
|
"topupCard",
|
|
479
537
|
"getTopupFee",
|
|
538
|
+
"getTopupDepositAddress",
|
|
539
|
+
"getTopupInvoice",
|
|
480
540
|
"updateAutoTopup",
|
|
481
541
|
"getAutoTopup",
|
|
482
542
|
"listCards",
|
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.57",
|
|
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/card.proto
CHANGED
|
@@ -12,6 +12,8 @@ service CardService {
|
|
|
12
12
|
rpc CreateCardsBatch(CreateCardsBatchRequest) returns (CreateCardsBatchResponse);
|
|
13
13
|
rpc TopupCard(TopupCardRequest) returns (TopupCardResponse);
|
|
14
14
|
rpc GetTopupFee(GetTopupFeeRequest) returns (GetTopupFeeResponse);
|
|
15
|
+
rpc GetTopupDepositAddress(GetTopupDepositAddressRequest) returns (GetTopupDepositAddressResponse);
|
|
16
|
+
rpc GetTopupInvoice(GetTopupInvoiceRequest) returns (GetTopupInvoiceResponse);
|
|
15
17
|
rpc UpdateAutoTopup(UpdateAutoTopupRequest) returns (AutoTopupResponse);
|
|
16
18
|
rpc GetAutoTopup(GetAutoTopupRequest) returns (AutoTopupResponse);
|
|
17
19
|
|
|
@@ -89,6 +91,21 @@ message CreateCardRequest {
|
|
|
89
91
|
string auto_top_amount = 13;
|
|
90
92
|
string auto_topup_limit = 14;
|
|
91
93
|
string card_balance_threshold = 15;
|
|
94
|
+
string required_amount = 16;
|
|
95
|
+
bool kyc_required = 17;
|
|
96
|
+
string kyc_applicant_json = 18;
|
|
97
|
+
string kyc_resources_json = 19;
|
|
98
|
+
repeated KycVerifiedResource kyc_verified_resources = 20;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message KycVerifiedResource {
|
|
102
|
+
string image_id = 1;
|
|
103
|
+
string id_doc_type = 2;
|
|
104
|
+
string file_name = 3;
|
|
105
|
+
string file_type = 4;
|
|
106
|
+
string content_type = 5;
|
|
107
|
+
int64 content_length = 6;
|
|
108
|
+
bytes file_data = 7;
|
|
92
109
|
}
|
|
93
110
|
|
|
94
111
|
message CreateCardsBatchRequest {
|
|
@@ -135,6 +152,34 @@ message GetTopupFeeResponse {
|
|
|
135
152
|
string amount_to_card = 7;
|
|
136
153
|
}
|
|
137
154
|
|
|
155
|
+
message GetTopupDepositAddressRequest {
|
|
156
|
+
int64 account_id = 1;
|
|
157
|
+
int64 card_id = 2;
|
|
158
|
+
string invoice_currency = 3;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
message GetTopupDepositAddressResponse {
|
|
162
|
+
int64 card_id = 1;
|
|
163
|
+
string invoice_id = 2;
|
|
164
|
+
string address = 3;
|
|
165
|
+
string invoice_currency = 4;
|
|
166
|
+
string status = 5;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
message GetTopupInvoiceRequest {
|
|
170
|
+
int64 account_id = 1;
|
|
171
|
+
string invoice_id = 2;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message GetTopupInvoiceResponse {
|
|
175
|
+
string invoice_id = 1;
|
|
176
|
+
string status = 2;
|
|
177
|
+
string address = 3;
|
|
178
|
+
string invoice_currency = 4;
|
|
179
|
+
string amount = 5;
|
|
180
|
+
string tx_hash = 6;
|
|
181
|
+
}
|
|
182
|
+
|
|
138
183
|
message UpdateAutoTopupRequest {
|
|
139
184
|
int64 account_id = 1;
|
|
140
185
|
int64 card_id = 2;
|