public class CashUtils
Modifier and Type | Method and Description |
---|---|
NonExistentClass |
generateSpend(ServiceHub services,
TransactionBuilder tx,
Amount<java.util.Currency> amount,
AbstractParty to,
java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties)
Deprecated.
|
NonExistentClass |
generateSpend(ServiceHub services,
TransactionBuilder tx,
Amount<java.util.Currency> amount,
PartyAndCertificate ourIdentity,
AbstractParty to,
java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties,
boolean anonymous)
Generate a transaction that moves an amount of currency to the given party.
|
NonExistentClass |
generateSpend(ServiceHub services,
TransactionBuilder tx,
java.util.List<net.corda.finance.contracts.asset.PartyAndAmount> payments,
java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties)
Deprecated.
|
NonExistentClass |
generateSpend(ServiceHub services,
TransactionBuilder tx,
java.util.List<net.corda.finance.contracts.asset.PartyAndAmount> payments,
PartyAndCertificate ourIdentity,
java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties,
boolean anonymous)
Generate a transaction that moves money of the given amounts to the recipients specified.
|
public static CashUtils INSTANCE
public NonExistentClass generateSpend(ServiceHub services, TransactionBuilder tx, Amount<java.util.Currency> amount, AbstractParty to, java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties)
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.
Note: an class Amount
of Currency is only fungible for a given Issuer Party within a interface FungibleAsset
services
- The interface ServiceHub
to provide access to the database session.tx
- A builder, which may contain inputs, outputs and commands already. The relevant components needed
to move the cash will be added on top.amount
- How much currency to send.to
- the recipient party.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 you're trying to pay has expectations
about which type of asset claims they are willing to accept.class Amount
,
Currency,
interface FungibleAsset
public NonExistentClass generateSpend(ServiceHub services, TransactionBuilder tx, Amount<java.util.Currency> amount, PartyAndCertificate ourIdentity, AbstractParty to, java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties, boolean anonymous)
Generate a transaction that moves an amount of currency to the given party.
Note: an class Amount
of Currency is only fungible for a given Issuer Party within a interface FungibleAsset
services
- The interface ServiceHub
to provide access to the database session.tx
- A builder, which may contain inputs, outputs and commands already. The relevant components needed
to move the cash will be added on top.amount
- How much currency to send.to
- the recipient party.ourIdentity
- ourIdentity is used to determine the where the change will be sent.
If anonymous is true then an anonymous identity will be generated from this and the change
will be spent to that, otherwise ourIdentity will be used as is.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 you're trying to pay has expectations
about which type of asset claims they are willing to accept.anonymous
- whether or not to use CI to send the change toclass Amount
,
Currency,
interface FungibleAsset
public NonExistentClass generateSpend(ServiceHub services, TransactionBuilder tx, java.util.List<net.corda.finance.contracts.asset.PartyAndAmount> payments, java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties)
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.
Note: an class Amount
of Currency is only fungible for a given Issuer Party within a interface FungibleAsset
services
- The interface ServiceHub
to provide access to the database session.tx
- A builder, which may contain inputs, outputs and commands already. The relevant components needed
to move the cash will be added on top.payments
- A list of amounts to pay, and the party to send the payment to.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 you're trying to pay has expectations
about which type of asset claims they are willing to accept.class Amount
,
Currency,
interface FungibleAsset
public NonExistentClass generateSpend(ServiceHub services, TransactionBuilder tx, java.util.List<net.corda.finance.contracts.asset.PartyAndAmount> payments, PartyAndCertificate ourIdentity, java.util.Set<? extends net.corda.core.identity.AbstractParty> onlyFromParties, boolean anonymous)
Generate a transaction that moves money of the given amounts to the recipients specified.
Note: an class Amount
of Currency is only fungible for a given Issuer Party within a interface FungibleAsset
services
- The interface ServiceHub
to provide access to the database session.tx
- A builder, which may contain inputs, outputs and commands already. The relevant components needed
to move the cash will be added on top.payments
- A list of amounts to pay, and the party to send the payment to.ourIdentity
- ourIdentity is used to determine the where the change will be sent.
If anonymous is true then an anonymous identity will be generated from this and the change
will be spent to that, otherwise ourIdentity will be used as is.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 you're trying to pay has expectations
about which type of asset claims they are willing to accept.anonymous
- whether or not to use CI to send the change toclass Amount
,
Currency,
interface FungibleAsset