From ff2824780c764f34e14b7a4c24245c6131954606 Mon Sep 17 00:00:00 2001
From: Matthew Nesbit
Date: Wed, 11 May 2016 11:47:52 +0100
Subject: [PATCH 01/10] A proposal for how to restructure the gradle modules
and namespaces.
---
project-structure-proposal.txt | 79 ++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 project-structure-proposal.txt
diff --git a/project-structure-proposal.txt b/project-structure-proposal.txt
new file mode 100644
index 0000000000..524d0d190b
--- /dev/null
+++ b/project-structure-proposal.txt
@@ -0,0 +1,79 @@
+Proposed module structure
+
+:r3prototyping - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
+ |--docs - docs for developers
+ |--scripts - scripts to start\stop nodes, run demos, etc
+ |--tools - utilities such as tools to create keys, etc
+ |--libs - external libs not available on maven, or signed specific versions
+ |--contracts - fully signed and versioned contract jars for approved contracts that other contracts might reference.
+
+:core - gradle module for language helpers, pure algorithms, etc
+ |--crypto - helpers for crypto
+ |--math - helpers for calculations e.g. financial rounding
+ |--utilities - stuff
+
+:client-api - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
+ |--api - standard rpc services exposed on a node for supporting bank side interactions and node management
+ |--transport - support for concrete transport layers
+ | |--jaxrs - e.g. annotated api interface for rest-json
+ | |--mq - e.g. wrapper for using messaging to communicate to the node
+ |--serialization - abstraction\helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
+
+:contract-api - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
+ |--financetypes - basic finance types and helpers
+ |--protocol
+ | |--api - node services available internally only to contracts.
+ | |--core - protocol support and implementation functions e.g. our TwoPartyDealProtocol
+ |--contract - base\abstract types for smart contracts e.g ContractState, Transaction, Command
+ |--extensionsapi - marker interfaces\annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
+ |--utilities - helpers\builders without any business logic
+ |--test - hooks to allow testability of contracts
+ |--serialization - helpers for state object storage and transport by nodes
+
+:contract-core - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
+ |--validators - helpers for standard business validations e.g. must be positive, net cash must be equal, etc
+ |--utilities - some common code for business day calculations and holiday oracle
+ |--cash
+ | |--states
+ | |--contract
+ | |--protocol
+ |--irs
+ | |--states
+ | |--contract
+ | |--protocol
+ |--dvp
+ | |--states
+ | |--contract
+ | |--protocol
+
+:contract-demos - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
+ |--minimum - hello world of smart contracts
+ | |--states
+ | |--contract
+ | |--protocol
+ |--demo1 - something for an external developer to start working on
+ | |--states
+ | |--contract
+ | |--protocol
+ |--webapp - some simple web content that calls against JAX-RS to exercise the demo contracts. Content registered via the extensions-api
+ | |--minimum
+ | |--demo1
+
+:node - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
+ |--bootstrap - start\stop sequence, config loading, dependency injection, loading service plugins,etc
+ |--clientapi - implementation of the common public API entry point via JAX-RS, MQ, etc, perhaps does some security checking and then passes to actual services
+ |--recovery - code to carry out checking on startup and possibly recovery\undo\redo of the transactions
+ |--services - services listed below are only suggestions!!
+ | |--api - internal non-serialised service interfaces and data types. Used for decoupling
+ | |--messaging
+ | |--networkmapper
+ | |--persistence
+ | |--identity
+ | |--notary
+ | |--protocol - node side implementation of primitives exposed to contracts
+ | |--statemachine
+ | |--scheduler
+ | |--contractsandbox
+ | |--wallet
+ |--configuration
+ |--utilities
From e672344639bdc6e3d8bdeb33df341226f6e98369 Mon Sep 17 00:00:00 2001
From: Matthew Nesbit
Date: Wed, 11 May 2016 16:56:45 +0100
Subject: [PATCH 02/10] Convert proposed structure into a doc source file and
include in index
---
docs/source/index.rst | 1 +
.../source/project-structure-proposal.rst | 58 ++++++++++++++-----
2 files changed, 45 insertions(+), 14 deletions(-)
rename project-structure-proposal.txt => docs/source/project-structure-proposal.rst (56%)
diff --git a/docs/source/index.rst b/docs/source/index.rst
index a11b6fcd76..edc27930d9 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -48,4 +48,5 @@ Read on to learn:
visualiser
codestyle
building-the-docs
+ project-structure-proposal
diff --git a/project-structure-proposal.txt b/docs/source/project-structure-proposal.rst
similarity index 56%
rename from project-structure-proposal.txt
rename to docs/source/project-structure-proposal.rst
index 524d0d190b..6ccb79d121 100644
--- a/project-structure-proposal.txt
+++ b/docs/source/project-structure-proposal.rst
@@ -1,36 +1,58 @@
Proposed module structure
+=========================
-:r3prototyping - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
+``:r3prototyping`` - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--docs - docs for developers
- |--scripts - scripts to start\stop nodes, run demos, etc
+ |--scripts - scripts to start/stop nodes, run demos, etc
|--tools - utilities such as tools to create keys, etc
|--libs - external libs not available on maven, or signed specific versions
|--contracts - fully signed and versioned contract jars for approved contracts that other contracts might reference.
-:core - gradle module for language helpers, pure algorithms, etc
+``:utilities`` - gradle module for language helpers, pure algorithms, etc
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--crypto - helpers for crypto
|--math - helpers for calculations e.g. financial rounding
|--utilities - stuff
-:client-api - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
+``:client-api`` - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--api - standard rpc services exposed on a node for supporting bank side interactions and node management
|--transport - support for concrete transport layers
| |--jaxrs - e.g. annotated api interface for rest-json
| |--mq - e.g. wrapper for using messaging to communicate to the node
- |--serialization - abstraction\helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
+ |--serialization - abstraction/helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
-:contract-api - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
+``:contract-api`` - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--financetypes - basic finance types and helpers
|--protocol
| |--api - node services available internally only to contracts.
| |--core - protocol support and implementation functions e.g. our TwoPartyDealProtocol
- |--contract - base\abstract types for smart contracts e.g ContractState, Transaction, Command
- |--extensionsapi - marker interfaces\annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
- |--utilities - helpers\builders without any business logic
+ |--contract - base/abstract types for smart contracts e.g ContractState, Transaction, Command
+ |--extensionsapi - marker interfaces/annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
+ |--utilities - helpers/builders without any business logic
|--test - hooks to allow testability of contracts
|--serialization - helpers for state object storage and transport by nodes
-:contract-core - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
+``:base-contract`` - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
+
+.. code-block:: none
+
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--validators - helpers for standard business validations e.g. must be positive, net cash must be equal, etc
|--utilities - some common code for business day calculations and holiday oracle
|--cash
@@ -46,7 +68,11 @@ Proposed module structure
| |--contract
| |--protocol
-:contract-demos - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
+``:demos`` - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--minimum - hello world of smart contracts
| |--states
| |--contract
@@ -59,10 +85,14 @@ Proposed module structure
| |--minimum
| |--demo1
-:node - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
- |--bootstrap - start\stop sequence, config loading, dependency injection, loading service plugins,etc
+``:node`` - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
+ |--bootstrap - start/stop sequence, config loading, dependency injection, loading service plugins,etc
|--clientapi - implementation of the common public API entry point via JAX-RS, MQ, etc, perhaps does some security checking and then passes to actual services
- |--recovery - code to carry out checking on startup and possibly recovery\undo\redo of the transactions
+ |--recovery - code to carry out checking on startup and possibly recovery/undo/redo of the transactions
|--services - services listed below are only suggestions!!
| |--api - internal non-serialised service interfaces and data types. Used for decoupling
| |--messaging
From 2942e7dc948ebd653a88cb5fc2f85717a09803ad Mon Sep 17 00:00:00 2001
From: Matthew Nesbit
Date: Wed, 11 May 2016 11:47:52 +0100
Subject: [PATCH 03/10] A proposal for how to restructure the gradle modules
and namespaces.
---
project-structure-proposal.txt | 79 ++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 project-structure-proposal.txt
diff --git a/project-structure-proposal.txt b/project-structure-proposal.txt
new file mode 100644
index 0000000000..524d0d190b
--- /dev/null
+++ b/project-structure-proposal.txt
@@ -0,0 +1,79 @@
+Proposed module structure
+
+:r3prototyping - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
+ |--docs - docs for developers
+ |--scripts - scripts to start\stop nodes, run demos, etc
+ |--tools - utilities such as tools to create keys, etc
+ |--libs - external libs not available on maven, or signed specific versions
+ |--contracts - fully signed and versioned contract jars for approved contracts that other contracts might reference.
+
+:core - gradle module for language helpers, pure algorithms, etc
+ |--crypto - helpers for crypto
+ |--math - helpers for calculations e.g. financial rounding
+ |--utilities - stuff
+
+:client-api - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
+ |--api - standard rpc services exposed on a node for supporting bank side interactions and node management
+ |--transport - support for concrete transport layers
+ | |--jaxrs - e.g. annotated api interface for rest-json
+ | |--mq - e.g. wrapper for using messaging to communicate to the node
+ |--serialization - abstraction\helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
+
+:contract-api - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
+ |--financetypes - basic finance types and helpers
+ |--protocol
+ | |--api - node services available internally only to contracts.
+ | |--core - protocol support and implementation functions e.g. our TwoPartyDealProtocol
+ |--contract - base\abstract types for smart contracts e.g ContractState, Transaction, Command
+ |--extensionsapi - marker interfaces\annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
+ |--utilities - helpers\builders without any business logic
+ |--test - hooks to allow testability of contracts
+ |--serialization - helpers for state object storage and transport by nodes
+
+:contract-core - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
+ |--validators - helpers for standard business validations e.g. must be positive, net cash must be equal, etc
+ |--utilities - some common code for business day calculations and holiday oracle
+ |--cash
+ | |--states
+ | |--contract
+ | |--protocol
+ |--irs
+ | |--states
+ | |--contract
+ | |--protocol
+ |--dvp
+ | |--states
+ | |--contract
+ | |--protocol
+
+:contract-demos - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
+ |--minimum - hello world of smart contracts
+ | |--states
+ | |--contract
+ | |--protocol
+ |--demo1 - something for an external developer to start working on
+ | |--states
+ | |--contract
+ | |--protocol
+ |--webapp - some simple web content that calls against JAX-RS to exercise the demo contracts. Content registered via the extensions-api
+ | |--minimum
+ | |--demo1
+
+:node - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
+ |--bootstrap - start\stop sequence, config loading, dependency injection, loading service plugins,etc
+ |--clientapi - implementation of the common public API entry point via JAX-RS, MQ, etc, perhaps does some security checking and then passes to actual services
+ |--recovery - code to carry out checking on startup and possibly recovery\undo\redo of the transactions
+ |--services - services listed below are only suggestions!!
+ | |--api - internal non-serialised service interfaces and data types. Used for decoupling
+ | |--messaging
+ | |--networkmapper
+ | |--persistence
+ | |--identity
+ | |--notary
+ | |--protocol - node side implementation of primitives exposed to contracts
+ | |--statemachine
+ | |--scheduler
+ | |--contractsandbox
+ | |--wallet
+ |--configuration
+ |--utilities
From 8beaf08239dafdb56de88771b437751ee9be17df Mon Sep 17 00:00:00 2001
From: Matthew Nesbit
Date: Wed, 11 May 2016 16:56:45 +0100
Subject: [PATCH 04/10] Convert proposed structure into a doc source file and
include in index
---
docs/source/index.rst | 1 +
.../source/project-structure-proposal.rst | 58 ++++++++++++++-----
2 files changed, 45 insertions(+), 14 deletions(-)
rename project-structure-proposal.txt => docs/source/project-structure-proposal.rst (56%)
diff --git a/docs/source/index.rst b/docs/source/index.rst
index d633ffb715..43432854c4 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -49,4 +49,5 @@ Read on to learn:
visualiser
codestyle
building-the-docs
+ project-structure-proposal
diff --git a/project-structure-proposal.txt b/docs/source/project-structure-proposal.rst
similarity index 56%
rename from project-structure-proposal.txt
rename to docs/source/project-structure-proposal.rst
index 524d0d190b..6ccb79d121 100644
--- a/project-structure-proposal.txt
+++ b/docs/source/project-structure-proposal.rst
@@ -1,36 +1,58 @@
Proposed module structure
+=========================
-:r3prototyping - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
+``:r3prototyping`` - gradle top level module. No actual code, just resources for this project to make distributable artefacts, plus drives build of code modules.
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--docs - docs for developers
- |--scripts - scripts to start\stop nodes, run demos, etc
+ |--scripts - scripts to start/stop nodes, run demos, etc
|--tools - utilities such as tools to create keys, etc
|--libs - external libs not available on maven, or signed specific versions
|--contracts - fully signed and versioned contract jars for approved contracts that other contracts might reference.
-:core - gradle module for language helpers, pure algorithms, etc
+``:utilities`` - gradle module for language helpers, pure algorithms, etc
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--crypto - helpers for crypto
|--math - helpers for calculations e.g. financial rounding
|--utilities - stuff
-:client-api - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
+``:client-api`` - gradle module for a jar that can be embedded inside JVM compatible clients. Depends only on :core
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--api - standard rpc services exposed on a node for supporting bank side interactions and node management
|--transport - support for concrete transport layers
| |--jaxrs - e.g. annotated api interface for rest-json
| |--mq - e.g. wrapper for using messaging to communicate to the node
- |--serialization - abstraction\helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
+ |--serialization - abstraction/helpers for client side serialisation via JSON (e.g. pre-configured jackson mapper), Kryo, etc (doesn't have to line up with node to node communication formats)
-:contract-api - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
+``:contract-api`` - Gradle module to make minimum jar library required to write a contract jar, but should not contain business logic. Depends only on :core
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--financetypes - basic finance types and helpers
|--protocol
| |--api - node services available internally only to contracts.
| |--core - protocol support and implementation functions e.g. our TwoPartyDealProtocol
- |--contract - base\abstract types for smart contracts e.g ContractState, Transaction, Command
- |--extensionsapi - marker interfaces\annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
- |--utilities - helpers\builders without any business logic
+ |--contract - base/abstract types for smart contracts e.g ContractState, Transaction, Command
+ |--extensionsapi - marker interfaces/annotations for contracts to extend a node's public network interface and allow clients to interact with a contract e.g. register a servlet
+ |--utilities - helpers/builders without any business logic
|--test - hooks to allow testability of contracts
|--serialization - helpers for state object storage and transport by nodes
-:contract-core - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
+``:base-contract`` - Gradle module for important financial concepts modelled as smart contracts. R3 mjaintained reference implementations. Depends upon :core and :contract-api.
+
+.. code-block:: none
+
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--validators - helpers for standard business validations e.g. must be positive, net cash must be equal, etc
|--utilities - some common code for business day calculations and holiday oracle
|--cash
@@ -46,7 +68,11 @@ Proposed module structure
| |--contract
| |--protocol
-:contract-demos - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
+``:demos`` - Gradle module for external developers to play with and modify. Depends upon :core, :contract-api and :contract-core for complicated contracts
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
|--minimum - hello world of smart contracts
| |--states
| |--contract
@@ -59,10 +85,14 @@ Proposed module structure
| |--minimum
| |--demo1
-:node - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
- |--bootstrap - start\stop sequence, config loading, dependency injection, loading service plugins,etc
+``:node`` - Gradle module for the actual runtime implementation of node. Must NOT depend upon :contract-core, or :contract-demos, otherwise references :core, :client-api and :contract-api
+
+.. code-block:: none
+
+ folders/namespaces under src/main/kotlin and src/test/kotlin
+ |--bootstrap - start/stop sequence, config loading, dependency injection, loading service plugins,etc
|--clientapi - implementation of the common public API entry point via JAX-RS, MQ, etc, perhaps does some security checking and then passes to actual services
- |--recovery - code to carry out checking on startup and possibly recovery\undo\redo of the transactions
+ |--recovery - code to carry out checking on startup and possibly recovery/undo/redo of the transactions
|--services - services listed below are only suggestions!!
| |--api - internal non-serialised service interfaces and data types. Used for decoupling
| |--messaging
From 058ac986bd76b4da6416dbd22c3dfcedf5d8456a Mon Sep 17 00:00:00 2001
From: Matthew Nesbit
Date: Sat, 14 May 2016 13:47:07 +0100
Subject: [PATCH 05/10] Move contracts base files to namespace to make api
aspect clearer in includes. Move Party to core.crypto as Party is closely
aligned with the signing and used in code areas unrelated to the contract
code.
---
.../kotlin/contracts/AnotherDummyContract.kt | 4 +-
.../kotlin/core/node/DummyContractBackdoor.kt | 11 +-
.../java/contracts/ICommercialPaperState.java | 4 +-
.../java/contracts/JavaCommercialPaper.java | 9 +-
contracts/src/main/kotlin/contracts/Cash.kt | 6 +-
.../main/kotlin/contracts/CommercialPaper.kt | 2 +
.../src/main/kotlin/contracts/CrowdFund.kt | 4 +-
.../main/kotlin/contracts/DummyContract.kt | 2 +
contracts/src/main/kotlin/contracts/IRS.kt | 10 +-
.../src/main/kotlin/contracts/IRSUtils.kt | 4 +-
.../contracts/cash/CashIssuanceDefinition.kt | 4 +-
.../kotlin/contracts/cash/CommonCashState.kt | 6 +-
.../core/{ => contracts}/ContractsDSL.kt | 4 +-
.../core/{ => contracts}/FinanceTypes.kt | 5 +-
.../kotlin/core/{ => contracts}/Structures.kt | 15 +-
.../{ => contracts}/TransactionBuilder.kt | 6 +-
.../{ => contracts}/TransactionGraphSearch.kt | 5 +-
.../core/{ => contracts}/TransactionTools.kt | 6 +-
.../TransactionVerification.kt | 4 +-
.../core/{ => contracts}/Transactions.kt | 4 +-
.../kotlin/core/crypto/CryptoUtilities.kt | 2 +-
core/src/main/kotlin/core/crypto/Party.kt | 16 +
.../core/node/AttachmentsClassLoader.kt | 2 +-
core/src/main/kotlin/core/node/NodeInfo.kt | 2 +-
core/src/main/kotlin/core/node/ServiceHub.kt | 1 +
.../core/node/services/AttachmentStorage.kt | 2 +-
.../core/node/services/IdentityService.kt | 2 +-
.../core/node/services/UniquenessProvider.kt | 6 +-
.../core/node/subsystems/NetworkMapCache.kt | 4 +-
.../kotlin/core/node/subsystems/Services.kt | 2 +
.../main/kotlin/core/serialization/Kryo.kt | 1 +
.../protocols/FetchAttachmentsProtocol.kt | 2 +-
.../kotlin/protocols/FetchDataProtocol.kt | 2 +-
.../protocols/FetchTransactionsProtocol.kt | 2 +-
.../main/kotlin/protocols/NotaryProtocol.kt | 6 +-
.../main/kotlin/protocols/RatesFixProtocol.kt | 4 +
.../protocols/ResolveTransactionsProtocol.kt | 1 +
.../kotlin/protocols/TwoPartyDealProtocol.kt | 2 +
.../{ => contracts}/LondonHolidayCalendar.txt | 0
.../NewYorkHolidayCalendar.txt | 0
core/src/test/kotlin/core/FinanceTypesTest.kt | 1 +
.../build/html/_sources/tutorial_contract.txt | 2 +-
docs/build/html/api/alltypes/index.html | 84 +-
.../commit-transaction.html | 4 +-
.../api/-a-p-i-server-impl/fetch-states.html | 4 +-
.../generate-transaction-signature.html | 4 +-
.../api/api/-a-p-i-server-impl/index.html | 6 +-
.../api/-a-p-i-server/commit-transaction.html | 4 +-
.../api/api/-a-p-i-server/fetch-states.html | 4 +-
.../generate-transaction-signature.html | 4 +-
.../html/api/api/-a-p-i-server/index.html | 6 +-
.../-cash/-commands/-exit/-init-.html | 2 +-
.../-cash/-commands/-exit/index.html | 2 +-
.../-cash/-commands/-move/index.html | 2 +-
.../api/contracts/-cash/-state/-init-.html | 2 +-
.../api/contracts/-cash/-state/index.html | 2 +-
.../api/contracts/-cash/generate-issue.html | 4 +-
.../api/contracts/-cash/generate-spend.html | 4 +-
.../build/html/api/contracts/-cash/index.html | 6 +-
.../html/api/contracts/-cash/verify.html | 4 +-
.../-commands/-issue/index.html | 2 +-
.../-commands/-move/index.html | 2 +-
.../-commands/-redeem/index.html | 2 +-
.../-commercial-paper/-state/-init-.html | 2 +-
.../-commercial-paper/-state/index.html | 6 +-
.../-state/with-face-value.html | 4 +-
.../-state/with-issuance.html | 4 +-
.../-commercial-paper/generate-issue.html | 4 +-
.../-commercial-paper/generate-move.html | 4 +-
.../-commercial-paper/generate-redeem.html | 4 +-
.../contracts/-commercial-paper/index.html | 8 +-
.../contracts/-commercial-paper/verify.html | 4 +-
.../-crowd-fund/-campaign/-init-.html | 2 +-
.../-crowd-fund/-campaign/index.html | 2 +-
.../-crowd-fund/-commands/-close/index.html | 2 +-
.../-crowd-fund/-commands/-pledge/index.html | 2 +-
.../-commands/-register/index.html | 2 +-
.../contracts/-crowd-fund/-pledge/-init-.html | 2 +-
.../contracts/-crowd-fund/-pledge/index.html | 2 +-
.../contracts/-crowd-fund/generate-close.html | 4 +-
.../-crowd-fund/generate-pledge.html | 4 +-
.../-crowd-fund/generate-register.html | 4 +-
.../html/api/contracts/-crowd-fund/index.html | 8 +-
.../api/contracts/-crowd-fund/verify.html | 4 +-
.../html/api/contracts/-deal-state/index.html | 4 +-
.../-deal-state/with-public-key.html | 4 +-
.../-commands/-create/index.html | 2 +-
.../-dummy-contract/generate-initial.html | 4 +-
.../api/contracts/-dummy-contract/index.html | 4 +-
.../api/contracts/-dummy-contract/verify.html | 4 +-
.../-fixable-deal-state/generate-fix.html | 4 +-
.../contracts/-fixable-deal-state/index.html | 4 +-
.../-fixed-rate-payment-event/-init-.html | 2 +-
.../-fixed-rate-payment-event/index.html | 2 +-
.../-floating-rate-payment-event/-init-.html | 2 +-
.../-floating-rate-payment-event/copy.html | 4 +-
.../-floating-rate-payment-event/index.html | 4 +-
.../-init-.html | 2 +-
.../index.html | 2 +-
.../-calculation/-init-.html | 2 +-
.../-calculation/index.html | 2 +-
.../-commands/-agree/index.html | 2 +-
.../-commands/-fix/index.html | 2 +-
.../-commands/-mature/index.html | 2 +-
.../-commands/-pay/index.html | 2 +-
.../-common-leg/-init-.html | 2 +-
.../-common-leg/index.html | 2 +-
.../-interest-rate-swap/-common/-init-.html | 2 +-
.../-interest-rate-swap/-common/index.html | 2 +-
.../-fixed-leg/-init-.html | 2 +-
.../-interest-rate-swap/-fixed-leg/copy.html | 4 +-
.../-interest-rate-swap/-fixed-leg/index.html | 4 +-
.../-floating-leg/-init-.html | 2 +-
.../-floating-leg/copy.html | 4 +-
.../-floating-leg/index.html | 4 +-
.../-state/evaluate-calculation.html | 4 +-
.../-state/generate-fix.html | 4 +-
.../-interest-rate-swap/-state/index.html | 6 +-
.../-state/with-public-key.html | 4 +-
.../-interest-rate-swap/generate-fix.html | 4 +-
.../contracts/-interest-rate-swap/index.html | 4 +-
.../contracts/-interest-rate-swap/verify.html | 4 +-
.../contracts/-rate-payment-event/-init-.html | 2 +-
.../contracts/-rate-payment-event/index.html | 2 +-
.../api/contracts/-reference-rate/-init-.html | 2 +-
.../api/contracts/-reference-rate/index.html | 2 +-
docs/build/html/api/contracts/index.html | 2 +-
.../kotlin.collections.-iterable/index.html | 4 +-
.../sum-cash-by.html | 4 +-
.../sum-cash-or-null.html | 2 +-
.../sum-cash-or-zero.html | 4 +-
.../sum-cash.html | 2 +-
docs/build/html/api/contracts/times.html | 4 +-
.../-legally-identifiable/-init-.html | 2 +-
.../-legally-identifiable/index.html | 2 +-
.../java.security.-key-pair/index.html | 4 +-
.../sign-with-e-c-d-s-a.html | 8 +-
.../-identity-service/index.html | 2 +-
.../-identity-service/register-identity.html | 4 +-
.../-query-identity-request/-init-.html | 2 +-
.../-query-identity-request/index.html | 2 +-
.../-fix-container/-init-.html | 2 +-
.../-fix-container/get.html | 4 +-
.../-fix-container/index.html | 4 +-
.../-interpolating-rate-map/-init-.html | 2 +-
.../-interpolating-rate-map/get-rate.html | 4 +-
.../-interpolating-rate-map/index.html | 4 +-
.../-node-interest-rates/-oracle/-init-.html | 2 +-
.../-node-interest-rates/-oracle/index.html | 6 +-
.../-node-interest-rates/-oracle/query.html | 4 +-
.../-node-interest-rates/-oracle/sign.html | 4 +-
.../-unknown-fix/-init-.html | 2 +-
.../-unknown-fix/index.html | 2 +-
.../-node-timestamper-service/-init-.html | 2 +-
.../-node-timestamper-service/index.html | 2 +-
.../-timestamper-service/index.html | 2 +-
.../-timestamper-service/timestamp.html | 4 +-
.../-in-memory-identity-service/index.html | 2 +-
.../register-identity.html | 4 +-
.../get-recommended.html | 4 +-
.../-in-memory-network-map-cache/index.html | 2 +-
.../-network-map-cache/get-recommended.html | 4 +-
.../-network-map-cache/index.html | 2 +-
.../fill-with-some-test-cash.html | 4 +-
.../-node-wallet-service/index.html | 8 +-
.../-node-wallet-service/notify-all.html | 4 +-
.../-storage-service-impl/-init-.html | 2 +-
.../-storage-service-impl/index.html | 2 +-
.../-wallet-impl/-init-.html | 2 +-
.../-wallet-impl/index.html | 2 +-
.../-wallet-service/index.html | 6 +-
.../-wallet-service/notify-all.html | 4 +-
.../-wallet-service/notify.html | 4 +-
.../-wallet-service/states-for-refs.html | 4 +-
.../construct-storage-service.html | 4 +-
.../api/core.node/-abstract-node/index.html | 2 +-
.../-attachments-class-loader/-init-.html | 2 +-
.../-attachments-class-loader/index.html | 2 +-
.../html/api/core.node/-node-info/-init-.html | 2 +-
.../html/api/core.node/-node-info/index.html | 2 +-
.../build/html/api/core.node/-node/index.html | 2 +-
.../api/core.node/-service-hub/index.html | 4 +-
.../-service-hub/record-transactions.html | 4 +-
.../-service-hub/verify-transaction.html | 4 +-
.../-serialized-bytes/index.html | 2 +-
.../-wire-transaction-serializer/index.html | 4 +-
.../-wire-transaction-serializer/read.html | 4 +-
.../-wire-transaction-serializer/write.html | 4 +-
.../api/core.serialization/deserialize.html | 4 +-
.../html/api/core.serialization/index.html | 2 +-
.../-mock-identity-service/-init-.html | 2 +-
.../-mock-identity-service/index.html | 4 +-
.../register-identity.html | 4 +-
.../delete-registration.html | 4 +-
.../-mock-network-map-cache/index.html | 4 +-
.../-mock-network/-mock-node/index.html | 2 +-
.../-party-serializer/index.html | 2 +-
.../-party-serializer/serialize.html | 4 +-
docs/build/html/api/core/-amount/-init-.html | 4 +-
.../html/api/core/-amount/compare-to.html | 4 +-
.../build/html/api/core/-amount/currency.html | 2 +-
docs/build/html/api/core/-amount/div.html | 8 +-
docs/build/html/api/core/-amount/index.html | 18 +-
docs/build/html/api/core/-amount/minus.html | 4 +-
docs/build/html/api/core/-amount/pennies.html | 2 +-
docs/build/html/api/core/-amount/plus.html | 4 +-
docs/build/html/api/core/-amount/times.html | 8 +-
.../html/api/core/-amount/to-string.html | 2 +-
.../api/core/-attachment/extract-file.html | 4 +-
.../html/api/core/-attachment/index.html | 2 +-
.../api/core/-attachment/open-as-j-a-r.html | 2 +-
.../build/html/api/core/-attachment/open.html | 2 +-
.../core/-authenticated-object/-init-.html | 2 +-
.../api/core/-authenticated-object/index.html | 2 +-
.../core/-authenticated-object/signers.html | 2 +-
.../signing-parties.html | 2 +-
.../api/core/-authenticated-object/value.html | 2 +-
.../-t-e-s-t_-c-a-l-e-n-d-a-r_-d-a-t-a.html | 2 +-
.../-unknown-calendar/-init-.html | 2 +-
.../-unknown-calendar/index.html | 2 +-
.../apply-roll-convention.html | 4 +-
.../core/-business-calendar/calendars.html | 4 +-
.../create-generic-schedule.html | 4 +-
.../api/core/-business-calendar/equals.html | 4 +-
.../core/-business-calendar/get-instance.html | 4 +-
.../core/-business-calendar/hash-code.html | 2 +-
.../-business-calendar/holiday-dates.html | 2 +-
.../api/core/-business-calendar/index.html | 14 +-
.../-business-calendar/is-working-day.html | 4 +-
.../move-business-days.html | 4 +-
.../parse-date-from-string.html | 4 +-
docs/build/html/api/core/-command/-init-.html | 4 +-
docs/build/html/api/core/-command/index.html | 2 +-
.../build/html/api/core/-command/signers.html | 2 +-
.../html/api/core/-command/to-string.html | 2 +-
docs/build/html/api/core/-command/value.html | 2 +-
.../api/core/-contract-state/contract.html | 2 +-
docs/build/html/api/core/-contract/index.html | 2 +-
.../-contract/legal-contract-reference.html | 2 +-
.../build/html/api/core/-contract/verify.html | 4 +-
.../-actual/direction.html | 2 +-
.../-actual/is-modified.html | 2 +-
.../-following/direction.html | 2 +-
.../-following/is-modified.html | 2 +-
.../-modified-following/direction.html | 2 +-
.../-modified-following/is-modified.html | 2 +-
.../-modified-previous/direction.html | 2 +-
.../-modified-previous/is-modified.html | 2 +-
.../-previous/direction.html | 2 +-
.../-previous/is-modified.html | 2 +-
.../core/-date-roll-convention/direction.html | 2 +-
.../-date-roll-convention/is-modified.html | 2 +-
.../api/core/-date-roll-direction/value.html | 2 +-
.../core/-day-count-basis-day/to-string.html | 2 +-
.../core/-day-count-basis-year/to-string.html | 2 +-
.../-expression-deserializer/deserialize.html | 4 +-
.../core/-expression-deserializer/index.html | 2 +-
.../core/-expression-serializer/index.html | 2 +-
.../-expression-serializer/serialize.html | 4 +-
.../html/api/core/-expression/-init-.html | 2 +-
.../build/html/api/core/-expression/expr.html | 2 +-
.../html/api/core/-expression/index.html | 2 +-
docs/build/html/api/core/-fix-of/-init-.html | 2 +-
docs/build/html/api/core/-fix-of/for-day.html | 2 +-
docs/build/html/api/core/-fix-of/index.html | 2 +-
docs/build/html/api/core/-fix-of/name.html | 2 +-
.../build/html/api/core/-fix-of/of-tenor.html | 2 +-
docs/build/html/api/core/-fix/-init-.html | 2 +-
docs/build/html/api/core/-fix/index.html | 2 +-
docs/build/html/api/core/-fix/of.html | 2 +-
docs/build/html/api/core/-fix/value.html | 2 +-
.../api/core/-frequency/-annual/index.html | 2 +-
.../api/core/-frequency/-annual/offset.html | 4 +-
.../api/core/-frequency/-bi-weekly/index.html | 2 +-
.../core/-frequency/-bi-weekly/offset.html | 4 +-
.../api/core/-frequency/-monthly/index.html | 2 +-
.../api/core/-frequency/-monthly/offset.html | 4 +-
.../api/core/-frequency/-quarterly/index.html | 2 +-
.../core/-frequency/-quarterly/offset.html | 4 +-
.../core/-frequency/-semi-annual/index.html | 2 +-
.../core/-frequency/-semi-annual/offset.html | 4 +-
.../api/core/-frequency/-weekly/index.html | 2 +-
.../api/core/-frequency/-weekly/offset.html | 4 +-
.../-frequency/annual-compound-count.html | 2 +-
.../build/html/api/core/-frequency/index.html | 2 +-
.../html/api/core/-frequency/offset.html | 4 +-
.../api/core/-ledger-transaction/-init-.html | 2 +-
.../core/-ledger-transaction/attachments.html | 2 +-
.../core/-ledger-transaction/commands.html | 2 +-
.../html/api/core/-ledger-transaction/id.html | 2 +-
.../api/core/-ledger-transaction/index.html | 4 +-
.../api/core/-ledger-transaction/inputs.html | 2 +-
.../api/core/-ledger-transaction/out-ref.html | 4 +-
.../api/core/-ledger-transaction/outputs.html | 2 +-
.../html/api/core/-linear-state/index.html | 2 +-
.../api/core/-linear-state/is-relevant.html | 4 +-
.../html/api/core/-linear-state/thread.html | 2 +-
.../html/api/core/-named-by-hash/id.html | 2 +-
.../html/api/core/-ownable-state/index.html | 2 +-
.../html/api/core/-ownable-state/owner.html | 2 +-
.../core/-ownable-state/with-new-owner.html | 4 +-
.../api/core/-party-and-reference/-init-.html | 2 +-
.../api/core/-party-and-reference/index.html | 2 +-
.../api/core/-party-and-reference/party.html | 2 +-
.../core/-party-and-reference/reference.html | 2 +-
.../core/-party-and-reference/to-string.html | 2 +-
.../api/core/-party-reference/-init-.html | 2 +-
.../html/api/core/-party-reference/index.html | 2 +-
docs/build/html/api/core/-party/-init-.html | 2 +-
docs/build/html/api/core/-party/index.html | 6 +-
docs/build/html/api/core/-party/name.html | 2 +-
.../html/api/core/-party/owning-key.html | 2 +-
docs/build/html/api/core/-party/ref.html | 8 +-
.../build/html/api/core/-party/to-string.html | 2 +-
.../build/html/api/core/-requirements/by.html | 4 +-
.../html/api/core/-requirements/index.html | 2 +-
.../api/core/-signed-transaction/-init-.html | 2 +-
.../html/api/core/-signed-transaction/id.html | 2 +-
.../api/core/-signed-transaction/index.html | 10 +-
.../api/core/-signed-transaction/plus.html | 4 +-
.../api/core/-signed-transaction/sigs.html | 2 +-
.../api/core/-signed-transaction/tx-bits.html | 2 +-
.../html/api/core/-signed-transaction/tx.html | 2 +-
.../verify-signatures.html | 2 +-
.../api/core/-signed-transaction/verify.html | 4 +-
.../with-additional-signature.html | 4 +-
.../html/api/core/-state-and-ref/-init-.html | 2 +-
.../html/api/core/-state-and-ref/index.html | 2 +-
.../html/api/core/-state-and-ref/ref.html | 2 +-
.../html/api/core/-state-and-ref/state.html | 2 +-
.../html/api/core/-state-ref/--index--.html | 2 +-
.../html/api/core/-state-ref/-init-.html | 2 +-
.../build/html/api/core/-state-ref/index.html | 2 +-
.../html/api/core/-state-ref/to-string.html | 2 +-
.../html/api/core/-state-ref/txhash.html | 2 +-
docs/build/html/api/core/-tenor/-init-.html | 2 +-
.../html/api/core/-tenor/-time-unit/code.html | 2 +-
.../api/core/-tenor/days-to-maturity.html | 4 +-
docs/build/html/api/core/-tenor/index.html | 4 +-
docs/build/html/api/core/-tenor/name.html | 2 +-
.../build/html/api/core/-tenor/to-string.html | 2 +-
.../api/core/-timestamp-command/-init-.html | 4 +-
.../api/core/-timestamp-command/after.html | 2 +-
.../api/core/-timestamp-command/before.html | 2 +-
.../api/core/-timestamp-command/index.html | 2 +-
.../api/core/-timestamp-command/midpoint.html | 2 +-
.../api/core/-transaction-builder/-init-.html | 2 +-
.../-transaction-builder/add-attachment.html | 4 +-
.../-transaction-builder/add-command.html | 12 +-
.../-transaction-builder/add-input-state.html | 4 +-
.../add-output-state.html | 4 +-
.../add-signature-unchecked.html | 4 +-
.../-transaction-builder/attachments.html | 2 +-
.../check-and-add-signature.html | 4 +-
.../-transaction-builder/check-signature.html | 4 +-
.../core/-transaction-builder/commands.html | 2 +-
.../api/core/-transaction-builder/index.html | 30 +-
.../-transaction-builder/input-states.html | 2 +-
.../-transaction-builder/output-states.html | 2 +-
.../core/-transaction-builder/set-time.html | 6 +-
.../core/-transaction-builder/sign-with.html | 4 +-
.../api/core/-transaction-builder/time.html | 2 +-
.../core/-transaction-builder/timestamp.html | 4 +-
.../to-signed-transaction.html | 4 +-
.../to-wire-transaction.html | 2 +-
.../core/-transaction-builder/with-items.html | 4 +-
.../-init-.html | 2 +-
.../conflict-ref.html | 2 +-
.../index.html | 2 +-
.../-transaction-conflict-exception/tx1.html | 2 +-
.../-transaction-conflict-exception/tx2.html | 2 +-
.../-in-out-group/-init-.html | 2 +-
.../-in-out-group/grouping-key.html | 2 +-
.../-in-out-group/index.html | 2 +-
.../-in-out-group/inputs.html | 2 +-
.../-in-out-group/outputs.html | 2 +-
.../-transaction-for-verification/-init-.html | 2 +-
.../attachments.html | 2 +-
.../commands.html | 2 +-
.../-transaction-for-verification/equals.html | 4 +-
.../get-timestamp-by.html | 4 +-
.../group-states-internal.html | 4 +-
.../group-states.html | 8 +-
.../hash-code.html | 2 +-
.../in-states.html | 2 +-
.../-transaction-for-verification/index.html | 12 +-
.../orig-hash.html | 2 +-
.../out-states.html | 2 +-
.../-transaction-for-verification/verify.html | 2 +-
.../-transaction-graph-search/-init-.html | 2 +-
.../-query/-init-.html | 2 +-
.../-query/index.html | 2 +-
.../-query/with-command-of-type.html | 2 +-
.../core/-transaction-graph-search/call.html | 2 +-
.../core/-transaction-graph-search/index.html | 2 +-
.../core/-transaction-graph-search/query.html | 2 +-
.../start-points.html | 2 +-
.../transactions.html | 2 +-
.../api/core/-transaction-group/-init-.html | 6 +-
.../api/core/-transaction-group/index.html | 2 +-
.../non-verified-roots.html | 2 +-
.../core/-transaction-group/transactions.html | 2 +-
.../api/core/-transaction-group/verify.html | 2 +-
.../-init-.html | 2 +-
.../hash.html | 2 +-
.../index.html | 2 +-
.../-init-.html | 2 +-
.../contract.html | 2 +-
.../index.html | 2 +-
.../tx.html | 2 +-
.../core/-type-only-command-data/equals.html | 4 +-
.../-type-only-command-data/hash-code.html | 2 +-
.../core/-type-only-command-data/index.html | 2 +-
.../api/core/-wire-transaction/-init-.html | 2 +-
.../core/-wire-transaction/attachments.html | 2 +-
.../api/core/-wire-transaction/commands.html | 2 +-
.../core/-wire-transaction/deserialize.html | 4 +-
.../html/api/core/-wire-transaction/id.html | 2 +-
.../api/core/-wire-transaction/index.html | 10 +-
.../api/core/-wire-transaction/inputs.html | 2 +-
.../api/core/-wire-transaction/out-ref.html | 8 +-
.../api/core/-wire-transaction/outputs.html | 2 +-
.../core/-wire-transaction/serialized.html | 2 +-
.../api/core/-wire-transaction/to-string.html | 2 +-
.../html/api/core/calculate-days-between.html | 4 +-
docs/build/html/api/core/hash.html | 2 +-
docs/build/html/api/core/index.html | 10 +-
.../api/core/java.time.-local-date/index.html | 2 +-
.../java.time.-local-date/is-working-day.html | 4 +-
.../kotlin.collections.-iterable/index.html | 2 +-
.../sum-or-null.html | 2 +-
.../sum-or-throw.html | 2 +-
.../sum-or-zero.html | 4 +-
.../filter-states-of-type.html | 2 +-
.../get-timestamp-by-name.html | 4 +-
.../get-timestamp-by.html | 4 +-
.../core/kotlin.collections.-list/index.html | 8 +-
.../require-single-command.html | 6 +-
.../core/kotlin.collections.-list/select.html | 4 +-
docs/build/html/api/core/require-that.html | 4 +-
.../html/api/core/to-ledger-transaction.html | 4 +-
.../html/api/core/verify-move-commands.html | 4 +-
.../core/verify-to-ledger-transaction.html | 4 +-
.../-handler/-callback/-init-.html | 2 +-
.../-handler/-callback/index.html | 4 +-
.../-handler/-callback/on-success.html | 4 +-
.../-requester/index.html | 2 +-
.../-requester/not-us.html | 4 +-
.../-updater/index.html | 4 +-
.../-updater/process-deal.html | 4 +-
.../-updater/process-interest-rate-swap.html | 4 +-
docs/build/html/api/index-outline.html | 846 +++++++++---------
.../-fetch-attachments-protocol/index.html | 2 +-
.../maybe-write-to-disk.html | 4 +-
.../protocols/-rates-fix-protocol/-init-.html | 2 +-
.../-query-request/-init-.html | 2 +-
.../-query-request/index.html | 2 +-
.../-sign-request/-init-.html | 2 +-
.../-sign-request/index.html | 2 +-
.../-rates-fix-protocol/before-signing.html | 4 +-
.../protocols/-rates-fix-protocol/index.html | 4 +-
.../-init-.html | 4 +-
.../-resolve-transactions-protocol/index.html | 4 +-
.../-timestamping-protocol/-client/index.html | 2 +-
.../-client/timestamp.html | 4 +-
.../-timestamping-protocol/-init-.html | 2 +-
.../-request/-init-.html | 2 +-
.../-request/index.html | 2 +-
.../-timestamping-protocol/index.html | 2 +-
.../-acceptor/-init-.html | 2 +-
.../-acceptor/index.html | 2 +-
.../-deal-mismatch-exception/-init-.html | 2 +-
.../-deal-mismatch-exception/index.html | 2 +-
.../-deal-ref-mismatch-exception/-init-.html | 2 +-
.../-deal-ref-mismatch-exception/index.html | 2 +-
.../-fixer/-init-.html | 2 +-
.../-fixer/assemble-shared-t-x.html | 4 +-
.../-fixer/index.html | 6 +-
.../-fixer/validate-handshake.html | 4 +-
.../-floater/-init-.html | 2 +-
.../-floater/index.html | 6 +-
.../-instigator/index.html | 4 +-
.../-primary/index.html | 4 +-
.../-primary/sign-with-our-key.html | 4 +-
.../-primary/verify-partial-transaction.html | 4 +-
.../-secondary/-init-.html | 2 +-
.../-secondary/index.html | 2 +-
.../-buyer/-init-.html | 2 +-
.../-buyer/index.html | 2 +-
.../-seller-trade-info/-init-.html | 2 +-
.../-seller-trade-info/index.html | 2 +-
.../-seller/-init-.html | 2 +-
.../-seller/index.html | 4 +-
.../-seller/sign-with-our-key.html | 4 +-
.../-unacceptable-price-exception/-init-.html | 2 +-
.../-unacceptable-price-exception/index.html | 2 +-
.../-two-party-trade-protocol/index.html | 4 +-
.../-two-party-trade-protocol/run-buyer.html | 4 +-
.../-two-party-trade-protocol/run-seller.html | 4 +-
docs/source/tutorial_contract.rst | 2 +-
gradle.properties | 2 +-
src/main/kotlin/api/APIServer.kt | 8 +-
src/main/kotlin/api/APIServerImpl.kt | 1 +
src/main/kotlin/core/node/AbstractNode.kt | 2 +-
.../services/InMemoryUniquenessProvider.kt | 6 +-
.../core/node/services/NetworkMapService.kt | 2 +-
.../node/services/NodeAttachmentService.kt | 2 +-
.../core/node/services/NodeInterestRates.kt | 2 +
.../core/node/services/NotaryService.kt | 6 +-
.../core/node/services/TimestampChecker.kt | 2 +-
.../node/subsystems/DataVendingService.kt | 2 +-
.../subsystems/InMemoryIdentityService.kt | 2 +-
.../subsystems/InMemoryNetworkMapCache.kt | 4 +-
.../core/node/subsystems/NodeWalletService.kt | 2 +
.../node/subsystems/StorageServiceImpl.kt | 4 +-
.../kotlin/core/node/subsystems/WalletImpl.kt | 8 +-
src/main/kotlin/core/testing/IRSSimulation.kt | 2 +
.../core/testing/MockIdentityService.kt | 2 +-
.../core/testing/MockNetworkMapCache.kt | 2 +-
src/main/kotlin/core/testing/MockNode.kt | 2 +-
.../kotlin/core/testing/TradeSimulation.kt | 4 +-
src/main/kotlin/core/utilities/JsonSupport.kt | 4 +-
src/main/kotlin/demos/IRSDemo.kt | 2 +-
src/main/kotlin/demos/RateFixDemo.kt | 4 +
src/main/kotlin/demos/TraderDemo.kt | 2 +
.../demos/protocols/AutoOfferProtocol.kt | 6 +-
.../protocols/UpdateBusinessDayProtocol.kt | 4 +-
.../kotlin/protocols/TwoPartyTradeProtocol.kt | 2 +
src/test/kotlin/contracts/CashTests.kt | 2 +
.../kotlin/contracts/CommercialPaperTests.kt | 1 +
src/test/kotlin/contracts/CrowdFundTests.kt | 1 +
src/test/kotlin/contracts/IRSTests.kt | 1 +
src/test/kotlin/core/MockServices.kt | 1 +
src/test/kotlin/core/TransactionGroupTests.kt | 1 +
.../kotlin/core/messaging/AttachmentTests.kt | 2 +-
.../messaging/TwoPartyTradeProtocolTests.kt | 6 +-
.../core/node/AttachmentClassLoaderTests.kt | 2 +
.../node/services/NodeInterestRatesTest.kt | 6 +-
.../core/node/services/NotaryServiceTests.kt | 2 +-
.../node/services/TimestampCheckerTests.kt | 2 +-
.../node/services/UniquenessProviderTests.kt | 2 +-
.../node/subsystems/NodeWalletServiceTest.kt | 4 +
.../TransactionSerializationTests.kt | 1 +
src/test/kotlin/core/testutils/TestUtils.kt | 1 +
.../core/visualiser/GroupToGraphConversion.kt | 4 +-
src/test/resources/core/node/isolated.jar | Bin 6912 -> 6945 bytes
546 files changed, 1384 insertions(+), 1287 deletions(-)
rename core/src/main/kotlin/core/{ => contracts}/ContractsDSL.kt (98%)
rename core/src/main/kotlin/core/{ => contracts}/FinanceTypes.kt (99%)
rename core/src/main/kotlin/core/{ => contracts}/Structures.kt (96%)
rename core/src/main/kotlin/core/{ => contracts}/TransactionBuilder.kt (97%)
rename core/src/main/kotlin/core/{ => contracts}/TransactionGraphSearch.kt (92%)
rename core/src/main/kotlin/core/{ => contracts}/TransactionTools.kt (88%)
rename core/src/main/kotlin/core/{ => contracts}/TransactionVerification.kt (99%)
rename core/src/main/kotlin/core/{ => contracts}/Transactions.kt (99%)
create mode 100644 core/src/main/kotlin/core/crypto/Party.kt
rename core/src/main/resources/core/{ => contracts}/LondonHolidayCalendar.txt (100%)
rename core/src/main/resources/core/{ => contracts}/NewYorkHolidayCalendar.txt (100%)
diff --git a/contracts/isolated/src/main/kotlin/contracts/AnotherDummyContract.kt b/contracts/isolated/src/main/kotlin/contracts/AnotherDummyContract.kt
index 32146ab88c..e2762df95c 100644
--- a/contracts/isolated/src/main/kotlin/contracts/AnotherDummyContract.kt
+++ b/contracts/isolated/src/main/kotlin/contracts/AnotherDummyContract.kt
@@ -9,6 +9,8 @@
package contracts.isolated
import core.*
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
// The dummy contract doesn't do anything useful. It exists for testing purposes.
@@ -36,6 +38,6 @@ class AnotherDummyContract : Contract, core.node.DummyContractBackdoor {
return TransactionBuilder().withItems(state, Command(Commands.Create(), owner.party.owningKey))
}
- override fun inspectState(state: core.ContractState): Int = (state as State).magicNumber
+ override fun inspectState(state: ContractState): Int = (state as State).magicNumber
}
\ No newline at end of file
diff --git a/contracts/isolated/src/main/kotlin/core/node/DummyContractBackdoor.kt b/contracts/isolated/src/main/kotlin/core/node/DummyContractBackdoor.kt
index 50f16869c9..22560d4f8a 100644
--- a/contracts/isolated/src/main/kotlin/core/node/DummyContractBackdoor.kt
+++ b/contracts/isolated/src/main/kotlin/core/node/DummyContractBackdoor.kt
@@ -1,7 +1,12 @@
package core.node
-interface DummyContractBackdoor {
- fun generateInitial(owner: core.PartyAndReference, magicNumber: Int, notary: core.Party): core.TransactionBuilder
+import core.contracts.ContractState
+import core.crypto.Party
+import core.contracts.PartyAndReference
+import core.contracts.TransactionBuilder
- fun inspectState(state: core.ContractState): Int
+interface DummyContractBackdoor {
+ fun generateInitial(owner: PartyAndReference, magicNumber: Int, notary: Party): TransactionBuilder
+
+ fun inspectState(state: ContractState): Int
}
\ No newline at end of file
diff --git a/contracts/src/main/java/contracts/ICommercialPaperState.java b/contracts/src/main/java/contracts/ICommercialPaperState.java
index 9c08b81539..5cde906a9d 100644
--- a/contracts/src/main/java/contracts/ICommercialPaperState.java
+++ b/contracts/src/main/java/contracts/ICommercialPaperState.java
@@ -1,6 +1,8 @@
package contracts;
-import core.*;
+import core.contracts.Amount;
+import core.contracts.ContractState;
+import core.contracts.PartyAndReference;
import java.security.*;
import java.time.*;
diff --git a/contracts/src/main/java/contracts/JavaCommercialPaper.java b/contracts/src/main/java/contracts/JavaCommercialPaper.java
index e3fe617bba..7b283c31f7 100644
--- a/contracts/src/main/java/contracts/JavaCommercialPaper.java
+++ b/contracts/src/main/java/contracts/JavaCommercialPaper.java
@@ -1,8 +1,9 @@
package contracts;
-import core.*;
-import core.TransactionForVerification.InOutGroup;
+import core.contracts.TransactionForVerification.InOutGroup;
+import core.contracts.*;
import core.crypto.NullPublicKey;
+import core.crypto.Party;
import core.crypto.SecureHash;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -11,7 +12,7 @@ import java.security.PublicKey;
import java.time.Instant;
import java.util.List;
-import static core.ContractsDSLKt.requireSingleCommand;
+import static core.contracts.ContractsDSLKt.requireSingleCommand;
import static kotlin.collections.CollectionsKt.single;
@@ -119,7 +120,7 @@ public class JavaCommercialPaper implements Contract {
}
}
- public static class Commands implements core.CommandData {
+ public static class Commands implements CommandData {
public static class Move extends Commands {
@Override
public boolean equals(Object obj) {
diff --git a/contracts/src/main/kotlin/contracts/Cash.kt b/contracts/src/main/kotlin/contracts/Cash.kt
index 6961688ef0..2707ea05a7 100644
--- a/contracts/src/main/kotlin/contracts/Cash.kt
+++ b/contracts/src/main/kotlin/contracts/Cash.kt
@@ -3,6 +3,8 @@ package contracts
import contracts.cash.CashIssuanceDefinition
import contracts.cash.CommonCashState
import core.*
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.utilities.Emoji
@@ -185,7 +187,7 @@ class Cash : Contract {
*/
@Throws(InsufficientBalanceException::class)
fun generateSpend(tx: TransactionBuilder, amount: Amount, to: PublicKey,
- cashStates: List>, onlyFromParties: Set? = null): List {
+ cashStates: List>, onlyFromParties: Set? = null): List {
// Discussion
//
// This code is analogous to the Wallet.send() set of methods in bitcoinj, and has the same general outline.
@@ -215,7 +217,7 @@ class Cash : Contract {
ofCurrency
}
- val gathered = arrayListOf>()
+ val gathered = arrayListOf>()
var gatheredAmount = Amount(0, currency)
for (c in acceptableCoins) {
if (gatheredAmount >= amount) break
diff --git a/contracts/src/main/kotlin/contracts/CommercialPaper.kt b/contracts/src/main/kotlin/contracts/CommercialPaper.kt
index 5e4587bfa3..57c970a5cc 100644
--- a/contracts/src/main/kotlin/contracts/CommercialPaper.kt
+++ b/contracts/src/main/kotlin/contracts/CommercialPaper.kt
@@ -1,7 +1,9 @@
package contracts
import core.*
+import core.contracts.*
import core.crypto.NullPublicKey
+import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.utilities.Emoji
diff --git a/contracts/src/main/kotlin/contracts/CrowdFund.kt b/contracts/src/main/kotlin/contracts/CrowdFund.kt
index 4b7709aaa0..13c4d12848 100644
--- a/contracts/src/main/kotlin/contracts/CrowdFund.kt
+++ b/contracts/src/main/kotlin/contracts/CrowdFund.kt
@@ -1,6 +1,8 @@
package contracts
import core.*
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
import java.security.PublicKey
import java.time.Instant
@@ -80,7 +82,7 @@ class CrowdFund : Contract {
when (command.value) {
is Commands.Register -> {
requireThat {
- "there is no input state" by tx.inStates.filterIsInstance().isEmpty()
+ "there is no input state" by tx.inStates.filterIsInstance().isEmpty()
"the transaction is signed by the owner of the crowdsourcing" by (command.signers.contains(outputCrowdFund.campaign.owner))
"the output registration is empty of pledges" by (outputCrowdFund.pledges.isEmpty())
"the output registration has a non-zero target" by (outputCrowdFund.campaign.target.pennies > 0)
diff --git a/contracts/src/main/kotlin/contracts/DummyContract.kt b/contracts/src/main/kotlin/contracts/DummyContract.kt
index b43fae4284..c47003d1f9 100644
--- a/contracts/src/main/kotlin/contracts/DummyContract.kt
+++ b/contracts/src/main/kotlin/contracts/DummyContract.kt
@@ -1,6 +1,8 @@
package contracts
import core.*
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
// The dummy contract doesn't do anything useful. It exists for testing purposes.
diff --git a/contracts/src/main/kotlin/contracts/IRS.kt b/contracts/src/main/kotlin/contracts/IRS.kt
index 503585bc52..d01c61f63d 100644
--- a/contracts/src/main/kotlin/contracts/IRS.kt
+++ b/contracts/src/main/kotlin/contracts/IRS.kt
@@ -1,6 +1,8 @@
package contracts
import core.*
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
import org.apache.commons.jexl3.JexlBuilder
import org.apache.commons.jexl3.MapContext
@@ -503,8 +505,8 @@ class InterestRateSwap() : Contract {
"There are no in states for an agreement" by inputs.isEmpty()
"There are events in the fix schedule" by (irs.calculation.fixedLegPaymentSchedule.size > 0)
"There are events in the float schedule" by (irs.calculation.floatingLegPaymentSchedule.size > 0)
- "All notionals must be non zero" by ( irs.fixedLeg.notional.pennies > 0 && irs.floatingLeg.notional.pennies > 0)
- "The fixed leg rate must be positive" by ( irs.fixedLeg.fixedRate.isPositive() )
+ "All notionals must be non zero" by (irs.fixedLeg.notional.pennies > 0 && irs.floatingLeg.notional.pennies > 0)
+ "The fixed leg rate must be positive" by (irs.fixedLeg.fixedRate.isPositive())
"The currency of the notionals must be the same" by (irs.fixedLeg.notional.currency == irs.floatingLeg.notional.currency)
"All leg notionals must be the same" by (irs.fixedLeg.notional == irs.floatingLeg.notional)
@@ -539,7 +541,7 @@ class InterestRateSwap() : Contract {
val fixValue = fixCommand.value
// Need to check that everything is the same apart from the new fixed rate entry.
requireThat {
- "The fixed leg parties are constant" by ( irs.fixedLeg.fixedRatePayer == prevIrs.fixedLeg.fixedRatePayer) // Although superseded by the below test, this is included for a regression issue
+ "The fixed leg parties are constant" by (irs.fixedLeg.fixedRatePayer == prevIrs.fixedLeg.fixedRatePayer) // Although superseded by the below test, this is included for a regression issue
"The fixed leg is constant" by (irs.fixedLeg == prevIrs.fixedLeg)
"The floating leg is constant" by (irs.floatingLeg == prevIrs.floatingLeg)
"The common values are constant" by (irs.common == prevIrs.common)
@@ -548,7 +550,7 @@ class InterestRateSwap() : Contract {
"There is only one changed payment in the floating leg" by (paymentDifferences.size == 1)
"There changed payment is a floating payment" by (oldFloatingRatePaymentEvent.rate is ReferenceRate)
"The new payment is a fixed payment" by (newFixedRatePaymentEvent.rate is FixedRate)
- "The changed payments dates are aligned" by ( oldFloatingRatePaymentEvent.date == newFixedRatePaymentEvent.date)
+ "The changed payments dates are aligned" by (oldFloatingRatePaymentEvent.date == newFixedRatePaymentEvent.date)
"The new payment has the correct rate" by (newFixedRatePaymentEvent.rate.ratioUnit!!.value == fixValue.value)
"The fixing is for the next required date" by (prevIrs.calculation.nextFixingDate() == fixValue.of.forDay)
"The fix payment has the same currency as the notional" by (newFixedRatePaymentEvent.flow.currency == irs.floatingLeg.notional.currency)
diff --git a/contracts/src/main/kotlin/contracts/IRSUtils.kt b/contracts/src/main/kotlin/contracts/IRSUtils.kt
index 4cab943f50..62aa3bca89 100644
--- a/contracts/src/main/kotlin/contracts/IRSUtils.kt
+++ b/contracts/src/main/kotlin/contracts/IRSUtils.kt
@@ -1,7 +1,7 @@
package contracts
-import core.Amount
-import core.Tenor
+import core.contracts.Amount
+import core.contracts.Tenor
import java.math.BigDecimal
diff --git a/contracts/src/main/kotlin/contracts/cash/CashIssuanceDefinition.kt b/contracts/src/main/kotlin/contracts/cash/CashIssuanceDefinition.kt
index 9519289a04..7098013e5b 100644
--- a/contracts/src/main/kotlin/contracts/cash/CashIssuanceDefinition.kt
+++ b/contracts/src/main/kotlin/contracts/cash/CashIssuanceDefinition.kt
@@ -1,7 +1,7 @@
package contracts.cash
-import core.IssuanceDefinition
-import core.PartyAndReference
+import core.contracts.IssuanceDefinition
+import core.contracts.PartyAndReference
import java.util.*
/**
diff --git a/contracts/src/main/kotlin/contracts/cash/CommonCashState.kt b/contracts/src/main/kotlin/contracts/cash/CommonCashState.kt
index cce0e1871b..ee842d5f42 100644
--- a/contracts/src/main/kotlin/contracts/cash/CommonCashState.kt
+++ b/contracts/src/main/kotlin/contracts/cash/CommonCashState.kt
@@ -1,8 +1,8 @@
package contracts.cash
-import core.Amount
-import core.OwnableState
-import core.PartyAndReference
+import core.contracts.Amount
+import core.contracts.OwnableState
+import core.contracts.PartyAndReference
/**
* Common elements of cash contract states.
diff --git a/core/src/main/kotlin/core/ContractsDSL.kt b/core/src/main/kotlin/core/contracts/ContractsDSL.kt
similarity index 98%
rename from core/src/main/kotlin/core/ContractsDSL.kt
rename to core/src/main/kotlin/core/contracts/ContractsDSL.kt
index 54e55130cc..bec287067d 100644
--- a/core/src/main/kotlin/core/ContractsDSL.kt
+++ b/core/src/main/kotlin/core/contracts/ContractsDSL.kt
@@ -1,5 +1,7 @@
-package core
+package core.contracts
+import core.*
+import core.crypto.Party
import java.security.PublicKey
import java.util.*
diff --git a/core/src/main/kotlin/core/FinanceTypes.kt b/core/src/main/kotlin/core/contracts/FinanceTypes.kt
similarity index 99%
rename from core/src/main/kotlin/core/FinanceTypes.kt
rename to core/src/main/kotlin/core/contracts/FinanceTypes.kt
index e10e735c96..4a8f9ebab3 100644
--- a/core/src/main/kotlin/core/FinanceTypes.kt
+++ b/core/src/main/kotlin/core/contracts/FinanceTypes.kt
@@ -1,4 +1,4 @@
-package core
+package core.contracts
import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.core.JsonParser
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.JsonSerializer
import com.fasterxml.jackson.databind.SerializerProvider
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.fasterxml.jackson.databind.annotation.JsonSerialize
+import core.contracts.CommandData
import java.math.BigDecimal
import java.time.DayOfWeek
import java.time.LocalDate
@@ -304,7 +305,7 @@ open class BusinessCalendar private constructor(val calendars: Array
/** Calculates an event schedule that moves events around to ensure they fall on working days. */
fun createGenericSchedule(startDate: LocalDate,
period: Frequency,
- calendar: BusinessCalendar = BusinessCalendar.getInstance(),
+ calendar: BusinessCalendar = getInstance(),
dateRollConvention: DateRollConvention = DateRollConvention.Following,
noOfAdditionalPeriods: Int = Integer.MAX_VALUE,
endDate: LocalDate? = null,
diff --git a/core/src/main/kotlin/core/Structures.kt b/core/src/main/kotlin/core/contracts/Structures.kt
similarity index 96%
rename from core/src/main/kotlin/core/Structures.kt
rename to core/src/main/kotlin/core/contracts/Structures.kt
index bead33a49e..1b88425775 100644
--- a/core/src/main/kotlin/core/Structures.kt
+++ b/core/src/main/kotlin/core/contracts/Structures.kt
@@ -1,5 +1,10 @@
-package core
+package core.contracts
+import core.contracts.TransactionBuilder
+import core.contracts.TransactionForVerification
+import core.contracts.Fix
+import core.contracts.FixOf
+import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.toStringShort
import core.serialization.OpaqueBytes
@@ -126,14 +131,6 @@ inline fun List>.filterSt
return mapNotNull { if (it.state is T) StateAndRef(it.state, it.ref) else null }
}
-/** A [Party] is well known (name, pubkey) pair. In a real system this would probably be an X.509 certificate. */
-data class Party(val name: String, val owningKey: PublicKey) {
- override fun toString() = name
-
- fun ref(bytes: OpaqueBytes) = PartyAndReference(this, bytes)
- fun ref(vararg bytes: Byte) = ref(OpaqueBytes.of(*bytes))
-}
-
/**
* 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 it's meaningless to anyone other than the party.
diff --git a/core/src/main/kotlin/core/TransactionBuilder.kt b/core/src/main/kotlin/core/contracts/TransactionBuilder.kt
similarity index 97%
rename from core/src/main/kotlin/core/TransactionBuilder.kt
rename to core/src/main/kotlin/core/contracts/TransactionBuilder.kt
index ed6629413a..f248ddd829 100644
--- a/core/src/main/kotlin/core/TransactionBuilder.kt
+++ b/core/src/main/kotlin/core/contracts/TransactionBuilder.kt
@@ -1,6 +1,10 @@
-package core
+package core.contracts
+import core.contracts.SignedTransaction
+import core.contracts.WireTransaction
+import core.contracts.*
import core.crypto.DigitalSignature
+import core.crypto.Party
import core.crypto.SecureHash
import core.crypto.signWithECDSA
import core.serialization.serialize
diff --git a/core/src/main/kotlin/core/TransactionGraphSearch.kt b/core/src/main/kotlin/core/contracts/TransactionGraphSearch.kt
similarity index 92%
rename from core/src/main/kotlin/core/TransactionGraphSearch.kt
rename to core/src/main/kotlin/core/contracts/TransactionGraphSearch.kt
index 1099579fab..901d0b41b4 100644
--- a/core/src/main/kotlin/core/TransactionGraphSearch.kt
+++ b/core/src/main/kotlin/core/contracts/TransactionGraphSearch.kt
@@ -1,5 +1,8 @@
-package core
+package core.contracts
+import core.contracts.SignedTransaction
+import core.contracts.WireTransaction
+import core.contracts.CommandData
import core.crypto.SecureHash
import java.util.*
import java.util.concurrent.Callable
diff --git a/core/src/main/kotlin/core/TransactionTools.kt b/core/src/main/kotlin/core/contracts/TransactionTools.kt
similarity index 88%
rename from core/src/main/kotlin/core/TransactionTools.kt
rename to core/src/main/kotlin/core/contracts/TransactionTools.kt
index 026d72030b..d2e223a6f1 100644
--- a/core/src/main/kotlin/core/TransactionTools.kt
+++ b/core/src/main/kotlin/core/contracts/TransactionTools.kt
@@ -1,5 +1,9 @@
-package core
+package core.contracts
+import core.contracts.AuthenticatedObject
+import core.contracts.LedgerTransaction
+import core.contracts.SignedTransaction
+import core.contracts.WireTransaction
import core.node.services.AttachmentStorage
import core.node.services.IdentityService
import java.io.FileNotFoundException
diff --git a/core/src/main/kotlin/core/TransactionVerification.kt b/core/src/main/kotlin/core/contracts/TransactionVerification.kt
similarity index 99%
rename from core/src/main/kotlin/core/TransactionVerification.kt
rename to core/src/main/kotlin/core/contracts/TransactionVerification.kt
index 5a9b878831..9902cdf25a 100644
--- a/core/src/main/kotlin/core/TransactionVerification.kt
+++ b/core/src/main/kotlin/core/contracts/TransactionVerification.kt
@@ -1,5 +1,7 @@
-package core
+package core.contracts
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
import java.util.*
diff --git a/core/src/main/kotlin/core/Transactions.kt b/core/src/main/kotlin/core/contracts/Transactions.kt
similarity index 99%
rename from core/src/main/kotlin/core/Transactions.kt
rename to core/src/main/kotlin/core/contracts/Transactions.kt
index a485605647..9166b32e73 100644
--- a/core/src/main/kotlin/core/Transactions.kt
+++ b/core/src/main/kotlin/core/contracts/Transactions.kt
@@ -1,9 +1,11 @@
-package core
+package core.contracts
import com.esotericsoftware.kryo.Kryo
+import core.contracts.*
import core.crypto.DigitalSignature
import core.crypto.SecureHash
import core.crypto.toStringShort
+import core.indexOfOrThrow
import core.serialization.SerializedBytes
import core.serialization.THREAD_LOCAL_KRYO
import core.serialization.deserialize
diff --git a/core/src/main/kotlin/core/crypto/CryptoUtilities.kt b/core/src/main/kotlin/core/crypto/CryptoUtilities.kt
index f5a30e7c2c..d79c9e831b 100644
--- a/core/src/main/kotlin/core/crypto/CryptoUtilities.kt
+++ b/core/src/main/kotlin/core/crypto/CryptoUtilities.kt
@@ -1,7 +1,7 @@
package core.crypto
import com.google.common.io.BaseEncoding
-import core.Party
+import core.crypto.Party
import core.serialization.OpaqueBytes
import core.serialization.SerializedBytes
import core.serialization.deserialize
diff --git a/core/src/main/kotlin/core/crypto/Party.kt b/core/src/main/kotlin/core/crypto/Party.kt
new file mode 100644
index 0000000000..b1237f3ada
--- /dev/null
+++ b/core/src/main/kotlin/core/crypto/Party.kt
@@ -0,0 +1,16 @@
+package core.crypto
+
+import core.contracts.PartyAndReference
+import core.serialization.OpaqueBytes
+import java.security.PublicKey
+
+/**
+ * Created by matth on 14/05/2016.
+ */
+/** A [Party] is well known (name, pubkey) pair. In a real system this would probably be an X.509 certificate. */
+data class Party(val name: String, val owningKey: PublicKey) {
+ override fun toString() = name
+
+ fun ref(bytes: OpaqueBytes) = PartyAndReference(this, bytes)
+ fun ref(vararg bytes: Byte) = ref(OpaqueBytes.of(*bytes))
+}
\ No newline at end of file
diff --git a/core/src/main/kotlin/core/node/AttachmentsClassLoader.kt b/core/src/main/kotlin/core/node/AttachmentsClassLoader.kt
index 3fb9878109..6c80332b21 100644
--- a/core/src/main/kotlin/core/node/AttachmentsClassLoader.kt
+++ b/core/src/main/kotlin/core/node/AttachmentsClassLoader.kt
@@ -1,6 +1,6 @@
package core.node
-import core.Attachment
+import core.contracts.Attachment
import core.crypto.SecureHash
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
diff --git a/core/src/main/kotlin/core/node/NodeInfo.kt b/core/src/main/kotlin/core/node/NodeInfo.kt
index a5abf72df2..96a200d453 100644
--- a/core/src/main/kotlin/core/node/NodeInfo.kt
+++ b/core/src/main/kotlin/core/node/NodeInfo.kt
@@ -1,6 +1,6 @@
package core.node
-import core.Party
+import core.crypto.Party
import core.messaging.SingleMessageRecipient
import core.node.services.ServiceType
diff --git a/core/src/main/kotlin/core/node/ServiceHub.kt b/core/src/main/kotlin/core/node/ServiceHub.kt
index e278ca5ee9..b5ead2d5e0 100644
--- a/core/src/main/kotlin/core/node/ServiceHub.kt
+++ b/core/src/main/kotlin/core/node/ServiceHub.kt
@@ -1,6 +1,7 @@
package core.node
import core.*
+import core.contracts.*
import core.crypto.SecureHash
import core.messaging.MessagingService
import core.node.services.IdentityService
diff --git a/core/src/main/kotlin/core/node/services/AttachmentStorage.kt b/core/src/main/kotlin/core/node/services/AttachmentStorage.kt
index 5eefb4427d..91732ab0a1 100644
--- a/core/src/main/kotlin/core/node/services/AttachmentStorage.kt
+++ b/core/src/main/kotlin/core/node/services/AttachmentStorage.kt
@@ -1,6 +1,6 @@
package core.node.services
-import core.Attachment
+import core.contracts.Attachment
import core.crypto.SecureHash
import java.io.InputStream
diff --git a/core/src/main/kotlin/core/node/services/IdentityService.kt b/core/src/main/kotlin/core/node/services/IdentityService.kt
index ae312f51fd..31e3b6e848 100644
--- a/core/src/main/kotlin/core/node/services/IdentityService.kt
+++ b/core/src/main/kotlin/core/node/services/IdentityService.kt
@@ -1,6 +1,6 @@
package core.node.services
-import core.Party
+import core.crypto.Party
import java.security.PublicKey
/**
diff --git a/core/src/main/kotlin/core/node/services/UniquenessProvider.kt b/core/src/main/kotlin/core/node/services/UniquenessProvider.kt
index e9be4c4b3d..1b642c95ee 100644
--- a/core/src/main/kotlin/core/node/services/UniquenessProvider.kt
+++ b/core/src/main/kotlin/core/node/services/UniquenessProvider.kt
@@ -1,8 +1,8 @@
package core.node.services
-import core.Party
-import core.StateRef
-import core.WireTransaction
+import core.crypto.Party
+import core.contracts.StateRef
+import core.contracts.WireTransaction
import core.crypto.SecureHash
/**
diff --git a/core/src/main/kotlin/core/node/subsystems/NetworkMapCache.kt b/core/src/main/kotlin/core/node/subsystems/NetworkMapCache.kt
index cf96b5eab4..f1e7e3f9e4 100644
--- a/core/src/main/kotlin/core/node/subsystems/NetworkMapCache.kt
+++ b/core/src/main/kotlin/core/node/subsystems/NetworkMapCache.kt
@@ -1,8 +1,8 @@
package core.node.subsystems
import com.google.common.util.concurrent.ListenableFuture
-import core.Contract
-import core.Party
+import core.contracts.Contract
+import core.crypto.Party
import core.crypto.SecureHash
import core.messaging.MessagingService
import core.node.NodeInfo
diff --git a/core/src/main/kotlin/core/node/subsystems/Services.kt b/core/src/main/kotlin/core/node/subsystems/Services.kt
index 832c7e9f12..f9978f71fa 100644
--- a/core/src/main/kotlin/core/node/subsystems/Services.kt
+++ b/core/src/main/kotlin/core/node/subsystems/Services.kt
@@ -2,6 +2,8 @@ package core.node.subsystems
import com.codahale.metrics.MetricRegistry
import core.*
+import core.contracts.*
+import core.crypto.Party
import core.crypto.SecureHash
import core.node.services.AttachmentStorage
import core.node.storage.CheckpointStorage
diff --git a/core/src/main/kotlin/core/serialization/Kryo.kt b/core/src/main/kotlin/core/serialization/Kryo.kt
index 40ff9ededd..bf20a92881 100644
--- a/core/src/main/kotlin/core/serialization/Kryo.kt
+++ b/core/src/main/kotlin/core/serialization/Kryo.kt
@@ -9,6 +9,7 @@ import com.esotericsoftware.kryo.io.Input
import com.esotericsoftware.kryo.io.Output
import com.esotericsoftware.kryo.serializers.JavaSerializer
import core.*
+import core.contracts.*
import core.crypto.SecureHash
import core.crypto.generateKeyPair
import core.crypto.sha256
diff --git a/core/src/main/kotlin/protocols/FetchAttachmentsProtocol.kt b/core/src/main/kotlin/protocols/FetchAttachmentsProtocol.kt
index a39810cb3f..2db2a5cbf2 100644
--- a/core/src/main/kotlin/protocols/FetchAttachmentsProtocol.kt
+++ b/core/src/main/kotlin/protocols/FetchAttachmentsProtocol.kt
@@ -1,6 +1,6 @@
package protocols
-import core.Attachment
+import core.contracts.Attachment
import core.crypto.SecureHash
import core.crypto.sha256
import core.messaging.SingleMessageRecipient
diff --git a/core/src/main/kotlin/protocols/FetchDataProtocol.kt b/core/src/main/kotlin/protocols/FetchDataProtocol.kt
index 6c4e09732a..cfd378079c 100644
--- a/core/src/main/kotlin/protocols/FetchDataProtocol.kt
+++ b/core/src/main/kotlin/protocols/FetchDataProtocol.kt
@@ -1,7 +1,7 @@
package protocols
import co.paralleluniverse.fibers.Suspendable
-import core.NamedByHash
+import core.contracts.NamedByHash
import core.crypto.SecureHash
import core.messaging.SingleMessageRecipient
import core.protocols.ProtocolLogic
diff --git a/core/src/main/kotlin/protocols/FetchTransactionsProtocol.kt b/core/src/main/kotlin/protocols/FetchTransactionsProtocol.kt
index 53698ed4f6..38ece2ed54 100644
--- a/core/src/main/kotlin/protocols/FetchTransactionsProtocol.kt
+++ b/core/src/main/kotlin/protocols/FetchTransactionsProtocol.kt
@@ -1,6 +1,6 @@
package protocols
-import core.SignedTransaction
+import core.contracts.SignedTransaction
import core.crypto.SecureHash
import core.messaging.SingleMessageRecipient
diff --git a/core/src/main/kotlin/protocols/NotaryProtocol.kt b/core/src/main/kotlin/protocols/NotaryProtocol.kt
index 93f1dbb13f..b4b7c591bd 100644
--- a/core/src/main/kotlin/protocols/NotaryProtocol.kt
+++ b/core/src/main/kotlin/protocols/NotaryProtocol.kt
@@ -1,9 +1,9 @@
package protocols
import co.paralleluniverse.fibers.Suspendable
-import core.Party
-import core.TimestampCommand
-import core.WireTransaction
+import core.crypto.Party
+import core.contracts.TimestampCommand
+import core.contracts.WireTransaction
import core.crypto.DigitalSignature
import core.crypto.SignedData
import core.messaging.SingleMessageRecipient
diff --git a/core/src/main/kotlin/protocols/RatesFixProtocol.kt b/core/src/main/kotlin/protocols/RatesFixProtocol.kt
index 254aa1b23a..5f964dd198 100644
--- a/core/src/main/kotlin/protocols/RatesFixProtocol.kt
+++ b/core/src/main/kotlin/protocols/RatesFixProtocol.kt
@@ -2,6 +2,10 @@ package protocols
import co.paralleluniverse.fibers.Suspendable
import core.*
+import core.contracts.Fix
+import core.contracts.FixOf
+import core.contracts.TransactionBuilder
+import core.contracts.WireTransaction
import core.crypto.DigitalSignature
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
diff --git a/core/src/main/kotlin/protocols/ResolveTransactionsProtocol.kt b/core/src/main/kotlin/protocols/ResolveTransactionsProtocol.kt
index 7c22eedebe..c86ab8743a 100644
--- a/core/src/main/kotlin/protocols/ResolveTransactionsProtocol.kt
+++ b/core/src/main/kotlin/protocols/ResolveTransactionsProtocol.kt
@@ -2,6 +2,7 @@ package protocols
import co.paralleluniverse.fibers.Suspendable
import core.*
+import core.contracts.*
import core.crypto.SecureHash
import core.messaging.SingleMessageRecipient
import core.protocols.ProtocolLogic
diff --git a/core/src/main/kotlin/protocols/TwoPartyDealProtocol.kt b/core/src/main/kotlin/protocols/TwoPartyDealProtocol.kt
index 51e3c0377c..df518ce36b 100644
--- a/core/src/main/kotlin/protocols/TwoPartyDealProtocol.kt
+++ b/core/src/main/kotlin/protocols/TwoPartyDealProtocol.kt
@@ -2,7 +2,9 @@ package protocols
import co.paralleluniverse.fibers.Suspendable
import core.*
+import core.contracts.*
import core.crypto.DigitalSignature
+import core.crypto.Party
import core.crypto.signWithECDSA
import core.messaging.SingleMessageRecipient
import core.node.NodeInfo
diff --git a/core/src/main/resources/core/LondonHolidayCalendar.txt b/core/src/main/resources/core/contracts/LondonHolidayCalendar.txt
similarity index 100%
rename from core/src/main/resources/core/LondonHolidayCalendar.txt
rename to core/src/main/resources/core/contracts/LondonHolidayCalendar.txt
diff --git a/core/src/main/resources/core/NewYorkHolidayCalendar.txt b/core/src/main/resources/core/contracts/NewYorkHolidayCalendar.txt
similarity index 100%
rename from core/src/main/resources/core/NewYorkHolidayCalendar.txt
rename to core/src/main/resources/core/contracts/NewYorkHolidayCalendar.txt
diff --git a/core/src/test/kotlin/core/FinanceTypesTest.kt b/core/src/test/kotlin/core/FinanceTypesTest.kt
index 418d12eaa9..a878167efd 100644
--- a/core/src/test/kotlin/core/FinanceTypesTest.kt
+++ b/core/src/test/kotlin/core/FinanceTypesTest.kt
@@ -1,5 +1,6 @@
package core
+import core.contracts.*
import org.junit.Test
import java.time.LocalDate
import java.util.*
diff --git a/docs/build/html/_sources/tutorial_contract.txt b/docs/build/html/_sources/tutorial_contract.txt
index 98e33e4b5a..cc5f3fcf89 100644
--- a/docs/build/html/_sources/tutorial_contract.txt
+++ b/docs/build/html/_sources/tutorial_contract.txt
@@ -200,7 +200,7 @@ Let's define a few commands now:
.. sourcecode:: java
- public static class Commands implements core.Command {
+ public static class Commands implements core.contract.Command {
public static class Move extends Commands {
@Override
public boolean equals(Object obj) {
diff --git a/docs/build/html/api/alltypes/index.html b/docs/build/html/api/alltypes/index.html
index b5e41f5157..c3ff70f22b 100644
--- a/docs/build/html/api/alltypes/index.html
+++ b/docs/build/html/api/alltypes/index.html
@@ -61,7 +61,7 @@ fields such as replyTo and replyToTopic.
-core.AccrualAdjustment
+core.contracts.AccrualAdjustment
Simple enum for returning accurals adjusted or unadjusted.
We dont actually do anything with this yet though, so its ignored for now.
@@ -91,7 +91,7 @@ for ensuring code runs on the right thread, and also for unit testing.
-core.Amount
+core.contracts.Amount
Amount represents a positive quantity of currency, measured in pennies, which are the smallest representable units.
@@ -108,7 +108,7 @@ as well.
-core.Attachment
+core.contracts.Attachment
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
@@ -142,7 +142,7 @@ file paths.
-core.AuthenticatedObject
+core.contracts.AuthenticatedObject
Wraps an object that was signed by a public key, which may be a well known/recognised institutional key.
@@ -164,7 +164,7 @@ API call from a single party without bi-directional access to the database of of
-core.BusinessCalendar
+core.contracts.BusinessCalendar
A business calendar performs date calculations that take into account national holidays and weekends. This is a
typical feature of financial contracts, in which a business may not want a payment event to fall on a day when
@@ -215,14 +215,14 @@ the same transaction.
-core.Command
+core.contracts.Command
Command data/content plus pubkey pair: the signature is stored at the end of the serialized bytes
-core.CommandData
+core.contracts.CommandData
Marker interface for classes that represent commands
@@ -249,7 +249,7 @@ and to organise serializers / deserializers for java.time.* classes as necessary
-core.Contract
+core.contracts.Contract
Implemented by a program that implements business logic on the shared ledger. All participants run this code for
every LedgerTransaction they see on the network, for every input and output state. All contracts must accept the
@@ -278,7 +278,7 @@ timestamp attached to the transaction itself i.e. it is NOT necessarily the curr
-core.ContractState
+core.contracts.ContractState
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
@@ -318,7 +318,7 @@ glue that sits between the network layer and the database layer.
-core.DateOffset
+core.contracts.DateOffset
Date offset that the fixing is done prior to the accrual start date.
Currently not used in the calculation.
@@ -326,7 +326,7 @@ Currently not used in the calculation.
-core.DateRollConvention
+core.contracts.DateRollConvention
This reflects what happens if a date on which a business event is supposed to happen actually falls upon a non-working day
Depending on the accounting requirement, we can move forward until we get to a business day, or backwards
@@ -335,7 +335,7 @@ There are some additional rules which are explained in the individual cases belo
-core.DateRollDirection
+core.contracts.DateRollDirection
This is utilised in the DateRollConvention class to determine which way we should initially step when
finding a business day
@@ -343,7 +343,7 @@ finding a business day
-core.DayCountBasisDay
+core.contracts.DayCountBasisDay
This forms the day part of the "Day Count Basis" used for interest calculation.
Note that the first character cannot be a number (enum naming constraints), so we drop that
@@ -352,7 +352,7 @@ in the toString lest some people get confused.
-core.DayCountBasisYear
+core.contracts.DayCountBasisYear
This forms the year part of the "Day Count Basis" used for interest calculation.
@@ -434,20 +434,20 @@ building partially signed transactions.
-core.Expression
+core.contracts.Expression
Represents a textual expression of e.g. a formula
-core.ExpressionDeserializer
+core.contracts.ExpressionDeserializer
-core.ExpressionSerializer
+core.contracts.ExpressionSerializer
@@ -475,14 +475,14 @@ attachments are saved to local storage automatically.
-core.Fix
+core.contracts.Fix
A Fix represents a named interest rate, on a given day, for a given duration. It can be embedded in a tx.
-core.FixOf
+core.contracts.FixOf
A FixOf identifies the question side of a fix: what day, tenor and type of fix ("LIBOR", "EURIBOR" etc)
@@ -526,7 +526,7 @@ If the rate is null returns a zero payment. // TODO: Is this the desired behavio
-core.Frequency
+core.contracts.Frequency
Frequency at which an event occurs - the enumerator also casts to an integer specifying the number of times per year
that would divide into (eg annually = 1, semiannual = 2, monthly = 12 etc).
@@ -671,7 +671,7 @@ call out to a hardware security module that enforces various auditing and freque
-core.LedgerTransaction
+core.contracts.LedgerTransaction
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
@@ -687,7 +687,7 @@ with the commands from the wire, and verified/looked up.
-core.LinearState
+core.contracts.LinearState
A state that evolves by superseding itself, all of which share the common "thread"
@@ -798,7 +798,7 @@ This is not an interface because it is too lightweight to bother mocking out.
-core.NamedByHash
+core.contracts.NamedByHash
Implemented by anything that can be named by a secure hash value (e.g. transactions, attachments).
@@ -918,20 +918,20 @@ functionality to Java, but it wont arrive for a few years yet
-core.OwnableState
+core.contracts.OwnableState
-core.Party
+core.crypto.Party
A Party is well known (name, pubkey) pair. In a real system this would probably be an X.509 certificate.
-core.PartyAndReference
+core.contracts.PartyAndReference
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.
@@ -952,7 +952,7 @@ ledger. The reference is intended to be encrypted so its meaningless to anyone o
-core.PaymentRule
+core.contracts.PaymentRule
Whether the payment should be made before the due date, or after it.
@@ -1110,7 +1110,7 @@ e.g. LIBOR 6M as of 17 March 2016. Hence it requires a source (name) and a value
-core.Requirements
+core.contracts.Requirements
@@ -1180,7 +1180,7 @@ contained within.
-core.SignedTransaction
+core.contracts.SignedTransaction
Container for a WireTransaction and attached signatures.
@@ -1215,7 +1215,7 @@ Points at which polynomial pieces connect are known as knots .
-core.StateAndRef
+core.contracts.StateAndRef
A StateAndRef is simply a (state, ref) pair. For instance, a wallet (which holds available assets) contains these.
@@ -1230,7 +1230,7 @@ Each such object represents an instantiation of a (two-party) protocol that has
-core.StateRef
+core.contracts.StateRef
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.
@@ -1278,7 +1278,7 @@ anything like that, this interface is only big enough to support the prototyping
-core.Tenor
+core.contracts.Tenor
Placeholder class for the Tenor datatype - which is a standardised duration of time until maturity
@@ -1295,7 +1295,7 @@ way that ensures itll be released if theres an exception.
-core.TimestampCommand
+core.contracts.TimestampCommand
If present in a transaction, contains a time that was verified by the timestamping authority/authorities whose
public keys are identified in the containing Command object. The true time must be between (after, before)
@@ -1362,7 +1362,7 @@ then B and C trade with each other, then C and A etc).
-core.TransactionBuilder
+core.contracts.TransactionBuilder
A TransactionBuilder is a transaction class thats mutable (unlike the others which are all immutable). It is
intended to be passed around contracts that may edit it by adding new states/commands or modifying the existing set.
@@ -1372,20 +1372,20 @@ multiple parties.
-core.TransactionConflictException
+core.contracts.TransactionConflictException
-core.TransactionForVerification
+core.contracts.TransactionForVerification
A transaction in fully resolved and sig-checked form, ready for passing as input to a verification function.
-core.TransactionGraphSearch
+core.contracts.TransactionGraphSearch
Given a map of transaction id to SignedTransaction , 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.
@@ -1393,7 +1393,7 @@ the starting point down in order to find transactions that match the given query
-core.TransactionGroup
+core.contracts.TransactionGroup
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
@@ -1402,13 +1402,13 @@ this subgraph does not contain conflicts and is accepted by the involved contrac
-core.TransactionResolutionException
+core.contracts.TransactionResolutionException
-core.TransactionVerificationException
+core.contracts.TransactionVerificationException
Thrown if a verification fails due to a contract rejection.
@@ -1439,7 +1439,7 @@ and seller) and the following steps:
-core.TypeOnlyCommandData
+core.contracts.TypeOnlyCommandData
Commands that inherit from this are intended to have no data items: its only their presence that matters.
@@ -1506,7 +1506,7 @@ consumed by someone else first
-core.WireTransaction
+core.contracts.WireTransaction
Transaction ready for serialisation, without any signatures attached.
diff --git a/docs/build/html/api/api/-a-p-i-server-impl/commit-transaction.html b/docs/build/html/api/api/-a-p-i-server-impl/commit-transaction.html
index bc016ec96e..5d1f347005 100644
--- a/docs/build/html/api/api/-a-p-i-server-impl/commit-transaction.html
+++ b/docs/build/html/api/api/-a-p-i-server-impl/commit-transaction.html
@@ -7,8 +7,8 @@
api / APIServerImpl / commitTransaction
commitTransaction
-
-fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
+
+fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
Overrides APIServer.commitTransaction
Attempt to commit transaction (returned from build transaction) with the necessary signatures for that to be
successful, otherwise exception is thrown.
diff --git a/docs/build/html/api/api/-a-p-i-server-impl/fetch-states.html b/docs/build/html/api/api/-a-p-i-server-impl/fetch-states.html
index 1b5a977dab..c737dadd81 100644
--- a/docs/build/html/api/api/-a-p-i-server-impl/fetch-states.html
+++ b/docs/build/html/api/api/-a-p-i-server-impl/fetch-states.html
@@ -7,8 +7,8 @@
api / APIServerImpl / fetchStates
fetchStates
-
-fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
+
+fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
Overrides APIServer.fetchStates
diff --git a/docs/build/html/api/api/-a-p-i-server-impl/generate-transaction-signature.html b/docs/build/html/api/api/-a-p-i-server-impl/generate-transaction-signature.html
index c24ed027ab..46bed4c2b5 100644
--- a/docs/build/html/api/api/-a-p-i-server-impl/generate-transaction-signature.html
+++ b/docs/build/html/api/api/-a-p-i-server-impl/generate-transaction-signature.html
@@ -7,8 +7,8 @@
api / APIServerImpl / generateTransactionSignature
generateTransactionSignature
-
-fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
+
+fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
Overrides APIServer.generateTransactionSignature
Generate a signature for this transaction signed by us.
diff --git a/docs/build/html/api/api/-a-p-i-server-impl/index.html b/docs/build/html/api/api/-a-p-i-server-impl/index.html
index 3b254c4a0b..f2778a26f2 100644
--- a/docs/build/html/api/api/-a-p-i-server-impl/index.html
+++ b/docs/build/html/api/api/-a-p-i-server-impl/index.html
@@ -48,7 +48,7 @@ which would automatically be passed as the first argument (wed need that to be a
commitTransaction
-fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
Attempt to commit transaction (returned from build transaction) with the necessary signatures for that to be
+fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
Attempt to commit transaction (returned from build transaction) with the necessary signatures for that to be
successful, otherwise exception is thrown.
@@ -63,7 +63,7 @@ successful, otherwise exception is thrown.
fetchStates
-fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
+fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
@@ -76,7 +76,7 @@ successful, otherwise exception is thrown.
generateTransactionSignature
-fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
Generate a signature for this transaction signed by us.
+fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
Generate a signature for this transaction signed by us.
diff --git a/docs/build/html/api/api/-a-p-i-server/commit-transaction.html b/docs/build/html/api/api/-a-p-i-server/commit-transaction.html
index 4c2ebf9684..3bc3fa1980 100644
--- a/docs/build/html/api/api/-a-p-i-server/commit-transaction.html
+++ b/docs/build/html/api/api/-a-p-i-server/commit-transaction.html
@@ -7,8 +7,8 @@
api / APIServer / commitTransaction
commitTransaction
-
-abstract fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
+
+abstract fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
Attempt to commit transaction (returned from build transaction) with the necessary signatures for that to be
successful, otherwise exception is thrown.
diff --git a/docs/build/html/api/api/-a-p-i-server/fetch-states.html b/docs/build/html/api/api/-a-p-i-server/fetch-states.html
index df4ee4df0b..aec13fe64c 100644
--- a/docs/build/html/api/api/-a-p-i-server/fetch-states.html
+++ b/docs/build/html/api/api/-a-p-i-server/fetch-states.html
@@ -7,8 +7,8 @@
api / APIServer / fetchStates
fetchStates
-
-abstract fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
+
+abstract fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
abstract fun buildTransaction ( type : ContractDefRef , steps : List < TransactionBuildStep > ) : SerializedBytes < WireTransaction >
-abstract fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
+abstract fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
abstract fun fetchProtocolsRequiringAttention ( query : StatesQuery ) : Map < StateRef , ProtocolRequiringAttention >
-abstract fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
+abstract fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
abstract fun fetchTransactions ( txs : List < SecureHash > ) : Map < SecureHash , SignedTransaction ? >
-abstract fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
+abstract fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
abstract fun invokeProtocolSync ( type : ProtocolRef , args : Map < String , Any ? > ) : Any ?
abstract fun provideProtocolResponse ( protocol : ProtocolInstanceRef , choice : SecureHash , args : Map < String , Any ? > ) : Unit
abstract fun queryStates ( query : StatesQuery ) : List < StateRef >
@@ -63,11 +63,11 @@
APIServerImpl ( node : AbstractNode )
fun buildTransaction ( type : ContractDefRef , steps : List < TransactionBuildStep > ) : SerializedBytes < WireTransaction >
-fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
+fun commitTransaction ( tx : SerializedBytes < WireTransaction > , signatures : List < WithKey > ) : SecureHash
fun fetchProtocolsRequiringAttention ( query : StatesQuery ) : Map < StateRef , ProtocolRequiringAttention >
-fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
+fun fetchStates ( states : List < StateRef > ) : Map < StateRef , ContractState ? >
fun fetchTransactions ( txs : List < SecureHash > ) : Map < SecureHash , SignedTransaction ? >
-fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
+fun generateTransactionSignature ( tx : SerializedBytes < WireTransaction > ) : WithKey
fun invokeProtocolSync ( type : ProtocolRef , args : Map < String , Any ? > ) : Any ?
val node : AbstractNode
fun provideProtocolResponse ( protocol : ProtocolInstanceRef , choice : SecureHash , args : Map < String , Any ? > ) : Unit
@@ -91,7 +91,7 @@
val advertisedServices : Set < ServiceType >
lateinit var api : APIServer
val configuration : NodeConfiguration
-protected open fun constructStorageService ( attachments : NodeAttachmentService , checkpointStorage : CheckpointStorage , keypair : KeyPair , identity : Party ) : StorageServiceImpl
+protected open fun constructStorageService ( attachments : NodeAttachmentService , checkpointStorage : CheckpointStorage , keypair : KeyPair , identity : Party ) : StorageServiceImpl
val dir : Path
protected open fun findMyLocation ( ) : PhysicalLocation ?
lateinit var identity : IdentityService
@@ -251,17 +251,17 @@
-Amount ( amount : BigDecimal , currency : Currency )
-Amount ( pennies : Long , currency : Currency )
-fun compareTo ( other : Amount ) : Int
+Amount ( amount : BigDecimal , currency : Currency )
+Amount ( pennies : Long , currency : Currency )
+fun compareTo ( other : Amount ) : Int
val currency : Currency
-operator fun div ( other : Long ) : Amount
-operator fun div ( other : Int ) : Amount
-operator fun minus ( other : Amount ) : Amount
+operator fun div ( other : Long ) : Amount
+operator fun div ( other : Int ) : Amount
+operator fun minus ( other : Amount ) : Amount
val pennies : Long
-operator fun plus ( other : Amount ) : Amount
-operator fun times ( other : Long ) : Amount
-operator fun times ( other : Int ) : Amount
+operator fun plus ( other : Amount ) : Amount
+operator fun times ( other : Long ) : Amount
+operator fun times ( other : Int ) : Amount
fun toString ( ) : String