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 Transferable interface.

  • Method merge : Merge -> Update (ContractId Fungible)

    Implementation of the Merge choice.

  • Method split : Split -> Update SplitResult

    Implementation of the Split choice.

Typeclasses

class Implementation t => HasImplementation t where

Data Types

type I

= Fungible

Type synonym for Fungible.

type Implementation t

= (HasToInterface t I, Implementation t)

Type constraint for requiring templates to implement Fungible along with Transferable.

data SplitResult

Result of a call to Split.

SplitResult

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 None when 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

View for Fungible.

View

Field Type Description
modifiers Parties Parties which have the authorization to modify a fungible asset.

instance Eq View

instance Show View