@arbiwallet/contracts 1.0.55 → 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/gen/payout.ts +17 -2
- package/package.json +1 -1
- package/proto/card.proto +45 -0
- package/proto/payout.proto +14 -3
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/gen/payout.ts
CHANGED
|
@@ -80,7 +80,6 @@ export interface ParseMusePayPromptPayQrResponse {
|
|
|
80
80
|
export interface ConfirmMusePayPayoutPaymentRequest {
|
|
81
81
|
scanId: number;
|
|
82
82
|
quoteId: string;
|
|
83
|
-
balanceCurrency: string;
|
|
84
83
|
userId: string;
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -91,7 +90,7 @@ export interface ConfirmMusePayPayoutPaymentResponse {
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
export interface HandleMusePayWebhookRequest {
|
|
94
|
-
|
|
93
|
+
rawBody: Uint8Array;
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
export interface HandleMusePayWebhookResponse {
|
|
@@ -100,6 +99,17 @@ export interface HandleMusePayWebhookResponse {
|
|
|
100
99
|
handled: boolean;
|
|
101
100
|
}
|
|
102
101
|
|
|
102
|
+
export interface GetPayoutRequest {
|
|
103
|
+
payoutId: number;
|
|
104
|
+
userId: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface GetPayoutResponse {
|
|
108
|
+
payoutId: number;
|
|
109
|
+
status: string;
|
|
110
|
+
payloadJson: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
103
113
|
export const PAYOUT_V1_PACKAGE_NAME = "payout.v1";
|
|
104
114
|
|
|
105
115
|
export interface PayoutServiceClient {
|
|
@@ -120,6 +130,8 @@ export interface PayoutServiceClient {
|
|
|
120
130
|
): Observable<ConfirmMusePayPayoutPaymentResponse>;
|
|
121
131
|
|
|
122
132
|
handleMusePayWebhook(request: HandleMusePayWebhookRequest): Observable<HandleMusePayWebhookResponse>;
|
|
133
|
+
|
|
134
|
+
getPayout(request: GetPayoutRequest): Observable<GetPayoutResponse>;
|
|
123
135
|
}
|
|
124
136
|
|
|
125
137
|
export interface PayoutServiceController {
|
|
@@ -159,6 +171,8 @@ export interface PayoutServiceController {
|
|
|
159
171
|
handleMusePayWebhook(
|
|
160
172
|
request: HandleMusePayWebhookRequest,
|
|
161
173
|
): Promise<HandleMusePayWebhookResponse> | Observable<HandleMusePayWebhookResponse> | HandleMusePayWebhookResponse;
|
|
174
|
+
|
|
175
|
+
getPayout(request: GetPayoutRequest): Promise<GetPayoutResponse> | Observable<GetPayoutResponse> | GetPayoutResponse;
|
|
162
176
|
}
|
|
163
177
|
|
|
164
178
|
export function PayoutServiceControllerMethods() {
|
|
@@ -171,6 +185,7 @@ export function PayoutServiceControllerMethods() {
|
|
|
171
185
|
"parseMusePayPromptPayQr",
|
|
172
186
|
"confirmMusePayPayoutPayment",
|
|
173
187
|
"handleMusePayWebhook",
|
|
188
|
+
"getPayout",
|
|
174
189
|
];
|
|
175
190
|
for (const method of grpcMethods) {
|
|
176
191
|
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.
|
|
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;
|
package/proto/payout.proto
CHANGED
|
@@ -14,6 +14,7 @@ service PayoutService {
|
|
|
14
14
|
rpc ParseMusePayPromptPayQr(ParseMusePayPromptPayQrRequest) returns (ParseMusePayPromptPayQrResponse);
|
|
15
15
|
rpc ConfirmMusePayPayoutPayment(ConfirmMusePayPayoutPaymentRequest) returns (ConfirmMusePayPayoutPaymentResponse);
|
|
16
16
|
rpc HandleMusePayWebhook(HandleMusePayWebhookRequest) returns (HandleMusePayWebhookResponse);
|
|
17
|
+
rpc GetPayout(GetPayoutRequest) returns (GetPayoutResponse);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
message ParsePromptPayQrRequest {
|
|
@@ -86,8 +87,7 @@ message ParseMusePayPromptPayQrResponse {
|
|
|
86
87
|
message ConfirmMusePayPayoutPaymentRequest {
|
|
87
88
|
int64 scan_id = 1;
|
|
88
89
|
string quote_id = 2;
|
|
89
|
-
string
|
|
90
|
-
string user_id = 4;
|
|
90
|
+
string user_id = 3;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
message ConfirmMusePayPayoutPaymentResponse {
|
|
@@ -97,7 +97,7 @@ message ConfirmMusePayPayoutPaymentResponse {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
message HandleMusePayWebhookRequest {
|
|
100
|
-
|
|
100
|
+
bytes rawBody = 1;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
message HandleMusePayWebhookResponse {
|
|
@@ -105,3 +105,14 @@ message HandleMusePayWebhookResponse {
|
|
|
105
105
|
string status = 2;
|
|
106
106
|
bool handled = 3;
|
|
107
107
|
}
|
|
108
|
+
|
|
109
|
+
message GetPayoutRequest {
|
|
110
|
+
int64 payout_id = 1;
|
|
111
|
+
string user_id = 2;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
message GetPayoutResponse {
|
|
115
|
+
int64 payout_id = 1;
|
|
116
|
+
string status = 2;
|
|
117
|
+
string payload_json = 3;
|
|
118
|
+
}
|