@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.
- 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 +12 -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 +156 -75
- package/dist/protos/checkpoint.proto +39 -39
- 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
|
@@ -2,88 +2,76 @@ 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
|
+
bool success = 1;
|
|
54
|
+
string message = 2;
|
|
55
|
+
message Data {
|
|
56
|
+
repeated Checkpoint checkpoints = 1;
|
|
57
|
+
}
|
|
58
|
+
Data data = 3;
|
|
73
59
|
}
|
|
74
60
|
|
|
61
|
+
// Response for marking transactions as synced.
|
|
75
62
|
message SetTransactionSyncedResponse {
|
|
76
63
|
bool success = 1;
|
|
77
64
|
string message = 2;
|
|
78
65
|
}
|
|
79
66
|
|
|
67
|
+
// Response for checking if a range is synced.
|
|
80
68
|
message CheckRangeIsSyncedResponse {
|
|
81
69
|
bool success = 1;
|
|
82
70
|
string message = 2;
|
|
83
71
|
bool data = 3;
|
|
84
72
|
}
|
|
85
73
|
|
|
86
|
-
//
|
|
74
|
+
// Config entity.
|
|
87
75
|
message Config {
|
|
88
76
|
string id = 1;
|
|
89
77
|
string key = 2;
|
|
@@ -93,11 +81,17 @@ message Config {
|
|
|
93
81
|
string updatedAt = 6;
|
|
94
82
|
}
|
|
95
83
|
|
|
84
|
+
// Response for finding a config.
|
|
96
85
|
message FindConfigResponse {
|
|
97
|
-
|
|
86
|
+
bool success = 1;
|
|
87
|
+
string message = 2;
|
|
88
|
+
message Data {
|
|
89
|
+
Config config = 1;
|
|
90
|
+
}
|
|
91
|
+
Data data = 3;
|
|
98
92
|
}
|
|
99
93
|
|
|
100
|
-
//
|
|
94
|
+
// Stat entity.
|
|
101
95
|
message Stat {
|
|
102
96
|
string key = 1;
|
|
103
97
|
string value = 2;
|
|
@@ -106,6 +100,12 @@ message Stat {
|
|
|
106
100
|
string updatedAt = 5;
|
|
107
101
|
}
|
|
108
102
|
|
|
103
|
+
// Response for getting a stat.
|
|
109
104
|
message GetStatResponse {
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
bool success = 1;
|
|
106
|
+
string message = 2;
|
|
107
|
+
message Data {
|
|
108
|
+
Stat stat = 1;
|
|
109
|
+
}
|
|
110
|
+
Data data = 3;
|
|
111
|
+
}
|
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
|
+
}
|
package/dist/protos/proxy.proto
CHANGED
|
@@ -2,39 +2,65 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package proxy;
|
|
4
4
|
|
|
5
|
+
// ProxyService defines all available RPC endpoints for proxy management.
|
|
5
6
|
service ProxyService {
|
|
7
|
+
// Picks one available proxy.
|
|
6
8
|
rpc PickOne (PickOneRequest) returns (PickOneResponse);
|
|
9
|
+
// Gets all proxies.
|
|
7
10
|
rpc GetAllProxy (GetAllProxyRequest) returns (GetAllProxyResponse);
|
|
11
|
+
// Checks if an IP is available.
|
|
8
12
|
rpc CheckIp (CheckIpRequest) returns (CheckIpResponse);
|
|
13
|
+
// Tests a proxy for liveness and response time.
|
|
9
14
|
rpc TestProxy (TestProxyRequest) returns (TestProxyResponse);
|
|
10
15
|
}
|
|
11
16
|
|
|
17
|
+
// Request message for picking one proxy.
|
|
12
18
|
message PickOneRequest {
|
|
13
19
|
}
|
|
14
20
|
|
|
21
|
+
// Response message for picking one proxy.
|
|
15
22
|
message PickOneResponse {
|
|
23
|
+
// Indicates if the request was successful.
|
|
16
24
|
bool success = 1;
|
|
25
|
+
// Message describing the result.
|
|
17
26
|
string message = 2;
|
|
27
|
+
// Proxy data or null if not found.
|
|
18
28
|
ProxyData data = 3;
|
|
19
29
|
}
|
|
20
30
|
|
|
31
|
+
// Request message for getting all proxies.
|
|
21
32
|
message GetAllProxyRequest {
|
|
22
33
|
}
|
|
23
34
|
|
|
35
|
+
// Response message for getting all proxies.
|
|
24
36
|
message GetAllProxyResponse {
|
|
37
|
+
// Indicates if the request was successful.
|
|
25
38
|
bool success = 1;
|
|
39
|
+
// Message describing the result.
|
|
26
40
|
string message = 2;
|
|
41
|
+
// List of proxy data or null if none found.
|
|
27
42
|
repeated ProxyData data = 3;
|
|
28
43
|
}
|
|
29
44
|
|
|
45
|
+
// Request message for checking an IP.
|
|
30
46
|
message CheckIpRequest {
|
|
31
47
|
string ip = 1;
|
|
32
48
|
}
|
|
33
49
|
|
|
50
|
+
// Response message for checking an IP.
|
|
34
51
|
message CheckIpResponse {
|
|
35
|
-
|
|
52
|
+
message Data {
|
|
53
|
+
bool result = 1;
|
|
54
|
+
}
|
|
55
|
+
// Indicates if the request was successful.
|
|
56
|
+
bool success = 1;
|
|
57
|
+
// Message describing the result.
|
|
58
|
+
string message = 2;
|
|
59
|
+
// Data containing the result.
|
|
60
|
+
Data data = 3;
|
|
36
61
|
}
|
|
37
62
|
|
|
63
|
+
// Request message for testing a proxy.
|
|
38
64
|
message TestProxyRequest {
|
|
39
65
|
string ip = 1;
|
|
40
66
|
int32 port = 2;
|
|
@@ -42,13 +68,21 @@ message TestProxyRequest {
|
|
|
42
68
|
string password = 4;
|
|
43
69
|
}
|
|
44
70
|
|
|
71
|
+
// Response message for testing a proxy.
|
|
45
72
|
message TestProxyResponse {
|
|
73
|
+
// Indicates if the request was successful.
|
|
46
74
|
bool success = 1;
|
|
75
|
+
// Message describing the result.
|
|
47
76
|
string message = 2;
|
|
48
|
-
|
|
49
|
-
|
|
77
|
+
// Data containing liveness and response time, or null.
|
|
78
|
+
message Data {
|
|
79
|
+
bool isLive = 1;
|
|
80
|
+
int64 timeResponse = 2;
|
|
81
|
+
}
|
|
82
|
+
Data data = 3;
|
|
50
83
|
}
|
|
51
84
|
|
|
85
|
+
// Proxy data structure.
|
|
52
86
|
message ProxyData {
|
|
53
87
|
string id = 1;
|
|
54
88
|
string ip = 2;
|
|
@@ -58,4 +92,4 @@ message ProxyData {
|
|
|
58
92
|
bool isActive = 6;
|
|
59
93
|
string createdAt = 7;
|
|
60
94
|
string updatedAt = 8;
|
|
61
|
-
}
|
|
95
|
+
}
|
|
@@ -1,57 +1,73 @@
|
|
|
1
|
+
// Updated proto file to match swap-order.interface.ts
|
|
2
|
+
|
|
1
3
|
syntax = "proto3";
|
|
2
4
|
|
|
3
5
|
package swap_order;
|
|
4
6
|
|
|
7
|
+
// SwapOrderService defines the available RPC endpoints for swap order operations.
|
|
5
8
|
service SwapOrderService {
|
|
6
|
-
//
|
|
9
|
+
// Gets trending pools by label.
|
|
7
10
|
rpc GetTrendingPools (GetTrendingPoolsRequest) returns (GetTrendingPoolsResponse);
|
|
11
|
+
// Gets new pools by label.
|
|
8
12
|
rpc GetNewPools (GetNewPoolsRequest) returns (GetNewPoolsResponse);
|
|
13
|
+
// Gets a pool by id.
|
|
9
14
|
rpc GetPool (GetPoolRequest) returns (GetPoolResponse);
|
|
10
|
-
|
|
11
|
-
// Charts endpoints
|
|
15
|
+
// Gets candle chart data for a pool.
|
|
12
16
|
rpc GetCandleChart (GetCandleChartRequest) returns (GetCandleChartResponse);
|
|
13
17
|
}
|
|
14
18
|
|
|
15
|
-
//
|
|
19
|
+
// Request message for getting trending pools.
|
|
16
20
|
message GetTrendingPoolsRequest {
|
|
17
21
|
int32 label = 1; // 5 | 60 | 360 | 1440
|
|
18
22
|
}
|
|
19
23
|
|
|
24
|
+
// Request message for getting new pools.
|
|
20
25
|
message GetNewPoolsRequest {
|
|
21
26
|
int32 label = 1; // 5 | 60 | 360 | 1440
|
|
22
27
|
}
|
|
23
28
|
|
|
29
|
+
// Request message for getting a pool by id.
|
|
24
30
|
message GetPoolRequest {
|
|
25
31
|
string id = 1;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
|
-
//
|
|
34
|
+
// Request message for getting candle chart data.
|
|
29
35
|
message GetCandleChartRequest {
|
|
30
36
|
string pool = 1;
|
|
31
37
|
int32 resolution = 2;
|
|
32
38
|
int32 limit = 3;
|
|
33
|
-
string timestamp = 4;
|
|
39
|
+
string timestamp = 4; // optional
|
|
34
40
|
}
|
|
35
41
|
|
|
36
|
-
//
|
|
42
|
+
// Response message for trending pools.
|
|
37
43
|
message GetTrendingPoolsResponse {
|
|
38
|
-
|
|
44
|
+
bool success = 1;
|
|
45
|
+
string message = 2;
|
|
46
|
+
repeated PoolData data = 3;
|
|
39
47
|
}
|
|
40
48
|
|
|
49
|
+
// Response message for new pools.
|
|
41
50
|
message GetNewPoolsResponse {
|
|
42
|
-
|
|
51
|
+
bool success = 1;
|
|
52
|
+
string message = 2;
|
|
53
|
+
repeated PoolData data = 3;
|
|
43
54
|
}
|
|
44
55
|
|
|
56
|
+
// Response message for getting a pool.
|
|
45
57
|
message GetPoolResponse {
|
|
46
|
-
|
|
58
|
+
bool success = 1;
|
|
59
|
+
string message = 2;
|
|
60
|
+
PoolData data = 3;
|
|
47
61
|
}
|
|
48
62
|
|
|
49
|
-
//
|
|
63
|
+
// Response message for candle chart data.
|
|
50
64
|
message GetCandleChartResponse {
|
|
51
|
-
|
|
65
|
+
bool success = 1;
|
|
66
|
+
string message = 2;
|
|
67
|
+
repeated CandleData data = 3;
|
|
52
68
|
}
|
|
53
69
|
|
|
54
|
-
//
|
|
70
|
+
// Pool data structure.
|
|
55
71
|
message PoolData {
|
|
56
72
|
string id = 1;
|
|
57
73
|
string name = 2;
|
|
@@ -72,11 +88,17 @@ message PoolData {
|
|
|
72
88
|
string updatedAt = 17;
|
|
73
89
|
}
|
|
74
90
|
|
|
91
|
+
// Candle data structure.
|
|
75
92
|
message CandleData {
|
|
76
|
-
|
|
93
|
+
string timestamp = 1;
|
|
77
94
|
string open = 2;
|
|
78
95
|
string high = 3;
|
|
79
96
|
string low = 4;
|
|
80
97
|
string close = 5;
|
|
81
98
|
string volume = 6;
|
|
82
|
-
|
|
99
|
+
string openUsd = 7;
|
|
100
|
+
string highUsd = 8;
|
|
101
|
+
string lowUsd = 9;
|
|
102
|
+
string closeUsd = 10;
|
|
103
|
+
string volumeUsd = 11;
|
|
104
|
+
}
|