Algorand TypeScript
    Preparing search index...

    Type Alias bytes<TLength>

    A sequence of zero or more bytes (ie. byte[])

    type bytes<out TLength extends uint64 = uint64> = {
        length: uint64;
        at(i: Uint64Compat): bytes;
        bitwiseAnd(other: bytes<TLength>): bytes<TLength>;
        bitwiseAnd(other: BytesCompat): bytes;
        bitwiseInvert(): bytes<TLength>;
        bitwiseOr(other: bytes<TLength>): bytes<TLength>;
        bitwiseOr(other: BytesCompat): bytes;
        bitwiseXor(other: bytes<TLength>): bytes<TLength>;
        bitwiseXor(other: BytesCompat): bytes;
        concat(other: BytesCompat): bytes;
        equals(other: BytesCompat): boolean;
        slice(): bytes<TLength>;
        slice(start: Uint64Compat): bytes;
        slice(start: Uint64Compat, end: Uint64Compat): bytes;
        toFixed<TNewLength extends uint64>(
            options: ToFixedBytesOptions<TNewLength>,
        ): bytes<TNewLength>;
        toString(): string;
    }

    Type Parameters

    • out TLength extends uint64 = uint64

      The static length of this byte array

    Index

    Properties

    length: uint64

    Retrieve the length of the byte sequence

    Methods

    • Perform a bitwise AND operation with this bytes value and another bytes value of the same length.

      Parameters

      Returns bytes<TLength>

      The bitwise operation result

    • Perform a bitwise AND operation with this bytes value and another bytes value.

      The shorter of the two values will be zero-left extended to the larger length.

      Parameters

      Returns bytes

      The bitwise operation result

    • Perform a bitwise OR operation with this bytes value and another bytes value of the same length.

      Parameters

      Returns bytes<TLength>

      The bitwise operation result

    • Perform a bitwise OR operation with this bytes value and another bytes value

      The shorter of the two values will be zero-left extended to the larger length.

      Parameters

      Returns bytes

      The bitwise operation result

    • Perform a bitwise XOR operation with this bytes value and another bytes value of the same length.

      Parameters

      Returns bytes<TLength>

      The bitwise operation result

    • Perform a bitwise XOR operation with this bytes value and another bytes value.

      The shorter of the two values will be zero-left extended to the larger length.

      Parameters

      Returns bytes

      The bitwise operation result

    • Compares this bytes value with another.

      Parameters

      Returns boolean

      True if both values represent the same byte sequence

    • Interpret this byte sequence as a utf-8 string

      Returns string