More about this here
git clone https://github.com/vardan10/corda-membership-service.git
cd corda-membership-service
./gradlew deployNodes
- building may take upto a minute (it's much quicker if you already have the Corda binaries).bash createMembershipConfig.sh
./workflows-kotlin/build/nodes/runnodes
./gradlew runPartyAServer
(do in a new terminal)./gradlew runBnoServer
(do in a new terminal)
- Create IOU (Should fail as membership is not active)
curl -X POST \
http://localhost:50005/api/example/create-iou \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'iouValue=99&partyName=O%3DPartyB%2CL%3DNew%20York%2CC%3DUS'
- Request For membership
curl -X POST \
http://localhost:50005/api/membership/request \
-H 'content-type: application/x-www-form-urlencoded' \
-d role=DEFAULT
-d name='O=BNO,L=New York,C=US'
- Activate membership
curl -X POST \
http://localhost:50008/api/membership/activate \
-H 'content-type: application/x-www-form-urlencoded' \
-d name=O%3DPartyA%2CL%3DLondon%2CC%3DGB
- Create IOU (Should create successfully)
curl -X POST \
http://localhost:50005/api/example/create-iou \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'iouValue=99&partyName=O%3DPartyB%2CL%3DNew%20York%2CC%3DUS'
- Get Membership
curl -X POST \
http://localhost:50005/api/membership/get \
-H 'content-type: application/x-www-form-urlencoded' \
-d name=O%3DBNO%2CL%3DNew%20York%2CC%3DUS
- Change Party Metadata
curl -X POST \
http://localhost:50005/api/membership/ammend \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'role=DEFAULT2&name=O%3DBNO%2CL%3DNew%20York%2CC%3DUS'
- Revoke membership
curl -X POST \
http://localhost:50008/api/membership/revoke \
-H 'content-type: application/x-www-form-urlencoded' \
-d name=O%3DPartyA%2CL%3DLondon%2CC%3DGB
- Create IOU (Should fail again)
curl -X POST \
http://localhost:50005/api/example/create-iou \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'iouValue=99&partyName=O%3DPartyB%2CL%3DNew%20York%2CC%3DUS'
Corda distribution service
start ScheduleSyncFlow syncerConfig: null, launchAsync: true