four-flap-meme-sdk 1.5.6 → 1.5.9

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 (160) hide show
  1. package/README.zh-CN.pdf +0 -0
  2. package/dist/abis/common.js +2 -0
  3. package/dist/contracts/tm-bundle-merkle/config.d.ts +0 -1
  4. package/dist/contracts/tm-bundle-merkle/config.js +0 -1
  5. package/dist/contracts/tm-bundle-merkle/core.js +13 -9
  6. package/dist/contracts/tm-bundle-merkle/submit.js +58 -0
  7. package/dist/flap/portal-bundle-merkle/config.d.ts +0 -1
  8. package/dist/flap/portal-bundle-merkle/config.js +0 -1
  9. package/dist/flap/portal-bundle-merkle/create-to-dex.d.ts +8 -2
  10. package/dist/flap/portal-bundle-merkle/create-to-dex.js +170 -128
  11. package/dist/flap/portal-bundle-merkle/encryption.d.ts +16 -0
  12. package/dist/flap/portal-bundle-merkle/encryption.js +146 -0
  13. package/dist/flap/portal-bundle-merkle/private.js +8 -4
  14. package/dist/index.d.ts +0 -1
  15. package/dist/index.js +1 -1
  16. package/package.json +5 -41
  17. package/dist/sol/constants.d.ts +0 -150
  18. package/dist/sol/constants.js +0 -188
  19. package/dist/sol/dex/blockrazor/client.d.ts +0 -51
  20. package/dist/sol/dex/blockrazor/client.js +0 -96
  21. package/dist/sol/dex/blockrazor/constants.d.ts +0 -34
  22. package/dist/sol/dex/blockrazor/constants.js +0 -55
  23. package/dist/sol/dex/blockrazor/geyser.d.ts +0 -128
  24. package/dist/sol/dex/blockrazor/geyser.js +0 -530
  25. package/dist/sol/dex/blockrazor/index.d.ts +0 -18
  26. package/dist/sol/dex/blockrazor/index.js +0 -23
  27. package/dist/sol/dex/blockrazor/send.d.ts +0 -135
  28. package/dist/sol/dex/blockrazor/send.js +0 -254
  29. package/dist/sol/dex/blockrazor/types.d.ts +0 -191
  30. package/dist/sol/dex/blockrazor/types.js +0 -5
  31. package/dist/sol/dex/index.d.ts +0 -10
  32. package/dist/sol/dex/index.js +0 -16
  33. package/dist/sol/dex/jup/client.d.ts +0 -33
  34. package/dist/sol/dex/jup/client.js +0 -110
  35. package/dist/sol/dex/jup/index.d.ts +0 -16
  36. package/dist/sol/dex/jup/index.js +0 -148
  37. package/dist/sol/dex/jup/legacy.d.ts +0 -623
  38. package/dist/sol/dex/jup/legacy.js +0 -416
  39. package/dist/sol/dex/jup/lend.d.ts +0 -640
  40. package/dist/sol/dex/jup/lend.js +0 -603
  41. package/dist/sol/dex/jup/portfolio.d.ts +0 -362
  42. package/dist/sol/dex/jup/portfolio.js +0 -367
  43. package/dist/sol/dex/jup/price.d.ts +0 -173
  44. package/dist/sol/dex/jup/price.js +0 -220
  45. package/dist/sol/dex/jup/recurring.d.ts +0 -437
  46. package/dist/sol/dex/jup/recurring.js +0 -320
  47. package/dist/sol/dex/jup/send.d.ts +0 -282
  48. package/dist/sol/dex/jup/send.js +0 -295
  49. package/dist/sol/dex/jup/studio.d.ts +0 -457
  50. package/dist/sol/dex/jup/studio.js +0 -488
  51. package/dist/sol/dex/jup/tokens.d.ts +0 -767
  52. package/dist/sol/dex/jup/tokens.js +0 -697
  53. package/dist/sol/dex/jup/trigger.d.ts +0 -511
  54. package/dist/sol/dex/jup/trigger.js +0 -397
  55. package/dist/sol/dex/jup/types.d.ts +0 -433
  56. package/dist/sol/dex/jup/types.js +0 -5
  57. package/dist/sol/dex/jup/ultra.d.ts +0 -646
  58. package/dist/sol/dex/jup/ultra.js +0 -853
  59. package/dist/sol/dex/meteora/client.d.ts +0 -76
  60. package/dist/sol/dex/meteora/client.js +0 -219
  61. package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +0 -61
  62. package/dist/sol/dex/meteora/damm-v1-bundle.js +0 -112
  63. package/dist/sol/dex/meteora/damm-v1.d.ts +0 -118
  64. package/dist/sol/dex/meteora/damm-v1.js +0 -315
  65. package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +0 -82
  66. package/dist/sol/dex/meteora/damm-v2-bundle.js +0 -242
  67. package/dist/sol/dex/meteora/damm-v2.d.ts +0 -172
  68. package/dist/sol/dex/meteora/damm-v2.js +0 -632
  69. package/dist/sol/dex/meteora/dbc-bundle.d.ts +0 -123
  70. package/dist/sol/dex/meteora/dbc-bundle.js +0 -304
  71. package/dist/sol/dex/meteora/dbc.d.ts +0 -192
  72. package/dist/sol/dex/meteora/dbc.js +0 -619
  73. package/dist/sol/dex/meteora/dlmm-bundle.d.ts +0 -39
  74. package/dist/sol/dex/meteora/dlmm-bundle.js +0 -189
  75. package/dist/sol/dex/meteora/dlmm.d.ts +0 -157
  76. package/dist/sol/dex/meteora/dlmm.js +0 -671
  77. package/dist/sol/dex/meteora/index.d.ts +0 -25
  78. package/dist/sol/dex/meteora/index.js +0 -65
  79. package/dist/sol/dex/meteora/types.d.ts +0 -787
  80. package/dist/sol/dex/meteora/types.js +0 -110
  81. package/dist/sol/dex/orca/index.d.ts +0 -10
  82. package/dist/sol/dex/orca/index.js +0 -16
  83. package/dist/sol/dex/orca/orca-bundle.d.ts +0 -41
  84. package/dist/sol/dex/orca/orca-bundle.js +0 -173
  85. package/dist/sol/dex/orca/orca.d.ts +0 -65
  86. package/dist/sol/dex/orca/orca.js +0 -474
  87. package/dist/sol/dex/orca/types.d.ts +0 -263
  88. package/dist/sol/dex/orca/types.js +0 -38
  89. package/dist/sol/dex/orca/wavebreak-bundle.d.ts +0 -34
  90. package/dist/sol/dex/orca/wavebreak-bundle.js +0 -198
  91. package/dist/sol/dex/orca/wavebreak-types.d.ts +0 -227
  92. package/dist/sol/dex/orca/wavebreak-types.js +0 -23
  93. package/dist/sol/dex/orca/wavebreak.d.ts +0 -78
  94. package/dist/sol/dex/orca/wavebreak.js +0 -497
  95. package/dist/sol/dex/pump/index.d.ts +0 -9
  96. package/dist/sol/dex/pump/index.js +0 -14
  97. package/dist/sol/dex/pump/pump-bundle.d.ts +0 -92
  98. package/dist/sol/dex/pump/pump-bundle.js +0 -383
  99. package/dist/sol/dex/pump/pump-swap-bundle.d.ts +0 -103
  100. package/dist/sol/dex/pump/pump-swap-bundle.js +0 -380
  101. package/dist/sol/dex/pump/pump-swap.d.ts +0 -46
  102. package/dist/sol/dex/pump/pump-swap.js +0 -199
  103. package/dist/sol/dex/pump/pump.d.ts +0 -35
  104. package/dist/sol/dex/pump/pump.js +0 -352
  105. package/dist/sol/dex/pump/types.d.ts +0 -215
  106. package/dist/sol/dex/pump/types.js +0 -5
  107. package/dist/sol/dex/raydium/index.d.ts +0 -8
  108. package/dist/sol/dex/raydium/index.js +0 -12
  109. package/dist/sol/dex/raydium/launchlab.d.ts +0 -68
  110. package/dist/sol/dex/raydium/launchlab.js +0 -210
  111. package/dist/sol/dex/raydium/raydium-bundle.d.ts +0 -64
  112. package/dist/sol/dex/raydium/raydium-bundle.js +0 -324
  113. package/dist/sol/dex/raydium/raydium.d.ts +0 -40
  114. package/dist/sol/dex/raydium/raydium.js +0 -366
  115. package/dist/sol/dex/raydium/types.d.ts +0 -240
  116. package/dist/sol/dex/raydium/types.js +0 -5
  117. package/dist/sol/index.d.ts +0 -11
  118. package/dist/sol/index.js +0 -18
  119. package/dist/sol/jito/bundle.d.ts +0 -90
  120. package/dist/sol/jito/bundle.js +0 -263
  121. package/dist/sol/jito/index.d.ts +0 -7
  122. package/dist/sol/jito/index.js +0 -7
  123. package/dist/sol/jito/tip.d.ts +0 -51
  124. package/dist/sol/jito/tip.js +0 -83
  125. package/dist/sol/jito/types.d.ts +0 -100
  126. package/dist/sol/jito/types.js +0 -5
  127. package/dist/sol/nozomi/client.d.ts +0 -63
  128. package/dist/sol/nozomi/client.js +0 -222
  129. package/dist/sol/nozomi/index.d.ts +0 -8
  130. package/dist/sol/nozomi/index.js +0 -8
  131. package/dist/sol/nozomi/tip.d.ts +0 -50
  132. package/dist/sol/nozomi/tip.js +0 -80
  133. package/dist/sol/nozomi/types.d.ts +0 -96
  134. package/dist/sol/nozomi/types.js +0 -5
  135. package/dist/sol/token/create-complete.d.ts +0 -115
  136. package/dist/sol/token/create-complete.js +0 -235
  137. package/dist/sol/token/create-token.d.ts +0 -57
  138. package/dist/sol/token/create-token.js +0 -230
  139. package/dist/sol/token/index.d.ts +0 -9
  140. package/dist/sol/token/index.js +0 -14
  141. package/dist/sol/token/metadata-upload.d.ts +0 -86
  142. package/dist/sol/token/metadata-upload.js +0 -173
  143. package/dist/sol/token/metadata.d.ts +0 -92
  144. package/dist/sol/token/metadata.js +0 -274
  145. package/dist/sol/token/types.d.ts +0 -153
  146. package/dist/sol/token/types.js +0 -5
  147. package/dist/sol/types.d.ts +0 -176
  148. package/dist/sol/types.js +0 -7
  149. package/dist/sol/utils/balance.d.ts +0 -160
  150. package/dist/sol/utils/balance.js +0 -638
  151. package/dist/sol/utils/connection.d.ts +0 -78
  152. package/dist/sol/utils/connection.js +0 -168
  153. package/dist/sol/utils/index.d.ts +0 -9
  154. package/dist/sol/utils/index.js +0 -9
  155. package/dist/sol/utils/lp-inspect.d.ts +0 -129
  156. package/dist/sol/utils/lp-inspect.js +0 -900
  157. package/dist/sol/utils/transfer.d.ts +0 -196
  158. package/dist/sol/utils/transfer.js +0 -307
  159. package/dist/sol/utils/wallet.d.ts +0 -107
  160. package/dist/sol/utils/wallet.js +0 -210
