import { ABISerializableObject } from "../serializer/Serializable.js";
import { ABIEncoder } from "../serializer/Encoder.js";
import { ABIDecoder } from "../serializer/Decoder.js";
export type BytesType = Bytes | ArrayBufferView | ArrayBuffer | ArrayLike<number> | string;
type AnyBytes = BytesType | {
    array: Uint8Array;
};
export type BytesEncoding = "hex" | "utf8";
export declare class Bytes implements ABISerializableObject {
    static abiName: string;
    /**
     * Create a new Bytes instance.
     * @note Make sure to take a [[copy]] before mutating the bytes as the underlying source is not copied here.
     */
    static from(value: AnyBytes, encoding?: BytesEncoding): Bytes;
    static fromString(value: string, encoding?: BytesEncoding): Bytes;
    static fromABI(decoder: ABIDecoder): Bytes;
    static abiDefault(): Bytes;
    static equal(a: BytesType, b: BytesType): boolean;
    static random(length: number): Bytes;
    /** Return true if given value is a valid `BytesType`. */
    static isBytes(value: any): value is BytesType;
    array: Uint8Array;
    constructor(array?: Uint8Array);
    /** Number of bytes in this instance. */
    get length(): number;
    /** Hex string representation of this instance. */
    get hexString(): string;
    /** UTF-8 string representation of this instance. */
    get utf8String(): string;
    /** Mutating. Append bytes to this instance. */
    append(other: AnyBytes): void;
    /** Non-mutating, returns a copy of this instance with appended bytes. */
    appending(other: AnyBytes): Bytes;
    /** Mutating. Pad this instance to length. */
    zeropad(n: number, truncate?: boolean): void;
    /** Non-mutating, returns a copy of this instance with zeros padded. */
    zeropadded(n: number, truncate?: boolean): Bytes;
    /** Mutating. Drop bytes from the start of this instance. */
    dropFirst(n?: number): void;
    /** Non-mutating, returns a copy of this instance with dropped bytes from the start. */
    droppingFirst(n?: number): Bytes;
    copy(): Bytes;
    equals(other: AnyBytes): boolean;
    toString(encoding?: BytesEncoding): string;
    toABI(encoder: ABIEncoder): void;
    toJSON(): string;
}
export {};
//# sourceMappingURL=Bytes.d.ts.map