Interface that should be implemented by ABI serializable objects.

Hierarchy

  • Bytes

Implements

Constructors

Properties

array: Uint8Array
abiName: string = 'bytes'

Accessors

  • get hexString(): string
  • Hex string representation of this instance.

    Returns string

  • get utf8String(): string
  • UTF-8 string representation of this instance.

    Returns string

Methods

  • Mutating. Append bytes to this instance.

    Parameters

    • other: AnyBytes

    Returns void

  • Non-mutating, returns a copy of this instance with appended bytes.

    Parameters

    • other: AnyBytes

    Returns Bytes

  • Mutating. Drop bytes from the start of this instance.

    Parameters

    • n: number = 1

    Returns void

  • Non-mutating, returns a copy of this instance with dropped bytes from the start.

    Parameters

    • n: number = 1

    Returns Bytes

  • Mutating. Pad this instance to length.

    Parameters

    • n: number
    • truncate: boolean = false

    Returns void

  • Non-mutating, returns a copy of this instance with zeros padded.

    Parameters

    • n: number
    • truncate: boolean = false

    Returns Bytes

Generated using TypeDoc