Class MarloweTemplate<ObjectParams>Experimental

This class holds information on the parameters required to create a Marlowe contract and a way to serialize them to and from Metadata. The order of the parameters is important as they drive the serialization.

The Metadata encoding is as following: A top level entry with key 9041 and value with an object with two fields:

  • v a numeric version of the Template encoding (current version is 1)
  • params an array of the encoded parameters with the same order as the Template parameters.

See

TemplateParam to see how each parameter is encoded.

Type Parameters

  • ObjectParams extends object

    The inferred type of the options.params as an object.

Hierarchy

  • MarloweTemplate

Constructors

Properties

description?: string
name: string
templateCodec: Type<ObjectParams, Metadata, unknown>

Methods

  • Type guard for the ObjectParams type.

    Parameters

    • value: unknown

      an unknown value to check if it is a valid ObjectParams.

    Returns value is ObjectParams

    true if the value is a valid ObjectParams, false otherwise.