import { BN } from "@coral-xyz/anchor"; export declare const MAX_SAFE_INTEGER_BN: BN; export declare const U8_MAX = 255; export declare const U16_MAX = 65535; export declare const U32_MAX = 4294967295; export declare const U64_MAX_BIGINT: bigint; export declare const U128_MAX_BIGINT: bigint; export declare const U64_MAX_BN: BN; export declare const U128_MAX_BN: BN; /** * Converts a buffer or array of character codes to a string */ export declare function charsToString(chars: number[] | Buffer): string; /** * @deprecated Use `charsToString` instead. */ export declare function charsToName(chars: number[] | Buffer): string; /** * Converts a string to an array of character codes */ export declare function stringToChars(name: string, length?: number): number[]; /** * @deprecated Use `stringToChars` instead. */ export declare function nameToChars(name: string, length?: number): number[]; /** * Returns the first 8 raw SHA-256 bytes for PDA seed derivation. */ export declare function sha256First8Bytes(chars: number[]): Promise; /** * Values accepted by helpers that normalize integer/base-unit values into BN. */ export type BnInput = BN | bigint | number | string; /** * Normalizes an integer/base-unit value into a BN while preserving existing BN values. */ export declare function toBn(value: BnInput): BN; /** * Backward-compatible alias for amount-oriented call sites. * * @deprecated Use `toBn` instead. */ export declare function toBnAmount(amount: BnInput): BN; /** * Converts a BN to a JavaScript number when it is known to fit safely. */ export declare function bnToSafeNumber(value: BN, label?: string): number; /** * Safely converts a BN amount to a UI amount (with decimals). * * @param amount - The amount in base units (BN) * @param decimals - The number of decimals (e.g., 9) * @returns The UI amount as a number * * @example * // Convert 10010000000 base units with 9 decimals * const uiAmount = toUiAmount(new BN(10010000000), 9); // Returns 10.01 * * @throws Error if the BN amount is too large to safely convert to number */ export declare function toUiAmount(amount: BN, decimals: number): number; /** * Safely converts a UI amount (with decimals) to a BN amount. * * @param amount - The UI amount (e.g., 10.01) * @param decimals - The number of decimals (e.g., 9) * @returns BN representing the amount in base units * * @example * // Convert 10.01 with 9 decimals * const amount = fromUiAmount(10.01, 9); // Returns BN(10010000000) */ export declare function fromUiAmount(amount: number | string, decimals: number): BN;