Class Args

Represents a set of named arguments (NamedArg) for a contract call. Provides methods to serialize, deserialize, and manipulate argument entries.

Hierarchy

  • Args

Constructors

  • Creates an instance of Args from a map of arguments.

    Parameters

    • args: Map<string, CLValue>

      A map containing argument names as keys and CLValue instances as values.

    Returns Args

Properties

args: Map<string, CLValue>

The map of argument names to CLValue values.

Methods

  • Inserts a new argument into the map.

    Parameters

    • key: string

      The argument name.

    • value: CLValue

      The CLValue for the argument.

    Returns void

  • Converts the arguments to a byte array. The format includes the number of arguments followed by each argument in bytes.

    Returns

    A Uint8Array containing the serialized arguments.

    Returns Uint8Array

  • Creates an Args instance from a byte array.

    Returns

    An Args instance.

    Parameters

    • bytes: Uint8Array

      The byte array to parse.

    Returns Args

  • Creates an Args instance from an object.

    Returns

    A new Args instance.

    Parameters

    • args: Record<string, CLValue>

      An object containing argument names as keys and CLValue instances as values.

    Returns Args

  • Creates an Args instance from an array of NamedArg instances.

    Returns

    A new Args instance.

    Parameters

    • namedArgs: NamedArg[]

      An array of NamedArg instances.

    Returns Args

Generated using TypeDoc