Module Daml.Finance.Interface.Instrument.Base.Instrument¶
Interfaces¶
interface Instrument
Base interface for all instruments. This interface does not define any lifecycling logic.
Choice Archive
(no fields)
Choice GetView
Retrieves the interface view.
Field Type Description viewer Party The party retrieving the view. Method asDisclosure : I
Conversion to
Disclosure
interface.Method getKey : InstrumentKey
Get the unique key for the
Instrument
.
Typeclasses¶
class Implementation t => HasImplementation t where
Data Types¶
- type I
-
Type synonym for
Instrument
.instance HasMethod Claim "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasMethod Factory "create’" (Create -> Update (ContractId I))
instance HasMethod Instrument "asBaseInstrument" I
instance HasExerciseByKey Reference K GetCid (ContractId I)
- type Implementation t
= (HasToInterface t I, Implementation t)
Type constraint for requiring templates to implement
Instrument
along withDisclosure
.
- type K
-
Type synonym for
InstrumentKey
.instance HasExerciseByKey Reference K GetCid (ContractId I)
instance HasExerciseByKey Reference K SetCid (ContractId R)
instance HasExerciseByKey Reference K SetObservers (ContractId R)
instance HasExerciseByKey Reference K Archive ()
instance HasFetchByKey Reference K
instance HasFromAnyContractKey Reference K
instance HasLookupByKey Reference K
instance HasMaintainer Reference K
instance HasToAnyContractKey Reference K
- type Q
= Quantity InstrumentKey Decimal
Instrument quantity.
- type R
= Reference
Type synonym for
Reference
. This type is currently used as a work-around given the lack of interface keys.instance HasExerciseByKey Reference K SetCid (ContractId R)
instance HasExerciseByKey Reference K SetObservers (ContractId R)
- type V
= View
Type synonym for
View
.instance HasFromAnyView Instrument V
data View
View for
Instrument
.
Field Type Description issuer Party The instrument’s issuer. depository Party The instrument’s depository. id Id A versioned instrument identifier. version Text A textual instrument version. description Text A human readable description of the instrument. validAsOf Time Timestamp as of which the instrument is valid. This usually coincides with the timestamp of the event that creates the instrument. It usually does not coincide with ledger time.
Functions¶
- asDisclosure
- : Instrument -> I
- exerciseInterfaceByKey
: (HasInterfaceTypeRep i, HasExercise i d r) => K -> Party -> d -> Update r
Exercise interface by key. This method can be used to exercise a choice on an
Instrument
given itsInstrumentKey
. Requires as input theInstrumentKey
, the actor fetching the instrument and the choice arguments. For example:
- fetchInstrument
: HasToInterface t I => t -> Update I
Fetch instrument from holding.