@arbiwallet/contracts 1.0.62 → 1.0.63

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
@@ -18,96 +18,45 @@ export interface ParsePromptPayQrRequest {
18
18
 
19
19
  export interface ParsePromptPayQrResponse {
20
20
  scanId: number;
21
- quoteId: string;
22
- status: string;
23
- payloadJson: string;
24
- }
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
-
46
- export interface ParseMusePayPromptPayQrTestRequest {
47
- qrString: string;
48
- userId: string;
49
- amount: number;
50
- }
51
-
52
- export interface ParseMusePayPromptPayQrTestResponse {
53
- scanId: number;
54
- quoteId: string;
55
- status: string;
56
- payloadJson: string;
57
21
  inputAmountToPay: string;
58
22
  inputCurrencyToPay: string;
59
23
  convertedAmountToPay: string;
60
24
  convertedCurrencyToPay: string;
25
+ feePercent: number;
26
+ feeOnConverted: string;
27
+ convertedAmountWithFee: string;
61
28
  }
62
29
 
63
- export interface ParseMusePayPromptPayQrRequest {
64
- qrString: string;
65
- userId: string;
66
- amount: number;
67
- }
68
-
69
- export interface ParseMusePayPromptPayQrResponse {
70
- scanId: number;
71
- quoteId: string;
72
- status: string;
73
- payloadJson: string;
74
- inputAmountToPay: string;
75
- inputCurrencyToPay: string;
76
- convertedAmountToPay: string;
77
- convertedCurrencyToPay: string;
78
- }
79
-
80
- export interface ConfirmMusePayPayoutPaymentRequest {
30
+ export interface ConfirmPayoutPaymentRequest {
81
31
  scanId: number;
82
- quoteId: string;
83
32
  userId: string;
84
33
  }
85
34
 
86
- export interface ConfirmMusePayPayoutPaymentResponse {
35
+ export interface ConfirmPayoutPaymentResponse {
87
36
  payoutId: number;
88
37
  status: string;
89
- payloadJson: string;
90
38
  }
91
39
 
92
- export interface HandleMusePayWebhookRequest {
40
+ export interface HandlePayoutWebhookRequest {
93
41
  rawBody: Uint8Array;
94
42
  }
95
43
 
96
- export interface HandleMusePayWebhookResponse {
97
- payoutId: number;
98
- status: string;
99
- handled: boolean;
44
+ export interface HandlePayoutWebhookResponse {
45
+ ok: boolean;
100
46
  }
101
47
 
102
48
  export interface GetPayoutRequest {
103
49
  payoutId: number;
104
- userId: string;
105
50
  }
106
51
 
107
52
  export interface GetPayoutResponse {
108
53
  payoutId: number;
54
+ scanId: number;
109
55
  status: string;
110
- payloadJson: string;
56
+ finalConvertedAmount?: string | undefined;
57
+ finalConvertedCurrency?: string | undefined;
58
+ createdAt: string;
59
+ completedAt?: string | undefined;
111
60
  }
112
61
 
113
62
  export const PAYOUT_V1_PACKAGE_NAME = "payout.v1";
@@ -119,18 +68,6 @@ export interface PayoutServiceClient {
119
68
 
120
69
  handlePayoutWebhook(request: HandlePayoutWebhookRequest): Observable<HandlePayoutWebhookResponse>;
121
70
 
122
- parseMusePayPromptPayQrTest(
123
- request: ParseMusePayPromptPayQrTestRequest,
124
- ): Observable<ParseMusePayPromptPayQrTestResponse>;
125
-
126
- parseMusePayPromptPayQr(request: ParseMusePayPromptPayQrRequest): Observable<ParseMusePayPromptPayQrResponse>;
127
-
128
- confirmMusePayPayoutPayment(
129
- request: ConfirmMusePayPayoutPaymentRequest,
130
- ): Observable<ConfirmMusePayPayoutPaymentResponse>;
131
-
132
- handleMusePayWebhook(request: HandleMusePayWebhookRequest): Observable<HandleMusePayWebhookResponse>;
133
-
134
71
  getPayout(request: GetPayoutRequest): Observable<GetPayoutResponse>;
135
72
  }
136
73
 
@@ -147,46 +84,12 @@ export interface PayoutServiceController {
147
84
  request: HandlePayoutWebhookRequest,
148
85
  ): Promise<HandlePayoutWebhookResponse> | Observable<HandlePayoutWebhookResponse> | HandlePayoutWebhookResponse;
149
86
 
150
- parseMusePayPromptPayQrTest(
151
- request: ParseMusePayPromptPayQrTestRequest,
152
- ):
153
- | Promise<ParseMusePayPromptPayQrTestResponse>
154
- | Observable<ParseMusePayPromptPayQrTestResponse>
155
- | ParseMusePayPromptPayQrTestResponse;
156
-
157
- parseMusePayPromptPayQr(
158
- request: ParseMusePayPromptPayQrRequest,
159
- ):
160
- | Promise<ParseMusePayPromptPayQrResponse>
161
- | Observable<ParseMusePayPromptPayQrResponse>
162
- | ParseMusePayPromptPayQrResponse;
163
-
164
- confirmMusePayPayoutPayment(
165
- request: ConfirmMusePayPayoutPaymentRequest,
166
- ):
167
- | Promise<ConfirmMusePayPayoutPaymentResponse>
168
- | Observable<ConfirmMusePayPayoutPaymentResponse>
169
- | ConfirmMusePayPayoutPaymentResponse;
170
-
171
- handleMusePayWebhook(
172
- request: HandleMusePayWebhookRequest,
173
- ): Promise<HandleMusePayWebhookResponse> | Observable<HandleMusePayWebhookResponse> | HandleMusePayWebhookResponse;
174
-
175
87
  getPayout(request: GetPayoutRequest): Promise<GetPayoutResponse> | Observable<GetPayoutResponse> | GetPayoutResponse;
176
88
  }
177
89
 
178
90
  export function PayoutServiceControllerMethods() {
179
91
  return function (constructor: Function) {
180
- const grpcMethods: string[] = [
181
- "parsePromptPayQr",
182
- "confirmPayoutPayment",
183
- "handlePayoutWebhook",
184
- "parseMusePayPromptPayQrTest",
185
- "parseMusePayPromptPayQr",
186
- "confirmMusePayPayoutPayment",
187
- "handleMusePayWebhook",
188
- "getPayout",
189
- ];
92
+ const grpcMethods: string[] = ["parsePromptPayQr", "confirmPayoutPayment", "handlePayoutWebhook", "getPayout"];
190
93
  for (const method of grpcMethods) {
191
94
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
192
95
  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.62",
4
+ "version": "1.0.63",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -10,10 +10,6 @@ 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 ParseMusePayPromptPayQrTest(ParseMusePayPromptPayQrTestRequest) returns (ParseMusePayPromptPayQrTestResponse);
14
- rpc ParseMusePayPromptPayQr(ParseMusePayPromptPayQrRequest) returns (ParseMusePayPromptPayQrResponse);
15
- rpc ConfirmMusePayPayoutPayment(ConfirmMusePayPayoutPaymentRequest) returns (ConfirmMusePayPayoutPaymentResponse);
16
- rpc HandleMusePayWebhook(HandleMusePayWebhookRequest) returns (HandleMusePayWebhookResponse);
17
13
  rpc GetPayout(GetPayoutRequest) returns (GetPayoutResponse);
18
14
  }
19
15
 
@@ -25,94 +21,43 @@ message ParsePromptPayQrRequest {
25
21
 
26
22
  message ParsePromptPayQrResponse {
27
23
  int64 scan_id = 1;
28
- string quote_id = 2;
29
- string status = 3;
30
- string payload_json = 4;
24
+ string input_amount_to_pay = 2;
25
+ string input_currency_to_pay = 3;
26
+ string converted_amount_to_pay = 4;
27
+ string converted_currency_to_pay = 5;
28
+ double fee_percent = 6;
29
+ string fee_on_converted = 7;
30
+ string converted_amount_with_fee = 8;
31
31
  }
32
32
 
33
33
  message ConfirmPayoutPaymentRequest {
34
34
  int64 scan_id = 1;
35
- string quote_id = 2;
36
35
  string user_id = 3;
37
36
  }
38
37
 
39
38
  message ConfirmPayoutPaymentResponse {
40
39
  int64 payout_id = 1;
41
40
  string status = 2;
42
- string payload_json = 3;
43
41
  }
44
42
 
45
43
  message HandlePayoutWebhookRequest {
46
- string payload_json = 1;
44
+ bytes rawBody = 1;
47
45
  }
48
46
 
49
47
  message HandlePayoutWebhookResponse {
50
48
  bool ok = 1;
51
49
  }
52
50
 
53
- message ParseMusePayPromptPayQrTestRequest {
54
- string qr_string = 1;
55
- string user_id = 2;
56
- double amount = 3;
57
- }
58
-
59
- message ParseMusePayPromptPayQrTestResponse {
60
- int64 scan_id = 1;
61
- string quote_id = 2;
62
- string status = 3;
63
- string payload_json = 4;
64
- string input_amount_to_pay = 5;
65
- string input_currency_to_pay = 6;
66
- string converted_amount_to_pay = 7;
67
- string converted_currency_to_pay = 8;
68
- }
69
-
70
- message ParseMusePayPromptPayQrRequest {
71
- string qr_string = 1;
72
- string user_id = 2;
73
- double amount = 3;
74
- }
75
-
76
- message ParseMusePayPromptPayQrResponse {
77
- int64 scan_id = 1;
78
- string quote_id = 2;
79
- string status = 3;
80
- string payload_json = 4;
81
- string input_amount_to_pay = 5;
82
- string input_currency_to_pay = 6;
83
- string converted_amount_to_pay = 7;
84
- string converted_currency_to_pay = 8;
85
- }
86
-
87
- message ConfirmMusePayPayoutPaymentRequest {
88
- int64 scan_id = 1;
89
- string quote_id = 2;
90
- string user_id = 3;
91
- }
92
-
93
- message ConfirmMusePayPayoutPaymentResponse {
94
- int64 payout_id = 1;
95
- string status = 2;
96
- string payload_json = 3;
97
- }
98
-
99
- message HandleMusePayWebhookRequest {
100
- bytes rawBody = 1;
101
- }
102
-
103
- message HandleMusePayWebhookResponse {
104
- int64 payout_id = 1;
105
- string status = 2;
106
- bool handled = 3;
107
- }
108
-
109
51
  message GetPayoutRequest {
110
52
  int64 payout_id = 1;
111
- string user_id = 2;
112
53
  }
113
54
 
114
55
  message GetPayoutResponse {
115
56
  int64 payout_id = 1;
116
- string status = 2;
117
- string payload_json = 3;
57
+ int64 scan_id = 2;
58
+ string status = 3;
59
+ optional string final_converted_amount = 4;
60
+ optional string final_converted_currency = 5;
61
+ string created_at = 6;
62
+ optional string completed_at = 7;
118
63
  }