com.r3corda.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: PublicKey)``State(amount: Amount<Issued<Currency>>, owner: PublicKey, encumbrance: Int? = null)` 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.
encumbrance | `val encumbrance: Int?` All contract states may be encumbered by up to one other state.
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: PublicKey` There must be a MoveCommand signed by this key to claim the amount.
participants | `val participants: <ERROR CLASS>` 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: PublicKey): FungibleAsset<Currency>`
supportedSchemas | `fun supportedSchemas(): Iterable<MappedSchema>` Object Relational Mapping support.
toString | `fun toString(): String`
withNewOwner | `fun withNewOwner(newOwner: PublicKey): <ERROR CLASS>` 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: Party): State` `infix fun State.issued by(deposit: PartyAndReference): State`
issuedBy | `fun State.issuedBy(party: Party): State` `fun State.issuedBy(deposit: PartyAndReference): State`
owned by | `infix fun State.owned by(owner: PublicKey): State`
ownedBy | `fun State.ownedBy(owner: PublicKey): State`
with deposit | `infix fun State.with deposit(deposit: PartyAndReference): State`
withDeposit | `fun State.withDeposit(deposit: PartyAndReference): State`