/** * Byte and UTF-8 helpers ported from ethers v6 (MIT License, * https://github.com/ethers-io/ethers.js) so TronWeb does not depend on * ethers for them. Signatures, results and thrown errors match ethers. */ import type { BytesLike, UnicodeNormalizationForm, Utf8ErrorFunc } from 'ethers'; /** * Get a typed Uint8Array for %%value%%. If already a Uint8Array * the original %%value%% is returned. */ export declare function getBytes(value: BytesLike, name?: string): Uint8Array; /** * Returns a DataHexString containing all members of %%datas%% concatenated. */ export declare function concat(datas: ReadonlyArray): string; /** * Returns the UTF-8 byte representation of %%str%%. * * If %%form%% is specified, the string is normalized. */ export declare function toUtf8Bytes(str: string, form?: UnicodeNormalizationForm): Uint8Array; /** * Returns the string represented by the UTF-8 data %%bytes%%. * * When %%onError%% function is specified, it is called on UTF-8 * errors allowing recovery using the Utf8ErrorFunc API. * (default: throw on any invalid sequence) */ export declare function toUtf8String(bytes: BytesLike, onError?: Utf8ErrorFunc): string; /** * Computes the keccak256 of the UTF-8 bytes of %%value%%. */ export declare function id(value: string): string;