four-flap-meme-sdk 1.5.10 → 1.5.12

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.
Files changed (156) hide show
  1. package/README.zh-CN.pdf +0 -0
  2. package/dist/contracts/tm-bundle-merkle/submit.js +58 -0
  3. package/dist/flap/portal-bundle-merkle/encryption.d.ts +16 -0
  4. package/dist/flap/portal-bundle-merkle/encryption.js +146 -0
  5. package/dist/flap/portal-bundle-merkle/private.js +8 -4
  6. package/dist/index.d.ts +0 -1
  7. package/dist/index.js +1 -1
  8. package/dist/utils/constants.d.ts +1 -0
  9. package/dist/utils/constants.js +4 -2
  10. package/dist/xlayer/constants.d.ts +2 -0
  11. package/dist/xlayer/constants.js +2 -0
  12. package/package.json +5 -44
  13. package/dist/sol/constants.d.ts +0 -150
  14. package/dist/sol/constants.js +0 -188
  15. package/dist/sol/dex/blockrazor/client.d.ts +0 -51
  16. package/dist/sol/dex/blockrazor/client.js +0 -96
  17. package/dist/sol/dex/blockrazor/constants.d.ts +0 -34
  18. package/dist/sol/dex/blockrazor/constants.js +0 -55
  19. package/dist/sol/dex/blockrazor/geyser.d.ts +0 -128
  20. package/dist/sol/dex/blockrazor/geyser.js +0 -530
  21. package/dist/sol/dex/blockrazor/index.d.ts +0 -18
  22. package/dist/sol/dex/blockrazor/index.js +0 -23
  23. package/dist/sol/dex/blockrazor/send.d.ts +0 -135
  24. package/dist/sol/dex/blockrazor/send.js +0 -254
  25. package/dist/sol/dex/blockrazor/types.d.ts +0 -191
  26. package/dist/sol/dex/blockrazor/types.js +0 -5
  27. package/dist/sol/dex/index.d.ts +0 -10
  28. package/dist/sol/dex/index.js +0 -16
  29. package/dist/sol/dex/jup/client.d.ts +0 -33
  30. package/dist/sol/dex/jup/client.js +0 -110
  31. package/dist/sol/dex/jup/index.d.ts +0 -16
  32. package/dist/sol/dex/jup/index.js +0 -148
  33. package/dist/sol/dex/jup/legacy.d.ts +0 -623
  34. package/dist/sol/dex/jup/legacy.js +0 -416
  35. package/dist/sol/dex/jup/lend.d.ts +0 -640
  36. package/dist/sol/dex/jup/lend.js +0 -603
  37. package/dist/sol/dex/jup/portfolio.d.ts +0 -362
  38. package/dist/sol/dex/jup/portfolio.js +0 -367
  39. package/dist/sol/dex/jup/price.d.ts +0 -173
  40. package/dist/sol/dex/jup/price.js +0 -220
  41. package/dist/sol/dex/jup/recurring.d.ts +0 -437
  42. package/dist/sol/dex/jup/recurring.js +0 -320
  43. package/dist/sol/dex/jup/send.d.ts +0 -282
  44. package/dist/sol/dex/jup/send.js +0 -295
  45. package/dist/sol/dex/jup/studio.d.ts +0 -457
  46. package/dist/sol/dex/jup/studio.js +0 -488
  47. package/dist/sol/dex/jup/tokens.d.ts +0 -767
  48. package/dist/sol/dex/jup/tokens.js +0 -697
  49. package/dist/sol/dex/jup/trigger.d.ts +0 -511
  50. package/dist/sol/dex/jup/trigger.js +0 -397
  51. package/dist/sol/dex/jup/types.d.ts +0 -433
  52. package/dist/sol/dex/jup/types.js +0 -5
  53. package/dist/sol/dex/jup/ultra.d.ts +0 -646
  54. package/dist/sol/dex/jup/ultra.js +0 -853
  55. package/dist/sol/dex/meteora/client.d.ts +0 -76
  56. package/dist/sol/dex/meteora/client.js +0 -219
  57. package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +0 -61
  58. package/dist/sol/dex/meteora/damm-v1-bundle.js +0 -112
  59. package/dist/sol/dex/meteora/damm-v1.d.ts +0 -118
  60. package/dist/sol/dex/meteora/damm-v1.js +0 -315
  61. package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +0 -82
  62. package/dist/sol/dex/meteora/damm-v2-bundle.js +0 -242
  63. package/dist/sol/dex/meteora/damm-v2.d.ts +0 -172
  64. package/dist/sol/dex/meteora/damm-v2.js +0 -632
  65. package/dist/sol/dex/meteora/dbc-bundle.d.ts +0 -123
  66. package/dist/sol/dex/meteora/dbc-bundle.js +0 -304
  67. package/dist/sol/dex/meteora/dbc.d.ts +0 -192
  68. package/dist/sol/dex/meteora/dbc.js +0 -619
  69. package/dist/sol/dex/meteora/dlmm-bundle.d.ts +0 -39
  70. package/dist/sol/dex/meteora/dlmm-bundle.js +0 -189
  71. package/dist/sol/dex/meteora/dlmm.d.ts +0 -157
  72. package/dist/sol/dex/meteora/dlmm.js +0 -671
  73. package/dist/sol/dex/meteora/index.d.ts +0 -25
  74. package/dist/sol/dex/meteora/index.js +0 -65
  75. package/dist/sol/dex/meteora/types.d.ts +0 -787
  76. package/dist/sol/dex/meteora/types.js +0 -110
  77. package/dist/sol/dex/orca/index.d.ts +0 -10
  78. package/dist/sol/dex/orca/index.js +0 -16
  79. package/dist/sol/dex/orca/orca-bundle.d.ts +0 -41
  80. package/dist/sol/dex/orca/orca-bundle.js +0 -173
  81. package/dist/sol/dex/orca/orca.d.ts +0 -65
  82. package/dist/sol/dex/orca/orca.js +0 -474
  83. package/dist/sol/dex/orca/types.d.ts +0 -263
  84. package/dist/sol/dex/orca/types.js +0 -38
  85. package/dist/sol/dex/orca/wavebreak-bundle.d.ts +0 -34
  86. package/dist/sol/dex/orca/wavebreak-bundle.js +0 -198
  87. package/dist/sol/dex/orca/wavebreak-types.d.ts +0 -227
  88. package/dist/sol/dex/orca/wavebreak-types.js +0 -23
  89. package/dist/sol/dex/orca/wavebreak.d.ts +0 -78
  90. package/dist/sol/dex/orca/wavebreak.js +0 -497
  91. package/dist/sol/dex/pump/index.d.ts +0 -9
  92. package/dist/sol/dex/pump/index.js +0 -14
  93. package/dist/sol/dex/pump/pump-bundle.d.ts +0 -92
  94. package/dist/sol/dex/pump/pump-bundle.js +0 -383
  95. package/dist/sol/dex/pump/pump-swap-bundle.d.ts +0 -103
  96. package/dist/sol/dex/pump/pump-swap-bundle.js +0 -380
  97. package/dist/sol/dex/pump/pump-swap.d.ts +0 -46
  98. package/dist/sol/dex/pump/pump-swap.js +0 -199
  99. package/dist/sol/dex/pump/pump.d.ts +0 -35
  100. package/dist/sol/dex/pump/pump.js +0 -352
  101. package/dist/sol/dex/pump/types.d.ts +0 -215
  102. package/dist/sol/dex/pump/types.js +0 -5
  103. package/dist/sol/dex/raydium/index.d.ts +0 -8
  104. package/dist/sol/dex/raydium/index.js +0 -12
  105. package/dist/sol/dex/raydium/launchlab.d.ts +0 -68
  106. package/dist/sol/dex/raydium/launchlab.js +0 -210
  107. package/dist/sol/dex/raydium/raydium-bundle.d.ts +0 -64
  108. package/dist/sol/dex/raydium/raydium-bundle.js +0 -324
  109. package/dist/sol/dex/raydium/raydium.d.ts +0 -40
  110. package/dist/sol/dex/raydium/raydium.js +0 -366
  111. package/dist/sol/dex/raydium/types.d.ts +0 -240
  112. package/dist/sol/dex/raydium/types.js +0 -5
  113. package/dist/sol/index.d.ts +0 -11
  114. package/dist/sol/index.js +0 -18
  115. package/dist/sol/jito/bundle.d.ts +0 -90
  116. package/dist/sol/jito/bundle.js +0 -263
  117. package/dist/sol/jito/index.d.ts +0 -7
  118. package/dist/sol/jito/index.js +0 -7
  119. package/dist/sol/jito/tip.d.ts +0 -51
  120. package/dist/sol/jito/tip.js +0 -83
  121. package/dist/sol/jito/types.d.ts +0 -100
  122. package/dist/sol/jito/types.js +0 -5
  123. package/dist/sol/nozomi/client.d.ts +0 -63
  124. package/dist/sol/nozomi/client.js +0 -222
  125. package/dist/sol/nozomi/index.d.ts +0 -8
  126. package/dist/sol/nozomi/index.js +0 -8
  127. package/dist/sol/nozomi/tip.d.ts +0 -50
  128. package/dist/sol/nozomi/tip.js +0 -80
  129. package/dist/sol/nozomi/types.d.ts +0 -96
  130. package/dist/sol/nozomi/types.js +0 -5
  131. package/dist/sol/token/create-complete.d.ts +0 -115
  132. package/dist/sol/token/create-complete.js +0 -235
  133. package/dist/sol/token/create-token.d.ts +0 -57
  134. package/dist/sol/token/create-token.js +0 -230
  135. package/dist/sol/token/index.d.ts +0 -9
  136. package/dist/sol/token/index.js +0 -14
  137. package/dist/sol/token/metadata-upload.d.ts +0 -86
  138. package/dist/sol/token/metadata-upload.js +0 -173
  139. package/dist/sol/token/metadata.d.ts +0 -92
  140. package/dist/sol/token/metadata.js +0 -274
  141. package/dist/sol/token/types.d.ts +0 -153
  142. package/dist/sol/token/types.js +0 -5
  143. package/dist/sol/types.d.ts +0 -176
  144. package/dist/sol/types.js +0 -7
  145. package/dist/sol/utils/balance.d.ts +0 -160
  146. package/dist/sol/utils/balance.js +0 -638
  147. package/dist/sol/utils/connection.d.ts +0 -78
  148. package/dist/sol/utils/connection.js +0 -168
  149. package/dist/sol/utils/index.d.ts +0 -9
  150. package/dist/sol/utils/index.js +0 -9
  151. package/dist/sol/utils/lp-inspect.d.ts +0 -129
  152. package/dist/sol/utils/lp-inspect.js +0 -900
  153. package/dist/sol/utils/transfer.d.ts +0 -196
  154. package/dist/sol/utils/transfer.js +0 -307
  155. package/dist/sol/utils/wallet.d.ts +0 -107
  156. package/dist/sol/utils/wallet.js +0 -210
