public class CashKt
Modifier and Type | Method and Description |
---|---|
static Cash.State |
getCASH(Amount<java.util.Currency> $receiver)
An extension property that lets you write 100.DOLLARS.CASH
|
static Cash |
getCASH_PROGRAM_ID() |
static PartyAndReference |
getDUMMY_CASH_ISSUER()
A dummy, randomly generated issuer party by the name of "Snake Oil Issuer"
|
static java.security.KeyPair |
getDUMMY_CASH_ISSUER_KEY()
A randomly generated key.
|
static Cash.State |
getSTATE(Amount<net.corda.core.contracts.Issued> $receiver)
An extension property that lets you get a cash state from an issued token, under the
class NullPublicKey |
static Cash.State |
issued by(Cash.State $receiver,
AbstractParty party) |
static Cash.State |
issued by(Cash.State $receiver,
PartyAndReference deposit) |
static Cash.State |
issuedBy(Cash.State $receiver,
AbstractParty party) |
static Cash.State |
issuedBy(Cash.State $receiver,
PartyAndReference deposit) |
static Cash.State |
owned by(Cash.State $receiver,
CompositeKey owner) |
static Cash.State |
ownedBy(Cash.State $receiver,
CompositeKey owner) |
static Amount<net.corda.core.contracts.Issued> |
sumCash(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, throwing an exception if there are none, or if any of the cash
states cannot be added together (i.e. are different currencies or issuers).
|
static Amount<net.corda.core.contracts.Issued> |
sumCashBy(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver,
CompositeKey owner)
Sums the cash states in the list belonging to a single owner, throwing an exception
if there are none, or if any of the cash states cannot be added together (i.e. are
different currencies or issuers).
|
static Amount<net.corda.core.contracts.Issued> |
sumCashOrNull(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, returning null if there are none.
|
static Amount<net.corda.core.contracts.Issued> |
sumCashOrZero(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver,
Issued<java.util.Currency> currency)
Sums the cash states in the list, returning zero of the given currency+issuer if there are none.
|
static Cash.State |
with deposit(Cash.State $receiver,
PartyAndReference deposit) |
static Cash.State |
withDeposit(Cash.State $receiver,
PartyAndReference deposit) |
public static Cash getCASH_PROGRAM_ID()
public static Amount<net.corda.core.contracts.Issued> sumCashBy(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver, CompositeKey owner)
Sums the cash states in the list belonging to a single owner, throwing an exception if there are none, or if any of the cash states cannot be added together (i.e. are different currencies or issuers).
public static Amount<net.corda.core.contracts.Issued> sumCash(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, throwing an exception if there are none, or if any of the cash states cannot be added together (i.e. are different currencies or issuers).
public static Amount<net.corda.core.contracts.Issued> sumCashOrNull(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver)
Sums the cash states in the list, returning null if there are none.
public static Amount<net.corda.core.contracts.Issued> sumCashOrZero(java.lang.Iterable<? extends net.corda.core.contracts.ContractState> $receiver, Issued<java.util.Currency> currency)
Sums the cash states in the list, returning zero of the given currency+issuer if there are none.
public static Cash.State ownedBy(Cash.State $receiver, CompositeKey owner)
public static Cash.State issuedBy(Cash.State $receiver, AbstractParty party)
public static Cash.State issuedBy(Cash.State $receiver, PartyAndReference deposit)
public static Cash.State withDeposit(Cash.State $receiver, PartyAndReference deposit)
public static Cash.State owned by(Cash.State $receiver, CompositeKey owner)
public static Cash.State issued by(Cash.State $receiver, AbstractParty party)
public static Cash.State issued by(Cash.State $receiver, PartyAndReference deposit)
public static Cash.State with deposit(Cash.State $receiver, PartyAndReference deposit)
public static java.security.KeyPair getDUMMY_CASH_ISSUER_KEY()
A randomly generated key.
public static PartyAndReference getDUMMY_CASH_ISSUER()
A dummy, randomly generated issuer party by the name of "Snake Oil Issuer"
public static Cash.State getCASH(Amount<java.util.Currency> $receiver)
An extension property that lets you write 100.DOLLARS.CASH
public static Cash.State getSTATE(Amount<net.corda.core.contracts.Issued> $receiver)
An extension property that lets you get a cash state from an issued token, under the class NullPublicKey
class NullPublicKey