four-flap-meme-sdk 1.3.89 → 1.3.90

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 (122) hide show
  1. package/dist/clients/blockrazor.js +1 -0
  2. package/dist/contracts/tm-bundle-merkle/core.js +3 -6
  3. package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +38 -30
  4. package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +1 -0
  5. package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +3 -4
  6. package/dist/contracts/tm-bundle-merkle/swap.d.ts +3 -0
  7. package/dist/contracts/tm-bundle-merkle/swap.js +2 -2
  8. package/dist/flap/portal-bundle-merkle/core.js +6 -2
  9. package/dist/flap/portal-bundle-merkle/pancake-proxy.js +35 -55
  10. package/dist/flap/portal-bundle-merkle/swap-buy-first.d.ts +2 -0
  11. package/dist/flap/portal-bundle-merkle/swap-buy-first.js +11 -6
  12. package/dist/flap/portal-bundle-merkle/swap.d.ts +2 -0
  13. package/dist/flap/portal-bundle-merkle/swap.js +22 -10
  14. package/dist/index.d.ts +2 -1
  15. package/dist/index.js +1 -0
  16. package/dist/pancake/bundle-buy-first.d.ts +1 -0
  17. package/dist/pancake/bundle-buy-first.js +9 -4
  18. package/dist/pancake/bundle-swap.d.ts +4 -0
  19. package/dist/pancake/bundle-swap.js +14 -7
  20. package/dist/sol/constants.d.ts +126 -0
  21. package/dist/sol/constants.js +145 -0
  22. package/dist/sol/dex/index.d.ts +8 -0
  23. package/dist/sol/dex/index.js +12 -0
  24. package/dist/sol/dex/meteora/client.d.ts +76 -0
  25. package/dist/sol/dex/meteora/client.js +219 -0
  26. package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +61 -0
  27. package/dist/sol/dex/meteora/damm-v1-bundle.js +112 -0
  28. package/dist/sol/dex/meteora/damm-v1.d.ts +118 -0
  29. package/dist/sol/dex/meteora/damm-v1.js +315 -0
  30. package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +82 -0
  31. package/dist/sol/dex/meteora/damm-v2-bundle.js +242 -0
  32. package/dist/sol/dex/meteora/damm-v2.d.ts +172 -0
  33. package/dist/sol/dex/meteora/damm-v2.js +632 -0
  34. package/dist/sol/dex/meteora/dbc-bundle.d.ts +123 -0
  35. package/dist/sol/dex/meteora/dbc-bundle.js +304 -0
  36. package/dist/sol/dex/meteora/dbc.d.ts +192 -0
  37. package/dist/sol/dex/meteora/dbc.js +619 -0
  38. package/dist/sol/dex/meteora/dlmm-bundle.d.ts +39 -0
  39. package/dist/sol/dex/meteora/dlmm-bundle.js +189 -0
  40. package/dist/sol/dex/meteora/dlmm.d.ts +146 -0
  41. package/dist/sol/dex/meteora/dlmm.js +593 -0
  42. package/dist/sol/dex/meteora/index.d.ts +25 -0
  43. package/dist/sol/dex/meteora/index.js +65 -0
  44. package/dist/sol/dex/meteora/types.d.ts +787 -0
  45. package/dist/sol/dex/meteora/types.js +110 -0
  46. package/dist/sol/dex/orca/index.d.ts +10 -0
  47. package/dist/sol/dex/orca/index.js +16 -0
  48. package/dist/sol/dex/orca/orca-bundle.d.ts +41 -0
  49. package/dist/sol/dex/orca/orca-bundle.js +173 -0
  50. package/dist/sol/dex/orca/orca.d.ts +65 -0
  51. package/dist/sol/dex/orca/orca.js +474 -0
  52. package/dist/sol/dex/orca/types.d.ts +263 -0
  53. package/dist/sol/dex/orca/types.js +38 -0
  54. package/dist/sol/dex/orca/wavebreak-bundle.d.ts +34 -0
  55. package/dist/sol/dex/orca/wavebreak-bundle.js +198 -0
  56. package/dist/sol/dex/orca/wavebreak-types.d.ts +227 -0
  57. package/dist/sol/dex/orca/wavebreak-types.js +23 -0
  58. package/dist/sol/dex/orca/wavebreak.d.ts +78 -0
  59. package/dist/sol/dex/orca/wavebreak.js +497 -0
  60. package/dist/sol/dex/pump/index.d.ts +9 -0
  61. package/dist/sol/dex/pump/index.js +14 -0
  62. package/dist/sol/dex/pump/pump-bundle.d.ts +92 -0
  63. package/dist/sol/dex/pump/pump-bundle.js +383 -0
  64. package/dist/sol/dex/pump/pump-swap-bundle.d.ts +103 -0
  65. package/dist/sol/dex/pump/pump-swap-bundle.js +380 -0
  66. package/dist/sol/dex/pump/pump-swap.d.ts +46 -0
  67. package/dist/sol/dex/pump/pump-swap.js +199 -0
  68. package/dist/sol/dex/pump/pump.d.ts +35 -0
  69. package/dist/sol/dex/pump/pump.js +352 -0
  70. package/dist/sol/dex/pump/types.d.ts +215 -0
  71. package/dist/sol/dex/pump/types.js +5 -0
  72. package/dist/sol/dex/raydium/index.d.ts +8 -0
  73. package/dist/sol/dex/raydium/index.js +12 -0
  74. package/dist/sol/dex/raydium/launchlab.d.ts +68 -0
  75. package/dist/sol/dex/raydium/launchlab.js +210 -0
  76. package/dist/sol/dex/raydium/raydium-bundle.d.ts +64 -0
  77. package/dist/sol/dex/raydium/raydium-bundle.js +324 -0
  78. package/dist/sol/dex/raydium/raydium.d.ts +40 -0
  79. package/dist/sol/dex/raydium/raydium.js +366 -0
  80. package/dist/sol/dex/raydium/types.d.ts +240 -0
  81. package/dist/sol/dex/raydium/types.js +5 -0
  82. package/dist/sol/index.d.ts +10 -0
  83. package/dist/sol/index.js +16 -0
  84. package/dist/sol/jito/bundle.d.ts +90 -0
  85. package/dist/sol/jito/bundle.js +263 -0
  86. package/dist/sol/jito/index.d.ts +7 -0
  87. package/dist/sol/jito/index.js +7 -0
  88. package/dist/sol/jito/tip.d.ts +51 -0
  89. package/dist/sol/jito/tip.js +83 -0
  90. package/dist/sol/jito/types.d.ts +100 -0
  91. package/dist/sol/jito/types.js +5 -0
  92. package/dist/sol/token/create-complete.d.ts +115 -0
  93. package/dist/sol/token/create-complete.js +235 -0
  94. package/dist/sol/token/create-token.d.ts +57 -0
  95. package/dist/sol/token/create-token.js +230 -0
  96. package/dist/sol/token/index.d.ts +9 -0
  97. package/dist/sol/token/index.js +14 -0
  98. package/dist/sol/token/metadata-upload.d.ts +86 -0
  99. package/dist/sol/token/metadata-upload.js +173 -0
  100. package/dist/sol/token/metadata.d.ts +92 -0
  101. package/dist/sol/token/metadata.js +274 -0
  102. package/dist/sol/token/types.d.ts +153 -0
  103. package/dist/sol/token/types.js +5 -0
  104. package/dist/sol/types.d.ts +176 -0
  105. package/dist/sol/types.js +7 -0
  106. package/dist/sol/utils/balance.d.ts +160 -0
  107. package/dist/sol/utils/balance.js +638 -0
  108. package/dist/sol/utils/connection.d.ts +78 -0
  109. package/dist/sol/utils/connection.js +168 -0
  110. package/dist/sol/utils/index.d.ts +9 -0
  111. package/dist/sol/utils/index.js +9 -0
  112. package/dist/sol/utils/lp-inspect.d.ts +129 -0
  113. package/dist/sol/utils/lp-inspect.js +521 -0
  114. package/dist/sol/utils/transfer.d.ts +125 -0
  115. package/dist/sol/utils/transfer.js +220 -0
  116. package/dist/sol/utils/wallet.d.ts +107 -0
  117. package/dist/sol/utils/wallet.js +210 -0
  118. package/dist/utils/erc20.d.ts +2 -108
  119. package/dist/utils/erc20.js +17 -65
  120. package/package.json +39 -4
  121. package/dist/flap/portal-bundle-merkle/encryption.d.ts +0 -16
  122. package/dist/flap/portal-bundle-merkle/encryption.js +0 -146
