git clone https://github.com/ndidplatform/examples.git
cd examples
git checkout d022247bf154be6baffd4457a490a8d3086df94e -b 0.5.0
cd docker
docker-compose -f docker-compose.build.yml build --no-cache
| // issue asset | |
| val cashState = rpcOps.startFlow(::CashIssueFlow, issueAmount, issuerBankPartyRef, notaryParty).returnValue.get() | |
| // transfer asset | |
| val paymentRequest = CashPaymentFlow.PaymentRequest(transferAmount, targetParty, true, issuerParty) | |
| val cashState = rpcOps.startFlow(::CashPaymentFlow, paymentRequest).returnValue.get() |
| @InitiatingFlow | |
| @StartableByRPC | |
| class ProxyNameIssueFlow(val state: ProxyNameState): FlowLogic<SignedTransaction>() { | |
| @Suspendable | |
| override fun call(): SignedTransaction { | |
| val notary = serviceHub.networkMapCache.notaryIdentities.first() | |
| val issueCommand = Command(ProxyNameContract.Commands.Issue(), state.participants.map { it.owningKey }) | |
| val builder = TransactionBuilder(notary = notary) | |
| builder.addOutputState(state, ProxyNameContract.PROXYNAME_CONTRACT_ID) | |
| builder.addCommand(issueCommand) |
| @CordaSerializable | |
| data class ProxyName (val identifier: String, | |
| val hash: String, | |
| val namespace: String, | |
| val value: String, | |
| val acctName: String, | |
| val acctNo: String) |
| @InitiatingFlow | |
| @StartableByRPC | |
| class ProxyNameAddFlow(val proxy: ProxyName): FlowLogic<Unit>() { | |
| @Suspendable | |
| override fun call() { | |
| val databaseService = serviceHub.cordaService(ProxyNameDatabaseService::class.java) | |
| databaseService.insertProxyName(proxy) | |
| } | |
| } |
| #!/bin/bash | |
| set -e | |
| GVERSION="1.11.2" | |
| GFILE="go$GVERSION.linux-amd64.tar.gz" | |
| GOPATH="$HOME/go" | |
| GOROOT="/usr/local/go" | |
| if [ -d $GOROOT ]; then | |
| echo "Installation directories already exist $GOROOT" |
| { | |
| "type":"response_result", | |
| "success":true, | |
| "reference_id":"08b1f27f-544b-4c43-9e98-779ecdb3e9fc", | |
| "request_id":"ec1cd1732a25b7b570fcf4a65287f198914076a780060a86eb5cb451c3b11ac3" | |
| } |
| { | |
| "type":"incoming_request", | |
| "mode":3, | |
| "request_id":"8707fa402ae174737a5a6cefa7e8d47b836f40fdae7f2b53297ceecda27f3b7c", | |
| "namespace":"cid", | |
| "identifier":"1234", | |
| "request_message": "Request for consent to add an identity with namespace:cid, | |
| identifier:1234 at IdP (idp1). Ref ID:54803 \\n\\nคำร้องเพื่อขอคำยินยอมในการเพิ่มตัวตนในระบบด้วย namespace: cid และ identifier:1234 ที่ IdP (idp1) Ref ID:54803 ", | |
| "request_message_hash":"eQWSLRcKorYM4ftiD/vF2Y89c2v7J5fLP/qn+CuGH2g=", | |
| "requester_node_id":"idp1", |
| { | |
| "type:"create_identity_result", | |
| "success":true, | |
| "reference_id":"5b60f18d-d4b5-45ff-8fa1-f48aa901ce81", | |
| "request_id":"665c0231769396837e71db63d01dd0548d17363e1ba6f10bc153cd66ae90898a", | |
| "secret":"AAH/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AA==|fH3mDHt4PGBJK9IYmZUt/x49uZ5xVWCDa5iy8jCJab/jGe3nRivCFBYBa7YpF4tgXoJYeVDwV84LNtiikQZbhbIbhxoixItOrL816l0Ua8+pGj5va3H9dSaa1eMnMa1DFA2GFQuIUFnPrjjpZTZ65i+R2g8O+iZaoBMPIMqmkKlD+kSUA4nMIvrY2VNXYxq4XTwdhjxJPR60Za0yz0rZ9b1tFHvPsz+r9opY4nydmxcmu/214os/s38eUF87re6c+15f8xb3LFuM2lkJcedRfkQ2Mbwwk0e+r7vD5nUVymgf5eAEyJg+ef6J85VetzlPDufr/Q7fnO9YrNtB6eR3lw==" | |
| } |
| { | |
| "type":"create_identity_request_result", | |
| "reference_id":"5b60f18d-d4b5-45ff-8fa1-f48aa901ce81", | |
| "request_id":"665c0231769396837e71db63d01dd0548d17363e1ba6f10bc153cd66ae90898a", | |
| "accessor_id":"23qpJaufpzRczhNvCLyaxD9IaJ9qI93hjhn1eMIPF+0=", | |
| "success":true, | |
| "exist":false | |
| } |