four-flap-meme-sdk 1.4.20 → 1.4.21
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/flap/portal-bundle-merkle/encryption.d.ts +16 -0
- package/dist/flap/portal-bundle-merkle/encryption.js +146 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +3 -38
- package/dist/sol/constants.d.ts +0 -126
- package/dist/sol/constants.js +0 -145
- package/dist/sol/dex/index.d.ts +0 -8
- package/dist/sol/dex/index.js +0 -12
- package/dist/sol/dex/meteora/client.d.ts +0 -76
- package/dist/sol/dex/meteora/client.js +0 -219
- package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +0 -61
- package/dist/sol/dex/meteora/damm-v1-bundle.js +0 -112
- package/dist/sol/dex/meteora/damm-v1.d.ts +0 -118
- package/dist/sol/dex/meteora/damm-v1.js +0 -315
- package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +0 -82
- package/dist/sol/dex/meteora/damm-v2-bundle.js +0 -242
- package/dist/sol/dex/meteora/damm-v2.d.ts +0 -172
- package/dist/sol/dex/meteora/damm-v2.js +0 -632
- package/dist/sol/dex/meteora/dbc-bundle.d.ts +0 -123
- package/dist/sol/dex/meteora/dbc-bundle.js +0 -304
- package/dist/sol/dex/meteora/dbc.d.ts +0 -192
- package/dist/sol/dex/meteora/dbc.js +0 -619
- package/dist/sol/dex/meteora/dlmm-bundle.d.ts +0 -39
- package/dist/sol/dex/meteora/dlmm-bundle.js +0 -189
- package/dist/sol/dex/meteora/dlmm.d.ts +0 -157
- package/dist/sol/dex/meteora/dlmm.js +0 -671
- package/dist/sol/dex/meteora/index.d.ts +0 -25
- package/dist/sol/dex/meteora/index.js +0 -65
- package/dist/sol/dex/meteora/types.d.ts +0 -787
- package/dist/sol/dex/meteora/types.js +0 -110
- package/dist/sol/dex/orca/index.d.ts +0 -10
- package/dist/sol/dex/orca/index.js +0 -16
- package/dist/sol/dex/orca/orca-bundle.d.ts +0 -41
- package/dist/sol/dex/orca/orca-bundle.js +0 -173
- package/dist/sol/dex/orca/orca.d.ts +0 -65
- package/dist/sol/dex/orca/orca.js +0 -474
- package/dist/sol/dex/orca/types.d.ts +0 -263
- package/dist/sol/dex/orca/types.js +0 -38
- package/dist/sol/dex/orca/wavebreak-bundle.d.ts +0 -34
- package/dist/sol/dex/orca/wavebreak-bundle.js +0 -198
- package/dist/sol/dex/orca/wavebreak-types.d.ts +0 -227
- package/dist/sol/dex/orca/wavebreak-types.js +0 -23
- package/dist/sol/dex/orca/wavebreak.d.ts +0 -78
- package/dist/sol/dex/orca/wavebreak.js +0 -497
- package/dist/sol/dex/pump/index.d.ts +0 -9
- package/dist/sol/dex/pump/index.js +0 -14
- package/dist/sol/dex/pump/pump-bundle.d.ts +0 -92
- package/dist/sol/dex/pump/pump-bundle.js +0 -383
- package/dist/sol/dex/pump/pump-swap-bundle.d.ts +0 -103
- package/dist/sol/dex/pump/pump-swap-bundle.js +0 -380
- package/dist/sol/dex/pump/pump-swap.d.ts +0 -46
- package/dist/sol/dex/pump/pump-swap.js +0 -199
- package/dist/sol/dex/pump/pump.d.ts +0 -35
- package/dist/sol/dex/pump/pump.js +0 -352
- package/dist/sol/dex/pump/types.d.ts +0 -215
- package/dist/sol/dex/pump/types.js +0 -5
- package/dist/sol/dex/raydium/index.d.ts +0 -8
- package/dist/sol/dex/raydium/index.js +0 -12
- package/dist/sol/dex/raydium/launchlab.d.ts +0 -68
- package/dist/sol/dex/raydium/launchlab.js +0 -210
- package/dist/sol/dex/raydium/raydium-bundle.d.ts +0 -64
- package/dist/sol/dex/raydium/raydium-bundle.js +0 -324
- package/dist/sol/dex/raydium/raydium.d.ts +0 -40
- package/dist/sol/dex/raydium/raydium.js +0 -366
- package/dist/sol/dex/raydium/types.d.ts +0 -240
- package/dist/sol/dex/raydium/types.js +0 -5
- package/dist/sol/index.d.ts +0 -10
- package/dist/sol/index.js +0 -16
- package/dist/sol/jito/bundle.d.ts +0 -90
- package/dist/sol/jito/bundle.js +0 -263
- package/dist/sol/jito/index.d.ts +0 -7
- package/dist/sol/jito/index.js +0 -7
- package/dist/sol/jito/tip.d.ts +0 -51
- package/dist/sol/jito/tip.js +0 -83
- package/dist/sol/jito/types.d.ts +0 -100
- package/dist/sol/jito/types.js +0 -5
- package/dist/sol/token/create-complete.d.ts +0 -115
- package/dist/sol/token/create-complete.js +0 -235
- package/dist/sol/token/create-token.d.ts +0 -57
- package/dist/sol/token/create-token.js +0 -230
- package/dist/sol/token/index.d.ts +0 -9
- package/dist/sol/token/index.js +0 -14
- package/dist/sol/token/metadata-upload.d.ts +0 -86
- package/dist/sol/token/metadata-upload.js +0 -173
- package/dist/sol/token/metadata.d.ts +0 -92
- package/dist/sol/token/metadata.js +0 -274
- package/dist/sol/token/types.d.ts +0 -153
- package/dist/sol/token/types.js +0 -5
- package/dist/sol/types.d.ts +0 -176
- package/dist/sol/types.js +0 -7
- package/dist/sol/utils/balance.d.ts +0 -160
- package/dist/sol/utils/balance.js +0 -638
- package/dist/sol/utils/connection.d.ts +0 -78
- package/dist/sol/utils/connection.js +0 -168
- package/dist/sol/utils/index.d.ts +0 -9
- package/dist/sol/utils/index.js +0 -9
- package/dist/sol/utils/lp-inspect.d.ts +0 -129
- package/dist/sol/utils/lp-inspect.js +0 -900
- package/dist/sol/utils/transfer.d.ts +0 -125
- package/dist/sol/utils/transfer.js +0 -220
- package/dist/sol/utils/wallet.d.ts +0 -107
- package/dist/sol/utils/wallet.js +0 -210
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Solana RPC 连接管理
|
|
3
|
-
* @module sol/utils/connection
|
|
4
|
-
*/
|
|
5
|
-
import { Connection, Commitment } from '@solana/web3.js';
|
|
6
|
-
/**
|
|
7
|
-
* 创建 Solana 连接
|
|
8
|
-
*
|
|
9
|
-
* 重要:必须传入用户选择的 RPC URL,SDK 不提供默认 RPC
|
|
10
|
-
* 前端应从 RPC 设置中获取用户配置的节点
|
|
11
|
-
*
|
|
12
|
-
* @param rpcUrl RPC URL(必填)
|
|
13
|
-
* @param commitment Commitment 级别(可选,默认 confirmed)
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* const connection = createConnection('https://user-selected-rpc.com')
|
|
17
|
-
*
|
|
18
|
-
* @throws Error 如果没有传入 rpcUrl
|
|
19
|
-
*/
|
|
20
|
-
export declare function createConnection(rpcUrl: string, commitment?: Commitment): Connection;
|
|
21
|
-
/**
|
|
22
|
-
* 获取账户 SOL 余额
|
|
23
|
-
* @param connection Solana 连接
|
|
24
|
-
* @param address 账户地址
|
|
25
|
-
* @returns 余额(lamports)
|
|
26
|
-
*/
|
|
27
|
-
export declare function getBalance(connection: Connection, address: string): Promise<bigint>;
|
|
28
|
-
/**
|
|
29
|
-
* 获取账户 SOL 余额(格式化)
|
|
30
|
-
* @param connection Solana 连接
|
|
31
|
-
* @param address 账户地址
|
|
32
|
-
* @returns 余额(SOL)
|
|
33
|
-
*/
|
|
34
|
-
export declare function getBalanceInSol(connection: Connection, address: string): Promise<number>;
|
|
35
|
-
/**
|
|
36
|
-
* 获取最新 blockhash
|
|
37
|
-
* @param connection Solana 连接
|
|
38
|
-
*/
|
|
39
|
-
export declare function getLatestBlockhash(connection: Connection): Promise<{
|
|
40
|
-
blockhash: string;
|
|
41
|
-
lastValidBlockHeight: number;
|
|
42
|
-
}>;
|
|
43
|
-
/**
|
|
44
|
-
* 获取当前 slot
|
|
45
|
-
* @param connection Solana 连接
|
|
46
|
-
*/
|
|
47
|
-
export declare function getCurrentSlot(connection: Connection): Promise<number>;
|
|
48
|
-
/**
|
|
49
|
-
* 检查账户是否存在
|
|
50
|
-
* @param connection Solana 连接
|
|
51
|
-
* @param address 账户地址
|
|
52
|
-
*/
|
|
53
|
-
export declare function accountExists(connection: Connection, address: string): Promise<boolean>;
|
|
54
|
-
/**
|
|
55
|
-
* 获取账户信息
|
|
56
|
-
* @param connection Solana 连接
|
|
57
|
-
* @param address 账户地址
|
|
58
|
-
*/
|
|
59
|
-
export declare function getAccountInfo(connection: Connection, address: string): Promise<import("@solana/web3.js").AccountInfo<Buffer<ArrayBufferLike>> | null>;
|
|
60
|
-
/**
|
|
61
|
-
* 获取最小租金豁免余额
|
|
62
|
-
* @param connection Solana 连接
|
|
63
|
-
* @param dataSize 账户数据大小
|
|
64
|
-
*/
|
|
65
|
-
export declare function getMinimumBalanceForRentExemption(connection: Connection, dataSize: number): Promise<bigint>;
|
|
66
|
-
/**
|
|
67
|
-
* 等待交易确认
|
|
68
|
-
* @param connection Solana 连接
|
|
69
|
-
* @param signature 交易签名
|
|
70
|
-
* @param timeout 超时时间(毫秒)
|
|
71
|
-
*/
|
|
72
|
-
export declare function waitForConfirmation(connection: Connection, signature: string, timeout?: number): Promise<boolean>;
|
|
73
|
-
/**
|
|
74
|
-
* 获取交易状态
|
|
75
|
-
* @param connection Solana 连接
|
|
76
|
-
* @param signature 交易签名
|
|
77
|
-
*/
|
|
78
|
-
export declare function getTransactionStatus(connection: Connection, signature: string): Promise<'pending' | 'confirmed' | 'failed'>;
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Solana RPC 连接管理
|
|
3
|
-
* @module sol/utils/connection
|
|
4
|
-
*/
|
|
5
|
-
import { Connection, PublicKey } from '@solana/web3.js';
|
|
6
|
-
import { TX_CONFIG, lamportsToSol } from '../constants.js';
|
|
7
|
-
/**
|
|
8
|
-
* 创建 Solana 连接
|
|
9
|
-
*
|
|
10
|
-
* 重要:必须传入用户选择的 RPC URL,SDK 不提供默认 RPC
|
|
11
|
-
* 前端应从 RPC 设置中获取用户配置的节点
|
|
12
|
-
*
|
|
13
|
-
* @param rpcUrl RPC URL(必填)
|
|
14
|
-
* @param commitment Commitment 级别(可选,默认 confirmed)
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* const connection = createConnection('https://user-selected-rpc.com')
|
|
18
|
-
*
|
|
19
|
-
* @throws Error 如果没有传入 rpcUrl
|
|
20
|
-
*/
|
|
21
|
-
export function createConnection(rpcUrl, commitment = TX_CONFIG.DEFAULT_COMMITMENT) {
|
|
22
|
-
if (!rpcUrl) {
|
|
23
|
-
throw new Error('RPC URL is required. Please pass the user-configured RPC URL from frontend settings.');
|
|
24
|
-
}
|
|
25
|
-
return new Connection(rpcUrl, {
|
|
26
|
-
commitment,
|
|
27
|
-
confirmTransactionInitialTimeout: TX_CONFIG.CONFIRMATION_TIMEOUT,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* 获取账户 SOL 余额
|
|
32
|
-
* @param connection Solana 连接
|
|
33
|
-
* @param address 账户地址
|
|
34
|
-
* @returns 余额(lamports)
|
|
35
|
-
*/
|
|
36
|
-
export async function getBalance(connection, address) {
|
|
37
|
-
try {
|
|
38
|
-
const publicKey = new PublicKey(address);
|
|
39
|
-
const balance = await connection.getBalance(publicKey);
|
|
40
|
-
return BigInt(balance);
|
|
41
|
-
}
|
|
42
|
-
catch (error) {
|
|
43
|
-
throw new Error(`Failed to get balance: ${error.message}`);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 获取账户 SOL 余额(格式化)
|
|
48
|
-
* @param connection Solana 连接
|
|
49
|
-
* @param address 账户地址
|
|
50
|
-
* @returns 余额(SOL)
|
|
51
|
-
*/
|
|
52
|
-
export async function getBalanceInSol(connection, address) {
|
|
53
|
-
const lamports = await getBalance(connection, address);
|
|
54
|
-
return lamportsToSol(lamports);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 获取最新 blockhash
|
|
58
|
-
* @param connection Solana 连接
|
|
59
|
-
*/
|
|
60
|
-
export async function getLatestBlockhash(connection) {
|
|
61
|
-
try {
|
|
62
|
-
const result = await connection.getLatestBlockhash('finalized');
|
|
63
|
-
return {
|
|
64
|
-
blockhash: result.blockhash,
|
|
65
|
-
lastValidBlockHeight: result.lastValidBlockHeight,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
throw new Error(`Failed to get blockhash: ${error.message}`);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* 获取当前 slot
|
|
74
|
-
* @param connection Solana 连接
|
|
75
|
-
*/
|
|
76
|
-
export async function getCurrentSlot(connection) {
|
|
77
|
-
try {
|
|
78
|
-
return await connection.getSlot();
|
|
79
|
-
}
|
|
80
|
-
catch (error) {
|
|
81
|
-
throw new Error(`Failed to get slot: ${error.message}`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 检查账户是否存在
|
|
86
|
-
* @param connection Solana 连接
|
|
87
|
-
* @param address 账户地址
|
|
88
|
-
*/
|
|
89
|
-
export async function accountExists(connection, address) {
|
|
90
|
-
try {
|
|
91
|
-
const publicKey = new PublicKey(address);
|
|
92
|
-
const accountInfo = await connection.getAccountInfo(publicKey);
|
|
93
|
-
return accountInfo !== null;
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* 获取账户信息
|
|
101
|
-
* @param connection Solana 连接
|
|
102
|
-
* @param address 账户地址
|
|
103
|
-
*/
|
|
104
|
-
export async function getAccountInfo(connection, address) {
|
|
105
|
-
try {
|
|
106
|
-
const publicKey = new PublicKey(address);
|
|
107
|
-
return await connection.getAccountInfo(publicKey);
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
throw new Error(`Failed to get account info: ${error.message}`);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* 获取最小租金豁免余额
|
|
115
|
-
* @param connection Solana 连接
|
|
116
|
-
* @param dataSize 账户数据大小
|
|
117
|
-
*/
|
|
118
|
-
export async function getMinimumBalanceForRentExemption(connection, dataSize) {
|
|
119
|
-
try {
|
|
120
|
-
const lamports = await connection.getMinimumBalanceForRentExemption(dataSize);
|
|
121
|
-
return BigInt(lamports);
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
throw new Error(`Failed to get rent exemption: ${error.message}`);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* 等待交易确认
|
|
129
|
-
* @param connection Solana 连接
|
|
130
|
-
* @param signature 交易签名
|
|
131
|
-
* @param timeout 超时时间(毫秒)
|
|
132
|
-
*/
|
|
133
|
-
export async function waitForConfirmation(connection, signature, timeout = TX_CONFIG.CONFIRMATION_TIMEOUT) {
|
|
134
|
-
try {
|
|
135
|
-
const result = await connection.confirmTransaction({
|
|
136
|
-
signature,
|
|
137
|
-
blockhash: (await getLatestBlockhash(connection)).blockhash,
|
|
138
|
-
lastValidBlockHeight: (await getLatestBlockhash(connection)).lastValidBlockHeight,
|
|
139
|
-
}, 'confirmed');
|
|
140
|
-
return !result.value.err;
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
console.error(`Transaction confirmation failed: ${error.message}`);
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* 获取交易状态
|
|
149
|
-
* @param connection Solana 连接
|
|
150
|
-
* @param signature 交易签名
|
|
151
|
-
*/
|
|
152
|
-
export async function getTransactionStatus(connection, signature) {
|
|
153
|
-
try {
|
|
154
|
-
const status = await connection.getSignatureStatus(signature);
|
|
155
|
-
if (!status.value)
|
|
156
|
-
return 'pending';
|
|
157
|
-
if (status.value.err)
|
|
158
|
-
return 'failed';
|
|
159
|
-
if (status.value.confirmationStatus === 'confirmed' ||
|
|
160
|
-
status.value.confirmationStatus === 'finalized') {
|
|
161
|
-
return 'confirmed';
|
|
162
|
-
}
|
|
163
|
-
return 'pending';
|
|
164
|
-
}
|
|
165
|
-
catch {
|
|
166
|
-
return 'pending';
|
|
167
|
-
}
|
|
168
|
-
}
|
package/dist/sol/utils/index.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Solana LP 检测工具
|
|
3
|
-
* 自动判断代币在哪个平台(内盘/外盘)
|
|
4
|
-
* @module sol/utils/lp-inspect
|
|
5
|
-
*/
|
|
6
|
-
import { Connection } from '@solana/web3.js';
|
|
7
|
-
/** Solana LP 平台类型 */
|
|
8
|
-
export type SolanaLPPlatform = 'PUMP_BONDING_CURVE' | 'METEORA_DBC' | 'ORCA_WAVEBREAK' | 'RAYDIUM_LAUNCHLAB' | 'PUMP_SWAP' | 'METEORA_DLMM' | 'METEORA_DAMM_V1' | 'METEORA_DAMM_V2' | 'ORCA_WHIRLPOOL' | 'RAYDIUM_AMM' | 'RAYDIUM_CPMM' | 'RAYDIUM_CLMM' | 'MULTI_POOL' | 'UNKNOWN';
|
|
9
|
-
/** 内盘(Bonding Curve)信息 */
|
|
10
|
-
export interface SolanaBondingCurveInfo {
|
|
11
|
-
/** 平台类型 */
|
|
12
|
-
type: 'pump' | 'meteora_dbc' | 'orca_wavebreak' | 'raydium_launchlab';
|
|
13
|
-
/** Bonding Curve 地址 */
|
|
14
|
-
address: string;
|
|
15
|
-
/** 是否已毕业/迁移 */
|
|
16
|
-
complete: boolean;
|
|
17
|
-
/** Quote Token 储备(SOL 或其他) */
|
|
18
|
-
reserveQuote: string;
|
|
19
|
-
reserveQuoteRaw: bigint;
|
|
20
|
-
/** Base Token 储备 */
|
|
21
|
-
reserveToken: string;
|
|
22
|
-
reserveTokenRaw: bigint;
|
|
23
|
-
/** 当前价格 */
|
|
24
|
-
price?: number;
|
|
25
|
-
/** 毕业进度百分比 */
|
|
26
|
-
progress?: number;
|
|
27
|
-
/** 创建者 */
|
|
28
|
-
creator?: string;
|
|
29
|
-
}
|
|
30
|
-
/** 外盘池子信息 */
|
|
31
|
-
export interface SolanaPoolInfo {
|
|
32
|
-
/** 平台类型 */
|
|
33
|
-
platform: SolanaLPPlatform;
|
|
34
|
-
/** 池子地址 */
|
|
35
|
-
poolAddress: string;
|
|
36
|
-
/** Quote Token(SOL/USDC 等)*/
|
|
37
|
-
quoteToken: string;
|
|
38
|
-
quoteSymbol: string;
|
|
39
|
-
quoteDecimals: number;
|
|
40
|
-
/** Base Token */
|
|
41
|
-
baseToken: string;
|
|
42
|
-
/** Quote 储备 */
|
|
43
|
-
reserveQuote: string;
|
|
44
|
-
reserveQuoteRaw: bigint;
|
|
45
|
-
/** Base 储备 */
|
|
46
|
-
reserveBase: string;
|
|
47
|
-
reserveBaseRaw: bigint;
|
|
48
|
-
/** 当前价格 */
|
|
49
|
-
price?: number;
|
|
50
|
-
/** 费率 (bps) */
|
|
51
|
-
feeBps?: number;
|
|
52
|
-
/** 额外信息(如 tick spacing、bin step 等)*/
|
|
53
|
-
extra?: Record<string, any>;
|
|
54
|
-
}
|
|
55
|
-
/** Solana LP 检测结果 */
|
|
56
|
-
export interface SolanaLPInfo {
|
|
57
|
-
/** 代币 Mint 地址 */
|
|
58
|
-
mint: string;
|
|
59
|
-
/** 主平台类型 */
|
|
60
|
-
platform: SolanaLPPlatform;
|
|
61
|
-
/** 代币精度 */
|
|
62
|
-
decimals?: number;
|
|
63
|
-
/** 代币总供应量 */
|
|
64
|
-
totalSupply?: string;
|
|
65
|
-
totalSupplyRaw?: bigint;
|
|
66
|
-
/** 内盘信息(如果在内盘) */
|
|
67
|
-
bondingCurve?: SolanaBondingCurveInfo;
|
|
68
|
-
/** 所有发现的外盘池子 */
|
|
69
|
-
pools: SolanaPoolInfo[];
|
|
70
|
-
/** 最佳池子推荐(按流动性排序) */
|
|
71
|
-
bestPool?: SolanaPoolInfo;
|
|
72
|
-
/** 检测耗时 (ms) */
|
|
73
|
-
elapsed?: number;
|
|
74
|
-
}
|
|
75
|
-
/** 检测选项 */
|
|
76
|
-
export interface SolanaInspectOptions {
|
|
77
|
-
/** 自定义 RPC URL */
|
|
78
|
-
rpcUrl?: string;
|
|
79
|
-
/** 自定义连接 */
|
|
80
|
-
connection?: Connection;
|
|
81
|
-
/** 是否跳过内盘检测 */
|
|
82
|
-
skipBondingCurve?: boolean;
|
|
83
|
-
/** 是否跳过外盘检测 */
|
|
84
|
-
skipPools?: boolean;
|
|
85
|
-
/** 调试模式 */
|
|
86
|
-
debug?: boolean;
|
|
87
|
-
/** 超时时间 (ms) */
|
|
88
|
-
timeout?: number;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* 检测 Solana 代币的 LP 所在平台
|
|
92
|
-
*
|
|
93
|
-
* @param mint 代币 Mint 地址
|
|
94
|
-
* @param options 检测选项
|
|
95
|
-
* @returns LP 信息
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```typescript
|
|
99
|
-
* const lpInfo = await inspectSolanaTokenLP('TokenMintAddress...', {
|
|
100
|
-
* rpcUrl: 'https://api.mainnet-beta.solana.com',
|
|
101
|
-
* debug: true,
|
|
102
|
-
* })
|
|
103
|
-
*
|
|
104
|
-
* if (lpInfo.platform === 'PUMP_BONDING_CURVE') {
|
|
105
|
-
* console.log('代币在 Pump.fun 内盘')
|
|
106
|
-
* console.log('毕业进度:', lpInfo.bondingCurve?.progress)
|
|
107
|
-
* } else if (lpInfo.bestPool) {
|
|
108
|
-
* console.log('最佳池子:', lpInfo.bestPool.platform)
|
|
109
|
-
* console.log('流动性:', lpInfo.bestPool.reserveQuote)
|
|
110
|
-
* }
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
export declare function inspectSolanaTokenLP(mint: string, options?: SolanaInspectOptions): Promise<SolanaLPInfo>;
|
|
114
|
-
/**
|
|
115
|
-
* 快速检测代币是否在内盘
|
|
116
|
-
*
|
|
117
|
-
* @param mint 代币 Mint 地址
|
|
118
|
-
* @param options 检测选项
|
|
119
|
-
* @returns 如果在内盘返回内盘信息,否则返回 null
|
|
120
|
-
*/
|
|
121
|
-
export declare function detectBondingCurve(mint: string, options?: SolanaInspectOptions): Promise<SolanaBondingCurveInfo | null>;
|
|
122
|
-
/**
|
|
123
|
-
* 判断代币是否已毕业(不在任何内盘)
|
|
124
|
-
*/
|
|
125
|
-
export declare function isTokenGraduated(mint: string, options?: SolanaInspectOptions): Promise<boolean>;
|
|
126
|
-
/**
|
|
127
|
-
* 获取代币的最佳交易池
|
|
128
|
-
*/
|
|
129
|
-
export declare function getBestPool(mint: string, options?: SolanaInspectOptions): Promise<SolanaPoolInfo | null>;
|