A simple Corda 5 Cordapp that allows you to launch probes between planets with little messages. So Come say "Hello" to Mars or Pluto.
There are two flows LaunchProbeFlow
which takes two parameters:
message
(String) - A message to send with the probetarget
(x500 String) - The X500 name of the probes target
And ListVisitedProbeMessagesFlow
which takes no parameters, but returns a list of recieved messages
- Corda CLI
- Cordapp Builder
- Node CLI
- Docker
- Navigate to the app directory
- Build the app with
gradlew build
- Build the Cordapp with the cordapp-builder CLI util
cordapp-builder create --cpk contracts\build\libs\<CPK FILE NAME> --cpk workflows\build\libs\<CPK FILE NAME> -o solar-system.cpb
- Configure the network with
corda-cli network config docker-compose solar-system
- Build the network deployment dockerfile using corda-cli
corda-cli network deploy -n solar-system -f solar-system.yaml > docker-compose.yaml
- Deploy the network using docker-compose
docker-compose -f docker-compose.yaml up -d
- When deployed check the status with corda-cli
corda-cli network status -n solar-system
note the mapped web ports for Http RPC - Install the application on the network using corda-cli
corda-cli package install -n solar-system solar-system.cpb
-
Using the port noted from the network status visit
https://localhost:<port>/api/v1/swagger
-
Login using the button on the top right usernames and passwords are as follows:
Planet Username Password Earth earthling password Mars martian password Pluto plutonian password -
Launch the
LaunchProbeFlow
via the Start Flow api by passing something similar
{
"rpcStartFlowRequest": {
"clientId": "launchpad-2",
"flowName": "net.corda.solarsystem.flows.LaunchProbeFlow",
"parameters": {
"parametersInJson": "{\"message\": \"Hello Mars\", \"target\": \"C=GB, L=FOURTH, O=MARS, OU=PLANET\", \"planetaryOnly\":\"true\"}"
}
}
}
- Add a node
corda-node-cli endpoint add -n earth --basic-auth -u earthling -P password https://localhost:<port>/api/v1/
- set the node as default
corda-node-cli endpoint set -e earth
- launch a flow
corda-node-cli flow start -n LaunchProbeFlow -A message="hello" -A target="C=US, L=NINTH, O=PLUTO, OU=DWARF_PLANET" -A planetaryOnly=true -u earthling -P password
Please see the Web-UI directory for details on installing and luanching a web interface