corda / net.corda.finance.contracts.asset / OnLedgerAsset / generateExit

generateExit

fun generateExit(tx: TransactionBuilder, amountIssued: Amount<Issued<T>>, assetStates: List<StateAndRef<S>>): Set<PublicKey>
Deprecated: Replaced with generateExit() which takes in a party to pay change to


fun generateExit(tx: TransactionBuilder, amountIssued: Amount<Issued<T>>, assetStates: List<StateAndRef<S>>, payChangeTo: AbstractParty): Set<PublicKey>

Generate an transaction exiting assets from the ledger.

Parameters

tx - transaction builder to add states and commands to.

amountIssued - the amount to be exited, represented as a quantity of issued currency.

assetStates - the asset states to take funds from. No checks are done about ownership of these states, it is the responsibility of the caller to check that they do not exit funds held by others.

Return
the public keys which must sign the transaction for it to be valid.

@JvmStatic fun <S : FungibleAsset<T>, T : Any> generateExit(tx: TransactionBuilder, amountIssued: Amount<Issued<T>>, assetStates: List<StateAndRef<S>>, deriveState: (TransactionState<S>, Amount<Issued<T>>, AbstractParty) -> TransactionState<S>, generateMoveCommand: () -> CommandData, generateExitCommand: (Amount<Issued<T>>) -> CommandData): Set<PublicKey>
Deprecated: Replaced with generateExit() which takes in a party to pay change to

Generate an transaction exiting fungible assets from the ledger.

Parameters

tx - transaction builder to add states and commands to.

amountIssued - the amount to be exited, represented as a quantity of issued currency.

assetStates - the asset states to take funds from. No checks are done about ownership of these states, it is the responsibility of the caller to check that they do not attempt to exit funds held by others.

Return
the public keys which must sign the transaction for it to be valid.

@JvmStatic fun <S : FungibleAsset<T>, T : Any> generateExit(tx: TransactionBuilder, amountIssued: Amount<Issued<T>>, assetStates: List<StateAndRef<S>>, payChangeTo: AbstractParty, deriveState: (TransactionState<S>, Amount<Issued<T>>, AbstractParty) -> TransactionState<S>, generateMoveCommand: () -> CommandData, generateExitCommand: (Amount<Issued<T>>) -> CommandData): Set<PublicKey>

Generate an transaction exiting fungible assets from the ledger.

Parameters

tx - transaction builder to add states and commands to.

amountIssued - the amount to be exited, represented as a quantity of issued currency.

assetStates - the asset states to take funds from. No checks are done about ownership of these states, it is the responsibility of the caller to check that they do not attempt to exit funds held by others.

payChangeTo - party to pay any change to; this is normally a confidential identity of the calling party.

Return
the public keys which must sign the transaction for it to be valid.