@arbiwallet/contracts 1.0.42 → 1.0.44
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 +37 -1
- package/package.json +1 -1
- package/proto/payout.proto +26 -0
package/gen/payout.ts
CHANGED
|
@@ -13,27 +13,63 @@ export const protobufPackage = "payout.v1";
|
|
|
13
13
|
export interface ParsePromptPayQrRequest {
|
|
14
14
|
qrString: string;
|
|
15
15
|
userId: string;
|
|
16
|
+
amount: number;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface ParsePromptPayQrResponse {
|
|
20
|
+
scanId: number;
|
|
21
|
+
quoteId: string;
|
|
22
|
+
status: string;
|
|
19
23
|
payloadJson: string;
|
|
20
24
|
}
|
|
21
25
|
|
|
26
|
+
export interface ConfirmPayoutPaymentRequest {
|
|
27
|
+
scanId: number;
|
|
28
|
+
quoteId: string;
|
|
29
|
+
userId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ConfirmPayoutPaymentResponse {
|
|
33
|
+
payoutId: number;
|
|
34
|
+
status: string;
|
|
35
|
+
payloadJson: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface HandlePayoutWebhookRequest {
|
|
39
|
+
payloadJson: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface HandlePayoutWebhookResponse {
|
|
43
|
+
ok: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
22
46
|
export const PAYOUT_V1_PACKAGE_NAME = "payout.v1";
|
|
23
47
|
|
|
24
48
|
export interface PayoutServiceClient {
|
|
25
49
|
parsePromptPayQr(request: ParsePromptPayQrRequest): Observable<ParsePromptPayQrResponse>;
|
|
50
|
+
|
|
51
|
+
confirmPayoutPayment(request: ConfirmPayoutPaymentRequest): Observable<ConfirmPayoutPaymentResponse>;
|
|
52
|
+
|
|
53
|
+
handlePayoutWebhook(request: HandlePayoutWebhookRequest): Observable<HandlePayoutWebhookResponse>;
|
|
26
54
|
}
|
|
27
55
|
|
|
28
56
|
export interface PayoutServiceController {
|
|
29
57
|
parsePromptPayQr(
|
|
30
58
|
request: ParsePromptPayQrRequest,
|
|
31
59
|
): Promise<ParsePromptPayQrResponse> | Observable<ParsePromptPayQrResponse> | ParsePromptPayQrResponse;
|
|
60
|
+
|
|
61
|
+
confirmPayoutPayment(
|
|
62
|
+
request: ConfirmPayoutPaymentRequest,
|
|
63
|
+
): Promise<ConfirmPayoutPaymentResponse> | Observable<ConfirmPayoutPaymentResponse> | ConfirmPayoutPaymentResponse;
|
|
64
|
+
|
|
65
|
+
handlePayoutWebhook(
|
|
66
|
+
request: HandlePayoutWebhookRequest,
|
|
67
|
+
): Promise<HandlePayoutWebhookResponse> | Observable<HandlePayoutWebhookResponse> | HandlePayoutWebhookResponse;
|
|
32
68
|
}
|
|
33
69
|
|
|
34
70
|
export function PayoutServiceControllerMethods() {
|
|
35
71
|
return function (constructor: Function) {
|
|
36
|
-
const grpcMethods: string[] = ["parsePromptPayQr"];
|
|
72
|
+
const grpcMethods: string[] = ["parsePromptPayQr", "confirmPayoutPayment", "handlePayoutWebhook"];
|
|
37
73
|
for (const method of grpcMethods) {
|
|
38
74
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
39
75
|
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.44",
|
|
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/payout.proto
CHANGED
|
@@ -8,13 +8,39 @@ option java_package = "com.arbiwallet.payout.v1";
|
|
|
8
8
|
|
|
9
9
|
service PayoutService {
|
|
10
10
|
rpc ParsePromptPayQr(ParsePromptPayQrRequest) returns (ParsePromptPayQrResponse);
|
|
11
|
+
rpc ConfirmPayoutPayment(ConfirmPayoutPaymentRequest) returns (ConfirmPayoutPaymentResponse);
|
|
12
|
+
rpc HandlePayoutWebhook(HandlePayoutWebhookRequest) returns (HandlePayoutWebhookResponse);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
message ParsePromptPayQrRequest {
|
|
14
16
|
string qr_string = 1;
|
|
15
17
|
string user_id = 2;
|
|
18
|
+
double amount = 3;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
message ParsePromptPayQrResponse {
|
|
22
|
+
int64 scan_id = 1;
|
|
23
|
+
string quote_id = 2;
|
|
24
|
+
string status = 3;
|
|
25
|
+
string payload_json = 4;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message ConfirmPayoutPaymentRequest {
|
|
29
|
+
int64 scan_id = 1;
|
|
30
|
+
string quote_id = 2;
|
|
31
|
+
string user_id = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message ConfirmPayoutPaymentResponse {
|
|
35
|
+
int64 payout_id = 1;
|
|
36
|
+
string status = 2;
|
|
37
|
+
string payload_json = 3;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message HandlePayoutWebhookRequest {
|
|
19
41
|
string payload_json = 1;
|
|
20
42
|
}
|
|
43
|
+
|
|
44
|
+
message HandlePayoutWebhookResponse {
|
|
45
|
+
bool ok = 1;
|
|
46
|
+
}
|