P
- the product the obligation is for payment of.public class Obligation<P> implements Contract
An obligation contract commits the obligor to delivering a specified amount of a fungible asset (for example the
class Cash
contract) at a specified future point in time. Settlement transactions may split and merge contracts across
multiple input and output states. The goal of this design is to handle amounts owed, and these contracts are expected
to be netted/merged, with settlement only for any remainder amount.
class Cash
Modifier and Type | Class and Description |
---|---|
static class |
Obligation.Companion |
static class |
Obligation.State<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.
|
static class |
Obligation.Terms<P>
Subset of state, containing the elements specified when issuing a new settlement contract.
|
Modifier and Type | Field and Description |
---|---|
static Obligation.Companion |
Companion |
static java.lang.String |
PROGRAM_ID |
Constructor and Description |
---|
Obligation()
An obligation contract commits the obligor to delivering a specified amount of a fungible asset (for example the
class Cash contract) at a specified future point in time. Settlement transactions may split and merge contracts across
multiple input and output states. The goal of this design is to handle amounts owed, and these contracts are expected
to be netted/merged, with settlement only for any remainder amount. |
Modifier and Type | Method and Description |
---|---|
void |
verify(LedgerTransaction tx)
Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense.
Must throw an exception if there's a problem that should prevent state transition. Takes a single object
rather than an argument so that additional data can be added without breaking binary compatibility with
existing contract code.
|
public static java.lang.String PROGRAM_ID
public static Obligation.Companion Companion
public Obligation()
An obligation contract commits the obligor to delivering a specified amount of a fungible asset (for example the
class Cash
contract) at a specified future point in time. Settlement transactions may split and merge contracts across
multiple input and output states. The goal of this design is to handle amounts owed, and these contracts are expected
to be netted/merged, with settlement only for any remainder amount.
class Cash
public void verify(LedgerTransaction tx)
Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense. Must throw an exception if there's a problem that should prevent state transition. Takes a single object rather than an argument so that additional data can be added without breaking binary compatibility with existing contract code.