public class CommercialPaperUtils
Modifier and Type | Field and Description |
---|---|
static CommercialPaperUtils |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
TransactionBuilder |
generateIssue(PartyAndReference issuance,
Amount<net.corda.core.contracts.Issued> faceValue,
java.time.Instant maturityDate,
Party notary)
Returns a transaction that issues commercial paper, owned by the issuing parties key. Does not update
an existing transaction because you aren't able to issue multiple pieces of CP in a single transaction
at the moment: this restriction is not fundamental and may be lifted later.
|
void |
generateMove(TransactionBuilder tx,
StateAndRef<net.corda.finance.contracts.CommercialPaper.State> paper,
AbstractParty newOwner)
Updates the given partial transaction with an input/output/command to reassign ownership of the paper.
|
void |
generateRedeem(TransactionBuilder tx,
StateAndRef<net.corda.finance.contracts.CommercialPaper.State> paper,
ServiceHub services,
PartyAndCertificate ourIdentity)
Intended 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.
|
public static CommercialPaperUtils INSTANCE
public TransactionBuilder generateIssue(PartyAndReference issuance, Amount<net.corda.core.contracts.Issued> faceValue, java.time.Instant maturityDate, Party notary)
Returns a transaction that issues commercial paper, owned by the issuing parties key. Does not update an existing transaction because you aren't able to issue multiple pieces of CP in a single transaction at the moment: this restriction is not fundamental and may be lifted later.
public void generateMove(TransactionBuilder tx, StateAndRef<net.corda.finance.contracts.CommercialPaper.State> paper, AbstractParty newOwner)
Updates the given partial transaction with an input/output/command to reassign ownership of the paper.
public void generateRedeem(TransactionBuilder tx, StateAndRef<net.corda.finance.contracts.CommercialPaper.State> paper, ServiceHub services, PartyAndCertificate ourIdentity)
Intended 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.