import { ABISerializableObject } from "./serializer/Serializable.js";
import { KeyType } from "./chain/KeyType.js";
import { Name, NameType } from "./chain/Name.js";
import { TimePoint } from "./chain/Time.js";
export declare function arrayEquals(a: ArrayLike<number>, b: ArrayLike<number>): boolean;
export declare function arrayEquatableEquals(a: ABISerializableObject[], b: ABISerializableObject[]): boolean;
export declare function arrayToHex(array: ArrayLike<number>): string;
export declare function hexToArray(hex: string): Uint8Array<ArrayBuffer>;
/** Concatenate multiple Uint8Arrays into one. */
export declare function concatBytes(...arrays: Uint8Array[]): Uint8Array;
/** Generate N random bytes, throws if a secure random source isn't available. */
export declare function secureRandom(length: number): Uint8Array;
/** Check if object in instance of class. */
export declare function isInstanceOf<T extends {
    new (...args: any[]): InstanceType<T>;
}>(object: any, someClass: T): object is InstanceType<T>;
/**
 * Convert an Ethereum signature to WIRE format, either K1 or EM based on prefix.
 *
 * @param eth_sig A signature in the format of an Ethereum signature.
 * @param prefix WIRE prefix to use for the signature. K1 or EM, EM by default.
 * @returns A WIRE formatted signature.
 * @deprecated This function will be removed in a future version. Use Signature.fromHex() instead.
 */
export declare function evmSigToWire(eth_sig: string, prefix?: string): string;
/**
 * Get the public key in compressed format from a public or private key.
 *
 * @param key Either a public or private key
 * @param isPrivate Boolean indicating if the key is private, defaults to false.
 * @returns The public key in compressed format.
 */
export declare const getCompressedPublicKey: (key: string, type?: KeyType, isPrivate?: boolean) => string;
/**
 * Signs a given hash with the provided private key directly.
 * This function removes any '0x' prefix from the private key and hash,
 * signs the hash, and formats the signature in the Ethereum signature format.
 * Additionally, it computes the Ethereum address corresponding to the private key.
 *
 * @param {string} privateKey - The private key in hex format.
 * @param {string} hash - The hash to be signed.
 * @returns {SignHash} An object containing the Ethereum signature and address.
 */
export declare const directSignHash: (privateKey: string, hash: string) => SignHash;
export interface SignHash {
    signature: string;
    address: string;
}
export declare const normalizeBytesField: (x: any) => Uint8Array;
/**
 * Converts Buffer containing an Ethereum address (link that stored in auth.msg links table)
 * Adds Ox and resturns as readable hex string
 * 20 bytes expected
 *
 * @param address 20 bytes buffer of eth address
 * @returns readable hex string of eth address with 0x prefix
 */
export declare const ethAddressBufferToString: (address: Uint8Array) => string;
/**
 * Ensures a hex string starts with '0x'.
 * If it does not, prepends '0x' to the string.
 * @param hex - The hex string to check
 * @returns The hex string with '0x' prefix if it was not present
 */
export declare const ensure0x: (hex: string) => string;
/**
 * Converts a TimePoint date to a block timestamp.
 *
 * @param date - The TimePoint date to convert
 * @returns The block timestamp as a number
 */
export declare const dateToBlockTimestamp: (date: TimePoint) => number;
/**
 * Parses a TimePointSecString date and returns its numeric representation.
 *
 * @param date - The date string in TimePointSecString format to parse
 * @returns The numeric timestamp representation of the date in milliseconds
 * @throws Error if the date string cannot be parsed into a valid date
 */
export declare const checkDateParse: (date: TimePointSecString) => number;
/**
 * Converts a WIRE name (NameType) to a 64-bit unsigned integer.
 *
 * @param username - The WIRE name to convert
 * @returns A 64-bit unsigned integer representation of the name
 */
export declare const nameToUInt64: (username: NameType) => number;
/**
 * Serialize an WIRE name into its 8-byte little-endian hex and prefix with 0x.
 *
 * @param input  The name to serialize, either as a string or a Name instance
 * @returns      A hex string like "0x000000005c73285d"
 */
export declare const serializeName: (input: string | Name) => string;
export type TimePointSecString = string;
/**
 * Converts any 0x hex string to a checksum hash string that can be used as the sha256 index for a contract table.
 *
 * @param hex Any 0x hex string, typically an Ethereum address or signature
 * @returns Sha256 checksum of the hex
 */
export declare const checksum_hash: (hex: string) => string;
/**
 * Returns true iff `bytes` is valid UTF-8.
 * @param {Uint8Array|ArrayBuffer|Buffer} bytes
 */
export declare const isUtf8: (bytes: any) => boolean;
//# sourceMappingURL=Utils.d.ts.map