@liberfi.io/types 0.1.22 → 0.1.24
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 +62 -464
- package/dist/index.d.ts +62 -464
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -874,7 +874,7 @@ interface WalletPortfolios {
|
|
|
874
874
|
/**
|
|
875
875
|
* Cursor list result data
|
|
876
876
|
*/
|
|
877
|
-
interface CursorList
|
|
877
|
+
interface CursorList<T> {
|
|
878
878
|
startCursor?: string;
|
|
879
879
|
endCursor?: string;
|
|
880
880
|
hasPrev?: boolean;
|
|
@@ -932,7 +932,7 @@ interface SearchTokensOptions extends CursorListOptions {
|
|
|
932
932
|
/**
|
|
933
933
|
* Search token cursor list
|
|
934
934
|
*/
|
|
935
|
-
interface SearchTokenCursorList extends CursorList
|
|
935
|
+
interface SearchTokenCursorList extends CursorList<Token> {
|
|
936
936
|
total?: number;
|
|
937
937
|
extra?: any;
|
|
938
938
|
}
|
|
@@ -1035,7 +1035,7 @@ interface IClient {
|
|
|
1035
1035
|
* @param options optional query options
|
|
1036
1036
|
* @returns token holders
|
|
1037
1037
|
*/
|
|
1038
|
-
getTokenHolders(chain: Chain, address: string, options?: CursorListOptions): Promise<CursorList
|
|
1038
|
+
getTokenHolders(chain: Chain, address: string, options?: CursorListOptions): Promise<CursorList<TokenHolder>>;
|
|
1039
1039
|
/**
|
|
1040
1040
|
* fetch token market data
|
|
1041
1041
|
* @param chain chain id
|
|
@@ -1135,6 +1135,22 @@ interface IClient {
|
|
|
1135
1135
|
cursor?: string;
|
|
1136
1136
|
limit?: number;
|
|
1137
1137
|
}): Promise<WalletPortfolioPnls>;
|
|
1138
|
+
/**
|
|
1139
|
+
* fetch wallet portfolios for specific tokens
|
|
1140
|
+
* @param chain chain id
|
|
1141
|
+
* @param address wallet address
|
|
1142
|
+
* @param tokenAddresses token addresses to query
|
|
1143
|
+
* @returns portfolio list for the specified tokens
|
|
1144
|
+
*/
|
|
1145
|
+
getWalletPortfoliosByTokens(chain: Chain, address: string, tokenAddresses: Array<string>): Promise<Array<Portfolio>>;
|
|
1146
|
+
/**
|
|
1147
|
+
* fetch wallet portfolio PnL for specific tokens
|
|
1148
|
+
* @param chain chain id
|
|
1149
|
+
* @param address wallet address
|
|
1150
|
+
* @param tokenAddresses token addresses to query
|
|
1151
|
+
* @returns portfolio pnl list for the specified tokens
|
|
1152
|
+
*/
|
|
1153
|
+
getWalletPortfolioPnlsByTokens(chain: Chain, address: string, tokenAddresses: Array<string>): Promise<Array<PortfolioPnl>>;
|
|
1138
1154
|
/**
|
|
1139
1155
|
* fetch wallet's trade activities
|
|
1140
1156
|
* @param chain chain id
|
|
@@ -1142,7 +1158,7 @@ interface IClient {
|
|
|
1142
1158
|
* @param options optional query options
|
|
1143
1159
|
* @returns wallet's trade activities
|
|
1144
1160
|
*/
|
|
1145
|
-
getWalletTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList
|
|
1161
|
+
getWalletTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList<TradeActivity>>;
|
|
1146
1162
|
/**
|
|
1147
1163
|
* fetch token's trade activities
|
|
1148
1164
|
* @param chain chain id
|
|
@@ -1150,7 +1166,7 @@ interface IClient {
|
|
|
1150
1166
|
* @param options optional query options
|
|
1151
1167
|
* @returns token's trade activities
|
|
1152
1168
|
*/
|
|
1153
|
-
getTokenTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList
|
|
1169
|
+
getTokenTradeActivities(chain: Chain, address: string, options?: GetTradeActivitiesOptions): Promise<CursorList<TradeActivity>>;
|
|
1154
1170
|
/**
|
|
1155
1171
|
* get presigned upload url
|
|
1156
1172
|
* @returns presigned upload url
|
|
@@ -1160,19 +1176,12 @@ interface IClient {
|
|
|
1160
1176
|
interface ISubscription {
|
|
1161
1177
|
unsubscribe(): void;
|
|
1162
1178
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
image?: string;
|
|
1170
|
-
description?: string;
|
|
1171
|
-
socialMedias?: TokenSocialMedias;
|
|
1172
|
-
launchedFrom?: TokenLaunchedFrom;
|
|
1173
|
-
migratedTo?: TokenMigratedTo;
|
|
1174
|
-
createdAt: Date;
|
|
1175
|
-
}
|
|
1179
|
+
/**
|
|
1180
|
+
* Incremental token update from subscriptions.
|
|
1181
|
+
* `chain` + `address` identify the token; all other fields are optional —
|
|
1182
|
+
* `undefined` means this push did not carry that field.
|
|
1183
|
+
*/
|
|
1184
|
+
type TokenSubscribed = Partial<Omit<Token, "chain" | "address">> & Pick<Token, "chain" | "address">;
|
|
1176
1185
|
interface WalletPnlSubscribed extends WalletPnl {
|
|
1177
1186
|
resolution?: string;
|
|
1178
1187
|
}
|
|
@@ -1187,39 +1196,20 @@ type PortfolioPnlSubscribed = Partial<Omit<PortfolioPnl, "address" | "name" | "s
|
|
|
1187
1196
|
walletAddress: string;
|
|
1188
1197
|
tokenAddress: string;
|
|
1189
1198
|
};
|
|
1190
|
-
interface TokenDataSubscribed {
|
|
1191
|
-
address: string;
|
|
1192
|
-
stats: TokenStats;
|
|
1193
|
-
marketData: TokenMarketData;
|
|
1194
|
-
}
|
|
1195
1199
|
/**
|
|
1196
1200
|
* Subscribe client interface
|
|
1197
1201
|
*/
|
|
1198
1202
|
interface ISubscribeClient {
|
|
1199
1203
|
/**
|
|
1200
|
-
* Subscribe token's
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1203
|
-
* @param callback callback function
|
|
1204
|
-
* @returns subscription
|
|
1205
|
-
*/
|
|
1206
|
-
subscribeTokenBasic(chain: Chain, address: string, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1207
|
-
/**
|
|
1208
|
-
* Subscribe token's market data changes
|
|
1209
|
-
* @param chain chain id
|
|
1210
|
-
* @param address token address
|
|
1211
|
-
* @param callback callback function
|
|
1212
|
-
* @returns subscription
|
|
1213
|
-
*/
|
|
1214
|
-
subscribeTokenMarketData(chain: Chain, address: string, callback: (marketDatas: Array<TokenMarketData>) => void): ISubscription;
|
|
1215
|
-
/**
|
|
1216
|
-
* Subscribe token's stats changes
|
|
1204
|
+
* Subscribe to a token's real-time data updates (stats, market data,
|
|
1205
|
+
* holders, liquidity, etc.). The client internally manages multiple
|
|
1206
|
+
* backend channels and delivers incremental updates via `callback`.
|
|
1217
1207
|
* @param chain chain id
|
|
1218
1208
|
* @param address token address
|
|
1219
|
-
* @param callback
|
|
1209
|
+
* @param callback receives incremental token updates
|
|
1220
1210
|
* @returns subscription
|
|
1221
1211
|
*/
|
|
1222
|
-
|
|
1212
|
+
subscribeToken(chain: Chain, address: string, callback: (data: Array<TokenSubscribed>) => void): ISubscription;
|
|
1223
1213
|
/**
|
|
1224
1214
|
* Subscribe token new candles
|
|
1225
1215
|
* @param chain chain id
|
|
@@ -1270,470 +1260,78 @@ interface ISubscribeClient {
|
|
|
1270
1260
|
*/
|
|
1271
1261
|
subscribeTokenTradeActivities(chain: Chain, address: string, callback: (trades: Array<TradeActivity>) => void): ISubscription;
|
|
1272
1262
|
/**
|
|
1273
|
-
* Subscribe `New` token list
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
*/
|
|
1278
|
-
subscribeNewTokens(chain: Chain, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1279
|
-
/**
|
|
1280
|
-
* Subscribe `New` token list's basic info changes
|
|
1281
|
-
* @param chain chain id
|
|
1282
|
-
* @param callback callback function
|
|
1283
|
-
* @returns subscription
|
|
1284
|
-
*/
|
|
1285
|
-
subscribeNewTokensBasic(chain: Chain, callback: (tokens: Array<TokenSubscribed>) => void): ISubscription;
|
|
1286
|
-
/**
|
|
1287
|
-
* Subscribe `New` token list's market data changes
|
|
1288
|
-
* @param chain chain id
|
|
1289
|
-
* @param callback callback function
|
|
1290
|
-
* @returns subscription
|
|
1291
|
-
*/
|
|
1292
|
-
subscribeNewTokensMarketData(chain: Chain, callback: (marketDatas: Array<TokenMarketData>) => void): ISubscription;
|
|
1293
|
-
/**
|
|
1294
|
-
* Subscribe `New` token list's stats changes
|
|
1295
|
-
* @param chain chain id
|
|
1296
|
-
* @param callback callback function
|
|
1297
|
-
* @returns subscription
|
|
1298
|
-
*/
|
|
1299
|
-
subscribeNewTokensStats(chain: Chain, callback: (stats: Array<TokenStats>) => void): ISubscription;
|
|
1300
|
-
/**
|
|
1301
|
-
* Subscribe `New` token list's combined stats & market data changes
|
|
1263
|
+
* Subscribe to `New` token list real-time updates. The client internally
|
|
1264
|
+
* manages multiple backend channels (new token events, metadata, stats,
|
|
1265
|
+
* holders, supply, liquidity, bonding curve) and delivers incremental
|
|
1266
|
+
* updates via `callback`.
|
|
1302
1267
|
* @param chain chain id
|
|
1303
|
-
* @param callback
|
|
1268
|
+
* @param callback receives incremental token updates
|
|
1304
1269
|
* @returns subscription
|
|
1305
1270
|
*/
|
|
1306
|
-
|
|
1271
|
+
subscribeNewTokens(chain: Chain, callback: (data: Array<TokenSubscribed>) => void): ISubscription;
|
|
1307
1272
|
/**
|
|
1308
|
-
* Subscribe `
|
|
1273
|
+
* Subscribe to `Trending` token list real-time updates. The client
|
|
1274
|
+
* internally manages multiple backend channels (stats, holders, supply,
|
|
1275
|
+
* liquidity) and delivers incremental updates via `callback`.
|
|
1309
1276
|
* @param chain chain id
|
|
1310
|
-
* @param callback
|
|
1277
|
+
* @param callback receives incremental token updates
|
|
1311
1278
|
* @returns subscription
|
|
1312
1279
|
*/
|
|
1313
|
-
|
|
1280
|
+
subscribeTrendingTokens(chain: Chain, callback: (data: Array<TokenSubscribed>) => void): ISubscription;
|
|
1314
1281
|
/**
|
|
1315
|
-
* Subscribe `
|
|
1282
|
+
* Subscribe to `Migrated` token list real-time updates. The client
|
|
1283
|
+
* internally manages multiple backend channels (stats, holders, supply,
|
|
1284
|
+
* liquidity) and delivers incremental updates via `callback`.
|
|
1316
1285
|
* @param chain chain id
|
|
1317
|
-
* @param callback
|
|
1286
|
+
* @param callback receives incremental token updates
|
|
1318
1287
|
* @returns subscription
|
|
1319
1288
|
*/
|
|
1320
|
-
|
|
1289
|
+
subscribeMigratedTokens(chain: Chain, callback: (data: Array<TokenSubscribed>) => void): ISubscription;
|
|
1321
1290
|
/**
|
|
1322
|
-
* Subscribe `
|
|
1291
|
+
* Subscribe to `FinalStretch` token list real-time updates. The client
|
|
1292
|
+
* internally manages multiple backend channels (stats, holders, supply,
|
|
1293
|
+
* liquidity, bonding curve) and delivers incremental updates via `callback`.
|
|
1323
1294
|
* @param chain chain id
|
|
1324
|
-
* @param callback
|
|
1295
|
+
* @param callback receives incremental token updates
|
|
1325
1296
|
* @returns subscription
|
|
1326
1297
|
*/
|
|
1327
|
-
|
|
1298
|
+
subscribeFinalStretchTokens(chain: Chain, callback: (data: Array<TokenSubscribed>) => void): ISubscription;
|
|
1328
1299
|
/**
|
|
1329
|
-
* Subscribe `Stock` token list
|
|
1300
|
+
* Subscribe to `Stock` token list real-time updates. The client internally
|
|
1301
|
+
* manages multiple backend channels (stats, holders, supply, liquidity)
|
|
1302
|
+
* and delivers incremental updates via `callback`.
|
|
1330
1303
|
* @param chain chain id
|
|
1331
|
-
* @param callback
|
|
1332
|
-
* @returns subscription
|
|
1333
|
-
*/
|
|
1334
|
-
subscribeStockTokensData(chain: Chain, callback: (data: Array<TokenDataSubscribed>) => void): ISubscription;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
* Media to track
|
|
1339
|
-
*/
|
|
1340
|
-
interface IMedia {
|
|
1341
|
-
/** media id */
|
|
1342
|
-
id: string;
|
|
1343
|
-
/** media type */
|
|
1344
|
-
type: "tweet" | (string & {});
|
|
1345
|
-
/** token type */
|
|
1346
|
-
tokenType?: string;
|
|
1347
|
-
/** token mentioned in the media */
|
|
1348
|
-
token?: MediaToken;
|
|
1349
|
-
}
|
|
1350
|
-
/**
|
|
1351
|
-
* Tweet media to track
|
|
1352
|
-
*/
|
|
1353
|
-
interface TweetMedia extends IMedia {
|
|
1354
|
-
/** media type */
|
|
1355
|
-
type: "tweet";
|
|
1356
|
-
/** tweet */
|
|
1357
|
-
tweet: Tweet;
|
|
1358
|
-
/** source tweet, quote or retweet or reply */
|
|
1359
|
-
sourceTweet?: SourceTweet;
|
|
1360
|
-
}
|
|
1361
|
-
/**
|
|
1362
|
-
* Token mentioned in the media
|
|
1363
|
-
*/
|
|
1364
|
-
interface MediaToken {
|
|
1365
|
-
/** chain */
|
|
1366
|
-
chain: Chain;
|
|
1367
|
-
/** token address */
|
|
1368
|
-
address: string;
|
|
1369
|
-
/** token symbol */
|
|
1370
|
-
symbol: string;
|
|
1371
|
-
/** token image url */
|
|
1372
|
-
image?: string;
|
|
1373
|
-
/** token latest price in usd */
|
|
1374
|
-
latestPrice?: string;
|
|
1375
|
-
/** token previous price in usd */
|
|
1376
|
-
previousPrice?: string;
|
|
1377
|
-
/** price change ratio, range is 0-100 */
|
|
1378
|
-
priceChange?: string;
|
|
1379
|
-
}
|
|
1380
|
-
interface Tweet {
|
|
1381
|
-
/** tweet id */
|
|
1382
|
-
tweetId: string;
|
|
1383
|
-
/** tweet type */
|
|
1384
|
-
type: "tweet" | "reply" | "quote" | (string & {});
|
|
1385
|
-
/** tweet author */
|
|
1386
|
-
user: TweetUser;
|
|
1387
|
-
/** tweet unix timestamp in milliseconds */
|
|
1388
|
-
timestamp: number;
|
|
1389
|
-
/** tweet content */
|
|
1390
|
-
content: TweetContent;
|
|
1391
|
-
}
|
|
1392
|
-
interface SourceTweet {
|
|
1393
|
-
/** tweet id */
|
|
1394
|
-
tweetId: string;
|
|
1395
|
-
/** tweet author */
|
|
1396
|
-
user: TweetUser;
|
|
1397
|
-
/** tweet content */
|
|
1398
|
-
content: TweetContent;
|
|
1399
|
-
}
|
|
1400
|
-
interface TweetUser {
|
|
1401
|
-
/** username */
|
|
1402
|
-
username: string;
|
|
1403
|
-
/** screen name */
|
|
1404
|
-
screenName?: string;
|
|
1405
|
-
/** avatar */
|
|
1406
|
-
avatar?: string;
|
|
1407
|
-
/** tags */
|
|
1408
|
-
tags?: Array<string>;
|
|
1409
|
-
}
|
|
1410
|
-
interface TweetContent {
|
|
1411
|
-
/** tweet text content */
|
|
1412
|
-
text?: string;
|
|
1413
|
-
/** tweet medias, e.g. image, video .etc */
|
|
1414
|
-
medias?: Array<TweetContentMedia>;
|
|
1415
|
-
}
|
|
1416
|
-
interface TweetContentMedia {
|
|
1417
|
-
type: "image" | "video" | (string & {});
|
|
1418
|
-
url: string;
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
/**
|
|
1422
|
-
* AI generated meme information
|
|
1423
|
-
*/
|
|
1424
|
-
interface GeneratedMemeInfo {
|
|
1425
|
-
/** token symbol */
|
|
1426
|
-
symbol: string;
|
|
1427
|
-
/** token name */
|
|
1428
|
-
name?: string;
|
|
1429
|
-
/** token image url */
|
|
1430
|
-
image?: string;
|
|
1431
|
-
}
|
|
1432
|
-
interface SubscribeTweetMediasOptions {
|
|
1433
|
-
/**
|
|
1434
|
-
* Callback function to handle new tweet medias
|
|
1435
|
-
* @param tweetMedia new tweet media
|
|
1436
|
-
* @returns
|
|
1437
|
-
*/
|
|
1438
|
-
callback: (tweetMedia: TweetMedia) => void;
|
|
1439
|
-
}
|
|
1440
|
-
/**
|
|
1441
|
-
* Interfaces for media track client
|
|
1442
|
-
*/
|
|
1443
|
-
interface IMediaTrackClient {
|
|
1444
|
-
/**
|
|
1445
|
-
* Translate media content text
|
|
1446
|
-
* @param media media to translate
|
|
1447
|
-
* @param targetLanguage target language
|
|
1448
|
-
* @param options translate options
|
|
1449
|
-
* @param options.sourceLanguage source language
|
|
1450
|
-
* @param options.sourceTweet if true, the source tweet will be translated
|
|
1451
|
-
* @returns translated text
|
|
1452
|
-
*/
|
|
1453
|
-
translate(media: IMedia, targetLanguage: string, options?: {
|
|
1454
|
-
sourceLanguage?: string;
|
|
1455
|
-
sourceTweet?: boolean;
|
|
1456
|
-
}): Promise<string>;
|
|
1457
|
-
/**
|
|
1458
|
-
* AI Generated Meme Launch Info
|
|
1459
|
-
* @param media media to generate meme
|
|
1460
|
-
*/
|
|
1461
|
-
generateMeme(media: IMedia): Promise<GeneratedMemeInfo>;
|
|
1462
|
-
/**
|
|
1463
|
-
* Subscribe to new tweet medias
|
|
1464
|
-
* @param options subscribe tweet medias options
|
|
1465
|
-
* @returns subscription
|
|
1466
|
-
*/
|
|
1467
|
-
subscribeTweetMedia(options: SubscribeTweetMediasOptions): ISubscription;
|
|
1468
|
-
/**
|
|
1469
|
-
* Subscribe to tweet media tokens changes
|
|
1470
|
-
* @param options subscribe tweet media tokens options
|
|
1304
|
+
* @param callback receives incremental token updates
|
|
1471
1305
|
* @returns subscription
|
|
1472
1306
|
*/
|
|
1473
|
-
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
interface Channel {
|
|
1477
|
-
/** channel id */
|
|
1478
|
-
id: string;
|
|
1479
|
-
/** owner user id */
|
|
1480
|
-
owner_id: string;
|
|
1481
|
-
/** channel name */
|
|
1482
|
-
name: string;
|
|
1483
|
-
/** channel description */
|
|
1484
|
-
description?: string;
|
|
1485
|
-
/** channel icon */
|
|
1486
|
-
icon?: string;
|
|
1487
|
-
/** channel chain */
|
|
1488
|
-
chain: Chain;
|
|
1489
|
-
/** channel privacy */
|
|
1490
|
-
privacy: "public" | "private";
|
|
1491
|
-
/** whether the current user is subscribed to the channel */
|
|
1492
|
-
is_subscribed: boolean;
|
|
1493
|
-
/** number of subscribers */
|
|
1494
|
-
subscribe_count: number;
|
|
1495
|
-
/** number of sources */
|
|
1496
|
-
source_count: number;
|
|
1497
|
-
/** channel sources */
|
|
1498
|
-
sources?: Array<ChannelSource>;
|
|
1499
|
-
/** channel sinks */
|
|
1500
|
-
sinks?: Array<ChannelSink>;
|
|
1501
|
-
/** channel telegram url */
|
|
1502
|
-
telegram?: string;
|
|
1503
|
-
/** channel discord url */
|
|
1504
|
-
discord?: string;
|
|
1505
|
-
/** channel twitter url */
|
|
1506
|
-
twitter?: string;
|
|
1507
|
-
/** channel created at */
|
|
1508
|
-
created_at: string;
|
|
1509
|
-
/** channel updated at */
|
|
1510
|
-
updated_at: string;
|
|
1511
|
-
}
|
|
1512
|
-
interface ChannelSource {
|
|
1513
|
-
/** source id */
|
|
1514
|
-
id: string;
|
|
1515
|
-
/** channel id */
|
|
1516
|
-
channel_id: string;
|
|
1517
|
-
/** source type */
|
|
1518
|
-
type: string;
|
|
1519
|
-
/** source alias */
|
|
1520
|
-
alias?: string;
|
|
1521
|
-
/** source value */
|
|
1522
|
-
value?: string;
|
|
1523
|
-
/** source config */
|
|
1524
|
-
configs?: Record<string, any>;
|
|
1525
|
-
/** source created at */
|
|
1526
|
-
created_at: string;
|
|
1527
|
-
/** source updated at */
|
|
1528
|
-
updated_at: string;
|
|
1529
|
-
}
|
|
1530
|
-
interface BaseChannelEvent {
|
|
1531
|
-
/** event type */
|
|
1532
|
-
type: string;
|
|
1533
|
-
/** event created at */
|
|
1534
|
-
timestamp: number;
|
|
1535
|
-
}
|
|
1536
|
-
interface ChannelTradeEvent extends BaseChannelEvent {
|
|
1537
|
-
data: {
|
|
1538
|
-
wallet_address: string;
|
|
1539
|
-
chain: Chain;
|
|
1540
|
-
type: "buy" | "sell";
|
|
1541
|
-
base_icon: string;
|
|
1542
|
-
base_symbol: string;
|
|
1543
|
-
base_name: string;
|
|
1544
|
-
base_amount: string;
|
|
1545
|
-
base_address: string;
|
|
1546
|
-
quote_symbol: string;
|
|
1547
|
-
quote_address: string;
|
|
1548
|
-
quote_amount: string;
|
|
1549
|
-
quote_price: string;
|
|
1550
|
-
quote_price_usd: string;
|
|
1551
|
-
tx_hash: string;
|
|
1552
|
-
dex: string;
|
|
1553
|
-
launchpad: string;
|
|
1554
|
-
block_height: number;
|
|
1555
|
-
timestamp: string;
|
|
1556
|
-
};
|
|
1557
|
-
}
|
|
1558
|
-
type ChannelEvent = ChannelTradeEvent;
|
|
1559
|
-
interface ChannelSink {
|
|
1560
|
-
/** sink id */
|
|
1561
|
-
id: string;
|
|
1562
|
-
/** sink type */
|
|
1563
|
-
type: string;
|
|
1564
|
-
/** sink url */
|
|
1565
|
-
url?: string;
|
|
1566
|
-
/** sink config */
|
|
1567
|
-
config?: Record<string, any>;
|
|
1568
|
-
/** sink created at */
|
|
1569
|
-
created_at: string;
|
|
1570
|
-
/** sink updated at */
|
|
1571
|
-
updated_at: string;
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
interface PageList<T> {
|
|
1575
|
-
list: Array<T>;
|
|
1576
|
-
page: number;
|
|
1577
|
-
size: number;
|
|
1578
|
-
total: number;
|
|
1579
|
-
total_pages: number;
|
|
1580
|
-
}
|
|
1581
|
-
interface CursorList<T> {
|
|
1582
|
-
data: Array<T>;
|
|
1583
|
-
total: number;
|
|
1584
|
-
next_timestamp?: number;
|
|
1585
|
-
has_more: boolean;
|
|
1586
|
-
}
|
|
1587
|
-
interface CreateChannelOptions {
|
|
1588
|
-
/** channel name */
|
|
1589
|
-
name: string;
|
|
1590
|
-
/** channel description */
|
|
1591
|
-
description?: string;
|
|
1592
|
-
/** channel icon */
|
|
1593
|
-
icon: string;
|
|
1594
|
-
/** channel chain */
|
|
1595
|
-
chain: string;
|
|
1596
|
-
/** channel privacy */
|
|
1597
|
-
privacy: "public" | "private";
|
|
1598
|
-
}
|
|
1599
|
-
interface UpdateChannelOptions {
|
|
1600
|
-
/** channel id */
|
|
1601
|
-
id: string;
|
|
1602
|
-
/** channel name */
|
|
1603
|
-
name?: string;
|
|
1604
|
-
/** channel description */
|
|
1605
|
-
description?: string;
|
|
1606
|
-
/** channel icon */
|
|
1607
|
-
icon?: string;
|
|
1608
|
-
/** channel chain */
|
|
1609
|
-
chain?: string;
|
|
1610
|
-
/** channel privacy */
|
|
1611
|
-
privacy?: "public" | "private";
|
|
1612
|
-
}
|
|
1613
|
-
interface UpdateChannelSourcesOptions {
|
|
1614
|
-
/** channel id */
|
|
1615
|
-
channel_id: string;
|
|
1616
|
-
/** wallet sources */
|
|
1617
|
-
sources: Array<ChannelSourceOption>;
|
|
1618
|
-
/** source type */
|
|
1619
|
-
type: string;
|
|
1620
|
-
}
|
|
1621
|
-
interface ChannelSourceOption {
|
|
1622
|
-
/** source type */
|
|
1623
|
-
type: string;
|
|
1624
|
-
/** source alias */
|
|
1625
|
-
alias?: string;
|
|
1626
|
-
/** source value */
|
|
1627
|
-
value?: string;
|
|
1628
|
-
/** source configs */
|
|
1629
|
-
configs?: any;
|
|
1630
|
-
}
|
|
1631
|
-
interface ListChannelsOptions {
|
|
1632
|
-
/** page number, starting from 1 */
|
|
1633
|
-
page?: number;
|
|
1634
|
-
/** number of items per page */
|
|
1635
|
-
size?: number;
|
|
1636
|
-
/** filter by chain id */
|
|
1637
|
-
chain?: string;
|
|
1638
|
-
/** fuzzy search by name */
|
|
1639
|
-
search?: string;
|
|
1640
|
-
/** sort field */
|
|
1641
|
-
sort?: string;
|
|
1642
|
-
/** sort order */
|
|
1643
|
-
order?: "asc" | "desc";
|
|
1644
|
-
}
|
|
1645
|
-
interface ListChannelEventsOptions {
|
|
1646
|
-
/** Timestamp filter: 0 = get latest 20, >0 = get events after this timestamp */
|
|
1647
|
-
timestamp?: number;
|
|
1648
|
-
/** Pagination: true = get events after timestamp (older), false = get events before timestamp (newer) */
|
|
1649
|
-
next_page?: boolean;
|
|
1650
|
-
/** Number of events to return, default 50, max 100 */
|
|
1651
|
-
limit?: number;
|
|
1652
|
-
}
|
|
1653
|
-
type ChannelsList = PageList<Channel>;
|
|
1654
|
-
type ChannelEventsList = CursorList<ChannelEvent>;
|
|
1655
|
-
/**
|
|
1656
|
-
* X (Twitter) Eligibility Information
|
|
1657
|
-
*/
|
|
1658
|
-
interface XEligibilityInfo {
|
|
1659
|
-
/** Authorization status: "not_authorized" | "authorized" | "auth_failed" */
|
|
1660
|
-
status: string;
|
|
1661
|
-
/** Status message */
|
|
1662
|
-
message?: string;
|
|
1663
|
-
/** Twitter user ID */
|
|
1664
|
-
twitter_id?: string;
|
|
1665
|
-
/** Twitter username */
|
|
1666
|
-
twitter_name?: string;
|
|
1667
|
-
/** Follower count */
|
|
1668
|
-
follower_count?: string;
|
|
1669
|
-
/** Account age in days */
|
|
1670
|
-
account_age_days?: string;
|
|
1671
|
-
/** Whether account has violations */
|
|
1672
|
-
has_violations?: boolean;
|
|
1673
|
-
}
|
|
1674
|
-
interface IChannelsClient {
|
|
1675
|
-
get(id: string): Promise<Channel>;
|
|
1676
|
-
getChannels(options?: ListChannelsOptions): Promise<ChannelsList>;
|
|
1677
|
-
getMyChannels(options?: ListChannelsOptions): Promise<ChannelsList>;
|
|
1678
|
-
getSubscribedChannels(options?: ListChannelsOptions): Promise<ChannelsList>;
|
|
1679
|
-
subscribe(id: string): Promise<void>;
|
|
1680
|
-
unsubscribe(id: string): Promise<void>;
|
|
1681
|
-
getChannelEvents(channelId: string, options?: ListChannelEventsOptions): Promise<ChannelEventsList>;
|
|
1682
|
-
create(options: CreateChannelOptions): Promise<Channel>;
|
|
1683
|
-
update(options: UpdateChannelOptions): Promise<Channel>;
|
|
1684
|
-
updateSources(options: UpdateChannelSourcesOptions): Promise<Array<ChannelSource>>;
|
|
1685
|
-
getSources(channelId: string): Promise<Array<ChannelSource>>;
|
|
1686
|
-
/**
|
|
1687
|
-
* Check X (Twitter) eligibility status
|
|
1688
|
-
* @returns X eligibility information including authorization status
|
|
1689
|
-
*/
|
|
1690
|
-
checkXEligibility(): Promise<XEligibilityInfo>;
|
|
1691
|
-
/**
|
|
1692
|
-
* Get X (Twitter) OAuth authorization URL
|
|
1693
|
-
* @param returnUrl - Optional return URL after authorization
|
|
1694
|
-
* @returns Authorization URL
|
|
1695
|
-
*/
|
|
1696
|
-
getXAuthorizeUrl(returnUrl?: string): Promise<string>;
|
|
1307
|
+
subscribeStockTokens(chain: Chain, callback: (data: Array<TokenSubscribed>) => void): ISubscription;
|
|
1697
1308
|
}
|
|
1698
1309
|
|
|
1699
|
-
type
|
|
1700
|
-
type index_ChannelSourceOption = ChannelSourceOption;
|
|
1701
|
-
type index_ChannelsList = ChannelsList;
|
|
1702
|
-
type index_CreateChannelOptions = CreateChannelOptions;
|
|
1310
|
+
type index_CursorList<T> = CursorList<T>;
|
|
1703
1311
|
type index_CursorListOptions = CursorListOptions;
|
|
1704
|
-
type index_GeneratedMemeInfo = GeneratedMemeInfo;
|
|
1705
1312
|
type index_GetTokenCandlesOptions = GetTokenCandlesOptions;
|
|
1706
1313
|
type index_GetTokenListOptions = GetTokenListOptions;
|
|
1707
1314
|
type index_GetTradeActivitiesOptions = GetTradeActivitiesOptions;
|
|
1708
|
-
type index_IChannelsClient = IChannelsClient;
|
|
1709
1315
|
type index_IClient = IClient;
|
|
1710
|
-
type index_IMediaTrackClient = IMediaTrackClient;
|
|
1711
1316
|
type index_ISubscribeClient = ISubscribeClient;
|
|
1712
1317
|
type index_ISubscription = ISubscription;
|
|
1713
|
-
type index_ListChannelEventsOptions = ListChannelEventsOptions;
|
|
1714
|
-
type index_ListChannelsOptions = ListChannelsOptions;
|
|
1715
1318
|
type index_PortfolioPnlSubscribed = PortfolioPnlSubscribed;
|
|
1716
1319
|
type index_PortfolioSubscribed = PortfolioSubscribed;
|
|
1717
1320
|
type index_SearchTokenCursorList = SearchTokenCursorList;
|
|
1718
1321
|
type index_SearchTokensOptions = SearchTokensOptions;
|
|
1719
1322
|
type index_SendTxParams = SendTxParams;
|
|
1720
1323
|
type index_SendTxResult = SendTxResult;
|
|
1721
|
-
type index_SubscribeTweetMediasOptions = SubscribeTweetMediasOptions;
|
|
1722
1324
|
type index_SwapMode = SwapMode;
|
|
1723
1325
|
declare const index_SwapMode: typeof SwapMode;
|
|
1724
1326
|
type index_SwapParams = SwapParams;
|
|
1725
1327
|
type index_SwapRoute = SwapRoute;
|
|
1726
1328
|
type index_SwapRoutePlan = SwapRoutePlan;
|
|
1727
|
-
type index_TokenDataSubscribed = TokenDataSubscribed;
|
|
1728
1329
|
type index_TokenFieldOption = TokenFieldOption;
|
|
1729
1330
|
type index_TokenFilterOption = TokenFilterOption;
|
|
1730
1331
|
type index_TokenSubscribed = TokenSubscribed;
|
|
1731
|
-
type index_UpdateChannelOptions = UpdateChannelOptions;
|
|
1732
|
-
type index_UpdateChannelSourcesOptions = UpdateChannelSourcesOptions;
|
|
1733
1332
|
type index_WalletPnlSubscribed = WalletPnlSubscribed;
|
|
1734
|
-
type index_XEligibilityInfo = XEligibilityInfo;
|
|
1735
1333
|
declare namespace index {
|
|
1736
|
-
export { type
|
|
1334
|
+
export { type index_CursorList as CursorList, type index_CursorListOptions as CursorListOptions, type index_GetTokenCandlesOptions as GetTokenCandlesOptions, type index_GetTokenListOptions as GetTokenListOptions, type index_GetTradeActivitiesOptions as GetTradeActivitiesOptions, type index_IClient as IClient, type index_ISubscribeClient as ISubscribeClient, type index_ISubscription as ISubscription, type index_PortfolioPnlSubscribed as PortfolioPnlSubscribed, type index_PortfolioSubscribed as PortfolioSubscribed, type index_SearchTokenCursorList as SearchTokenCursorList, type index_SearchTokensOptions as SearchTokensOptions, type index_SendTxParams as SendTxParams, type index_SendTxResult as SendTxResult, index_SwapMode as SwapMode, type index_SwapParams as SwapParams, type index_SwapRoute as SwapRoute, type index_SwapRoutePlan as SwapRoutePlan, type index_TokenFieldOption as TokenFieldOption, type index_TokenFilterOption as TokenFilterOption, type index_TokenSubscribed as TokenSubscribed, type index_WalletPnlSubscribed as WalletPnlSubscribed };
|
|
1737
1335
|
}
|
|
1738
1336
|
|
|
1739
1337
|
declare global {
|
|
@@ -1743,7 +1341,7 @@ declare global {
|
|
|
1743
1341
|
};
|
|
1744
1342
|
}
|
|
1745
1343
|
}
|
|
1746
|
-
declare const _default: "0.1.
|
|
1344
|
+
declare const _default: "0.1.24";
|
|
1747
1345
|
|
|
1748
1346
|
type NetworkId = "testnet" | "mainnet";
|
|
1749
1347
|
|
|
@@ -1773,4 +1371,4 @@ declare enum SolanaTokenProtocol {
|
|
|
1773
1371
|
type TokenProtocol = keyof typeof SolanaTokenProtocol | (string & {});
|
|
1774
1372
|
declare const SOLANA_TOKEN_PROTOCOLS: SolanaTokenProtocol[];
|
|
1775
1373
|
|
|
1776
|
-
export { index as API, ApiError,
|
|
1374
|
+
export { index as API, ApiError, Chain, ChainNamespace, type CursorList, type CursorListOptions, type GetTokenCandlesOptions, type GetTokenListOptions, type GetTradeActivitiesOptions, type IClient, type ISubscribeClient, type ISubscription, type NetworkId, type Portfolio, type PortfolioPnl, type PortfolioPnlSubscribed, type PortfolioSubscribed, SOLANA_TOKEN_PROTOCOLS, type SearchTokenCursorList, type SearchTokensOptions, type SendTxParams, type SendTxResult, SolanaTokenProtocol, SwapMode, type SwapParams, type SwapRoute, type SwapRoutePlan, type Token, type TokenCandle, type TokenCreator, type TokenFieldOption, type TokenFilterOption, type TokenHistoryPriceObject, type TokenHolder, type TokenLaunchedFrom, type TokenLiquidity, type TokenMarketData, type TokenMigratedTo, type TokenProtocol, type TokenResolution, type TokenSecurity, type TokenSocialMedias, type TokenStats, type TokenStatsByResolution, type TokenSubscribed, type TradeActivity, type TradeDex, type TradeToken, type WalletPnl, type WalletPnlSubscribed, type WalletPortfolioPnls, type WalletPortfolios, _default as version };
|
package/dist/index.js
CHANGED
|
@@ -47,9 +47,9 @@ var SwapMode = /* @__PURE__ */ ((SwapMode2) => {
|
|
|
47
47
|
// src/version.ts
|
|
48
48
|
if (typeof window !== "undefined") {
|
|
49
49
|
window.__LIBERFI_VERSION__ = window.__LIBERFI_VERSION__ || {};
|
|
50
|
-
window.__LIBERFI_VERSION__["@liberfi.io/types"] = "0.1.
|
|
50
|
+
window.__LIBERFI_VERSION__["@liberfi.io/types"] = "0.1.24";
|
|
51
51
|
}
|
|
52
|
-
var version_default = "0.1.
|
|
52
|
+
var version_default = "0.1.24";
|
|
53
53
|
|
|
54
54
|
// src/chains.ts
|
|
55
55
|
var Chain = /* @__PURE__ */ ((Chain2) => {
|