UNPKG

four-flap-meme-sdk

Version:

SDK for Flap bonding curve and four.meme TokenManager

118 lines (117 loc) 3.56 kB
import { BundleStatus, SoulPointSignatureMode, VNormalizationMode } from '../clients/club48.js'; export type FourBundleConfig = { rpcUrl: string; fourApiUrl?: string; club48Endpoint?: string; club48ExplorerEndpoint?: string; spMode?: SoulPointSignatureMode; spVMode?: VNormalizationMode; spPrivateKey?: string; bundleBlockOffset?: number; noMerge?: boolean; tipAmountWei?: bigint; txType?: 0 | 2; gasLimitMultiplier?: number; customSubmitFn?: (signedTxs: string[]) => Promise<string>; }; export type FourCreateWithBundleBuyParams = { privateKeys: string[]; buyAmounts: string[]; b0Amount?: string; tokenInfo: { name: string; symbol: string; description: string; imageUrl?: string; imageFile?: Blob; label?: 'Meme' | 'AI' | 'Defi' | 'Games' | 'Infra' | 'De-Sci' | 'Social' | 'Depin' | 'Charity' | 'Others'; preSale?: string; webUrl?: string; twitterUrl?: string; telegramUrl?: string; }; config: FourBundleConfig; }; export type FourCreateWithBundleBuyResult = { bundleUuid: string; tokenAddress?: string; status: BundleStatus; createTx: string; buyTxs: string[]; profitTxs: string[]; }; /** * four.meme: 创建代币 + 捆绑购买 * * 用户只需传入: * - dev 私钥 + N 个买家私钥 * - 对应的购买金额 * - 代币基本信息 */ export declare function createTokenWithBundleBuy(params: FourCreateWithBundleBuyParams): Promise<FourCreateWithBundleBuyResult>; export type FourBatchBuyParams = { privateKeys: string[]; buyAmounts: string[]; tokenAddress: string; config: FourBundleConfig; }; export type FourBatchBuyResult = { bundleUuid: string; status: BundleStatus; buyTxs: string[]; }; /** * four.meme: 批量购买 */ export declare function batchBuyWithBundle(params: FourBatchBuyParams): Promise<FourBatchBuyResult>; export type FourBatchSellParams = { privateKeys: string[]; sellAmounts: string[]; tokenAddress: string; config: FourBundleConfig; }; export type FourBatchSellResult = { bundleUuid: string; status: BundleStatus; sellTxs: string[]; }; /** * four.meme: 批量卖出 */ export declare function batchSellWithBundle(params: FourBatchSellParams): Promise<FourBatchSellResult>; export type FourPrivateBase = { rpcUrl: string; club48Endpoint?: string; club48ExplorerEndpoint?: string; }; export type FourPrivateBuyParams = FourPrivateBase & { privateKey: string; tokenAddress: string; funds: string; to?: string; spPrivateKey?: string; }; export type FourPrivateSellParams = FourPrivateBase & { privateKey: string; tokenAddress: string; amount: string; minFunds?: bigint; spPrivateKey?: string; }; export declare function fourPrivateBuy(params: FourPrivateBuyParams): Promise<string>; export declare function fourPrivateSell(params: FourPrivateSellParams): Promise<string>; export type FourBatchPrivateBuyParams = FourPrivateBase & { privateKeys: string[]; fundsList: string[]; tokenAddress: string; spPrivateKey?: string; }; export type FourBatchPrivateSellParams = FourPrivateBase & { privateKeys: string[]; amounts: string[]; tokenAddress: string; spPrivateKey: string; minFundsEach?: bigint; }; export declare function fourBatchPrivateBuy(params: FourBatchPrivateBuyParams): Promise<boolean>; export declare function fourBatchPrivateSell(params: FourBatchPrivateSellParams): Promise<boolean>;