public class ContractsDSL
Modifier and Type | Field and Description |
---|---|
static java.util.Currency |
CHF |
static java.util.Currency |
EUR |
static Commodity |
FCOJ |
static java.util.Currency |
GBP |
static java.util.Currency |
USD |
Modifier and Type | Method and Description |
---|---|
static Amount<java.util.Currency> |
DOLLARS(int amount) |
static Amount<java.util.Currency> |
DOLLARS(double amount) |
static Amount<net.corda.core.contracts.Commodity> |
FCOJ(int amount) |
static Amount<java.util.Currency> |
POUNDS(int amount) |
static Amount<java.util.Currency> |
SWISS_FRANCS(int amount) |
static Commodity |
commodity(java.lang.String code) |
static java.util.Currency |
currency(java.lang.String code)
Defines a simple domain specific language for the specification of financial contracts. Currently covers:
|
static Amount<java.util.Currency> |
getDOLLARS(int $receiver) |
static Amount<java.util.Currency> |
getDOLLARS(double $receiver) |
static Amount<net.corda.core.contracts.Commodity> |
getFCOJ(int $receiver) |
static Amount<java.util.Currency> |
getPOUNDS(int $receiver) |
static Amount<java.util.Currency> |
getSWISS_FRANCS(int $receiver) |
static Issued<java.util.Currency> |
issued by(java.util.Currency $receiver,
PartyAndReference deposit) |
static Issued<net.corda.core.contracts.Commodity> |
issued by(Commodity $receiver,
PartyAndReference deposit) |
static Amount<net.corda.core.contracts.Issued> |
issued by(Amount<java.util.Currency> $receiver,
PartyAndReference deposit) |
static Issued<java.util.Currency> |
issuedBy(java.util.Currency $receiver,
PartyAndReference deposit) |
static Issued<net.corda.core.contracts.Commodity> |
issuedBy(Commodity $receiver,
PartyAndReference deposit) |
static Amount<net.corda.core.contracts.Issued> |
issuedBy(Amount<java.util.Currency> $receiver,
PartyAndReference deposit) |
static <C extends CommandData> |
requireSingleCommand(java.util.Collection<? extends net.corda.core.contracts.AuthenticatedObject<? extends net.corda.core.contracts.CommandData>> $receiver,
java.lang.Class<C> klass) |
static <R> R |
requireThat(kotlin.jvm.functions.Function1<? super net.corda.core.contracts.Requirements,? extends R> body) |
public static java.util.Currency USD
public static java.util.Currency GBP
public static java.util.Currency EUR
public static java.util.Currency CHF
public static Commodity FCOJ
public static java.util.Currency currency(java.lang.String code)
Defines a simple domain specific language for the specification of financial contracts. Currently covers:
Some utilities for working with commands.
Code for working with currencies.
An Amount type that represents a positive quantity of a specific currency.
A simple language extension for specifying requirements in English, along with logic to enforce them.
TODO: Look into replacing Currency and Amount with CurrencyUnit and MonetaryAmount from the javax.money API (JSR 354)
public static Commodity commodity(java.lang.String code)
public static Amount<java.util.Currency> DOLLARS(int amount)
public static Amount<java.util.Currency> DOLLARS(double amount)
public static Amount<java.util.Currency> POUNDS(int amount)
public static Amount<java.util.Currency> SWISS_FRANCS(int amount)
public static Amount<net.corda.core.contracts.Commodity> FCOJ(int amount)
public static Amount<java.util.Currency> getDOLLARS(int $receiver)
public static Amount<java.util.Currency> getDOLLARS(double $receiver)
public static Amount<java.util.Currency> getPOUNDS(int $receiver)
public static Amount<java.util.Currency> getSWISS_FRANCS(int $receiver)
public static Amount<net.corda.core.contracts.Commodity> getFCOJ(int $receiver)
public static Issued<java.util.Currency> issued by(java.util.Currency $receiver, PartyAndReference deposit)
public static Issued<net.corda.core.contracts.Commodity> issued by(Commodity $receiver, PartyAndReference deposit)
public static Amount<net.corda.core.contracts.Issued> issued by(Amount<java.util.Currency> $receiver, PartyAndReference deposit)
public static Issued<java.util.Currency> issuedBy(java.util.Currency $receiver, PartyAndReference deposit)
public static Issued<net.corda.core.contracts.Commodity> issuedBy(Commodity $receiver, PartyAndReference deposit)
public static Amount<net.corda.core.contracts.Issued> issuedBy(Amount<java.util.Currency> $receiver, PartyAndReference deposit)
public static <R> R requireThat(kotlin.jvm.functions.Function1<? super net.corda.core.contracts.Requirements,? extends R> body)
public static <C extends CommandData> AuthenticatedObject<C> requireSingleCommand(java.util.Collection<? extends net.corda.core.contracts.AuthenticatedObject<? extends net.corda.core.contracts.CommandData>> $receiver, java.lang.Class<C> klass)