Class EntryFunctionBytes

This class exists solely to represent a sequence of fixed bytes as a serialized entry function, because serializing an entry function appends a prefix that's only used for entry function arguments.

NOTE: Using this class for serialized script functions will lead to erroneous and unexpected behavior.

If you wish to convert this class back to a TransactionArgument, you must know the type of the argument beforehand, and use the appropriate class to deserialize the bytes within an instance of this class.

Hierarchy (view full)

Implements

Methods

  • 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 value using the provided serializer. This function is essential for accurately representing a sequence of bytes that are already BCS-serialized as a type.

    Note that to see the Move, BCS-serialized representation of the underlying fixed byte vector, we must not serialize the length prefix.

    Parameters

    • serializer: Serializer

      The serializer instance used to perform the serialization.

    Returns void

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

    Returns string

    the hex formatas a string prefixed by 0x.

  • The only way to create an instance of this class is to use this static method. This function should only be used when deserializing a sequence of EntryFunctionPayload arguments.

    Parameters

    • deserializer: Deserializer

      The deserializer instance with the buffered bytes.

    • length: number

      The length of the bytes to deserialize.

    Returns EntryFunctionBytes

    An instance of this class, which will now only be usable as an EntryFunctionArgument.

Properties

value: FixedBytes