Fungible Asset
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.
An example usage would be a cash transaction contract that implements currency using state objects that implement this interface.
Parameters
a type that represents the asset in question. This should describe the basic type of the asset (GBP, USD, oil, shares in company
Inheritors
Properties
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.
There must be a MoveCommand signed by this key to claim the amount.
A participant is any party that should be notified when the state is created or consumed.
Obtain the typename of the required ContractClass associated with the target ContractState, using the BelongsToContract annotation by default, but falling through to checking the state's enclosing class if there is one and it inherits from Contract.
Functions
Returns the SHA-256 hash of the serialised contents of this state (not cached!)
Returns the hash of the serialised contents of this state (not cached!)
Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone.
Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the rest (exitKeys) alone.