How to implement Hyperledger Fabric using Nodejs

441 views Asked by At

We have created AWS managed blockchain network (Hyperledger Fabric). And I wanted to connect and create a simple transaction over this network. Lets say university user updated student marks in the system. I am totally new to blockchain and Hyperledger Fabric. So I wanted to know what basic steps do I need to achieve this scenario. I am using windows 8 and node JavaScript.

Since we there are few libraries given like fabric-shim and fabric-network but still I am not able to implement this. I need at least way to make connection establishment to AWS managed block chain network and upload simple transaction. Anybody having solution much appreciated. Thanks

2

There are 2 answers

0
Elf On

I am able to connect to the network using below code:

const AWS = require('aws-sdk')

var managedblockchain = new AWS.ManagedBlockchain({'region': 'us-east- 1'});
var params = { NetworkId: 'Your-network-id-here' };

managedblockchain.getNetwork(params, function(err, data) {
    if (err) console.log(err, err.stack); // an error occurred
    else     console.log(data);           // successful response
   });

More here https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ManagedBlockchain.html

0
hassan ahmed On

I highly recommend you go through the official documentation it has matured very well over time and is very detailed. Go through the key concepts and then getting started.
https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html