@sui-tracker/shared 1.0.45 → 1.0.47
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/dist/modules/grpc-services/account-grpc.service.d.ts +3 -3
- package/dist/modules/grpc-services/account-grpc.service.js +61 -24
- package/dist/modules/grpc-services/account-grpc.service.js.map +1 -1
- package/dist/modules/grpc-services/checkpoint-grpc.service.d.ts +1 -2
- package/dist/modules/grpc-services/checkpoint-grpc.service.js +11 -12
- package/dist/modules/grpc-services/checkpoint-grpc.service.js.map +1 -1
- package/dist/modules/grpc-services/price-grpc.service.js +6 -2
- package/dist/modules/grpc-services/price-grpc.service.js.map +1 -1
- package/dist/modules/grpc-services/proxy-grpc.service.js +5 -1
- package/dist/modules/grpc-services/proxy-grpc.service.js.map +1 -1
- package/dist/modules/grpc-services/swap-order-grpc.service.js +21 -5
- package/dist/modules/grpc-services/swap-order-grpc.service.js.map +1 -1
- package/dist/modules/interfaces/account.interface.d.ts +32 -28
- package/dist/modules/interfaces/base-request.interface.d.ts +4 -0
- package/dist/{grpc/interfaces/account.interface.js → modules/interfaces/base-request.interface.js} +1 -1
- package/dist/modules/interfaces/base-request.interface.js.map +1 -0
- package/dist/modules/interfaces/checkpoint.interface.d.ts +6 -15
- package/dist/modules/interfaces/price.interface.d.ts +2 -3
- package/dist/modules/interfaces/proxy.interface.d.ts +8 -11
- package/dist/modules/interfaces/swap-order.interface.d.ts +15 -9
- package/dist/modules/interfaces/swap.interface.d.ts +34 -26
- package/dist/protos/account.proto +96 -79
- package/dist/protos/checkpoint.proto +35 -44
- package/dist/protos/price.proto +8 -1
- package/dist/protos/proxy.proto +38 -4
- package/dist/protos/swap-order.proto +37 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/grpc/controllers/base-grpc.controller.d.ts +0 -7
- package/dist/grpc/controllers/base-grpc.controller.js +0 -42
- package/dist/grpc/controllers/base-grpc.controller.js.map +0 -1
- package/dist/grpc/controllers/index.d.ts +0 -1
- package/dist/grpc/controllers/index.js +0 -18
- package/dist/grpc/controllers/index.js.map +0 -1
- package/dist/grpc/decorators/index.d.ts +0 -0
- package/dist/grpc/decorators/index.js +0 -2
- package/dist/grpc/decorators/index.js.map +0 -1
- package/dist/grpc/grpc.module.d.ts +0 -2
- package/dist/grpc/grpc.module.js +0 -24
- package/dist/grpc/grpc.module.js.map +0 -1
- package/dist/grpc/index.d.ts +0 -3
- package/dist/grpc/index.js +0 -20
- package/dist/grpc/index.js.map +0 -1
- package/dist/grpc/interfaces/account.interface.d.ts +0 -175
- package/dist/grpc/interfaces/account.interface.js.map +0 -1
- package/dist/grpc/interfaces/checkpoint.interface.d.ts +0 -63
- package/dist/grpc/interfaces/checkpoint.interface.js +0 -3
- package/dist/grpc/interfaces/checkpoint.interface.js.map +0 -1
- package/dist/grpc/interfaces/index.d.ts +0 -4
- package/dist/grpc/interfaces/index.js +0 -21
- package/dist/grpc/interfaces/index.js.map +0 -1
- package/dist/grpc/interfaces/proxy.interface.d.ts +0 -51
- package/dist/grpc/interfaces/proxy.interface.js +0 -3
- package/dist/grpc/interfaces/proxy.interface.js.map +0 -1
- package/dist/grpc/interfaces/swap-order.interface.d.ts +0 -61
- package/dist/grpc/interfaces/swap-order.interface.js +0 -3
- package/dist/grpc/interfaces/swap-order.interface.js.map +0 -1
- package/dist/grpc/interfaces/swap.interface.d.ts +0 -71
- package/dist/grpc/interfaces/swap.interface.js +0 -3
- package/dist/grpc/interfaces/swap.interface.js.map +0 -1
- package/dist/grpc/services/account-grpc.service.d.ts +0 -15
- package/dist/grpc/services/account-grpc.service.js +0 -133
- package/dist/grpc/services/account-grpc.service.js.map +0 -1
- package/dist/grpc/services/base-grpc.service.d.ts +0 -17
- package/dist/grpc/services/base-grpc.service.js +0 -44
- package/dist/grpc/services/base-grpc.service.js.map +0 -1
- package/dist/grpc/services/checkpoint-grpc.service.d.ts +0 -10
- package/dist/grpc/services/checkpoint-grpc.service.js +0 -74
- package/dist/grpc/services/checkpoint-grpc.service.js.map +0 -1
- package/dist/grpc/services/index.d.ts +0 -5
- package/dist/grpc/services/index.js +0 -22
- package/dist/grpc/services/index.js.map +0 -1
- package/dist/grpc/services/proxy-grpc.service.d.ts +0 -12
- package/dist/grpc/services/proxy-grpc.service.js +0 -63
- package/dist/grpc/services/proxy-grpc.service.js.map +0 -1
- package/dist/grpc/services/swap-order-grpc.service.d.ts +0 -10
- package/dist/grpc/services/swap-order-grpc.service.js +0 -74
- package/dist/grpc/services/swap-order-grpc.service.js.map +0 -1
- package/dist/services/api.service.d.ts +0 -12
- package/dist/services/api.service.js +0 -74
- package/dist/services/api.service.js.map +0 -1
- package/dist/services/index.d.ts +0 -3
- package/dist/services/index.js +0 -20
- package/dist/services/index.js.map +0 -1
- package/dist/services/shared.module.d.ts +0 -2
- package/dist/services/shared.module.js +0 -47
- package/dist/services/shared.module.js.map +0 -1
- package/dist/services/sui-client.service.d.ts +0 -31
- package/dist/services/sui-client.service.js +0 -183
- package/dist/services/sui-client.service.js.map +0 -1
|
@@ -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
|
-
|
|
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:
|
|
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
|
-
|
|
50
|
+
export interface GetTrendingPoolsResponse extends BaseResponse {
|
|
51
|
+
data: PoolData[];
|
|
46
52
|
}
|
|
47
|
-
export interface GetNewPoolsResponse {
|
|
48
|
-
|
|
53
|
+
export interface GetNewPoolsResponse extends BaseResponse {
|
|
54
|
+
data: PoolData[];
|
|
49
55
|
}
|
|
50
|
-
export interface GetPoolResponse {
|
|
51
|
-
|
|
56
|
+
export interface GetPoolResponse extends BaseResponse {
|
|
57
|
+
data: PoolData;
|
|
52
58
|
}
|
|
53
|
-
export interface GetCandleChartResponse {
|
|
54
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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 {
|
|
@@ -23,6 +23,75 @@ service WalletService {
|
|
|
23
23
|
rpc CreateWallet(CreateWalletRequest) returns (CreateWalletResponse);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Common Messages
|
|
27
|
+
message User {
|
|
28
|
+
string id = 1;
|
|
29
|
+
string firstName = 2;
|
|
30
|
+
string lastName = 3;
|
|
31
|
+
string teleId = 4;
|
|
32
|
+
string teleUserName = 5;
|
|
33
|
+
bool isActive = 6;
|
|
34
|
+
string referralCode = 7;
|
|
35
|
+
string parentId = 8;
|
|
36
|
+
string role = 9;
|
|
37
|
+
string createdAt = 10;
|
|
38
|
+
string updatedAt = 11;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message TokenPayload {
|
|
42
|
+
string accessToken = 1;
|
|
43
|
+
int32 expiresIn = 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message Pagination {
|
|
47
|
+
int32 page = 1;
|
|
48
|
+
int32 limit = 2;
|
|
49
|
+
int32 total = 3;
|
|
50
|
+
int32 totalPages = 4;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message Wallet {
|
|
54
|
+
string id = 1;
|
|
55
|
+
string userId = 2;
|
|
56
|
+
string address = 3;
|
|
57
|
+
string name = 4;
|
|
58
|
+
string createdAt = 5;
|
|
59
|
+
string updatedAt = 6;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message Swap {
|
|
63
|
+
string id = 1;
|
|
64
|
+
string userId = 2;
|
|
65
|
+
string walletId = 3;
|
|
66
|
+
string fromToken = 4;
|
|
67
|
+
string toToken = 5;
|
|
68
|
+
string amount = 6;
|
|
69
|
+
string status = 7;
|
|
70
|
+
string dexId = 8;
|
|
71
|
+
string createdAt = 9;
|
|
72
|
+
string updatedAt = 10;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message TransactionStats {
|
|
76
|
+
int32 totalSwaps = 1;
|
|
77
|
+
int32 completedSwaps = 2;
|
|
78
|
+
int32 failedSwaps = 3;
|
|
79
|
+
int32 pendingSwaps = 4;
|
|
80
|
+
string totalVolume = 5;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message TokenTransaction {
|
|
84
|
+
string id = 1;
|
|
85
|
+
string userId = 2;
|
|
86
|
+
string walletId = 3;
|
|
87
|
+
string coinType = 4;
|
|
88
|
+
string tokenSymbol = 5;
|
|
89
|
+
string amount = 6;
|
|
90
|
+
string transactionType = 7;
|
|
91
|
+
string status = 8;
|
|
92
|
+
string createdAt = 9;
|
|
93
|
+
}
|
|
94
|
+
|
|
26
95
|
// Auth Messages
|
|
27
96
|
message LoginRequest {
|
|
28
97
|
string teleId = 1;
|
|
@@ -31,12 +100,11 @@ message LoginRequest {
|
|
|
31
100
|
}
|
|
32
101
|
|
|
33
102
|
message LoginResponse {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
LoginData data = 3;
|
|
103
|
+
// data is optional, user and token are optional
|
|
104
|
+
LoginResponseData data = 1;
|
|
37
105
|
}
|
|
38
106
|
|
|
39
|
-
message
|
|
107
|
+
message LoginResponseData {
|
|
40
108
|
User user = 1;
|
|
41
109
|
TokenPayload token = 2;
|
|
42
110
|
}
|
|
@@ -46,12 +114,10 @@ message MeRequest {
|
|
|
46
114
|
}
|
|
47
115
|
|
|
48
116
|
message MeResponse {
|
|
49
|
-
|
|
50
|
-
string message = 2;
|
|
51
|
-
MeData data = 3;
|
|
117
|
+
MeResponseData data = 1;
|
|
52
118
|
}
|
|
53
119
|
|
|
54
|
-
message
|
|
120
|
+
message MeResponseData {
|
|
55
121
|
User user = 1;
|
|
56
122
|
}
|
|
57
123
|
|
|
@@ -60,35 +126,14 @@ message ValidateTokenRequest {
|
|
|
60
126
|
}
|
|
61
127
|
|
|
62
128
|
message ValidateTokenResponse {
|
|
63
|
-
|
|
64
|
-
string message = 2;
|
|
65
|
-
ValidateTokenData data = 3;
|
|
129
|
+
ValidateTokenResponseData data = 1;
|
|
66
130
|
}
|
|
67
131
|
|
|
68
|
-
message
|
|
132
|
+
message ValidateTokenResponseData {
|
|
69
133
|
User user = 1;
|
|
70
134
|
bool isValid = 2;
|
|
71
135
|
}
|
|
72
136
|
|
|
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
|
-
}
|
|
91
|
-
|
|
92
137
|
// Swap Messages
|
|
93
138
|
message CreateSwapRequest {
|
|
94
139
|
string userId = 1;
|
|
@@ -100,9 +145,12 @@ message CreateSwapRequest {
|
|
|
100
145
|
}
|
|
101
146
|
|
|
102
147
|
message CreateSwapResponse {
|
|
148
|
+
CreateSwapResponseData data = 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message CreateSwapResponseData {
|
|
103
152
|
string id = 1;
|
|
104
153
|
string status = 2;
|
|
105
|
-
string message = 3;
|
|
106
154
|
}
|
|
107
155
|
|
|
108
156
|
message GetUserSwapsRequest {
|
|
@@ -115,27 +163,11 @@ message GetUserSwapsRequest {
|
|
|
115
163
|
string toTokenSymbol = 7;
|
|
116
164
|
}
|
|
117
165
|
|
|
118
|
-
message
|
|
119
|
-
|
|
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;
|
|
166
|
+
message GetUserSwapsResponse {
|
|
167
|
+
GetUserSwapsResponseData data = 1;
|
|
136
168
|
}
|
|
137
169
|
|
|
138
|
-
message
|
|
170
|
+
message GetUserSwapsResponseData {
|
|
139
171
|
repeated Swap swaps = 1;
|
|
140
172
|
Pagination pagination = 2;
|
|
141
173
|
}
|
|
@@ -146,15 +178,11 @@ message GetTransactionStatsRequest {
|
|
|
146
178
|
string date = 3;
|
|
147
179
|
}
|
|
148
180
|
|
|
149
|
-
message
|
|
150
|
-
|
|
151
|
-
int32 completedSwaps = 2;
|
|
152
|
-
int32 failedSwaps = 3;
|
|
153
|
-
int32 pendingSwaps = 4;
|
|
154
|
-
string totalVolume = 5;
|
|
181
|
+
message GetTransactionStatsResponse {
|
|
182
|
+
GetTransactionStatsResponseData data = 1;
|
|
155
183
|
}
|
|
156
184
|
|
|
157
|
-
message
|
|
185
|
+
message GetTransactionStatsResponseData {
|
|
158
186
|
TransactionStats stats = 1;
|
|
159
187
|
string date = 2;
|
|
160
188
|
}
|
|
@@ -170,19 +198,11 @@ message GetTokenTransactionsRequest {
|
|
|
170
198
|
string status = 8;
|
|
171
199
|
}
|
|
172
200
|
|
|
173
|
-
message
|
|
174
|
-
|
|
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;
|
|
201
|
+
message GetTokenTransactionsResponse {
|
|
202
|
+
GetTokenTransactionsResponseData data = 1;
|
|
183
203
|
}
|
|
184
204
|
|
|
185
|
-
message
|
|
205
|
+
message GetTokenTransactionsResponseData {
|
|
186
206
|
repeated TokenTransaction transactions = 1;
|
|
187
207
|
Pagination pagination = 2;
|
|
188
208
|
}
|
|
@@ -193,18 +213,12 @@ message GetWalletByIdRequest {
|
|
|
193
213
|
string userId = 2;
|
|
194
214
|
}
|
|
195
215
|
|
|
196
|
-
message
|
|
197
|
-
|
|
198
|
-
string userId = 2;
|
|
199
|
-
string address = 3;
|
|
200
|
-
string name = 4;
|
|
201
|
-
string createdAt = 5;
|
|
202
|
-
string updatedAt = 6;
|
|
216
|
+
message GetWalletByIdResponse {
|
|
217
|
+
GetWalletByIdResponseData data = 1;
|
|
203
218
|
}
|
|
204
219
|
|
|
205
|
-
message
|
|
220
|
+
message GetWalletByIdResponseData {
|
|
206
221
|
Wallet wallet = 1;
|
|
207
|
-
string error = 2;
|
|
208
222
|
}
|
|
209
223
|
|
|
210
224
|
message CreateWalletRequest {
|
|
@@ -212,6 +226,9 @@ message CreateWalletRequest {
|
|
|
212
226
|
}
|
|
213
227
|
|
|
214
228
|
message CreateWalletResponse {
|
|
229
|
+
CreateWalletResponseData data = 1;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
message CreateWalletResponseData {
|
|
215
233
|
Wallet wallet = 1;
|
|
216
|
-
string error = 2;
|
|
217
234
|
}
|
|
@@ -2,88 +2,71 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package checkpoint;
|
|
4
4
|
|
|
5
|
+
// CheckpointService defines all available RPC endpoints for checkpoint, config, and stat management.
|
|
5
6
|
service CheckpointService {
|
|
6
|
-
//
|
|
7
|
+
// Returns all checkpoints.
|
|
7
8
|
rpc FindAllCheckpoints (FindAllCheckpointsRequest) returns (FindAllCheckpointsResponse);
|
|
9
|
+
// Marks transactions as synced by their IDs.
|
|
8
10
|
rpc SetTransactionSynced (SetTransactionSyncedRequest) returns (SetTransactionSyncedResponse);
|
|
9
|
-
|
|
10
|
-
// Configs endpoints
|
|
11
|
+
// Finds a config by its ID.
|
|
11
12
|
rpc FindConfig (FindConfigRequest) returns (FindConfigResponse);
|
|
12
|
-
|
|
13
|
-
// Stats endpoints
|
|
13
|
+
// Gets a stat by its key.
|
|
14
14
|
rpc GetStat (GetStatRequest) returns (GetStatResponse);
|
|
15
|
-
|
|
16
|
-
// Stats endpoints
|
|
15
|
+
// Checks if a range is synced.
|
|
17
16
|
rpc CheckRangeIsSynced (CheckRangeIsSyncedRequest) returns (CheckRangeIsSyncedResponse);
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
//
|
|
19
|
+
// Request for finding all checkpoints.
|
|
21
20
|
message FindAllCheckpointsRequest {
|
|
22
21
|
}
|
|
23
22
|
|
|
23
|
+
// Request for marking transactions as synced.
|
|
24
24
|
message SetTransactionSyncedRequest {
|
|
25
25
|
repeated string ids = 1;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// Request for checking if a range is synced.
|
|
28
29
|
message CheckRangeIsSyncedRequest {
|
|
29
30
|
int64 from = 1;
|
|
30
31
|
int64 to = 2;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
//
|
|
34
|
+
// Request for finding a config by ID.
|
|
34
35
|
message FindConfigRequest {
|
|
35
36
|
string id = 1;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
//
|
|
39
|
+
// Request for getting a stat by key.
|
|
39
40
|
message GetStatRequest {
|
|
40
41
|
string key = 1;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
//
|
|
44
|
+
// Checkpoint entity.
|
|
44
45
|
message Checkpoint {
|
|
45
46
|
string id = 1;
|
|
46
47
|
string checkpointId = 2;
|
|
47
|
-
|
|
48
|
-
int64 timestamp = 4;
|
|
49
|
-
int64 epoch = 5;
|
|
50
|
-
string networkTotalTransactions = 6;
|
|
51
|
-
string previousDigest = 7;
|
|
52
|
-
string epochRollingGasCostSummary = 8;
|
|
53
|
-
string endOfEpochData = 9;
|
|
54
|
-
string validatorSignature = 10;
|
|
55
|
-
string consensusCommitDigest = 11;
|
|
56
|
-
string checkpointCommitments = 12;
|
|
57
|
-
string validatorRewards = 13;
|
|
58
|
-
string previousCheckpointId = 14;
|
|
59
|
-
string endOfEpochDataId = 15;
|
|
60
|
-
string networkTotalStake = 16;
|
|
61
|
-
string referenceGasPrice = 17;
|
|
62
|
-
string totalGasCost = 18;
|
|
63
|
-
string totalComputationCost = 19;
|
|
64
|
-
string totalStorageCost = 20;
|
|
65
|
-
string totalNonRefundableStorageFee = 21;
|
|
66
|
-
string totalStorageRebate = 22;
|
|
67
|
-
string createdAt = 23;
|
|
68
|
-
string updatedAt = 24;
|
|
48
|
+
int32 transactionsCount = 3;
|
|
69
49
|
}
|
|
70
50
|
|
|
51
|
+
// Response for finding all checkpoints.
|
|
71
52
|
message FindAllCheckpointsResponse {
|
|
72
|
-
|
|
53
|
+
message Data {
|
|
54
|
+
repeated Checkpoint checkpoints = 1;
|
|
55
|
+
}
|
|
56
|
+
Data data = 1;
|
|
73
57
|
}
|
|
74
58
|
|
|
59
|
+
// Response for marking transactions as synced.
|
|
75
60
|
message SetTransactionSyncedResponse {
|
|
76
|
-
|
|
77
|
-
string message = 2;
|
|
61
|
+
// No fields required as per interface.
|
|
78
62
|
}
|
|
79
63
|
|
|
64
|
+
// Response for checking if a range is synced.
|
|
80
65
|
message CheckRangeIsSyncedResponse {
|
|
81
|
-
bool
|
|
82
|
-
string message = 2;
|
|
83
|
-
bool data = 3;
|
|
66
|
+
bool data = 1;
|
|
84
67
|
}
|
|
85
68
|
|
|
86
|
-
//
|
|
69
|
+
// Config entity.
|
|
87
70
|
message Config {
|
|
88
71
|
string id = 1;
|
|
89
72
|
string key = 2;
|
|
@@ -93,11 +76,15 @@ message Config {
|
|
|
93
76
|
string updatedAt = 6;
|
|
94
77
|
}
|
|
95
78
|
|
|
79
|
+
// Response for finding a config.
|
|
96
80
|
message FindConfigResponse {
|
|
97
|
-
|
|
81
|
+
message Data {
|
|
82
|
+
Config config = 1;
|
|
83
|
+
}
|
|
84
|
+
Data data = 1;
|
|
98
85
|
}
|
|
99
86
|
|
|
100
|
-
//
|
|
87
|
+
// Stat entity.
|
|
101
88
|
message Stat {
|
|
102
89
|
string key = 1;
|
|
103
90
|
string value = 2;
|
|
@@ -106,6 +93,10 @@ message Stat {
|
|
|
106
93
|
string updatedAt = 5;
|
|
107
94
|
}
|
|
108
95
|
|
|
96
|
+
// Response for getting a stat.
|
|
109
97
|
message GetStatResponse {
|
|
110
|
-
|
|
111
|
-
|
|
98
|
+
message Data {
|
|
99
|
+
Stat stat = 1;
|
|
100
|
+
}
|
|
101
|
+
Data data = 1;
|
|
102
|
+
}
|
package/dist/protos/price.proto
CHANGED
|
@@ -2,10 +2,12 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package price;
|
|
4
4
|
|
|
5
|
+
// PriceService defines the available RPC endpoints for price queries.
|
|
5
6
|
service PriceService {
|
|
6
7
|
rpc GetPrice (GetPriceRequest) returns (GetPriceResponse);
|
|
7
8
|
}
|
|
8
9
|
|
|
10
|
+
// Request message for getting price data.
|
|
9
11
|
message GetPriceRequest {
|
|
10
12
|
string timestamp = 1;
|
|
11
13
|
string symbol = 2;
|
|
@@ -13,13 +15,18 @@ message GetPriceRequest {
|
|
|
13
15
|
string key = 4;
|
|
14
16
|
}
|
|
15
17
|
|
|
18
|
+
// Response message for price data.
|
|
16
19
|
message GetPriceResponse {
|
|
20
|
+
// Indicates if the request was successful.
|
|
17
21
|
bool success = 1;
|
|
22
|
+
// Message describing the result.
|
|
18
23
|
string message = 2;
|
|
24
|
+
// Price data mapped by key.
|
|
19
25
|
map<string, PriceData> data = 3;
|
|
20
26
|
}
|
|
21
27
|
|
|
28
|
+
// Price data structure.
|
|
22
29
|
message PriceData {
|
|
23
30
|
string price = 1;
|
|
24
31
|
int64 timestamp = 2;
|
|
25
|
-
}
|
|
32
|
+
}
|