hyperledger-composer

how to access the 'eventEmitted' field in transaction history of hyperledger fabric

只谈情不闲聊 提交于 2019-12-02 16:21:19
问题 I am working on hyperledger fabric.I want to access the 'eventEmitted' field in transaction history of hyperledger fabric. /*transaction history*/ "transactionType": "com.acn.hps.aops.ims.addingEvidence", "eventsEmitted": [ { "$class": "com.acn.hps.aops.ims.BasicEvent", "evidenceId": "100", "eventId": "b66fd1c38754519339172905d916497376029ad9620ba5f19999fb73cf1d8b58#0", "timestamp": "2018-03-01T08:36:41.164Z" } ] I was able to query the Transaction type and got the result, but now to access

What is the relationship between assets created in a composer network to the assets in fabric chaincode?

房东的猫 提交于 2019-12-02 15:49:00
问题 How do composer network represented in fabric runtime. Is the assets instances created in composer network have one to one relationship with assets created in actual fabric runtime? 回答1: Fabric doesn't have the concept of assets -- it uses a key/value store (LevelDB) or can use CouchDB (JSON store). When a Composer transaction is processed (which corresponds to an invokeChaincode transaction for Fabric), any assets that are created are stored as new keys in the key-value store, or documents

Auto Increment field in Composer

雨燕双飞 提交于 2019-12-02 15:22:01
问题 Is there any auto_increment field type is available when creating an Asset instance. For example, Asset id should be autogenerated field and should be created at runtime, instead of mentioning the value at the application level. I can achieve it by creating a transaction processor function to check the list of asset and add 1 to increment as an alternative. Looking for new a feature which will help multiple developers while building an application. Regards, Pradeep P 回答1: the best practice is

Get Count of assets in HyperLedger Composer Query?

别等时光非礼了梦想. 提交于 2019-12-02 12:32:12
I want to write a query in HyperLedger Composer that returns me the count of assets that I have in hyper ledger. I have thousands of records. I don't want to fetch them all and calculate count. Data transfer will be slow I want the query to return the count. Unfortunately there is no count in the composer query language. You would have to create a query to select all the assets then check the length of the results. For example with the Basic Sample Network: query selectAssets { description: "Select all assets" statement: SELECT org.example.basic.SampleAsset } then execute it: let results =

“composer network ping” won't show the participant after “composer identity issue”

余生长醉 提交于 2019-12-02 11:05:23
I am following steps in https://fabric-composer.github.io/managing/identity-issue.html to check the identity issuing for participants. I get no errors and when executing: composer identity issue -n 'mychain-network' -i WebAppAdmin -s DJY27pEnl16d -u user1 -a "com.example.model.Owner#userid" I get correctly: The participant can now connect to the business network with the following details: userID = user1 userSecret = kJoWHaYCxnes The problem is that later I don't get the participant when pinging: $ composer network ping -n 'mychain-network' -i user1 -s kJoWHaYCxnes The connection to the

Could not deploy business network to hyperledger fabric beta using composer

浪子不回头ぞ 提交于 2019-12-02 10:03:53
问题 I have tried to deploy a business network using composer to but it fails with the following error Error: event message must be properly signed by an identity from the same organization as the peer: [Expected MSP ID Org1MSP, received ]] what is the problem ? 回答1: There are several reasons why you might get this error You are not running composer v0.8.0 or higher. You can check what level you are running by invoking the command composer -v You haven't specified a valid hlfv1 profile or you

Hyperledger composer network install

≯℡__Kan透↙ 提交于 2019-12-02 10:01:36
Hi I'm having problem when trying to composer network install Installing business network. This may take a minute... Error: Error trying install business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: 14 UNAVAILABLE: Connect Failed composer network install rbo13 Make sure docker is running From their documentation, Installing pre-requisites Docker is required. Then try docker ps , check if the peer node/s is listed. Then try to ping your network with composer network ping --card admin@<some_network> Check if docker login is working.

error executing hyperledger fabric code on localhost:3000 (through REST) - transactionId

做~自己de王妃 提交于 2019-12-02 08:28:10
I have tried executing a sample case of transfer of money between two accounts while referring to this: https://medium.freecodecamp.org/ultimate-end-to-end-tutorial-to-create-an-application-on-blockchain-using-hyperledger-3a83a80cbc71 I have executed all steps, from creating .bna and .card to installing them, starting the network etc. On creating the RESTful API, I am able to see the blockchain on localhost:3000/explore. I am also able to add customers and their linked account details. However, while performing money transfer, there are two fields that are generated by default : transactionId

What is the relationship between assets created in a composer network to the assets in fabric chaincode?

萝らか妹 提交于 2019-12-02 08:20:22
How do composer network represented in fabric runtime. Is the assets instances created in composer network have one to one relationship with assets created in actual fabric runtime? Fabric doesn't have the concept of assets -- it uses a key/value store (LevelDB) or can use CouchDB (JSON store). When a Composer transaction is processed (which corresponds to an invokeChaincode transaction for Fabric), any assets that are created are stored as new keys in the key-value store, or documents in the JSON store. Composer organises assets and participants into "registries", which are used to construct

failed to install composer-cli but I see errors

好久不见. 提交于 2019-12-02 08:20:06
I see the following errors when run command npm install -g composer-cli@0.20 nvm 0.33.0 npm 6.4.1 node 10.13.0 I'm trying to the Hyperledger in my local Mac OS but it keep failing when I run the command. I followed this guide to install it https://hyperledger.github.io/composer/latest/installing/development-tools.html here's the error part: grpc@1.10.1 install /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc node-pre-gyp install --fallback-to-build --library=static_library node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc