From e26f23b40242d08af2fbb8807e17243249cb5d0d Mon Sep 17 00:00:00 2001 From: Matthew Nesbit Date: Wed, 23 Aug 2017 11:45:36 +0100 Subject: [PATCH] Attempt to explain the Issued class Fix typo --- .../net/corda/core/contracts/Structures.kt | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/net/corda/core/contracts/Structures.kt b/core/src/main/kotlin/net/corda/core/contracts/Structures.kt index aef14de040..a877e98b9f 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/Structures.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/Structures.kt @@ -128,10 +128,24 @@ infix fun T.`with notary`(newNotary: Party) = withNotary(new infix fun T.withNotary(newNotary: Party) = TransactionState(this, newNotary) /** - * Definition for an issued product, which can be cash, a cash-like thing, assets, or generally anything else that's - * quantifiable with integer quantities. + * The [Issued] data class holds the details of an on ledger digital asset. + * In particular it gives the public credentials of the entity that created these digital tokens + * and the particular product represented. * - * @param P the type of product underlying the definition, for example [java.util.Currency]. + * @param P the class type of product underlying the definition, for example [java.util.Currency]. + * @property issuer The [AbstractParty] details of the entity which issued the asset + * and a reference blob, which can contain other details related to the token creation e.g. serial number, + * warehouse location, etc. + * The issuer is the gatekeeper for creating, or destroying the tokens on the digital ledger and + * only their [PrivateKey] signature can authorise transactions that do not conserve the total number + * of tokens on the ledger. + * Other identities may own the tokens, but they can only create transactions that conserve the total token count. + * Typically the issuer is also a well know organisation that can convert digital tokens to external assets + * and thus underwrites the digital tokens. + * Different issuer values may coexist for a particular product, but these cannot be merged. + * @property product The details of the specific product represented by these digital tokens. The value + * of product may differentiate different kinds of asset within the same logical class e.g the currency, or + * it may just be a type marker for a single custom asset. */ @CordaSerializable data class Issued(val issuer: PartyAndReference, val product: P) {