Daml.Finance.Interface.Util.Disclosure¶
Interfaces¶
interface Disclosure
An interface for managing the visibility of contracts for non-authorizing parties.
viewtype V
Choice AddObservers
Add a single new observer context to the existing observers.
Controller: disclosers
Returns: ContractId Disclosure
Field Type Description disclosers Parties Party calling this choice. observersToAdd (Text, Parties) Parties to add as observers to the contract and the corresponding observer context. If the observer context already exists, the new set of parties is added to the old one. Choice Archive
Controller: Signatories of implementing template
Returns: ()
(no fields)
Choice GetView
Retrieves the interface view.
Controller: viewer
Returns: 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.
Controller: disclosers
Returns: Optional (ContractId Disclosure)
Field Type Description disclosers Parties Parties calling this choice. observersToRemove (Text, Parties) Parties to be removed from the contract observers and the corresponding observer context. Choice SetObservers
Set the observers for a contract.
Controller: disclosers
Returns: ContractId Disclosure
Field Type Description disclosers Parties Party calling this choice. newObservers PartiesMap Observers to set for this contract. This overrides the existing observers. The parties are mapped by a specific key. The textual key is the "observation context" of the disclosure. This allows processes to add/remove parties for their specific purpose, without affecting others. 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.
Data Types¶
- type I
-
Type synonym for
Disclosure
.
- type V
= View
Type synonym for
View
.instance HasFromAnyView Disclosure V
data View
View for
Disclosure
.
Field Type Description disclosureControllers Parties Disjunction choice controllers. observers PartiesMap Observers with context. The parties are mapped by a specific key. The textual key is the "observation context" of the disclosure. This allows processes to add/remove parties for their specific purpose, without affecting others.
Functions¶
- removeObservers
- : Disclosure -> ContractId Disclosure -> RemoveObservers -> Update (Optional (ContractId Disclosure))
- flattenObservers
: PartiesMap -> Parties
Flattens observers which use the
PartiesMap
into aSet Party
for usage in template definitions. For example:observer $ flattenObservers observers