Daml.Finance.Interface.Holding.Base¶
Interfaces¶
interface Base
Base interface for a holding.
viewtype V
Choice Acquire
Lock a contract.
Controller: (DA.Internal.Record.getField @"owner" (DA.Internal.Record.getField @"account" (view this))), newLockers
Returns: ContractId Base
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
Controller: Signatories of implementing template
Returns: ()
(no fields)
Choice GetView
Retrieves the interface view.
Controller: viewer
Returns: V
Field Type Description viewer Party The party retrieving the view. Choice Release
Unlock a locked contract.
Controller: getLockers this
Returns: ContractId Base
Field Type Description context Text Method acquire : Acquire -> Update (ContractId Base)
Implementation of the
Acquire
choice.Method release : Release -> Update (ContractId Base)
Implementation of the
Release
choice.
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 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)))
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¶
- getLockers
: HasToInterface t Base => t -> Parties
Get the lockers of a holding.