@wharfkit/session - v4.0.1
    Preparing search index...

    Class Bytes

    Interface that should be implemented by ABI serializable objects.

    Implements

    Index
    • Parameters

      • Optionalarray: Uint8Array<ArrayBufferLike>

      Returns Bytes

    array: Uint8Array
    abiName: string
    • get hexString(): string

      Hex string representation of this instance.

      Returns string

    • get length(): number

      Number of bytes in this instance.

      Returns number

    • get utf8String(): string

      UTF-8 string representation of this instance.

      Returns string

    • 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

    • Returns Bytes

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

      Parameters

      • Optionaln: number

      Returns void

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

      Parameters

      • Optionaln: number

      Returns Bytes

    • Return true if the object equals the other object passed.

      Parameters

      • other: AnyBytes

      Returns boolean

    • Called when encoding to json abi format.

      Returns string

    • Returns a string representation of an object.

      Parameters

      Returns string

    • Mutating. Pad this instance to length.

      Parameters

      • n: number
      • Optionaltruncate: boolean

      Returns void

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

      Parameters

      • n: number
      • Optionaltruncate: boolean

      Returns Bytes

    • Returns Bytes

    • Create a new Bytes instance.

      Parameters

      Returns Bytes

      Make sure to take a [[copy]] before mutating the bytes as the underlying source is not copied here.

    • Parameters

      Returns Bytes

    • Return true if given value is a valid BytesType.

      Parameters

      • value: any

      Returns value is BytesType

    • Parameters

      • length: number

      Returns Bytes