contracts / DealState

# DealState

`interface DealState : LinearState`

Interface representing an agreement that exposes various attributes that are common. Implementing it simplifies implementation of general protocols that manipulate many agreement types.

### Properties

parties | `abstract val parties: Array<Party>` Exposes the Parties involved in a generic way
ref | `abstract val ref: String` Human readable well known reference (e.g. trade reference)

### Inherited Properties

thread | `abstract val thread: SecureHash` Unique thread id within the wallets of all parties

### Functions

generateAgreement | `abstract fun generateAgreement(): TransactionBuilder` Generate a partial transaction representing an agreement (command) to this deal, allowing a general deal/agreement protocol to generate the necessary transaction for potential implementations
withPublicKey | `abstract fun withPublicKey(before: Party, after: PublicKey): DealState`

### Inherited Functions

isRelevant | `abstract fun isRelevant(ourKeys: Set<PublicKey>): Boolean` true if this should be tracked by our wallet(s)

### Extension Functions

hash | `fun ContractState.hash(): SecureHash` Returns the SHA-256 hash of the serialised contents of this state (not cached)

### Inheritors

FixableDealState | `interface FixableDealState : DealState` Interface adding fixing specific methods