Merged master into dynamic-loading

This commit is contained in:
Sofus Mortensen 2016-03-11 12:12:23 +01:00
commit fb20250726
1299 changed files with 43391 additions and 318 deletions

2
.gitignore vendored
View File

@ -9,6 +9,8 @@ TODO
/core/build
/docs/build/doctrees
lib/dokka.jar
buyer
seller

View File

@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Node: buyer" type="JetRunConfigurationType" factoryName="Kotlin">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="core.node.TraderDemoKt" />
<option name="MAIN_CLASS_NAME" value="demos.TraderDemoKt" />
<option name="VM_PARAMETERS" value="-ea -javaagent:lib/quasar.jar -Dco.paralleluniverse.fibers.verifyInstrumentation" />
<option name="PROGRAM_PARAMETERS" value="--dir=buyer --service-fake-trades --network-address=localhost" />
<option name="WORKING_DIRECTORY" value="" />

View File

@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Node: seller" type="JetRunConfigurationType" factoryName="Kotlin">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="core.node.TraderDemoKt" />
<option name="MAIN_CLASS_NAME" value="demos.TraderDemoKt" />
<option name="VM_PARAMETERS" value="-ea -javaagent:lib/quasar.jar -Dco.paralleluniverse.fibers.verifyInstrumentation" />
<option name="PROGRAM_PARAMETERS" value="--dir=seller --fake-trade-with=localhost --network-address=localhost:31327 --timestamper-identity-file=buyer/identity-public --timestamper-address=localhost" />
<option name="WORKING_DIRECTORY" value="" />

View File

