/** * @name tools/perpspad/perpspad-client * @description Typed REST client for the PerpsPad permissionless launchpad * (https://perpspad.fun). Every coin is backed by a live leveraged perp * position; launching returns unsigned config + pool transactions that the * caller signs and sends with their own wallet. No API key — the wallet is * the identity. All shapes verified against the live API on 2026-09-14. * * @module tools/perpspad/perpspad-client */ /** Default PerpsPad API base URL (public, no auth). */ export declare const PERPSPAD_API_BASE_URL = "https://perpspad.fun"; /** Direction of the backing perp position. */ export type PerpspadDirection = 'long' | 'short'; /** Dev-buy bounds per quote token (verified from the OpenAPI description). */ export declare const DEV_BUY_BOUNDS: Readonly>; /** Supported stats include subsets (comma-separated upstream). */ export declare const STATS_INCLUDE_KINDS: readonly ["kpis", "distributions", "series", "leaderboards"]; /** Supported token event kinds. */ export declare const TOKEN_EVENT_KINDS: readonly ["buyback", "external_buyback", "burn", "claim", "creator_payout"]; /** Backing perp market as returned by GET /api/v1/markets. */ export interface PerpspadMarket { readonly symbol: string; readonly minLeverage: number; readonly maxLeverage: number; } /** Launched token as returned by GET /api/v1/tokens. */ export interface PerpspadToken { readonly id: string; readonly ticker: string; readonly name: string; readonly description: string | null; readonly image_url: string | null; readonly mint_address: string | null; readonly dbc_pool_address: string | null; readonly dlmm_pool_address: string | null; readonly clmm_pool_address: string | null; readonly graduated_pool_address: string | null; readonly migration_status: string | null; readonly underlying: string | null; readonly leverage: number | null; readonly direction: string | null; readonly quote_token: string | null; readonly quote_mint: string | null; readonly quote_decimals: number | null; readonly sol_raised: number | null; readonly source: string | null; readonly external_mint: string | null; readonly external_platform: string | null; readonly created_at: string; readonly twitter_url: string | null; readonly website_url: string | null; } /** Two-leg basket backing. */ export interface PerpspadLeg { readonly underlying: string; readonly leverage: number; readonly direction: 'long' | 'short'; } /** Launch request body for POST /api/v1/launch. */ export interface PerpspadLaunchBody { readonly ticker: string; readonly name: string; readonly creatorAddress: string; readonly devBuy: number; readonly underlying?: string; readonly leverage?: number; readonly direction?: 'long' | 'short'; readonly legs?: readonly PerpspadLeg[]; readonly quote?: 'SOL' | 'USDC' | 'CUSTOM'; readonly quoteMint?: string; readonly quoteDecimals?: number; readonly imageUrl?: string; readonly websiteUrl?: string; readonly twitterUrl?: string; } /** Unsigned launch transactions returned by POST /api/v1/launch. */ export interface PerpspadLaunchUnsigned { readonly tokenId: string; readonly mint: string; readonly configAddress: string; readonly poolAddress: string; readonly transactions: readonly { readonly label: string; readonly base64: string; }[]; readonly protocolFeeSol: number; } /** * @name PerpspadApiError * @description Typed error for non-2xx responses and `{ok:false}` envelopes. */ export declare class PerpspadApiError extends Error { readonly status: number; readonly code: string; constructor(status: number, code: string, message: string); } /** Validates the launch body against the verified upstream contract. */ export declare function validateLaunchBody(body: PerpspadLaunchBody, markets: readonly PerpspadMarket[]): void; /** Caps upstream payloads (50-entry arrays, 500-char strings, 30k total). */ export declare function compactPerpspadResponse(payload: unknown): unknown; /** * @name PerpspadApiClient * @description REST client for the PerpsPad launchpad: markets, tokens, * events, stats, stock pairs, launch status, and launch builders. */ export declare class PerpspadApiClient { private readonly baseUrl; constructor(options?: { readonly baseUrl?: string; }); private get; private post; /** Lists supported underlying perp markets with leverage caps. */ getMarkets(): Promise; /** Lists launched tokens. */ getTokens(options?: { readonly sort?: 'newest' | 'oldest' | 'raised'; readonly limit?: number; readonly offset?: number; }): Promise; /** Fetches one token by UUID or mint address. */ getToken(id: string): Promise; /** Fetches buyback/burn/fee events for one token. */ getTokenEvents(id: string, options?: { readonly kind?: string; readonly limit?: number; readonly offset?: number; }): Promise; /** Fetches launch status by token id (poll until 'live'). */ getLaunchStatus(tokenId: string): Promise; /** Lists pairable stock mints for stock-paired launches. */ getStockPairs(): Promise; /** Fetches platform-wide stats (kpis/distributions/series/leaderboards). */ getStats(include?: string): Promise; /** * Requests the unsigned launch transactions (config + pool). Does NOT * broadcast anything — the caller signs and sends both txs from their own * wallet, then polls the launch status until 'live'. */ buildLaunch(body: PerpspadLaunchBody): Promise; /** Prepares a stock-paired launch (returns payloads to sign). */ prepareStockLaunch(body: { readonly creatorWallet: string; readonly stockMint: string; readonly name: string; readonly symbol: string; readonly underlying?: string; readonly leverage?: number; readonly direction?: 'long' | 'short'; readonly legs?: readonly PerpspadLeg[]; readonly marketCapUsd?: number; }): Promise; /** Submits signed stock-paired launch transactions. */ submitStockLaunch(signedQuote: string, signedTransaction: string): Promise; } //# sourceMappingURL=perpspad-client.d.ts.map