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)

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

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

Properties

amount

the amount of currency to issue.

val amount: Amount<Currency>

anonymous

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

val anonymous: Boolean

issueRef

a reference to put on the issued currency.

val issueRef: OpaqueBytes

notary

the notary to set on the output states.

val notary: Party

recipient

the recipient of the currency

val recipient: Party

Functions

call

This is where you fill out your business logic.

fun call(): Result

Companion Object Properties

ISSUING_CASH

val ISSUING_CASH: Step

PAYING_RECIPIENT

val PAYING_RECIPIENT: Step

Companion Object Functions

tracker

fun tracker(): ProgressTracker

Extension Functions

receiveAll

Suspends until a message has been received for each session in the specified sessions.

fun FlowLogic<*>.receiveAll(session: Pair<FlowSession, Class<out Any>>, vararg sessions: Pair<FlowSession, Class<out Any>>): Map<FlowSession, UntrustworthyData<Any>>
fun <R : Any> FlowLogic<*>.receiveAll(receiveType: Class<R>, session: FlowSession, vararg sessions: FlowSession): List<UntrustworthyData<R>>
fun <R : Any> FlowLogic<*>.receiveAll(session: FlowSession, vararg sessions: FlowSession): List<UntrustworthyData<R>>