/** * Bytes Primitive. */ export declare class Bytes { readonly bytes: Uint8Array; /** * Instantiate Bytes from a Uint8Array. * * @param bytes {Uint8Array} The bytes to use. */ constructor(bytes: Uint8Array); /** * Instantiates bytes from an Uint8Array. * * @param bytes The bytes as a Uint8Array. * * @throws {Error} If Base64 is invalid. * * @returns Instance of Bytes. */ static fromBytes(bytes: Uint8Array): Bytes; /** * Instantiates bytes from a Base64 string. * * @param base64 The Base64 string. * * @throws {Error} If Base64 is invalid. * * @returns Instance of Bytes. */ static fromBase64(base64: string): Bytes; /** * Instantiates bytes from a BigInt (LE encoded). * * @param number The bigint number. * * @throws {Error} If number is invalid. * * @returns Instance of Bytes. */ static fromBigInt(number: bigint): Bytes; /** * Instantiates bytes from a BigInt (64 Bit LE encoded). * * @param number The bigint number. * * @throws {Error} If number is invalid. * * @returns Instance of Bytes. */ static fromBigInt64(number: bigint): Bytes; /** * Instantiates bytes from a hex string. * * @param hex The hex string. * * @throws {Error} If hex is invalid. * * @returns Instance of Bytes. */ static fromHex(hex: string): Bytes; /** * Instantiates bytes from a UTF8 string. * * @param utf8 The UTF8 string. * * @returns Instance of Bytes. */ static fromUtf8(utf8: string): Bytes; /** * Return bytes as a Base64 string. * * @returns Bytes as a Base64 string. */ toBase64(): string; toBigInt(): bigint; /** * Return bytes as a hex string. * * @returns Bytes as a hex string. */ toHex(): string; /** * Return bytes as a UTF8 string * * @returns Bytes as a UTF8 string. */ toUtf8(): string; /** * Return bytes as a Uint8Array * * @returns Bytes as a Uint8Array. */ toBytes(): Uint8Array; }