fun generateSpend(tx: TransactionBuilder, amount: Amount<T>, to: PublicKey, assetsStates: List<StateAndRef<S>>, onlyFromParties: Set<Party>? = null, deriveState: (TransactionState<S>, Amount<Issued<T>>, PublicKey) -> TransactionState<S>, generateMoveCommand: () -> CommandData): List<PublicKey>
Generate a transaction that consumes one or more of the given input states to move assets to the given pubkey. Note that the vault is not updated: its up to you to do that.
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.