corda / net.corda.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: CompositeKey)``State(amount: Amount<Issued<Currency>>, owner: CompositeKey)` A state representing a cash claim against some party.

### Properties

amount | `val amount: Amount<Issued<Currency>>`
contract | `val contract: Cash` An instance of the contract class that will verify this state.
exitKeys | `val exitKeys: Set<CompositeKey>` 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: CompositeKey` There must be a MoveCommand signed by this key to claim the amount.
participants | `val participants: List<CompositeKey>` A participant is any party that is able to consume this state in a valid transaction.

### Functions

generateMappedObject | `fun generateMappedObject(schema: MappedSchema): PersistentState` Object Relational Mapping support.
move | `fun move(newAmount: Amount<Issued<Currency>>, newOwner: CompositeKey): FungibleAsset<Currency>`
supportedSchemas | `fun supportedSchemas(): Iterable<MappedSchema>` Object Relational Mapping support.
toString | `fun toString(): String`
withNewOwner | `fun withNewOwner(newOwner: CompositeKey): Pair<Move, State>` Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone

### Extension Functions

issued by | `infix fun State.issued by(party: AbstractParty): State` `infix fun State.issued by(deposit: PartyAndReference): State`
issuedBy | `fun State.issuedBy(party: AbstractParty): State` `fun State.issuedBy(deposit: PartyAndReference): State`
owned by | `infix fun State.owned by(owner: CompositeKey): State`
ownedBy | `fun State.ownedBy(owner: CompositeKey): State`
with deposit | `infix fun State.with deposit(deposit: PartyAndReference): State`
withDeposit | `fun State.withDeposit(deposit: PartyAndReference): State`