When use `grpcOptions` and `tlsCACerts` option in connect.json? - hyperledger-fabric

My version of composer-cli is 0.18.1
I found connection.json in fabric-tools's subDictionary didn't have grpcOptions and tlsCACerts option.
And
connection.json in the demo of first-network have.
So,I want to what determines it ?

fabric-tools `subDirectory' you mean ? The connection profile provided for the starter Dev Fabric network (to enable you to get going with Composer) is a simple connection.json file for a singular, simple org - its used for the Dev bootstrap 'PeerAdmin' card built here in 'Steps Three' to 'Step Five' - so that it can deploy a sample Composer business network on the Fabric channel the connection.json is configured to use.
Fabric is the underlying blockchain infrastructure - and first-network is a sample of that to generate the necessary Fabric crypto material and containers. You will see use of grpcOptions in the 'next' stream docs - see multi-org tutorial here -> https://hyperledger.github.io/composer/next/tutorials/deploy-to-fabric-multi-org

Related

issues with installing fabric samples

some files are missing from the Fabric samples, docker images, and binaries download like the first-network folder and others. how do I get the missing files imported on vscode?
At the time of writing, first-network no longer exists as a Hyperledger Fabric sample. If you are using an old versions of Fabric (for example, v1.4) and the corresponding documentation, which does describe first-network, you will need to make sure you specify the appropriate version when installing Fabric components so it pulls the samples from the correct branch of the samples repository. For Fabric v1.4, that would be this branch:
https://github.com/hyperledger/fabric-samples/tree/release-1.4
If you are using the latest version of the Fabric and its documentation, test-network is now used to deploy a sample network and chaincode.

How to place chaincode using hyperledger fabric?

Problem:
I am very new to Hyperledger Fabric. I have cloned the fabric-samples repository and built a network using it. The problem I have is, should I place chaincode inside the chaincode folder of the fabric-samples?.
Yes, you should if you are using the examples but you can change the path as you like.
I recommend you to read the documentation first.
Choosing a Location for the Code

Hyperledger Fabric: UI for first-network

I am quite new to Hyperledger Blockchain and have started with exploring 2 sample codes.
(1) https://medium.freecodecamp.org/ultimate-end-to-end-tutorial-to-create-an-application-on-blockchain-using-hyperledger-3a83a80cbc71 - where creating an application using hyperledger was taught - through creating .bna, .card files, deploying them etc. Also saw that an Angular extension is supported, giving the UI.
(2) Classic first-network http://hyperledger-fabric.readthedocs.io/en/release-1.1/build_network.html - where chaincode was deployed etc.
My question is, how can I get a UI for (2),like I did in (1)? It was quite convenient.
In the First tutorial, you used Hyperledger Composer to create a BNA which is a friendly way to create chaincode, and there is an Angular Application generator included.
In the second you directly installed some chaincode on to Fabric without a UI (and without using Composer. In this case you would have to write the UI yourself. In the first example you can build your own app by extending the generated app.
Composer is a tool that makes it easy and fast to create chaincode and applications to run on Fabric. If you don't use Composer you do have some more flexibility, but you have to do more work yourself.

composer network install it's not working

I'm trying setup HyperLedger fabric 1.1 on IBM cloud.I'm follwing this is link " https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-single-org "..In this link 7th step " Installing the Hyperledger Composer business network onto the Hyperledger Fabric peer nodes "..I'm running this command composer network install -c PeerAdmin#fabric-network -a tutorial-network#0.0.1.bna..It's not working that command..
here is screenshot :-
enter image description here
please let me...
thanks in advance
You should ideally request support from the IBM Cloud Portal (link here -> https://console.bluemix.net/docs/services/blockchain/ibmblockchain_support.html#ibmblockchain_support) - you can also see ANSWERS here on the IBM site -> https://developer.ibm.com/answers/smart-spaces/261/blockchain.html
If using its Enterprise plan my guess is that you should be using this guide for 0.16.x of Composer -> https://hyperledger.github.io/composer/v0.16/tutorials/deploy-to-fabric-single-org (to match your Composer version) - the tutorial link you provided is for version 0.19.x of Composer which has a different command sequence and probably explains the 'syntax' issue. Hope this helps.
If you are only installing hyperledger now, be aware that some of the commands have been removed in hyperedger 19.0 which is the latest version as of today, refer to this link for more information on removed and new commands.

Adding Images in Hyperledger

I am trying to make a registry based on hyperperledger with composer .
1- How to integrate image upload with hyperledger Fabric and Composer
and How to create smart contract for the registry
In your registry, you can Base64-ify your image/content/media and store as String. In your modeled Asset in Hyperledger Composer, one attribute for 'imageString' is defined as 'String in your Hyperledger Composer model file.
Technically, this is also a Node question. Using Javascript, eg. fs.readFileSync(‘yourimageFile.jpg’).toString(‘base64’);, you should be able to convert the image to a Base64 string in your code.
please also see this link for more information - it tells you how to go about storing your images (media, PDFs etc) - and the comments at the end.
-> How to deal with forms,images,videos of an asset in hyperledger composer

Resources