data class State<P : Any> : FungibleAsset<Terms<P>>, NettableState<State<P>, MultilateralNetState<P>>
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time.
P
- the product the obligation is for payment of.
State(lifecycle: Lifecycle = Lifecycle.NORMAL, obligor: AbstractParty, template: Terms<P>, quantity: Long, beneficiary: AbstractParty)
A state representing the obligation of one party (obligor) to deliver a specified number of units of an underlying asset (described as token.acceptableIssuedProducts) to the beneficiary no later than the specified time. |
val amount: Amount<Issued<Terms<P>>>
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. |
|
val beneficiary: AbstractParty
The public key of the entity the contract pays to |
|
val bilateralNetState: BilateralNetState<P>
Returns an object used to determine if two states can be subject to close-out netting. If two states return equal objects, they can be close out netted together. |
|
val dueBefore: Instant |
|
val exitKeys: Collection<PublicKey>
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. |
|
var lifecycle: Lifecycle |
|
val multilateralNetState: MultilateralNetState<P>
Returns an object used to determine if two states can be subject to close-out netting. If two states return equal objects, they can be close out netted together. |
|
val obligor: AbstractParty
Where the debt originates from (obligor) |
|
val owner: AbstractParty
There must be a MoveCommand signed by this key to claim the amount. |
|
val participants: List<AbstractParty> |
|
val quantity: Long |
|
val template: Terms<P> |
fun net(other: State<P>): State<P>
Perform bilateral netting of this state with another state. The two states must be compatible (as in bilateralNetState objects are equal). |
|
fun toString(): String |
|
fun withNewOwner(newOwner: AbstractParty): CommandAndState
Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone. |
|
fun withNewOwnerAndAmount(newAmount: Amount<Issued<Terms<P>>>, newOwner: AbstractParty): State<P>
Copies the underlying data structure, replacing the amount and owner fields with the new values and leaving the rest (exitKeys) alone. |
infix fun <T : Any> State<T>.at(dueBefore: Instant): State<T> |
|
infix fun <T : Any> State<T>.between(parties: <ERROR CLASS><AbstractParty, AbstractParty>): State<T> |
|
infix fun <T : Any> State<T>.issued by(party: AbstractParty): State<T> |
|
fun <T : Any> State<T>.issuedBy(party: AnonymousParty): State<T> |
|
infix fun <T : Any> State<T>.owned by(owner: AbstractParty): State<T> |
|
fun <T : Any> State<T>.ownedBy(owner: AbstractParty): State<T> |