Module Daml.Finance.Interface.Holding.Fungible¶
Interfaces¶
interface Fungible
Interface for a fungible holding.
Choice Archive
(no fields)
Choice ArchiveFungible
Archives the fungible contract.
(no fields)
Choice GetView
Retrieves the interface view.
Field Type Description viewer Party The party fetching the view. Choice Merge
Merge multiple fungible contracts into a single fungible contract.
Field Type Description fungibleCids [ContractId Fungible] The fungible contracts to merge which will get consumed. Choice Split
Split a fungible contract into multiple contracts by amount.
Field Type Description amounts [Decimal] The quantities to split the fungible asset by, creating a new contract per amount. Method asTransferable : I
Conversion to
Transferableinterface.Method merge : Merge -> Update (ContractId Fungible)
Implementation of the
Mergechoice.Method split : Split -> Update SplitResult
Implementation of the
Splitchoice.
Typeclasses¶
class Implementation t => HasImplementation t where
Data Types¶
- type Implementation t
= (HasToInterface t I, Implementation t)
Type constraint for requiring templates to implement
Fungiblealong withTransferable.
data SplitResult
Result of a call to
Split.
Field Type Description splitCids [ContractId Fungible] The contract ids for the split holdings. rest Optional (ContractId Fungible) Contract id for the holding on the remaining amount. It is Nonewhen the split is exact.instance Eq SplitResult
instance Show SplitResult
instance HasMethod Fungible "split" (Split -> Update SplitResult)
- type V
= View
Type synonym for
View.instance HasFromAnyView Fungible V
data View
Functions¶
- asTransferable
- : Fungible -> I
- split
- : Fungible -> Split -> Update SplitResult
- merge
- : Fungible -> Merge -> Update (ContractId Fungible)