Tools, FAQ, Tutorials:
Main Interfaces to Communicate with Ledger Peer
What are Main Interfaces to Communicate with a ledger peer on a hyperledger fabric network?
✍: FYIcenter.com
There are 3 Main Interfaces to Communicate with a ledger peer on a hyperledger fabric network.
1. Peer CLI - The Peer CLI is a Command Line Interface (CLI) provided as part of the Hyperledger Fabric distribution package. It is normally distributed as a Docker container image. and allows you to run the "peer" command to communicate with a ledger peer.
The following example shows you how to run the Peer CLI from the CLI docker container:
$ docker exec -it cli bash bash-4.4# echo $CORE_PEER_ADDRESS peer0.org1.example.com:7051 bash-4.4# peer node status status:STARTED
2. Client REST API - The Client REST API is provided at default port 5000 of the ledger peer. But this API is no longer supported since Hyperledger Fabric 1.0.0.
The following example shows you how to get the blockchain information from a ledger peer running at 172.17.0.2:5000:
$ curl 172.17.0.2:5000/chain { "height":10001, "currentBlockHash":"4Yc4yCO95wcpWHW2NLFlf76OGURBBxYZMf3yUyvrEXs5TMai9qNKfy9Yn/==" }
3. Operation REST API - The Operation REST API is provided at default port 9443 of the ledger peer and default port 8443 of the orderer peer. This REST API is for operators to maintain the peer, not for users to interact with content of the network.
The following example shows you how to check the health of the ledger peer running at 172.17.0.2:9443:
$ curl 172.17.0.2:9443/healthz { "status": "OK", "time": "2009-11-10T23:00:00Z" }
4. Golang SDK - The Golang SDK is a set Golang library that encapsulates interaction protocol to allow you interface with a ledger peer with a Golang program.
For more information on Golang SDK, see github.com/hyperledger/fabric-sdk-go.
5. Other SDKs - SDKs for other languages are also available:
⇒ Download and Install Golang SDK
⇐ Interfaces to Communicate with Ledger Peer
2020-01-21, 958🔥, 0💬
Popular Posts:
How to create a navigation file like navigation.xhtml for an EPUB 3.0 book? At least one navigation ...
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
What is EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator"...
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...