Module Daml.Finance.Interface.Util.Disclosure

Interfaces

interface Disclosure

An interface for managing the visibility of contracts for non-authorizing parties.

  • Choice AddObservers

    Add a single new observer context to the existing observers.

    Field Type Description
    disclosers Parties Party calling this choice.
    observersToAdd (Text, Parties) Observer context to add to a contract.
  • Choice Archive

    (no fields)

  • Choice GetView

    Retrieves the interface view.

    Field Type Description
    viewer Party The party retrieving the view.
  • Choice RemoveObservers

    Remove observers from a context. None is returned if no update is needed. Parties for a context can be removed if any of the disclosers are part of the observers to be removed or the disclosureControllers.

    Field Type Description
    disclosers Parties Parties calling this choice.
    observersToRemove (Text, Parties) Observer context to remove.
  • Choice SetObservers

    Set the observers for a contract.

    Field Type Description
    disclosers Parties Party calling this choice.
    newObservers PartiesMap Observers to set for this contract. This overrides the existing observers.
  • Method addObservers : AddObservers -> Update (ContractId Disclosure)

    Implementation of the AddObservers choice.

  • Method removeObservers : ContractId Disclosure -> RemoveObservers -> Update (Optional (ContractId Disclosure))

    Implementation of the RemoveObservers choice.

  • Method setObservers : SetObservers -> Update (ContractId Disclosure)

    Implementation of the SetObservers choice.

Typeclasses

class Implementation t => HasImplementation t where

Data Types

type I

= Disclosure

Type synonym for Disclosure.

instance HasMethod Account "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Observation "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod HolidayCalendar "asDisclosure" I

instance HasMethod Base "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Instrument "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Factory "asDisclosure" I

instance HasMethod Instruction "asDisclosure" I

type Implementation t

= HasToInterface t I

Type constraint for requiring templates to implement Disclosure.

type V

= View

Type synonym for View.

instance HasFromAnyView Disclosure V

data View

View for Disclosure.

View

Field Type Description
disclosureControllers Parties Disjunction choice controllers.
observers PartiesMap Observers with context.

instance Eq View

instance Show View

Functions

setObservers
: Disclosure -> SetObservers -> Update (ContractId Disclosure)
addObservers
: Disclosure -> AddObservers -> Update (ContractId Disclosure)
removeObservers
: Disclosure -> ContractId Disclosure -> RemoveObservers -> Update (Optional (ContractId Disclosure))
flattenObservers

: PartiesMap -> Parties

Flattens observers which use the PartiesMap into a Set Party for usage in template definitions. For example:

observer $ flattenObservers observers