import { Connection, Transaction } from "@solana/web3.js"; import BN from "bn.js"; import { BaseToken } from "../base/BaseToken"; /** * Solana Token implementation * Provides functionality for interacting with SPL tokens on Solana */ export declare class TokenSolana extends BaseToken { /** * Constructor for TokenSolana * @param connection The Solana connection */ constructor(connection: Connection); /** * Convert a BN to a number with proper decimal handling * @private * @param amount The BN amount * @param decimals The number of decimals * @returns The converted number */ private _convertBNToNumber; /** * Fetch the number of decimals for the token (implementation for BaseToken) * @param address The token mint address * @returns The number of decimals * @protected */ protected _fetchDecimals(address: string): Promise; /** * Fetch the name of the token (implementation for BaseToken) * @param address The token mint address * @returns The token name * @protected */ protected _fetchName(address: string): Promise; /** * Fetch the symbol of the token (implementation for BaseToken) * @param address The token mint address * @returns The token symbol * @protected */ protected _fetchSymbol(address: string): Promise; /** * Fetch the URI for the token metadata (implementation for BaseToken) * @param address The token mint address * @returns The token URI * @protected */ protected _fetchUri(address: string): Promise; /** * Parse a token amount from human-readable to raw format * @param address The token mint address * @param amount The amount to parse * @returns The parsed amount as BN */ parseAmount(address: string, amount: number | string): Promise; /** * Format a raw token amount to human-readable format * @param address The token mint address * @param amount The raw amount to format as BN * @returns The formatted amount */ formatAmount(address: string, amount: BN): Promise; /** * Get the token balance for a specific owner * @param owner The address of the token owner * @param tokenAddress The token mint address * @returns The token balance as a number */ getBalance(owner: string, tokenAddress: string): Promise; /** * Get the allowance amount that a spender is allowed to use on behalf of an owner * @param owner The address of the token owner * @param tokenAddress The token mint address * @param spender The address of the spender (delegate) * @returns The allowance amount as a number */ getAllowance(_owner: string, _tokenAddress: string, _spender: string): Promise; /** * Approve a spender to spend tokens on behalf of the owner * @param tokenAddress The token mint address * @param spender The address of the spender (delegate) * @param amount The amount to approve * @returns A transaction that can be signed and sent */ approve(tokenAddress: string, spender: string, _amount: number | string): Promise; /** * Find the metadata account for a token mint * @private * @param mint The token mint public key * @returns The metadata account public key or null if not found */ private _findMetadataAccount; /** * Decode a string from a buffer * @private * @param data The buffer data * @param start The start index * @param length The length of the string * @returns The decoded string */ private _decodeString; } //# sourceMappingURL=TokenSolana.d.ts.map