net.corda.node.services.vault / NodeVaultService / generateSpend

generateSpend

fun generateSpend(tx: TransactionBuilder, amount: Amount<Currency>, to: PublicKey, onlyFromParties: Set<Party>?): <ERROR CLASS><TransactionBuilder, List<PublicKey>>
Overrides VaultService.generateSpend

Generate a transaction that moves an amount of currency to the given pubkey.

Parameters

onlyFromParties - if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party youre trying to pay has expectations about which type of asset claims they are willing to accept.