@liberfi.io/types 0.1.0
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/index.d.mts +1135 -0
- package/dist/index.d.ts +1135 -0
- package/dist/index.js +239 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +210 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +32 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1135 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
__LIBERFI_VERSION__?: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
declare const _default: "0.1.0";
|
|
9
|
+
|
|
10
|
+
declare enum Chain {
|
|
11
|
+
ETHEREUM = "1",
|
|
12
|
+
UBIQ = "8",
|
|
13
|
+
OPTIMISM = "10",
|
|
14
|
+
FLARE = "14",
|
|
15
|
+
SONGBIRD = "19",
|
|
16
|
+
ELASTOS = "20",
|
|
17
|
+
KARDIA = "24",
|
|
18
|
+
CRONOS = "25",
|
|
19
|
+
RSK = "30",
|
|
20
|
+
TELOS = "40",
|
|
21
|
+
LUKSO = "42",
|
|
22
|
+
CRAB = "44",
|
|
23
|
+
DARWINIA = "46",
|
|
24
|
+
XDC = "50",
|
|
25
|
+
CSC = "52",
|
|
26
|
+
ZYX = "55",
|
|
27
|
+
BINANCE = "56",
|
|
28
|
+
BINANCE_TESTNET = "97",
|
|
29
|
+
SYSCOIN = "57",
|
|
30
|
+
GOCHAIN = "60",
|
|
31
|
+
ETHEREUMCLASSIC = "61",
|
|
32
|
+
OKEXCHAIN = "66",
|
|
33
|
+
HOO = "70",
|
|
34
|
+
METER = "82",
|
|
35
|
+
NOVA_NETWORK = "87",
|
|
36
|
+
TOMOCHAIN = "88",
|
|
37
|
+
BITKUB = "96",
|
|
38
|
+
XDAI = "100",
|
|
39
|
+
VELAS = "106",
|
|
40
|
+
THUNDERCORE = "108",
|
|
41
|
+
ENULS = "119",
|
|
42
|
+
FUSE = "122",
|
|
43
|
+
HECO = "128",
|
|
44
|
+
UNICHAIN = "130",
|
|
45
|
+
POLYGON = "137",
|
|
46
|
+
SONIC = "146",
|
|
47
|
+
SHIMMER_EVM = "148",
|
|
48
|
+
RBN = "151",
|
|
49
|
+
OMNI = "166",
|
|
50
|
+
MANTA = "169",
|
|
51
|
+
HSK = "177",
|
|
52
|
+
WATER = "181",
|
|
53
|
+
XLAYER = "196",
|
|
54
|
+
XDAIARB = "200",
|
|
55
|
+
OP_BNB = "204",
|
|
56
|
+
VINUCHAIN = "207",
|
|
57
|
+
ENERGYWEB = "246",
|
|
58
|
+
OASYS = "248",
|
|
59
|
+
FANTOM = "250",
|
|
60
|
+
FRAXTAL = "252",
|
|
61
|
+
HPB = "269",
|
|
62
|
+
BOBA = "288",
|
|
63
|
+
OMAX = "311",
|
|
64
|
+
FILECOIN = "314",
|
|
65
|
+
KUCOIN = "321",
|
|
66
|
+
ZKSYNC_ERA = "324",
|
|
67
|
+
SHIDEN = "336",
|
|
68
|
+
THETA = "361",
|
|
69
|
+
PULSE = "369",
|
|
70
|
+
CRONOS_ZKEVM = "388",
|
|
71
|
+
SX = "416",
|
|
72
|
+
AREON = "463",
|
|
73
|
+
WC = "480",
|
|
74
|
+
CANDLE = "534",
|
|
75
|
+
ROLLUX = "570",
|
|
76
|
+
ASTAR = "592",
|
|
77
|
+
REDSTONE = "690",
|
|
78
|
+
MATCHAIN = "698",
|
|
79
|
+
CALLISTO = "820",
|
|
80
|
+
TARA = "841",
|
|
81
|
+
WANCHAIN = "888",
|
|
82
|
+
LYRA_CHAIN = "957",
|
|
83
|
+
BIFROST = "996",
|
|
84
|
+
CONFLUX = "1030",
|
|
85
|
+
METIS = "1088",
|
|
86
|
+
DYMENSION = "1100",
|
|
87
|
+
POLYGON_ZKEVM = "1101",
|
|
88
|
+
CORE = "1116",
|
|
89
|
+
LISK = "1135",
|
|
90
|
+
ULTRON = "1231",
|
|
91
|
+
STEP = "1234",
|
|
92
|
+
MOONBEAM = "1284",
|
|
93
|
+
MOONRIVER = "1285",
|
|
94
|
+
SEI = "1329",
|
|
95
|
+
LIVING_ASSETS_MAINNET = "1440",
|
|
96
|
+
STY = "1514",
|
|
97
|
+
TENET = "1559",
|
|
98
|
+
GRAVITY = "1625",
|
|
99
|
+
REYA_NETWORK = "1729",
|
|
100
|
+
SONEIUM = "1868",
|
|
101
|
+
SWELLCHAIN = "1923",
|
|
102
|
+
ONUS = "1975",
|
|
103
|
+
HUBBLENET = "1992",
|
|
104
|
+
SANKO = "1996",
|
|
105
|
+
DOGECHAIN = "2000",
|
|
106
|
+
MILKOMEDA = "2001",
|
|
107
|
+
MILKOMEDA_A1 = "2002",
|
|
108
|
+
KAVA = "2222",
|
|
109
|
+
SOMA = "2332",
|
|
110
|
+
KARAK = "2410",
|
|
111
|
+
ABSTRACT = "2741",
|
|
112
|
+
ABSTRACT_TESTNET = "11124",
|
|
113
|
+
MORPH = "2818",
|
|
114
|
+
CROSSFI = "4158",
|
|
115
|
+
BEAM = "4337",
|
|
116
|
+
IOTEX = "4689",
|
|
117
|
+
MANTLE = "5000",
|
|
118
|
+
XLC = "5050",
|
|
119
|
+
NAHMII = "5551",
|
|
120
|
+
BOUNCEBIT = "6001",
|
|
121
|
+
TOMBCHAIN = "6969",
|
|
122
|
+
ZETACHAIN = "7000",
|
|
123
|
+
PLANQ = "7070",
|
|
124
|
+
BITROCK = "7171",
|
|
125
|
+
XSAT = "7200",
|
|
126
|
+
CYETH = "7560",
|
|
127
|
+
CANTO = "7700",
|
|
128
|
+
KLAYTN = "8217",
|
|
129
|
+
THAT = "8428",
|
|
130
|
+
BASE = "8453",
|
|
131
|
+
HELA = "8668",
|
|
132
|
+
IOTAEVM = "8822",
|
|
133
|
+
JBC = "8899",
|
|
134
|
+
EVMOS = "9001",
|
|
135
|
+
CARBON = "9790",
|
|
136
|
+
SMARTBCH = "10000",
|
|
137
|
+
ARTELA = "11820",
|
|
138
|
+
IMMUTABLE_ZKEVM = "13371",
|
|
139
|
+
LOOP = "15551",
|
|
140
|
+
GENESYS = "16507",
|
|
141
|
+
EOS_EVM = "17777",
|
|
142
|
+
MAP_PROTOCOL = "22776",
|
|
143
|
+
SAPPHIRE = "23294",
|
|
144
|
+
BITGERT = "32520",
|
|
145
|
+
FUSION = "32659",
|
|
146
|
+
ZILLIQA = "32769",
|
|
147
|
+
APECHAIN = "33139",
|
|
148
|
+
EDU_CHAIN = "41923",
|
|
149
|
+
ARBITRUM = "42161",
|
|
150
|
+
ARBITRUM_TESTNET_GOERLI = "421613",
|
|
151
|
+
ARBITRUM_TESTNET_SEPOLIA = "421614",
|
|
152
|
+
ARBITRUM_NOVA = "42170",
|
|
153
|
+
CELO = "42220",
|
|
154
|
+
OASIS = "42262",
|
|
155
|
+
ASSETCHAIN = "42420",
|
|
156
|
+
ETHERLINK = "42793",
|
|
157
|
+
AVALANCHE = "43114",
|
|
158
|
+
REI = "47805",
|
|
159
|
+
ZIRCUIT = "48900",
|
|
160
|
+
SOPHON = "50104",
|
|
161
|
+
ETN = "52014",
|
|
162
|
+
SUPERPOSITION = "55244",
|
|
163
|
+
REICHAIN = "55555",
|
|
164
|
+
BOBA_BNB = "56288",
|
|
165
|
+
INK = "57073",
|
|
166
|
+
LINEA = "59144",
|
|
167
|
+
BOB = "60808",
|
|
168
|
+
GODWOKEN = "71402",
|
|
169
|
+
BERACHAIN = "80094",
|
|
170
|
+
BLAST = "81457",
|
|
171
|
+
CHILIZ = "88888",
|
|
172
|
+
STRATIS = "105105",
|
|
173
|
+
REAL = "111188",
|
|
174
|
+
ODYSSEY = "153153",
|
|
175
|
+
TAIKO = "167000",
|
|
176
|
+
BITLAYER = "200901",
|
|
177
|
+
HYDRATION = "222222",
|
|
178
|
+
PAREX = "322202",
|
|
179
|
+
POLIS = "333999",
|
|
180
|
+
KEKCHAIN = "420420",
|
|
181
|
+
SCROLL = "534352",
|
|
182
|
+
ZERO_NETWORK = "543210",
|
|
183
|
+
ZKLINK_NOVA = "810180",
|
|
184
|
+
VISION = "888888",
|
|
185
|
+
SAAKURU = "7225878",
|
|
186
|
+
ZORA = "7777777",
|
|
187
|
+
CORN = "21000000",
|
|
188
|
+
NEON = "245022934",
|
|
189
|
+
LUMIA = "994873017",
|
|
190
|
+
AURORA = "1313161554",
|
|
191
|
+
HARMONY = "1666600000",
|
|
192
|
+
PALM = "11297108109",
|
|
193
|
+
ZENIQ = "383414847825",
|
|
194
|
+
CURIO = "836542336838601",
|
|
195
|
+
MODE = "34443",
|
|
196
|
+
SOLANA = "900900900",
|
|
197
|
+
SOLANA_TESTNET = "901901901",
|
|
198
|
+
SOLANA_DEVNET = "902902902"
|
|
199
|
+
}
|
|
200
|
+
declare enum ChainNamespace {
|
|
201
|
+
EVM = "EVM",
|
|
202
|
+
SOLANA = "SOL"
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
interface TradeToken {
|
|
206
|
+
address: string;
|
|
207
|
+
symbol: string;
|
|
208
|
+
name?: string;
|
|
209
|
+
image?: string;
|
|
210
|
+
amount: string;
|
|
211
|
+
amountInUsd?: string;
|
|
212
|
+
priceInUsd?: string;
|
|
213
|
+
}
|
|
214
|
+
interface TradeDex {
|
|
215
|
+
name?: string;
|
|
216
|
+
image?: string;
|
|
217
|
+
protocolFamily?: string;
|
|
218
|
+
programAddress?: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Trade Activity
|
|
222
|
+
*/
|
|
223
|
+
interface TradeActivity {
|
|
224
|
+
chain: Chain;
|
|
225
|
+
walletAddress: string;
|
|
226
|
+
txHash: string;
|
|
227
|
+
type: "buy" | "sell";
|
|
228
|
+
from: TradeToken;
|
|
229
|
+
to: TradeToken;
|
|
230
|
+
dex?: TradeDex;
|
|
231
|
+
poolAddress?: string;
|
|
232
|
+
status: "pending" | "success" | "failed";
|
|
233
|
+
time: Date;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
interface Token {
|
|
237
|
+
/**
|
|
238
|
+
* chain id.
|
|
239
|
+
*/
|
|
240
|
+
chain: Chain;
|
|
241
|
+
/**
|
|
242
|
+
* token name, e.g. "Ethereum", "Solana", etc.
|
|
243
|
+
*/
|
|
244
|
+
name: string;
|
|
245
|
+
/**
|
|
246
|
+
* token symbol, e.g. "ETH", "SOL", etc.
|
|
247
|
+
*/
|
|
248
|
+
symbol: string;
|
|
249
|
+
/**
|
|
250
|
+
* token address.
|
|
251
|
+
*/
|
|
252
|
+
address: string;
|
|
253
|
+
/**
|
|
254
|
+
* token decimals.
|
|
255
|
+
*/
|
|
256
|
+
decimals: number;
|
|
257
|
+
/**
|
|
258
|
+
* token avatar image url.
|
|
259
|
+
*/
|
|
260
|
+
image?: string;
|
|
261
|
+
/**
|
|
262
|
+
* token description.
|
|
263
|
+
*/
|
|
264
|
+
description?: string;
|
|
265
|
+
/**
|
|
266
|
+
* token creators.
|
|
267
|
+
*/
|
|
268
|
+
creators?: Array<TokenCreator>;
|
|
269
|
+
/**
|
|
270
|
+
* token launch info.
|
|
271
|
+
*/
|
|
272
|
+
launchedFrom?: TokenLaunchedFrom;
|
|
273
|
+
/**
|
|
274
|
+
* token migrate progress, range is 0-100.
|
|
275
|
+
*/
|
|
276
|
+
migrateProgress?: string;
|
|
277
|
+
/**
|
|
278
|
+
* token migrate info.
|
|
279
|
+
*/
|
|
280
|
+
migratedTo?: TokenMigratedTo;
|
|
281
|
+
/**
|
|
282
|
+
* token social medias.
|
|
283
|
+
*/
|
|
284
|
+
socialMedias?: TokenSocialMedias;
|
|
285
|
+
/**
|
|
286
|
+
* token stats.
|
|
287
|
+
*/
|
|
288
|
+
stats?: TokenStats;
|
|
289
|
+
/**
|
|
290
|
+
* token market data.
|
|
291
|
+
*/
|
|
292
|
+
marketData?: TokenMarketData;
|
|
293
|
+
/**
|
|
294
|
+
* token liquidity pools
|
|
295
|
+
*/
|
|
296
|
+
liquidities?: Array<TokenLiquidity>;
|
|
297
|
+
/**
|
|
298
|
+
* token security.
|
|
299
|
+
*/
|
|
300
|
+
security?: TokenSecurity;
|
|
301
|
+
/**
|
|
302
|
+
* token tags.
|
|
303
|
+
*/
|
|
304
|
+
tags?: Array<string>;
|
|
305
|
+
/**
|
|
306
|
+
* token create time.
|
|
307
|
+
*/
|
|
308
|
+
createdAt?: Date;
|
|
309
|
+
}
|
|
310
|
+
interface TokenHistoryPriceObject {
|
|
311
|
+
time: string;
|
|
312
|
+
value: number;
|
|
313
|
+
}
|
|
314
|
+
interface TokenCreator {
|
|
315
|
+
/**
|
|
316
|
+
* token creator's wallet address.
|
|
317
|
+
*/
|
|
318
|
+
address?: string;
|
|
319
|
+
/**
|
|
320
|
+
* token creator's share percentage, range is 0-100.
|
|
321
|
+
*/
|
|
322
|
+
share?: number;
|
|
323
|
+
/**
|
|
324
|
+
* whether the token creator is verified.
|
|
325
|
+
*/
|
|
326
|
+
isVerified?: boolean;
|
|
327
|
+
}
|
|
328
|
+
interface TokenLaunchedFrom {
|
|
329
|
+
/**
|
|
330
|
+
* token launch program address.
|
|
331
|
+
*/
|
|
332
|
+
programAddress?: string;
|
|
333
|
+
/**
|
|
334
|
+
* token launch protocol family.
|
|
335
|
+
*/
|
|
336
|
+
protocolFamily?: string;
|
|
337
|
+
}
|
|
338
|
+
interface TokenMigratedTo {
|
|
339
|
+
/**
|
|
340
|
+
* token migrate program address.
|
|
341
|
+
*/
|
|
342
|
+
programAddress?: string;
|
|
343
|
+
/**
|
|
344
|
+
* token migrate protocol family.
|
|
345
|
+
*/
|
|
346
|
+
protocolFamily?: string;
|
|
347
|
+
/**
|
|
348
|
+
* token migrate pool address.
|
|
349
|
+
*/
|
|
350
|
+
poolAddress?: string;
|
|
351
|
+
/**
|
|
352
|
+
* token migrate time.
|
|
353
|
+
*/
|
|
354
|
+
migratedAt?: Date;
|
|
355
|
+
}
|
|
356
|
+
interface TokenSocialMedias {
|
|
357
|
+
/**
|
|
358
|
+
* token twitter url.
|
|
359
|
+
*/
|
|
360
|
+
twitter?: string;
|
|
361
|
+
/**
|
|
362
|
+
* token telegram url.
|
|
363
|
+
*/
|
|
364
|
+
telegram?: string;
|
|
365
|
+
/**
|
|
366
|
+
* token website url.
|
|
367
|
+
*/
|
|
368
|
+
website?: string;
|
|
369
|
+
/**
|
|
370
|
+
* token tiktok url.
|
|
371
|
+
*/
|
|
372
|
+
tiktok?: string;
|
|
373
|
+
/**
|
|
374
|
+
* token discord url.
|
|
375
|
+
*/
|
|
376
|
+
discord?: string;
|
|
377
|
+
/**
|
|
378
|
+
* token facebook url.
|
|
379
|
+
*/
|
|
380
|
+
facebook?: string;
|
|
381
|
+
/**
|
|
382
|
+
* token github url.
|
|
383
|
+
*/
|
|
384
|
+
github?: string;
|
|
385
|
+
/**
|
|
386
|
+
* token instagram url.
|
|
387
|
+
*/
|
|
388
|
+
instagram?: string;
|
|
389
|
+
/**
|
|
390
|
+
* token linkedin url.
|
|
391
|
+
*/
|
|
392
|
+
linkedin?: string;
|
|
393
|
+
/**
|
|
394
|
+
* token medium url.
|
|
395
|
+
*/
|
|
396
|
+
medium?: string;
|
|
397
|
+
/**
|
|
398
|
+
* token reddit url.
|
|
399
|
+
*/
|
|
400
|
+
reddit?: string;
|
|
401
|
+
/**
|
|
402
|
+
* token youtube url.
|
|
403
|
+
*/
|
|
404
|
+
youtube?: string;
|
|
405
|
+
/**
|
|
406
|
+
* token bitbucket url.
|
|
407
|
+
*/
|
|
408
|
+
bitbucket?: string;
|
|
409
|
+
}
|
|
410
|
+
interface TokenStats {
|
|
411
|
+
/**
|
|
412
|
+
* token stats by 1m timeframe.
|
|
413
|
+
*/
|
|
414
|
+
"1m"?: TokenStatsByTimeframe;
|
|
415
|
+
/**
|
|
416
|
+
* token stats by 5m timeframe.
|
|
417
|
+
*/
|
|
418
|
+
"5m"?: TokenStatsByTimeframe;
|
|
419
|
+
/**
|
|
420
|
+
* token stats by 15m timeframe.
|
|
421
|
+
*/
|
|
422
|
+
"15m"?: TokenStatsByTimeframe;
|
|
423
|
+
/**
|
|
424
|
+
* token stats by 30m timeframe.
|
|
425
|
+
*/
|
|
426
|
+
"30m"?: TokenStatsByTimeframe;
|
|
427
|
+
/**
|
|
428
|
+
* token stats by 1h timeframe.
|
|
429
|
+
*/
|
|
430
|
+
"1h"?: TokenStatsByTimeframe;
|
|
431
|
+
/**
|
|
432
|
+
* token stats by 4h timeframe.
|
|
433
|
+
*/
|
|
434
|
+
"4h"?: TokenStatsByTimeframe;
|
|
435
|
+
/**
|
|
436
|
+
* token stats by 24h timeframe.
|
|
437
|
+
*/
|
|
438
|
+
"24h"?: TokenStatsByTimeframe;
|
|
439
|
+
}
|
|
440
|
+
interface TokenStatsByTimeframe {
|
|
441
|
+
/**
|
|
442
|
+
* buy txs count
|
|
443
|
+
*/
|
|
444
|
+
buys?: number;
|
|
445
|
+
/**
|
|
446
|
+
* sell txs count
|
|
447
|
+
*/
|
|
448
|
+
sells?: number;
|
|
449
|
+
/**
|
|
450
|
+
* txs count
|
|
451
|
+
*/
|
|
452
|
+
trades?: number;
|
|
453
|
+
/**
|
|
454
|
+
* buy addresses count
|
|
455
|
+
*/
|
|
456
|
+
buyers?: number;
|
|
457
|
+
/**
|
|
458
|
+
* sell addresses count
|
|
459
|
+
*/
|
|
460
|
+
sellers?: number;
|
|
461
|
+
/**
|
|
462
|
+
* trade addresses count
|
|
463
|
+
*/
|
|
464
|
+
traders?: number;
|
|
465
|
+
/**
|
|
466
|
+
* buy volumes in quote token
|
|
467
|
+
*/
|
|
468
|
+
buyVolumes?: string;
|
|
469
|
+
/**
|
|
470
|
+
* sell volumes in quote token
|
|
471
|
+
*/
|
|
472
|
+
sellVolumes?: string;
|
|
473
|
+
/**
|
|
474
|
+
* total volumes in quote token
|
|
475
|
+
*/
|
|
476
|
+
volumes?: string;
|
|
477
|
+
/**
|
|
478
|
+
* buy volumes in usd
|
|
479
|
+
*/
|
|
480
|
+
buyVolumesInUsd?: string;
|
|
481
|
+
/**
|
|
482
|
+
* sell volumes in usd
|
|
483
|
+
*/
|
|
484
|
+
sellVolumesInUsd?: string;
|
|
485
|
+
/**
|
|
486
|
+
* total volumes in usd
|
|
487
|
+
*/
|
|
488
|
+
volumesInUsd?: string;
|
|
489
|
+
/**
|
|
490
|
+
* open price in usd
|
|
491
|
+
*/
|
|
492
|
+
openPriceInUsd?: string;
|
|
493
|
+
/**
|
|
494
|
+
* close price in usd
|
|
495
|
+
*/
|
|
496
|
+
closePriceInUsd?: string;
|
|
497
|
+
/**
|
|
498
|
+
* high price in usd
|
|
499
|
+
*/
|
|
500
|
+
highPriceInUsd?: string;
|
|
501
|
+
/**
|
|
502
|
+
* low price in usd
|
|
503
|
+
*/
|
|
504
|
+
lowPriceInUsd?: string;
|
|
505
|
+
/**
|
|
506
|
+
* price in usd
|
|
507
|
+
*/
|
|
508
|
+
priceInUsd?: string;
|
|
509
|
+
/**
|
|
510
|
+
* price change %
|
|
511
|
+
*/
|
|
512
|
+
priceChange?: string;
|
|
513
|
+
}
|
|
514
|
+
interface TokenMarketData {
|
|
515
|
+
/**
|
|
516
|
+
* total supply
|
|
517
|
+
*/
|
|
518
|
+
totalSupply?: string;
|
|
519
|
+
/**
|
|
520
|
+
* market cap in quote token
|
|
521
|
+
*/
|
|
522
|
+
marketCap?: string;
|
|
523
|
+
/**
|
|
524
|
+
* market cap in usd
|
|
525
|
+
*/
|
|
526
|
+
marketCapInUsd?: string;
|
|
527
|
+
/**
|
|
528
|
+
* price in quote token
|
|
529
|
+
*/
|
|
530
|
+
price?: string;
|
|
531
|
+
/**
|
|
532
|
+
* price in usd
|
|
533
|
+
*/
|
|
534
|
+
priceInUsd?: string;
|
|
535
|
+
/**
|
|
536
|
+
* tvl in quote token
|
|
537
|
+
*/
|
|
538
|
+
tvl?: string;
|
|
539
|
+
/**
|
|
540
|
+
* tvl in usd
|
|
541
|
+
*/
|
|
542
|
+
tvlInUsd?: string;
|
|
543
|
+
/**
|
|
544
|
+
* holders count
|
|
545
|
+
*/
|
|
546
|
+
holders?: number;
|
|
547
|
+
/**
|
|
548
|
+
* creators count
|
|
549
|
+
*/
|
|
550
|
+
creators?: number;
|
|
551
|
+
/**
|
|
552
|
+
* top 10 total holdings
|
|
553
|
+
*/
|
|
554
|
+
top10Holdings?: string;
|
|
555
|
+
/**
|
|
556
|
+
* top 10 holdings ratio
|
|
557
|
+
*/
|
|
558
|
+
top10Ratio?: string;
|
|
559
|
+
/**
|
|
560
|
+
* top 100 total holdings
|
|
561
|
+
*/
|
|
562
|
+
top100Holdings?: string;
|
|
563
|
+
/**
|
|
564
|
+
* top 100 holdings ratio
|
|
565
|
+
*/
|
|
566
|
+
top100Ratio?: string;
|
|
567
|
+
/**
|
|
568
|
+
* creators total holdings
|
|
569
|
+
*/
|
|
570
|
+
creatorsHoldings?: string;
|
|
571
|
+
/**
|
|
572
|
+
* creators holdings ratio
|
|
573
|
+
*/
|
|
574
|
+
creatorsRatio?: string;
|
|
575
|
+
}
|
|
576
|
+
interface TokenLiquidity {
|
|
577
|
+
/**
|
|
578
|
+
* pool avatar image
|
|
579
|
+
*/
|
|
580
|
+
image?: string;
|
|
581
|
+
/**
|
|
582
|
+
* pair token address.
|
|
583
|
+
*/
|
|
584
|
+
pairAddress?: string;
|
|
585
|
+
/**
|
|
586
|
+
* pool address.
|
|
587
|
+
*/
|
|
588
|
+
poolAddress?: string;
|
|
589
|
+
/**
|
|
590
|
+
* program address.
|
|
591
|
+
*/
|
|
592
|
+
programAddress?: string;
|
|
593
|
+
/**
|
|
594
|
+
* protocol name.
|
|
595
|
+
*/
|
|
596
|
+
protocolName?: string;
|
|
597
|
+
/**
|
|
598
|
+
* protocol family.
|
|
599
|
+
*/
|
|
600
|
+
protocolFamily?: string;
|
|
601
|
+
/**
|
|
602
|
+
* tvl in quote token.
|
|
603
|
+
*/
|
|
604
|
+
tvl?: string;
|
|
605
|
+
/**
|
|
606
|
+
* tvl in usd.
|
|
607
|
+
*/
|
|
608
|
+
tvlInUsd?: string;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* TODO: more security checks
|
|
612
|
+
*/
|
|
613
|
+
interface TokenSecurity {
|
|
614
|
+
/**
|
|
615
|
+
* whether the token has transfer fee.
|
|
616
|
+
*/
|
|
617
|
+
hasTransferFee?: boolean;
|
|
618
|
+
/**
|
|
619
|
+
* whether the token transfer fee is upgradable.
|
|
620
|
+
*/
|
|
621
|
+
isTransferFeeUpgradable?: boolean;
|
|
622
|
+
/**
|
|
623
|
+
* whether the token is transferable.
|
|
624
|
+
*/
|
|
625
|
+
isTransferable?: boolean;
|
|
626
|
+
/**
|
|
627
|
+
* whether the token is freezable.
|
|
628
|
+
*/
|
|
629
|
+
isFreezable?: boolean;
|
|
630
|
+
/**
|
|
631
|
+
* whether the token is closable.
|
|
632
|
+
*/
|
|
633
|
+
isClosable?: boolean;
|
|
634
|
+
}
|
|
635
|
+
type TokenResolution = "1s" | "15s" | "30s" | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "12h" | "24h";
|
|
636
|
+
interface TokenCandle {
|
|
637
|
+
/**
|
|
638
|
+
* open price in usd
|
|
639
|
+
*/
|
|
640
|
+
open: string;
|
|
641
|
+
/**
|
|
642
|
+
* close price in usd
|
|
643
|
+
*/
|
|
644
|
+
close: string;
|
|
645
|
+
/**
|
|
646
|
+
* high price in usd
|
|
647
|
+
*/
|
|
648
|
+
high: string;
|
|
649
|
+
/**
|
|
650
|
+
* low price in usd
|
|
651
|
+
*/
|
|
652
|
+
low: string;
|
|
653
|
+
/**
|
|
654
|
+
* volume in usd
|
|
655
|
+
*/
|
|
656
|
+
volume: string;
|
|
657
|
+
/**
|
|
658
|
+
* resolution
|
|
659
|
+
*/
|
|
660
|
+
resolution: TokenResolution;
|
|
661
|
+
/**
|
|
662
|
+
* timestamp
|
|
663
|
+
*/
|
|
664
|
+
timestamp: Date;
|
|
665
|
+
}
|
|
666
|
+
interface TokenHolder {
|
|
667
|
+
/**
|
|
668
|
+
* holder wallet address
|
|
669
|
+
*/
|
|
670
|
+
address: string;
|
|
671
|
+
/**
|
|
672
|
+
* holdings amount in token
|
|
673
|
+
*/
|
|
674
|
+
amount: string;
|
|
675
|
+
/**
|
|
676
|
+
* holdings amount in usd
|
|
677
|
+
*/
|
|
678
|
+
amountInUsd: string;
|
|
679
|
+
/**
|
|
680
|
+
* holdings ratio, range is 0-100
|
|
681
|
+
*/
|
|
682
|
+
ratio: string;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Portfolio PNL
|
|
687
|
+
*/
|
|
688
|
+
interface PortfolioPnl {
|
|
689
|
+
openTime?: Date;
|
|
690
|
+
closeTime?: Date;
|
|
691
|
+
buys?: number;
|
|
692
|
+
buyVolumes?: string;
|
|
693
|
+
buyVolumesInUsd?: string;
|
|
694
|
+
buyAvgPriceInUsd?: string;
|
|
695
|
+
sells?: number;
|
|
696
|
+
sellVolumes?: string;
|
|
697
|
+
sellVolumesInUsd?: string;
|
|
698
|
+
sellAvgPriceInUsd?: string;
|
|
699
|
+
unrealizedProfitInUsd?: string;
|
|
700
|
+
unrealizedProfitRatio?: string;
|
|
701
|
+
realizedProfitInUsd?: string;
|
|
702
|
+
realizedProfitRatio?: string;
|
|
703
|
+
totalProfitInUsd?: string;
|
|
704
|
+
totalProfitRatio?: string;
|
|
705
|
+
}
|
|
706
|
+
interface Portfolio {
|
|
707
|
+
chain: Chain;
|
|
708
|
+
address: string;
|
|
709
|
+
name: string;
|
|
710
|
+
symbol: string;
|
|
711
|
+
image?: string;
|
|
712
|
+
price: string;
|
|
713
|
+
priceInUsd: string;
|
|
714
|
+
priceChangeIn24h?: string;
|
|
715
|
+
amount: string;
|
|
716
|
+
amountInUsd: string;
|
|
717
|
+
pnl?: PortfolioPnl;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Wallet portfolios
|
|
721
|
+
*/
|
|
722
|
+
interface WalletPortfolios {
|
|
723
|
+
chain: Chain;
|
|
724
|
+
address: string;
|
|
725
|
+
balanceInUsd: string;
|
|
726
|
+
profitInUsd: string;
|
|
727
|
+
portfolios: Array<Portfolio>;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
declare namespace API {
|
|
731
|
+
/**
|
|
732
|
+
* Cursor list result data
|
|
733
|
+
*/
|
|
734
|
+
interface CursorList<T> {
|
|
735
|
+
startCursor?: string;
|
|
736
|
+
endCursor?: string;
|
|
737
|
+
hasPrev?: boolean;
|
|
738
|
+
hasNext?: boolean;
|
|
739
|
+
data: Array<T>;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Cursor list query options
|
|
743
|
+
*/
|
|
744
|
+
interface CursorListOptions {
|
|
745
|
+
cursor?: string;
|
|
746
|
+
limit?: number;
|
|
747
|
+
direction?: "next" | "prev";
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Options for getting token candles
|
|
751
|
+
*/
|
|
752
|
+
interface GetTokenCandlesOptions {
|
|
753
|
+
after?: Date;
|
|
754
|
+
before?: Date;
|
|
755
|
+
limit?: number;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Token field for filtering
|
|
759
|
+
*/
|
|
760
|
+
type TokenFieldOption = "price" | "priceChange1m" | "priceChange5m" | "priceChange15m" | "priceChange30m" | "priceChange1h" | "priceChange4h" | "priceChange24h" | "marketCap" | "tvl" | "top10Holdings" | "top10Ratio" | "top100Holdings" | "top100Ratio" | "holders" | "creatorsHoldings" | "creatorsRatio" | "buys1m" | "buys5m" | "buys15m" | "buys30m" | "buys1h" | "buys4h" | "buys24h" | "sells1m" | "sells5m" | "sells15m" | "sells30m" | "sells1h" | "sells4h" | "sells24h" | "trades1m" | "trades5m" | "trades15m" | "trades30m" | "trades1h" | "trades4h" | "trades24h" | "traders1m" | "traders5m" | "traders15m" | "traders30m" | "traders1h" | "traders4h" | "traders24h" | "volumes1m" | "volumes5m" | "volumes15m" | "volumes30m" | "volumes1h" | "volumes4h" | "volumes24h" | "launchedFromProtocolFamily" | "migratedToProtocolFamily" | "tag" | "createdAt" | (string & {});
|
|
761
|
+
/**
|
|
762
|
+
* Token filter option
|
|
763
|
+
*/
|
|
764
|
+
interface TokenFilterOption {
|
|
765
|
+
field: TokenFieldOption;
|
|
766
|
+
operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "in" | "nin" | "contains" | "notContains" | "startsWith" | "endsWith" | "isNotNull" | "isNull";
|
|
767
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Options for getting token list
|
|
771
|
+
*/
|
|
772
|
+
interface GetTokenListOptions {
|
|
773
|
+
sortBy?: TokenFieldOption;
|
|
774
|
+
sortDirection?: "asc" | "desc";
|
|
775
|
+
filters?: Array<TokenFilterOption>;
|
|
776
|
+
keywords?: Array<string>;
|
|
777
|
+
excludeKeywords?: Array<string>;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Options for searching tokens
|
|
781
|
+
*/
|
|
782
|
+
interface SearchTokensOptions extends CursorListOptions {
|
|
783
|
+
chains?: Array<Chain>;
|
|
784
|
+
keyword?: string;
|
|
785
|
+
filters?: Array<TokenFilterOption>;
|
|
786
|
+
sortBy?: TokenFieldOption;
|
|
787
|
+
sortDirection?: "asc" | "desc";
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Search token cursor list
|
|
791
|
+
*/
|
|
792
|
+
interface SearchTokenCursorList extends CursorList<Token> {
|
|
793
|
+
total?: number;
|
|
794
|
+
extra?: any;
|
|
795
|
+
}
|
|
796
|
+
enum SwapMode {
|
|
797
|
+
EXACT_IN = "ExactIn",
|
|
798
|
+
EXACT_OUT = "ExactOut"
|
|
799
|
+
}
|
|
800
|
+
interface SwapParams {
|
|
801
|
+
chain: Chain;
|
|
802
|
+
userAddress: string;
|
|
803
|
+
input: string;
|
|
804
|
+
output: string;
|
|
805
|
+
mode: SwapMode;
|
|
806
|
+
amount: string;
|
|
807
|
+
slippage?: number;
|
|
808
|
+
priorityFee?: string;
|
|
809
|
+
tipFee?: string;
|
|
810
|
+
isAntiMev?: boolean;
|
|
811
|
+
}
|
|
812
|
+
interface SwapRoutePlan {
|
|
813
|
+
name: string;
|
|
814
|
+
input: string;
|
|
815
|
+
inputAmount: string;
|
|
816
|
+
output: string;
|
|
817
|
+
outputAmount: string;
|
|
818
|
+
feeQuote?: string;
|
|
819
|
+
feeAmount?: string;
|
|
820
|
+
extra?: any;
|
|
821
|
+
}
|
|
822
|
+
interface SwapRoute {
|
|
823
|
+
serializedTx: string;
|
|
824
|
+
plans: Array<SwapRoutePlan>;
|
|
825
|
+
extra?: any;
|
|
826
|
+
}
|
|
827
|
+
interface SendTxParams {
|
|
828
|
+
chain: Chain;
|
|
829
|
+
serializedTx: string;
|
|
830
|
+
extra?: any;
|
|
831
|
+
}
|
|
832
|
+
interface SendTxResult {
|
|
833
|
+
txHash: string;
|
|
834
|
+
extra?: any;
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Options for getting trade activities
|
|
838
|
+
*/
|
|
839
|
+
interface GetTradeActivitiesOptions extends CursorListOptions {
|
|
840
|
+
before?: Date;
|
|
841
|
+
after?: Date;
|
|
842
|
+
beforeBlockHeight?: number;
|
|
843
|
+
afterBlockHeight?: number;
|
|
844
|
+
type?: "buy" | "sell";
|
|
845
|
+
poolAddress?: string;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* API client interface
|
|
849
|
+
*/
|
|
850
|
+
interface IClient {
|
|
851
|
+
/**
|
|
852
|
+
* fetch token info
|
|
853
|
+
* @param chain chain id
|
|
854
|
+
* @param address token address
|
|
855
|
+
* @returns token info
|
|
856
|
+
*/
|
|
857
|
+
getToken(chain: Chain, address: string): Promise<Token>;
|
|
858
|
+
/**
|
|
859
|
+
* fetch token infos in batch
|
|
860
|
+
* @param chain chain id
|
|
861
|
+
* @param addresses token addresses
|
|
862
|
+
* @returns token infos
|
|
863
|
+
*/
|
|
864
|
+
getTokens(chain: Chain, addresses: Array<string>): Promise<Array<Token>>;
|
|
865
|
+
/**
|
|
866
|
+
* fetch token candles
|
|
867
|
+
* @param chain chain id
|
|
868
|
+
* @param address token address
|
|
869
|
+
* @param resolution token resolution
|
|
870
|
+
* @param options optional query options
|
|
871
|
+
* @returns token candles
|
|
872
|
+
*/
|
|
873
|
+
getTokenCandles(chain: Chain, address: string, resolution: TokenResolution, options?: GetTokenCandlesOptions): Promise<Array<TokenCandle>>;
|
|
874
|
+
/**
|
|
875
|
+
* fetch token security
|
|
876
|
+
* @param chain chain id
|
|
877
|
+
* @param address token address
|
|
878
|
+
* @returns token security
|
|
879
|
+
*/
|
|
880
|
+
getTokenSecurity(chain: Chain, address: string): Promise<TokenSecurity>;
|
|
881
|
+
/**
|
|
882
|
+
* fetch token stats
|
|
883
|
+
* @param chain chain id
|
|
884
|
+
* @param address token address
|
|
885
|
+
* @returns token stats
|
|
886
|
+
*/
|
|
887
|
+
getTokenStats(chain: Chain, address: string): Promise<TokenStats>;
|
|
888
|
+
/**
|
|
889
|
+
* fetch token holders
|
|
890
|
+
* @param chain chain id
|
|
891
|
+
* @param address token address
|
|
892
|
+
* @param options optional query options
|
|
893
|
+
* @returns token holders
|
|
894
|
+
*/
|
|
895
|
+
getTokenHolders(chain: Chain, address: string, options?: CursorListOptions): Promise<CursorList<TokenHolder>>;
|
|
896
|
+
/**
|
|
897
|
+
* fetch token market data
|
|
898
|
+
* @param chain chain id
|
|
899
|
+
* @param address token address
|
|
900
|
+
* @returns token market data
|
|
901
|
+
*/
|
|
902
|
+
getTokenMarketData(chain: Chain, address: string): Promise<TokenMarketData>;
|
|
903
|
+
/**
|
|
904
|
+
* fetch `New` token list
|
|
905
|
+
* @param chain chain id
|
|
906
|
+
* @param options optional query options
|
|
907
|
+
* @returns `New` token list
|
|
908
|
+
*/
|
|
909
|
+
getNewTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
910
|
+
/**
|
|
911
|
+
* fetch `Final Stretch` token list
|
|
912
|
+
* @param chain chain id
|
|
913
|
+
* @param options optional query options
|
|
914
|
+
* @returns `Final Stretch` token list
|
|
915
|
+
*/
|
|
916
|
+
getFinalStretchTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
917
|
+
/**
|
|
918
|
+
* fetch `Migrated` token list
|
|
919
|
+
* @param chain chain id
|
|
920
|
+
* @param options optional query options
|
|
921
|
+
* @returns `Migrated` token list
|
|
922
|
+
*/
|
|
923
|
+
getMigratedTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
924
|
+
/**
|
|
925
|
+
* fetch `Trending` token list
|
|
926
|
+
* @param chain chain id
|
|
927
|
+
* @param timeframe query timeframe, e.g. "1m", "5m", "1h", "4h", "24h"
|
|
928
|
+
* @param options optional query options
|
|
929
|
+
* @returns `Trending` token list
|
|
930
|
+
*/
|
|
931
|
+
getTrendingTokens(chain: Chain, timeframe: "1m" | "5m" | "1h" | "4h" | "24h", options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
932
|
+
/**
|
|
933
|
+
* fetch `Stock` token list
|
|
934
|
+
* @param chain chain id
|
|
935
|
+
* @param options optional query options
|
|
936
|
+
* @returns `Stock` token list
|
|
937
|
+
*/
|
|
938
|
+
getStockTokens(chain: Chain, options?: GetTokenListOptions): Promise<Array<Token>>;
|
|
939
|
+
/**
|
|
940
|
+
* search tokens
|
|
941
|
+
* @param options optional query options
|
|
942
|
+
* @returns search token cursor list
|
|
943
|
+
*/
|
|
944
|
+
searchTokens(options?: SearchTokensOptions): Promise<SearchTokenCursorList>;
|
|
945
|
+
/**
|
|
946
|
+
* fetch swap route plans
|
|
947
|
+
* @param params swap params
|
|
948
|
+
* @returns swap route plans
|
|
949
|
+
*/
|
|
950
|
+
swapRoute(params: SwapParams): Promise<SwapRoute>;
|
|
951
|
+
/**
|
|
952
|
+
* send tx
|
|
953
|
+
* @param params send tx params
|
|
954
|
+
* @returns send tx result
|
|
955
|
+
*/
|
|
956
|
+
sendTx(params: SendTxParams): Promise<SendTxResult>;
|
|
957
|
+
/**
|
|
958
|
+
* check if tx is successful
|
|
959
|
+
* @param chain chain id
|
|
960
|
+
* @param txHash tx hash
|
|
961
|
+
* @param timeout timeout in milliseconds
|
|
962
|
+
* @returns true if tx is successful, false otherwise
|
|
963
|
+
*/
|
|
964
|
+
checkTxSuccess(chain: Chain, txHash: string, timeout?: number): Promise<boolean>;
|
|
965
|
+
/**
|
|
966
|
+
* fetch wallet portfolios
|
|
967
|
+
* @param chain chain id
|
|
968
|
+
* @param address wallet address
|
|
969
|
+
* @returns wallet portfolios
|
|
970
|
+
*/
|
|
971
|
+
getWalletPortfolios(chain: Chain, address: string): Promise<WalletPortfolios>;
|
|
972
|
+
/**
|
|
973
|
+
* fetch wallet's trade activities
|
|
974
|
+
* @param chain chain id
|
|
975
|
+
* @param address wallet address
|
|
976
|
+
* @param options optional query options
|
|
977
|
+
* @returns wallet's trade activities
|
|
978
|
+
*/
|
|
979
|
+
getWalletTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList<TradeActivity>>;
|
|
980
|
+
/**
|
|
981
|
+
* fetch token's trade activities
|
|
982
|
+
* @param chain chain id
|
|
983
|
+
* @param address token address
|
|
984
|
+
* @param options optional query options
|
|
985
|
+
* @returns token's trade activities
|
|
986
|
+
*/
|
|
987
|
+
getTokenTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList<TradeActivity>>;
|
|
988
|
+
/**
|
|
989
|
+
* get presigned upload url
|
|
990
|
+
* @returns presigned upload url
|
|
991
|
+
*/
|
|
992
|
+
getPresignedUploadUrl(): Promise<string>;
|
|
993
|
+
}
|
|
994
|
+
interface ISubscription {
|
|
995
|
+
unsubscribe(): void;
|
|
996
|
+
}
|
|
997
|
+
interface TokenSubscribed {
|
|
998
|
+
chain: Chain;
|
|
999
|
+
address: string;
|
|
1000
|
+
name?: string;
|
|
1001
|
+
symbol?: string;
|
|
1002
|
+
decimals?: number;
|
|
1003
|
+
image?: string;
|
|
1004
|
+
description?: string;
|
|
1005
|
+
socialMedias?: TokenSocialMedias;
|
|
1006
|
+
launchedFrom?: TokenLaunchedFrom;
|
|
1007
|
+
migratedTo?: TokenMigratedTo;
|
|
1008
|
+
createdAt: Date;
|
|
1009
|
+
}
|
|
1010
|
+
interface WalletPnlSubscribed {
|
|
1011
|
+
chain: Chain;
|
|
1012
|
+
address: string;
|
|
1013
|
+
balanceInUsd?: string;
|
|
1014
|
+
profitInUsd?: string;
|
|
1015
|
+
}
|
|
1016
|
+
interface PortfolioSubscribed {
|
|
1017
|
+
chain: Chain;
|
|
1018
|
+
address: string;
|
|
1019
|
+
amount?: string;
|
|
1020
|
+
}
|
|
1021
|
+
type PortfolioPnlSubscribed = PortfolioPnl & {
|
|
1022
|
+
chain: Chain;
|
|
1023
|
+
address: string;
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* Subscribe client interface
|
|
1027
|
+
*/
|
|
1028
|
+
interface ISubscribeClient {
|
|
1029
|
+
/**
|
|
1030
|
+
* Subscribe token's basic info changes
|
|
1031
|
+
* @param chain chain id
|
|
1032
|
+
* @param address token address
|
|
1033
|
+
* @param callback callback function
|
|
1034
|
+
* @returns subscription
|
|
1035
|
+
*/
|
|
1036
|
+
subscribeTokenBasic(chain: Chain, address: string, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1037
|
+
/**
|
|
1038
|
+
* Subscribe token's market data changes
|
|
1039
|
+
* @param chain chain id
|
|
1040
|
+
* @param address token address
|
|
1041
|
+
* @param callback callback function
|
|
1042
|
+
* @returns subscription
|
|
1043
|
+
*/
|
|
1044
|
+
subscribeTokenMarketData(chain: Chain, address: string, callback: (marketDatas: Array<TokenMarketData>) => void): ISubscription;
|
|
1045
|
+
/**
|
|
1046
|
+
* Subscribe token's stats changes
|
|
1047
|
+
* @param chain chain id
|
|
1048
|
+
* @param address token address
|
|
1049
|
+
* @param callback callback function
|
|
1050
|
+
* @returns subscription
|
|
1051
|
+
*/
|
|
1052
|
+
subscribeTokenStats(chain: Chain, address: string, callback: (stats: Array<TokenStats>) => void): ISubscription;
|
|
1053
|
+
/**
|
|
1054
|
+
* Subscribe token new candles
|
|
1055
|
+
* @param chain chain id
|
|
1056
|
+
* @param address token address
|
|
1057
|
+
* @param resolution token resolution
|
|
1058
|
+
* @param callback callback function
|
|
1059
|
+
* @returns subscription
|
|
1060
|
+
*/
|
|
1061
|
+
subscribeTokenCandles(chain: Chain, address: string, resolution: TokenResolution, callback: (candles: Array<TokenCandle>) => void): ISubscription;
|
|
1062
|
+
/**
|
|
1063
|
+
* Subscribe wallet's pnl changes
|
|
1064
|
+
* @param chain chain id
|
|
1065
|
+
* @param address wallet address
|
|
1066
|
+
* @param callback callback function
|
|
1067
|
+
* @returns subscription
|
|
1068
|
+
*/
|
|
1069
|
+
subscribeWalletPnl(chain: Chain, address: string, callback: (pnls: Array<WalletPnlSubscribed>) => void): ISubscription;
|
|
1070
|
+
/**
|
|
1071
|
+
* Subscribe wallet's portfolio changes
|
|
1072
|
+
* @param chain chain id
|
|
1073
|
+
* @param address wallet address
|
|
1074
|
+
* @param callback callback function
|
|
1075
|
+
* @returns subscription
|
|
1076
|
+
*/
|
|
1077
|
+
subscribeWalletPortfolios(chain: Chain, address: string, callback: (portfolios: Array<PortfolioSubscribed>) => void): ISubscription;
|
|
1078
|
+
/**
|
|
1079
|
+
* Subscribe wallet's portfolio pnl changes
|
|
1080
|
+
* @param chain chain id
|
|
1081
|
+
* @param address wallet address
|
|
1082
|
+
* @param callback callback function
|
|
1083
|
+
* @returns subscription
|
|
1084
|
+
*/
|
|
1085
|
+
subscribeWalletPortfolioPnls(chain: Chain, address: string, callback: (portfolioPnls: Array<PortfolioPnlSubscribed>) => void): ISubscription;
|
|
1086
|
+
/**
|
|
1087
|
+
* Subscribe wallet's new trade activities
|
|
1088
|
+
* @param chain chain id
|
|
1089
|
+
* @param address wallet address
|
|
1090
|
+
* @param callback callback function
|
|
1091
|
+
* @returns subscription
|
|
1092
|
+
*/
|
|
1093
|
+
subscribeWalletTradeActivities(chain: Chain, address: string, callback: (trades: Array<TradeActivity>) => void): ISubscription;
|
|
1094
|
+
/**
|
|
1095
|
+
* Subscribe token's new trade activities
|
|
1096
|
+
* @param chain chain id
|
|
1097
|
+
* @param address token address
|
|
1098
|
+
* @param callback callback function
|
|
1099
|
+
* @returns subscription
|
|
1100
|
+
*/
|
|
1101
|
+
subscribeTokenTradeActivities(chain: Chain, address: string, callback: (trades: Array<TradeActivity>) => void): ISubscription;
|
|
1102
|
+
/**
|
|
1103
|
+
* Subscribe `New` token list changes
|
|
1104
|
+
* @param chain chain id
|
|
1105
|
+
* @param callback callback function
|
|
1106
|
+
* @returns subscription
|
|
1107
|
+
*/
|
|
1108
|
+
subscribeNewTokens(chain: Chain, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1109
|
+
/**
|
|
1110
|
+
* Subscribe `New` token list's basic info changes
|
|
1111
|
+
* @param chain chain id
|
|
1112
|
+
* @param callback callback function
|
|
1113
|
+
* @returns subscription
|
|
1114
|
+
*/
|
|
1115
|
+
subscribeNewTokensBasic(chain: Chain, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1116
|
+
/**
|
|
1117
|
+
* Subscribe `New` token list's market data changes
|
|
1118
|
+
* @param chain chain id
|
|
1119
|
+
* @param callback callback function
|
|
1120
|
+
* @returns subscription
|
|
1121
|
+
*/
|
|
1122
|
+
subscribeNewTokensMarketData(chain: Chain, callback: (marketDatas: Array<TokenMarketData>) => void): ISubscription;
|
|
1123
|
+
/**
|
|
1124
|
+
* Subscribe `New` token list's stats changes
|
|
1125
|
+
* @param chain chain id
|
|
1126
|
+
* @param callback callback function
|
|
1127
|
+
* @returns subscription
|
|
1128
|
+
*/
|
|
1129
|
+
subscribeNewTokensStats(chain: Chain, callback: (stats: Array<TokenStats>) => void): ISubscription;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
type NetworkId = "testnet" | "mainnet";
|
|
1134
|
+
|
|
1135
|
+
export { API, Chain, ChainNamespace, type NetworkId, type Portfolio, type PortfolioPnl, type Token, type TokenCandle, type TokenCreator, type TokenHistoryPriceObject, type TokenHolder, type TokenLaunchedFrom, type TokenLiquidity, type TokenMarketData, type TokenMigratedTo, type TokenResolution, type TokenSecurity, type TokenSocialMedias, type TokenStats, type TokenStatsByTimeframe, type TradeActivity, type TradeDex, type TradeToken, type WalletPortfolios, _default as version };
|