/** * Exponent for calculating how many indivisible units are there in one NEAR. See {@link NEAR_NOMINATION}. */ declare const NEAR_NOMINATION_EXP = 24; /** * Number of indivisible units in one NEAR. Derived from {@link NEAR_NOMINATION_EXP}. */ declare const NEAR_NOMINATION: bigint; /** * Convert account balance value from internal indivisible units to NEAR. 1 NEAR is defined by {@link NEAR_NOMINATION}. * Effectively this divides given amount by {@link NEAR_NOMINATION}. * * @param balance decimal string representing balance in smallest non-divisible NEAR units (as specified by {@link NEAR_NOMINATION}) * @param fracDigits number of fractional digits to preserve in formatted string. Balance is rounded to match given number of digits. * @returns Value in Ⓝ */ declare function formatNearAmount(balance: string | number | bigint, fracDigits?: number): string; /** * Convert human readable NEAR amount to internal indivisible units. * Effectively this multiplies given amount by {@link NEAR_NOMINATION}. * * @param amt decimal string (potentially fractional) denominated in NEAR. * @returns The parsed yoctoⓃ amount or null if no amount was passed in */ declare function parseNearAmount(amt?: string): string | null; /** * Encodes a Uint8Array or string into base58 * @param value Uint8Array or string representing a borsh encoded object * @returns string base58 encoding of the value */ declare function baseEncode(value: Uint8Array | string): string; /** * Decodes a base58 string into a Uint8Array * @param value base58 encoded string * @returns Uint8Array representing the decoded value */ declare function baseDecode(value: string): Uint8Array; export { NEAR_NOMINATION, NEAR_NOMINATION_EXP, baseDecode, baseEncode, formatNearAmount, parseNearAmount };