Move DepositPointer into Structures

This commit is contained in:
Mike Hearn 2015-11-06 14:57:16 +01:00
parent 847770ed2e
commit f09c624c0f
2 changed files with 7 additions and 8 deletions

View File

@ -8,14 +8,6 @@ import java.security.PublicKey
// Just a fake program identifier for now. In a real system it could be, for instance, the hash of the program bytecode.
val CASH_PROGRAM_ID = SecureHash.sha256("cash")
/**
* Reference to some money being stored by an institution e.g. in a vault or (more likely) on their normal ledger.
* The deposit reference is intended to be encrypted so it's meaningless to anyone other than the institution.
*/
data class DepositPointer(val institution: Institution, val reference: OpaqueBytes) {
override fun toString() = "${institution.name}$reference"
}
/** A state representing a claim on the cash reserves of some institution */
data class CashState(
/** Where the underlying currency backing this ledger entry can be found (propagated) */

View File

@ -93,3 +93,10 @@ interface Contract {
fun verify(inStates: List<ContractState>, outStates: List<ContractState>, args: List<VerifiedSignedCommand>)
}
/**
* Reference to some money being stored by an institution e.g. in a vault or (more likely) on their normal ledger.
* The deposit reference is intended to be encrypted so it's meaningless to anyone other than the institution.
*/
data class DepositPointer(val institution: Institution, val reference: OpaqueBytes) {
override fun toString() = "${institution.name}$reference"
}