@sui-tracker/shared 1.0.46 → 1.0.48

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.
Files changed (90) hide show
  1. package/dist/modules/grpc-services/account-grpc.service.d.ts +3 -3
  2. package/dist/modules/grpc-services/account-grpc.service.js +61 -24
  3. package/dist/modules/grpc-services/account-grpc.service.js.map +1 -1
  4. package/dist/modules/grpc-services/checkpoint-grpc.service.d.ts +1 -2
  5. package/dist/modules/grpc-services/checkpoint-grpc.service.js +12 -12
  6. package/dist/modules/grpc-services/checkpoint-grpc.service.js.map +1 -1
  7. package/dist/modules/grpc-services/price-grpc.service.js +6 -2
  8. package/dist/modules/grpc-services/price-grpc.service.js.map +1 -1
  9. package/dist/modules/grpc-services/proxy-grpc.service.js +5 -1
  10. package/dist/modules/grpc-services/proxy-grpc.service.js.map +1 -1
  11. package/dist/modules/grpc-services/swap-order-grpc.service.js +21 -5
  12. package/dist/modules/grpc-services/swap-order-grpc.service.js.map +1 -1
  13. package/dist/modules/interfaces/account.interface.d.ts +32 -28
  14. package/dist/modules/interfaces/base-request.interface.d.ts +4 -0
  15. package/dist/{grpc/interfaces/account.interface.js → modules/interfaces/base-request.interface.js} +1 -1
  16. package/dist/modules/interfaces/base-request.interface.js.map +1 -0
  17. package/dist/modules/interfaces/checkpoint.interface.d.ts +6 -15
  18. package/dist/modules/interfaces/price.interface.d.ts +2 -3
  19. package/dist/modules/interfaces/proxy.interface.d.ts +8 -11
  20. package/dist/modules/interfaces/swap-order.interface.d.ts +15 -9
  21. package/dist/modules/interfaces/swap.interface.d.ts +34 -26
  22. package/dist/protos/account.proto +156 -75
  23. package/dist/protos/checkpoint.proto +39 -39
  24. package/dist/protos/price.proto +8 -1
  25. package/dist/protos/proxy.proto +38 -4
  26. package/dist/protos/swap-order.proto +37 -15
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +1 -1
  29. package/dist/grpc/controllers/base-grpc.controller.d.ts +0 -7
  30. package/dist/grpc/controllers/base-grpc.controller.js +0 -42
  31. package/dist/grpc/controllers/base-grpc.controller.js.map +0 -1
  32. package/dist/grpc/controllers/index.d.ts +0 -1
  33. package/dist/grpc/controllers/index.js +0 -18
  34. package/dist/grpc/controllers/index.js.map +0 -1
  35. package/dist/grpc/decorators/index.d.ts +0 -0
  36. package/dist/grpc/decorators/index.js +0 -2
  37. package/dist/grpc/decorators/index.js.map +0 -1
  38. package/dist/grpc/grpc.module.d.ts +0 -2
  39. package/dist/grpc/grpc.module.js +0 -24
  40. package/dist/grpc/grpc.module.js.map +0 -1
  41. package/dist/grpc/index.d.ts +0 -3
  42. package/dist/grpc/index.js +0 -20
  43. package/dist/grpc/index.js.map +0 -1
  44. package/dist/grpc/interfaces/account.interface.d.ts +0 -175
  45. package/dist/grpc/interfaces/account.interface.js.map +0 -1
  46. package/dist/grpc/interfaces/checkpoint.interface.d.ts +0 -63
  47. package/dist/grpc/interfaces/checkpoint.interface.js +0 -3
  48. package/dist/grpc/interfaces/checkpoint.interface.js.map +0 -1
  49. package/dist/grpc/interfaces/index.d.ts +0 -4
  50. package/dist/grpc/interfaces/index.js +0 -21
  51. package/dist/grpc/interfaces/index.js.map +0 -1
  52. package/dist/grpc/interfaces/proxy.interface.d.ts +0 -51
  53. package/dist/grpc/interfaces/proxy.interface.js +0 -3
  54. package/dist/grpc/interfaces/proxy.interface.js.map +0 -1
  55. package/dist/grpc/interfaces/swap-order.interface.d.ts +0 -61
  56. package/dist/grpc/interfaces/swap-order.interface.js +0 -3
  57. package/dist/grpc/interfaces/swap-order.interface.js.map +0 -1
  58. package/dist/grpc/interfaces/swap.interface.d.ts +0 -71
  59. package/dist/grpc/interfaces/swap.interface.js +0 -3
  60. package/dist/grpc/interfaces/swap.interface.js.map +0 -1
  61. package/dist/grpc/services/account-grpc.service.d.ts +0 -15
  62. package/dist/grpc/services/account-grpc.service.js +0 -133
  63. package/dist/grpc/services/account-grpc.service.js.map +0 -1
  64. package/dist/grpc/services/base-grpc.service.d.ts +0 -17
  65. package/dist/grpc/services/base-grpc.service.js +0 -44
  66. package/dist/grpc/services/base-grpc.service.js.map +0 -1
  67. package/dist/grpc/services/checkpoint-grpc.service.d.ts +0 -10
  68. package/dist/grpc/services/checkpoint-grpc.service.js +0 -74
  69. package/dist/grpc/services/checkpoint-grpc.service.js.map +0 -1
  70. package/dist/grpc/services/index.d.ts +0 -5
  71. package/dist/grpc/services/index.js +0 -22
  72. package/dist/grpc/services/index.js.map +0 -1
  73. package/dist/grpc/services/proxy-grpc.service.d.ts +0 -12
  74. package/dist/grpc/services/proxy-grpc.service.js +0 -63
  75. package/dist/grpc/services/proxy-grpc.service.js.map +0 -1
  76. package/dist/grpc/services/swap-order-grpc.service.d.ts +0 -10
  77. package/dist/grpc/services/swap-order-grpc.service.js +0 -74
  78. package/dist/grpc/services/swap-order-grpc.service.js.map +0 -1
  79. package/dist/services/api.service.d.ts +0 -12
  80. package/dist/services/api.service.js +0 -74
  81. package/dist/services/api.service.js.map +0 -1
  82. package/dist/services/index.d.ts +0 -3
  83. package/dist/services/index.js +0 -20
  84. package/dist/services/index.js.map +0 -1
  85. package/dist/services/shared.module.d.ts +0 -2
  86. package/dist/services/shared.module.js +0 -47
  87. package/dist/services/shared.module.js.map +0 -1
  88. package/dist/services/sui-client.service.d.ts +0 -31
  89. package/dist/services/sui-client.service.js +0 -183
  90. package/dist/services/sui-client.service.js.map +0 -1
