mirror of
https://github.com/corda/corda.git
synced 2025-06-17 14:48:16 +00:00
Rename com.r3corda -> net.corda
This commit is contained in:
@ -81,5 +81,5 @@ Wire protocol
|
||||
The client RPC wire protocol is not currently documented. To use it you must use the client library provided.
|
||||
This is likely to change in a future release.
|
||||
|
||||
.. _CordaRPCClient: api/com.r3corda.client/-corda-r-p-c-client/index.html
|
||||
.. _CordaRPCOps: api/com.r3corda.node.services.messaging/-corda-r-p-c-ops/index.html
|
||||
.. _CordaRPCClient: api/net.corda.client/-corda-r-p-c-client/index.html
|
||||
.. _CordaRPCOps: api/net.corda.node.services.messaging/-corda-r-p-c-ops/index.html
|
||||
|
@ -87,9 +87,9 @@ The user name and password for the login are as per the node data source configu
|
||||
The name and column layout of the internal node tables is in a state of flux and should not be relied upon to remain static
|
||||
at the present time, and should certainly be treated as read-only.
|
||||
|
||||
.. _CordaPluginRegistry: api/com.r3corda.core.node/-corda-plugin-registry/index.html
|
||||
.. _ServiceHubInternal: api/com.r3corda.node.services.api/-service-hub-internal/index.html
|
||||
.. _ServiceHub: api/com.r3corda.node.services.api/-service-hub/index.html
|
||||
.. _CordaPluginRegistry: api/net.corda.core.node/-corda-plugin-registry/index.html
|
||||
.. _ServiceHubInternal: api/net.corda.node.services.api/-service-hub-internal/index.html
|
||||
.. _ServiceHub: api/net.corda.node.services.api/-service-hub/index.html
|
||||
|
||||
Building Against Corda
|
||||
----------------------
|
||||
@ -104,7 +104,7 @@ root directory of Corda
|
||||
./gradlew install
|
||||
|
||||
This will publish corda-$version.jar, finance-$version.jar, core-$version.jar and node-$version.jar to the
|
||||
group com.r3corda. You can now depend on these as you normally would a Maven dependency.
|
||||
group net.corda. You can now depend on these as you normally would a Maven dependency.
|
||||
|
||||
Gradle Plugins for Cordapps
|
||||
===========================
|
||||
@ -148,15 +148,15 @@ To build against Corda and the plugins that cordapps use, update your build.grad
|
||||
|
||||
dependencies {
|
||||
... your dependencies ...
|
||||
classpath "com.r3corda.plugins:cordformation:$corda_version"
|
||||
classpath "com.r3corda.plugins:quasar-utils:$corda_version"
|
||||
classpath "com.r3corda.plugins:publish-utils:$corda_version"
|
||||
classpath "net.corda.plugins:cordformation:$corda_version"
|
||||
classpath "net.corda.plugins:quasar-utils:$corda_version"
|
||||
classpath "net.corda.plugins:publish-utils:$corda_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.r3corda.plugins.cordformation'
|
||||
apply plugin: 'com.r3corda.plugins.quasar-utils'
|
||||
apply plugin: 'com.r3corda.plugins.publish-utils'
|
||||
apply plugin: 'net.corda.plugins.cordformation'
|
||||
apply plugin: 'net.corda.plugins.quasar-utils'
|
||||
apply plugin: 'net.corda.plugins.publish-utils'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
@ -164,10 +164,10 @@ To build against Corda and the plugins that cordapps use, update your build.grad
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.r3corda:core:$corda_version"
|
||||
compile "com.r3corda:finance:$corda_version"
|
||||
compile "com.r3corda:node:$corda_version"
|
||||
compile "com.r3corda:corda:$corda_version"
|
||||
compile "net.corda.core:$corda_version"
|
||||
compile "net.corda.finance:$corda_version"
|
||||
compile "net.corda.node:$corda_version"
|
||||
compile "net.corda.corda:$corda_version"
|
||||
... other dependencies here ...
|
||||
}
|
||||
|
||||
@ -197,14 +197,14 @@ Cordformation is the local node deployment system for Cordapps, the nodes genera
|
||||
experimenting, debugging, and testing node configurations and setups but not intended for production or testnet
|
||||
deployment.
|
||||
|
||||
To use this gradle plugin you must add a new task that is of the type ``com.r3corda.plugins.Cordform`` to your
|
||||
To use this gradle plugin you must add a new task that is of the type ``net.corda.plugins.Cordform`` to your
|
||||
build.gradle and then configure the nodes you wish to deploy with the Node and nodes configuration DSL.
|
||||
This DSL is specified in the `JavaDoc <api/index.html>`_. An example of this is in the template-cordapp and below
|
||||
is a three node example;
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['build']) {
|
||||
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
|
||||
directory "./build/nodes" // The output directory
|
||||
networkMap "Controller" // The artemis address of the node named here will be used as the networkMapAddress on all other nodes.
|
||||
node {
|
||||
|
@ -29,11 +29,11 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
mainClassName = "com.r3corda.docs.ClientRpcTutorialKt"
|
||||
mainClassName = "net.corda.docs.ClientRpcTutorialKt"
|
||||
|
||||
task getClientRpcTutorial(type: CreateStartScripts) {
|
||||
dependsOn(classes)
|
||||
mainClassName = "com.r3corda.docs.ClientRpcTutorialKt"
|
||||
mainClassName = "net.corda.docs.ClientRpcTutorialKt"
|
||||
applicationName = "client-rpc-tutorial"
|
||||
defaultJvmOpts = []
|
||||
outputDir = new File(project.buildDir, 'scripts')
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.r3corda.docs
|
||||
package net.corda.docs
|
||||
|
||||
import com.google.common.net.HostAndPort
|
||||
import com.r3corda.client.CordaRPCClient
|
||||
import com.r3corda.core.transactions.SignedTransaction
|
||||
import com.r3corda.node.services.config.NodeSSLConfiguration
|
||||
import net.corda.client.CordaRPCClient
|
||||
import net.corda.core.transactions.SignedTransaction
|
||||
import net.corda.node.services.config.NodeSSLConfiguration
|
||||
import org.graphstream.graph.Edge
|
||||
import org.graphstream.graph.Node
|
||||
import org.graphstream.graph.implementations.SingleGraph
|
@ -21,7 +21,7 @@ Schemas
|
||||
Every ``ContractState`` can implement the ``QueryableState`` interface if it wishes to be inserted into the node's local
|
||||
database and accessible using SQL.
|
||||
|
||||
.. literalinclude:: ../../core/src/main/kotlin/com/r3corda/core/schemas/PersistentTypes.kt
|
||||
.. literalinclude:: ../../core/src/main/kotlin/net.corda.core/schemas/PersistentTypes.kt
|
||||
:language: kotlin
|
||||
:start-after: DOCSTART QueryableState
|
||||
:end-before: DOCEND QueryableState
|
||||
@ -34,12 +34,12 @@ cases where the schema has evolved, with each one being represented by a ``Mappe
|
||||
Nodes have an internal ``SchemaService`` which decides what to persist and what not by selecting the ``MappedSchema``
|
||||
to use.
|
||||
|
||||
.. literalinclude:: ../../node/src/main/kotlin/com/r3corda/node/services/api/SchemaService.kt
|
||||
.. literalinclude:: ../../node/src/main/kotlin/net.corda.node/services/api/SchemaService.kt
|
||||
:language: kotlin
|
||||
:start-after: DOCSTART SchemaService
|
||||
:end-before: DOCEND SchemaService
|
||||
|
||||
.. literalinclude:: ../../core/src/main/kotlin/com/r3corda/core/schemas/PersistentTypes.kt
|
||||
.. literalinclude:: ../../core/src/main/kotlin/net.corda.core/schemas/PersistentTypes.kt
|
||||
:language: kotlin
|
||||
:start-after: DOCSTART MappedSchema
|
||||
:end-before: DOCEND MappedSchema
|
||||
@ -85,5 +85,5 @@ to initialise the ORM layer.
|
||||
Several examples of entities and mappings are provided in the codebase, including ``Cash.State`` and
|
||||
``CommercialPaper.State``. For example, here's the first version of the cash schema.
|
||||
|
||||
.. literalinclude:: ../../finance/src/main/kotlin/com/r3corda/schemas/CashSchemaV1.kt
|
||||
:language: kotlin
|
||||
.. literalinclude:: ../../finance/src/main/kotlin/net.corda.schemas/CashSchemaV1.kt
|
||||
:language: kotlin
|
||||
|
@ -91,7 +91,7 @@ Our protocol has two parties (B and S for buyer and seller) and will proceed as
|
||||
it lacks a signature from S authorising movement of the asset.
|
||||
3. S signs it and hands the now finalised ``SignedTransaction`` back to B.
|
||||
|
||||
You can find the implementation of this protocol in the file ``finance/src/main/kotlin/com/r3corda/protocols/TwoPartyTradeProtocol.kt``.
|
||||
You can find the implementation of this protocol in the file ``finance/src/main/kotlin/net.corda.protocols/TwoPartyTradeProtocol.kt``.
|
||||
|
||||
Assuming no malicious termination, they both end the protocol being in posession of a valid, signed transaction that
|
||||
represents an atomic asset swap.
|
||||
@ -659,7 +659,7 @@ it re-assigns ownership instead. The chain of two transactions is finally commit
|
||||
directly to the ``a.services.recordTransaction`` method (note that this method doesn't check the transactions are
|
||||
valid).
|
||||
|
||||
And that's it: you can explore the documentation for the `MockNode API <api/com.r3corda.node.internal.testing/-mock-network/index.html>`_ here.
|
||||
And that's it: you can explore the documentation for the `MockNode API <api/net.corda.node.internal.testing/-mock-network/index.html>`_ here.
|
||||
|
||||
Versioning
|
||||
----------
|
||||
|
@ -133,7 +133,7 @@ New features in this release:
|
||||
|
||||
API changes:
|
||||
|
||||
* The transaction types (Signed, Wire, LedgerTransaction) have moved to ``com.r3corda.core.transactions``. You can
|
||||
* The transaction types (Signed, Wire, LedgerTransaction) have moved to ``net.corda.core.transactions``. You can
|
||||
update your code by just deleting the broken import lines and letting your IDE re-import them from the right
|
||||
location.
|
||||
* ``AbstractStateReplacementProtocol.verifyProposal`` has changed its prototype in a minor way.
|
||||
@ -277,7 +277,7 @@ Summary of API changes (not exhaustive):
|
||||
inputs and outputs).
|
||||
``TransactionBuilder()`` is now abstract, you should use ``TransactionType.General.Builder()`` for building transactions.
|
||||
|
||||
* The cash contract has moved from ``com.r3corda.contracts`` to ``com.r3corda.contracts.cash``
|
||||
* The cash contract has moved from ``net.corda.contracts`` to ``net.corda.contracts.cash``
|
||||
* ``Amount`` class is now generic, to support non-currency types such as physical assets. Where you previously had just
|
||||
``Amount``, you should now use ``Amount<Currency>``.
|
||||
* Refactored the Cash contract to have a new FungibleAsset superclass, to model all countable assets that can be merged
|
||||
|
@ -7,7 +7,7 @@ These provide a common language for states and contracts.
|
||||
Amount
|
||||
------
|
||||
|
||||
The `Amount <api/com.r3corda.core.contracts/-amount/index.html>`_ class is used to represent an amount of some
|
||||
The `Amount <api/net.corda.core.contracts/-amount/index.html>`_ class is used to represent an amount of some
|
||||
fungible asset. It is a generic class which wraps around a type used to define the underlying product, called
|
||||
the *token*. For instance it can be the standard JDK type ``Currency``, or an ``Issued`` instance, or this can be
|
||||
a more complex type such as an obligation contract issuance definition (which in turn contains a token definition
|
||||
@ -201,4 +201,4 @@ The ``SecureHash`` class represents a secure hash of unknown algorithm. We curre
|
||||
``SecureHash.SHA256``. There are utility methods to create them, parse them and so on.
|
||||
|
||||
We also provide some mathematical utilities, in particular a set of interpolators and classes for working with
|
||||
splines. These can be found in the `maths package <api/com.r3corda.core.math/index.html>`_.
|
||||
splines. These can be found in the `maths package <api/net.corda.core.math/index.html>`_.
|
||||
|
@ -31,7 +31,7 @@ There is a worked example of attachments, which relays a simple document from on
|
||||
trade protocol" also includes an attachment, however it is a significantly more complex demo, and less well suited
|
||||
for a tutorial.
|
||||
|
||||
The demo code is in the file "src/main/kotlin/com/r3corda/demos/attachment/AttachmentDemo.kt", with the core logic
|
||||
The demo code is in the file "src/main/kotlin/net.corda.demos/attachment/AttachmentDemo.kt", with the core logic
|
||||
contained within the two functions ``runRecipient()`` and ``runSender()``. We'll look at the recipient function first;
|
||||
this subscribes to notifications of new validated transactions, and if it receives a transaction containing attachments,
|
||||
loads the first attachment from storage, and checks it matches the expected attachment ID. ``ResolveTransactionsProtocol``
|
||||
@ -72,7 +72,7 @@ transaction and send it to the recipient node:
|
||||
val serviceHub = node.services
|
||||
// Make sure we have the file in storage
|
||||
if (serviceHub.storageService.attachments.openAttachment(PROSPECTUS_HASH) == null) {
|
||||
com.r3corda.demos.Role::class.java.getResourceAsStream("bank-of-london-cp.jar").use {
|
||||
net.corda.demos.Role::class.java.getResourceAsStream("bank-of-london-cp.jar").use {
|
||||
val id = node.storage.attachments.importAttachment(it)
|
||||
assertEquals(PROSPECTUS_HASH, id)
|
||||
}
|
||||
@ -96,4 +96,4 @@ transaction and send it to the recipient node:
|
||||
}.failure {
|
||||
println("Failed to relay message ")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,21 +11,21 @@ We start off by connecting to the node itself. For the purposes of the tutorial
|
||||
local port and connect to the Buyer side. We will pass in the address as a command line argument. To connect to the node
|
||||
we also need to access the certificates of the node, we will access the node's ``certificates`` directory directly.
|
||||
|
||||
.. literalinclude:: example-code/src/main/kotlin/com/r3corda/docs/ClientRpcTutorial.kt
|
||||
.. literalinclude:: example-code/src/main/kotlin/net.corda.docs/ClientRpcTutorial.kt
|
||||
:language: kotlin
|
||||
:start-after: START 1
|
||||
:end-before: END 1
|
||||
|
||||
Now we can connect to the node itself using a valid RPC login. By default the user `user1` is available with password `test`.
|
||||
|
||||
.. literalinclude:: example-code/src/main/kotlin/com/r3corda/docs/ClientRpcTutorial.kt
|
||||
.. literalinclude:: example-code/src/main/kotlin/net.corda.docs/ClientRpcTutorial.kt
|
||||
:language: kotlin
|
||||
:start-after: START 2
|
||||
:end-before: END 2
|
||||
|
||||
``proxy`` now exposes the full RPC interface of the node:
|
||||
|
||||
.. literalinclude:: ../../node/src/main/kotlin/com/r3corda/node/services/messaging/CordaRPCOps.kt
|
||||
.. literalinclude:: ../../node/src/main/kotlin/net.corda.node/services/messaging/CordaRPCOps.kt
|
||||
:language: kotlin
|
||||
:start-after: interface CordaRPCOps
|
||||
:end-before: }
|
||||
@ -34,7 +34,7 @@ The one we need in order to dump the transaction graph is ``verifiedTransactions
|
||||
RPC will return a list of transactions and an Observable stream. This is a general pattern, we query some data and the
|
||||
node will return the current snapshot and future updates done to it.
|
||||
|
||||
.. literalinclude:: example-code/src/main/kotlin/com/r3corda/docs/ClientRpcTutorial.kt
|
||||
.. literalinclude:: example-code/src/main/kotlin/net.corda.docs/ClientRpcTutorial.kt
|
||||
:language: kotlin
|
||||
:start-after: START 3
|
||||
:end-before: END 3
|
||||
@ -43,7 +43,7 @@ The graph will be defined by nodes and edges between them. Each node represents
|
||||
output-input relations. For now let's just print ``NODE <txhash>`` for the former and ``EDGE <txhash> <txhash>`` for the
|
||||
latter.
|
||||
|
||||
.. literalinclude:: example-code/src/main/kotlin/com/r3corda/docs/ClientRpcTutorial.kt
|
||||
.. literalinclude:: example-code/src/main/kotlin/net.corda.docs/ClientRpcTutorial.kt
|
||||
:language: kotlin
|
||||
:start-after: START 4
|
||||
:end-before: END 4
|
||||
@ -72,7 +72,7 @@ We should start seeing new ``NODE``-s and ``EDGE``-s appearing.
|
||||
|
||||
Now let's try to visualise the transaction graph. We will use a graph drawing library called graphstream_
|
||||
|
||||
.. literalinclude:: example-code/src/main/kotlin/com/r3corda/docs/ClientRpcTutorial.kt
|
||||
.. literalinclude:: example-code/src/main/kotlin/net.corda.docs/ClientRpcTutorial.kt
|
||||
:language: kotlin
|
||||
:start-after: START 5
|
||||
:end-before: END 5
|
||||
|
@ -21,7 +21,7 @@ Where to put your code
|
||||
|
||||
A CorDapp is a collection of contracts, state definitions, protocols and other ways to extend the server. To create
|
||||
one you would just create a Java-style project as normal, with your choice of build system (Maven, Gradle, etc).
|
||||
Then add a dependency on ``com.r3corda:core:0.X`` where X is the milestone number you are depending on. The core
|
||||
Then add a dependency on ``net.corda.core:0.X`` where X is the milestone number you are depending on. The core
|
||||
module defines the base classes used in this tutorial.
|
||||
|
||||
Starting the commercial paper class
|
||||
@ -800,4 +800,4 @@ It is typical for slightly different contracts to have lots of common logic that
|
||||
concept of being issued, being exited and being upgraded are all usually required in any contract. Corda calls these
|
||||
frequently needed chunks of logic "clauses", and they can simplify development considerably.
|
||||
|
||||
Clauses and how to use them are addressed in the next tutorial, ":doc:`tutorial-contract-clauses`".
|
||||
Clauses and how to use them are addressed in the next tutorial, ":doc:`tutorial-contract-clauses`".
|
||||
|
@ -32,8 +32,8 @@ We start with the empty ledger:
|
||||
|
||||
.. sourcecode:: java
|
||||
|
||||
import static com.r3corda.core.testing.JavaTestHelpers.*;
|
||||
import static com.r3corda.core.contracts.JavaTestHelpers.*;
|
||||
import static net.corda.core.testing.JavaTestHelpers.*;
|
||||
import static net.corda.core.contracts.JavaTestHelpers.*;
|
||||
|
||||
@Test
|
||||
public void emptyLedger() {
|
||||
@ -139,7 +139,7 @@ last line of ``transaction``:
|
||||
|
||||
The code finally compiles. When run, it produces the following error::
|
||||
|
||||
com.r3corda.core.contracts.TransactionVerificationException$ContractRejection: java.lang.IllegalArgumentException: Failed requirement: for deposit [01] at issuer Snake Oil Issuer the amounts balance
|
||||
net.corda.core.contracts.TransactionVerificationException$ContractRejection: java.lang.IllegalArgumentException: Failed requirement: for deposit [01] at issuer Snake Oil Issuer the amounts balance
|
||||
|
||||
.. note:: The reference here to the 'Snake Oil Issuer' is because we are using the pre-canned ``DUMMY_CASH_ISSUER``
|
||||
identity as the issuer of our cash.
|
||||
|
Reference in New Issue
Block a user