corda / net.corda.finance

Package net.corda.finance

Some simple testing utilities like pre-defined top-level values for common currencies. Mostly useful for writing unit tests in Kotlin.

WARNING: This library is not suitable for production use and should not be used in real CorDapps. Instead, use the Token SDK, or implement your own library. This library may be removed in a future release without warning.

Extensions for External Classes

java.util.Currency

kotlin.Double

kotlin.Int

kotlin.Long

net.corda.core.contracts.Amount

Properties

CHF

val CHF: Currency

EUR

val EUR: Currency

GBP

val GBP: Currency

JPY

val JPY: Currency

RUB

val RUB: Currency

USD

val USD: Currency

Functions

AMOUNT

fun <T : Any> AMOUNT(amount: Int, token: T): Amount<T>
fun <T : Any> AMOUNT(amount: Long, token: T): Amount<T>
fun <T : Any> AMOUNT(amount: Double, token: T): Amount<T>

DOLLARS

fun DOLLARS(amount: Int): Amount<Currency>
fun DOLLARS(amount: Long): Amount<Currency>
fun DOLLARS(amount: Double): Amount<Currency>

POUNDS

fun POUNDS(amount: Int): Amount<Currency>
fun POUNDS(amount: Long): Amount<Currency>
fun POUNDS(amount: Double): Amount<Currency>

SWISS_FRANCS

fun SWISS_FRANCS(amount: Int): Amount<Currency>
fun SWISS_FRANCS(amount: Long): Amount<Currency>
fun SWISS_FRANCS(amount: Double): Amount<Currency>