Deprecated notice
Consortium networks have been deprecated. This guide is for historical reference.Interaction tools
Corda standalone shell
Interact with your Corda node using Corda standalone shell.Prerequisites
- Install Java 8. See Corda docs: Set-up instructions.
- Download Corda standalone shell from Corda artifactory.
- A Corda node deployed with Chainstack
Running the standalone shell
You can connect to your Corda node and interact with it in shell. To be able to interact with the CorDapps through shell, you must have the CorDapp contract and workflow JAR files both locally on your machine and on the node you are connecting to.- CORDA_RPC_HOSTNAME — your Corda node RPC hostname
- CORDA_RPC_PORT — your Corda node RPC port
- CORDA_RPC_USER — your Corda node RPC username
- CORDA_RPC_PASSWORD — your Corda node RPC password
- /host/path/to/cordapps — path to your local directory with the contract and workflow JAR files that you uploaded to your Corda node. You only need to specify the
--cordapp-directory
parameter if you intend to interact with the CorDapps on the node.
help
to see the list of available commands.
Chainstack standalone shell
Interact with your Corda node using Chainstack standalone shell which is a containerized version of Corda standalone shell.Prerequisites
- Download and install Docker. See Get Started with Docker.
- A Corda node deployed with Chainstack
Running the standalone shell
You can connect to your Corda node and interact with it in shell. To be able to interact with the CorDapps through shell, you must have the CorDapp contract and workflow JAR files both locally on your machine and on the node you are connecting to.- /host/path/to/cordapps — path to your local directory with the contract and workflow JAR files that you uploaded to your Corda node. You only need to specify the
-v
and--cordapp-directory
parameters if you intend to interact with the CorDapps on the node. - CORDA_RPC_HOSTNAME — your Corda node RPC hostname
- CORDA_RPC_PORT — your Corda node RPC port
- CORDA_RPC_USER — your Corda node RPC username
- CORDA_RPC_PASSWORD — your Corda node RPC password
help
to see the list of available commands.
Using a client with the CordaRPCClient
class
For your application purposes, you need to write your own client in a JVM-compatible language using the CordaRPCClient class. The CordaRPCClient
class connects to your Corda node and exposes an RPC interaction interface.
For detailed instructions, see Corda documentation: Interacting with a node.
Over HTTP
Corda does not have its own webserver, so you will need to run your own webserver that uses the CordaRPCClient class to interact with your nodes.Using Spring Boot webserver
Corda provides a template Spring Boot webserver implementation that you can use to interact with your nodes. See Corda Spring webserver. To use the webserver, do the following:1
Clone the Corda samples repository:
2
Edit the where
spring-webserver/src/main/resources/application.properties
file:- SERVER_PORT — your Spring webserver port. Provide any open port that you will use to access the webserver.
- CORDA_RPC_USER — your Corda node RPC username
- CORDA_RPC_PASSWORD — your Corda node RPC password
- CORDA_RPC_HOSTNAME — your Corda node RPC hostname
- CORDA_RPC_PORT — your Corda node RPC port
3
Run the Spring webserver:
runPartyAServer
task specified in build.gradle
, start the server, and connect the server to your node.
Webserver task progress
The task progress for the webserver start printed in the output will never reach 100% completion. You can access the webserver at around 95%.localhost:SERVER_PORT
or from a remote machine via IP_ADDRESS:SERVER_PORT
.
The Corda Spring webserver implementation builds with the default RPC commands mapped to HTTP requests. See StandardController.kt.
Example: