SourceAndAmount

data class SourceAndAmount<T : Any, out P : Any>(val source: P, val amount: Amount<T>, val ref: Any? = null)

Simple data class to associate the origin, owner, or holder of a particular Amount object.

Parameters

P

Any class type that can disambiguate where the amount came from.

T

The token type of the underlying Amount.

See also

SourceAndAmount.apply

which processes a list of SourceAndAmount objects and calculates the resulting Amount distribution as a new list of SourceAndAmount objects.

Constructors

Link copied to clipboard
constructor(source: P, amount: Amount<T>, ref: Any? = null)

Properties

Link copied to clipboard

the Amount of asset available.

Link copied to clipboard
val ref: Any? = null

is an optional field used for housekeeping in the caller. e.g. to point back at the original Vault state objects.

Link copied to clipboard
val source: P

the holder of the Amount.