@@ -1,13 +1,12 @@
1
1
  import { Observable } from "rxjs";
2
+ import { BaseResponse } from "./base-request.interface";
2
3
  export interface GetPriceRequest {
3
4
  timestamp: string;
4
5
  symbol: string;
5
6
  address: string;
6
7
  key: string;
7
8
  }
8
- export interface GetPriceResponse {
9
- message: string;
10
- success: boolean;
9
+ export interface GetPriceResponse extends BaseResponse {
11
10
  data: {
12
11
  [key: string]: {
13
12
  price: string;
@@ -1,4 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
+ import { BaseResponse } from "./base-request.interface";
2
3
  export interface ProxyData {
3
4
  id: string;
4
5
  ip: string;
@@ -11,23 +12,21 @@ export interface ProxyData {
11
12
  }
12
13
  export interface PickOneRequest {
13
14
  }
14
- export interface PickOneResponse {
15
- success: boolean;
16
- message: string;
15
+ export interface PickOneResponse extends BaseResponse {
17
16
  data: ProxyData | null;
18
17
  }
19
18
  export interface GetAllProxyRequest {
20
19
  }
21
- export interface GetAllProxyResponse {
22
- success: boolean;
23
- message: string;
20
+ export interface GetAllProxyResponse extends BaseResponse {
24
21
  data: ProxyData[] | null;
25
22
  }
26
23
  export interface CheckIpRequest {
27
24
  ip: string;
28
25
  }
29
- export interface CheckIpResponse {
30
- result: boolean;
26
+ export interface CheckIpResponse extends BaseResponse {
27
+ data: {
28
+ result: boolean;
29
+ };
31
30
  }
32
31
  export interface TestProxyRequest {
33
32
  ip: string;
@@ -35,9 +34,7 @@ export interface TestProxyRequest {
35
34
  username: string;
36
35
  password: string;
37
36
  }
38
- export interface TestProxyResponse {
39
- success: boolean;
40
- message: string;
37
+ export interface TestProxyResponse extends BaseResponse {
41
38
  data: {
42
39
  isLive: boolean;
43
40
  timeResponse: number;
@@ -1,4 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
+ import { BaseResponse } from "./base-request.interface";
2
3
  export interface PoolData {
3
4
  id: string;
4
5
  name: string;
@@ -19,12 +20,17 @@ export interface PoolData {
19
20
  updatedAt: string;
20
21
  }
21
22
  export interface CandleData {
22
- timestamp: number;
23
+ timestamp: string;
23
24
  open: string;
24
25
  high: string;
25
26
  low: string;
26
27
  close: string;
27
28
  volume: string;
29
+ openUsd: string;
30
+ highUsd: string;
31
+ lowUsd: string;
32
+ closeUsd: string;
33
+ volumeUsd: string;
28
34
  }
29
35
  export interface GetTrendingPoolsRequest {
30
36
  label: number;
@@ -41,17 +47,17 @@ export interface GetCandleChartRequest {
41
47
  limit: number;
42
48
  timestamp?: string;
43
49
  }
44
- export interface GetTrendingPoolsResponse {
45
- pools: PoolData[];
50
+ export interface GetTrendingPoolsResponse extends BaseResponse {
51
+ data: PoolData[];
46
52
  }
47
- export interface GetNewPoolsResponse {
48
- pools: PoolData[];
53
+ export interface GetNewPoolsResponse extends BaseResponse {
54
+ data: PoolData[];
49
55
  }
50
- export interface GetPoolResponse {
51
- pool: PoolData;
56
+ export interface GetPoolResponse extends BaseResponse {
57
+ data: PoolData;
52
58
  }
53
- export interface GetCandleChartResponse {
54
- candles: CandleData[];
59
+ export interface GetCandleChartResponse extends BaseResponse {
60
+ data: CandleData[];
55
61
  }
56
62
  export interface SwapOrderService {
57
63
  getTrendingPools(request: GetTrendingPoolsRequest): Observable<GetTrendingPoolsResponse>;
@@ -1,3 +1,4 @@
1
+ import { BaseResponse } from "./base-request.interface";
1
2
  export interface CreateSwapRequest {
2
3
  userId: string;
3
4
  walletId: string;
@@ -6,10 +7,11 @@ export interface CreateSwapRequest {
6
7
  amount: string;
7
8
  dexId: string;
8
9
  }
9
- export interface CreateSwapResponse {
10
- id: string;
11
- status: string;
12
- message: string;
10
+ export interface CreateSwapResponse extends BaseResponse {
11
+ data: {
12
+ id: string;
13
+ status: string;
14
+ };
13
15
  }
14
16
  export interface GetUserSwapsRequest {
15
17
  userId: string;
@@ -20,13 +22,15 @@ export interface GetUserSwapsRequest {
20
22
  fromTokenSymbol?: string;
21
23
  toTokenSymbol?: string;
22
24
  }
23
- export interface GetUserSwapsResponse {
24
- swaps: any[];
25
- pagination: {
26
- page: number;
27
- limit: number;
28
- total: number;
29
- totalPages: number;
25
+ export interface GetUserSwapsResponse extends BaseResponse {
26
+ data: {
27
+ swaps: any[];
28
+ pagination: {
29
+ page: number;
30
+ limit: number;
31
+ total: number;
32
+ totalPages: number;
33
+ };
30
34
  };
31
35
  }
32
36
  export interface GetTransactionStatsRequest {
@@ -34,15 +38,17 @@ export interface GetTransactionStatsRequest {
34
38
  walletId?: string;
35
39
  date?: string;
36
40
  }
37
- export interface GetTransactionStatsResponse {
38
- stats: {
39
- totalSwaps: number;
40
- completedSwaps: number;
41
- failedSwaps: number;
42
- pendingSwaps: number;
43
- totalVolume: string;
41
+ export interface GetTransactionStatsResponse extends BaseResponse {
42
+ data: {
43
+ stats: {
44
+ totalSwaps: number;
45
+ completedSwaps: number;
46
+ failedSwaps: number;
47
+ pendingSwaps: number;
48
+ totalVolume: string;
49
+ };
50
+ date: string;
44
51
  };
45
- date: string;
46
52
  }
47
53
  export interface GetTokenTransactionsRequest {
48
54
  userId: string;
@@ -54,13 +60,15 @@ export interface GetTokenTransactionsRequest {
54
60
  transactionType?: string;
55
61
  status?: string;
56
62
  }
57
- export interface GetTokenTransactionsResponse {
58
- transactions: any[];
59
- pagination: {
60
- page: number;
61
- limit: number;
62
- total: number;
63
- totalPages: number;
63
+ export interface GetTokenTransactionsResponse extends BaseResponse {
64
+ data: {
65
+ transactions: any[];
66
+ pagination: {
67
+ page: number;
68
+ limit: number;
69
+ total: number;
70
+ totalPages: number;
71
+ };
64
72
  };
65
73
  }
66
74
  export interface SwapService {
@@ -1,95 +1,180 @@
1
+ // Đã cập nhật lại file proto để đồng bộ với interface trong account.interface.ts, bao gồm các trường kế thừa từ BaseResponse (success, message) cho các response.
2
+
3
+ // Proto3 syntax
1
4
  syntax = "proto3";
2
5
 
3
6
  package account;
4
7
 
5
8
  // Auth Service
6
9
  service AuthService {
10
+ // Login with Telegram ID, signature, and sign time
7
11
  rpc Login(LoginRequest) returns (LoginResponse);
12
+ // Get current user info by Telegram ID
8
13
  rpc Me(MeRequest) returns (MeResponse);
14
+ // Validate access token
9
15
  rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
10
16
  }
11
17
 
12
18
  // Swap Service
13
19
  service SwapService {
20
+ // Create a new swap
14
21
  rpc CreateSwap(CreateSwapRequest) returns (CreateSwapResponse);
22
+ // Get user swaps with pagination and filters
15
23
  rpc GetUserSwaps(GetUserSwapsRequest) returns (GetUserSwapsResponse);
24
+ // Get transaction statistics for a user and wallet on a specific date
16
25
  rpc GetTransactionStats(GetTransactionStatsRequest) returns (GetTransactionStatsResponse);
26
+ // Get token transactions with pagination and filters
17
27
  rpc GetTokenTransactions(GetTokenTransactionsRequest) returns (GetTokenTransactionsResponse);
18
28
  }
19
29
 
20
30
  // Wallet Service
21
31
  service WalletService {
32
+ // Get wallet by ID and user ID
22
33
  rpc GetWalletById(GetWalletByIdRequest) returns (GetWalletByIdResponse);
34
+ // Create a new wallet for a user
23
35
  rpc CreateWallet(CreateWalletRequest) returns (CreateWalletResponse);
24
36
  }
25
37
 
26
- // Auth Messages
38
+ // Common Entities
39
+
40
+ // User entity
41
+ message User {
42
+ string id = 1;
43
+ string firstName = 2;
44
+ string lastName = 3;
45
+ string teleId = 4;
46
+ string teleUserName = 5;
47
+ bool isActive = 6;
48
+ string referralCode = 7;
49
+ string parentId = 8;
50
+ string role = 9;
51
+ string createdAt = 10;
52
+ string updatedAt = 11;
53
+ }
54
+
55
+ // Token payload for authentication
56
+ message TokenPayload {
57
+ string accessToken = 1;
58
+ int32 expiresIn = 2;
59
+ }
60
+
61
+ // Pagination information
62
+ message Pagination {
63
+ int32 page = 1;
64
+ int32 limit = 2;
65
+ int32 total = 3;
66
+ int32 totalPages = 4;
67
+ }
68
+
69
+ // Wallet entity
70
+ message Wallet {
71
+ string id = 1;
72
+ string userId = 2;
73
+ string address = 3;
74
+ string name = 4;
75
+ string createdAt = 5;
76
+ string updatedAt = 6;
77
+ }
78
+
79
+ // Swap entity
80
+ message Swap {
81
+ string id = 1;
82
+ string userId = 2;
83
+ string walletId = 3;
84
+ string fromToken = 4;
85
+ string toToken = 5;
86
+ string amount = 6;
87
+ string status = 7;
88
+ string dexId = 8;
89
+ string createdAt = 9;
90
+ string updatedAt = 10;
91
+ }
92
+
93
+ // Transaction statistics
94
+ message TransactionStats {
95
+ int32 totalSwaps = 1;
96
+ int32 completedSwaps = 2;
97
+ int32 failedSwaps = 3;
98
+ int32 pendingSwaps = 4;
99
+ string totalVolume = 5;
100
+ }
101
+
102
+ // Token transaction entity
103
+ message TokenTransaction {
104
+ string id = 1;
105
+ string userId = 2;
106
+ string walletId = 3;
107
+ string coinType = 4;
108
+ string tokenSymbol = 5;
109
+ string amount = 6;
110
+ string transactionType = 7;
111
+ string status = 8;
112
+ string createdAt = 9;
113
+ }
114
+
115
+ // BaseResponse fields for all responses
116
+ message BaseResponse {
117
+ bool success = 1;
118
+ string message = 2;
119
+ }
120
+
121
+ // ==================== Auth Messages ====================
122
+
123
+ // Login request
27
124
  message LoginRequest {
28
125
  string teleId = 1;
29
126
  string signature = 2;
30
127
  string signTime = 3;
31
128
  }
32
129
 
130
+ // Login response with optional user and token, extends BaseResponse
33
131
  message LoginResponse {
34
132
  bool success = 1;
35
133
  string message = 2;
36
- LoginData data = 3;
134
+ LoginResponseData data = 3;
37
135
  }
38
136
 
39
- message LoginData {
137
+ message LoginResponseData {
40
138
  User user = 1;
41
139
  TokenPayload token = 2;
42
140
  }
43
141
 
142
+ // Me request
44
143
  message MeRequest {
45
144
  string teleId = 1;
46
145
  }
47
146
 
147
+ // Me response with user data, extends BaseResponse
48
148
  message MeResponse {
49
149
  bool success = 1;
50
150
  string message = 2;
51
- MeData data = 3;
151
+ MeResponseData data = 3;
52
152
  }
53
153
 
54
- message MeData {
154
+ message MeResponseData {
55
155
  User user = 1;
56
156
  }
57
157
 
158
+ // Validate token request
58
159
  message ValidateTokenRequest {
59
160
  string token = 1;
60
161
  }
61
162
 
163
+ // Validate token response with user and validity flag, extends BaseResponse
62
164
  message ValidateTokenResponse {
63
165
  bool success = 1;
64
166
  string message = 2;
65
- ValidateTokenData data = 3;
167
+ ValidateTokenResponseData data = 3;
66
168
  }
67
169
 
68
- message ValidateTokenData {
170
+ message ValidateTokenResponseData {
69
171
  User user = 1;
70
172
  bool isValid = 2;
71
173
  }
72
174
 
73
- message User {
74
- string id = 1;
75
- string firstName = 2;
76
- string lastName = 3;
77
- string teleId = 4;
78
- string teleUserName = 5;
79
- bool isActive = 6;
80
- string referralCode = 7;
81
- string parentId = 8;
82
- string role = 9;
83
- string createdAt = 10;
84
- string updatedAt = 11;
85
- }
86
-
87
- message TokenPayload {
88
- string accessToken = 1;
89
- int32 expiresIn = 2;
90
- }
175
+ // ==================== Swap Messages ====================
91
176
 
92
- // Swap Messages
177
+ // Create swap request
93
178
  message CreateSwapRequest {
94
179
  string userId = 1;
95
180
  string walletId = 2;
@@ -99,12 +184,19 @@ message CreateSwapRequest {
99
184
  string dexId = 6;
100
185
  }
101
186
 
187
+ // Create swap response with swap id and status, extends BaseResponse
102
188
  message CreateSwapResponse {
189
+ bool success = 1;
190
+ string message = 2;
191
+ CreateSwapResponseData data = 3;
192
+ }
193
+
194
+ message CreateSwapResponseData {
103
195
  string id = 1;
104
196
  string status = 2;
105
- string message = 3;
106
197
  }
107
198
 
199
+ // Get user swaps request with filters and pagination
108
200
  message GetUserSwapsRequest {
109
201
  string userId = 1;
110
202
  int32 page = 2;
@@ -115,50 +207,38 @@ message GetUserSwapsRequest {
115
207
  string toTokenSymbol = 7;
116
208
  }
117
209
 
118
- message Swap {
119
- string id = 1;
120
- string userId = 2;
121
- string walletId = 3;
122
- string fromToken = 4;
123
- string toToken = 5;
124
- string amount = 6;
125
- string status = 7;
126
- string dexId = 8;
127
- string createdAt = 9;
128
- string updatedAt = 10;
129
- }
130
-
131
- message Pagination {
132
- int32 page = 1;
133
- int32 limit = 2;
134
- int32 total = 3;
135
- int32 totalPages = 4;
210
+ // Get user swaps response with swaps and pagination, extends BaseResponse
211
+ message GetUserSwapsResponse {
212
+ bool success = 1;
213
+ string message = 2;
214
+ GetUserSwapsResponseData data = 3;
136
215
  }
137
216
 
138
- message GetUserSwapsResponse {
217
+ message GetUserSwapsResponseData {
139
218
  repeated Swap swaps = 1;
140
219
  Pagination pagination = 2;
141
220
  }
142
221
 
222
+ // Get transaction stats request
143
223
  message GetTransactionStatsRequest {
144
224
  string userId = 1;
145
225
  string walletId = 2;
146
226
  string date = 3;
147
227
  }
148
228
 
149
- message TransactionStats {
150
- int32 totalSwaps = 1;
151
- int32 completedSwaps = 2;
152
- int32 failedSwaps = 3;
153
- int32 pendingSwaps = 4;
154
- string totalVolume = 5;
229
+ // Get transaction stats response with stats and date, extends BaseResponse
230
+ message GetTransactionStatsResponse {
231
+ bool success = 1;
232
+ string message = 2;
233
+ GetTransactionStatsResponseData data = 3;
155
234
  }
156
235
 
157
- message GetTransactionStatsResponse {
236
+ message GetTransactionStatsResponseData {
158
237
  TransactionStats stats = 1;
159
238
  string date = 2;
160
239
  }
161
240
 
241
+ // Get token transactions request with filters and pagination
162
242
  message GetTokenTransactionsRequest {
163
243
  string userId = 1;
164
244
  int32 page = 2;
@@ -170,48 +250,49 @@ message GetTokenTransactionsRequest {
170
250
  string status = 8;
171
251
  }
172
252
 
173
- message TokenTransaction {
174
- string id = 1;
175
- string userId = 2;
176
- string walletId = 3;
177
- string coinType = 4;
178
- string tokenSymbol = 5;
179
- string amount = 6;
180
- string transactionType = 7;
181
- string status = 8;
182
- string createdAt = 9;
253
+ // Get token transactions response with transactions and pagination, extends BaseResponse
254
+ message GetTokenTransactionsResponse {
255
+ bool success = 1;
256
+ string message = 2;
257
+ GetTokenTransactionsResponseData data = 3;
183
258
  }
184
259
 
185
- message GetTokenTransactionsResponse {
260
+ message GetTokenTransactionsResponseData {
186
261
  repeated TokenTransaction transactions = 1;
187
262
  Pagination pagination = 2;
188
263
  }
189
264
 
190
- // Wallet Messages
265
+ // ==================== Wallet Messages ====================
266
+
267
+ // Get wallet by id request
191
268
  message GetWalletByIdRequest {
192
269
  string id = 1;
193
270
  string userId = 2;
194
271
  }
195
272
 
196
- message Wallet {
197
- string id = 1;
198
- string userId = 2;
199
- string address = 3;
200
- string name = 4;
201
- string createdAt = 5;
202
- string updatedAt = 6;
273
+ // Get wallet by id response with wallet data, extends BaseResponse
274
+ message GetWalletByIdResponse {
275
+ bool success = 1;
276
+ string message = 2;
277
+ GetWalletByIdResponseData data = 3;
203
278
  }
204
279
 
205
- message GetWalletByIdResponse {
280
+ message GetWalletByIdResponseData {
206
281
  Wallet wallet = 1;
207
- string error = 2;
208
282
  }
209
283
 
284
+ // Create wallet request
210
285
  message CreateWalletRequest {
211
286
  string userId = 1;
212
287
  }
213
288
 
289
+ // Create wallet response with wallet data, extends BaseResponse
214
290
  message CreateWalletResponse {
291
+ bool success = 1;
292
+ string message = 2;
293
+ CreateWalletResponseData data = 3;
294
+ }
295
+
296
+ message CreateWalletResponseData {
215
297
  Wallet wallet = 1;
216
- string error = 2;
217
298
  }