import { BigNumberish } from '@ethersproject/bignumber'; import { CLValue, ToBytes } from './CLValue'; /** * Convert number to bytes * @param bitSize The bit size of the integer * @param signed `true` if the integer is signed, `false` if not * @returns `Uint8Array` buffer representation of the integer */ export declare const toBytesNumber: (bitSize: number, signed: boolean) => (value: BigNumberish) => Uint8Array; /** * Converts `u8` to little endian. */ export declare const toBytesU8: (value: BigNumberish) => Uint8Array; /** * Converts `i32` to little endian. */ export declare const toBytesI32: (value: BigNumberish) => Uint8Array; /** * Converts `u32` to little endian. */ export declare const toBytesU32: (value: BigNumberish) => Uint8Array; /** * Converts `u64` to little endian. */ export declare const toBytesU64: (value: BigNumberish) => Uint8Array; /** * Converts `i64` to little endian. */ export declare const toBytesI64: (value: BigNumberish) => Uint8Array; /** * Converts `u128` to little endian. */ export declare const toBytesU128: (value: BigNumberish) => Uint8Array; /** * Converts `u256` to little endian. */ export declare const toBytesU256: (value: BigNumberish) => Uint8Array; /** * Converts `u512` to little endian. */ export declare const toBytesU512: (value: BigNumberish) => Uint8Array; /** * @deprecated */ export declare const toBytesDeployHash: (deployHash: Uint8Array) => Uint8Array; /** * Serializes a string into an array of bytes * @param str The string to be converted * @returns A `Uint8Array` representation of the string */ export declare function toBytesString(str: string): Uint8Array; /** * Deserializes an array of bytes into a string * @param byte `Uint8Array` buffer of bytes to be deserialized * @returns The serialized string */ export declare const fromBytesString: (byte: Uint8Array) => string; /** * Serializes an array of u8, equal to Vec in rust. * @param arr `Uint8Array` buffer of u8 integers * @returns Serialized `Uint8Array` buffer */ export declare function toBytesArrayU8(arr: Uint8Array): Uint8Array; /** * Serializes a vector of values of type `T` into an array of bytes. * @param vec A vector of objects of generic type `T` which extends `ToBytes` * @returns `Uint8Array` buffer serialized from `vec` */ export declare const toBytesVector: (vec: T[]) => Uint8Array; /** * Use blake2b to compute hash of ByteArray * @param x Byte array of type `Uint8Array` to compute the blake2b hash on * @returns `Uint8Array` buffer of the blake2b hash */ export declare function byteHash(x: Uint8Array): Uint8Array; /** * @experimental * Serializes a vector of values of type `T` into an array of bytes. * @param vec A vector of objects of generic type `T` which extends `ToBytes` * @returns `Uint8Array` buffer serialized from `vec` */ export declare const toBytesVectorNew: (vec: T[]) => Uint8Array; /** * @deprecated */ export declare function toBytesBytesArray(arr: Uint8Array): Uint8Array;