algopy_testing.primitives.fixed_bytes
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”FixedBytes | A statically-sized byte sequence, where the length is known at compile time. |
|---|
class FixedBytes
Section titled “class FixedBytes”Bases: algopy_testing.protocols.BytesBacked, Generic[_TBytesLength]
A statically-sized byte sequence, where the length is known at compile time.
Unlike Bytes, FixedBytes has a fixed length specified via a type parameter.
Example: : FixedBytes[typing.Literal[32]] # A 32-byte fixed-size bytes value
value : bytes
Section titled “value : bytes”property length : UInt64
Section titled “property length : UInt64”Returns the specified length of the FixedBytes.
classmethod from_base32(value: str) → Self
Section titled “classmethod from_base32(value: str) → Self”Creates FixedBytes from a base32 encoded string e.g. FixedBytes.from_base32(“74======”)
classmethod from_base64(value: str) → Self
Section titled “classmethod from_base64(value: str) → Self”Creates FixedBytes from a base64 encoded string e.g. FixedBytes.from_base64(“RkY=”)
classmethod from_hex(value: str) → Self
Section titled “classmethod from_hex(value: str) → Self”Creates FixedBytes from a hex/octal encoded string e.g. FixedBytes.from_hex(“FF”)
classmethod from_bytes(value: Bytes | bytes) → Self
Section titled “classmethod from_bytes(value: Bytes | bytes) → Self”Construct an instance from the underlying bytes (no validation)
property bytes : Bytes
Section titled “property bytes : Bytes”Get the underlying Bytes.