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: Attempting to use this class for a serialized script function will result in 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

Properties

value: FixedBytes

Methods

  • Serializes a Serializable value to its BCS representation. This function is the Typescript SDK equivalent of bcs::to_bytes in Move.

    Returns Uint8Array

    the BCS representation of the Serializable instance as a byte buffer

  • Helper function to get a value's BCS-serialized bytes as a Hex instance.

    Returns Hex

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

  • Serialize an argument to BCS-serialized bytes.

    Parameters

    Returns void

  • Serialize an argument as a type-agnostic, fixed byte sequence. The byte sequence contains the number of the following bytes followed by the BCS-serialized bytes for a typed argument.

    Parameters

    Returns void

  • 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