corda / net.corda.finance.contracts.asset / Cash / State

State

data class State : FungibleAsset<Currency>, QueryableState

A state representing a cash claim against some party.

Constructors

<init>

State(deposit: PartyAndReference, amount: Amount<Currency>, owner: AbstractParty)State(amount: Amount<Issued<Currency>>, owner: AbstractParty)

A state representing a cash claim against some party.

Properties

amount

val amount: Amount<Issued<Currency>>

Amount represents a positive quantity of some issued product which can be cash, tokens, assets, or generally anything else that's quantifiable with integer quantities. See Issued and Amount for more details.

exitKeys

val exitKeys: <ERROR CLASS>

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.

owner

val owner: AbstractParty

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

participants

val participants: <ERROR CLASS>

A participant is any party that should be notified when the state is created or consumed.

Functions

generateMappedObject

fun generateMappedObject(schema: MappedSchema): PersistentState

Object Relational Mapping support.

issuedBy

infix fun issuedBy(party: AbstractParty): State
infix fun issuedBy(deposit: PartyAndReference): State

ownedBy

infix fun ownedBy(owner: AbstractParty): State

supportedSchemas

fun supportedSchemas(): Iterable<MappedSchema>

Object Relational Mapping support.

toString

fun toString(): String

withDeposit

infix fun withDeposit(deposit: PartyAndReference): State

withNewOwner

fun withNewOwner(newOwner: AbstractParty): CommandAndState

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

withNewOwnerAndAmount

fun withNewOwnerAndAmount(newAmount: Amount<Issued<Currency>>, newOwner: AbstractParty): FungibleAsset<Currency>

Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the rest (exitKeys) alone.