@@ -1,767 +0,0 @@
1
- /**
2
- * Jupiter Tokens API V2 (Beta)
3
- * @module sol/dex/jup/tokens
4
- *
5
- * Tokens API V2 提供更详细的代币信息查询
6
- * 包括市场数据、统计数据、审计信息等
7
- */
8
- import type { JupiterConfig } from './types.js';
9
- /** 时间段统计数据 */
10
- export interface TokenStats {
11
- /** 价格变化百分比 */
12
- priceChange?: number | null;
13
- /** 持有者变化 */
14
- holderChange?: number | null;
15
- /** 流动性变化百分比 */
16
- liquidityChange?: number | null;
17
- /** 交易量变化百分比 */
18
- volumeChange?: number | null;
19
- /** 买入交易量 (USD) */
20
- buyVolume?: number | null;
21
- /** 卖出交易量 (USD) */
22
- sellVolume?: number | null;
23
- /** 有机买入交易量 */
24
- buyOrganicVolume?: number | null;
25
- /** 有机卖出交易量 */
26
- sellOrganicVolume?: number | null;
27
- /** 买入次数 */
28
- numBuys?: number | null;
29
- /** 卖出次数 */
30
- numSells?: number | null;
31
- /** 交易者数量 */
32
- numTraders?: number | null;
33
- /** 有机买家数量 */
34
- numOrganicBuyers?: number | null;
35
- /** 净买家数量 */
36
- numNetBuyers?: number | null;
37
- }
38
- /** 首个池子信息 */
39
- export interface TokenFirstPool {
40
- /** 池子地址 */
41
- id: string;
42
- /** 创建时间 */
43
- createdAt: string;
44
- }
45
- /** 代币审计信息 */
46
- export interface TokenAudit {
47
- /** 是否可疑 */
48
- isSus?: boolean | null;
49
- /** Mint 权限是否已禁用 */
50
- mintAuthorityDisabled?: boolean | null;
51
- /** 冻结权限是否已禁用 */
52
- freezeAuthorityDisabled?: boolean | null;
53
- /** 前几大持有者占比 */
54
- topHoldersPercentage?: number | null;
55
- /** 开发者余额占比 */
56
- devBalancePercentage?: number | null;
57
- /** 开发者迁移次数 */
58
- devMigrations?: number | null;
59
- }
60
- /** APY 信息 */
61
- export interface TokenApy {
62
- /** Jupiter Earn APY */
63
- jupEarn?: number;
64
- }
65
- /** 有机分数标签 */
66
- export type OrganicScoreLabel = 'high' | 'medium' | 'low';
67
- /** 代币详细信息 (V2) */
68
- export interface TokenInfoV2 {
69
- /** 代币 Mint 地址 */
70
- id: string;
71
- /** 代币名称 */
72
- name: string;
73
- /** 代币符号 */
74
- symbol: string;
75
- /** 图标 URL */
76
- icon?: string | null;
77
- /** 小数位数 */
78
- decimals: number;
79
- /** Twitter 链接 */
80
- twitter?: string | null;
81
- /** Telegram 链接 */
82
- telegram?: string | null;
83
- /** Discord 链接 */
84
- discord?: string | null;
85
- /** 官网链接 */
86
- website?: string | null;
87
- /** 开发者地址 */
88
- dev?: string | null;
89
- /** 流通供应量 */
90
- circSupply?: number | null;
91
- /** 总供应量 */
92
- totalSupply?: number | null;
93
- /** 代币程序地址 */
94
- tokenProgram: string;
95
- /** Mint 权限 */
96
- mintAuthority?: string | null;
97
- /** 冻结权限 */
98
- freezeAuthority?: string | null;
99
- /** 发射台 */
100
- launchpad?: string | null;
101
- /** 合作伙伴配置 */
102
- partnerConfig?: string | null;
103
- /** 毕业池子地址 */
104
- graduatedPool?: string | null;
105
- /** 毕业时间 */
106
- graduatedAt?: string | null;
107
- /** 持有者数量 */
108
- holderCount?: number | null;
109
- /** 完全稀释估值 (USD) */
110
- fdv?: number | null;
111
- /** 市值 (USD) */
112
- mcap?: number | null;
113
- /** 当前价格 (USD) */
114
- usdPrice?: number | null;
115
- /** 价格区块 ID */
116
- priceBlockId?: number | null;
117
- /** 流动性 (USD) */
118
- liquidity?: number | null;
119
- /** 5分钟统计 */
120
- stats5m?: TokenStats;
121
- /** 1小时统计 */
122
- stats1h?: TokenStats;
123
- /** 6小时统计 */
124
- stats6h?: TokenStats;
125
- /** 24小时统计 */
126
- stats24h?: TokenStats;
127
- /** 7天统计 */
128
- stats7d?: {
129
- priceChange?: number | null;
130
- };
131
- /** 30天统计 */
132
- stats30d?: {
133
- priceChange?: number | null;
134
- };
135
- /** 首个池子信息 */
136
- firstPool?: TokenFirstPool;
137
- /** 审计信息 */
138
- audit?: TokenAudit;
139
- /** APY 信息 */
140
- apy?: TokenApy;
141
- /** 有机分数 */
142
- organicScore?: number;
143
- /** 有机分数标签 */
144
- organicScoreLabel?: OrganicScoreLabel;
145
- /** CT 点赞数 */
146
- ctLikes?: number;
147
- /** 聪明钱 CT 点赞数 */
148
- smartCtLikes?: number;
149
- /** 是否已验证 */
150
- isVerified?: boolean | null;
151
- /** 中心化交易所列表 */
152
- cexes?: string[] | null;
153
- /** 标签列表 */
154
- tags?: string[] | null;
155
- /** 创建时间 */
156
- createdAt?: string;
157
- /** 更新时间 */
158
- updatedAt?: string;
159
- }
160
- /** 代币标签类型 */
161
- export type TokenTag = 'lst' | 'verified';
162
- /** 代币分类类型 */
163
- export type TokenCategory = 'toporganicscore' | 'toptraded' | 'toptrending';
164
- /** 时间间隔 */
165
- export type TokenInterval = '5m' | '1h' | '6h' | '24h';
166
- /**
167
- * 搜索代币 (V2)
168
- *
169
- * 通过符号、名称或 Mint 地址搜索代币,返回详细信息。
170
- *
171
- * @param query 搜索查询(符号/名称/Mint地址,多个用逗号分隔)
172
- * @param config Jupiter 配置
173
- * @returns 代币信息列表
174
- *
175
- * @example
176
- * ```typescript
177
- * import { Sol } from 'four-flap-meme-sdk'
178
- *
179
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
180
- *
181
- * // 按符号搜索
182
- * const results = await Sol.searchTokensV2('USDC')
183
- *
184
- * // 按 Mint 地址搜索
185
- * const usdcInfo = await Sol.searchTokensV2(
186
- * 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
187
- * )
188
- *
189
- * // 批量搜索多个 Mint
190
- * const tokens = await Sol.searchTokensV2(
191
- * 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v,So11111111111111111111111111111111111111112'
192
- * )
193
- *
194
- * tokens.forEach(token => {
195
- * console.log(`${token.symbol}: $${token.usdPrice}`)
196
- * console.log(` 市值: $${token.mcap?.toLocaleString()}`)
197
- * console.log(` 流动性: $${token.liquidity?.toLocaleString()}`)
198
- * console.log(` 24h变化: ${token.stats24h?.priceChange}%`)
199
- * })
200
- * ```
201
- */
202
- export declare function searchTokensV2(query: string, config?: JupiterConfig): Promise<TokenInfoV2[]>;
203
- /**
204
- * 获取单个代币信息 (V2)
205
- *
206
- * @param mint 代币 Mint 地址
207
- * @param config Jupiter 配置
208
- * @returns 代币信息或 null
209
- */
210
- export declare function getTokenInfoV2(mint: string, config?: JupiterConfig): Promise<TokenInfoV2 | null>;
211
- /**
212
- * 批量获取代币信息 (V2)
213
- *
214
- * @param mints 代币 Mint 地址数组(最多100个)
215
- * @param config Jupiter 配置
216
- * @returns 代币信息列表
217
- *
218
- * @example
219
- * ```typescript
220
- * const tokens = await Sol.batchGetTokenInfoV2([
221
- * 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
222
- * 'So11111111111111111111111111111111111111112', // SOL
223
- * 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', // USDT
224
- * ])
225
- * ```
226
- */
227
- export declare function batchGetTokenInfoV2(mints: string[], config?: JupiterConfig): Promise<TokenInfoV2[]>;
228
- /**
229
- * 按标签获取代币列表 (V2)
230
- *
231
- * 获取特定标签的所有代币,返回详细信息。
232
- *
233
- * @param tag 标签类型 ('lst' | 'verified')
234
- * @param config Jupiter 配置
235
- * @returns 代币信息列表
236
- *
237
- * @example
238
- * ```typescript
239
- * import { Sol } from 'four-flap-meme-sdk'
240
- *
241
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
242
- *
243
- * // 获取所有已验证代币
244
- * const verifiedTokens = await Sol.getTokensByTag('verified')
245
- * console.log(`共 ${verifiedTokens.length} 个已验证代币`)
246
- *
247
- * // 获取所有 LST (流动性质押代币)
248
- * const lstTokens = await Sol.getTokensByTag('lst')
249
- * lstTokens.forEach(token => {
250
- * console.log(`${token.symbol}: $${token.usdPrice}`)
251
- * })
252
- * ```
253
- */
254
- export declare function getTokensByTag(tag: TokenTag, config?: JupiterConfig): Promise<TokenInfoV2[]>;
255
- /**
256
- * 获取所有已验证代币 (V2)
257
- *
258
- * @param config Jupiter 配置
259
- * @returns 已验证代币列表
260
- *
261
- * @example
262
- * ```typescript
263
- * const verifiedTokens = await Sol.getVerifiedTokensV2()
264
- * verifiedTokens.forEach(token => {
265
- * console.log(`${token.symbol}: $${token.usdPrice}`)
266
- * })
267
- * ```
268
- */
269
- export declare function getVerifiedTokensV2(config?: JupiterConfig): Promise<TokenInfoV2[]>;
270
- /**
271
- * 获取所有 LST (流动性质押代币) (V2)
272
- *
273
- * LST = Liquid Staking Tokens (如 mSOL, jitoSOL, bSOL 等)
274
- *
275
- * @param config Jupiter 配置
276
- * @returns LST 代币列表
277
- *
278
- * @example
279
- * ```typescript
280
- * const lstTokens = await Sol.getLstTokensV2()
281
- * lstTokens.forEach(token => {
282
- * console.log(`${token.symbol}: $${token.usdPrice}`)
283
- * console.log(` 流动性: $${token.liquidity?.toLocaleString()}`)
284
- * })
285
- * ```
286
- */
287
- export declare function getLstTokensV2(config?: JupiterConfig): Promise<TokenInfoV2[]>;
288
- /**
289
- * 按分类获取热门代币 (V2)
290
- *
291
- * 获取不同交易分类的热门代币,结果会过滤掉 SOL、USDC 等通用代币。
292
- *
293
- * @param category 分类类型
294
- * @param interval 时间间隔
295
- * @param limit 返回数量(默认50,最多100)
296
- * @param config Jupiter 配置
297
- * @returns 代币信息列表
298
- *
299
- * @example
300
- * ```typescript
301
- * import { Sol } from 'four-flap-meme-sdk'
302
- *
303
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
304
- *
305
- * // 获取24小时内交易量最高的代币
306
- * const topTraded = await Sol.getTopTokensV2('toptraded', '24h')
307
- *
308
- * // 获取1小时内最热门的代币
309
- * const trending = await Sol.getTopTokensV2('toptrending', '1h', 20)
310
- *
311
- * // 获取有机分数最高的代币
312
- * const topOrganic = await Sol.getTopTokensV2('toporganicscore', '6h')
313
- *
314
- * topTraded.forEach(token => {
315
- * console.log(`${token.symbol}: $${token.usdPrice}`)
316
- * console.log(` 24h交易量: $${(token.stats24h?.buyVolume ?? 0) + (token.stats24h?.sellVolume ?? 0)}`)
317
- * })
318
- * ```
319
- */
320
- export declare function getTopTokensV2(category: TokenCategory, interval: TokenInterval, limit?: number, config?: JupiterConfig): Promise<TokenInfoV2[]>;
321
- /**
322
- * 获取交易量最高的代币 (V2)
323
- *
324
- * @param interval 时间间隔
325
- * @param limit 返回数量
326
- * @param config Jupiter 配置
327
- * @returns 代币列表
328
- */
329
- export declare function getTopTradedTokensV2(interval?: TokenInterval, limit?: number, config?: JupiterConfig): Promise<TokenInfoV2[]>;
330
- /**
331
- * 获取最热门的代币 (V2)
332
- *
333
- * @param interval 时间间隔
334
- * @param limit 返回数量
335
- * @param config Jupiter 配置
336
- * @returns 代币列表
337
- */
338
- export declare function getTrendingTokensV2(interval?: TokenInterval, limit?: number, config?: JupiterConfig): Promise<TokenInfoV2[]>;
339
- /**
340
- * 获取有机分数最高的代币 (V2)
341
- *
342
- * @param interval 时间间隔
343
- * @param limit 返回数量
344
- * @param config Jupiter 配置
345
- * @returns 代币列表
346
- */
347
- export declare function getTopOrganicTokensV2(interval?: TokenInterval, limit?: number, config?: JupiterConfig): Promise<TokenInfoV2[]>;
348
- /**
349
- * 获取最近的代币 (V2)
350
- *
351
- * 获取最近创建或上市的代币列表。
352
- *
353
- * @param config Jupiter 配置
354
- * @returns 代币信息列表
355
- *
356
- * @example
357
- * ```typescript
358
- * import { Sol } from 'four-flap-meme-sdk'
359
- *
360
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
361
- *
362
- * // 获取最近的代币
363
- * const recentTokens = await Sol.getRecentTokensV2()
364
- *
365
- * recentTokens.forEach(token => {
366
- * console.log(`${token.symbol}: $${token.usdPrice}`)
367
- * console.log(` 创建于: ${token.firstPool?.createdAt}`)
368
- * console.log(` 发射台: ${token.launchpad || '无'}`)
369
- * })
370
- * ```
371
- */
372
- export declare function getRecentTokensV2(config?: JupiterConfig): Promise<TokenInfoV2[]>;
373
- /** 内容类型 */
374
- export type TokenContentType = 'text' | 'tweet';
375
- /** 内容状态 */
376
- export type TokenContentStatus = 'pending' | 'approved';
377
- /** 提交者/更新者信息 */
378
- export interface TokenContentUser {
379
- /** 用户 ID */
380
- id: string;
381
- /** 用户名 */
382
- username: string;
383
- /** 角色 */
384
- role: string;
385
- }
386
- /** 单条内容 */
387
- export interface TokenContent {
388
- /** 内容 ID */
389
- contentId: string;
390
- /** 内容正文 */
391
- content: string;
392
- /** 内容类型 */
393
- contentType: TokenContentType;
394
- /** 状态 */
395
- status: TokenContentStatus;
396
- /** 来源 */
397
- source?: string | null;
398
- /** 提交时间 */
399
- submittedAt: string;
400
- /** 提交者 */
401
- submittedBy: TokenContentUser;
402
- /** 更新时间 */
403
- updatedAt?: string | null;
404
- /** 更新者 */
405
- updatedBy: TokenContentUser;
406
- /** 发布时间 */
407
- postedAt?: string | null;
408
- }
409
- /** 摘要信息 */
410
- export interface TokenSummary {
411
- /** 完整摘要 */
412
- summaryFull?: string | null;
413
- /** 简短摘要 */
414
- summaryShort?: string | null;
415
- /** 更新时间 */
416
- updatedAt: string;
417
- /** 引用来源 */
418
- citations: string[];
419
- }
420
- /** 代币内容数据 */
421
- export interface TokenContentData {
422
- /** 代币 Mint 地址 */
423
- mint: string;
424
- /** 内容列表 */
425
- contents: TokenContent[];
426
- /** 代币摘要 (可能为 null) */
427
- tokenSummary: TokenSummary | null;
428
- /** 新闻摘要 (可能为 null) */
429
- newsSummary: TokenSummary | null;
430
- }
431
- /** 获取内容响应 */
432
- export interface TokenContentResponse {
433
- /** 内容数据列表 */
434
- data: TokenContentData[];
435
- }
436
- /** 分页信息 */
437
- export interface TokenContentPagination {
438
- /** 每页数量 */
439
- limit: number;
440
- /** 总数 */
441
- total: number;
442
- /** 当前页 */
443
- page: number;
444
- /** 总页数 */
445
- totalPages: number;
446
- }
447
- /** Feed 内容数据 */
448
- export interface TokenContentFeedData {
449
- /** 内容列表 */
450
- contents: TokenContent[];
451
- /** 代币摘要 */
452
- tokenSummary: TokenSummary | null;
453
- /** 新闻摘要 */
454
- newsSummary: TokenSummary | null;
455
- /** 分页信息 */
456
- pagination: TokenContentPagination;
457
- }
458
- /** Feed 响应 */
459
- export interface TokenContentFeedResponse {
460
- /** Feed 数据 */
461
- data: TokenContentFeedData;
462
- }
463
- /** Feed 请求参数 */
464
- export interface TokenContentFeedParams {
465
- /** 代币 Mint 地址 */
466
- mint: string;
467
- /** 页码 (默认: 1) */
468
- page?: number;
469
- /** 每页数量 (默认: 50, 最大: 100) */
470
- limit?: number;
471
- }
472
- /**
473
- * 获取代币内容 (V2)
474
- *
475
- * 获取代币的相关内容,包括文章、推文、摘要等。
476
- *
477
- * @param mints 代币 Mint 地址数组(最多50个)
478
- * @param config Jupiter 配置
479
- * @returns 代币内容响应
480
- *
481
- * @example
482
- * ```typescript
483
- * import { Sol } from 'four-flap-meme-sdk'
484
- *
485
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
486
- *
487
- * // 获取代币内容
488
- * const response = await Sol.getTokenContentV2([
489
- * 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN',
490
- * 'So11111111111111111111111111111111111111112',
491
- * ])
492
- *
493
- * response.data.forEach(item => {
494
- * console.log(`代币: ${item.mint}`)
495
- *
496
- * // 代币摘要
497
- * if (item.tokenSummary.summaryShort) {
498
- * console.log(`摘要: ${item.tokenSummary.summaryShort}`)
499
- * }
500
- *
501
- * // 新闻摘要
502
- * if (item.newsSummary.summaryShort) {
503
- * console.log(`新闻: ${item.newsSummary.summaryShort}`)
504
- * }
505
- *
506
- * // 内容列表
507
- * item.contents.forEach(content => {
508
- * console.log(`[${content.contentType}] ${content.content.slice(0, 100)}...`)
509
- * })
510
- * })
511
- * ```
512
- */
513
- export declare function getTokenContentV2(mints: string[], config?: JupiterConfig): Promise<TokenContentResponse>;
514
- /**
515
- * 获取单个代币内容 (V2)
516
- *
517
- * @param mint 代币 Mint 地址
518
- * @param config Jupiter 配置
519
- * @returns 代币内容数据或 null
520
- */
521
- export declare function getSingleTokenContentV2(mint: string, config?: JupiterConfig): Promise<TokenContentData | null>;
522
- /**
523
- * 获取代币摘要 (V2)
524
- *
525
- * @param mint 代币 Mint 地址
526
- * @param config Jupiter 配置
527
- * @returns 代币摘要或 null
528
- */
529
- export declare function getTokenSummaryV2(mint: string, config?: JupiterConfig): Promise<{
530
- token: TokenSummary | null;
531
- news: TokenSummary | null;
532
- } | null>;
533
- /**
534
- * 获取代币推文内容 (V2)
535
- *
536
- * @param mint 代币 Mint 地址
537
- * @param config Jupiter 配置
538
- * @returns 推文内容列表
539
- */
540
- export declare function getTokenTweetsV2(mint: string, config?: JupiterConfig): Promise<TokenContent[]>;
541
- /**
542
- * 获取代币文章内容 (V2)
543
- *
544
- * @param mint 代币 Mint 地址
545
- * @param config Jupiter 配置
546
- * @returns 文章内容列表
547
- */
548
- export declare function getTokenArticlesV2(mint: string, config?: JupiterConfig): Promise<TokenContent[]>;
549
- /**
550
- * 获取 Cooking 代币内容 (V2)
551
- *
552
- * 获取正在 "cooking"(酝酿中/热门)的代币内容列表。
553
- *
554
- * @param config Jupiter 配置
555
- * @returns 代币内容响应
556
- *
557
- * @example
558
- * ```typescript
559
- * import { Sol } from 'four-flap-meme-sdk'
560
- *
561
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
562
- *
563
- * // 获取 cooking 代币内容
564
- * const response = await Sol.getCookingTokenContentV2()
565
- *
566
- * response.data.forEach(item => {
567
- * console.log(`代币: ${item.mint}`)
568
- *
569
- * // 代币摘要
570
- * if (item.tokenSummary?.summaryShort) {
571
- * console.log(`摘要: ${item.tokenSummary.summaryShort}`)
572
- * }
573
- *
574
- * // 新闻摘要
575
- * if (item.newsSummary?.summaryShort) {
576
- * console.log(`新闻: ${item.newsSummary.summaryShort}`)
577
- * }
578
- *
579
- * // 内容列表
580
- * item.contents.forEach(content => {
581
- * console.log(`[${content.contentType}] ${content.content}`)
582
- * })
583
- * })
584
- * ```
585
- */
586
- export declare function getCookingTokenContentV2(config?: JupiterConfig): Promise<TokenContentResponse>;
587
- /**
588
- * 获取代币内容 Feed (V2) - 带分页
589
- *
590
- * 获取单个代币的内容 feed,支持分页。
591
- *
592
- * @param params 请求参数
593
- * @param config Jupiter 配置
594
- * @returns Feed 响应
595
- *
596
- * @example
597
- * ```typescript
598
- * import { Sol } from 'four-flap-meme-sdk'
599
- *
600
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
601
- *
602
- * // 获取代币内容 feed
603
- * const response = await Sol.getTokenContentFeedV2({
604
- * mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
605
- * page: 1,
606
- * limit: 50,
607
- * })
608
- *
609
- * const { data } = response
610
- *
611
- * // 分页信息
612
- * console.log(`第 ${data.pagination.page}/${data.pagination.totalPages} 页`)
613
- * console.log(`共 ${data.pagination.total} 条内容`)
614
- *
615
- * // 代币摘要
616
- * if (data.tokenSummary?.summaryShort) {
617
- * console.log(`简介: ${data.tokenSummary.summaryShort}`)
618
- * }
619
- *
620
- * // 新闻摘要
621
- * if (data.newsSummary?.summaryShort) {
622
- * console.log(`新闻: ${data.newsSummary.summaryShort}`)
623
- * }
624
- *
625
- * // 内容列表
626
- * data.contents.forEach(content => {
627
- * console.log(`[${content.contentType}] ${content.content}`)
628
- * console.log(` 发布于: ${content.postedAt}`)
629
- * })
630
- * ```
631
- */
632
- export declare function getTokenContentFeedV2(params: TokenContentFeedParams, config?: JupiterConfig): Promise<TokenContentFeedResponse>;
633
- /**
634
- * 获取代币所有内容 (V2) - 自动分页
635
- *
636
- * @param mint 代币 Mint 地址
637
- * @param config Jupiter 配置
638
- * @returns 所有内容列表
639
- */
640
- export declare function getAllTokenContentFeedV2(mint: string, config?: JupiterConfig): Promise<TokenContent[]>;
641
- /**
642
- * 获取代币内容 Feed 简化版 (V2)
643
- *
644
- * @param mint 代币 Mint 地址
645
- * @param page 页码
646
- * @param limit 每页数量
647
- * @param config Jupiter 配置
648
- * @returns Feed 响应
649
- */
650
- export declare function getTokenFeedV2(mint: string, page?: number, limit?: number, config?: JupiterConfig): Promise<TokenContentFeedResponse>;
651
- /**
652
- * 检查代币是否有内容/摘要 (V2)
653
- *
654
- * @param contentData 代币内容数据
655
- * @returns 是否有内容
656
- */
657
- export declare function hasTokenContent(contentData: TokenContentData): boolean;
658
- /**
659
- * 获取代币所有引用来源 (V2)
660
- *
661
- * @param contentData 代币内容数据
662
- * @returns 去重后的引用来源列表
663
- */
664
- export declare function getAllCitations(contentData: TokenContentData): string[];
665
- /**
666
- * 获取代币价格 (V2)
667
- *
668
- * @param mint 代币 Mint 地址
669
- * @param config Jupiter 配置
670
- * @returns 价格 (USD) 或 null
671
- */
672
- export declare function getTokenPriceV2(mint: string, config?: JupiterConfig): Promise<number | null>;
673
- /**
674
- * 批量获取代币价格 (V2)
675
- *
676
- * @param mints 代币 Mint 地址数组
677
- * @param config Jupiter 配置
678
- * @returns Mint -> 价格 映射
679
- */
680
- export declare function batchGetTokenPricesV2(mints: string[], config?: JupiterConfig): Promise<Map<string, number | null>>;
681
- /**
682
- * 获取代币市场数据 (V2)
683
- *
684
- * @param mint 代币 Mint 地址
685
- * @param config Jupiter 配置
686
- * @returns 市场数据
687
- */
688
- export declare function getTokenMarketDataV2(mint: string, config?: JupiterConfig): Promise<{
689
- price: number | null;
690
- fdv: number | null;
691
- mcap: number | null;
692
- liquidity: number | null;
693
- volume24h: number | null;
694
- priceChange24h: number | null;
695
- } | null>;
696
- /**
697
- * 检查代币是否安全 (V2)
698
- *
699
- * @param mint 代币 Mint 地址
700
- * @param config Jupiter 配置
701
- * @returns 安全检查结果
702
- */
703
- export declare function checkTokenSafetyV2(mint: string, config?: JupiterConfig): Promise<{
704
- isSafe: boolean;
705
- isVerified: boolean;
706
- isSus: boolean;
707
- mintAuthorityDisabled: boolean;
708
- freezeAuthorityDisabled: boolean;
709
- topHoldersPercentage: number | null;
710
- devBalancePercentage: number | null;
711
- organicScore: number;
712
- organicScoreLabel: OrganicScoreLabel;
713
- warnings: string[];
714
- } | null>;
715
- /**
716
- * 获取代币统计摘要 (V2)
717
- *
718
- * @param mint 代币 Mint 地址
719
- * @param config Jupiter 配置
720
- * @returns 统计摘要
721
- */
722
- export declare function getTokenStatsSummaryV2(mint: string, config?: JupiterConfig): Promise<{
723
- symbol: string;
724
- price: number | null;
725
- priceChange: {
726
- '5m': number | null;
727
- '1h': number | null;
728
- '6h': number | null;
729
- '24h': number | null;
730
- '7d': number | null;
731
- '30d': number | null;
732
- };
733
- volume24h: number | null;
734
- liquidity: number | null;
735
- mcap: number | null;
736
- holderCount: number | null;
737
- numTraders24h: number | null;
738
- } | null>;
739
- /**
740
- * 搜索热门代币 (按有机分数)
741
- *
742
- * @param query 搜索查询
743
- * @param config Jupiter 配置
744
- * @returns 按有机分数排序的代币列表
745
- */
746
- export declare function searchTrendingTokensV2(query: string, config?: JupiterConfig): Promise<TokenInfoV2[]>;
747
- /**
748
- * 筛选已验证代币
749
- *
750
- * @param tokens 代币列表
751
- * @returns 已验证的代币
752
- */
753
- export declare function filterVerifiedTokens(tokens: TokenInfoV2[]): TokenInfoV2[];
754
- /**
755
- * 筛选高有机分数代币
756
- *
757
- * @param tokens 代币列表
758
- * @returns 高有机分数代币
759
- */
760
- export declare function filterHighOrganicTokens(tokens: TokenInfoV2[]): TokenInfoV2[];
761
- /**
762
- * 计算代币买卖比
763
- *
764
- * @param stats 统计数据
765
- * @returns 买卖比 (买入量/卖出量)
766
- */
767
- export declare function calculateBuySellRatio(stats: TokenStats): number | null;