//#region extensions/crypto/src/services/bankr-types.d.ts /** * Bankr Agent API — TypeScript interfaces * * Covers all request/response shapes for api.bankr.bot endpoints: * - User info (GET /agent/me) * - Balances (GET /agent/balances) * - Prompt + job polling (POST /agent/prompt, GET /agent/job/{id}) * - Sign (POST /agent/sign) * - Submit (POST /agent/submit) * - Token deploy (POST /token-launches/deploy) */ type BankrChain = 'base' | 'mainnet' | 'polygon' | 'unichain' | 'solana'; /** Map from our chain names to Bankr chain names */ declare const CHAIN_MAP: Record; interface BankrWallet { chain: 'evm' | 'solana'; address: string; } interface BankrSocialAccount { platform: string; username: string; } interface BankrUserInfo { wallets: BankrWallet[]; bankrClub: { active: boolean; } | boolean; socialAccounts: BankrSocialAccount[]; refCode?: string; } /** Normalize bankrClub to a boolean regardless of API shape */ declare function isBankrClubActive(info: BankrUserInfo): boolean; /** Raw token entry from Bankr API tokenBalances array */ interface BankrRawTokenEntry { address: string; network: string; token: { balance: number; balanceUSD: number; baseToken: { name: string; address: string; symbol: string; imgUrl: string; price: number; decimals: number; }; }; } /** Raw per-chain balance from Bankr API */ interface BankrRawChainBalance { nativeBalance: string; nativeUsd: string; tokenBalances: BankrRawTokenEntry[]; total: string; } /** Raw balances response from GET /agent/balances */ interface BankrRawBalancesResponse { success: boolean; evmAddress: string; solAddress: string; balances: Record; } /** Normalized token balance for our tools */ interface BankrTokenBalance { symbol: string; name: string; address: string; balance: number; balanceUsd: number; price: number; decimals: number; } /** Normalized per-chain balance for our tools */ interface BankrChainBalance { chain: string; nativeBalance: string; nativeBalanceUsd: number; tokens: BankrTokenBalance[]; totalUsd: number; } /** Normalized balances response for our tools */ interface BankrBalancesResponse { chains: BankrChainBalance[]; totalUsd: number; } interface BankrPromptRequest { prompt: string; threadId?: string; } interface BankrPromptResponse { jobId: string; threadId: string; status: 'pending'; } type BankrJobStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled'; interface BankrTransaction { type: string; hash?: string; chain?: string; metadata?: Record; } interface BankrRichData { tokenInfo?: Record; chartUrl?: string; [key: string]: unknown; } interface BankrJobResult { jobId: string; status: BankrJobStatus; response?: string; richData?: BankrRichData; transactions?: BankrTransaction[]; error?: string; } type BankrSignatureType = 'personal_sign' | 'eth_signTypedData_v4' | 'eth_signTransaction'; interface BankrSignRequest { signatureType: BankrSignatureType; message?: string; typedData?: unknown; transaction?: unknown; chainId?: number; } interface BankrSignResponse { signature: string; signer: string; } interface BankrSubmitRequest { signedTransaction: string; chainId: number; waitForConfirmation?: boolean; } interface BankrSubmitResponse { hash: string; status: 'submitted' | 'confirmed'; blockNumber?: number; } interface BankrDeployRequest { name: string; symbol?: string; description?: string; imageUrl?: string; chain?: 'base' | 'solana'; feeRecipient?: string; tweetUrl?: string; websiteUrl?: string; simulateOnly?: boolean; vault?: { percentage: number; lockDays: number; }; vesting?: { cliffDays: number; vestingDays: number; }; } interface BankrFeeDistribution { creator: number; bankr: number; protocol: number; ecosystem?: number; } interface BankrDeployResponse { tokenAddress: string; poolId?: string; txHash: string; chain: string; feeDistribution: BankrFeeDistribution; simulateOnly?: boolean; } declare class BankrAuthError extends Error { constructor(message?: string); } declare class BankrCreditsError extends Error { constructor(message?: string); } declare class BankrAccessError extends Error { constructor(message?: string); } declare class BankrReadOnlyError extends Error { constructor(message?: string); } declare class BankrRateLimitError extends Error { resetAt: number; limit: number; used: number; constructor(resetAt: number, limit: number, used: number); } declare class BankrServerError extends Error { statusCode: number; constructor(statusCode: number, message?: string); } //#endregion export { BankrAccessError, BankrAuthError, BankrBalancesResponse, BankrChain, BankrChainBalance, BankrCreditsError, BankrDeployRequest, BankrDeployResponse, BankrFeeDistribution, BankrJobResult, BankrJobStatus, BankrPromptRequest, BankrPromptResponse, BankrRateLimitError, BankrRawBalancesResponse, BankrRawChainBalance, BankrRawTokenEntry, BankrReadOnlyError, BankrRichData, BankrServerError, BankrSignRequest, BankrSignResponse, BankrSignatureType, BankrSocialAccount, BankrSubmitRequest, BankrSubmitResponse, BankrTokenBalance, BankrTransaction, BankrUserInfo, BankrWallet, CHAIN_MAP, isBankrClubActive }; //# sourceMappingURL=bankr-types.d.mts.map