@sui-tracker/shared 1.0.64 → 1.0.65
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/interfaces/IBalanceChange.type.d.ts +3 -6
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/modules/interfaces/swap-order.interface.d.ts +65 -41
- package/dist/modules/interfaces/swap-order.interface.js +1 -0
- package/dist/modules/interfaces/swap-order.interface.js.map +1 -1
- package/dist/protos/swap-order.proto +81 -48
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/.env +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Buffer } from
|
|
1
|
+
import { Buffer } from "buffer";
|
|
2
2
|
export interface ITokenTransferData {
|
|
3
3
|
coinType: string;
|
|
4
4
|
amount: bigint;
|
|
@@ -8,12 +8,9 @@ export interface ITokenTransferData {
|
|
|
8
8
|
hash: string;
|
|
9
9
|
}
|
|
10
10
|
export interface IBalanceChange {
|
|
11
|
-
amount:
|
|
11
|
+
amount: number;
|
|
12
12
|
coinType: string;
|
|
13
|
-
owner:
|
|
14
|
-
AddressOwner?: string;
|
|
15
|
-
ObjectOwner?: string;
|
|
16
|
-
};
|
|
13
|
+
owner: string;
|
|
17
14
|
tokenAccountHash: Buffer;
|
|
18
15
|
transactionHash: string;
|
|
19
16
|
}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ISwapOrder.type"), exports);
|
|
18
18
|
__exportStar(require("./IBalanceChange.type"), exports);
|
|
19
19
|
__exportStar(require("./IProxy"), exports);
|
|
20
|
+
__exportStar(require("../modules/interfaces/checkpoint.interface"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,wDAAsC;AACtC,2CAAyB;AACzB,6EAA2D"}
|
|
@@ -28,33 +28,27 @@ export interface PoolData {
|
|
|
28
28
|
currentPrice: string;
|
|
29
29
|
}
|
|
30
30
|
export interface PoolDataDetail {
|
|
31
|
-
id: string;
|
|
32
|
-
tokenA: TokenData;
|
|
33
|
-
tokenB: TokenData;
|
|
34
|
-
aIsBase: boolean;
|
|
35
|
-
reserveA?: number;
|
|
36
|
-
reserveB?: number;
|
|
37
31
|
priceA: number;
|
|
38
32
|
priceB: number;
|
|
39
|
-
poolCreatedTime?: Date;
|
|
40
33
|
dex: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
34
|
+
poolCreatedTime: Date | null;
|
|
35
|
+
tokenA: TokenData;
|
|
36
|
+
tokenB: TokenData;
|
|
37
|
+
pool: string;
|
|
38
|
+
aIsBase: boolean;
|
|
39
|
+
totalVolume: number;
|
|
40
|
+
totalTx: number;
|
|
41
|
+
totalA2b: number;
|
|
42
|
+
totalB2a: number;
|
|
43
|
+
totalMaker: number;
|
|
44
|
+
makerA2b: number;
|
|
45
|
+
makerB2a: number;
|
|
46
|
+
totalVolumeA2b: number;
|
|
47
|
+
totalVolumeB2a: number;
|
|
48
|
+
price5mAgo: number;
|
|
49
|
+
price60mAgo: number;
|
|
50
|
+
price360mAgo: number;
|
|
51
|
+
price1440mAgo: number;
|
|
58
52
|
}
|
|
59
53
|
export interface CandleData {
|
|
60
54
|
t: string;
|
|
@@ -82,15 +76,41 @@ export interface GetPoolRequest {
|
|
|
82
76
|
export interface GetCandleChartRequest {
|
|
83
77
|
pool: string;
|
|
84
78
|
resolution: number;
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
fromTime: number;
|
|
80
|
+
endTime: number;
|
|
87
81
|
type?: 'usd' | 'token';
|
|
88
82
|
}
|
|
83
|
+
export interface ListPool {
|
|
84
|
+
pool: string;
|
|
85
|
+
totalVolume: number;
|
|
86
|
+
totalTx: number;
|
|
87
|
+
totalA2b: number;
|
|
88
|
+
totalB2a: number;
|
|
89
|
+
totalMaker: number;
|
|
90
|
+
makerA2b: number;
|
|
91
|
+
makerB2a: number;
|
|
92
|
+
lastVolume: number;
|
|
93
|
+
lastAmountA: number;
|
|
94
|
+
lastAmountB: number;
|
|
95
|
+
trendingScore: number;
|
|
96
|
+
id: string;
|
|
97
|
+
tokenA: TokenData;
|
|
98
|
+
tokenB: TokenData;
|
|
99
|
+
poolCreatedTime: null;
|
|
100
|
+
priceA: number;
|
|
101
|
+
priceB: number;
|
|
102
|
+
dex: string;
|
|
103
|
+
price5mAgo: number;
|
|
104
|
+
price60mAgo: number;
|
|
105
|
+
price360mAgo: number;
|
|
106
|
+
price1440mAgo: number;
|
|
107
|
+
aIsBase: boolean;
|
|
108
|
+
}
|
|
89
109
|
export interface GetListPoolsResponse extends BaseResponse {
|
|
90
|
-
data:
|
|
110
|
+
data: ListPool;
|
|
91
111
|
}
|
|
92
112
|
export interface GetNewPoolsResponse extends BaseResponse {
|
|
93
|
-
data:
|
|
113
|
+
data: ListPool;
|
|
94
114
|
}
|
|
95
115
|
export interface GetPoolResponse extends BaseResponse {
|
|
96
116
|
data: PoolDataDetail | null;
|
|
@@ -99,27 +119,31 @@ export interface GetCandleChartResponse extends BaseResponse {
|
|
|
99
119
|
data: CandleData[];
|
|
100
120
|
}
|
|
101
121
|
export interface SwapOrderData {
|
|
102
|
-
id: number;
|
|
103
|
-
pool: string;
|
|
104
122
|
trader: string;
|
|
123
|
+
pool: string;
|
|
124
|
+
usdVolume: string;
|
|
125
|
+
usdPrice: string;
|
|
126
|
+
price: string;
|
|
127
|
+
volume: string;
|
|
105
128
|
transactionHash: string;
|
|
129
|
+
swapAt: number;
|
|
130
|
+
type: 'swap' | 'createPool' | 'addLiquidity' | 'removeLiquidity';
|
|
131
|
+
a2b: 'A2B' | 'B2A';
|
|
106
132
|
amountA: string;
|
|
107
133
|
amountB: string;
|
|
108
|
-
|
|
109
|
-
usdPrice: string;
|
|
110
|
-
a2b: boolean;
|
|
111
|
-
type: TradeType;
|
|
112
|
-
liquidity?: string;
|
|
113
|
-
createdAt: string;
|
|
114
|
-
swapAt: string;
|
|
134
|
+
liquidity?: string | null;
|
|
115
135
|
}
|
|
116
136
|
export interface GetLastSwapOrderRequest {
|
|
117
137
|
poolAddress: string;
|
|
118
|
-
|
|
119
|
-
endTime: string;
|
|
138
|
+
toTime: number;
|
|
120
139
|
limit?: number;
|
|
121
|
-
type?:
|
|
122
|
-
|
|
140
|
+
type?: TradeType;
|
|
141
|
+
minAmountA?: number;
|
|
142
|
+
maxAmountA?: number;
|
|
143
|
+
minAmountB?: number;
|
|
144
|
+
maxAmountB?: number;
|
|
145
|
+
minUsdVolume?: number;
|
|
146
|
+
maxUsdVolume?: number;
|
|
123
147
|
}
|
|
124
148
|
export interface GetLastSwapOrderResponse extends BaseResponse {
|
|
125
149
|
data: SwapOrderData[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-order.interface.js","sourceRoot":"","sources":["../../../src/modules/interfaces/swap-order.interface.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"swap-order.interface.js","sourceRoot":"","sources":["../../../src/modules/interfaces/swap-order.interface.ts"],"names":[],"mappings":";;AA4HC,EAAE,CAAA"}
|
|
@@ -32,14 +32,6 @@ message TokenData {
|
|
|
32
32
|
optional string creator = 12;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
// Stats data structure for PoolDataDetail
|
|
36
|
-
message StatsData {
|
|
37
|
-
map<string, string> volume = 1;
|
|
38
|
-
map<string, string> price = 2;
|
|
39
|
-
map<string, string> totalA2b = 3;
|
|
40
|
-
map<string, string> totalTx = 4;
|
|
41
|
-
map<string, string> totalMakers = 5;
|
|
42
|
-
}
|
|
43
35
|
|
|
44
36
|
// Pool data structure matching PoolData interface
|
|
45
37
|
message PoolData {
|
|
@@ -57,17 +49,55 @@ message PoolData {
|
|
|
57
49
|
|
|
58
50
|
// Pool data detail structure matching PoolDataDetail interface
|
|
59
51
|
message PoolDataDetail {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
double priceA = 1;
|
|
53
|
+
double priceB = 2;
|
|
54
|
+
string dex = 3;
|
|
55
|
+
optional string poolCreatedTime = 4;
|
|
56
|
+
TokenData tokenA = 5;
|
|
57
|
+
TokenData tokenB = 6;
|
|
58
|
+
string pool = 7;
|
|
59
|
+
bool aIsBase = 8;
|
|
60
|
+
double totalVolume = 9;
|
|
61
|
+
int32 totalTx = 10;
|
|
62
|
+
double totalA2b = 11;
|
|
63
|
+
double totalB2a = 12;
|
|
64
|
+
double totalMaker = 13;
|
|
65
|
+
double makerA2b = 14;
|
|
66
|
+
double makerB2a = 15;
|
|
67
|
+
double price5mAgo = 16;
|
|
68
|
+
double price60mAgo = 17;
|
|
69
|
+
double price360mAgo = 18;
|
|
70
|
+
double price1440mAgo = 19;
|
|
71
|
+
double totalVolumeA2b = 20;
|
|
72
|
+
double totalVolumeB2a = 21;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// List pool structure matching ListPool interface
|
|
76
|
+
message ListPool {
|
|
77
|
+
string pool = 1;
|
|
78
|
+
double totalVolume = 2;
|
|
79
|
+
int32 totalTx = 3;
|
|
80
|
+
double totalA2b = 4;
|
|
81
|
+
double totalB2a = 5;
|
|
82
|
+
double totalMaker = 6;
|
|
83
|
+
double makerA2b = 7;
|
|
84
|
+
double makerB2a = 8;
|
|
85
|
+
double lastVolume = 9;
|
|
86
|
+
double lastAmountA = 10;
|
|
87
|
+
double lastAmountB = 11;
|
|
88
|
+
double trendingScore = 12;
|
|
89
|
+
string id = 13;
|
|
90
|
+
TokenData tokenA = 14;
|
|
91
|
+
TokenData tokenB = 15;
|
|
92
|
+
optional string poolCreatedTime = 16;
|
|
93
|
+
double priceA = 17;
|
|
94
|
+
double priceB = 18;
|
|
95
|
+
string dex = 19;
|
|
96
|
+
double price5mAgo = 20;
|
|
97
|
+
double price60mAgo = 21;
|
|
98
|
+
double price360mAgo = 22;
|
|
99
|
+
double price1440mAgo = 23;
|
|
100
|
+
bool aIsBase = 24;
|
|
71
101
|
}
|
|
72
102
|
|
|
73
103
|
// Candle data structure matching CandleData interface
|
|
@@ -82,19 +112,19 @@ message CandleData {
|
|
|
82
112
|
|
|
83
113
|
// Swap order data structure matching SwapOrderData interface
|
|
84
114
|
message SwapOrderData {
|
|
85
|
-
|
|
86
|
-
string pool = 2;
|
|
87
|
-
string
|
|
88
|
-
string
|
|
89
|
-
string
|
|
90
|
-
string
|
|
91
|
-
string
|
|
92
|
-
string
|
|
93
|
-
|
|
94
|
-
string
|
|
95
|
-
|
|
96
|
-
string
|
|
97
|
-
string
|
|
115
|
+
string trader = 1; // LowCardinality(String)
|
|
116
|
+
string pool = 2; // LowCardinality(String)
|
|
117
|
+
string usdVolume = 3; // Decimal(18, 9)
|
|
118
|
+
string usdPrice = 4; // Decimal(18, 9)
|
|
119
|
+
string price = 5; // Decimal(18, 9)
|
|
120
|
+
string volume = 6; // Decimal(18, 9)
|
|
121
|
+
string transactionHash = 7; // FixedString(66)
|
|
122
|
+
string swapAt = 8; // DateTime (ISO string)
|
|
123
|
+
string type = 9; // Enum8: 'swap' | 'createPool' | 'addLiquidity' | 'removeLiquidity'
|
|
124
|
+
string a2b = 10; // Enum8: 'A2B' | 'B2A'
|
|
125
|
+
string amountA = 11; // UInt64
|
|
126
|
+
string amountB = 12; // UInt64
|
|
127
|
+
optional string liquidity = 13; // Nullable(UInt64)
|
|
98
128
|
}
|
|
99
129
|
|
|
100
130
|
// Trending token data structure
|
|
@@ -137,18 +167,22 @@ message GetPoolRequest {
|
|
|
137
167
|
message GetCandleChartRequest {
|
|
138
168
|
string pool = 1;
|
|
139
169
|
int32 resolution = 2;
|
|
140
|
-
|
|
141
|
-
|
|
170
|
+
int64 fromTime = 3;
|
|
171
|
+
int64 endTime = 4;
|
|
142
172
|
optional string type = 5; // 'usd' | 'token'
|
|
143
173
|
}
|
|
144
174
|
|
|
145
175
|
message GetLastSwapOrderRequest {
|
|
146
176
|
string poolAddress = 1;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
optional
|
|
150
|
-
optional
|
|
151
|
-
optional
|
|
177
|
+
int32 toTime = 2;
|
|
178
|
+
optional int32 limit = 3;
|
|
179
|
+
optional string type = 4;
|
|
180
|
+
optional double minAmountA = 5;
|
|
181
|
+
optional double maxAmountA = 6;
|
|
182
|
+
optional double minAmountB = 7;
|
|
183
|
+
optional double maxAmountB = 8;
|
|
184
|
+
optional double minUsdVolume = 9;
|
|
185
|
+
optional double maxUsdVolume = 10;
|
|
152
186
|
}
|
|
153
187
|
|
|
154
188
|
message GetTrendingTokensRequest {
|
|
@@ -176,31 +210,30 @@ message GetTopTradersByPoolRequest {
|
|
|
176
210
|
|
|
177
211
|
// Pool trader stats data structure matching PoolTraderStatsData interface
|
|
178
212
|
message PoolTraderStatsData {
|
|
179
|
-
string
|
|
180
|
-
|
|
181
|
-
double
|
|
182
|
-
double
|
|
183
|
-
double
|
|
184
|
-
double totalUsdB2a = 6;
|
|
213
|
+
string trader = 1;
|
|
214
|
+
double totalTxA2b = 2;
|
|
215
|
+
double totalTxB2a = 3;
|
|
216
|
+
double totalUsdA2b = 4;
|
|
217
|
+
double totalUsdB2a = 5;
|
|
185
218
|
}
|
|
186
219
|
|
|
187
220
|
// Response messages matching TypeScript interfaces with BaseResponse structure
|
|
188
221
|
message GetListPoolsResponse {
|
|
189
222
|
bool success = 1;
|
|
190
223
|
string message = 2;
|
|
191
|
-
repeated
|
|
224
|
+
repeated ListPool data = 3;
|
|
192
225
|
}
|
|
193
226
|
|
|
194
227
|
message GetNewPoolsResponse {
|
|
195
228
|
bool success = 1;
|
|
196
229
|
string message = 2;
|
|
197
|
-
repeated
|
|
230
|
+
repeated ListPool data = 3;
|
|
198
231
|
}
|
|
199
232
|
|
|
200
233
|
message GetPoolResponse {
|
|
201
234
|
bool success = 1;
|
|
202
235
|
string message = 2;
|
|
203
|
-
optional PoolDataDetail data = 3;
|
|
236
|
+
optional PoolDataDetail data = 3;
|
|
204
237
|
}
|
|
205
238
|
|
|
206
239
|
message GetCandleChartResponse {
|