T
- a type that represents the asset in question. This should describe the basic type of the asset
(GBP, USD, oil, shares in company , etc.) and any additional metadata (issuer, grade, class, etc.).public FungibleAsset<T> extends OwnableState
Interface for contract states representing assets which are fungible, countable and issued by a specific party. States contain assets which are equivalent (such as cash of the same currency), so records of their existence can be merged or split as needed where the issuer is the same. For instance, dollars issued by the Fed are fungible and countable (in cents), barrels of West Texas crude are fungible and countable (oil from two small containers can be poured into one large container), shares of the same class in a specific company are fungible and countable, and so on.
See Cash for an example contract that implements currency using state objects that implement this interface.
Modifier and Type | Method and Description |
---|---|
Amount<net.corda.core.contracts.Issued> |
getAmount() |
java.util.Collection<net.corda.core.crypto.CompositeKey> |
getExitKeys()
There must be an ExitCommand signed by these keys to destroy the amount. While all states require their
owner to sign, some (i.e. cash) also require the issuer.
|
CompositeKey |
getOwner()
There must be a MoveCommand signed by this key to claim the amount
|
FungibleAsset<T> |
move(Amount<net.corda.core.contracts.Issued> newAmount,
CompositeKey newOwner) |
getOwner, withNewOwner
getContract, getParticipants
Amount<net.corda.core.contracts.Issued> getAmount()
java.util.Collection<net.corda.core.crypto.CompositeKey> getExitKeys()
There must be an ExitCommand signed by these keys to destroy the amount. While all states require their owner to sign, some (i.e. cash) also require the issuer.
CompositeKey getOwner()
There must be a MoveCommand signed by this key to claim the amount
FungibleAsset<T> move(Amount<net.corda.core.contracts.Issued> newAmount, CompositeKey newOwner)