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

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): <ERROR CLASS><T>
fun <T : Any> AMOUNT(amount: Long, token: T): <ERROR CLASS><T>
fun <T : Any> AMOUNT(amount: Double, token: T): <ERROR CLASS><T>

DOLLARS

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

POUNDS

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

SWISS_FRANCS

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

issued by

infix fun <ERROR CLASS><Currency>.issued by(deposit: <ERROR CLASS>): <ERROR CLASS>

issuedBy

infix fun <ERROR CLASS><Currency>.issuedBy(deposit: <ERROR CLASS>): <ERROR CLASS>