class CommercialPaper : Contract| Commands |
interface Commands : CommandData |
| State |
data class State : OwnableState |
| <init> |
CommercialPaper() |
| legalContractReference |
val legalContractReference: SecureHashUnparsed reference to the natural language contract that this code is supposed to express (usually a hash of the contracts contents). |
| generateIssue |
fun generateIssue(issuance: PartyAndReference, faceValue: Amount, maturityDate: Instant, notary: Party): TransactionBuilderReturns a transaction that issues commercial paper, owned by the issuing parties key. Does not update an existing transaction because you arent able to issue multiple pieces of CP in a single transaction at the moment: this restriction is not fundamental and may be lifted later. |
| generateMove |
fun generateMove(tx: TransactionBuilder, paper: StateAndRef<State>, newOwner: PublicKey): UnitUpdates the given partial transaction with an input/output/command to reassign ownership of the paper. |
| generateRedeem |
fun generateRedeem(tx: TransactionBuilder, paper: StateAndRef<State>, wallet: List<StateAndRef<State>>): UnitIntended to be called by the issuer of some commercial paper, when an owner has notified us that they wish to redeem the paper. We must therefore send enough money to the key that owns the paper to satisfy the face value, and then ensure the paper is removed from the ledger. |
| verify |
fun verify(tx: TransactionForVerification): UnitTakes an object that represents a state transition, and ensures the inputs/outputs/commands make sense. Must throw an exception if theres 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. |