@arbiwallet/contracts 1.0.43 → 1.0.45

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