Skip to content

bytes

Algorand TypeScript


Algorand TypeScript / index / bytes

bytes<TLength> = object

Defined in: primitives.ts:121

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

TLength extends uint64 = uint64

The static length of this byte array

readonly length: uint64

Defined in: primitives.ts:125

Retrieve the length of the byte sequence

at(i): bytes

Defined in: primitives.ts:132

Retrieve the byte at the index i

Uint64Compat

The index to read. Can be negative to read from the end

bytes

The byte found at the index, or an empty bytes value


bitwiseAnd(other): bytes<TLength>

Defined in: primitives.ts:148

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

bytes<TLength>

The other bytes value

bytes<TLength>

The bitwise operation result

bitwiseAnd(other): bytes

Defined in: primitives.ts:157

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.

BytesCompat

The other bytes value

bytes

The bitwise operation result


bitwiseInvert(): bytes<TLength>

Defined in: primitives.ts:199

Perform a bitwise INVERT operation with this bytes value

bytes<TLength>

The bitwise operation result


bitwiseOr(other): bytes<TLength>

Defined in: primitives.ts:166

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

bytes<TLength>

The other bytes value

bytes<TLength>

The bitwise operation result

bitwiseOr(other): bytes

Defined in: primitives.ts:175

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.

BytesCompat

The other bytes value

bytes

The bitwise operation result


bitwiseXor(other): bytes<TLength>

Defined in: primitives.ts:184

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

bytes<TLength>

The other bytes value

bytes<TLength>

The bitwise operation result

bitwiseXor(other): bytes

Defined in: primitives.ts:193

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.

BytesCompat

The other bytes value

bytes

The bitwise operation result


concat(other): bytes

Defined in: primitives.ts:139

Concatenate this bytes value with another bytes value

BytesCompat

The other bytes value

bytes

The concatenation result


equals(other): boolean

Defined in: primitives.ts:206

Compares this bytes value with another.

BytesCompat

The other bytes value

boolean

True if both values represent the same byte sequence


slice(): bytes<TLength>

Defined in: primitives.ts:211

Returns a copy of this bytes sequence

bytes<TLength>

slice(start): bytes

Defined in: primitives.ts:216

Returns a slice of this bytes sequence from the specified start to the end

Uint64Compat

The index to start slicing from. Can be negative to count from the end.

bytes

slice(start, end): bytes

Defined in: primitives.ts:222

Returns a slice of this bytes sequence from the specified start to the specified end

Uint64Compat

The index to start slicing from. Can be negative to count from the end.

Uint64Compat

The index to end the slice. Can be negative to count from the end.

bytes


toFixed<TNewLength>(options): bytes<TNewLength>

Defined in: primitives.ts:237

Change this unbounded bytes instance into a bounded one

TNewLength extends uint64

ToFixedBytesOptions<TNewLength>

Options for the conversion

bytes<TNewLength>


toString(): string

Defined in: primitives.ts:231

Interpret this byte sequence as a utf-8 string

string