Web app that uses a Spring Boot API for the Obligation CorDapp, that talks to a Corda node over Corda RPC.
Follow the Instructions for setting up which sets up a Notary and 3 Corda Nodes with the Obligation CorDapp installed on each node.
Make sure you have cloned the Obligation Cordapp example and started the nodes (as described in pre-requisites)
git clone git@github.com:clydedacruz/obligation-webapp-springboot.git
./gradlew runPartyAServer
The UI for Party A will be accessible at
<IP>:8080/obligation
The API for Party A will be accessible at
<IP>:8080/obligation/api/
We can similarly start up the web apps for Party B and Party C using the gradle tasks runPartyBServer
(port 8081) and runPartyCServer
(port 8082) respectively, which are defined in build.gradle
curl http://127.0.0.1:8080/obligation/api/peers
curl http://127.0.0.1:8080/obligation/api/me
curl http://127.0.0.1:8080/obligation/api/self-issue-cash?amount=2000¤cy=USD
curl http://127.0.0.1:8080/obligation/api/cash-balances
curl http://127.0.0.1:8080/obligation/api/issue-obligation?amount=100¤cy=USD&party=PartyB
curl http://127.0.0.1:8080/obligation/api/obligations
curl http://127.0.0.1:8080/obligation/api/transfer-obligation?id=4ecee9db-2d37-48f3-b10a-a1dd3cf272da&party=PartyB
curl http://127.0.0.1:8080/obligation/api/settle-obligation?id=918f8ca0-4785-4abb-8e17-5f2f8cdf0a7e&amount=100¤cy=USD
The obligation-cordapp-0.1.jar is included in the jars
directory to make the Corda flows and contracts accessible to api controller code.
It can be built by simply running ./gradlew jar
in the root directory of the obligation-cordapp