@sui-tracker/shared 1.0.49 → 1.0.51
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/data-center-grpc.service.d.ts +12 -0
- package/dist/modules/grpc-services/data-center-grpc.service.js +106 -0
- package/dist/modules/grpc-services/data-center-grpc.service.js.map +1 -0
- package/dist/modules/grpc-services/index.d.ts +1 -0
- package/dist/modules/grpc-services/index.js +1 -0
- package/dist/modules/grpc-services/index.js.map +1 -1
- package/dist/modules/grpc-services/swap-order-grpc.service.d.ts +2 -1
- package/dist/modules/grpc-services/swap-order-grpc.service.js +14 -0
- package/dist/modules/grpc-services/swap-order-grpc.service.js.map +1 -1
- package/dist/modules/interfaces/index.d.ts +1 -0
- package/dist/modules/interfaces/index.js +1 -0
- package/dist/modules/interfaces/index.js.map +1 -1
- package/dist/modules/interfaces/sui-data-center.interface.d.ts +89 -0
- package/dist/modules/interfaces/sui-data-center.interface.js +3 -0
- package/dist/modules/interfaces/sui-data-center.interface.js.map +1 -0
- package/dist/modules/interfaces/swap-order.interface.d.ts +45 -16
- package/dist/modules/shared.module.js +10 -0
- package/dist/modules/shared.module.js.map +1 -1
- package/dist/protos/sui-data-center.proto +116 -62
- package/dist/protos/swap-order.proto +74 -49
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -6,99 +6,124 @@ package swap_order;
|
|
|
6
6
|
|
|
7
7
|
// SwapOrderService defines the available RPC endpoints for swap order operations.
|
|
8
8
|
service SwapOrderService {
|
|
9
|
-
// Gets trending pools by label.
|
|
10
9
|
rpc GetTrendingPools (GetTrendingPoolsRequest) returns (GetTrendingPoolsResponse);
|
|
11
|
-
// Gets new pools by label.
|
|
12
10
|
rpc GetNewPools (GetNewPoolsRequest) returns (GetNewPoolsResponse);
|
|
13
|
-
// Gets a pool by id.
|
|
14
11
|
rpc GetPool (GetPoolRequest) returns (GetPoolResponse);
|
|
15
|
-
// Gets candle chart data for a pool.
|
|
16
12
|
rpc GetCandleChart (GetCandleChartRequest) returns (GetCandleChartResponse);
|
|
13
|
+
rpc GetLastSwapOrder (GetLastSwapOrderRequest) returns (GetLastSwapOrderResponse);
|
|
17
14
|
}
|
|
18
15
|
|
|
19
|
-
//
|
|
16
|
+
// Token data structure.
|
|
17
|
+
message TokenData {
|
|
18
|
+
string id = 1;
|
|
19
|
+
string name = 2;
|
|
20
|
+
string symbol = 3;
|
|
21
|
+
string address = 4;
|
|
22
|
+
int32 decimals = 5;
|
|
23
|
+
string iconUrl = 6;
|
|
24
|
+
bool isActive = 7;
|
|
25
|
+
string totalSupply = 8;
|
|
26
|
+
string description = 9;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Pool data structure.
|
|
30
|
+
message PoolData {
|
|
31
|
+
string id = 1;
|
|
32
|
+
TokenData tokenA = 2;
|
|
33
|
+
TokenData tokenB = 3;
|
|
34
|
+
double reserveA = 4;
|
|
35
|
+
double reserveB = 5;
|
|
36
|
+
string volume = 6;
|
|
37
|
+
string oldPrice = 7;
|
|
38
|
+
string totalTx = 8;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Candle data structure.
|
|
42
|
+
message CandleData {
|
|
43
|
+
string timestamp = 1;
|
|
44
|
+
string open = 2;
|
|
45
|
+
string high = 3;
|
|
46
|
+
string low = 4;
|
|
47
|
+
string close = 5;
|
|
48
|
+
string volume = 6;
|
|
49
|
+
string openUsd = 7;
|
|
50
|
+
string highUsd = 8;
|
|
51
|
+
string lowUsd = 9;
|
|
52
|
+
string closeUsd = 10;
|
|
53
|
+
string volumeUsd = 11;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Swap order data structure.
|
|
57
|
+
message SwapOrderData {
|
|
58
|
+
int64 id = 1;
|
|
59
|
+
string pool = 2;
|
|
60
|
+
string trader = 3;
|
|
61
|
+
string transactionHash = 4;
|
|
62
|
+
string amountA = 5;
|
|
63
|
+
string amountB = 6;
|
|
64
|
+
string usdAmount = 7;
|
|
65
|
+
string usdPrice = 8;
|
|
66
|
+
bool a2b = 9;
|
|
67
|
+
string type = 10;
|
|
68
|
+
string liquidity = 11;
|
|
69
|
+
string createdAt = 12;
|
|
70
|
+
string swapAt = 13;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Request/Response messages
|
|
20
74
|
message GetTrendingPoolsRequest {
|
|
21
|
-
int32 label = 1;
|
|
75
|
+
int32 label = 1;
|
|
22
76
|
}
|
|
23
77
|
|
|
24
|
-
// Request message for getting new pools.
|
|
25
78
|
message GetNewPoolsRequest {
|
|
26
|
-
int32 label = 1;
|
|
79
|
+
int32 label = 1;
|
|
27
80
|
}
|
|
28
81
|
|
|
29
|
-
// Request message for getting a pool by id.
|
|
30
82
|
message GetPoolRequest {
|
|
31
83
|
string id = 1;
|
|
32
84
|
}
|
|
33
85
|
|
|
34
|
-
// Request message for getting candle chart data.
|
|
35
86
|
message GetCandleChartRequest {
|
|
36
87
|
string pool = 1;
|
|
37
88
|
int32 resolution = 2;
|
|
38
89
|
int32 limit = 3;
|
|
39
|
-
string timestamp = 4;
|
|
90
|
+
string timestamp = 4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message GetLastSwapOrderRequest {
|
|
94
|
+
string poolAddress = 1;
|
|
95
|
+
string time = 2;
|
|
96
|
+
int32 limit = 3;
|
|
97
|
+
string type = 4;
|
|
98
|
+
int32 page = 5;
|
|
40
99
|
}
|
|
41
100
|
|
|
42
|
-
// Response message for trending pools.
|
|
43
101
|
message GetTrendingPoolsResponse {
|
|
44
102
|
bool success = 1;
|
|
45
103
|
string message = 2;
|
|
46
104
|
repeated PoolData data = 3;
|
|
47
105
|
}
|
|
48
106
|
|
|
49
|
-
// Response message for new pools.
|
|
50
107
|
message GetNewPoolsResponse {
|
|
51
108
|
bool success = 1;
|
|
52
109
|
string message = 2;
|
|
53
110
|
repeated PoolData data = 3;
|
|
54
111
|
}
|
|
55
112
|
|
|
56
|
-
// Response message for getting a pool.
|
|
57
113
|
message GetPoolResponse {
|
|
58
114
|
bool success = 1;
|
|
59
115
|
string message = 2;
|
|
60
116
|
PoolData data = 3;
|
|
61
117
|
}
|
|
62
118
|
|
|
63
|
-
// Response message for candle chart data.
|
|
64
119
|
message GetCandleChartResponse {
|
|
65
120
|
bool success = 1;
|
|
66
121
|
string message = 2;
|
|
67
122
|
repeated CandleData data = 3;
|
|
68
123
|
}
|
|
69
124
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
string
|
|
73
|
-
|
|
74
|
-
string symbol = 3;
|
|
75
|
-
string token0 = 4;
|
|
76
|
-
string token1 = 5;
|
|
77
|
-
string reserve0 = 6;
|
|
78
|
-
string reserve1 = 7;
|
|
79
|
-
string totalSupply = 8;
|
|
80
|
-
string volume = 9;
|
|
81
|
-
string liquidity = 10;
|
|
82
|
-
string price = 11;
|
|
83
|
-
string priceChange24h = 12;
|
|
84
|
-
string volume24h = 13;
|
|
85
|
-
string tvl = 14;
|
|
86
|
-
bool isActive = 15;
|
|
87
|
-
string createdAt = 16;
|
|
88
|
-
string updatedAt = 17;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Candle data structure.
|
|
92
|
-
message CandleData {
|
|
93
|
-
string timestamp = 1;
|
|
94
|
-
string open = 2;
|
|
95
|
-
string high = 3;
|
|
96
|
-
string low = 4;
|
|
97
|
-
string close = 5;
|
|
98
|
-
string volume = 6;
|
|
99
|
-
string openUsd = 7;
|
|
100
|
-
string highUsd = 8;
|
|
101
|
-
string lowUsd = 9;
|
|
102
|
-
string closeUsd = 10;
|
|
103
|
-
string volumeUsd = 11;
|
|
125
|
+
message GetLastSwapOrderResponse {
|
|
126
|
+
bool success = 1;
|
|
127
|
+
string message = 2;
|
|
128
|
+
repeated SwapOrderData data = 3;
|
|
104
129
|
}
|