UNPKG

four-flap-meme-sdk

Version:

SDK for Flap bonding curve and four.meme TokenManager

47 lines (46 loc) 1.46 kB
/** * Four.meme 内盘捆绑换手(Merkle Bundle)- 先买后卖 * * 功能:钱包B先买入代币 → 钱包A卖出相同数量 → 原子执行 */ import { CommonBundleConfig } from '../../utils/bundle-helpers.js'; import { FourSignConfig } from './types.js'; export interface FourBuyFirstSignConfig extends FourSignConfig { reserveGasBNB?: number; } export interface FourBuyFirstConfig extends CommonBundleConfig { apiKey: string; customRpcUrl?: string; bundleBlockOffset?: number; reserveGasBNB?: number; waitForConfirmation?: boolean; waitTimeoutMs?: number; } export interface FourBundleBuyFirstSignParams { buyerPrivateKey: string; buyerFunds?: string; buyerFundsPercentage?: number; sellerPrivateKey: string; tokenAddress: string; config: FourBuyFirstSignConfig; } export interface FourBundleBuyFirstParams { buyerPrivateKey: string; buyerFunds?: string; buyerFundsPercentage?: number; sellerPrivateKey: string; tokenAddress: string; config: FourBuyFirstConfig; } /** ✅ BuyFirst 结果(简化版) */ export type FourBuyFirstResult = { signedTransactions: string[]; metadata?: { buyerAddress: string; sellerAddress: string; buyAmount: string; sellAmount: string; profitAmount?: string; }; }; export declare function fourBundleBuyFirstMerkle(params: FourBundleBuyFirstSignParams): Promise<FourBuyFirstResult>;