four-flap-meme-sdk
Version:
SDK for Flap bonding curve and four.meme TokenManager
36 lines (35 loc) • 1.26 kB
TypeScript
import type { SoulPointSignatureMode, VNormalizationMode } from '../clients/club48.js';
export type StealthTransferResult = {
bundleUuid: string;
txs: string[];
hopAddresses: string[];
};
/**
* 简化版隐秘转账参数
* - 仅需人类可读金额与(可选)代币地址,其余自动处理
* - 未提供 tokenAddress → 原生币模式;提供 tokenAddress → 自动读取 decimals 转换为 wei 的代币模式
*/
export type StealthTransferSimpleParams = {
rpcUrl: string;
chainId: number;
rootPrivateKey: string;
finalTo: string;
hopCount: number;
amount: string;
tokenAddress?: string;
tokenHolderPrivateKey?: string;
bundleEndpoint?: string;
gasPriceGwei?: string;
gasLimit?: bigint;
blockOffset?: number;
spMode?: SoulPointSignatureMode;
spPrivateKey?: string;
spVMode?: VNormalizationMode;
};
/**
* 隐秘转账(简化版)
* - 原生模式:amount 按 parseEther 转 wei
* - 代币模式:自动读取 ERC20.decimals(),按 parseUnits(amount, decimals) 转 wei
* - 自动生成 hopCount 个中转地址,并通过 48.club Bundle 原子提交
*/
export declare function stealthTransfer(params: StealthTransferSimpleParams): Promise<StealthTransferResult>;