@@ -1,362 +0,0 @@
1
- /**
2
- * Jupiter Portfolio API V1
3
- * @module sol/dex/jup/portfolio
4
- *
5
- * Portfolio API 提供钱包投资组合/持仓查询
6
- * 包括各平台的 DeFi 头寸、代币持仓等
7
- */
8
- import type { JupiterConfig } from './types.js';
9
- /** Fetcher 报告 */
10
- export interface FetcherReport {
11
- /** Fetcher ID */
12
- id: string;
13
- /** 状态 */
14
- status: string;
15
- /** 耗时 (ms) */
16
- duration: number;
17
- }
18
- /** 投资组合元素 */
19
- export interface PortfolioElement {
20
- /** 类型 */
21
- type: string;
22
- /** 数据 */
23
- data: Record<string, unknown>;
24
- /** 标签 */
25
- label: string;
26
- /** 网络 ID */
27
- networkId: string;
28
- /** 平台 ID */
29
- platformId: string;
30
- /** 价值 (USD) */
31
- value: number;
32
- /** Fetcher ID */
33
- fetcherId: string;
34
- }
35
- /** 投资组合响应 */
36
- export interface PortfolioResponse {
37
- /** 查询时间戳 */
38
- date: number;
39
- /** 钱包地址 */
40
- owner: string;
41
- /** Fetcher 报告列表 */
42
- fetcherReports: FetcherReport[];
43
- /** 投资组合元素列表 */
44
- elements: PortfolioElement[];
45
- /** 查询耗时 (ms) */
46
- duration: number;
47
- /** 代币信息 */
48
- tokenInfo: Record<string, unknown>;
49
- }
50
- /** 获取投资组合参数 */
51
- export interface GetPortfolioParams {
52
- /** 钱包地址 */
53
- address: string;
54
- /** 平台 ID 列表(可选,逗号分隔) */
55
- platforms?: string;
56
- }
57
- /** 解锁中的 JUP */
58
- export interface UnstakingJup {
59
- /** 数量 */
60
- amount: number;
61
- /** 解锁时间 (Unix 时间戳) */
62
- until: number;
63
- }
64
- /** JUP 质押信息 */
65
- export interface StakedJupInfo {
66
- /** 已质押数量 */
67
- stakedAmount: number;
68
- /** 解锁中的列表 */
69
- unstaking: UnstakingJup[];
70
- }
71
- /** 平台链接 */
72
- export interface PlatformLinks {
73
- /** 官网 */
74
- website?: string;
75
- /** Discord */
76
- discord?: string;
77
- /** Telegram */
78
- telegram?: string;
79
- /** Twitter */
80
- twitter?: string;
81
- /** GitHub */
82
- github?: string;
83
- /** Medium */
84
- medium?: string;
85
- /** 文档 */
86
- documentation?: string;
87
- }
88
- /** 平台信息 */
89
- export interface PlatformInfo {
90
- /** 平台 ID */
91
- id: string;
92
- /** 名称 */
93
- name: string;
94
- /** 图标 URL */
95
- image: string;
96
- /** 描述 */
97
- description: string;
98
- /** DefiLlama ID */
99
- defiLlamaId: string;
100
- /** 是否已弃用 */
101
- isDeprecated: boolean;
102
- /** 代币列表 */
103
- tokens: string[];
104
- /** 标签列表 */
105
- tags: string[];
106
- /** 链接 */
107
- links: PlatformLinks;
108
- }
109
- /**
110
- * 获取钱包投资组合 (V1)
111
- *
112
- * 查询钱包在各 DeFi 平台的持仓情况。
113
- *
114
- * @param params 查询参数
115
- * @param config Jupiter 配置
116
- * @returns 投资组合响应
117
- *
118
- * @example
119
- * ```typescript
120
- * import { Sol } from 'four-flap-meme-sdk'
121
- *
122
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
123
- *
124
- * // 获取钱包投资组合
125
- * const portfolio = await Sol.getPortfolio({
126
- * address: 'YourWalletAddress...',
127
- * })
128
- *
129
- * console.log(`钱包: ${portfolio.owner}`)
130
- * console.log(`查询时间: ${new Date(portfolio.date * 1000)}`)
131
- * console.log(`耗时: ${portfolio.duration}ms`)
132
- *
133
- * // 遍历投资组合元素
134
- * portfolio.elements.forEach(element => {
135
- * console.log(`[${element.platformId}] ${element.label}`)
136
- * console.log(` 类型: ${element.type}`)
137
- * console.log(` 价值: $${element.value}`)
138
- * })
139
- *
140
- * // 按平台筛选
141
- * const raydiumOnly = await Sol.getPortfolio({
142
- * address: 'YourWalletAddress...',
143
- * platforms: 'raydium',
144
- * })
145
- * ```
146
- */
147
- export declare function getPortfolio(params: GetPortfolioParams, config?: JupiterConfig): Promise<PortfolioResponse>;
148
- /**
149
- * 获取钱包投资组合(简化版)
150
- *
151
- * @param address 钱包地址
152
- * @param platforms 平台 ID 数组(可选)
153
- * @param config Jupiter 配置
154
- * @returns 投资组合响应
155
- */
156
- export declare function getWalletPortfolio(address: string, platforms?: string[], config?: JupiterConfig): Promise<PortfolioResponse>;
157
- /**
158
- * 获取 JUP 质押信息
159
- *
160
- * @param address 钱包地址
161
- * @param config Jupiter 配置
162
- * @returns JUP 质押信息
163
- *
164
- * @example
165
- * ```typescript
166
- * import { Sol } from 'four-flap-meme-sdk'
167
- *
168
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
169
- *
170
- * const staked = await Sol.getStakedJup('YourWalletAddress...')
171
- *
172
- * console.log(`已质押: ${staked.stakedAmount} JUP`)
173
- *
174
- * if (staked.unstaking.length > 0) {
175
- * console.log('解锁中:')
176
- * staked.unstaking.forEach(u => {
177
- * const unlockDate = new Date(u.until * 1000)
178
- * console.log(` ${u.amount} JUP - ${unlockDate.toLocaleString()}`)
179
- * })
180
- * }
181
- * ```
182
- */
183
- export declare function getStakedJup(address: string, config?: JupiterConfig): Promise<StakedJupInfo>;
184
- /**
185
- * 获取 JUP 质押总量
186
- *
187
- * @param address 钱包地址
188
- * @param config Jupiter 配置
189
- * @returns 已质押的 JUP 数量
190
- */
191
- export declare function getStakedJupAmount(address: string, config?: JupiterConfig): Promise<number>;
192
- /**
193
- * 获取解锁中的 JUP 总量
194
- *
195
- * @param address 钱包地址
196
- * @param config Jupiter 配置
197
- * @returns 解锁中的 JUP 总量
198
- */
199
- export declare function getUnstakingJupAmount(address: string, config?: JupiterConfig): Promise<number>;
200
- /**
201
- * 检查是否有即将解锁的 JUP
202
- *
203
- * @param address 钱包地址
204
- * @param withinHours 在多少小时内(默认 24)
205
- * @param config Jupiter 配置
206
- * @returns 即将解锁的列表
207
- */
208
- export declare function getUpcomingUnlocks(address: string, withinHours?: number, config?: JupiterConfig): Promise<UnstakingJup[]>;
209
- /**
210
- * 获取所有平台列表
211
- *
212
- * @param config Jupiter 配置
213
- * @returns 平台信息列表
214
- *
215
- * @example
216
- * ```typescript
217
- * import { Sol } from 'four-flap-meme-sdk'
218
- *
219
- * Sol.setJupiterConfig({ apiKey: 'your-api-key' })
220
- *
221
- * const platforms = await Sol.getPlatforms()
222
- *
223
- * platforms.forEach(p => {
224
- * console.log(`[${p.id}] ${p.name}`)
225
- * console.log(` ${p.description}`)
226
- * console.log(` 标签: ${p.tags.join(', ')}`)
227
- * if (p.links.website) {
228
- * console.log(` 网站: ${p.links.website}`)
229
- * }
230
- * })
231
- * ```
232
- */
233
- export declare function getPlatforms(config?: JupiterConfig): Promise<PlatformInfo[]>;
234
- /**
235
- * 获取平台 ID 列表
236
- *
237
- * @param config Jupiter 配置
238
- * @returns 平台 ID 数组
239
- */
240
- export declare function getPlatformIds(config?: JupiterConfig): Promise<string[]>;
241
- /**
242
- * 获取活跃平台列表(非弃用)
243
- *
244
- * @param config Jupiter 配置
245
- * @returns 活跃平台列表
246
- */
247
- export declare function getActivePlatforms(config?: JupiterConfig): Promise<PlatformInfo[]>;
248
- /**
249
- * 按标签筛选平台
250
- *
251
- * @param tag 标签
252
- * @param config Jupiter 配置
253
- * @returns 匹配的平台列表
254
- */
255
- export declare function getPlatformsByTag(tag: string, config?: JupiterConfig): Promise<PlatformInfo[]>;
256
- /**
257
- * 搜索平台
258
- *
259
- * @param keyword 关键词(搜索名称和描述)
260
- * @param config Jupiter 配置
261
- * @returns 匹配的平台列表
262
- */
263
- export declare function searchPlatforms(keyword: string, config?: JupiterConfig): Promise<PlatformInfo[]>;
264
- /**
265
- * 获取平台详情
266
- *
267
- * @param platformId 平台 ID
268
- * @param config Jupiter 配置
269
- * @returns 平台信息或 null
270
- */
271
- export declare function getPlatformById(platformId: string, config?: JupiterConfig): Promise<PlatformInfo | null>;
272
- /**
273
- * 获取投资组合总价值
274
- *
275
- * @param address 钱包地址
276
- * @param config Jupiter 配置
277
- * @returns 总价值 (USD)
278
- */
279
- export declare function getPortfolioTotalValue(address: string, config?: JupiterConfig): Promise<number>;
280
- /**
281
- * 获取按平台分组的投资组合
282
- *
283
- * @param address 钱包地址
284
- * @param config Jupiter 配置
285
- * @returns 平台 -> 元素列表 映射
286
- */
287
- export declare function getPortfolioByPlatform(address: string, config?: JupiterConfig): Promise<Map<string, PortfolioElement[]>>;
288
- /**
289
- * 获取按类型分组的投资组合
290
- *
291
- * @param address 钱包地址
292
- * @param config Jupiter 配置
293
- * @returns 类型 -> 元素列表 映射
294
- */
295
- export declare function getPortfolioByType(address: string, config?: JupiterConfig): Promise<Map<string, PortfolioElement[]>>;
296
- /**
297
- * 获取平台价值汇总
298
- *
299
- * @param address 钱包地址
300
- * @param config Jupiter 配置
301
- * @returns 平台 -> 总价值 映射
302
- */
303
- export declare function getPlatformValueSummary(address: string, config?: JupiterConfig): Promise<Map<string, number>>;
304
- /**
305
- * 获取投资组合摘要
306
- *
307
- * @param address 钱包地址
308
- * @param config Jupiter 配置
309
- * @returns 投资组合摘要
310
- */
311
- export declare function getPortfolioSummary(address: string, config?: JupiterConfig): Promise<{
312
- owner: string;
313
- totalValue: number;
314
- platformCount: number;
315
- elementCount: number;
316
- platforms: Array<{
317
- id: string;
318
- value: number;
319
- count: number;
320
- }>;
321
- fetchDuration: number;
322
- }>;
323
- /**
324
- * 筛选特定平台的元素
325
- *
326
- * @param elements 元素列表
327
- * @param platformId 平台 ID
328
- * @returns 筛选后的元素
329
- */
330
- export declare function filterByPlatform(elements: PortfolioElement[], platformId: string): PortfolioElement[];
331
- /**
332
- * 筛选特定类型的元素
333
- *
334
- * @param elements 元素列表
335
- * @param type 类型
336
- * @returns 筛选后的元素
337
- */
338
- export declare function filterByType(elements: PortfolioElement[], type: string): PortfolioElement[];
339
- /**
340
- * 筛选价值大于阈值的元素
341
- *
342
- * @param elements 元素列表
343
- * @param minValue 最小价值 (USD)
344
- * @returns 筛选后的元素
345
- */
346
- export declare function filterByMinValue(elements: PortfolioElement[], minValue: number): PortfolioElement[];
347
- /**
348
- * 按价值排序元素
349
- *
350
- * @param elements 元素列表
351
- * @param descending 是否降序(默认 true)
352
- * @returns 排序后的元素
353
- */
354
- export declare function sortByValue(elements: PortfolioElement[], descending?: boolean): PortfolioElement[];
355
- /**
356
- * 获取前 N 个高价值元素
357
- *
358
- * @param elements 元素列表
359
- * @param n 数量
360
- * @returns 前 N 个元素
361
- */
362
- export declare function getTopElements(elements: PortfolioElement[], n: number): PortfolioElement[];