ToFixedBytesOptions
Algorand TypeScript / index / <internal> / ToFixedBytesOptions
ToFixedBytesOptions<
TLength> =object
Defined in: primitives.ts:101
Type Parameters
Section titled “Type Parameters”TLength
Section titled “TLength”TLength extends uint64 = uint64
Properties
Section titled “Properties”length
Section titled “length”length:
TLength
Defined in: primitives.ts:105
The length for the bounded type
strategy?
Section titled “strategy?”
optionalstrategy:"assert-length"|"unsafe-cast"
Defined in: primitives.ts:114
The strategy to use for converting to a fixed length bytes type (default: ‘assert-length’)
- ‘assert-length’: Asserts that the byte sequence has the specified length and fails if it differs
- ‘unsafe-cast’: Reinterprets the byte sequence as a fixed length type without any checks. This will succeed even if the value is not of the specified length but will result in undefined behaviour for any code that makes use of this value.