@@ -0,0 +1,227 @@
1
+ /**
2
+ * Orca Wavebreak 类型定义
3
+ * Wavebreak 是 Orca 的代币发射平台(类似 Pump.fun)
4
+ */
5
+ import type { Keypair, Transaction, VersionedTransaction } from '@solana/web3.js';
6
+ /**
7
+ * Wavebreak 创建代币参数
8
+ */
9
+ export interface WavebreakCreateLaunchParams {
10
+ /** 代币名称 */
11
+ name: string;
12
+ /** 代币符号 */
13
+ symbol: string;
14
+ /** 元数据 URI (IPFS) */
15
+ uri: string;
16
+ /** 起始价格 (可选,使用默认曲线) */
17
+ startPrice?: bigint;
18
+ /** 结束价格 (可选) */
19
+ endPrice?: bigint;
20
+ /** 毕业目标 (SOL lamports,默认 85 SOL) */
21
+ graduationTarget?: bigint;
22
+ /** 发射时间 (Unix 时间戳,可选) */
23
+ launchTime?: bigint;
24
+ /** 毕业时间 (Unix 时间戳,可选) */
25
+ graduationTime?: bigint;
26
+ /** 基础代币分配比例 (bps,可选) */
27
+ baseAllocationBps?: number;
28
+ /** Quote Mint (默认 SOL) */
29
+ quoteMint?: string;
30
+ }
31
+ /**
32
+ * Wavebreak 买入参数
33
+ */
34
+ export interface WavebreakBuyParams {
35
+ /** Bonding Curve 地址或 Base Mint 地址 */
36
+ bondingCurveOrMint: string;
37
+ /** 买入金额 (SOL lamports) */
38
+ amountIn: bigint;
39
+ /** 是否允许部分成交 */
40
+ allowPartialFill?: boolean;
41
+ /** 滑点 (bps) */
42
+ slippageBps?: number;
43
+ }
44
+ /**
45
+ * Wavebreak 卖出参数
46
+ */
47
+ export interface WavebreakSellParams {
48
+ /** Bonding Curve 地址或 Base Mint 地址 */
49
+ bondingCurveOrMint: string;
50
+ /** 卖出代币数量 */
51
+ amountIn: bigint;
52
+ /** 是否允许部分成交 */
53
+ allowPartialFill?: boolean;
54
+ /** 滑点 (bps) */
55
+ slippageBps?: number;
56
+ }
57
+ /**
58
+ * Wavebreak Bonding Curve 信息
59
+ */
60
+ export interface WavebreakBondingCurveInfo {
61
+ /** Bonding Curve 地址 */
62
+ bondingCurveAddress: string;
63
+ /** 基础代币地址 */
64
+ baseMint: string;
65
+ /** Quote 代币地址 (通常是 SOL) */
66
+ quoteMint: string;
67
+ /** 创建者地址 */
68
+ creator: string;
69
+ /** 当前 Quote 金额 (SOL lamports) */
70
+ quoteAmount: bigint;
71
+ /** 当前 Base 金额 */
72
+ baseAmount: bigint;
73
+ /** 起始价格 */
74
+ startPrice: bigint;
75
+ /** 结束价格 */
76
+ endPrice: bigint;
77
+ /** 毕业目标 */
78
+ graduationTarget: bigint;
79
+ /** 发射时间 */
80
+ launchTime: bigint;
81
+ /** 毕业时间 */
82
+ graduationTime: bigint;
83
+ /** 交换费率 (bps) */
84
+ swapFeeBps: number;
85
+ /** 是否已毕业 */
86
+ isGraduated: boolean;
87
+ /** 当前价格 */
88
+ currentPrice: number;
89
+ /** 进度百分比 */
90
+ progressPercent: number;
91
+ }
92
+ /**
93
+ * Wavebreak 买入报价
94
+ */
95
+ export interface WavebreakBuyQuote {
96
+ /** 输入金额 (SOL) */
97
+ amountIn: bigint;
98
+ /** 输出金额 (代币) */
99
+ amountOut: bigint;
100
+ /** 费用金额 */
101
+ feeAmount: bigint;
102
+ /** 价格影响 */
103
+ priceImpact: number;
104
+ }
105
+ /**
106
+ * Wavebreak 卖出报价
107
+ */
108
+ export interface WavebreakSellQuote {
109
+ /** 输入金额 (代币) */
110
+ amountIn: bigint;
111
+ /** 输出金额 (SOL) */
112
+ amountOut: bigint;
113
+ /** 费用金额 */
114
+ feeAmount: bigint;
115
+ /** 价格影响 */
116
+ priceImpact: number;
117
+ }
118
+ /**
119
+ * Wavebreak 签名结果
120
+ */
121
+ export interface WavebreakSignedResult {
122
+ /** 签名后的交易 */
123
+ signedTransaction: Transaction | VersionedTransaction;
124
+ /** 交易类型 */
125
+ type: 'createLaunch' | 'buy' | 'sell' | 'collectFees' | 'graduate';
126
+ /** Bonding Curve 地址 */
127
+ bondingCurveAddress?: string;
128
+ /** Base Mint 地址 */
129
+ baseMint?: string;
130
+ /** 额外信息 */
131
+ metadata?: {
132
+ estimatedAmountOut?: string;
133
+ feeAmount?: string;
134
+ };
135
+ }
136
+ /**
137
+ * Wavebreak Bundle 买入参数
138
+ */
139
+ export interface WavebreakBundleBuyParams {
140
+ /** Bonding Curve 地址或 Base Mint 地址 */
141
+ bondingCurveOrMint: string;
142
+ /** 交易列表 */
143
+ trades: {
144
+ /** 钱包 */
145
+ wallet: Keypair;
146
+ /** 买入金额 (SOL lamports) */
147
+ amountIn: bigint;
148
+ }[];
149
+ /** 滑点 (bps) */
150
+ slippageBps?: number;
151
+ /** Jito 小费 (lamports) */
152
+ jitoTipLamports?: number;
153
+ }
154
+ /**
155
+ * Wavebreak Bundle 卖出参数
156
+ */
157
+ export interface WavebreakBundleSellParams {
158
+ /** Bonding Curve 地址或 Base Mint 地址 */
159
+ bondingCurveOrMint: string;
160
+ /** 交易列表 */
161
+ trades: {
162
+ /** 钱包 */
163
+ wallet: Keypair;
164
+ /** 卖出代币数量 */
165
+ amountIn: bigint;
166
+ }[];
167
+ /** 滑点 (bps) */
168
+ slippageBps?: number;
169
+ /** Jito 小费 (lamports) */
170
+ jitoTipLamports?: number;
171
+ }
172
+ /**
173
+ * Wavebreak Bundle 创建并买入参数
174
+ */
175
+ export interface WavebreakBundleCreateAndBuyParams {
176
+ /** 创建参数 */
177
+ createParams: WavebreakCreateLaunchParams;
178
+ /** 创建者钱包 */
179
+ creator: Keypair;
180
+ /** 买入交易列表 */
181
+ buyTrades: {
182
+ /** 钱包 */
183
+ wallet: Keypair;
184
+ /** 买入金额 (SOL lamports) */
185
+ amountIn: bigint;
186
+ }[];
187
+ /** 滑点 (bps) */
188
+ slippageBps?: number;
189
+ /** Jito 小费 (lamports) */
190
+ jitoTipLamports?: number;
191
+ }
192
+ /**
193
+ * Wavebreak Bundle 签名结果
194
+ */
195
+ export interface WavebreakBundleSignedResult {
196
+ /** 签名后的交易列表 */
197
+ signedTransactions: Transaction[];
198
+ /** Bundle 类型 */
199
+ type: 'bundleBuy' | 'bundleSell' | 'bundleCreateAndBuy';
200
+ /** Bonding Curve 地址 */
201
+ bondingCurveAddress: string;
202
+ /** Base Mint 地址 */
203
+ baseMint?: string;
204
+ /** 交易数量 */
205
+ tradeCount: number;
206
+ /** Jito 小费 */
207
+ jitoTipLamports: number;
208
+ }
209
+ /**
210
+ * Wavebreak 常量
211
+ */
212
+ export declare const WAVEBREAK_CONSTANTS: {
213
+ /** Program ID */
214
+ readonly PROGRAM_ID: "waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF";
215
+ /** 默认毕业目标 (85 SOL) */
216
+ readonly DEFAULT_GRADUATION_TARGET: bigint;
217
+ /** SOL Mint (Wrapped SOL) */
218
+ readonly SOL_MINT: "So11111111111111111111111111111111111111112";
219
+ /** Token-2022 Program ID */
220
+ readonly TOKEN_2022_PROGRAM_ID: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
221
+ /** Token Program ID */
222
+ readonly TOKEN_PROGRAM_ID: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
223
+ /** ATA Program ID */
224
+ readonly ATA_PROGRAM_ID: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
225
+ /** Metaplex Token Metadata Program ID */
226
+ readonly METAPLEX_PROGRAM_ID: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
227
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Orca Wavebreak 类型定义
3
+ * Wavebreak 是 Orca 的代币发射平台(类似 Pump.fun)
4
+ */
5
+ /**
6
+ * Wavebreak 常量
7
+ */
8
+ export const WAVEBREAK_CONSTANTS = {
9
+ /** Program ID */
10
+ PROGRAM_ID: 'waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF',
11
+ /** 默认毕业目标 (85 SOL) */
12
+ DEFAULT_GRADUATION_TARGET: BigInt(85000000000),
13
+ /** SOL Mint (Wrapped SOL) */
14
+ SOL_MINT: 'So11111111111111111111111111111111111111112',
15
+ /** Token-2022 Program ID */
16
+ TOKEN_2022_PROGRAM_ID: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',
17
+ /** Token Program ID */
18
+ TOKEN_PROGRAM_ID: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
19
+ /** ATA Program ID */
20
+ ATA_PROGRAM_ID: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
21
+ /** Metaplex Token Metadata Program ID */
22
+ METAPLEX_PROGRAM_ID: 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s',
23
+ };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Orca Wavebreak 核心功能
3
+ * Wavebreak 是 Orca 的代币发射平台(类似 Pump.fun)
4
+ *
5
+ * 由于 Wavebreak SDK 使用 @solana/kit(与 @solana/web3.js 类型不兼容),
6
+ * 我们使用 SDK 的编码器和数学函数,但手动构建 @solana/web3.js 的交易指令。
7
+ */
8
+ import { Connection, PublicKey, Keypair, TransactionInstruction } from '@solana/web3.js';
9
+ import type { WavebreakCreateLaunchParams, WavebreakBuyParams, WavebreakSellParams, WavebreakBondingCurveInfo, WavebreakBuyQuote, WavebreakSellQuote, WavebreakSignedResult } from './wavebreak-types.js';
10
+ /**
11
+ * 计算 Bonding Curve PDA 地址
12
+ */
13
+ export declare function getWavebreakBondingCurveAddress(baseMint: PublicKey | string): Promise<PublicKey>;
14
+ /**
15
+ * 同步计算 Bonding Curve PDA 地址(使用 @solana/web3.js)
16
+ */
17
+ export declare function getWavebreakBondingCurveAddressSync(baseMint: PublicKey | string): PublicKey;
18
+ /**
19
+ * 计算 Quote Vault PDA 地址
20
+ */
21
+ export declare function getWavebreakQuoteVaultAddressSync(bondingCurve: PublicKey | string): PublicKey;
22
+ /**
23
+ * 计算 LP Escrow PDA 地址
24
+ */
25
+ export declare function getWavebreakLpEscrowAddressSync(bondingCurve: PublicKey | string): PublicKey;
26
+ /**
27
+ * 获取 Wavebreak Bonding Curve 信息
28
+ */
29
+ export declare function getWavebreakBondingCurveInfo(bondingCurveOrMint: string, connection?: Connection): Promise<WavebreakBondingCurveInfo | null>;
30
+ /**
31
+ * 获取买入报价
32
+ */
33
+ export declare function getWavebreakBuyQuote(bondingCurveOrMint: string, amountIn: bigint, connection?: Connection): Promise<WavebreakBuyQuote | null>;
34
+ /**
35
+ * 获取卖出报价
36
+ */
37
+ export declare function getWavebreakSellQuote(bondingCurveOrMint: string, amountIn: bigint, connection?: Connection): Promise<WavebreakSellQuote | null>;
38
+ /**
39
+ * 构建 Wavebreak 买入交易指令
40
+ *
41
+ * 使用 SDK 的编码器生成正确的指令数据
42
+ */
43
+ export declare function buildWavebreakBuyInstruction(params: WavebreakBuyParams, buyer: PublicKey, connection?: Connection): Promise<TransactionInstruction>;
44
+ /**
45
+ * 构建 Wavebreak 卖出交易指令
46
+ */
47
+ export declare function buildWavebreakSellInstruction(params: WavebreakSellParams, seller: PublicKey, connection?: Connection): Promise<TransactionInstruction>;
48
+ /**
49
+ * 构建 Wavebreak 创建代币发射指令
50
+ */
51
+ export declare function buildWavebreakCreateLaunchInstruction(params: WavebreakCreateLaunchParams, creator: PublicKey, baseMintKeypair: Keypair, connection?: Connection): Promise<TransactionInstruction>;
52
+ /**
53
+ * 签名 Wavebreak 买入交易
54
+ */
55
+ export declare function signWavebreakBuy(params: WavebreakBuyParams, payer: Keypair, connection?: Connection): Promise<WavebreakSignedResult>;
56
+ /**
57
+ * 签名 Wavebreak 卖出交易
58
+ */
59
+ export declare function signWavebreakSell(params: WavebreakSellParams, payer: Keypair, connection?: Connection): Promise<WavebreakSignedResult>;
60
+ /**
61
+ * 签名 Wavebreak 创建代币发射交易
62
+ */
63
+ export declare function signWavebreakCreateLaunch(params: WavebreakCreateLaunchParams, creator: Keypair, connection?: Connection): Promise<WavebreakSignedResult & {
64
+ baseMintKeypair: Keypair;
65
+ }>;
66
+ /**
67
+ * 将签名结果转换为后端 API 请求格式
68
+ */
69
+ export declare function toWavebreakApiRequest(result: WavebreakSignedResult): {
70
+ transaction: string;
71
+ metadata: {
72
+ type: string;
73
+ bondingCurveAddress?: string;
74
+ baseMint?: string;
75
+ estimatedAmountOut?: string;
76
+ feeAmount?: string;
77
+ };
78
+ };