@arbiwallet/contracts 1.0.50 → 1.0.52
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 +6 -0
- package/gen/payout.ts +16 -1
- package/package.json +1 -1
- package/proto/card.proto +6 -0
- package/proto/payout.proto +12 -0
package/gen/card.ts
CHANGED
|
@@ -23,6 +23,10 @@ export enum CardStatus {
|
|
|
23
23
|
|
|
24
24
|
export interface GetCardProvidersInfoRequest {
|
|
25
25
|
accountId: number;
|
|
26
|
+
email: string;
|
|
27
|
+
phone: string;
|
|
28
|
+
firstName: string;
|
|
29
|
+
lastName: string;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
export interface CardProviderInfo {
|
|
@@ -36,6 +40,8 @@ export interface CardProviderInfo {
|
|
|
36
40
|
regions: string[];
|
|
37
41
|
phonePrefixes: string[];
|
|
38
42
|
cardRegion: string;
|
|
43
|
+
issueFee: string;
|
|
44
|
+
requiredAmount: string;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
export interface GetCardProvidersInfoResponse {
|
package/gen/payout.ts
CHANGED
|
@@ -44,6 +44,17 @@ export interface HandlePayoutWebhookResponse {
|
|
|
44
44
|
ok: boolean;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
export interface ScanQrRequest {
|
|
48
|
+
qrcode: string;
|
|
49
|
+
amount: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ScanQrResponse {
|
|
53
|
+
apiCode: string;
|
|
54
|
+
apiMessage: string;
|
|
55
|
+
dataJson: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
47
58
|
export const PAYOUT_V1_PACKAGE_NAME = "payout.v1";
|
|
48
59
|
|
|
49
60
|
export interface PayoutServiceClient {
|
|
@@ -52,6 +63,8 @@ export interface PayoutServiceClient {
|
|
|
52
63
|
confirmPayoutPayment(request: ConfirmPayoutPaymentRequest): Observable<ConfirmPayoutPaymentResponse>;
|
|
53
64
|
|
|
54
65
|
handlePayoutWebhook(request: HandlePayoutWebhookRequest): Observable<HandlePayoutWebhookResponse>;
|
|
66
|
+
|
|
67
|
+
scanQr(request: ScanQrRequest): Observable<ScanQrResponse>;
|
|
55
68
|
}
|
|
56
69
|
|
|
57
70
|
export interface PayoutServiceController {
|
|
@@ -66,11 +79,13 @@ export interface PayoutServiceController {
|
|
|
66
79
|
handlePayoutWebhook(
|
|
67
80
|
request: HandlePayoutWebhookRequest,
|
|
68
81
|
): Promise<HandlePayoutWebhookResponse> | Observable<HandlePayoutWebhookResponse> | HandlePayoutWebhookResponse;
|
|
82
|
+
|
|
83
|
+
scanQr(request: ScanQrRequest): Promise<ScanQrResponse> | Observable<ScanQrResponse> | ScanQrResponse;
|
|
69
84
|
}
|
|
70
85
|
|
|
71
86
|
export function PayoutServiceControllerMethods() {
|
|
72
87
|
return function (constructor: Function) {
|
|
73
|
-
const grpcMethods: string[] = ["parsePromptPayQr", "confirmPayoutPayment", "handlePayoutWebhook"];
|
|
88
|
+
const grpcMethods: string[] = ["parsePromptPayQr", "confirmPayoutPayment", "handlePayoutWebhook", "scanQr"];
|
|
74
89
|
for (const method of grpcMethods) {
|
|
75
90
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
76
91
|
GrpcMethod("PayoutService", method)(constructor.prototype[method], method, descriptor);
|
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.52",
|
|
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
|
@@ -48,6 +48,10 @@ enum CardStatus {
|
|
|
48
48
|
|
|
49
49
|
message GetCardProvidersInfoRequest {
|
|
50
50
|
int64 account_id = 1;
|
|
51
|
+
string email = 2;
|
|
52
|
+
string phone = 3;
|
|
53
|
+
string first_name = 4;
|
|
54
|
+
string last_name = 5;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
message CardProviderInfo {
|
|
@@ -61,6 +65,8 @@ message CardProviderInfo {
|
|
|
61
65
|
repeated string regions = 8;
|
|
62
66
|
repeated string phone_prefixes = 9;
|
|
63
67
|
string card_region = 10;
|
|
68
|
+
string issue_fee = 11;
|
|
69
|
+
string required_amount = 12;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
message GetCardProvidersInfoResponse {
|
package/proto/payout.proto
CHANGED
|
@@ -10,6 +10,7 @@ service PayoutService {
|
|
|
10
10
|
rpc ParsePromptPayQr(ParsePromptPayQrRequest) returns (ParsePromptPayQrResponse);
|
|
11
11
|
rpc ConfirmPayoutPayment(ConfirmPayoutPaymentRequest) returns (ConfirmPayoutPaymentResponse);
|
|
12
12
|
rpc HandlePayoutWebhook(HandlePayoutWebhookRequest) returns (HandlePayoutWebhookResponse);
|
|
13
|
+
rpc ScanQr(ScanQrRequest) returns (ScanQrResponse);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
message ParsePromptPayQrRequest {
|
|
@@ -45,3 +46,14 @@ message HandlePayoutWebhookRequest {
|
|
|
45
46
|
message HandlePayoutWebhookResponse {
|
|
46
47
|
bool ok = 1;
|
|
47
48
|
}
|
|
49
|
+
|
|
50
|
+
message ScanQrRequest {
|
|
51
|
+
string qrcode = 1;
|
|
52
|
+
string amount = 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message ScanQrResponse {
|
|
56
|
+
string api_code = 1;
|
|
57
|
+
string api_message = 2;
|
|
58
|
+
string data_json = 3;
|
|
59
|
+
}
|