@ -4,6 +4,7 @@ version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'project-report'
allprojects {
sourceCompatibility = 1.8
@ -16,7 +17,8 @@ buildscript {
ext.quasar_version = '0.7.5-SNAPSHOT'
ext.asm_version = '0.5.3'
ext.artemis_version = '1.2.0'
ext.jetty_version = '9.3.7.v20160115'
ext.jetty_version = '9.1.1.v20140108'
ext.jersey_version = '2.22.2'
repositories {
mavenCentral()
@ -41,13 +43,8 @@ configurations {
quasar
}
// This block makes Gradle print an error and refuse to continue if we get multiple versions of the same library
// included simultaneously.
configurations.all() {
resolutionStrategy {
failOnVersionConflict()
}
}
// To find potential version conflicts, run "gradle htmlDependencyReport" and then look in
// build/reports/project/dependencies/index.html for green highlighted parts of the tree.
dependencies {
compile project(':contracts')
@ -55,26 +52,20 @@ dependencies {
compile "com.google.code.findbugs:jsr305:3.0.1"
compile "org.slf4j:slf4j-jdk14:1.7.13"
compile("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") {
force = true
}
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
compile("com.google.guava:guava:19.0") {
force = true // Conflict between Quasar and Artemis
}
compile "com.google.guava:guava:19.0"
// JOpt: for command line flags.
compile "net.sf.jopt-simple:jopt-simple:4.9"
// Quasar: for the bytecode rewriting for state machines.
quasar("co.paralleluniverse:quasar-core:${quasar_version}:jdk8@jar")
quasar "co.paralleluniverse:quasar-core:${quasar_version}:jdk8@jar"
// Artemis: for reliable p2p message queues.
compile("org.apache.activemq:artemis-server:${artemis_version}") {
exclude group: "com.google.guava", module: "guava" // Artemis is on Guava 18
}
compile "org.apache.activemq:artemis-server:${artemis_version}"
compile "org.apache.activemq:artemis-core-client:${artemis_version}"
// JAnsi: for drawing things to the terminal in nicely coloured ways.
@ -88,15 +79,34 @@ dependencies {
}
// Force commons logging to version 1.2 to override Artemis, which pulls in 1.1.3 (ARTEMIS-424)
compile("commons-logging:commons-logging:1.2") {
force = true
}
compile "commons-logging:commons-logging:1.2"
// Web stuff: for HTTP[S] servlets
compile "org.eclipse.jetty:jetty-servlet:${jetty_version}"
compile "org.eclipse.jetty:jetty-webapp:${jetty_version}"
compile "javax.servlet:javax.servlet-api:3.1.0"
compile "org.jolokia:jolokia-agent-war:2.0.0-M1"
compile "commons-fileupload:commons-fileupload:1.3.1"
// Jersey for JAX-RS implementation for use in Jetty
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"
compile "org.glassfish.jersey.containers:jersey-container-servlet-core:${jersey_version}"
compile "org.glassfish.jersey.containers:jersey-container-jetty-http:${jersey_version}"
// NOTE there is a Jackson version clash between jersey-media-json-jackson (v2.5.4) and jackson-module-kotlin (v.2.5.5)
// Have not found an Issue in the issue tracker for Jersey for this issue
compile ("org.glassfish.jersey.media:jersey-media-json-jackson:${jersey_version}") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
}
compile ("com.fasterxml.jackson.module:jackson-module-kotlin:2.5.5-2") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
}
compile "com.fasterxml.jackson.core:jackson-annotations:2.5.5"
// Coda Hale's Metrics: for monitoring of key statistics
compile "io.dropwizard.metrics:metrics-core:3.1.2"
// Unit testing helpers.
testCompile 'junit:junit:4.12'
testCompile 'com.google.jimfs:jimfs:1.1' // in memory java.nio filesystem.
@ -109,7 +119,7 @@ dependencies {
// In Java 9 (hopefully) the requirement to annotate methods as @Suspendable will go away.
applicationDefaultJvmArgs = ["-javaagent:${configurations.quasar.singleFile}"]
mainClassName = 'core.node.TraderDemoKt'
mainClassName = 'demos.TraderDemoKt'
tasks.withType(Test) {
jvmArgs "-javaagent:${configurations.quasar.singleFile}"
@ -118,4 +128,18 @@ tasks.withType(Test) {
tasks.withType(JavaExec) {
jvmArgs "-javaagent:${configurations.quasar.singleFile}"
jvmArgs "-Dco.paralleluniverse.fibers.verifyInstrumentation"
}
// Package up the other demo programs.
task getRateFixDemo(type: CreateStartScripts) {
mainClassName = "demos.RateFixDemoKt"
applicationName = "get-rate-fix"
defaultJvmOpts = ["-javaagent:${configurations.quasar.singleFile}"]
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into("bin") {
from(getRateFixDemo)
fileMode = 0755
}

View File

@ -12,6 +12,7 @@ import core.*;
import core.TransactionForVerification.InOutGroup;
import core.crypto.NullPublicKey;
import core.crypto.SecureHash;
import core.node.services.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

View File

@ -10,6 +10,7 @@ package contracts
import core.*
import core.crypto.SecureHash
import core.node.services.DummyTimestampingAuthority
import java.security.PublicKey
import java.time.Instant
import java.util.*

View File

@ -8,14 +8,6 @@ buildscript {
repositories {
mavenCentral()
}
dependencies {
// Dokka (JavaDoc equivalent for Kotlin) download is a big download and also
// can interfere with the Kotlin compiler if it gets out of sync, version wise.
// To generate API docs, uncomment this line, then uncomment 'apply plugin' line
// below, and then run 'gradle dokka' and look in core/build/dokka/core/index.html
// classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.7"
}
}
// apply plugin: 'org.jetbrains.dokka'
@ -43,7 +35,7 @@ dependencies {
compile "com.google.guava:guava:19.0"
// RxJava: observable streams of events.
compile "io.reactivex:rxkotlin:0.40.1"
compile "io.reactivex:rxjava:1.0.17"
// Kryo: object graph serialization.
compile "com.esotericsoftware:kryo:3.0.3"

View File

@ -8,7 +8,6 @@
package core
import java.math.BigDecimal
import java.security.PublicKey
import java.util.*
@ -47,63 +46,6 @@ class Requirements {
val R = Requirements()
inline fun <R> requireThat(body: Requirements.() -> R) = R.body()
//// Amounts //////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Amount represents a positive quantity of currency, measured in pennies, which are the smallest representable units.
*
* Note that "pennies" are not necessarily 1/100ths of a currency unit, but are the actual smallest amount used in
* whatever currency the amount represents.
*
* Amounts of different currencies *do not mix* and attempting to add or subtract two amounts of different currencies
* will throw [IllegalArgumentException]. Amounts may not be negative. Amounts are represented internally using a signed
* 64 bit value, therefore, the maximum expressable amount is 2^63 - 1 == Long.MAX_VALUE. Addition, subtraction and
* multiplication are overflow checked and will throw [ArithmeticException] if the operation would have caused integer
* overflow.
*
* TODO: It may make sense to replace this with convenience extensions over the JSR 354 MonetaryAmount interface
* TODO: Should amount be abstracted to cover things like quantities of a stock, bond, commercial paper etc? Probably.
* TODO: Think about how positive-only vs positive-or-negative amounts can be represented in the type system.
*/
data class Amount(val pennies: Long, val currency: Currency) : Comparable<Amount> {
init {
// Negative amounts are of course a vital part of any ledger, but negative values are only valid in certain
// contexts: you cannot send a negative amount of cash, but you can (sometimes) have a negative balance.
// If you want to express a negative amount, for now, use a long.
require(pennies >= 0) { "Negative amounts are not allowed: $pennies" }
}
operator fun plus(other: Amount): Amount {
checkCurrency(other)
return Amount(Math.addExact(pennies, other.pennies), currency)
}
operator fun minus(other: Amount): Amount {
checkCurrency(other)
return Amount(Math.subtractExact(pennies, other.pennies), currency)
}
private fun checkCurrency(other: Amount) {
require(other.currency == currency) { "Currency mismatch: ${other.currency} vs $currency" }
}
operator fun div(other: Long): Amount = Amount(pennies / other, currency)
operator fun times(other: Long): Amount = Amount(Math.multiplyExact(pennies, other), currency)
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 compareTo(other: Amount): Int {
checkCurrency(other)
return pennies.compareTo(other.pennies)
}
}
fun Iterable<Amount>.sumOrNull() = if (!iterator().hasNext()) null else sumOrThrow()
fun Iterable<Amount>.sumOrThrow() = reduce { left, right -> left + right }
fun Iterable<Amount>.sumOrZero(currency: Currency) = if (iterator().hasNext()) sumOrThrow() else Amount(0, currency)
//// Authenticated commands ///////////////////////////////////////////////////////////////////////////////////////////
/** Filters the command list by type, party and public key all at once. */

View File

@ -0,0 +1,79 @@
/*
* 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 java.math.BigDecimal
import java.time.Duration
import java.time.LocalDate
import java.util.*
/**
* Amount represents a positive quantity of currency, measured in pennies, which are the smallest representable units.
*
* Note that "pennies" are not necessarily 1/100ths of a currency unit, but are the actual smallest amount used in
* whatever currency the amount represents.
*
* Amounts of different currencies *do not mix* and attempting to add or subtract two amounts of different currencies
* will throw [IllegalArgumentException]. Amounts may not be negative. Amounts are represented internally using a signed
* 64 bit value, therefore, the maximum expressable amount is 2^63 - 1 == Long.MAX_VALUE. Addition, subtraction and
* multiplication are overflow checked and will throw [ArithmeticException] if the operation would have caused integer
* overflow.
*
* TODO: It may make sense to replace this with convenience extensions over the JSR 354 MonetaryAmount interface
* TODO: Should amount be abstracted to cover things like quantities of a stock, bond, commercial paper etc? Probably.
* TODO: Think about how positive-only vs positive-or-negative amounts can be represented in the type system.
*/
data class Amount(val pennies: Long, val currency: Currency) : Comparable<Amount> {
init {
// Negative amounts are of course a vital part of any ledger, but negative values are only valid in certain
// contexts: you cannot send a negative amount of cash, but you can (sometimes) have a negative balance.
// If you want to express a negative amount, for now, use a long.
require(pennies >= 0) { "Negative amounts are not allowed: $pennies" }
}
operator fun plus(other: Amount): Amount {
checkCurrency(other)
return Amount(Math.addExact(pennies, other.pennies), currency)
}
operator fun minus(other: Amount): Amount {
checkCurrency(other)
return Amount(Math.subtractExact(pennies, other.pennies), currency)
}
private fun checkCurrency(other: Amount) {
require(other.currency == currency) { "Currency mismatch: ${other.currency} vs $currency" }
}
operator fun div(other: Long): Amount = Amount(pennies / other, currency)
operator fun times(other: Long): Amount = Amount(Math.multiplyExact(pennies, other), currency)
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 compareTo(other: Amount): Int {
checkCurrency(other)
return pennies.compareTo(other.pennies)
}
}
fun Iterable<Amount>.sumOrNull() = if (!iterator().hasNext()) null else sumOrThrow()
fun Iterable<Amount>.sumOrThrow() = reduce { left, right -> left + right }
fun Iterable<Amount>.sumOrZero(currency: Currency) = if (iterator().hasNext()) sumOrThrow() else Amount(0, currency)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Interest rate fixes
//
/** 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

View File

@ -13,7 +13,8 @@ import core.crypto.DigitalSignature
import core.crypto.SecureHash
import core.crypto.signWithECDSA
import core.crypto.toStringShort
import core.node.TimestampingError
import core.node.services.TimestamperService
import core.node.services.TimestampingError
import core.serialization.SerializedBytes
import core.serialization.deserialize
import core.serialization.serialize
@ -199,7 +200,7 @@ class TransactionBuilder(private val inputs: MutableList<StateRef> = arrayListOf
check(currentSigs.none { it.by == key.public }) { "This partial transaction was already signed by ${key.public}" }
check(commands.count { it.pubkeys.contains(key.public) } > 0) { "Trying to sign with a key that isn't in any command" }
val data = toWireTransaction().serialize()
currentSigs.add(key.signWithECDSA(data.bits))
addSignatureUnchecked(key.signWithECDSA(data.bits))
}
/**
@ -210,8 +211,23 @@ class TransactionBuilder(private val inputs: MutableList<StateRef> = arrayListOf
* @throws IllegalArgumentException if the signature key doesn't appear in any command.
*/
fun checkAndAddSignature(sig: DigitalSignature.WithKey) {
checkSignature(sig)
addSignatureUnchecked(sig)
}
/**
* Checks that the given signature matches one of the commands and that it is a correct signature over the tx.
*
* @throws SignatureException if the signature didn't match the transaction contents
* @throws IllegalArgumentException if the signature key doesn't appear in any command.
*/
fun checkSignature(sig: DigitalSignature.WithKey) {
require(commands.count { it.pubkeys.contains(sig.by) } > 0) { "Signature key doesn't match any command" }
sig.verifyWithECDSA(toWireTransaction().serialize())
sig.verifyWithECDSA(toWireTransaction().serialized)
}
/** Adds the signature directly to the transaction, without checking it for validity. */
fun addSignatureUnchecked(sig: DigitalSignature.WithKey) {
currentSigs.add(sig)
}
@ -238,7 +254,7 @@ class TransactionBuilder(private val inputs: MutableList<StateRef> = arrayListOf
// boundary of t.notAfter and network latency pushes us over the edge. By "synchronised" here we mean relative
// to GPS time i.e. the United States Naval Observatory.
val sig = timestamper.timestamp(toWireTransaction().serialize())
currentSigs.add(sig)
addSignatureUnchecked(sig)
}
fun toWireTransaction() = WireTransaction(ArrayList(inputs), ArrayList(attachments),

View File

@ -15,6 +15,7 @@ import com.google.common.util.concurrent.SettableFuture
import org.slf4j.Logger
import java.io.BufferedInputStream
import java.io.InputStream
import java.math.BigDecimal
import java.nio.file.Files
import java.nio.file.Path
import java.security.SecureRandom
@ -32,6 +33,8 @@ 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)
/**
* Returns a random positive long generated using a secure RNG. This function sacrifies a bit of entropy in order to
* avoid potential bugs where the value is used in a context where negative numbers are not expected.

View File

@ -99,6 +99,7 @@ fun PrivateKey.signWithECDSA(bitsToSign: ByteArray, publicKey: PublicKey): Digit
}
fun KeyPair.signWithECDSA(bitsToSign: ByteArray) = private.signWithECDSA(bitsToSign, public)
fun KeyPair.signWithECDSA(bitsToSign: OpaqueBytes) = private.signWithECDSA(bitsToSign.bits, public)
fun KeyPair.signWithECDSA(bitsToSign: OpaqueBytes, party: Party) = signWithECDSA(bitsToSign.bits, party)
fun KeyPair.signWithECDSA(bitsToSign: ByteArray, party: Party): DigitalSignature.LegallyIdentifiable {
check(public == party.owningKey)
val sig = signWithECDSA(bitsToSign)

View File

@ -1,15 +0,0 @@
package core.node
sealed class TimestampingError : Exception() {
class RequiresExactlyOneCommand : TimestampingError()
/**
* Thrown if an attempt is made to timestamp a transaction using a trusted timestamper, but the time on the
* transaction is too far in the past or future relative to the local clock and thus the timestamper would reject
* it.
*/
class NotOnTimeException : TimestampingError()
/** Thrown if the command in the transaction doesn't list this timestamping authorities public key as a signer */
class NotForMe : TimestampingError()
}

View File

@ -1,5 +1,14 @@
package core
/*
* 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.node.services
import core.Party
import java.security.PublicKey
/**

View File

@ -1,6 +1,16 @@
package core
/*
* 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.node.services
import co.paralleluniverse.fibers.Suspendable
import core.Party
import core.WireTransaction
import core.crypto.DigitalSignature
import core.crypto.generateKeyPair
import core.serialization.SerializedBytes
@ -27,3 +37,16 @@ object DummyTimestampingAuthority {
val key = generateKeyPair()
val identity = Party("Mock Company 0", key.public)
}
sealed class TimestampingError : Exception() {
class RequiresExactlyOneCommand : TimestampingError()
/**
* Thrown if an attempt is made to timestamp a transaction using a trusted timestamper, but the time on the
* transaction is too far in the past or future relative to the local clock and thus the timestamper would reject
* it.
*/
class NotOnTimeException : TimestampingError()
/** Thrown if the command in the transaction doesn't list this timestamping authorities public key as a signer */
class NotForMe : TimestampingError()
}

View File

@ -11,7 +11,7 @@ package core.utilities
import core.TransientProperty
import rx.Observable
import rx.Subscription
import rx.lang.kotlin.BehaviourSubject
import rx.subjects.BehaviorSubject
import rx.subjects.PublishSubject
import java.util.*
@ -54,7 +54,7 @@ class ProgressTracker(vararg steps: Step) {
/** This class makes it easier to relabel a step on the fly, to provide transient information. */
open class RelabelableStep(currentLabel: String) : Step(currentLabel) {
override val changes = BehaviourSubject<Change>()
override val changes = BehaviorSubject.create<Change>()
var currentLabel: String = currentLabel
set(value) {

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ad139b05c69c728d506a9770157eaa25
config: b08dca817adc75e78b383039f097775b
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -16,6 +16,8 @@ prove or disprove the following hypothesis:
*is sufficiently powerful to justify the creation of a new platform implementation.*
Read on to learn:

811
docs/build/html/api/alltypes/index.html vendored Normal file
View File

@ -0,0 +1,811 @@
<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CASH_PROGRAM_ID - </title>
<link rel="stylesheet" href="../style.css">
</HEAD>
<BODY>
<a href="index.html">contracts</a>&nbsp;/&nbsp;<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">&lt;ERROR CLASS&gt;</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,34 @@
<HTML>
<HEAD>
<title>CP_PROGRAM_ID - </title>
<link rel="stylesheet" href="../style.css">
</HEAD>
<BODY>
<a href="index.html">contracts</a>&nbsp;/&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CROWDFUND_PROGRAM_ID - </title>
<link rel="stylesheet" href="../style.css">
</HEAD>
<BODY>
<a href="index.html">contracts</a>&nbsp;/&nbsp;<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">&lt;ERROR CLASS&gt;</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,16 @@
<HTML>
<HEAD>
<title>Cash.Commands.Exit.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Exit</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>Cash.Commands.Exit.amount - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Exit</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,40 @@
<HTML>
<HEAD>
<title>Cash.Commands.Exit - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>

View File

@ -0,0 +1,16 @@
<HTML>
<HEAD>
<title>Cash.Commands.Issue.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Issue</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<span class="identifier">Long</span>&nbsp;<span class="symbol">=</span>&nbsp;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>

View File

@ -0,0 +1,40 @@
<HTML>
<HEAD>
<title>Cash.Commands.Issue - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<span class="identifier">Long</span>&nbsp;<span class="symbol">=</span>&nbsp;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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>Cash.Commands.Issue.nonce - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Issue</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>Cash.Commands.Move.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Move</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Move</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>Cash.Commands.Move - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">Cash</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Move</a><br/>
<br/>
<h1>Move</h1>
<code><span class="keyword">class </span><span class="identifier">Move</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,68 @@
<HTML>
<HEAD>
<title>Cash.Commands - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href=".">Commands</a><br/>
<br/>
<h1>Commands</h1>
<code><span class="keyword">interface </span><span class="identifier">Commands</span>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>

View File

@ -0,0 +1,25 @@
<HTML>
<HEAD>
<title>Cash.<init> - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">Cash</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>Cash.State.<init> - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>Cash.State.amount - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,16 @@
<HTML>
<HEAD>
<title>Cash.State.deposit - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,79 @@
<HTML>
<HEAD>
<title>Cash.State - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,17 @@
<HTML>
<HEAD>
<title>Cash.State.owner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,19 @@
<HTML>
<HEAD>
<title>Cash.State.programRef - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>Cash.State.toString - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,17 @@
<HTML>
<HEAD>
<title>Cash.State.withNewOwner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">Cash</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,16 @@
<HTML>
<HEAD>
<title>Cash.generateIssue - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">Cash</a>&nbsp;/&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,22 @@
<HTML>
<HEAD>
<title>Cash.generateSpend - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">Cash</a>&nbsp;/&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<span class="identifier">List</span><span class="symbol">&lt;</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</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>&nbsp;<span class="identifier">Set</span><span class="symbol">&lt;</span><a href="../../core/-party/index.html"><span class="identifier">Party</span></a><span class="symbol">&gt;</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol">&lt;</span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">&gt;</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>

View File

@ -0,0 +1,97 @@
<HTML>
<HEAD>
<title>Cash - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href=".">Cash</a><br/>
<br/>
<h1>Cash</h1>
<code><span class="keyword">class </span><span class="identifier">Cash</span>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<span class="identifier">List</span><span class="symbol">&lt;</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</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>&nbsp;<span class="identifier">Set</span><span class="symbol">&lt;</span><a href="../../core/-party/index.html"><span class="identifier">Party</span></a><span class="symbol">&gt;</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><span class="identifier">List</span><span class="symbol">&lt;</span><a href="http://docs.oracle.com/javase/6/docs/api/java/security/PublicKey.html"><span class="identifier">PublicKey</span></a><span class="symbol">&gt;</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>&nbsp;<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>

View File

@ -0,0 +1,25 @@
<HTML>
<HEAD>
<title>Cash.legalContractReference - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">Cash</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,17 @@
<HTML>
<HEAD>
<title>Cash.verify - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">Cash</a>&nbsp;/&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands.Issue.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Issue</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Issue</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands.Issue - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Issue</a><br/>
<br/>
<h1>Issue</h1>
<code><span class="keyword">class </span><span class="identifier">Issue</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands.Move.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Move</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Move</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands.Move - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Move</a><br/>
<br/>
<h1>Move</h1>
<code><span class="keyword">class </span><span class="identifier">Move</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands.Redeem.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Redeem</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Redeem</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands.Redeem - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Redeem</a><br/>
<br/>
<h1>Redeem</h1>
<code><span class="keyword">class </span><span class="identifier">Redeem</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,60 @@
<HTML>
<HEAD>
<title>CommercialPaper.Commands - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href=".">Commands</a><br/>
<br/>
<h1>Commands</h1>
<code><span class="keyword">interface </span><span class="identifier">Commands</span>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CommercialPaper.<init> - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">CommercialPaper</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.<init> - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.faceValue - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,112 @@
<HTML>
<HEAD>
<title>CommercialPaper.State - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>&nbsp;<a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</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>&nbsp;<a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.issuance - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.maturityDate - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,17 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.owner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,19 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.programRef - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.toString - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.withFaceValue - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>&nbsp;<a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.withIssuance - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>&nbsp;<a href="../../../core/-party-reference/index.html"><span class="identifier">PartyReference</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">&lt;ERROR CLASS&gt;</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.withMaturityDate - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,17 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.withNewOwner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>&nbsp;<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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.withOwner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CommercialPaper.State.withoutOwner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CommercialPaper</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,18 @@
<HTML>
<HEAD>
<title>CommercialPaper.generateIssue - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CommercialPaper</a>&nbsp;/&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,16 @@
<HTML>
<HEAD>
<title>CommercialPaper.generateMove - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CommercialPaper</a>&nbsp;/&nbsp;<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>&nbsp;<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>&nbsp;<a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</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>&nbsp;<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>

View File

@ -0,0 +1,21 @@
<HTML>
<HEAD>
<title>CommercialPaper.generateRedeem - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CommercialPaper</a>&nbsp;/&nbsp;<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>&nbsp;<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>&nbsp;<a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</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>&nbsp;<span class="identifier">List</span><span class="symbol">&lt;</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="../-cash/-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</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>

View File

@ -0,0 +1,95 @@
<HTML>
<HEAD>
<title>CommercialPaper - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href=".">CommercialPaper</a><br/>
<br/>
<h1>CommercialPaper</h1>
<code><span class="keyword">class </span><span class="identifier">CommercialPaper</span>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</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>&nbsp;<span class="identifier">List</span><span class="symbol">&lt;</span><a href="../../core/-state-and-ref/index.html"><span class="identifier">StateAndRef</span></a><span class="symbol">&lt;</span><a href="../-cash/-state/index.html"><span class="identifier">State</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</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>&nbsp;<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>

View File

@ -0,0 +1,18 @@
<HTML>
<HEAD>
<title>CommercialPaper.legalContractReference - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CommercialPaper</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,20 @@
<HTML>
<HEAD>
<title>CommercialPaper.verify - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CommercialPaper</a>&nbsp;/&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign.<init> - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Campaign</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign.closingTime - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Campaign</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,65 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign.name - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Campaign</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign.owner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Campaign</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign.target - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Campaign</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Campaign.toString - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Campaign</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands.Close.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Close</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Close</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands.Close - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Close</a><br/>
<br/>
<h1>Close</h1>
<code><span class="keyword">class </span><span class="identifier">Close</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands.Pledge.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Pledge</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Pledge</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands.Pledge - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Pledge</a><br/>
<br/>
<h1>Pledge</h1>
<code><span class="keyword">class </span><span class="identifier">Pledge</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands.Register.<init> - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href="index.html">Register</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<code><span class="identifier">Register</span><span class="symbol">(</span><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands.Register - </title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="../index.html">Commands</a>&nbsp;/&nbsp;<a href=".">Register</a><br/>
<br/>
<h1>Register</h1>
<code><span class="keyword">class </span><span class="identifier">Register</span>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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">&lt;ERROR CLASS&gt;</span></code></td>
</tr>
</tbody>
</table>
</BODY>
</HTML>

View File

@ -0,0 +1,60 @@
<HTML>
<HEAD>
<title>CrowdFund.Commands - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href=".">Commands</a><br/>
<br/>
<h1>Commands</h1>
<code><span class="keyword">interface </span><span class="identifier">Commands</span>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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>

View File

@ -0,0 +1,32 @@
<HTML>
<HEAD>
<title>CrowdFund.<init> - </title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">contracts</a>&nbsp;/&nbsp;<a href="index.html">CrowdFund</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CrowdFund.Pledge.<init> - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Pledge</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<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>&nbsp;<a href="../../../core/-amount/index.html"><span class="identifier">Amount</span></a><span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Pledge.amount - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Pledge</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,42 @@
<HTML>
<HEAD>
<title>CrowdFund.Pledge - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.Pledge.owner - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">Pledge</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,14 @@
<HTML>
<HEAD>
<title>CrowdFund.State.<init> - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<a href=".">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</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>&nbsp;<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>&nbsp;<span class="identifier">Boolean</span>&nbsp;<span class="symbol">=</span>&nbsp;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>&nbsp;<span class="identifier">List</span><span class="symbol">&lt;</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">&gt;</span>&nbsp;<span class="symbol">=</span>&nbsp;ArrayList()<span class="symbol">)</span></code><br/>
<br/>
<br/>
</BODY>
</HTML>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.State.campaign - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.State.closed - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

View File

@ -0,0 +1,63 @@
<HTML>
<HEAD>
<title>CrowdFund.State - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<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>&nbsp;<span class="symbol">:</span>&nbsp;<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">&lt;init&gt;</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>&nbsp;<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>&nbsp;<span class="identifier">Boolean</span>&nbsp;<span class="symbol">=</span>&nbsp;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>&nbsp;<span class="identifier">List</span><span class="symbol">&lt;</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">&gt;</span>&nbsp;<span class="symbol">=</span>&nbsp;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">&lt;</span><a href="../-pledge/index.html"><span class="identifier">Pledge</span></a><span class="symbol">&gt;</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">&lt;ERROR CLASS&gt;</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>

View File

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<title>CrowdFund.State.pledgedAmount - </title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">contracts</a>&nbsp;/&nbsp;<a href="../index.html">CrowdFund</a>&nbsp;/&nbsp;<a href="index.html">State</a>&nbsp;/&nbsp;<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>

Some files were not shown because too many files have changed in this diff Show More