@eyettea/zeta-backend 0.0.1-rc.3
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/README.md +1 -0
- package/dist/types/api/index.d.ts +9 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/types.d.ts +19 -0
- package/dist/types/api/types.d.ts.map +1 -0
- package/dist/types/app.d.ts +945 -0
- package/dist/types/app.d.ts.map +1 -0
- package/dist/types/config/database.d.ts +17 -0
- package/dist/types/config/database.d.ts.map +1 -0
- package/dist/types/config/env.d.ts +20 -0
- package/dist/types/config/env.d.ts.map +1 -0
- package/dist/types/database/aggregates.d.ts +14 -0
- package/dist/types/database/aggregates.d.ts.map +1 -0
- package/dist/types/database/clmmTicks.d.ts +9 -0
- package/dist/types/database/clmmTicks.d.ts.map +1 -0
- package/dist/types/database/liquidityTicks.d.ts +7 -0
- package/dist/types/database/liquidityTicks.d.ts.map +1 -0
- package/dist/types/database/mints.d.ts +18 -0
- package/dist/types/database/mints.d.ts.map +1 -0
- package/dist/types/database/poolEvents.d.ts +37 -0
- package/dist/types/database/poolEvents.d.ts.map +1 -0
- package/dist/types/database/pools.d.ts +47 -0
- package/dist/types/database/pools.d.ts.map +1 -0
- package/dist/types/database/priceTicks.d.ts +7 -0
- package/dist/types/database/priceTicks.d.ts.map +1 -0
- package/dist/types/database/schemas.d.ts +134 -0
- package/dist/types/database/schemas.d.ts.map +1 -0
- package/dist/types/database/types.d.ts +114 -0
- package/dist/types/database/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/errors.d.ts +8 -0
- package/dist/types/lib/errors.d.ts.map +1 -0
- package/dist/types/lib/logger.d.ts +2 -0
- package/dist/types/lib/logger.d.ts.map +1 -0
- package/dist/types/lib/validation.d.ts +3 -0
- package/dist/types/lib/validation.d.ts.map +1 -0
- package/dist/types/routes/compute.d.ts +103 -0
- package/dist/types/routes/compute.d.ts.map +1 -0
- package/dist/types/routes/ohlcv.d.ts +64 -0
- package/dist/types/routes/ohlcv.d.ts.map +1 -0
- package/dist/types/routes/pools.d.ts +305 -0
- package/dist/types/routes/pools.d.ts.map +1 -0
- package/dist/types/routes/response.d.ts +26 -0
- package/dist/types/routes/response.d.ts.map +1 -0
- package/dist/types/routes/websocket.d.ts +42 -0
- package/dist/types/routes/websocket.d.ts.map +1 -0
- package/dist/types/services/Services.d.ts +21 -0
- package/dist/types/services/Services.d.ts.map +1 -0
- package/dist/types/services/computeService.d.ts +103 -0
- package/dist/types/services/computeService.d.ts.map +1 -0
- package/dist/types/services/poolEventsHandler.d.ts +26 -0
- package/dist/types/services/poolEventsHandler.d.ts.map +1 -0
- package/dist/types/services/poolEventsSubscriptionService.d.ts +16 -0
- package/dist/types/services/poolEventsSubscriptionService.d.ts.map +1 -0
- package/dist/types/services/poolService.d.ts +140 -0
- package/dist/types/services/poolService.d.ts.map +1 -0
- package/dist/types/services/poolStateWebsocketService.d.ts +13 -0
- package/dist/types/services/poolStateWebsocketService.d.ts.map +1 -0
- package/dist/types/services/poolStatsService.d.ts +53 -0
- package/dist/types/services/poolStatsService.d.ts.map +1 -0
- package/dist/types/services/priceService.d.ts +36 -0
- package/dist/types/services/priceService.d.ts.map +1 -0
- package/dist/types/utils/period.d.ts +8 -0
- package/dist/types/utils/period.d.ts.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { ApiResponse } from './response';
|
|
3
|
+
import type { OHLVCResult } from '../services/poolStatsService';
|
|
4
|
+
export declare const ohlcvRouter: Elysia<"/api/v1/ohlcv", {
|
|
5
|
+
decorator: {};
|
|
6
|
+
store: {};
|
|
7
|
+
derive: {};
|
|
8
|
+
resolve: {};
|
|
9
|
+
}, {
|
|
10
|
+
typebox: {};
|
|
11
|
+
error: {};
|
|
12
|
+
}, {
|
|
13
|
+
schema: {};
|
|
14
|
+
standaloneSchema: {};
|
|
15
|
+
macro: {};
|
|
16
|
+
macroFn: {};
|
|
17
|
+
parser: {};
|
|
18
|
+
response: {};
|
|
19
|
+
}, {
|
|
20
|
+
api: {
|
|
21
|
+
v1: {
|
|
22
|
+
ohlcv: {
|
|
23
|
+
get: {
|
|
24
|
+
body: unknown;
|
|
25
|
+
params: {};
|
|
26
|
+
query: {
|
|
27
|
+
type?: "1m" | "5m" | "15m" | "1h" | "4h" | "1d" | "1w" | undefined;
|
|
28
|
+
token0?: string | undefined;
|
|
29
|
+
token1?: string | undefined;
|
|
30
|
+
poolId?: string | undefined;
|
|
31
|
+
time_from?: number | undefined;
|
|
32
|
+
time_to?: number | undefined;
|
|
33
|
+
};
|
|
34
|
+
headers: unknown;
|
|
35
|
+
response: {
|
|
36
|
+
200: ApiResponse<OHLVCResult>;
|
|
37
|
+
422: {
|
|
38
|
+
type: "validation";
|
|
39
|
+
on: string;
|
|
40
|
+
summary?: string;
|
|
41
|
+
message?: string;
|
|
42
|
+
found?: unknown;
|
|
43
|
+
property?: string;
|
|
44
|
+
expected?: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
derive: {};
|
|
53
|
+
resolve: {};
|
|
54
|
+
schema: {};
|
|
55
|
+
standaloneSchema: {};
|
|
56
|
+
response: {};
|
|
57
|
+
}, {
|
|
58
|
+
derive: {};
|
|
59
|
+
resolve: {};
|
|
60
|
+
schema: {};
|
|
61
|
+
standaloneSchema: {};
|
|
62
|
+
response: {};
|
|
63
|
+
}>;
|
|
64
|
+
//# sourceMappingURL=ohlcv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ohlcv.d.ts","sourceRoot":"","sources":["../../../src/routes/ohlcv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AAGnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGvB,CAAC"}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { ApiResponse } from './response';
|
|
3
|
+
import type { LiquidityLineData } from '../services/poolStatsService';
|
|
4
|
+
import type { TokenPrice } from '../services/priceService';
|
|
5
|
+
import type { TokenInfo } from '@alephium/token-list';
|
|
6
|
+
import type { PoolWithStats, ClmmLiquidityRow } from '../services/poolService';
|
|
7
|
+
import type { ClmmPosition } from '../api/types';
|
|
8
|
+
import type { PoolEvent } from '../database/types';
|
|
9
|
+
export type ClmmLiquidityRowPayload = ClmmLiquidityRow;
|
|
10
|
+
export interface ClmmLiquidityLinePayload {
|
|
11
|
+
count: number;
|
|
12
|
+
line: ClmmLiquidityRowPayload[];
|
|
13
|
+
}
|
|
14
|
+
export interface PoolListResponse {
|
|
15
|
+
count: number;
|
|
16
|
+
totalPools: number;
|
|
17
|
+
data: PoolWithStats[];
|
|
18
|
+
}
|
|
19
|
+
export interface PoolListFromIdsResponse {
|
|
20
|
+
count: number;
|
|
21
|
+
data: PoolWithStats[];
|
|
22
|
+
meta: {
|
|
23
|
+
requestedIds: string[];
|
|
24
|
+
foundIds: string[];
|
|
25
|
+
missingIds: string[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface Events {
|
|
29
|
+
data: PoolEvent[];
|
|
30
|
+
}
|
|
31
|
+
export interface TokenListResponse {
|
|
32
|
+
count: number;
|
|
33
|
+
tokens: TokenInfo[];
|
|
34
|
+
}
|
|
35
|
+
export interface TokenPricesResponse {
|
|
36
|
+
count: number;
|
|
37
|
+
prices: TokenPrice[];
|
|
38
|
+
}
|
|
39
|
+
export declare const poolsRouter: Elysia<"/pools", {
|
|
40
|
+
decorator: {};
|
|
41
|
+
store: {};
|
|
42
|
+
derive: {};
|
|
43
|
+
resolve: {};
|
|
44
|
+
}, {
|
|
45
|
+
typebox: {};
|
|
46
|
+
error: {};
|
|
47
|
+
}, {
|
|
48
|
+
schema: {};
|
|
49
|
+
standaloneSchema: {};
|
|
50
|
+
macro: {};
|
|
51
|
+
macroFn: {};
|
|
52
|
+
parser: {};
|
|
53
|
+
response: {};
|
|
54
|
+
}, {
|
|
55
|
+
pools: {
|
|
56
|
+
tokens: {
|
|
57
|
+
get: {
|
|
58
|
+
body: unknown;
|
|
59
|
+
params: {};
|
|
60
|
+
query: unknown;
|
|
61
|
+
headers: unknown;
|
|
62
|
+
response: {
|
|
63
|
+
200: ApiResponse<TokenListResponse>;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
} & {
|
|
69
|
+
pools: {
|
|
70
|
+
line: {
|
|
71
|
+
position: {
|
|
72
|
+
get: {
|
|
73
|
+
body: unknown;
|
|
74
|
+
params: {};
|
|
75
|
+
query: {
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
headers: unknown;
|
|
79
|
+
response: {
|
|
80
|
+
200: ApiResponse<ClmmLiquidityLinePayload>;
|
|
81
|
+
422: {
|
|
82
|
+
type: "validation";
|
|
83
|
+
on: string;
|
|
84
|
+
summary?: string;
|
|
85
|
+
message?: string;
|
|
86
|
+
found?: unknown;
|
|
87
|
+
property?: string;
|
|
88
|
+
expected?: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
} & {
|
|
96
|
+
pools: {
|
|
97
|
+
prices: {
|
|
98
|
+
get: {
|
|
99
|
+
body: unknown;
|
|
100
|
+
params: {};
|
|
101
|
+
query: {
|
|
102
|
+
symbols?: string | undefined;
|
|
103
|
+
ids?: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
headers: unknown;
|
|
106
|
+
response: {
|
|
107
|
+
200: ApiResponse<TokenPricesResponse>;
|
|
108
|
+
422: {
|
|
109
|
+
type: "validation";
|
|
110
|
+
on: string;
|
|
111
|
+
summary?: string;
|
|
112
|
+
message?: string;
|
|
113
|
+
found?: unknown;
|
|
114
|
+
property?: string;
|
|
115
|
+
expected?: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
} & {
|
|
122
|
+
pools: {
|
|
123
|
+
info: {
|
|
124
|
+
mint: {
|
|
125
|
+
get: {
|
|
126
|
+
body: unknown;
|
|
127
|
+
params: {};
|
|
128
|
+
query: {
|
|
129
|
+
poolType?: "standard" | "concentrated" | "all" | undefined;
|
|
130
|
+
page?: number | undefined;
|
|
131
|
+
pageSize?: number | undefined;
|
|
132
|
+
mint2?: string | undefined;
|
|
133
|
+
mint1: string;
|
|
134
|
+
};
|
|
135
|
+
headers: unknown;
|
|
136
|
+
response: {
|
|
137
|
+
200: ApiResponse<PoolListResponse>;
|
|
138
|
+
422: {
|
|
139
|
+
type: "validation";
|
|
140
|
+
on: string;
|
|
141
|
+
summary?: string;
|
|
142
|
+
message?: string;
|
|
143
|
+
found?: unknown;
|
|
144
|
+
property?: string;
|
|
145
|
+
expected?: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
} & {
|
|
153
|
+
pools: {
|
|
154
|
+
info: {
|
|
155
|
+
ids: {
|
|
156
|
+
get: {
|
|
157
|
+
body: unknown;
|
|
158
|
+
params: {};
|
|
159
|
+
query: {
|
|
160
|
+
ids: string;
|
|
161
|
+
};
|
|
162
|
+
headers: unknown;
|
|
163
|
+
response: {
|
|
164
|
+
200: ApiResponse<PoolListFromIdsResponse>;
|
|
165
|
+
422: {
|
|
166
|
+
type: "validation";
|
|
167
|
+
on: string;
|
|
168
|
+
summary?: string;
|
|
169
|
+
message?: string;
|
|
170
|
+
found?: unknown;
|
|
171
|
+
property?: string;
|
|
172
|
+
expected?: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
} & {
|
|
180
|
+
pools: {
|
|
181
|
+
info: {
|
|
182
|
+
events: {
|
|
183
|
+
get: {
|
|
184
|
+
body: unknown;
|
|
185
|
+
params: {};
|
|
186
|
+
query: {
|
|
187
|
+
id: string;
|
|
188
|
+
};
|
|
189
|
+
headers: unknown;
|
|
190
|
+
response: {
|
|
191
|
+
200: ApiResponse<Events>;
|
|
192
|
+
422: {
|
|
193
|
+
type: "validation";
|
|
194
|
+
on: string;
|
|
195
|
+
summary?: string;
|
|
196
|
+
message?: string;
|
|
197
|
+
found?: unknown;
|
|
198
|
+
property?: string;
|
|
199
|
+
expected?: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
} & {
|
|
207
|
+
pools: {
|
|
208
|
+
info: {
|
|
209
|
+
"clmm-positions": {
|
|
210
|
+
get: {
|
|
211
|
+
body: unknown;
|
|
212
|
+
params: {};
|
|
213
|
+
query: {
|
|
214
|
+
address: string;
|
|
215
|
+
};
|
|
216
|
+
headers: unknown;
|
|
217
|
+
response: {
|
|
218
|
+
200: ApiResponse<ClmmPosition[]>;
|
|
219
|
+
422: {
|
|
220
|
+
type: "validation";
|
|
221
|
+
on: string;
|
|
222
|
+
summary?: string;
|
|
223
|
+
message?: string;
|
|
224
|
+
found?: unknown;
|
|
225
|
+
property?: string;
|
|
226
|
+
expected?: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
} & {
|
|
234
|
+
pools: {
|
|
235
|
+
info: {
|
|
236
|
+
list: {
|
|
237
|
+
get: {
|
|
238
|
+
body: unknown;
|
|
239
|
+
params: {};
|
|
240
|
+
query: {
|
|
241
|
+
poolType?: "standard" | "concentrated" | "all" | undefined;
|
|
242
|
+
page?: number | undefined;
|
|
243
|
+
pageSize?: number | undefined;
|
|
244
|
+
sortType?: "asc" | "desc" | undefined;
|
|
245
|
+
};
|
|
246
|
+
headers: unknown;
|
|
247
|
+
response: {
|
|
248
|
+
200: ApiResponse<PoolListResponse>;
|
|
249
|
+
422: {
|
|
250
|
+
type: "validation";
|
|
251
|
+
on: string;
|
|
252
|
+
summary?: string;
|
|
253
|
+
message?: string;
|
|
254
|
+
found?: unknown;
|
|
255
|
+
property?: string;
|
|
256
|
+
expected?: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
} & {
|
|
264
|
+
pools: {
|
|
265
|
+
line: {
|
|
266
|
+
liquidity: {
|
|
267
|
+
get: {
|
|
268
|
+
body: unknown;
|
|
269
|
+
params: {};
|
|
270
|
+
query: {
|
|
271
|
+
startTime?: number | undefined;
|
|
272
|
+
endTime?: number | undefined;
|
|
273
|
+
id: string;
|
|
274
|
+
};
|
|
275
|
+
headers: unknown;
|
|
276
|
+
response: {
|
|
277
|
+
200: ApiResponse<LiquidityLineData>;
|
|
278
|
+
422: {
|
|
279
|
+
type: "validation";
|
|
280
|
+
on: string;
|
|
281
|
+
summary?: string;
|
|
282
|
+
message?: string;
|
|
283
|
+
found?: unknown;
|
|
284
|
+
property?: string;
|
|
285
|
+
expected?: string;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
}, {
|
|
293
|
+
derive: {};
|
|
294
|
+
resolve: {};
|
|
295
|
+
schema: {};
|
|
296
|
+
standaloneSchema: {};
|
|
297
|
+
response: {};
|
|
298
|
+
}, {
|
|
299
|
+
derive: {};
|
|
300
|
+
resolve: {};
|
|
301
|
+
schema: {};
|
|
302
|
+
standaloneSchema: {};
|
|
303
|
+
response: {};
|
|
304
|
+
}>;
|
|
305
|
+
//# sourceMappingURL=pools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pools.d.ts","sourceRoot":"","sources":["../../../src/routes/pools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAK,MAAM,QAAQ,CAAC;AAGnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAGV,aAAa,EACb,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEvD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,IAAI,EAAE;QACJ,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuarB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface SuccessApiResponse<T> {
|
|
2
|
+
id: string;
|
|
3
|
+
success: true;
|
|
4
|
+
data: T;
|
|
5
|
+
}
|
|
6
|
+
export interface ErrorApiResponse {
|
|
7
|
+
id: string;
|
|
8
|
+
success: false;
|
|
9
|
+
msg: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PaginatedApiResponse<T> extends SuccessApiResponse<T> {
|
|
12
|
+
id: string;
|
|
13
|
+
success: true;
|
|
14
|
+
data: T & {
|
|
15
|
+
meta: {
|
|
16
|
+
page: number;
|
|
17
|
+
pageSize: number;
|
|
18
|
+
totalPages: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export type ApiResponse<T> = SuccessApiResponse<T> | ErrorApiResponse;
|
|
23
|
+
export declare function handlePaginatedSuccess<T>(data: T, page: number, pageSize: number, totalPages: number): PaginatedApiResponse<T>;
|
|
24
|
+
export declare function handleSuccess<T>(data: T): SuccessApiResponse<T>;
|
|
25
|
+
export declare function handleError(error: unknown): ErrorApiResponse;
|
|
26
|
+
//# sourceMappingURL=response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/routes/response.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,GAAG;QACR,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,EAAE,MAAM,CAAC;YACjB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;CACH;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC;AAEtE,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,oBAAoB,CAAC,CAAC,CAAC,CASzB;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAM/D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAM5D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
export declare const websocketRouter: Elysia<"", {
|
|
3
|
+
decorator: {};
|
|
4
|
+
store: {};
|
|
5
|
+
derive: {};
|
|
6
|
+
resolve: {};
|
|
7
|
+
}, {
|
|
8
|
+
typebox: {};
|
|
9
|
+
error: {};
|
|
10
|
+
}, {
|
|
11
|
+
schema: {};
|
|
12
|
+
standaloneSchema: {};
|
|
13
|
+
macro: {};
|
|
14
|
+
macroFn: {};
|
|
15
|
+
parser: {};
|
|
16
|
+
response: {};
|
|
17
|
+
}, {
|
|
18
|
+
ws: {
|
|
19
|
+
"pool-state": {
|
|
20
|
+
subscribe: {
|
|
21
|
+
body: unknown;
|
|
22
|
+
params: {};
|
|
23
|
+
query: unknown;
|
|
24
|
+
headers: unknown;
|
|
25
|
+
response: {};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
derive: {};
|
|
31
|
+
resolve: {};
|
|
32
|
+
schema: {};
|
|
33
|
+
standaloneSchema: {};
|
|
34
|
+
response: {};
|
|
35
|
+
}, {
|
|
36
|
+
derive: {};
|
|
37
|
+
resolve: {};
|
|
38
|
+
schema: {};
|
|
39
|
+
standaloneSchema: {};
|
|
40
|
+
response: {};
|
|
41
|
+
}>;
|
|
42
|
+
//# sourceMappingURL=websocket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../../src/routes/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAiBhC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmD1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Zeta } from '@h0ngcha0/typescript-sdk';
|
|
2
|
+
import { PriceService } from './priceService';
|
|
3
|
+
import { PoolService } from './poolService';
|
|
4
|
+
import { PoolStatsService } from './poolStatsService';
|
|
5
|
+
import { PoolEventsSubscriptionService } from './poolEventsSubscriptionService';
|
|
6
|
+
import { StandardPoolEventsHandler, ClmmPoolEventsHandler } from './poolEventsHandler';
|
|
7
|
+
import { ComputeService } from './computeService';
|
|
8
|
+
export declare class Services {
|
|
9
|
+
private static instance;
|
|
10
|
+
readonly zeta: Zeta;
|
|
11
|
+
readonly priceService: PriceService;
|
|
12
|
+
readonly poolService: PoolService;
|
|
13
|
+
readonly poolStatsService: PoolStatsService;
|
|
14
|
+
readonly poolEventsSubscriptionService: PoolEventsSubscriptionService;
|
|
15
|
+
readonly standardPoolEventsHandler: StandardPoolEventsHandler;
|
|
16
|
+
readonly clmmPoolEventsHandler: ClmmPoolEventsHandler;
|
|
17
|
+
readonly computeService: ComputeService;
|
|
18
|
+
private constructor();
|
|
19
|
+
static getInstance(): Services;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=Services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Services.d.ts","sourceRoot":"","sources":["../../../src/services/Services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,QAAQ;IACnB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAW;IAElC,SAAgB,IAAI,EAAE,IAAI,CAAC;IAC3B,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,SAAgB,WAAW,EAAE,WAAW,CAAC;IACzC,SAAgB,gBAAgB,EAAE,gBAAgB,CAAC;IACnD,SAAgB,6BAA6B,EAAE,6BAA6B,CAAC;IAC7E,SAAgB,yBAAyB,EAAE,yBAAyB,CAAC;IACrE,SAAgB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7D,SAAgB,cAAc,EAAE,cAAc,CAAC;IAE/C,OAAO;IAuBP,MAAM,CAAC,WAAW,IAAI,QAAQ;CAM/B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Zeta, SwapDetails } from '@h0ngcha0/typescript-sdk';
|
|
2
|
+
import type { PriceService } from './priceService';
|
|
3
|
+
import type { TokenInfo } from '@alephium/token-list';
|
|
4
|
+
import { PoolType } from './poolService';
|
|
5
|
+
export interface TokenAmountWithPrice {
|
|
6
|
+
mint: string;
|
|
7
|
+
symbol: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
decimals: number;
|
|
10
|
+
priceUSD?: string;
|
|
11
|
+
usdValue?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SwapBaseInParams {
|
|
14
|
+
inputMint: string;
|
|
15
|
+
outputMint: string;
|
|
16
|
+
amount: string;
|
|
17
|
+
slippageBps?: string;
|
|
18
|
+
poolType?: PoolType;
|
|
19
|
+
}
|
|
20
|
+
export interface SwapBaseOutParams {
|
|
21
|
+
inputMint: string;
|
|
22
|
+
outputMint: string;
|
|
23
|
+
amount: string;
|
|
24
|
+
slippageBps?: string;
|
|
25
|
+
poolType?: PoolType;
|
|
26
|
+
}
|
|
27
|
+
export interface SwapComputeResult {
|
|
28
|
+
swapType: 'BaseIn' | 'BaseOut';
|
|
29
|
+
inputMint: string;
|
|
30
|
+
inputAmount: string;
|
|
31
|
+
outputMint: string;
|
|
32
|
+
outputAmount: string;
|
|
33
|
+
otherAmountThreshold: string;
|
|
34
|
+
slippageBps: number;
|
|
35
|
+
priceImpactPct: number;
|
|
36
|
+
routePlan: any[];
|
|
37
|
+
inputToken: TokenAmountWithPrice;
|
|
38
|
+
outputToken: TokenAmountWithPrice;
|
|
39
|
+
priceInfo?: {
|
|
40
|
+
inputPriceUSD: string;
|
|
41
|
+
outputPriceUSD: string;
|
|
42
|
+
inputUSDValue: string;
|
|
43
|
+
outputUSDValue: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export declare class ComputeServiceError extends Error {
|
|
47
|
+
code?: string | undefined;
|
|
48
|
+
constructor(message: string, code?: string | undefined);
|
|
49
|
+
}
|
|
50
|
+
export declare class ComputeService {
|
|
51
|
+
private zeta;
|
|
52
|
+
private priceService;
|
|
53
|
+
constructor(zeta: Zeta, priceService: PriceService);
|
|
54
|
+
computeSwapBaseIn(params: SwapBaseInParams): Promise<SwapComputeResult>;
|
|
55
|
+
computeSwapBaseOut(params: SwapBaseOutParams): Promise<SwapComputeResult>;
|
|
56
|
+
parseSlippageBps(slippageBps?: string): number;
|
|
57
|
+
getTokenInfo(id: string): Promise<TokenInfo>;
|
|
58
|
+
getPoolState(inputTokenId: string, outputTokenId: string): Promise<import("@h0ngcha0/typescript-sdk").CpmmPoolState>;
|
|
59
|
+
convertSwapDetailsToResponse(swapDetails: SwapDetails, slippage: number): Promise<SwapComputeResult>;
|
|
60
|
+
computeClmmSwapBaseIn(params: {
|
|
61
|
+
inputMint: string;
|
|
62
|
+
outputMint: string;
|
|
63
|
+
amount: bigint;
|
|
64
|
+
slippage: number;
|
|
65
|
+
}): Promise<SwapComputeResult>;
|
|
66
|
+
computeClmmSwapBaseOut(params: {
|
|
67
|
+
inputMint: string;
|
|
68
|
+
outputMint: string;
|
|
69
|
+
amount: bigint;
|
|
70
|
+
slippage: number;
|
|
71
|
+
}): Promise<SwapComputeResult>;
|
|
72
|
+
applySlippage(value: bigint, slippageBps: number, direction: 'min' | 'max'): bigint;
|
|
73
|
+
getClmmSwapContext(inputMint: string, outputMint: string): Promise<{
|
|
74
|
+
inputToken: TokenInfo;
|
|
75
|
+
outputToken: TokenInfo;
|
|
76
|
+
token0Info: TokenInfo;
|
|
77
|
+
token1Info: TokenInfo;
|
|
78
|
+
zeroForOne: boolean;
|
|
79
|
+
configIndex: bigint;
|
|
80
|
+
}>;
|
|
81
|
+
calculateClmmPriceImpact(distribution: {
|
|
82
|
+
baseSqrtPriceX96: bigint;
|
|
83
|
+
sqrtPriceX96: bigint;
|
|
84
|
+
}, context: {
|
|
85
|
+
token0Info: TokenInfo;
|
|
86
|
+
token1Info: TokenInfo;
|
|
87
|
+
inputToken: TokenInfo;
|
|
88
|
+
outputToken: TokenInfo;
|
|
89
|
+
zeroForOne: boolean;
|
|
90
|
+
}, tokenInAmount: bigint, tokenOutAmount: bigint): number;
|
|
91
|
+
buildSwapComputeResult(params: {
|
|
92
|
+
swapType: 'BaseIn' | 'BaseOut';
|
|
93
|
+
tokenInInfo: TokenInfo;
|
|
94
|
+
tokenOutInfo: TokenInfo;
|
|
95
|
+
tokenInAmount: bigint;
|
|
96
|
+
tokenOutAmount: bigint;
|
|
97
|
+
otherAmountThreshold: bigint;
|
|
98
|
+
slippage: number;
|
|
99
|
+
priceImpactPct: number;
|
|
100
|
+
routePlan: any[];
|
|
101
|
+
}): Promise<SwapComputeResult>;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=computeService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeService.d.ts","sourceRoot":"","sources":["../../../src/services/computeService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QA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AAS,CAAC;QACtB,UAAU,EAAE,SAAS,CAAC;QACtB,WAAW,EAAE,SAAS,CAAC;QACvB,UAAU,EAAE,OAAO,CAAC;KACrB,EACD,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,GACrB,MAAM;IAmCH,sBAAsB,CAAC,MAAM,EAAE;QACnC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;QAC/B,WAAW,EAAE,SAAS,CAAC;QACvB,YAAY,EAAE,SAAS,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,GAAG,EAAE,CAAC;KAClB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CA8D/B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PoolService, PoolRecord } from './poolService';
|
|
2
|
+
import type { CpmmTokenPairTypes, ClmmPoolTypes } from '@h0ngcha0/typescript-sdk';
|
|
3
|
+
import type { PriceTickInsert, LiquidityTickInsert } from '../database/types';
|
|
4
|
+
declare abstract class BasePoolEventsHandler {
|
|
5
|
+
protected storePriceData(priceData: PriceTickInsert): Promise<void>;
|
|
6
|
+
protected storeLiquidityData(liquidityData: LiquidityTickInsert): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare class StandardPoolEventsHandler extends BasePoolEventsHandler {
|
|
9
|
+
private poolService;
|
|
10
|
+
constructor(poolService: PoolService);
|
|
11
|
+
capturePriceFromSwap(tokenPairId: string, txId: string, swapData: CpmmTokenPairTypes.SwapEvent): Promise<void>;
|
|
12
|
+
captureLiquidityFromMint(tokenPairId: string, txId: string, mintEvent: CpmmTokenPairTypes.MintEvent): Promise<void>;
|
|
13
|
+
captureLiquidityFromBurn(tokenPairId: string, txId: string, burnEvent: CpmmTokenPairTypes.BurnEvent): Promise<void>;
|
|
14
|
+
calculatePriceFromSwap(swapData: CpmmTokenPairTypes.SwapEvent, poolRecord: PoolRecord, token0Decimals: number, token1Decimals: number): Promise<string>;
|
|
15
|
+
captureLiquidityFromEvent(tokenPairId: string, txId: string, event: CpmmTokenPairTypes.MintEvent | CpmmTokenPairTypes.BurnEvent): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare class ClmmPoolEventsHandler extends BasePoolEventsHandler {
|
|
18
|
+
private poolService;
|
|
19
|
+
constructor(poolService: PoolService);
|
|
20
|
+
capturePriceFromSwap(tokenPairId: string, txId: string, swapData: ClmmPoolTypes.SwapEvent): Promise<void>;
|
|
21
|
+
captureLiquidityFromMint(tokenPairId: string, txId: string, mintEvent: ClmmPoolTypes.MintEvent): Promise<void>;
|
|
22
|
+
captureLiquidityFromBurn(tokenPairId: string, txId: string, burnEvent: ClmmPoolTypes.BurnEvent): Promise<void>;
|
|
23
|
+
captureLiquidityFromEvent(poolId: string, txId: string, event: ClmmPoolTypes.MintEvent | ClmmPoolTypes.BurnEvent): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=poolEventsHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolEventsHandler.d.ts","sourceRoot":"","sources":["../../../src/services/poolEventsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKlF,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAM5E,uBAAe,qBAAqB;cAClB,cAAc,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;cAQzD,kBAAkB,CAAC,aAAa,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOtF;AAED,qBA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,aAAa,CAAC,SAAS,GACjC,OAAO,CAAC,IAAI,CAAC;IAIV,yBAAyB,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,aAAa,CAAC,SAAS,GAAG,aAAa,CAAC,SAAS,GACvD,OAAO,CAAC,IAAI,CAAC;CA0EjB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Zeta } from '@h0ngcha0/typescript-sdk';
|
|
2
|
+
import type { PoolService } from './poolService';
|
|
3
|
+
import type { StandardPoolEventsHandler, ClmmPoolEventsHandler } from './poolEventsHandler';
|
|
4
|
+
export declare class PoolEventsSubscriptionService {
|
|
5
|
+
private zeta;
|
|
6
|
+
private poolService;
|
|
7
|
+
private standardPoolEventsHandler;
|
|
8
|
+
private clmmPoolEventsHandler;
|
|
9
|
+
private isSubscribed;
|
|
10
|
+
private readonly standard;
|
|
11
|
+
private readonly concentrated;
|
|
12
|
+
constructor(zeta: Zeta, poolService: PoolService, standardPoolEventsHandler: StandardPoolEventsHandler, clmmPoolEventsHandler: ClmmPoolEventsHandler);
|
|
13
|
+
startSubscription(): Promise<void>;
|
|
14
|
+
stopSubscription(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=poolEventsSubscriptionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolEventsSubscriptionService.d.ts","sourceRoot":"","sources":["../../../src/services/poolEventsSubscriptionService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,IAAI,EAGL,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AA6Y5F,qBAAa,6BAA6B;IAMtC,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,yBAAyB;IACjC,OAAO,CAAC,qBAAqB;IAR/B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmC;gBAGtD,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,EACxB,yBAAyB,EAAE,yBAAyB,EACpD,qBAAqB,EAAE,qBAAqB;IAUhD,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsBxC,gBAAgB,IAAI,IAAI;CAWzB"}
|