four-flap-meme-sdk
Version:
SDK for Flap bonding curve and four.meme TokenManager
85 lines (84 loc) • 2.56 kB
TypeScript
import type { SoulPointSignatureMode, VNormalizationMode } from '../clients/club48.js';
/** ✅ Bundle 提交结果(完整版 - 包含 bundleUuid) */
export type BundleSubmitResult = {
bundleUuid: string;
signedTxs: string[];
};
/** ✅ 签名结果(精简版 - 仅返回签名交易) */
export type SignedTransactionsResult = {
signedTransactions: string[];
};
/** ✅ 分散参数(完整版 - 包含 Bundle 提交) */
export type DisperseParams = {
rpcUrl: string;
chainId: number;
fromPrivateKey: string;
recipients: string[];
amount?: string;
amounts?: string[];
tokenAddress?: string;
bundleEndpoint?: string;
gasPriceGwei?: string;
transferGasLimit?: bigint;
nativeGasLimit?: bigint;
blockOffset?: number;
spMode?: SoulPointSignatureMode;
spPrivateKey?: string;
spVMode?: VNormalizationMode;
};
/** ✅ 分散参数(精简版 - 仅签名) */
export type DisperseSignParams = {
rpcUrl: string;
chainId: number;
fromPrivateKey: string;
recipients: string[];
amount?: string;
amounts?: string[];
tokenAddress?: string;
gasPriceGwei?: string;
transferGasLimit?: bigint;
nativeGasLimit?: bigint;
};
/**
* 分散(仅签名版本 - 不提交 Bundle)
* ✅ 精简版:只负责签名交易,不提交
*/
export declare function disperseWithBundle(params: DisperseSignParams): Promise<SignedTransactionsResult>;
/** ✅ 归集参数(完整版 - 包含 Bundle 提交) */
export type SweepParams = {
rpcUrl: string;
chainId: number;
sourcePrivateKeys: string[];
target: string;
ratioPct?: number;
amount?: string;
tokenAddress?: string;
bundleEndpoint?: string;
gasPriceGwei?: string;
transferGasLimit?: bigint;
nativeGasLimit?: bigint;
blockOffset?: number;
skipIfInsufficient?: boolean;
spMode?: SoulPointSignatureMode;
spPrivateKey?: string;
spVMode?: VNormalizationMode;
};
/** ✅ 归集参数(精简版 - 仅签名) */
export type SweepSignParams = {
rpcUrl: string;
chainId: number;
sourcePrivateKeys: string[];
target: string;
ratioPct?: number;
amount?: string;
tokenAddress?: string;
gasPriceGwei?: string;
transferGasLimit?: bigint;
nativeGasLimit?: bigint;
skipIfInsufficient?: boolean;
};
/**
* 归集(仅签名版本 - 不提交 Bundle)
* ✅ 精简版:只负责签名交易,不提交
*/
export declare function sweepWithBundle(params: SweepSignParams): Promise<SignedTransactionsResult>;