com.r3corda.contracts.asset / OnLedgerAsset / deriveState

# deriveState

`abstract fun deriveState(txState: TransactionState<S>, amount: Amount<Issued<T>>, owner: PublicKey): TransactionState<S>`

Derive a new transaction state based on the given example, with amount and owner modified. This allows concrete implementations to have fields in their state which we dont know about here, and we simply leave them untouched when sending out "change" from spending/exiting.