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,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Meteora DAMM v2 (CP-AMM) 集成
|
|
3
|
-
*
|
|
4
|
-
* 基于 https://github.com/MeteoraAg/cp-amm-sdk 源码分析
|
|
5
|
-
* DAMM v2 是 DBC 迁移后的目标池之一,使用 NFT 代表仓位
|
|
6
|
-
*/
|
|
7
|
-
import { Connection, Keypair } from '@solana/web3.js';
|
|
8
|
-
import BN from 'bn.js';
|
|
9
|
-
import type { DammV2PoolInfo, DammV2SwapParams, DammV2AddLiquidityParams, DammV2RemoveLiquidityParams, MeteoraSignedResult } from './types.js';
|
|
10
|
-
/**
|
|
11
|
-
* 获取 DAMM v2 池信息
|
|
12
|
-
* @param poolAddress 池地址
|
|
13
|
-
* @param connection 可选连接
|
|
14
|
-
*/
|
|
15
|
-
export declare function getDammV2PoolInfo(poolAddress: string, connection?: Connection): Promise<DammV2PoolInfo>;
|
|
16
|
-
/**
|
|
17
|
-
* 签名 DAMM v2 Swap 交易
|
|
18
|
-
* @param params Swap 参数
|
|
19
|
-
* @param wallet 钱包
|
|
20
|
-
* @param connection 可选连接
|
|
21
|
-
*/
|
|
22
|
-
export declare function signDammV2Swap(params: DammV2SwapParams, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
23
|
-
/**
|
|
24
|
-
* 签名 DAMM v2 添加流动性交易(创建新仓位)
|
|
25
|
-
*/
|
|
26
|
-
export declare function signDammV2AddLiquidity(params: DammV2AddLiquidityParams, wallet: Keypair, positionNftKeypair?: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
27
|
-
/**
|
|
28
|
-
* 签名 DAMM v2 移除流动性交易
|
|
29
|
-
*/
|
|
30
|
-
export declare function signDammV2RemoveLiquidity(params: DammV2RemoveLiquidityParams, positionAddress: string, positionNftAccount: string, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
31
|
-
/**
|
|
32
|
-
* 签名领取 Position 费用交易
|
|
33
|
-
*/
|
|
34
|
-
export declare function signDammV2ClaimPositionFee(poolAddress: string, positionAddress: string, positionNftAccount: string, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
35
|
-
/**
|
|
36
|
-
* 签名永久锁定 Position 交易
|
|
37
|
-
*/
|
|
38
|
-
export declare function signDammV2PermanentLockPosition(poolAddress: string, positionAddress: string, positionNftAccount: string, unlockedLiquidity: BN, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
39
|
-
/**
|
|
40
|
-
* 获取用户在池中的所有 Position
|
|
41
|
-
*/
|
|
42
|
-
export declare function getDammV2UserPositions(poolAddress: string, userAddress: string, connection?: Connection): Promise<any[]>;
|
|
43
|
-
/**
|
|
44
|
-
* 派生池地址
|
|
45
|
-
*/
|
|
46
|
-
export declare function deriveDammV2PoolAddress(config: string, tokenAMint: string, tokenBMint: string): string;
|
|
47
|
-
/**
|
|
48
|
-
* 派生 Position 地址
|
|
49
|
-
*/
|
|
50
|
-
export declare function deriveDammV2PositionAddress(positionNft: string): string;
|
|
51
|
-
/**
|
|
52
|
-
* 签名创建 DAMM v2 池交易
|
|
53
|
-
* @param params 创建池参数
|
|
54
|
-
* @param positionNftKeypair Position NFT Keypair
|
|
55
|
-
* @param wallet 钱包
|
|
56
|
-
* @param connection 可选连接
|
|
57
|
-
*/
|
|
58
|
-
export declare function signDammV2CreatePool(params: {
|
|
59
|
-
configAddress: string;
|
|
60
|
-
tokenAMint: string;
|
|
61
|
-
tokenBMint: string;
|
|
62
|
-
tokenAAmount: BN;
|
|
63
|
-
tokenBAmount: BN;
|
|
64
|
-
initSqrtPrice: BN;
|
|
65
|
-
liquidityDelta: BN;
|
|
66
|
-
activationPoint?: BN | null;
|
|
67
|
-
}, positionNftKeypair: Keypair, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
68
|
-
/**
|
|
69
|
-
* 签名创建 Position(空仓位)交易
|
|
70
|
-
* @param poolAddress 池地址
|
|
71
|
-
* @param positionNftKeypair Position NFT Keypair
|
|
72
|
-
* @param wallet 钱包
|
|
73
|
-
* @param connection 可选连接
|
|
74
|
-
*/
|
|
75
|
-
export declare function signDammV2CreatePosition(poolAddress: string, positionNftKeypair: Keypair, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
76
|
-
/**
|
|
77
|
-
* 获取 DAMM v2 Swap 报价
|
|
78
|
-
* @param poolAddress 池地址
|
|
79
|
-
* @param inputMint 输入 Mint
|
|
80
|
-
* @param amountIn 输入数量
|
|
81
|
-
* @param slippage 滑点百分比 (例如 0.5 表示 0.5%)
|
|
82
|
-
* @param tokenADecimal Token A 精度
|
|
83
|
-
* @param tokenBDecimal Token B 精度
|
|
84
|
-
* @param connection 可选连接
|
|
85
|
-
*/
|
|
86
|
-
export declare function getDammV2SwapQuote(poolAddress: string, inputMint: string, amountIn: BN, slippage?: number, tokenADecimal?: number, tokenBDecimal?: number, connection?: Connection): Promise<{
|
|
87
|
-
swapInAmount: string;
|
|
88
|
-
consumedInAmount: string;
|
|
89
|
-
swapOutAmount: string;
|
|
90
|
-
minSwapOutAmount: string;
|
|
91
|
-
totalFee: string;
|
|
92
|
-
priceImpact: number;
|
|
93
|
-
}>;
|
|
94
|
-
/**
|
|
95
|
-
* 计算流动性增量
|
|
96
|
-
* @param poolAddress 池地址
|
|
97
|
-
* @param maxAmountA 最大 Token A 数量
|
|
98
|
-
* @param maxAmountB 最大 Token B 数量
|
|
99
|
-
* @param connection 可选连接
|
|
100
|
-
*/
|
|
101
|
-
export declare function getDammV2LiquidityDelta(poolAddress: string, maxAmountA: BN, maxAmountB: BN, connection?: Connection): Promise<{
|
|
102
|
-
liquidityDelta: string;
|
|
103
|
-
tokenAAmount: string;
|
|
104
|
-
tokenBAmount: string;
|
|
105
|
-
}>;
|
|
106
|
-
/**
|
|
107
|
-
* 签名关闭 Position 交易(需要先移除所有流动性)
|
|
108
|
-
* @param poolAddress 池地址
|
|
109
|
-
* @param positionAddress Position 地址
|
|
110
|
-
* @param positionNftMint Position NFT Mint
|
|
111
|
-
* @param positionNftAccount Position NFT 账户
|
|
112
|
-
* @param wallet 钱包
|
|
113
|
-
* @param connection 可选连接
|
|
114
|
-
*/
|
|
115
|
-
export declare function signDammV2ClosePosition(poolAddress: string, positionAddress: string, positionNftMint: string, positionNftAccount: string, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
116
|
-
/**
|
|
117
|
-
* 签名移除所有流动性交易
|
|
118
|
-
* @param poolAddress 池地址
|
|
119
|
-
* @param positionAddress Position 地址
|
|
120
|
-
* @param positionNftAccount Position NFT 账户
|
|
121
|
-
* @param liquidity 要移除的流动性数量
|
|
122
|
-
* @param wallet 钱包
|
|
123
|
-
* @param connection 可选连接
|
|
124
|
-
*/
|
|
125
|
-
export declare function signDammV2RemoveAllLiquidity(poolAddress: string, positionAddress: string, positionNftAccount: string, liquidity: BN, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
126
|
-
/**
|
|
127
|
-
* 签名锁定 Position 交易(带 vesting)
|
|
128
|
-
* @param poolAddress 池地址
|
|
129
|
-
* @param positionAddress Position 地址
|
|
130
|
-
* @param positionNftAccount Position NFT 账户
|
|
131
|
-
* @param vestingParams Vesting 参数
|
|
132
|
-
* @param vestingAccountKeypair Vesting 账户 Keypair
|
|
133
|
-
* @param wallet 钱包
|
|
134
|
-
* @param connection 可选连接
|
|
135
|
-
*/
|
|
136
|
-
export declare function signDammV2LockPosition(poolAddress: string, positionAddress: string, positionNftAccount: string, vestingParams: {
|
|
137
|
-
cliffPoint: BN | null;
|
|
138
|
-
periodFrequency: BN;
|
|
139
|
-
cliffUnlockLiquidity: BN;
|
|
140
|
-
liquidityPerPeriod: BN;
|
|
141
|
-
numberOfPeriod: number;
|
|
142
|
-
}, vestingAccountKeypair: Keypair, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
143
|
-
/**
|
|
144
|
-
* 签名领取奖励交易
|
|
145
|
-
* @param poolAddress 池地址
|
|
146
|
-
* @param positionAddress Position 地址
|
|
147
|
-
* @param positionNftAccount Position NFT 账户
|
|
148
|
-
* @param rewardIndex 奖励索引
|
|
149
|
-
* @param wallet 钱包
|
|
150
|
-
* @param connection 可选连接
|
|
151
|
-
*/
|
|
152
|
-
export declare function signDammV2ClaimReward(poolAddress: string, positionAddress: string, positionNftAccount: string, rewardIndex: number, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
|
|
153
|
-
/**
|
|
154
|
-
* 获取 Position 详细信息
|
|
155
|
-
* @param positionAddress Position 地址
|
|
156
|
-
* @param connection 可选连接
|
|
157
|
-
*/
|
|
158
|
-
export declare function getDammV2PositionInfo(positionAddress: string, connection?: Connection): Promise<{
|
|
159
|
-
unlockedLiquidity: string;
|
|
160
|
-
vestedLiquidity: string;
|
|
161
|
-
permanentLockedLiquidity: string;
|
|
162
|
-
pool: string;
|
|
163
|
-
nftMint: string;
|
|
164
|
-
feeAPending: string;
|
|
165
|
-
feeBPending: string;
|
|
166
|
-
}>;
|
|
167
|
-
/**
|
|
168
|
-
* 获取池配置信息
|
|
169
|
-
* @param configAddress 配置地址
|
|
170
|
-
* @param connection 可选连接
|
|
171
|
-
*/
|
|
172
|
-
export declare function getDammV2ConfigInfo(configAddress: string, connection?: Connection): Promise<any>;
|