corda / net.corda.finance.flows / CashIssueAndPaymentFlow

CashIssueAndPaymentFlow

@StartableByRPC class CashIssueAndPaymentFlow : AbstractCashFlow<Result>

Initiates a flow that self-issues cash and then send this to a recipient.

We issue cash only to ourselves so that all KYC/AML checks on payments are enforced consistently, rather than risk checks for issuance and payments differing. Outside of test scenarios it would be extremely unusual to issue cash and immediately transfer it, so impact of this limitation is considered minimal.

Parameters

amount - the amount of currency to issue.

issueRef - a reference to put on the issued currency.

recipient - the recipient of the currency

anonymous - if true, the recipient of the cash will be anonymous. Should be true for normal usage

notary - the notary to set on the output states.

Types

IssueAndPaymentRequest

class IssueAndPaymentRequest : AbstractRequest

Constructors

<init>

CashIssueAndPaymentFlow(amount: Amount<Currency>, issueRef: OpaqueBytes, recipient: Party, anonymous: Boolean, notary: Party)
CashIssueAndPaymentFlow(request: IssueAndPaymentRequest)CashIssueAndPaymentFlow(amount: Amount<Currency>, issueRef: OpaqueBytes, recipient: Party, anonymous: Boolean, notary: Party, progressTracker: ProgressTracker)

Initiates a flow that self-issues cash and then send this to a recipient.

Properties

amount

val amount: Amount<Currency>

the amount of currency to issue.

anonymous

val anonymous: Boolean

if true, the recipient of the cash will be anonymous. Should be true for normal usage

issueRef

val issueRef: OpaqueBytes

a reference to put on the issued currency.

notary

val notary: Party

the notary to set on the output states.

recipient

val recipient: Party

the recipient of the currency

Inherited Properties

progressTracker

open val progressTracker: ProgressTracker

Override this to provide a ProgressTracker. If one is provided and stepped, the framework will do something helpful with the progress reports e.g record to the audit service. If this flow is invoked as a subflow of another, then the tracker will be made a child of the current step in the parent. If it's null, this flow doesn't track progress.

Functions

call

fun call(): Result

This is where you fill out your business logic.

Inherited Functions

finaliseTx

fun finaliseTx(tx: SignedTransaction, sessions: Collection<FlowSession>, message: String): SignedTransaction

Companion Object Properties

ISSUING_CASH

val ISSUING_CASH: Step

PAYING_RECIPIENT

val PAYING_RECIPIENT: Step

Companion Object Functions

tracker

fun tracker(): ProgressTracker

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.