@aptos-labs/ts-sdk - v6.3.1
    Preparing search index...

    Class Bool

    Represents a boolean value that can be serialized and deserialized. This class extends the Serializable class and provides methods to serialize the boolean value for different contexts, such as entry functions and script functions.

    Hierarchy (View Summary)

    Implements

    Index

    Implementation - BCS

    • Constructs a new instance with a specified value. This ensures that the value is validated to be within the acceptable range.

      Parameters

      • value: boolean

        The number to be validated and assigned, which must be between 0 and MAX_U256_BIG_INT.

      Returns Bool

    • Converts the BCS-serialized bytes of a value into a Hex instance. This function provides a Hex representation of the BCS-serialized data for easier handling and manipulation.

      Returns Hex

      A Hex instance with the BCS-serialized bytes loaded into its underlying Uint8Array.

    • Serializes the current instance for use in an entry function by converting it to a byte sequence. This allows the instance to be properly formatted for serialization in transactions. Uses serializeAsBytes when available, with a fallback for older Serializer versions.

      Parameters

      • serializer: Serializer

        The serializer instance used to serialize the byte sequence.

      Returns void

    Methods

    • Returns the hex string representation of the Serializable value with the 0x prefix.

      Returns string

      the hex formatas a string prefixed by 0x.

    Properties

    value: boolean