mirror of
https://github.com/corda/corda.git
synced 2025-02-20 01:16:42 +00:00
Merged master into dynamic-loading
This commit is contained in:
commit
2a72f38076
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,5 +1,13 @@
|
||||
TODO
|
||||
|
||||
# Eclipse, ctags, Mac metadata, log files
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
tags
|
||||
.DS_Store
|
||||
*.log
|
||||
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
|
||||
.gradle
|
||||
@ -13,6 +21,7 @@ lib/dokka.jar
|
||||
|
||||
buyer
|
||||
seller
|
||||
rate-fix-demo-data
|
||||
|
||||
### JetBrains template
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
|
||||
@ -67,4 +76,4 @@ atlassian-ide-plugin.xml
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
crashlytics-build.properties
|
||||
|
@ -12,7 +12,7 @@ allprojects {
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.0.0'
|
||||
ext.kotlin_version = '1.0.1'
|
||||
// TODO: Reset to 0.7.5 when released. We need the snapshot for a TLS serialization related fix.
|
||||
ext.quasar_version = '0.7.5-SNAPSHOT'
|
||||
ext.asm_version = '0.5.3'
|
||||
|
@ -9,8 +9,10 @@
|
||||
package core
|
||||
|
||||
import java.math.BigDecimal
|
||||
import java.time.DayOfWeek
|
||||
import java.time.Duration
|
||||
import java.time.LocalDate
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@ -56,7 +58,7 @@ data class Amount(val pennies: Long, val currency: Currency) : Comparable<Amount
|
||||
operator fun div(other: Int): Amount = Amount(pennies / other, currency)
|
||||
operator fun times(other: Int): Amount = Amount(Math.multiplyExact(pennies, other.toLong()), currency)
|
||||
|
||||
override fun toString(): String = currency.currencyCode + " " + (BigDecimal(pennies) / BigDecimal(100)).toPlainString()
|
||||
override fun toString(): String = currency.currencyCode + " " + (BigDecimal(pennies).divide(BigDecimal(100))).setScale(2).toPlainString()
|
||||
|
||||
override fun compareTo(other: Amount): Int {
|
||||
checkCurrency(other)
|
||||
@ -77,3 +79,221 @@ fun Iterable<Amount>.sumOrZero(currency: Currency) = if (iterator().hasNext()) s
|
||||
data class FixOf(val name: String, val forDay: LocalDate, val ofTenor: Duration)
|
||||
/** A [Fix] represents a named interest rate, on a given day, for a given duration. It can be embedded in a tx. */
|
||||
data class Fix(val of: FixOf, val value: BigDecimal) : CommandData
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Placeholder class for the Tenor datatype - which is a standardised duration of time until maturity */
|
||||
data class Tenor(var name:String)
|
||||
|
||||
/** Simple enum for returning accurals adjusted or unadjusted.
|
||||
* We don't actually do anything with this yet though, so it's ignored for now.
|
||||
*/
|
||||
enum class AccrualAdjustment {
|
||||
Adjusted,Unadjusted
|
||||
}
|
||||
|
||||
/** This is utilised in the [DateRollConvention] class to determine which way we should initially step when
|
||||
* finding a business day
|
||||
*/
|
||||
enum class DateRollDirection(val value: Long) { FORWARD(1), BACKWARD(-1) }
|
||||
|
||||
/** This reflects what happens if a date on which a business event is supposed to happen actually falls upon a non-working day
|
||||
* Depending on the accounting requirement, we can move forward until we get to a business day, or backwards
|
||||
* There are some additional rules which are explained in the individual cases below
|
||||
*/
|
||||
enum class DateRollConvention {
|
||||
// direction() cannot be a val due to the throw in the Actual instance
|
||||
|
||||
/** Don't roll the date, use the one supplied. */
|
||||
Actual {
|
||||
override fun direction(): DateRollDirection = throw UnsupportedOperationException("Direction is not relevant for convention Actual")
|
||||
override val isModified: Boolean = false
|
||||
},
|
||||
/** Following is the next business date from this one. */
|
||||
Following {
|
||||
override fun direction(): DateRollDirection = DateRollDirection.FORWARD
|
||||
override val isModified: Boolean = false
|
||||
},
|
||||
/**
|
||||
* "Modified following" is the next business date, unless it's in the next month, in which case use the preceeding
|
||||
* business date.
|
||||
*/
|
||||
ModifiedFollowing {
|
||||
override fun direction(): DateRollDirection = DateRollDirection.FORWARD
|
||||
override val isModified: Boolean = true
|
||||
},
|
||||
/** Previous is the previous business date from this one. */
|
||||
Previous {
|
||||
override fun direction(): DateRollDirection = DateRollDirection.BACKWARD
|
||||
override val isModified: Boolean = false
|
||||
},
|
||||
/**
|
||||
* Modified previous is the previous business date, unless it's in the previous month, in which case use the next
|
||||
* business date.
|
||||
*/
|
||||
ModifiedPrevious {
|
||||
override fun direction(): DateRollDirection = DateRollDirection.BACKWARD
|
||||
override val isModified: Boolean = true
|
||||
};
|
||||
|
||||
abstract fun direction(): DateRollDirection
|
||||
abstract val isModified: Boolean
|
||||
}
|
||||
|
||||
|
||||
/** This forms the day part of the "Day Count Basis" used for interest calculation. */
|
||||
enum class DayCountBasisDay {
|
||||
// We have to prefix 30 etc with a letter due to enum naming constraints.
|
||||
D30, D30N, D30P, D30E, D30G, Actual, ActualJ, D30Z, D30F, Bus_SaoPaulo
|
||||
}
|
||||
|
||||
/** This forms the year part of the "Day Count Basis" used for interest calculation. */
|
||||
enum class DayCountBasisYear {
|
||||
// Ditto above comment for years.
|
||||
Y360, Y365F, Y365L, Y365Q, Y366, Actual, ActualA, Y365B, Y365, ISMA, ICMA, Y252
|
||||
}
|
||||
|
||||
/** Whether the payment should be made before the due date, or after it. */
|
||||
enum class PaymentRule {
|
||||
InAdvance, InArrears,
|
||||
}
|
||||
|
||||
/**
|
||||
* Date offset that the fixing is done prior to the accrual start date.
|
||||
* Currently not used in the calculation.
|
||||
*/
|
||||
enum class DateOffset {
|
||||
// TODO: Definitely shouldn't be an enum, but let's leave it for now at T-2 is a convention.
|
||||
ZERO, TWODAYS,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Frequency at which an event occurs - the enumerator also casts to an integer specifying the number of times per year
|
||||
* that would divide into (eg annually = 1, semiannual = 2, monthly = 12 etc).
|
||||
*/
|
||||
enum class Frequency(val annualCompoundCount: Int) {
|
||||
Annual(1) {
|
||||
override fun offset(d: LocalDate) = d.plusYears(1)
|
||||
},
|
||||
SemiAnnual(2) {
|
||||
override fun offset(d: LocalDate) = d.plusMonths(6)
|
||||
},
|
||||
Quarterly(4) {
|
||||
override fun offset(d: LocalDate) = d.plusMonths(3)
|
||||
},
|
||||
Monthly(12) {
|
||||
override fun offset(d: LocalDate) = d.plusMonths(1)
|
||||
},
|
||||
Weekly(52) {
|
||||
override fun offset(d: LocalDate) = d.plusWeeks(1)
|
||||
},
|
||||
BiWeekly(26) {
|
||||
override fun offset(d: LocalDate) = d.plusWeeks(2)
|
||||
};
|
||||
abstract fun offset(d: LocalDate): LocalDate
|
||||
// Daily() // Let's not worry about this for now.
|
||||
}
|
||||
|
||||
|
||||
fun LocalDate.isWorkingDay(accordingToCalendar: BusinessCalendar): Boolean = accordingToCalendar.isWorkingDay(this)
|
||||
|
||||
// TODO: Make Calendar data come from an oracle
|
||||
|
||||
/**
|
||||
* A business calendar performs date calculations that take into account national holidays and weekends. This is a
|
||||
* typical feature of financial contracts, in which a business may not want a payment event to fall on a day when
|
||||
* no staff are around to handle problems.
|
||||
*/
|
||||
open class BusinessCalendar private constructor(val holidayDates: List<LocalDate>) {
|
||||
class UnknownCalendar(name: String): Exception("$name not found")
|
||||
|
||||
companion object {
|
||||
val calendars = listOf("London","NewYork")
|
||||
|
||||
val TEST_CALENDAR_DATA = calendars.map {
|
||||
it to BusinessCalendar::class.java.getResourceAsStream("${it}HolidayCalendar.txt").bufferedReader().readText()
|
||||
}.toMap()
|
||||
|
||||
/** Parses a date of the form YYYY-MM-DD, like 2016-01-10 for 10th Jan. */
|
||||
fun parseDateFromString(it: String) = LocalDate.parse(it, DateTimeFormatter.ISO_LOCAL_DATE)
|
||||
|
||||
/** Returns a business calendar that combines all the named holiday calendars into one list of holiday dates. */
|
||||
fun getInstance(vararg calname: String) = BusinessCalendar(
|
||||
calname.flatMap { (TEST_CALENDAR_DATA[it] ?: throw UnknownCalendar(it)).split(",") }.
|
||||
toSet().
|
||||
map{ parseDateFromString(it) }.
|
||||
toList()
|
||||
)
|
||||
|
||||
/** Calculates an event schedule that moves events around to ensure they fall on working days. */
|
||||
fun createGenericSchedule(startDate: LocalDate,
|
||||
period: Frequency,
|
||||
calendar: BusinessCalendar = BusinessCalendar.getInstance(),
|
||||
dateRollConvention: DateRollConvention = DateRollConvention.Following,
|
||||
noOfAdditionalPeriods: Int = Integer.MAX_VALUE,
|
||||
endDate: LocalDate? = null,
|
||||
periodOffset: Int? = null): List<LocalDate> {
|
||||
val ret = ArrayList<LocalDate>()
|
||||
var ctr = 0
|
||||
var currentDate = startDate
|
||||
|
||||
while (true) {
|
||||
currentDate = period.offset(currentDate)
|
||||
val scheduleDate = calendar.applyRollConvention(currentDate, dateRollConvention)
|
||||
|
||||
if (periodOffset == null || periodOffset <= ctr)
|
||||
ret.add(scheduleDate)
|
||||
ctr += 1
|
||||
// TODO: Fix addl period logic
|
||||
if ((ctr > noOfAdditionalPeriods ) || (currentDate >= endDate ?: currentDate ))
|
||||
break
|
||||
}
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
open fun isWorkingDay(date: LocalDate): Boolean =
|
||||
when {
|
||||
date.dayOfWeek == DayOfWeek.SATURDAY -> false
|
||||
date.dayOfWeek == DayOfWeek.SUNDAY -> false
|
||||
holidayDates.contains(date) -> false
|
||||
else -> true
|
||||
}
|
||||
|
||||
open fun applyRollConvention(testDate: LocalDate, dateRollConvention: DateRollConvention): LocalDate {
|
||||
if (dateRollConvention == DateRollConvention.Actual) return testDate
|
||||
|
||||
var direction = dateRollConvention.direction().value
|
||||
var trialDate = testDate
|
||||
while (!isWorkingDay(trialDate)) {
|
||||
trialDate = trialDate.plusDays(direction)
|
||||
}
|
||||
|
||||
// We've moved to the next working day in the right direction, but if we're using the "modified" date roll
|
||||
// convention and we've crossed into another month, reverse the direction instead to stay within the month.
|
||||
// Probably better explained here: http://www.investopedia.com/terms/m/modifiedfollowing.asp
|
||||
|
||||
if (dateRollConvention.isModified && testDate.month != trialDate.month) {
|
||||
direction = -direction
|
||||
trialDate = testDate
|
||||
while (!isWorkingDay(trialDate)) {
|
||||
trialDate = trialDate.plusDays(direction)
|
||||
}
|
||||
}
|
||||
return trialDate
|
||||
}
|
||||
}
|
||||
|
||||
fun dayCountCalculator(startDate: LocalDate, endDate: LocalDate,
|
||||
dcbYear: DayCountBasisYear,
|
||||
dcbDay: DayCountBasisDay): BigDecimal {
|
||||
// Right now we are only considering Actual/360 and 30/360 .. We'll do the rest later.
|
||||
// TODO: The rest.
|
||||
return when {
|
||||
dcbDay == DayCountBasisDay.Actual && dcbYear == DayCountBasisYear.Y360 -> BigDecimal((endDate.toEpochDay() - startDate.toEpochDay()))
|
||||
dcbDay == DayCountBasisDay.D30 && dcbYear == DayCountBasisYear.Y360 -> BigDecimal((endDate.year - startDate.year) * 360.0 + (endDate.monthValue - startDate.monthValue) * 30.0 + endDate.dayOfMonth - startDate.dayOfMonth)
|
||||
else -> TODO("Can't calculate days using convention $dcbDay / $dcbYear")
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,10 @@ val Int.hours: Duration get() = Duration.ofHours(this.toLong())
|
||||
val Int.minutes: Duration get() = Duration.ofMinutes(this.toLong())
|
||||
val Int.seconds: Duration get() = Duration.ofSeconds(this.toLong())
|
||||
|
||||
val String.d: BigDecimal get() = BigDecimal(this)
|
||||
val Int.bd: BigDecimal get() = BigDecimal(this)
|
||||
val Double.bd: BigDecimal get() = BigDecimal(this)
|
||||
val String.bd: BigDecimal get() = BigDecimal(this)
|
||||
val Long.bd: BigDecimal get() = BigDecimal(this)
|
||||
|
||||
/**
|
||||
* Returns a random positive long generated using a secure RNG. This function sacrifies a bit of entropy in order to
|
||||
|
1
core/src/main/resources/core/LondonHolidayCalendar.txt
Normal file
1
core/src/main/resources/core/LondonHolidayCalendar.txt
Normal file
@ -0,0 +1 @@
|
||||
2015-01-01,2015-04-03,2015-04-06,2015-05-04,2015-05-25,2015-08-31,2015-12-25,2015-12-28,2016-01-01,2016-03-25,2016-03-28,2016-05-02,2016-05-30,2016-08-29,2016-12-26,2016-12-27,2017-01-02,2017-04-14,2017-04-17,2017-05-01,2017-05-29,2017-08-28,2017-12-25,2017-12-26,2018-01-01,2018-03-30,2018-04-02,2018-05-07,2018-05-28,2018-08-27,2018-12-25,2018-12-26,2019-01-01,2019-04-19,2019-04-22,2019-05-06,2019-05-27,2019-08-26,2019-12-25,2019-12-26,2020-01-01,2020-04-10,2020-04-13,2020-05-04,2020-05-25,2020-08-31,2020-12-25,2020-12-28,2021-01-01,2021-04-02,2021-04-05,2021-05-03,2021-05-31,2021-08-30,2021-12-27,2021-12-28,2022-01-03,2022-04-15,2022-04-18,2022-05-02,2022-05-30,2022-08-29,2022-12-26,2022-12-27,2023-01-02,2023-04-07,2023-04-10,2023-05-01,2023-05-29,2023-08-28,2023-12-25,2023-12-26,2024-01-01,2024-03-29,2024-04-01,2024-05-06,2024-05-27,2024-08-26,2024-12-25,2024-12-26
|
1
core/src/main/resources/core/NewYorkHolidayCalendar.txt
Normal file
1
core/src/main/resources/core/NewYorkHolidayCalendar.txt
Normal file
@ -0,0 +1 @@
|
||||
2015-01-01,2015-01-19,2015-02-16,2015-02-18,2015-05-25,2015-07-03,2015-09-07,2015-10-12,2015-11-11,2015-11-26,2015-12-25,2016-01-01,2016-01-18,2016-02-10,2016-02-15,2016-05-30,2016-07-04,2016-09-05,2016-10-10,2016-11-11,2016-11-24,2016-12-26,2017-01-02,2017-01-16,2017-02-20,2017-03-01,2017-05-29,2017-07-04,2017-09-04,2017-10-09,2017-11-10,2017-11-23,2017-12-25,2018-01-01,2018-01-15,2018-02-14,2018-02-19,2018-05-28,2018-07-04,2018-09-03,2018-10-08,2018-11-12,2018-11-22,2018-12-25,2019-01-01,2019-01-21,2019-02-18,2019-03-06,2019-05-27,2019-07-04,2019-09-02,2019-10-14,2019-11-11,2019-11-28,2019-12-25,2020-01-01,2020-01-20,2020-02-17,2020-02-26,2020-05-25,2020-07-03,2020-09-07,2020-10-12,2020-11-11,2020-11-26,2020-12-25,2021-01-01,2021-01-18,2021-02-15,2021-02-17,2021-05-31,2021-07-05,2021-09-06,2021-10-11,2021-11-11,2021-11-25,2021-12-24,2022-01-17,2022-02-21,2022-03-02,2022-05-30,2022-07-04,2022-09-05,2022-10-10,2022-11-11,2022-11-24,2022-12-26,2023-01-02,2023-01-16,2023-02-20,2023-02-22,2023-05-29,2023-07-04,2023-09-04,2023-10-09,2023-11-10,2023-11-23,2023-12-25,2024-01-01,2024-01-15,2024-02-14,2024-02-19,2024-05-27,2024-07-04,2024-09-02,2024-10-14,2024-11-11,2024-11-28,2024-12-25
|
97
core/src/test/kotlin/core/FinanceTypesTest.kt
Normal file
97
core/src/test/kotlin/core/FinanceTypesTest.kt
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright 2015 Distributed Ledger Group LLC. Distributed as Licensed Company IP to DLG Group Members
|
||||
* pursuant to the August 7, 2015 Advisory Services Agreement and subject to the Company IP License terms
|
||||
* set forth therein.
|
||||
*
|
||||
* All other rights reserved.
|
||||
*/
|
||||
|
||||
package core
|
||||
|
||||
import org.junit.Test
|
||||
import java.time.LocalDate
|
||||
import java.util.*
|
||||
|
||||
class FinanceTypesTest {
|
||||
|
||||
@Test
|
||||
fun `make sure Amount has decimal places`() {
|
||||
var x = Amount(1, Currency.getInstance("USD"))
|
||||
assert("0.01" in x.toString())
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun `schedule generator 1`() {
|
||||
var ret = BusinessCalendar.createGenericSchedule(startDate = LocalDate.of(2014, 11, 25), period = Frequency.Monthly, noOfAdditionalPeriods = 3)
|
||||
// We know that Jan 25th 2015 is on the weekend -> It should not be in this list returned.
|
||||
assert(! (LocalDate.of(2015,1,25) in ret))
|
||||
println(ret)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `schedule generator 2`() {
|
||||
var ret = BusinessCalendar.createGenericSchedule(startDate = LocalDate.of(2015, 11, 25), period = Frequency.Monthly, noOfAdditionalPeriods = 3, calendar = BusinessCalendar.getInstance("London"), dateRollConvention = DateRollConvention.Following)
|
||||
// Xmas should not be in the list!
|
||||
assert(! (LocalDate.of(2015,12,25) in ret))
|
||||
println(ret)
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun `create a UK calendar` () {
|
||||
val cal = BusinessCalendar.getInstance("London")
|
||||
val holdates = cal.holidayDates
|
||||
println(holdates)
|
||||
assert(LocalDate.of(2016,12,27) in holdates) // Christmas this year is at the weekend...
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `create a US UK calendar`() {
|
||||
val cal = BusinessCalendar.getInstance("London","NewYork")
|
||||
assert(LocalDate.of(2016,7,4) in cal.holidayDates) // The most American of holidays
|
||||
assert(LocalDate.of(2016,8,29) in cal.holidayDates) // August Bank Holiday for brits only
|
||||
println("Calendar contains both US and UK holidays")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `calendar test of modified following` () {
|
||||
val ldn = BusinessCalendar.getInstance("London")
|
||||
val result = ldn.applyRollConvention(LocalDate.of(2016,12,25),DateRollConvention.ModifiedFollowing)
|
||||
assert(result == LocalDate.of(2016,12,28))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `calendar test of modified following pt 2` () {
|
||||
val ldn = BusinessCalendar.getInstance("London")
|
||||
val result = ldn.applyRollConvention(LocalDate.of(2016,12,31),DateRollConvention.ModifiedFollowing)
|
||||
assert(result == LocalDate.of(2016,12,30))
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun `calendar test of modified previous` () {
|
||||
val ldn = BusinessCalendar.getInstance("London")
|
||||
val result = ldn.applyRollConvention(LocalDate.of(2016,1,1),DateRollConvention.ModifiedPrevious)
|
||||
assert(result == LocalDate.of(2016,1,4))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `calendar test of previous` () {
|
||||
val ldn = BusinessCalendar.getInstance("London")
|
||||
val result = ldn.applyRollConvention(LocalDate.of(2016,12,25),DateRollConvention.Previous)
|
||||
assert(result == LocalDate.of(2016,12,23))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `calendar test of following` () {
|
||||
val ldn = BusinessCalendar.getInstance("London")
|
||||
val result = ldn.applyRollConvention(LocalDate.of(2016,12,25),DateRollConvention.Following)
|
||||
assert(result == LocalDate.of(2016,12,28))
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
2
docs/build/html/_sources/index.txt
vendored
2
docs/build/html/_sources/index.txt
vendored
@ -38,12 +38,12 @@ Read on to learn:
|
||||
|
||||
tutorial
|
||||
protocol-state-machines
|
||||
oracles
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Appendix
|
||||
|
||||
visualiser
|
||||
roadmap
|
||||
codestyle
|
||||
|
||||
|
14
docs/build/html/_sources/inthebox.txt
vendored
14
docs/build/html/_sources/inthebox.txt
vendored
@ -3,15 +3,16 @@ What's included?
|
||||
|
||||
The current prototype consists of a small amount of code that defines:
|
||||
|
||||
* Key data structures
|
||||
* Key data structures.
|
||||
* Algorithms that work with them, such as serialising, hashing, signing, and verification of the signatures.
|
||||
* Three smart contracts that implement a notion of a cash claim, a basic commercial paper and a crowdfunding contract.
|
||||
These are simplified versions of the real things.
|
||||
* Two smart contracts that implement a notion of a cash claim and basic commercial paper (implemented twice, in two
|
||||
different programming languages). These are simplified versions of the real things.
|
||||
* Unit tests that check the algorithms do what is expected, and which verify the behaviour of the smart contracts.
|
||||
* API documentation and tutorials (what you're reading)
|
||||
* A simple standalone node that uses an embedded message queue broker as its P2P messaging layer
|
||||
* A simple standalone node that uses an embedded message queue broker as its P2P messaging layer.
|
||||
* A trading demo that runs the node in either a listening/buying mode, or a connecting/selling mode, and swaps some
|
||||
fake commercial paper assets for some self-issued IOU cash.
|
||||
fake commercial paper assets for some self-issued IOU cash, using a generic *protocol framework*.
|
||||
* It also includes two oracles: one for precise timestamping and another for interest rate swaps.
|
||||
|
||||
Some things it does not currently include but should gain later are:
|
||||
|
||||
@ -27,8 +28,9 @@ You can browse `the JIRA bug tracker <https://r3-cev.atlassian.net/>`_.
|
||||
The prototype's goal is rapid exploration of ideas. Therefore in places it takes shortcuts that a production system
|
||||
would not in order to boost productivity:
|
||||
|
||||
* It uses a serialization framework instead of a well specified, vendor neutral protocol.
|
||||
* It uses an object graph serialization framework instead of a well specified, vendor neutral protocol.
|
||||
* It uses secp256r1, an obsolete elliptic curve.
|
||||
* It uses the default, out of the box Apache Artemis MQ protocol instead of AMQP/1.0 (although switching should be easy)
|
||||
|
||||
Contracts
|
||||
---------
|
||||
|
55
docs/build/html/_sources/node-administration.txt
vendored
55
docs/build/html/_sources/node-administration.txt
vendored
@ -4,6 +4,34 @@ Node administration
|
||||
When a node is running, it exposes an embedded web server that lets you monitor it, upload and download attachments,
|
||||
access a REST API and so on.
|
||||
|
||||
Monitoring your node
|
||||
--------------------
|
||||
|
||||
Like most Java servers, the node exports various useful metrics and management operations via the industry-standard
|
||||
`JMX infrastructure <https://en.wikipedia.org/wiki/Java_Management_Extensions>`_. JMX is a standard _in-process_ API
|
||||
for registering so-called _MBeans_ ... objects whose properties and methods are intended for server management. It does
|
||||
not require any particular network protocol for export. So this data can be exported from the node in various ways:
|
||||
some monitoring systems provide a "Java Agent", which is essentially a JVM plugin that finds all the MBeans and sends
|
||||
them out to a statistics collector over the network. For those systems, follow the instructions provided by the vendor.
|
||||
|
||||
Sometimes though, you just want raw access to the data and operations itself. So nodes export them over HTTP on the
|
||||
`/monitoring/json` HTTP endpoint, using a program called `Jolokia <https://jolokia.org/>`_. Jolokia defines the JSON
|
||||
and REST formats for accessing MBeans, and provides client libraries to work with that protocol as well.
|
||||
|
||||
Here are a few ways to build dashboards and extract monitoring data for a node:
|
||||
|
||||
* `JMX2Graphite <https://github.com/logzio/jmx2graphite>`_ is a tool that can be pointed to /monitoring/json and will
|
||||
scrape the statistics found there, then insert them into the Graphite monitoring tool on a regular basis. It runs
|
||||
in Docker and can be started with a single command.
|
||||
* `JMXTrans <https://github.com/jmxtrans/jmxtrans>`_ is another tool for Graphite, this time, it's got its own agent
|
||||
(JVM plugin) which reads a custom config file and exports only the named data. It's more configurable than
|
||||
JMX2Graphite and doesn't require a separate process, as the JVM will write directly to Graphite.
|
||||
* *Java Mission Control* is a desktop app that can connect to a target JVM that has the right command line flags set
|
||||
(or always, if running locally). You can explore what data is available, create graphs of those metrics, and invoke
|
||||
management operations like forcing a garbage collection.
|
||||
* Cloud metrics services like New Relic also understand JMX, typically, by providing their own agent that uploads the
|
||||
data to their service on a regular schedule.
|
||||
|
||||
Uploading and downloading attachments
|
||||
-------------------------------------
|
||||
|
||||
@ -15,7 +43,7 @@ you can upload it by running this command from a UNIX terminal:
|
||||
|
||||
.. sourcecode:: shell
|
||||
|
||||
curl -F myfile=@path/to/my/file.zip http://localhost:31338/attachments/upload
|
||||
curl -F myfile=@path/to/my/file.zip http://localhost:31338/upload/attachment
|
||||
|
||||
The attachment will be identified by the SHA-256 hash of the contents, which you can get by doing:
|
||||
|
||||
@ -23,8 +51,8 @@ The attachment will be identified by the SHA-256 hash of the contents, which you
|
||||
|
||||
shasum -a 256 file.zip
|
||||
|
||||
on a Mac or by using ``sha256sum`` on Linux. Alternatively, check the node logs. There is presently no way to manage
|
||||
attachments from a GUI.
|
||||
on a Mac or by using ``sha256sum`` on Linux. Alternatively, the hash will be returned to you when you upload the
|
||||
attachment.
|
||||
|
||||
An attachment may be downloaded by fetching:
|
||||
|
||||
@ -39,3 +67,24 @@ containers, you can also fetch a specific file within the attachment by appendin
|
||||
|
||||
http://localhost:31338/attachments/DECD098666B9657314870E192CED0C3519C2C9D395507A238338F8D003929DE9/path/within/zip.txt
|
||||
|
||||
Uploading interest rate fixes
|
||||
-----------------------------
|
||||
|
||||
If you would like to operate an interest rate fixing service (oracle), you can upload fix data by uploading data in
|
||||
a simple text format to the ``/upload/interest-rates`` path on the web server.
|
||||
|
||||
The file looks like this::
|
||||
|
||||
# Some pretend noddy rate fixes, for the interest rate oracles.
|
||||
|
||||
LIBOR 2016-03-16 30 = 0.678
|
||||
LIBOR 2016-03-16 60 = 0.655
|
||||
EURIBOR 2016-03-15 30 = 0.123
|
||||
EURIBOR 2016-03-15 60 = 0.111
|
||||
|
||||
The columns are:
|
||||
|
||||
* Name of the fix
|
||||
* Date of the fix
|
||||
* The tenor / time to maturity in days
|
||||
* The interest rate itself
|
186
docs/build/html/_sources/oracles.txt
vendored
Normal file
186
docs/build/html/_sources/oracles.txt
vendored
Normal file
@ -0,0 +1,186 @@
|
||||
.. highlight:: kotlin
|
||||
.. raw:: html
|
||||
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/codesets.js"></script>
|
||||
|
||||
Writing oracle services
|
||||
=======================
|
||||
|
||||
This article covers *oracles*: network services that link the ledger to the outside world by providing facts that
|
||||
affect the validity of transactions.
|
||||
|
||||
The current prototype includes two oracles:
|
||||
|
||||
1. A timestamping service
|
||||
2. An interest rate fixing service
|
||||
|
||||
We will examine the similarities and differences in their design, whilst covering how the oracle concept works.
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Oracles are a key concept in the block chain/decentralised ledger space. They can be essential for many kinds of
|
||||
application, because we often wish to condition a transaction on some fact being true or false, but the ledger itself
|
||||
has a design that is essentially functional: all transactions are *pure* and *immutable*. Phrased another way, a
|
||||
smart contract cannot perform any input/output or depend on any state outside of the transaction itself. There is no
|
||||
way to download a web page or interact with the user, in a smart contract. It must be this way because everyone must
|
||||
be able to independently check a transaction and arrive at an identical conclusion for the ledger to maintan its
|
||||
integrity: if a transaction could evaluate to "valid" on one computer and then "invalid" a few minutes later on a
|
||||
different computer, the entire shared ledger concept wouldn't work.
|
||||
|
||||
But it is often essential that transactions do depend on data from the outside world, for example, verifying that an
|
||||
interest rate swap is paying out correctly may require data on interest rates, verifying that a loan has reached
|
||||
maturity requires knowledge about the current time, knowing which side of a bet receives the payment may require
|
||||
arbitrary facts about the real world (e.g. the bankruptcy or solvency of a company or country) ... and so on.
|
||||
|
||||
We can solve this problem by introducing services that create digitally signed data structures which assert facts.
|
||||
These structures can then be used as an input to a transaction and distributed with the transaction data itself. Because
|
||||
the statements are themselves immutable and signed, it is impossible for an oracle to change its mind later and
|
||||
invalidate transactions that were previously found to be valid. In contrast, consider what would happen if a contract
|
||||
could do an HTTP request: it's possible that an answer would change after being downloaded, resulting in loss of
|
||||
consensus (breaks).
|
||||
|
||||
The two basic approaches
|
||||
------------------------
|
||||
|
||||
The architecture provides two ways of implementing oracles with different tradeoffs:
|
||||
|
||||
1. Using commands
|
||||
2. Using attachments
|
||||
|
||||
When a fact is encoded in a command, it is embedded in the transaction itself. The oracle then acts as a co-signer to
|
||||
the entire transaction. The oracle's signature is valid only for that transaction, and thus even if a fact (like a
|
||||
stock price) does not change, every transaction that incorporates that fact must go back to the oracle for signing.
|
||||
|
||||
When a fact is encoded as an attachment, it is a separate object to the transaction which is referred to by hash.
|
||||
Nodes download attachments from peers at the same time as they download transactions, unless of course the node has
|
||||
already seen that attachment, in which case it won't fetch it again. Contracts have access to the contents of
|
||||
attachments and attachments can be digitally signed (in future).
|
||||
|
||||
As you can see, both approaches share a few things: they both allow arbitrary binary data to be provided to transactions
|
||||
(and thus contracts). The primary difference is whether the data is a freely reusable, standalone object or whether it's
|
||||
integrated with a transaction.
|
||||
|
||||
Here's a quick way to decide which approach makes more sense for your data source:
|
||||
|
||||
* Is your data *continuously changing*, like a stock price, the current time, etc? If yes, use a command.
|
||||
* Is your data *commercially valuable*, like a feed which you are not allowed to resell unless it's incorporated into
|
||||
a business deal? If yes, use a command, so you can charge money for signing the same fact in each unique business
|
||||
context.
|
||||
* Is your data *very small*, like a single number? If yes, use a command.
|
||||
* Is your data *large*, *static* and *commercially worthless*, for instance, a holiday calendar? If yes, use an
|
||||
attachment.
|
||||
* Is your data *intended for human consumption*, like a PDF of legal prose, or an Excel spreadsheet? If yes, use an
|
||||
attachment.
|
||||
|
||||
Asserting continuously varying data that is publicly known
|
||||
----------------------------------------------------------
|
||||
|
||||
Let's look at the timestamping oracle that can be found in the ``TimestamperService`` class. This is an example of
|
||||
an oracle that uses a command because the current time is a constantly changing fact that everybody knows.
|
||||
|
||||
The most obvious way to implement such a service would be:
|
||||
|
||||
1. The creator of the transaction that depends on the time reads their local clock
|
||||
2. They insert a command with that time into the transaction
|
||||
3. They then send it to the oracle for signing.
|
||||
|
||||
But this approach has a problem. There will never be exact clock synchronisation between the party creating the
|
||||
transaction and the oracle. This is not only due to physics, network latencies etc but because between inserting the
|
||||
command and getting the oracle to sign there may be many other steps, like sending the transaction to other parties
|
||||
involved in the trade as well, or even requesting human signoff. Thus the time observed by the oracle may be quite
|
||||
different to the time observed in step 1. This problem can occur any time an oracle attests to a constantly changing
|
||||
value.
|
||||
|
||||
.. note:: It is assumed that "true time" for a timestamping oracle means GPS/NaviStar time as defined by the atomic
|
||||
clocks at the US Naval Observatory. This time feed is extremely accurate and available globally for free.
|
||||
|
||||
We fix it by including explicit tolerances in the command, which is defined like this:
|
||||
|
||||
.. sourcecode:: kotlin
|
||||
|
||||
data class TimestampCommand(val after: Instant?, val before: Instant?) : CommandData
|
||||
init {
|
||||
if (after == null && before == null)
|
||||
throw IllegalArgumentException("At least one of before/after must be specified")
|
||||
if (after != null && before != null)
|
||||
check(after <= before)
|
||||
}
|
||||
}
|
||||
|
||||
This defines a class that has two optional fields: before and after, along with a constructor that imposes a couple
|
||||
more constraints that cannot be expressed in the type system, namely, that "after" actually is temporally after
|
||||
"before", and that at least one bound must be present. A timestamp command that doesn't contain anything is illegal.
|
||||
|
||||
Thus we express that the *true value* of the fact "the current time" is actually unknowable. Even when both before and
|
||||
after times are included, the transaction could have occurred at any point between those two timestamps. In this case
|
||||
"occurrence" could mean the execution date, the value date, the trade date etc ... the oracle doesn't care what precise
|
||||
meaning the timestamp has to the contract.
|
||||
|
||||
By creating a range that can be either closed or open at one end, we allow all of the following facts to be modelled:
|
||||
|
||||
* This transaction occurred at some point after the given time (e.g. after a maturity event)
|
||||
* This transaction occurred at any time before the given time (e.g. before a bankruptcy event)
|
||||
* This transaction occurred at some point roughly around the given time (e.g. on a specific day)
|
||||
|
||||
This same technique can be adapted to other types of oracle.
|
||||
|
||||
Asserting occasionally varying data that is not publicly known
|
||||
--------------------------------------------------------------
|
||||
|
||||
Sometimes you may want a fact that changes, but is not entirely continuous. Additionally the exact value may not be
|
||||
public, or may only be semi-public (e.g. easily available to some entities on the network but not all). An example of
|
||||
this would be a LIBOR interest rate fix.
|
||||
|
||||
In this case, the following design can be used. The oracle service provides a query API which returns the current value,
|
||||
and a signing service that signs a transaction if the data in the command matches the answer being returned by the
|
||||
query API. Probably the query response contains some sort of timestamp as well, so the service can recognise values
|
||||
that were true in the past but no longer are (this is arguably a part of the fact being asserted).
|
||||
|
||||
Because the signature covers the transaction, and transactions may end up being forwarded anywhere, the fact itself
|
||||
is independently checkable. However, this approach can be useful when the data itself costs money, because the act
|
||||
of issuing the signature in the first place can be charged for (e.g. by requiring the submission of a fresh
|
||||
``Cash.State`` that has been re-assigned to a key owned by the oracle service). Because the signature covers the
|
||||
*transaction* and not only the *fact*, this allows for a kind of weak pseudo-DRM over data feeds. Whilst a smart
|
||||
contract could in theory include a transaction parsing and signature checking library, writing a contract in this way
|
||||
would be conclusive evidence of intent to disobey the rules of the service (*res ipsa loquitur*). In an environment
|
||||
where parties are legally identifiable, usage of such a contract would by itself be sufficient to trigger some sort of
|
||||
punishment.
|
||||
|
||||
Here is an extract from the ``NodeService.Oracle`` class and supporting types:
|
||||
|
||||
.. sourcecode:: kotlin
|
||||
|
||||
/** A [FixOf] identifies the question side of a fix: what day, tenor and type of fix ("LIBOR", "EURIBOR" etc) */
|
||||
data class FixOf(val name: String, val forDay: LocalDate, val ofTenor: Duration)
|
||||
|
||||
/** A [Fix] represents a named interest rate, on a given day, for a given duration. It can be embedded in a tx. */
|
||||
data class Fix(val of: FixOf, val value: BigDecimal) : CommandData
|
||||
|
||||
class Oracle {
|
||||
fun query(queries: List<FixOf>): List<Fix>
|
||||
|
||||
fun sign(wtx: WireTransaction): DigitalSignature.LegallyIdentifiable
|
||||
}
|
||||
|
||||
Because the fix contains a timestamp (the ``forDay`` field), there can be an arbitrary delay between a fix being
|
||||
requested via ``query`` and the signature being requested via ``sign``.
|
||||
|
||||
Implementing oracles in the framework
|
||||
-------------------------------------
|
||||
|
||||
Implementation involves the following steps:
|
||||
|
||||
1. Defining a high level oracle class, that exposes the basic API operations.
|
||||
2. Defining a lower level service class, that binds network messages to the API.
|
||||
3. Defining a protocol using the :doc:`protocol-state-machines` framework to make it easy for a client to interact
|
||||
with the oracle.
|
||||
|
||||
An example of how to do this can be found in the ``NodeInterestRates.Oracle``, ``NodeInterestRates.Service`` and
|
||||
``RateFixProtocol`` classes. The exact details of how this code works will change in future, so for now consulting
|
||||
the protocols tutorial and the code for the server-side oracles implementation will have to suffice. There will be more
|
||||
detail added once the platform APIs have settled down.
|
||||
|
||||
Currently, there's no network map service, so the location and identity keys of an oracle must be distributed out of
|
||||
band.
|
37
docs/build/html/_sources/roadmap.txt
vendored
37
docs/build/html/_sources/roadmap.txt
vendored
@ -1,37 +0,0 @@
|
||||
Roadmap
|
||||
=======
|
||||
|
||||
The canonical place to learn about pending tasks is the `R3 JIRA <https://r3-cev.atlassian.net/>`_ site. This
|
||||
page gives some examples of tasks that we wish to explore in future milestones as part of proving (or disproving)
|
||||
our core thesis
|
||||
|
||||
Data distribution and management:
|
||||
|
||||
* Introduce a pluggable network messaging backend with a mock implementation for testing, and an Apache Kafka based
|
||||
implementation for bringing up first networking capability. Using Kafka as a message routing/storage layer is not
|
||||
necessarily the final approach or suitable for P2P WAN messaging, but it should be a good next step for prototyping
|
||||
and may even be a useful for internal deployments.
|
||||
* Flesh out the core code enough to have a server that downloads and verifies transactions as they are uploaded to the
|
||||
cluster. At this stage all transactions are assumed to be public to the network (this will change later). Some basic
|
||||
logging/JMX/monitoring dashboard should be present to see what the node is doing.
|
||||
* Experimentation with block-free conflict/double spend resolution using a voting pool of *observers* with lazy consensus.
|
||||
Logic for rolling back losing transaction subgraphs when a conflict is resolved, reporting these events to observer
|
||||
APIs and so on.
|
||||
* Support a pluggable storage layer for recording seen transactions and their validity states.
|
||||
|
||||
Contracts API:
|
||||
|
||||
* Upgrades to the composability of contracts: demonstrate how states can require the presence of other states as a way
|
||||
to mix in things like multi-signature requirements.
|
||||
* Demonstrate how states can be separated into two parts, the minimum necessary for conflict resolution (e.g. owner keys)
|
||||
and a separated part that contains data useful for auditing and building confidence in the validity of a transaction
|
||||
(e.g. amounts).
|
||||
* Explorations of improved time handling, and how best to express temporal logic in the contract API/DSL.
|
||||
|
||||
JVM adaptations:
|
||||
|
||||
* Implement a sandbox and packaging system for contract logic. Contracts should be distributable through the network
|
||||
layer.
|
||||
* Experiment with modifications to HotSpot to allow for safely killing threads (i.e. fixing the issues that make
|
||||
Thread.stop() unsafe to use), and to measure and enforce runtime limits to handle runaway code.
|
||||
|
4
docs/build/html/_static/css/custom.css
vendored
4
docs/build/html/_static/css/custom.css
vendored
@ -28,4 +28,8 @@
|
||||
|
||||
.wy-nav-content {
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 100%; /* Get rid of RTD rule that assumes nobody changes their browser font size */
|
||||
}
|
811
docs/build/html/api/alltypes/index.html
vendored
811
docs/build/html/api/alltypes/index.html
vendored
@ -1,811 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>alltypes - </title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<h3>All Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.utilities/-a-n-s-i-progress-renderer/index.html">core.utilities.ANSIProgressRenderer</a></td>
|
||||
<td>
|
||||
<p>Knows how to render a <a href="../core.utilities/-progress-tracker/index.html">ProgressTracker</a> to the terminal using coloured, emoji-fied output. Useful when writing small
|
||||
command line tools, demos, tests etc. Just set the <a href="../core.utilities/-a-n-s-i-progress-renderer/progress-tracker.html">progressTracker</a> field and it will go ahead and start drawing
|
||||
if the terminal supports it. Otherwise it just prints out the name of the step whenever it changes.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node/-abstract-node/index.html">core.node.AbstractNode</a></td>
|
||||
<td>
|
||||
<p>A base node implementation that can be customised either for production (with real implementations that do real
|
||||
I/O), or a mock implementation suitable for unit test environments.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-all-possible-recipients.html">core.messaging.AllPossibleRecipients</a></td>
|
||||
<td>
|
||||
<p>A special base class for the set of all possible recipients, without having to identify who they all are.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-amount/index.html">core.Amount</a></td>
|
||||
<td>
|
||||
<p>Amount represents a positive quantity of currency, measured in pennies, which are the smallest representable units.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-artemis-messaging-service/index.html">core.node.services.ArtemisMessagingService</a></td>
|
||||
<td>
|
||||
<p>This class implements the <a href="../core.messaging/-messaging-service/index.html">MessagingService</a> API using Apache Artemis, the successor to their ActiveMQ product.
|
||||
Artemis is a message queue broker and here, we embed the entire server inside our own process. Nodes communicate
|
||||
with each other using (by default) an Artemis specific protocol, but it supports other protocols like AQMP/1.0
|
||||
as well.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-attachment/index.html">core.Attachment</a></td>
|
||||
<td>
|
||||
<p>An attachment is a ZIP (or an optionally signed JAR) that contains one or more files. Attachments are meant to
|
||||
contain public static data which can be referenced from transactions and utilised from contracts. Good examples
|
||||
of how attachments are meant to be used include:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.servlets/-attachment-download-servlet/index.html">core.node.servlets.AttachmentDownloadServlet</a></td>
|
||||
<td>
|
||||
<p>Allows the node administrator to either download full attachment zips, or individual files within those zips.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-attachment-storage/index.html">core.node.services.AttachmentStorage</a></td>
|
||||
<td>
|
||||
<p>An attachment store records potentially large binary objects, identified by their hash. Note that attachments are
|
||||
immutable and can never be erased once inserted</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.servlets/-attachment-upload-servlet/index.html">core.node.servlets.AttachmentUploadServlet</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-authenticated-object/index.html">core.AuthenticatedObject</a></td>
|
||||
<td>
|
||||
<p>Wraps an object that was signed by a public key, which may be a well known/recognised institutional key.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.utilities/-brief-log-formatter/index.html">core.utilities.BriefLogFormatter</a></td>
|
||||
<td>
|
||||
<p>A Java logging formatter that writes more compact output than the default.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/kotlin.-byte-array/index.html">kotlin.ByteArray</a> (extensions in package core.crypto)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.serialization/kotlin.-byte-array/index.html">kotlin.ByteArray</a> (extensions in package core.serialization)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../contracts/-cash/index.html">contracts.Cash</a></td>
|
||||
<td>
|
||||
<p>A cash transaction may split and merge money represented by a set of (issuer, depositRef) pairs, across multiple
|
||||
input and output states. Imagine a Bitcoin transaction but in which all UTXOs had a colour
|
||||
(a blend of issuer+depositRef) and you couldnt merge outputs of two colours together, but you COULD put them in
|
||||
the same transaction.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-command/index.html">core.Command</a></td>
|
||||
<td>
|
||||
<p>Command data/content plus pubkey pair: the signature is stored at the end of the serialized bytes</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-command-data.html">core.CommandData</a></td>
|
||||
<td>
|
||||
<p>Marker interface for classes that represent commands</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../contracts/-commercial-paper/index.html">contracts.CommercialPaper</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node/-configuration-exception/index.html">core.node.ConfigurationException</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-contract/index.html">core.Contract</a></td>
|
||||
<td>
|
||||
<p>Implemented by a program that implements business logic on the shared ledger. All participants run this code for
|
||||
every <a href="../core/-ledger-transaction/index.html">LedgerTransaction</a> they see on the network, for every input and output state. All contracts must accept the
|
||||
transaction for it to be accepted: failure of any aborts the entire thing. The time is taken from a trusted
|
||||
timestamp attached to the transaction itself i.e. it is NOT necessarily the current time.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-contract-factory/index.html">core.ContractFactory</a></td>
|
||||
<td>
|
||||
<p>A contract factory knows how to lazily load and instantiate contract objects.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-contract-state/index.html">core.ContractState</a></td>
|
||||
<td>
|
||||
<p>A contract state (or just "state") contains opaque data used by a contract program. It can be thought of as a disk
|
||||
file that the program can use to persist data across transactions. States are immutable: once created they are never
|
||||
updated, instead, any changes must generate a new successor state.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../contracts/-crowd-fund/index.html">contracts.CrowdFund</a></td>
|
||||
<td>
|
||||
<p>This is a basic crowd funding contract. It allows a party to create a funding opportunity, then for others to
|
||||
pledge during the funding period , and then for the party to either accept the funding (if the target has been reached)
|
||||
return the funds to the pledge-makers (if the target has not been reached).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-data-vending-service/index.html">core.node.services.DataVendingService</a></td>
|
||||
<td>
|
||||
<p>This class sets up network message handlers for requests from peers for data keyed by hash. It is a piece of simple
|
||||
glue that sits between the network layer and the database layer.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/-digital-signature/index.html">core.crypto.DigitalSignature</a></td>
|
||||
<td>
|
||||
<p>A wrapper around a digital signature. The covering field is a generic tag usable by whatever is interpreting the
|
||||
signature. It isnt used currently, but experience from Bitcoin suggests such a feature is useful, especially when
|
||||
building partially signed transactions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/kotlin.-double/index.html">kotlin.Double</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../contracts/-dummy-contract/index.html">contracts.DummyContract</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/-dummy-public-key/index.html">core.crypto.DummyPublicKey</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-dummy-timestamping-authority/index.html">core.node.services.DummyTimestampingAuthority</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-e2-e-test-key-management-service/index.html">core.node.services.E2ETestKeyManagementService</a></td>
|
||||
<td>
|
||||
<p>A simple in-memory KMS that doesnt bother saving keys to disk. A real implementation would:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.utilities/-emoji/index.html">core.utilities.Emoji</a></td>
|
||||
<td>
|
||||
<p>A simple wrapper class that contains icons and support for printing them only when were connected to a terminal.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../protocols/-fetch-attachments-protocol/index.html">protocols.FetchAttachmentsProtocol</a></td>
|
||||
<td>
|
||||
<p>Given a set of hashes either loads from from local storage or requests them from the other peer. Downloaded
|
||||
attachments are saved to local storage automatically.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../protocols/-fetch-data-protocol/index.html">protocols.FetchDataProtocol</a></td>
|
||||
<td>
|
||||
<p>An abstract protocol for fetching typed data from a remote peer.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../protocols/-fetch-transactions-protocol/index.html">protocols.FetchTransactionsProtocol</a></td>
|
||||
<td>
|
||||
<p>Given a set of tx hashes (IDs), either loads them from local disk or asks the remote peer to provide them.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-fixed-identity-service/index.html">core.node.services.FixedIdentityService</a></td>
|
||||
<td>
|
||||
<p>Scaffolding: a dummy identity service that just expects to have identities loaded off disk or found elsewhere.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-identity-service/index.html">core.node.services.IdentityService</a></td>
|
||||
<td>
|
||||
<p>An identity service maintains an bidirectional map of <a href="../core/-party/index.html">Party</a>s to their associated public keys and thus supports
|
||||
lookup of a party given its key. This is obviously very incomplete and does not reflect everything a real identity
|
||||
service would provide.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.serialization/-immutable-class-serializer/index.html">core.serialization.ImmutableClassSerializer</a></td>
|
||||
<td>
|
||||
<p>Serializes properties and deserializes by using the constructor. This assumes that all backed properties are
|
||||
set via the constructor and the class is immutable.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../contracts/-insufficient-balance-exception/index.html">contracts.InsufficientBalanceException</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/kotlin.-int/index.html">kotlin.Int</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/kotlin.collections.-iterable/index.html">kotlin.collections.Iterable</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../contracts/kotlin.collections.-iterable/index.html">kotlin.collections.Iterable</a> (extensions in package contracts)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-key-management-service/index.html">core.node.services.KeyManagementService</a></td>
|
||||
<td>
|
||||
<p>The KMS is responsible for storing and using private keys to sign things. An implementation of this may, for example,
|
||||
call out to a hardware security module that enforces various auditing and frequency-of-use requirements.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/java.security.-key-pair/index.html">java.security.KeyPair</a> (extensions in package core.crypto)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-ledger-transaction/index.html">core.LedgerTransaction</a></td>
|
||||
<td>
|
||||
<p>A LedgerTransaction wraps the data needed to calculate one or more successor states from a set of input states.
|
||||
It is the first step after extraction from a WireTransaction. The signatures at this point have been lined up
|
||||
with the commands from the wire, and verified/looked up.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-legally-identifiable-node/index.html">core.messaging.LegallyIdentifiableNode</a></td>
|
||||
<td>
|
||||
<p>Info about a network node that has is operated by some sort of verified identity.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/kotlin.collections.-list/index.html">kotlin.collections.List</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-message/index.html">core.messaging.Message</a></td>
|
||||
<td>
|
||||
<p>A message is defined, at this level, to be a (topic, timestamp, byte arrays) triple, where the topic is a string in
|
||||
Java-style reverse dns form, with "platform." being a prefix reserved by the platform for its own use. Vendor
|
||||
specific messages can be defined, but use your domain name as the prefix e.g. "uk.co.bigbank.messages.SomeMessage".</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-message-handler-registration.html">core.messaging.MessageHandlerRegistration</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-message-recipient-group.html">core.messaging.MessageRecipientGroup</a></td>
|
||||
<td>
|
||||
<p>A base class for a set of recipients specifically identified by the sender.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-message-recipients.html">core.messaging.MessageRecipients</a></td>
|
||||
<td>
|
||||
<p>The interface for a group of message recipients (which may contain only one recipient)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-messaging-service/index.html">core.messaging.MessagingService</a></td>
|
||||
<td>
|
||||
<p>A <a href="../core.messaging/-messaging-service/index.html">MessagingService</a> sits at the boundary between a message routing / networking layer and the core platform code.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-messaging-service-builder/index.html">core.messaging.MessagingServiceBuilder</a></td>
|
||||
<td>
|
||||
<p>This class lets you start up a <a href="../core.messaging/-messaging-service/index.html">MessagingService</a>. Its purpose is to stop you from getting access to the methods
|
||||
on the messaging service interface until you have successfully started up the system. One of these objects should
|
||||
be the only way to obtain a reference to a <a href="../core.messaging/-messaging-service/index.html">MessagingService</a>. Startup may be a slow process: some implementations
|
||||
may let you cast the returned future to an object that lets you get status info.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-mock-network-map/index.html">core.messaging.MockNetworkMap</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-named-by-hash/index.html">core.NamedByHash</a></td>
|
||||
<td>
|
||||
<p>Implemented by anything that can be named by a secure hash value (e.g. transactions, attachments).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-network-map/index.html">core.messaging.NetworkMap</a></td>
|
||||
<td>
|
||||
<p>A network map contains lists of nodes on the network along with information about their identity keys, services
|
||||
they provide and host names or IP addresses where they can be connected to. A reasonable architecture for the
|
||||
network map service might be one like the Tor directory authorities, where several nodes linked by RAFT or Paxos
|
||||
elect a leader and that leader distributes signed documents describing the network layout. Those documents can
|
||||
then be cached by every node and thus a network map can be retrieved given only a single successful peer connection.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node/-node/index.html">core.node.Node</a></td>
|
||||
<td>
|
||||
<p>A Node manages a standalone server that takes part in the P2P network. It creates the services found in <a href="#">ServiceHub</a>,
|
||||
loads important data off disk and starts listening for connections.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-node-attachment-service/index.html">core.node.services.NodeAttachmentService</a></td>
|
||||
<td>
|
||||
<p>Stores attachments in the specified local directory, which must exist. Doesnt allow new attachments to be uploaded.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node/-node-configuration/index.html">core.node.NodeConfiguration</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node/-node-configuration-from-properties/index.html">core.node.NodeConfigurationFromProperties</a></td>
|
||||
<td>
|
||||
<p>A simple wrapper around a plain old Java .properties file. The keys have the same name as in the source code.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-node-timestamper-service/index.html">core.node.services.NodeTimestamperService</a></td>
|
||||
<td>
|
||||
<p>This class implements the server side of the timestamping protocol, using the local clock. A future version might
|
||||
add features like checking against other NTP servers to make sure the clock hasnt drifted by too much.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-node-wallet-service/index.html">core.node.services.NodeWalletService</a></td>
|
||||
<td>
|
||||
<p>This class implements a simple, in memory wallet that tracks states that are owned by us, and also has a convenience
|
||||
method to auto-generate some self-issued cash states that can be used for test trading. A real wallet would persist
|
||||
states relevant to us into a database and once such a wallet is implemented, this scaffolding can be removed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/-null-public-key/index.html">core.crypto.NullPublicKey</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.serialization/-opaque-bytes/index.html">core.serialization.OpaqueBytes</a></td>
|
||||
<td>
|
||||
<p>A simple class that wraps a byte array and makes the equals/hashCode/toString methods work as you actually expect.
|
||||
In an ideal JVM this would be a value type and be completely overhead free. Project Valhalla is adding such
|
||||
functionality to Java, but it wont arrive for a few years yet</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-ownable-state/index.html">core.OwnableState</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-party/index.html">core.Party</a></td>
|
||||
<td>
|
||||
<p>A <a href="../core/-party/index.html">Party</a> is well known (name, pubkey) pair. In a real system this would probably be an X.509 certificate.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-party-reference/index.html">core.PartyReference</a></td>
|
||||
<td>
|
||||
<p>Reference to something being stored or issued by a party e.g. in a vault or (more likely) on their normal
|
||||
ledger. The reference is intended to be encrypted so its meaningless to anyone other than the party.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/java.nio.file.-path/index.html">java.nio.file.Path</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/java.security.-private-key/index.html">java.security.PrivateKey</a> (extensions in package core.crypto)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.utilities/-progress-tracker/index.html">core.utilities.ProgressTracker</a></td>
|
||||
<td>
|
||||
<p>A progress tracker helps surface information about the progress of an operation to a user interface or API of some
|
||||
kind. It lets you define a set of <emph>steps</emph> that represent an operation. A step is represented by an object (typically
|
||||
a singleton).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.protocols/-protocol-logic/index.html">core.protocols.ProtocolLogic</a></td>
|
||||
<td>
|
||||
<p>A sub-class of <a href="../core.protocols/-protocol-logic/index.html">ProtocolLogic</a> implements a protocol flow using direct, straight line blocking code. Thus you
|
||||
can write complex protocol logic in an ordinary fashion, without having to think about callbacks, restarting after
|
||||
a node crash, how many instances of your protocol there are running and so on.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.protocols/-protocol-state-machine/index.html">core.protocols.ProtocolStateMachine</a></td>
|
||||
<td>
|
||||
<p>A ProtocolStateMachine instance is a suspendable fiber that delegates all actual logic to a <a href="../core.protocols/-protocol-logic/index.html">ProtocolLogic</a> instance.
|
||||
For any given flow there is only one PSM, even if that protocol invokes subprotocols.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/java.security.-public-key/index.html">java.security.PublicKey</a> (extensions in package core.crypto)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-requirements/index.html">core.Requirements</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../protocols/-resolve-transactions-protocol/index.html">protocols.ResolveTransactionsProtocol</a></td>
|
||||
<td>
|
||||
<p>This protocol fetches each transaction identified by the given hashes from either disk or network, along with all
|
||||
their dependencies, and verifies them together using a single <a href="../core/-transaction-group/index.html">TransactionGroup</a>. If no exception is thrown, then
|
||||
all the transactions have been successfully verified and inserted into the local database.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.crypto/-secure-hash/index.html">core.crypto.SecureHash</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.serialization/-serialized-bytes/index.html">core.serialization.SerializedBytes</a></td>
|
||||
<td>
|
||||
<p>A type safe wrapper around a byte array that contains a serialised object. You can call <a href="../core.serialization/kotlin.-byte-array/deserialize.html">SerializedBytes.deserialize</a>
|
||||
to get the original object back.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-service-hub/index.html">core.node.services.ServiceHub</a></td>
|
||||
<td>
|
||||
<p>A service hub simply vends references to the other services a node has. Some of those services may be missing or
|
||||
mocked out. This class is useful to pass to chunks of pluggable code that might have need of many different kinds of
|
||||
functionality and you dont want to hard-code which types in the interface.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-signed-transaction/index.html">core.SignedTransaction</a></td>
|
||||
<td>
|
||||
<p>Container for a <a href="../core/-wire-transaction/index.html">WireTransaction</a> and attached signatures.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-single-message-recipient.html">core.messaging.SingleMessageRecipient</a></td>
|
||||
<td>
|
||||
<p>A base class for the case of point-to-point messages</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-state-and-ref/index.html">core.StateAndRef</a></td>
|
||||
<td>
|
||||
<p>A StateAndRef is simply a (state, ref) pair. For instance, a wallet (which holds available assets) contains these.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-state-machine-manager/index.html">core.messaging.StateMachineManager</a></td>
|
||||
<td>
|
||||
<p>A StateMachineManager is responsible for coordination and persistence of multiple <a href="../core.protocols/-protocol-state-machine/index.html">ProtocolStateMachine</a> objects.
|
||||
Each such object represents an instantiation of a (two-party) protocol that has reached a particular point.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-state-ref/index.html">core.StateRef</a></td>
|
||||
<td>
|
||||
<p>A stateref is a pointer (reference) to a state, this is an equivalent of an "outpoint" in Bitcoin. It records which
|
||||
transaction defined the state and where in that transaction it was.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-storage-service/index.html">core.node.services.StorageService</a></td>
|
||||
<td>
|
||||
<p>A sketch of an interface to a simple key/value storage system. Intended for persistence of simple blobs like
|
||||
transactions, serialised protocol state machines and so on. Again, this isnt intended to imply lack of SQL or
|
||||
anything like that, this interface is only big enough to support the prototyping work.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/kotlin.-string/index.html">kotlin.String</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/java.time.temporal.-temporal/index.html">java.time.temporal.Temporal</a> (extensions in package core)</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-thread-box/index.html">core.ThreadBox</a></td>
|
||||
<td>
|
||||
<p>A threadbox is a simple utility that makes it harder to forget to take a lock before accessing some shared state.
|
||||
Simply define a private class to hold the data that must be grouped under the same lock, and then pass the only
|
||||
instance to the ThreadBox constructor. You can now use the <a href="../core/-thread-box/locked.html">locked</a> method with a lambda to take the lock in a
|
||||
way that ensures itll be released if theres an exception.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-timestamp-command/index.html">core.TimestampCommand</a></td>
|
||||
<td>
|
||||
<p>If present in a transaction, contains a time that was verified by the timestamping authority/authorities whose
|
||||
public keys are identified in the containing <a href="../core/-command/index.html">Command</a> object. The true time must be between (after, before)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-timestamper-service/index.html">core.node.services.TimestamperService</a></td>
|
||||
<td>
|
||||
<p>Simple interface (for testing) to an abstract timestamping service. Note that this is not "timestamping" in the
|
||||
blockchain sense of a total ordering of transactions, but rather, a signature from a well known/trusted timestamping
|
||||
service over a transaction that indicates the timestamp in it is accurate. Such a signature may not always be
|
||||
necessary: if there are multiple parties involved in a transaction then they can cross-check the timestamp
|
||||
themselves.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-timestamping-error/index.html">core.node.services.TimestampingError</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../protocols/-timestamping-protocol/index.html">protocols.TimestampingProtocol</a></td>
|
||||
<td>
|
||||
<p>The TimestampingProtocol class is the client code that talks to a <a href="../core.node.services/-node-timestamper-service/index.html">NodeTimestamperService</a> on some remote node. It is a
|
||||
<a href="../core.protocols/-protocol-logic/index.html">ProtocolLogic</a>, meaning it can either be a sub-protocol of some other protocol, or be driven independently.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.messaging/-topic-string-validator/index.html">core.messaging.TopicStringValidator</a></td>
|
||||
<td>
|
||||
<p>A singleton thats useful for validating topic strings</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../demos/-trader-demo-protocol-buyer/index.html">demos.TraderDemoProtocolBuyer</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../demos/-trader-demo-protocol-seller/index.html">demos.TraderDemoProtocolSeller</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-builder/index.html">core.TransactionBuilder</a></td>
|
||||
<td>
|
||||
<p>A mutable transaction thats in the process of being built, before all signatures are present.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-conflict-exception/index.html">core.TransactionConflictException</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-for-verification/index.html">core.TransactionForVerification</a></td>
|
||||
<td>
|
||||
<p>A transaction in fully resolved and sig-checked form, ready for passing as input to a verification function.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-graph-search/index.html">core.TransactionGraphSearch</a></td>
|
||||
<td>
|
||||
<p>Given a map of transaction id to <a href="../core/-signed-transaction/index.html">SignedTransaction</a>, performs a breadth first search of the dependency graph from
|
||||
the starting point down in order to find transactions that match the given query criteria.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-group/index.html">core.TransactionGroup</a></td>
|
||||
<td>
|
||||
<p>A TransactionGroup defines a directed acyclic graph of transactions that can be resolved with each other and then
|
||||
verified. Successful verification does not imply the non-existence of other conflicting transactions: simply that
|
||||
this subgraph does not contain conflicts and is accepted by the involved contracts.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-resolution-exception/index.html">core.TransactionResolutionException</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transaction-verification-exception/index.html">core.TransactionVerificationException</a></td>
|
||||
<td>
|
||||
<p>Thrown if a verification fails due to a contract rejection.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-transient-property/index.html">core.TransientProperty</a></td>
|
||||
<td>
|
||||
<p>A simple wrapper that enables the use of Kotlins "val x by TransientProperty { ... }" syntax. Such a property
|
||||
will not be serialized to disk, and if its missing (or the first time its accessed), the initializer will be
|
||||
used to set it up. Note that the initializer will be called with the TransientProperty object locked.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../protocols/-two-party-trade-protocol/index.html">protocols.TwoPartyTradeProtocol</a></td>
|
||||
<td>
|
||||
<p>This asset trading protocol implements a "delivery vs payment" type swap. It has two parties (B and S for buyer
|
||||
and seller) and the following steps:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-type-only-command-data/index.html">core.TypeOnlyCommandData</a></td>
|
||||
<td>
|
||||
<p>Commands that inherit from this are intended to have no data items: its only their presence that matters.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-unknown-contract-exception/index.html">core.UnknownContractException</a></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.utilities/-untrustworthy-data/index.html">core.utilities.UntrustworthyData</a></td>
|
||||
<td>
|
||||
<p>A small utility to approximate taint tracking: if a method gives you back one of these, it means the data came from
|
||||
a remote source that may be incentivised to pass us junk that violates basic assumptions and thus must be checked
|
||||
first. The wrapper helps you to avoid forgetting this vital step. Things you might want to check are:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-wallet/index.html">core.node.services.Wallet</a></td>
|
||||
<td>
|
||||
<p>A wallet (name may be temporary) wraps a set of states that are useful for us to keep track of, for instance,
|
||||
because we own them. This class represents an immutable, stable state of a wallet: it is guaranteed not to
|
||||
change out from underneath you, even though the canonical currently-best-known wallet may change as we learn
|
||||
about new transactions from our peers and generate new transactions that consume states ourselves.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core.node.services/-wallet-service/index.html">core.node.services.WalletService</a></td>
|
||||
<td>
|
||||
<p>A <a href="../core.node.services/-wallet-service/index.html">WalletService</a> is responsible for securely and safely persisting the current state of a wallet to storage. The
|
||||
wallet service vends immutable snapshots of the current wallet for working with: if you build a transaction based
|
||||
on a wallet that isnt current, be aware that it may end up being invalid if the states that were used have been
|
||||
consumed by someone else first</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../core/-wire-transaction/index.html">core.WireTransaction</a></td>
|
||||
<td>
|
||||
<p>Transaction ready for serialisation, without any signatures attached.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CASH_PROGRAM_ID - </title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="index.html">contracts</a> / <a href=".">CASH_PROGRAM_ID</a><br/>
|
||||
<br/>
|
||||
<h1>CASH_PROGRAM_ID</h1>
|
||||
<a name="contracts$CASH_PROGRAM_ID"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">CASH_PROGRAM_ID</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,34 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CP_PROGRAM_ID - </title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="index.html">contracts</a> / <a href=".">CP_PROGRAM_ID</a><br/>
|
||||
<br/>
|
||||
<h1>CP_PROGRAM_ID</h1>
|
||||
<a name="contracts$CP_PROGRAM_ID"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">CP_PROGRAM_ID</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<p>This is an ultra-trivial implementation of commercial paper, which is essentially a simpler version of a corporate
|
||||
bond. It can be seen as a company-specific currency. A company issues CP with a particular face value, say $100,
|
||||
but sells it for less, say $90. The paper can be redeemed for cash at a given date in the future. Thus this example
|
||||
would have a 10% interest rate with a single repayment. Commercial paper is often rolled over (the maturity date
|
||||
is adjusted as if the paper was redeemed and immediately repurchased, but without having to front the cash).</p>
|
||||
<p>This contract is not intended to realistically model CP. It is here only to act as a next step up above cash in
|
||||
the prototyping phase. It is thus very incomplete.</p>
|
||||
<p>Open issues:</p>
|
||||
<ul><li><p>In this model, you cannot merge or split CP. Can you do this normally? We could model CP as a specialised form
|
||||
of cash, or reuse some of the cash code? Waiting on response from Ayoub and Rajar about whether CP can always
|
||||
be split/merged or only in secondary markets. Even if current systems cant do this, would it be a desirable
|
||||
feature to have anyway?</p>
|
||||
</li><li><p>The funding steps of CP is totally ignored in this model.</p>
|
||||
</li><li><p>No attention is paid to the existing roles of custodians, funding banks, etc.</p>
|
||||
</li><li><p>There are regional variations on the CP concept, for instance, American CP requires a special "CUSIP number"
|
||||
which may need to be tracked. That, in turn, requires validation logic (there is a bean validator that knows how
|
||||
to do this in the Apache BVal project).</p>
|
||||
</li></ul><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CROWDFUND_PROGRAM_ID - </title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="index.html">contracts</a> / <a href=".">CROWDFUND_PROGRAM_ID</a><br/>
|
||||
<br/>
|
||||
<h1>CROWDFUND_PROGRAM_ID</h1>
|
||||
<a name="contracts$CROWDFUND_PROGRAM_ID"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">CROWDFUND_PROGRAM_ID</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,16 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Exit.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href="index.html">Exit</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Exit</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.Commands.Exit$<init>(core.Amount)/amount">amount</span><span class="symbol">:</span> <a href="../../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span></code><br/>
|
||||
<p>A command stating that money has been withdrawn from the shared ledger and is now accounted for
|
||||
in some other way.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Exit.amount - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href="index.html">Exit</a> / <a href=".">amount</a><br/>
|
||||
<br/>
|
||||
<h1>amount</h1>
|
||||
<a name="contracts.Cash.Commands.Exit$amount"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">amount</span><span class="symbol">: </span><a href="../../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,40 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Exit - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href=".">Exit</a><br/>
|
||||
<br/>
|
||||
<h1>Exit</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Exit</span> <span class="symbol">:</span> <a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<p>A command stating that money has been withdrawn from the shared ledger and is now accounted for
|
||||
in some other way.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Exit</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.Commands.Exit$<init>(core.Amount)/amount">amount</span><span class="symbol">:</span> <a href="../../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span></code><p>A command stating that money has been withdrawn from the shared ledger and is now accounted for
|
||||
in some other way.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="amount.html">amount</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">amount</span><span class="symbol">: </span><a href="../../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,16 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Issue.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href="index.html">Issue</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Issue</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.Commands.Issue$<init>(kotlin.Long)/nonce">nonce</span><span class="symbol">:</span> <span class="identifier">Long</span> <span class="symbol">=</span> SecureRandom.getInstanceStrong().nextLong()<span class="symbol">)</span></code><br/>
|
||||
<p>Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
has a unique ID even when there are no inputs.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,40 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Issue - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href=".">Issue</a><br/>
|
||||
<br/>
|
||||
<h1>Issue</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Issue</span> <span class="symbol">:</span> <a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<p>Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
has a unique ID even when there are no inputs.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Issue</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.Commands.Issue$<init>(kotlin.Long)/nonce">nonce</span><span class="symbol">:</span> <span class="identifier">Long</span> <span class="symbol">=</span> SecureRandom.getInstanceStrong().nextLong()<span class="symbol">)</span></code><p>Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
has a unique ID even when there are no inputs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="nonce.html">nonce</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">nonce</span><span class="symbol">: </span><span class="identifier">Long</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Issue.nonce - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href="index.html">Issue</a> / <a href=".">nonce</a><br/>
|
||||
<br/>
|
||||
<h1>nonce</h1>
|
||||
<a name="contracts.Cash.Commands.Issue$nonce"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">nonce</span><span class="symbol">: </span><span class="identifier">Long</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Move.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href="index.html">Move</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Move</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands.Move - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">Cash</a> / <a href="../index.html">Commands</a> / <a href=".">Move</a><br/>
|
||||
<br/>
|
||||
<h1>Move</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Move</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Move</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,68 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.Commands - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href=".">Commands</a><br/>
|
||||
<br/>
|
||||
<h1>Commands</h1>
|
||||
<code><span class="keyword">interface </span><span class="identifier">Commands</span> <span class="symbol">:</span> <a href="../../../core/-command-data.html"><span class="identifier">CommandData</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-exit/index.html">Exit</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Exit</span> <span class="symbol">:</span> <span class="identifier">Commands</span></code><p>A command stating that money has been withdrawn from the shared ledger and is now accounted for
|
||||
in some other way.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-issue/index.html">Issue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Issue</span> <span class="symbol">:</span> <span class="identifier">Commands</span></code><p>Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
has a unique ID even when there are no inputs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-move/index.html">Move</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Move</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inheritors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-exit/index.html">Exit</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Exit</span> <span class="symbol">:</span> <span class="identifier">Commands</span></code><p>A command stating that money has been withdrawn from the shared ledger and is now accounted for
|
||||
in some other way.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-issue/index.html">Issue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Issue</span> <span class="symbol">:</span> <span class="identifier">Commands</span></code><p>Allows new cash states to be issued into existence: the nonce ("number used once") ensures the transaction
|
||||
has a unique ID even when there are no inputs.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-move/index.html">Move</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Move</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
25
docs/build/html/api/contracts/-cash/-init-.html
vendored
25
docs/build/html/api/contracts/-cash/-init-.html
vendored
@ -1,25 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.<init> - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">Cash</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Cash</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<p>A cash transaction may split and merge money represented by a set of (issuer, depositRef) pairs, across multiple
|
||||
input and output states. Imagine a Bitcoin transaction but in which all UTXOs had a colour
|
||||
(a blend of issuer+depositRef) and you couldnt merge outputs of two colours together, but you COULD put them in
|
||||
the same transaction.</p>
|
||||
<p>The goal of this design is to ensure that money can be withdrawn from the ledger easily: if you receive some money
|
||||
via this contract, you always know where to go in order to extract it from the R3 ledger, no matter how many hands
|
||||
it has passed through in the intervening time.</p>
|
||||
<p>At the same time, other contracts that just want money and dont care much who is currently holding it in their
|
||||
vaults can ignore the issuer/depositRefs and just examine the amount fields.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">State</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.State$<init>(core.PartyReference, core.Amount, java.security.PublicKey)/deposit">deposit</span><span class="symbol">:</span> <a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash.State$<init>(core.PartyReference, core.Amount, java.security.PublicKey)/amount">amount</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash.State$<init>(core.PartyReference, core.Amount, java.security.PublicKey)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span></code><br/>
|
||||
<p>A state representing a cash claim against some party</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.amount - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href=".">amount</a><br/>
|
||||
<br/>
|
||||
<h1>amount</h1>
|
||||
<a name="contracts.Cash.State$amount"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">amount</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,16 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.deposit - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href=".">deposit</a><br/>
|
||||
<br/>
|
||||
<h1>deposit</h1>
|
||||
<a name="contracts.Cash.State$deposit"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">deposit</span><span class="symbol">: </span><a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a></code><br/>
|
||||
<p>Where the underlying currency backing this ledger entry can be found (propagated)</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,79 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href=".">State</a><br/>
|
||||
<br/>
|
||||
<h1>State</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">State</span> <span class="symbol">:</span> <a href="../../../core/-ownable-state/index.html"><span class="identifier">OwnableState</span></a></code><br/>
|
||||
<p>A state representing a cash claim against some party</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">State</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.State$<init>(core.PartyReference, core.Amount, java.security.PublicKey)/deposit">deposit</span><span class="symbol">:</span> <a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash.State$<init>(core.PartyReference, core.Amount, java.security.PublicKey)/amount">amount</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash.State$<init>(core.PartyReference, core.Amount, java.security.PublicKey)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span></code><p>A state representing a cash claim against some party</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="amount.html">amount</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">amount</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="deposit.html">deposit</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">deposit</span><span class="symbol">: </span><a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a></code><p>Where the underlying currency backing this ledger entry can be found (propagated)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="owner.html">owner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code><p>There must be a MoveCommand signed by this key to claim the amount</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="program-ref.html">programRef</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">programRef</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><p>Refers to a bytecode program that has previously been published to the network. This contract program
|
||||
will be executed any time this state is used in an input. It must accept in order for the
|
||||
transaction to proceed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="to-string.html">toString</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">toString</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="with-new-owner.html">withNewOwner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withNewOwner</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.State$withNewOwner(java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><p>Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,17 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.owner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href=".">owner</a><br/>
|
||||
<br/>
|
||||
<h1>owner</h1>
|
||||
<a name="contracts.Cash.State$owner"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code><br/>
|
||||
Overrides <a href="../../../core/-ownable-state/owner.html">OwnableState.owner</a><br/>
|
||||
<p>There must be a MoveCommand signed by this key to claim the amount</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,19 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.programRef - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href=".">programRef</a><br/>
|
||||
<br/>
|
||||
<h1>programRef</h1>
|
||||
<a name="contracts.Cash.State$programRef"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">programRef</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
Overrides <a href="../../../core/-contract-state/program-ref.html">ContractState.programRef</a><br/>
|
||||
<p>Refers to a bytecode program that has previously been published to the network. This contract program
|
||||
will be executed any time this state is used in an input. It must accept in order for the
|
||||
transaction to proceed.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.toString - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href=".">toString</a><br/>
|
||||
<br/>
|
||||
<h1>toString</h1>
|
||||
<a name="contracts.Cash.State$toString()"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">toString</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,17 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.State.withNewOwner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">Cash</a> / <a href="index.html">State</a> / <a href=".">withNewOwner</a><br/>
|
||||
<br/>
|
||||
<h1>withNewOwner</h1>
|
||||
<a name="contracts.Cash.State$withNewOwner(java.security.PublicKey)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withNewOwner</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash.State$withNewOwner(java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
Overrides <a href="../../../core/-ownable-state/with-new-owner.html">OwnableState.withNewOwner</a><br/>
|
||||
<p>Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,16 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.generateIssue - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">Cash</a> / <a href=".">generateIssue</a><br/>
|
||||
<br/>
|
||||
<h1>generateIssue</h1>
|
||||
<a name="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateIssue</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/amount">amount</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/at">at</span><span class="symbol">:</span> <a href="../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
<p>Puts together an issuance transaction for the specified amount that starts out being owned by the given pubkey.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,22 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.generateSpend - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">Cash</a> / <a href=".">generateSpend</a><br/>
|
||||
<br/>
|
||||
<h1>generateSpend</h1>
|
||||
<a name="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateSpend</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/amount">amount</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/to">to</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/cashStates">cashStates</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/onlyFromParties">onlyFromParties</span><span class="symbol">:</span> <span class="identifier">Set</span><span class="symbol"><</span><a href="../../core/-party/index.html"><span class="identifier">Party</span></a><span class="symbol">></span><span class="symbol">?</span> <span class="symbol">=</span> null<span class="symbol">)</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol"><</span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">></span></code><br/>
|
||||
<p>Generate a transaction that consumes one or more of the given input states to move money to the given pubkey.
|
||||
Note that the wallet list is not updated: its up to you to do that.</p>
|
||||
<h3>Parameters</h3>
|
||||
<a name="onlyFromParties"></a>
|
||||
<code>onlyFromParties</code> - if non-null, the wallet will be filtered to only include cash states issued by the set
|
||||
of given parties. This can be useful if the party youre trying to pay has expectations
|
||||
about which type of cash claims they are willing to accept.<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
97
docs/build/html/api/contracts/-cash/index.html
vendored
97
docs/build/html/api/contracts/-cash/index.html
vendored
@ -1,97 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href=".">Cash</a><br/>
|
||||
<br/>
|
||||
<h1>Cash</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Cash</span> <span class="symbol">:</span> <a href="../../core/-contract/index.html"><span class="identifier">Contract</span></a></code><br/>
|
||||
<p>A cash transaction may split and merge money represented by a set of (issuer, depositRef) pairs, across multiple
|
||||
input and output states. Imagine a Bitcoin transaction but in which all UTXOs had a colour
|
||||
(a blend of issuer+depositRef) and you couldnt merge outputs of two colours together, but you COULD put them in
|
||||
the same transaction.</p>
|
||||
<p>The goal of this design is to ensure that money can be withdrawn from the ledger easily: if you receive some money
|
||||
via this contract, you always know where to go in order to extract it from the R3 ledger, no matter how many hands
|
||||
it has passed through in the intervening time.</p>
|
||||
<p>At the same time, other contracts that just want money and dont care much who is currently holding it in their
|
||||
vaults can ignore the issuer/depositRefs and just examine the amount fields.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-commands/index.html">Commands</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">interface </span><span class="identifier">Commands</span> <span class="symbol">:</span> <a href="../../core/-command-data.html"><span class="identifier">CommandData</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-state/index.html">State</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">State</span> <span class="symbol">:</span> <a href="../../core/-ownable-state/index.html"><span class="identifier">OwnableState</span></a></code><p>A state representing a cash claim against some party</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Cash</span><span class="symbol">(</span><span class="symbol">)</span></code><p>A cash transaction may split and merge money represented by a set of (issuer, depositRef) pairs, across multiple
|
||||
input and output states. Imagine a Bitcoin transaction but in which all UTXOs had a colour
|
||||
(a blend of issuer+depositRef) and you couldnt merge outputs of two colours together, but you COULD put them in
|
||||
the same transaction.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="legal-contract-reference.html">legalContractReference</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">legalContractReference</span><span class="symbol">: </span><a href="../../core.crypto/-secure-hash/index.html"><span class="identifier">SecureHash</span></a></code><p>TODO:</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-issue.html">generateIssue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateIssue</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/amount">amount</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/at">at</span><span class="symbol">:</span> <a href="../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateIssue(core.TransactionBuilder, core.Amount, core.PartyReference, java.security.PublicKey)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Puts together an issuance transaction for the specified amount that starts out being owned by the given pubkey.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-spend.html">generateSpend</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateSpend</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/amount">amount</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/to">to</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/cashStates">cashStates</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.Cash$generateSpend(core.TransactionBuilder, core.Amount, java.security.PublicKey, kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))), kotlin.collections.Set((core.Party)))/onlyFromParties">onlyFromParties</span><span class="symbol">:</span> <span class="identifier">Set</span><span class="symbol"><</span><a href="../../core/-party/index.html"><span class="identifier">Party</span></a><span class="symbol">></span><span class="symbol">?</span> <span class="symbol">=</span> null<span class="symbol">)</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol"><</span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">></span></code><p>Generate a transaction that consumes one or more of the given input states to move money to the given pubkey.
|
||||
Note that the wallet list is not updated: its up to you to do that.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="verify.html">verify</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">verify</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash$verify(core.TransactionForVerification)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-for-verification/index.html"><span class="identifier">TransactionForVerification</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>This is the function EVERYONE runs</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,25 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.legalContractReference - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">Cash</a> / <a href=".">legalContractReference</a><br/>
|
||||
<br/>
|
||||
<h1>legalContractReference</h1>
|
||||
<a name="contracts.Cash$legalContractReference"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">legalContractReference</span><span class="symbol">: </span><a href="../../core.crypto/-secure-hash/index.html"><span class="identifier">SecureHash</span></a></code><br/>
|
||||
Overrides <a href="../../core/-contract/legal-contract-reference.html">Contract.legalContractReference</a><br/>
|
||||
<p>TODO:</p>
|
||||
<ol><li><p>hash should be of the contents, not the URI</p>
|
||||
</li><li><p>allow the content to be specified at time of instance creation?</p>
|
||||
</li></ol><p>Motivation: its the difference between a state object referencing a programRef, which references a
|
||||
legalContractReference and a state object which directly references both. The latter allows the legal wording
|
||||
to evolve without requiring code changes. But creates a risk that users create objects governed by a program
|
||||
that is inconsistent with the legal contract</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
17
docs/build/html/api/contracts/-cash/verify.html
vendored
17
docs/build/html/api/contracts/-cash/verify.html
vendored
@ -1,17 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>Cash.verify - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">Cash</a> / <a href=".">verify</a><br/>
|
||||
<br/>
|
||||
<h1>verify</h1>
|
||||
<a name="contracts.Cash$verify(core.TransactionForVerification)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">verify</span><span class="symbol">(</span><span class="identifier" id="contracts.Cash$verify(core.TransactionForVerification)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-for-verification/index.html"><span class="identifier">TransactionForVerification</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
Overrides <a href="../../core/-contract/verify.html">Contract.verify</a><br/>
|
||||
<p>This is the function EVERYONE runs</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands.Issue.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CommercialPaper</a> / <a href="../index.html">Commands</a> / <a href="index.html">Issue</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Issue</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands.Issue - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CommercialPaper</a> / <a href="../index.html">Commands</a> / <a href=".">Issue</a><br/>
|
||||
<br/>
|
||||
<h1>Issue</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Issue</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Issue</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands.Move.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CommercialPaper</a> / <a href="../index.html">Commands</a> / <a href="index.html">Move</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Move</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands.Move - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CommercialPaper</a> / <a href="../index.html">Commands</a> / <a href=".">Move</a><br/>
|
||||
<br/>
|
||||
<h1>Move</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Move</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Move</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands.Redeem.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CommercialPaper</a> / <a href="../index.html">Commands</a> / <a href="index.html">Redeem</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Redeem</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands.Redeem - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CommercialPaper</a> / <a href="../index.html">Commands</a> / <a href=".">Redeem</a><br/>
|
||||
<br/>
|
||||
<h1>Redeem</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Redeem</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Redeem</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,60 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.Commands - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href=".">Commands</a><br/>
|
||||
<br/>
|
||||
<h1>Commands</h1>
|
||||
<code><span class="keyword">interface </span><span class="identifier">Commands</span> <span class="symbol">:</span> <a href="../../../core/-command-data.html"><span class="identifier">CommandData</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-issue/index.html">Issue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Issue</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-move/index.html">Move</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Move</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-redeem/index.html">Redeem</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Redeem</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inheritors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-issue/index.html">Issue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Issue</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-move/index.html">Move</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Move</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-redeem/index.html">Redeem</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Redeem</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.<init> - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CommercialPaper</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">CommercialPaper</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">State</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/issuance">issuance</span><span class="symbol">:</span> <a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/faceValue">faceValue</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/maturityDate">maturityDate</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.faceValue - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">faceValue</a><br/>
|
||||
<br/>
|
||||
<h1>faceValue</h1>
|
||||
<a name="contracts.CommercialPaper.State$faceValue"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">faceValue</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,112 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href=".">State</a><br/>
|
||||
<br/>
|
||||
<h1>State</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">State</span> <span class="symbol">:</span> <a href="../../../core/-ownable-state/index.html"><span class="identifier">OwnableState</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">State</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/issuance">issuance</span><span class="symbol">:</span> <a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/faceValue">faceValue</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper.State$<init>(core.PartyReference, java.security.PublicKey, core.Amount, java.time.Instant)/maturityDate">maturityDate</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="face-value.html">faceValue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">faceValue</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="issuance.html">issuance</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">issuance</span><span class="symbol">: </span><a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="maturity-date.html">maturityDate</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">maturityDate</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="owner.html">owner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code><p>There must be a MoveCommand signed by this key to claim the amount</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="program-ref.html">programRef</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">programRef</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><p>Refers to a bytecode program that has previously been published to the network. This contract program
|
||||
will be executed any time this state is used in an input. It must accept in order for the
|
||||
transaction to proceed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="to-string.html">toString</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">toString</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="with-face-value.html">withFaceValue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withFaceValue</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withFaceValue(core.Amount)/newFaceValue">newFaceValue</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="with-issuance.html">withIssuance</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withIssuance</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withIssuance(core.PartyReference)/newIssuance">newIssuance</span><span class="symbol">:</span> <a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="with-maturity-date.html">withMaturityDate</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withMaturityDate</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withMaturityDate(java.time.Instant)/newMaturityDate">newMaturityDate</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="with-new-owner.html">withNewOwner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withNewOwner</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withNewOwner(java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><p>Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="with-owner.html">withOwner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withOwner</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withOwner(java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="without-owner.html">withoutOwner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withoutOwner</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">State</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.issuance - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">issuance</a><br/>
|
||||
<br/>
|
||||
<h1>issuance</h1>
|
||||
<a name="contracts.CommercialPaper.State$issuance"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">issuance</span><span class="symbol">: </span><a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.maturityDate - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">maturityDate</a><br/>
|
||||
<br/>
|
||||
<h1>maturityDate</h1>
|
||||
<a name="contracts.CommercialPaper.State$maturityDate"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">maturityDate</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,17 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.owner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">owner</a><br/>
|
||||
<br/>
|
||||
<h1>owner</h1>
|
||||
<a name="contracts.CommercialPaper.State$owner"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code><br/>
|
||||
Overrides <a href="../../../core/-ownable-state/owner.html">OwnableState.owner</a><br/>
|
||||
<p>There must be a MoveCommand signed by this key to claim the amount</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,19 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.programRef - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">programRef</a><br/>
|
||||
<br/>
|
||||
<h1>programRef</h1>
|
||||
<a name="contracts.CommercialPaper.State$programRef"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">programRef</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
Overrides <a href="../../../core/-contract-state/program-ref.html">ContractState.programRef</a><br/>
|
||||
<p>Refers to a bytecode program that has previously been published to the network. This contract program
|
||||
will be executed any time this state is used in an input. It must accept in order for the
|
||||
transaction to proceed.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.toString - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">toString</a><br/>
|
||||
<br/>
|
||||
<h1>toString</h1>
|
||||
<a name="contracts.CommercialPaper.State$toString()"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">toString</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.withFaceValue - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">withFaceValue</a><br/>
|
||||
<br/>
|
||||
<h1>withFaceValue</h1>
|
||||
<a name="contracts.CommercialPaper.State$withFaceValue(core.Amount)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withFaceValue</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withFaceValue(core.Amount)/newFaceValue">newFaceValue</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.withIssuance - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">withIssuance</a><br/>
|
||||
<br/>
|
||||
<h1>withIssuance</h1>
|
||||
<a name="contracts.CommercialPaper.State$withIssuance(core.PartyReference)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withIssuance</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withIssuance(core.PartyReference)/newIssuance">newIssuance</span><span class="symbol">:</span> <a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.withMaturityDate - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">withMaturityDate</a><br/>
|
||||
<br/>
|
||||
<h1>withMaturityDate</h1>
|
||||
<a name="contracts.CommercialPaper.State$withMaturityDate(java.time.Instant)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withMaturityDate</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withMaturityDate(java.time.Instant)/newMaturityDate">newMaturityDate</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,17 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.withNewOwner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">withNewOwner</a><br/>
|
||||
<br/>
|
||||
<h1>withNewOwner</h1>
|
||||
<a name="contracts.CommercialPaper.State$withNewOwner(java.security.PublicKey)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withNewOwner</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withNewOwner(java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
Overrides <a href="../../../core/-ownable-state/with-new-owner.html">OwnableState.withNewOwner</a><br/>
|
||||
<p>Copies the underlying data structure, replacing the owner field with this new value and leaving the rest alone</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.withOwner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">withOwner</a><br/>
|
||||
<br/>
|
||||
<h1>withOwner</h1>
|
||||
<a name="contracts.CommercialPaper.State$withOwner(java.security.PublicKey)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withOwner</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper.State$withOwner(java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.State.withoutOwner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CommercialPaper</a> / <a href="index.html">State</a> / <a href=".">withoutOwner</a><br/>
|
||||
<br/>
|
||||
<h1>withoutOwner</h1>
|
||||
<a name="contracts.CommercialPaper.State$withoutOwner()"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">withoutOwner</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="index.html"><span class="identifier">State</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,18 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.generateIssue - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CommercialPaper</a> / <a href=".">generateIssue</a><br/>
|
||||
<br/>
|
||||
<h1>generateIssue</h1>
|
||||
<a name="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateIssue</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)/issuance">issuance</span><span class="symbol">:</span> <a href="../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)/faceValue">faceValue</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)/maturityDate">maturityDate</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span><span class="symbol">: </span><a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a></code><br/>
|
||||
<p>Returns a transaction that issues commercial paper, owned by the issuing parties key. Does not update
|
||||
an existing transaction because you arent able to issue multiple pieces of CP in a single transaction
|
||||
at the moment: this restriction is not fundamental and may be lifted later.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,16 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.generateMove - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CommercialPaper</a> / <a href=".">generateMove</a><br/>
|
||||
<br/>
|
||||
<h1>generateMove</h1>
|
||||
<a name="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateMove</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)/paper">paper</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
<p>Updates the given partial transaction with an input/output/command to reassign ownership of the paper.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,21 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.generateRedeem - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CommercialPaper</a> / <a href=".">generateRedeem</a><br/>
|
||||
<br/>
|
||||
<h1>generateRedeem</h1>
|
||||
<a name="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateRedeem</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/paper">paper</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/wallet">wallet</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="../-cash/-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">></span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
<p>Intended to be called by the issuer of some commercial paper, when an owner has notified us that they wish
|
||||
to redeem the paper. We must therefore send enough money to the key that owns the paper to satisfy the face
|
||||
value, and then ensure the paper is removed from the ledger.</p>
|
||||
<h3>Exceptions</h3>
|
||||
<a name="InsufficientBalanceException"></a>
|
||||
<code>InsufficientBalanceException</code> - if the wallet doesnt contain enough money to pay the redeemer<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,95 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href=".">CommercialPaper</a><br/>
|
||||
<br/>
|
||||
<h1>CommercialPaper</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">CommercialPaper</span> <span class="symbol">:</span> <a href="../../core/-contract/index.html"><span class="identifier">Contract</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-commands/index.html">Commands</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">interface </span><span class="identifier">Commands</span> <span class="symbol">:</span> <a href="../../core/-command-data.html"><span class="identifier">CommandData</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-state/index.html">State</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">State</span> <span class="symbol">:</span> <a href="../../core/-ownable-state/index.html"><span class="identifier">OwnableState</span></a></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">CommercialPaper</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="legal-contract-reference.html">legalContractReference</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">legalContractReference</span><span class="symbol">: </span><a href="../../core.crypto/-secure-hash/index.html"><span class="identifier">SecureHash</span></a></code><p>Unparsed reference to the natural language contract that this code is supposed to express (usually a hash of
|
||||
the contracts contents).</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-issue.html">generateIssue</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateIssue</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)/issuance">issuance</span><span class="symbol">:</span> <a href="../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)/faceValue">faceValue</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateIssue(core.PartyReference, core.Amount, java.time.Instant)/maturityDate">maturityDate</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span><span class="symbol">: </span><a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a></code><p>Returns a transaction that issues commercial paper, owned by the issuing parties key. Does not update
|
||||
an existing transaction because you arent able to issue multiple pieces of CP in a single transaction
|
||||
at the moment: this restriction is not fundamental and may be lifted later.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-move.html">generateMove</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateMove</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)/paper">paper</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateMove(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), java.security.PublicKey)/newOwner">newOwner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Updates the given partial transaction with an input/output/command to reassign ownership of the paper.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-redeem.html">generateRedeem</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateRedeem</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/paper">paper</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CommercialPaper$generateRedeem(core.TransactionBuilder, core.StateAndRef((contracts.CommercialPaper.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/wallet">wallet</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="../-cash/-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">></span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Intended to be called by the issuer of some commercial paper, when an owner has notified us that they wish
|
||||
to redeem the paper. We must therefore send enough money to the key that owns the paper to satisfy the face
|
||||
value, and then ensure the paper is removed from the ledger.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="verify.html">verify</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">verify</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$verify(core.TransactionForVerification)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-for-verification/index.html"><span class="identifier">TransactionForVerification</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense.
|
||||
Must throw an exception if theres a problem that should prevent state transition. Takes a single object
|
||||
rather than an argument so that additional data can be added without breaking binary compatibility with
|
||||
existing contract code.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,18 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.legalContractReference - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CommercialPaper</a> / <a href=".">legalContractReference</a><br/>
|
||||
<br/>
|
||||
<h1>legalContractReference</h1>
|
||||
<a name="contracts.CommercialPaper$legalContractReference"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">legalContractReference</span><span class="symbol">: </span><a href="../../core.crypto/-secure-hash/index.html"><span class="identifier">SecureHash</span></a></code><br/>
|
||||
Overrides <a href="../../core/-contract/legal-contract-reference.html">Contract.legalContractReference</a><br/>
|
||||
<p>Unparsed reference to the natural language contract that this code is supposed to express (usually a hash of
|
||||
the contracts contents).</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,20 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CommercialPaper.verify - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CommercialPaper</a> / <a href=".">verify</a><br/>
|
||||
<br/>
|
||||
<h1>verify</h1>
|
||||
<a name="contracts.CommercialPaper$verify(core.TransactionForVerification)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">verify</span><span class="symbol">(</span><span class="identifier" id="contracts.CommercialPaper$verify(core.TransactionForVerification)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-for-verification/index.html"><span class="identifier">TransactionForVerification</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
Overrides <a href="../../core/-contract/verify.html">Contract.verify</a><br/>
|
||||
<p>Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense.
|
||||
Must throw an exception if theres a problem that should prevent state transition. Takes a single object
|
||||
rather than an argument so that additional data can be added without breaking binary compatibility with
|
||||
existing contract code.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Campaign</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Campaign</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/name">name</span><span class="symbol">:</span> <span class="identifier">String</span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/target">target</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/closingTime">closingTime</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign.closingTime - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Campaign</a> / <a href=".">closingTime</a><br/>
|
||||
<br/>
|
||||
<h1>closingTime</h1>
|
||||
<a name="contracts.CrowdFund.Campaign$closingTime"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">closingTime</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,65 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href=".">Campaign</a><br/>
|
||||
<br/>
|
||||
<h1>Campaign</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Campaign</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Campaign</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/name">name</span><span class="symbol">:</span> <span class="identifier">String</span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/target">target</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Campaign$<init>(java.security.PublicKey, kotlin.String, core.Amount, java.time.Instant)/closingTime">closingTime</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="closing-time.html">closingTime</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">closingTime</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="name.html">name</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">name</span><span class="symbol">: </span><span class="identifier">String</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="owner.html">owner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="target.html">target</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">target</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="to-string.html">toString</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">toString</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign.name - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Campaign</a> / <a href=".">name</a><br/>
|
||||
<br/>
|
||||
<h1>name</h1>
|
||||
<a name="contracts.CrowdFund.Campaign$name"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">name</span><span class="symbol">: </span><span class="identifier">String</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign.owner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Campaign</a> / <a href=".">owner</a><br/>
|
||||
<br/>
|
||||
<h1>owner</h1>
|
||||
<a name="contracts.CrowdFund.Campaign$owner"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign.target - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Campaign</a> / <a href=".">target</a><br/>
|
||||
<br/>
|
||||
<h1>target</h1>
|
||||
<a name="contracts.CrowdFund.Campaign$target"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">target</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Campaign.toString - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Campaign</a> / <a href=".">toString</a><br/>
|
||||
<br/>
|
||||
<h1>toString</h1>
|
||||
<a name="contracts.CrowdFund.Campaign$toString()"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">toString</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">String</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands.Close.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CrowdFund</a> / <a href="../index.html">Commands</a> / <a href="index.html">Close</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Close</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands.Close - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CrowdFund</a> / <a href="../index.html">Commands</a> / <a href=".">Close</a><br/>
|
||||
<br/>
|
||||
<h1>Close</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Close</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Close</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands.Pledge.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CrowdFund</a> / <a href="../index.html">Commands</a> / <a href="index.html">Pledge</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Pledge</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands.Pledge - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CrowdFund</a> / <a href="../index.html">Commands</a> / <a href=".">Pledge</a><br/>
|
||||
<br/>
|
||||
<h1>Pledge</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Pledge</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Pledge</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands.Register.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CrowdFund</a> / <a href="../index.html">Commands</a> / <a href="index.html">Register</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Register</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands.Register - </title>
|
||||
<link rel="stylesheet" href="../../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../../index.html">contracts</a> / <a href="../../index.html">CrowdFund</a> / <a href="../index.html">Commands</a> / <a href=".">Register</a><br/>
|
||||
<br/>
|
||||
<h1>Register</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">Register</span> <span class="symbol">:</span> <a href="../../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><a href="../index.html"><span class="identifier">Commands</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Register</span><span class="symbol">(</span><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inherited Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/equals.html">equals</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">equals</span><span class="symbol">(</span><span class="identifier" id="core.TypeOnlyCommandData$equals(kotlin.Any)/other">other</span><span class="symbol">:</span> <span class="identifier">Any</span><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../../../../core/-type-only-command-data/hash-code.html">hashCode</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">open</span> <span class="keyword">fun </span><span class="identifier">hashCode</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,60 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Commands - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href=".">Commands</a><br/>
|
||||
<br/>
|
||||
<h1>Commands</h1>
|
||||
<code><span class="keyword">interface </span><span class="identifier">Commands</span> <span class="symbol">:</span> <a href="../../../core/-command-data.html"><span class="identifier">CommandData</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-close/index.html">Close</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Close</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-pledge/index.html">Pledge</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Pledge</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-register/index.html">Register</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Register</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Inheritors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-close/index.html">Close</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Close</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-pledge/index.html">Pledge</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Pledge</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-register/index.html">Register</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">class </span><span class="identifier">Register</span> <span class="symbol">:</span> <a href="../../../core/-type-only-command-data/index.html"><span class="identifier">TypeOnlyCommandData</span></a><span class="symbol">, </span><span class="identifier">Commands</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,32 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.<init> - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CrowdFund</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">CrowdFund</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
|
||||
<p>This is a basic crowd funding contract. It allows a party to create a funding opportunity, then for others to
|
||||
pledge during the funding period , and then for the party to either accept the funding (if the target has been reached)
|
||||
return the funds to the pledge-makers (if the target has not been reached).</p>
|
||||
Discussion<p>This method of modelling a crowdfund is similar to how itd be done in Ethereum. The state is essentially a database
|
||||
in which transactions evolve it over time. The state transition model we are using here though means its possible
|
||||
to do it in a different approach, with some additional (not yet implemented) extensions to the model. In the UTXO
|
||||
model you can do something more like the Lighthouse application (https://www.vinumeris.com/lighthouse) in which
|
||||
the campaign data and peoples pledges are transmitted out of band, with a pledge being a partially signed
|
||||
transaction which is valid only when merged with other transactions. The pledges can then be combined by the project
|
||||
owner at the point at which sufficient amounts of money have been gathered, and this creates a valid transaction
|
||||
that claims the money.</p>
|
||||
<p>TODO: Prototype this second variant of crowdfunding once the core model has been sufficiently extended.
|
||||
TODO: Experiment with the use of the javax.validation API to simplify the validation logic by annotating state members.</p>
|
||||
<p>See JIRA bug PD-21 for further discussion and followup.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<strong>Author</strong><br/>
|
||||
James Carlyle<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Pledge.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Pledge</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">Pledge</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund.Pledge$<init>(java.security.PublicKey, core.Amount)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Pledge$<init>(java.security.PublicKey, core.Amount)/amount">amount</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Pledge.amount - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Pledge</a> / <a href=".">amount</a><br/>
|
||||
<br/>
|
||||
<h1>amount</h1>
|
||||
<a name="contracts.CrowdFund.Pledge$amount"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">amount</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,42 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Pledge - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href=".">Pledge</a><br/>
|
||||
<br/>
|
||||
<h1>Pledge</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Pledge</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">Pledge</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund.Pledge$<init>(java.security.PublicKey, core.Amount)/owner">owner</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.Pledge$<init>(java.security.PublicKey, core.Amount)/amount">amount</span><span class="symbol">:</span> <a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="amount.html">amount</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">amount</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="owner.html">owner</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.Pledge.owner - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">Pledge</a> / <a href=".">owner</a><br/>
|
||||
<br/>
|
||||
<h1>owner</h1>
|
||||
<a name="contracts.CrowdFund.Pledge$owner"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">owner</span><span class="symbol">: </span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,14 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State.<init> - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">State</a> / <a href="."><init></a><br/>
|
||||
<br/>
|
||||
<h1><init></h1>
|
||||
<code><span class="identifier">State</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund.State$<init>(contracts.CrowdFund.Campaign, kotlin.Boolean, kotlin.collections.List((contracts.CrowdFund.Pledge)))/campaign">campaign</span><span class="symbol">:</span> <a href="../-campaign/index.html"><span class="identifier">Campaign</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.State$<init>(contracts.CrowdFund.Campaign, kotlin.Boolean, kotlin.collections.List((contracts.CrowdFund.Pledge)))/closed">closed</span><span class="symbol">:</span> <span class="identifier">Boolean</span> <span class="symbol">=</span> false<span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.State$<init>(contracts.CrowdFund.Campaign, kotlin.Boolean, kotlin.collections.List((contracts.CrowdFund.Pledge)))/pledges">pledges</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">></span> <span class="symbol">=</span> ArrayList()<span class="symbol">)</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State.campaign - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">State</a> / <a href=".">campaign</a><br/>
|
||||
<br/>
|
||||
<h1>campaign</h1>
|
||||
<a name="contracts.CrowdFund.State$campaign"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">campaign</span><span class="symbol">: </span><a href="../-campaign/index.html"><span class="identifier">Campaign</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State.closed - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">State</a> / <a href=".">closed</a><br/>
|
||||
<br/>
|
||||
<h1>closed</h1>
|
||||
<a name="contracts.CrowdFund.State$closed"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">closed</span><span class="symbol">: </span><span class="identifier">Boolean</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,63 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href=".">State</a><br/>
|
||||
<br/>
|
||||
<h1>State</h1>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">State</span> <span class="symbol">:</span> <a href="../../../core/-contract-state/index.html"><span class="identifier">ContractState</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">State</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund.State$<init>(contracts.CrowdFund.Campaign, kotlin.Boolean, kotlin.collections.List((contracts.CrowdFund.Pledge)))/campaign">campaign</span><span class="symbol">:</span> <a href="../-campaign/index.html"><span class="identifier">Campaign</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.State$<init>(contracts.CrowdFund.Campaign, kotlin.Boolean, kotlin.collections.List((contracts.CrowdFund.Pledge)))/closed">closed</span><span class="symbol">:</span> <span class="identifier">Boolean</span> <span class="symbol">=</span> false<span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund.State$<init>(contracts.CrowdFund.Campaign, kotlin.Boolean, kotlin.collections.List((contracts.CrowdFund.Pledge)))/pledges">pledges</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">></span> <span class="symbol">=</span> ArrayList()<span class="symbol">)</span></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="campaign.html">campaign</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">campaign</span><span class="symbol">: </span><a href="../-campaign/index.html"><span class="identifier">Campaign</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="closed.html">closed</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">closed</span><span class="symbol">: </span><span class="identifier">Boolean</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="pledged-amount.html">pledgedAmount</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">pledgedAmount</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="pledges.html">pledges</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">pledges</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol"><</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">></span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="program-ref.html">programRef</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">programRef</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><p>Refers to a bytecode program that has previously been published to the network. This contract program
|
||||
will be executed any time this state is used in an input. It must accept in order for the
|
||||
transaction to proceed.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State.pledgedAmount - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">State</a> / <a href=".">pledgedAmount</a><br/>
|
||||
<br/>
|
||||
<h1>pledgedAmount</h1>
|
||||
<a name="contracts.CrowdFund.State$pledgedAmount"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">pledgedAmount</span><span class="symbol">: </span><a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State.pledges - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">State</a> / <a href=".">pledges</a><br/>
|
||||
<br/>
|
||||
<h1>pledges</h1>
|
||||
<a name="contracts.CrowdFund.State$pledges"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">pledges</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol"><</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">></span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,19 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.State.programRef - </title>
|
||||
<link rel="stylesheet" href="../../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../../index.html">contracts</a> / <a href="../index.html">CrowdFund</a> / <a href="index.html">State</a> / <a href=".">programRef</a><br/>
|
||||
<br/>
|
||||
<h1>programRef</h1>
|
||||
<a name="contracts.CrowdFund.State$programRef"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">programRef</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code><br/>
|
||||
Overrides <a href="../../../core/-contract-state/program-ref.html">ContractState.programRef</a><br/>
|
||||
<p>Refers to a bytecode program that has previously been published to the network. This contract program
|
||||
will be executed any time this state is used in an input. It must accept in order for the
|
||||
transaction to proceed.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,15 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.generateClose - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CrowdFund</a> / <a href=".">generateClose</a><br/>
|
||||
<br/>
|
||||
<h1>generateClose</h1>
|
||||
<a name="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateClose</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/campaign">campaign</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/wallet">wallet</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="../-cash/-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">></span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,16 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.generatePledge - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CrowdFund</a> / <a href=".">generatePledge</a><br/>
|
||||
<br/>
|
||||
<h1>generatePledge</h1>
|
||||
<a name="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generatePledge</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)/campaign">campaign</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)/subscriber">subscriber</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
<p>Updates the given partial transaction with an input/output/command to fund the opportunity.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,17 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.generateRegister - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CrowdFund</a> / <a href=".">generateRegister</a><br/>
|
||||
<br/>
|
||||
<h1>generateRegister</h1>
|
||||
<a name="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateRegister</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/owner">owner</span><span class="symbol">:</span> <a href="../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/fundingTarget">fundingTarget</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/fundingName">fundingName</span><span class="symbol">:</span> <span class="identifier">String</span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/closingTime">closingTime</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span><span class="symbol">: </span><a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a></code><br/>
|
||||
<p>Returns a transaction that registers a crowd-funding campaing, owned by the issuing institutions key. Does not update
|
||||
an existing transaction because its not possible to register multiple campaigns in a single transaction</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
124
docs/build/html/api/contracts/-crowd-fund/index.html
vendored
124
docs/build/html/api/contracts/-crowd-fund/index.html
vendored
@ -1,124 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href=".">CrowdFund</a><br/>
|
||||
<br/>
|
||||
<h1>CrowdFund</h1>
|
||||
<code><span class="keyword">class </span><span class="identifier">CrowdFund</span> <span class="symbol">:</span> <a href="../../core/-contract/index.html"><span class="identifier">Contract</span></a></code><br/>
|
||||
<p>This is a basic crowd funding contract. It allows a party to create a funding opportunity, then for others to
|
||||
pledge during the funding period , and then for the party to either accept the funding (if the target has been reached)
|
||||
return the funds to the pledge-makers (if the target has not been reached).</p>
|
||||
Discussion<p>This method of modelling a crowdfund is similar to how itd be done in Ethereum. The state is essentially a database
|
||||
in which transactions evolve it over time. The state transition model we are using here though means its possible
|
||||
to do it in a different approach, with some additional (not yet implemented) extensions to the model. In the UTXO
|
||||
model you can do something more like the Lighthouse application (https://www.vinumeris.com/lighthouse) in which
|
||||
the campaign data and peoples pledges are transmitted out of band, with a pledge being a partially signed
|
||||
transaction which is valid only when merged with other transactions. The pledges can then be combined by the project
|
||||
owner at the point at which sufficient amounts of money have been gathered, and this creates a valid transaction
|
||||
that claims the money.</p>
|
||||
<p>TODO: Prototype this second variant of crowdfunding once the core model has been sufficiently extended.
|
||||
TODO: Experiment with the use of the javax.validation API to simplify the validation logic by annotating state members.</p>
|
||||
<p>See JIRA bug PD-21 for further discussion and followup.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
<strong>Author</strong><br/>
|
||||
James Carlyle<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<h3>Types</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-campaign/index.html">Campaign</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Campaign</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-commands/index.html">Commands</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">interface </span><span class="identifier">Commands</span> <span class="symbol">:</span> <a href="../../core/-command-data.html"><span class="identifier">CommandData</span></a></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-pledge/index.html">Pledge</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">Pledge</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-state/index.html">State</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">data</span> <span class="keyword">class </span><span class="identifier">State</span> <span class="symbol">:</span> <a href="../../core/-contract-state/index.html"><span class="identifier">ContractState</span></a></code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Constructors</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="-init-.html"><init></a></td>
|
||||
<td>
|
||||
<code><span class="identifier">CrowdFund</span><span class="symbol">(</span><span class="symbol">)</span></code><p>This is a basic crowd funding contract. It allows a party to create a funding opportunity, then for others to
|
||||
pledge during the funding period , and then for the party to either accept the funding (if the target has been reached)
|
||||
return the funds to the pledge-makers (if the target has not been reached).</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Properties</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="legal-contract-reference.html">legalContractReference</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">val </span><span class="identifier">legalContractReference</span><span class="symbol">: </span><a href="../../core.crypto/-secure-hash/index.html"><span class="identifier">SecureHash</span></a></code><p>Unparsed reference to the natural language contract that this code is supposed to express (usually a hash of
|
||||
the contracts contents).</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Functions</h3>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-close.html">generateClose</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateClose</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/campaign">campaign</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateClose(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), kotlin.collections.List((core.StateAndRef((contracts.Cash.State)))))/wallet">wallet</span><span class="symbol">:</span> <span class="identifier">List</span><span class="symbol"><</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="../-cash/-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">></span><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-pledge.html">generatePledge</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generatePledge</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)/campaign">campaign</span><span class="symbol">:</span> <a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol"><</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generatePledge(core.TransactionBuilder, core.StateAndRef((contracts.CrowdFund.State)), java.security.PublicKey)/subscriber">subscriber</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Updates the given partial transaction with an input/output/command to fund the opportunity.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="generate-register.html">generateRegister</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">generateRegister</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/owner">owner</span><span class="symbol">:</span> <a href="../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/fundingTarget">fundingTarget</span><span class="symbol">:</span> <a href="../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/fundingName">fundingName</span><span class="symbol">:</span> <span class="identifier">String</span><span class="symbol">, </span><span class="identifier" id="contracts.CrowdFund$generateRegister(core.PartyReference, core.Amount, kotlin.String, java.time.Instant)/closingTime">closingTime</span><span class="symbol">:</span> <a href="http://docs.oracle.com/javase/6/docs/api/java/time/Instant.html"><span class="identifier">Instant</span></a><span class="symbol">)</span><span class="symbol">: </span><a href="../../core/-transaction-builder/index.html"><span class="identifier">TransactionBuilder</span></a></code><p>Returns a transaction that registers a crowd-funding campaing, owned by the issuing institutions key. Does not update
|
||||
an existing transaction because its not possible to register multiple campaigns in a single transaction</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="verify.html">verify</a></td>
|
||||
<td>
|
||||
<code><span class="keyword">fun </span><span class="identifier">verify</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$verify(core.TransactionForVerification)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-for-verification/index.html"><span class="identifier">TransactionForVerification</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><p>Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense.
|
||||
Must throw an exception if theres a problem that should prevent state transition. Takes a single object
|
||||
rather than an argument so that additional data can be added without breaking binary compatibility with
|
||||
existing contract code.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,18 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.legalContractReference - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CrowdFund</a> / <a href=".">legalContractReference</a><br/>
|
||||
<br/>
|
||||
<h1>legalContractReference</h1>
|
||||
<a name="contracts.CrowdFund$legalContractReference"></a>
|
||||
<code><span class="keyword">val </span><span class="identifier">legalContractReference</span><span class="symbol">: </span><a href="../../core.crypto/-secure-hash/index.html"><span class="identifier">SecureHash</span></a></code><br/>
|
||||
Overrides <a href="../../core/-contract/legal-contract-reference.html">Contract.legalContractReference</a><br/>
|
||||
<p>Unparsed reference to the natural language contract that this code is supposed to express (usually a hash of
|
||||
the contracts contents).</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
@ -1,20 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>CrowdFund.verify - </title>
|
||||
<link rel="stylesheet" href="../../style.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<a href="../index.html">contracts</a> / <a href="index.html">CrowdFund</a> / <a href=".">verify</a><br/>
|
||||
<br/>
|
||||
<h1>verify</h1>
|
||||
<a name="contracts.CrowdFund$verify(core.TransactionForVerification)"></a>
|
||||
<code><span class="keyword">fun </span><span class="identifier">verify</span><span class="symbol">(</span><span class="identifier" id="contracts.CrowdFund$verify(core.TransactionForVerification)/tx">tx</span><span class="symbol">:</span> <a href="../../core/-transaction-for-verification/index.html"><span class="identifier">TransactionForVerification</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code><br/>
|
||||
Overrides <a href="../../core/-contract/verify.html">Contract.verify</a><br/>
|
||||
<p>Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense.
|
||||
Must throw an exception if theres a problem that should prevent state transition. Takes a single object
|
||||
rather than an argument so that additional data can be added without breaking binary compatibility with
|
||||
existing contract code.</p>
|
||||
<br/>
|
||||
<br/>
|
||||
</BODY>
|
||||
</HTML>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user