import type { Address } from "@solana/kit"; import type { TokenInfo } from "./types.js"; export interface CreateTokenInfoParams { /** * The mint address of the token */ mint: Address; /** * The mint account data containing decimals */ mintAccount: { decimals: TDecimals; }; /** * The metadata account data containing name and symbol, or null if not available */ metadataAccount: { name: string; symbol: string; } | null; /** * The metadata URI JSON containing image URL, or null if not available */ metadataUriJson: { image: string; } | null; } /** * Create a TokenInfo object from on-chain and off-chain data. * If no metadata account is provided, derives name and symbol from the mint address. * * @param params - The parameters for creating the TokenInfo * @returns A TokenInfo object * * @example * ```ts * // With metadata * const tokenInfo = createTokenInfo({ * mint: address("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"), * mintAccount: { decimals: 6 }, * metadataAccount: { name: "USD Coin", symbol: "USDC" }, * metadataUriJson: { image: "https://example.com/usdc.png" } * }); * * // Without metadata (derives from address) * const unknownToken = createTokenInfo({ * mint: address("SomeTokenMint11111111111111111111111111111"), * mintAccount: { decimals: 9 }, * metadataAccount: null, * metadataUriJson: null * }); * // Returns: { mint, name: "SomeTo...", symbol: "SOME", decimals: 9 } * ``` */ export declare function createTokenInfo({ mint, mintAccount, metadataAccount, metadataUriJson, }: CreateTokenInfoParams): TokenInfo; //# sourceMappingURL=create-token-info.d.ts.map