CashUtils - corda

corda / net.corda.finance.workflows.asset / CashUtils

# CashUtils

`object CashUtils`

### Functions

#### generateSpend | Generate a transaction that moves an amount of currency to the given party, and sends any change back to sole identity of the calling node. Fails for nodes with multiple identities. `fun generateSpend(services: ServiceHub, tx: TransactionBuilder, amount: Amount<Currency>, to: AbstractParty, onlyFromParties: Set<AbstractParty> = emptySet()): Pair<TransactionBuilder, List<PublicKey>>` Generate a transaction that moves an amount of currency to the given party. `fun generateSpend(services: ServiceHub, tx: TransactionBuilder, amount: Amount<Currency>, ourIdentity: PartyAndCertificate, to: AbstractParty, onlyFromParties: Set<AbstractParty> = emptySet(), anonymous: Boolean = true): Pair<TransactionBuilder, List<PublicKey>>` Generate a transaction that moves money of the given amounts to the recipients specified, and sends any change back to sole identity of the calling node. Fails for nodes with multiple identities. `fun generateSpend(services: ServiceHub, tx: TransactionBuilder, payments: List<PartyAndAmount<Currency>>, onlyFromParties: Set<AbstractParty> = emptySet()): Pair<TransactionBuilder, List<PublicKey>>` Generate a transaction that moves money of the given amounts to the recipients specified. `fun generateSpend(services: ServiceHub, tx: TransactionBuilder, payments: List<PartyAndAmount<Currency>>, ourIdentity: PartyAndCertificate, onlyFromParties: Set<AbstractParty> = emptySet(), anonymous: Boolean = true): Pair<TransactionBuilder, List<PublicKey>>`