corda / net.corda.core.contracts / OwnableState

OwnableState

interface OwnableState : ContractState

A contract state that can have a single owner.

Properties

owner

abstract val owner: AbstractParty

There must be a MoveCommand signed by this key to claim the amount.

Inherited Properties

participants

abstract val participants: List<AbstractParty>

A participant is any party that is able to consume this state in a valid transaction.

Functions

withNewOwner

abstract fun withNewOwner(newOwner: AbstractParty): CommandAndState

Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.

hash

fun ContractState.hash(): SecureHash

Returns the SHA-256 hash of the serialised contents of this state (not cached!)

Inheritors

FungibleAsset

interface FungibleAsset<T : Any> : 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.

SingleOwnerState

data class SingleOwnerState : OwnableState, State

State

data class State : OwnableState, QueryableState, ICommercialPaperState