Module Daml.Finance.Interface.Lifecycle.Rule.Lifecycle

Interfaces

interface Lifecycle

Interface implemented by instruments that can be lifecycled (either by the instrument itself or by a separate rule contract).

  • Choice Archive

    (no fields)

  • Choice Evolve

    Process an event. It returns a tuple of the lifecycled instrument (or the original instrument when the former does not exist) and the effects.

    Field Type Description
    eventCid ContractId I The event.
    instrument InstrumentKey The target instrument.
    observableCids [ContractId I] Set of numerical time-dependent observables.
  • Choice GetView

    Retrieves the interface view.

    Field Type Description
    viewer Party The party retrieving the view.
  • Method evolve : Evolve -> Update (Optional InstrumentKey, [ContractId I])

    Implementation of the Evolve choice.

Typeclasses

class Implementation t => HasImplementation t where

Data Types

type I

= Lifecycle

Type synonym for Lifecycle.

type Implementation t

= HasToInterface t I

Type constraint for requiring templates to implement Lifecycle.

type V

= View

Type synonym for View.

instance HasFromAnyView Lifecycle V

data View

View for Lifecycle.

View

Field Type Description
id Id Identifier for the rule contract.
description Text Textual description.
lifecycler Party Party performing the lifecycling.

instance Eq View

instance Show View

Functions

evolve
: Lifecycle -> Evolve -> Update (Optional InstrumentKey, [ContractId I])