Module Daml.Finance.Interface.Holding.Base¶
Interfaces¶
interface Base
Base interface for a holding.
Choice Acquire
Lock a contract.
Field Type Description newLockers Parties Parties which restrain the contract’s ability to perform specified actions. context Text Reason for acquiring a lock. lockType LockType Type of lock to acquire Choice Archive
(no fields)
Choice GetView
Retrieves the interface view.
Field Type Description viewer Party The party retrieving the view. Choice Release
Unlock a locked contract.
Field Type Description context Text Method acquire : Acquire -> Update (ContractId Base)
Implementation of the
Acquirechoice.Method asDisclosure : I
Conversion to
Disclosureinterface.Method release : Release -> Update (ContractId Base)
Implementation of the
Releasechoice.
Typeclasses¶
class Implementation t => HasImplementation t where
Data Types¶
- type I
= Base
Type synonym for
Base.instance HasMethod Account "credit" (Credit -> Update (ContractId I))
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Transferable "asBase" I
instance HasMethod Batch "cancel" (Cancel -> Update [ContractId I])
instance HasMethod Batch "settle" (Settle -> Update [ContractId I])
instance HasMethod Instruction "allocate" (Allocate -> Update (ContractId Instruction, Optional (ContractId I)))
instance HasMethod Instruction "cancel" (Cancel -> Update (Optional (ContractId I)))
instance HasMethod Instruction "execute" (Execute -> Update (Optional (ContractId I)))
- type Implementation t
= (HasToInterface t I, Implementation t)
Type constraint for requiring templates to implement
Holdingalong withDisclosure.
data Lock
data LockType
- type V
= View
Type synonym for
View.instance HasFromAnyView Base V
data View
View for
Base.
Field Type Description instrument InstrumentKey Instrument being held. account AccountKey Key of the account holding the assets. amount Decimal Size of the holding. lock Optional Lock When a contract is locked, contains the locking details.
Functions¶
- asDisclosure
- : Base -> I
- acquire
- : Base -> Acquire -> Update (ContractId Base)
- release
- : Base -> Release -> Update (ContractId Base)
- getLockers
: HasToInterface t Base => t -> Parties
Get the lockers of a holding.