Questions tagged [hyperledger-fabric-sdk-js]

Use this tag for questions based on how to interact with ledger using NodeJS SDK, please don't use this for questions based on Fabric Infrastructure & chaincode related questions.

Hyperledger Fabric is the operating system of an enterprise-strength permissioned blockchain network. For a high-level overview of the fabric, visit http://hyperledger-fabric.readthedocs.io/en/latest/.

Applications can be developed to interact with the blockchain network on behalf of the users. APIs are available to:

  • create channels
  • ask peer nodes to join the channel
  • install chaincodes in peers
  • instantiate chaincodes in a channel
  • invoke transactions by calling the chaincode
  • query the ledger for transactions or blocks

The Hyperledger Fabric SDK for Node.js is designed in an Object-Oriented programming style. Its modular construction enables application developers to plug in alternative implementations of key functions such as crypto suites, the state persistence store, and logging utility. https://fabric-sdk-node.github.io/release-1.4/index.html

142 questions
0
votes
0 answers

Unable to access the Hyperledger Fabric Network using API Error : "DiscoveryService: mfd-prd-channel error: access denied"

I have implemented hyperledger fabric network using v2.2 with 5 organizations. Chaincode implementation is accessible using cli but when using API it gives error "DiscoveryService: mfd-prd-channel error: access denied" SDK used : fabric-network:…
0
votes
0 answers

Commit of transaction XXXX failed on peer peer1-org1 with status INVALID_ENDORSER_TRANSACTION

I run hyperledger fabric network with next configuration: 1 fabric-ca 1 orderer 6 peers My common connection profile: name: "Network" version: "1.0" channels: mychannel: orderers: - orderer1-org0 peers: peer1-org0: …
0
votes
0 answers

Error: the account XXXXXXXXXX does not exist

I have already run my hyperledger fabric network. So I have already registered, enrolled and put into couchdb wallet my users. Now I try to evaluate transaction 'ClientAccountBalance'. My node.js app: let configPATH = 'path/to/config.yaml'; async…
0
votes
0 answers

error: [ServiceEndpoint]: Error: Failed to connect before the deadline on Endorser- name: peer2-org0

Help me please! I ran my hyperledger fabric network with: org0 orderer1-org0 peer1-org0 peer2-org0 org1 peer1-org1 peer2-org1 org2 peer1-org2 peer2-org2 My connection profile: name: "Network" version: "1.0" channels: mychannel: …
Ivan
  • 303
  • 3
  • 13
0
votes
0 answers

Org.peers is not iterable

Help me please ! How can I solve the problem - "org.peers not iterable"? I have three orgs: org0 with orderer org1 with two peers org2 with two peers I understood that I must to add peers to org0. Can I register and enroll existing peers with org0…
Ivan
  • 303
  • 3
  • 13
0
votes
0 answers

How to connect to Amazon managed blockchain network using hyperledger-fabric-nodesdk 2.2

I want to connect to hyperledger fabric blockchain network on Amazon Managed Blockchain using nodejs sdk. Fabric client is a cloud9 instance, which already setup and successfully connected to peer node using fabric cli inside a docker container. But…
0
votes
2 answers

Failed to evaluate transaction: Error: You've asked to invoke a function that does not exist: getLastPatientId

I want to do inheritance in Hyperledger Fabric Chaincode using NodeJs. I have created two classes CommonContract and AdminContract. CommonContract is the base class and AdminContract child class. But I got error when I invoke getLastPatiendId…
0
votes
1 answer

How to choose with a specific peer to share the transaction with?

how should you keep your hyperledger fabric transaction scalable in terms of choosing peers? Basically, removing the randomization of choosing a peer by the node and giving us the ability to select the peer we want to share the transaction with?
0
votes
1 answer

In Hyperledger Fabric, is there a way to decode ledger data to human readable form?

I tried to use "peer" binary to fetch blocks from ledger. peer channel fetch 2 --channelID mychannel However these blocks are not in human readable form. Is there a way to decode the blocks to human readable form to view the transaction data?
0
votes
1 answer

How to calculate "Data Hash" before submit to the ledger in Hyperledger Fabric (SDK Node)?

I'm researching Hyperledger Fabric v2.2 with SDK Node v2.2 and reach a trouble that I don't known how to calculate the "data hash" before submit it to the ledger, I need it for verify between client data and ledger data. My submit transaction…
0
votes
0 answers

Hyperledger fabric peers throwing vscc error and not committing new blocks

My hyperledger fabric peers are throwing the following vscc error: 2021-08-30 08:25:41.694 UTC [gossip.privdata] StoreBlock -> INFO 242 Received block [84] from buffer channel=assetschannel 2021-08-30 08:25:41.727 UTC [vscc] Validate -> ERRO 243…
0
votes
1 answer

chaincode event listener wont connect again to peers after peer nodes killed/restarted

My fabric-node-sdk based application is listening for chaincode events using network.getContract(smartContractName).addContractListener. When I kill all the peer nodes, it prints the following logs, disconnects the event listener, and never…
0
votes
1 answer

HyperLedger 2.3.1 Failed to Connect on Committer

I am trying to execute a smart contract on the Hyperledger fabric test-network (Fabcar javascript smart contract) and I get the follwing error when I try to invoke the chaincode using the invoke.js file present in the fabcar javascript…
0
votes
1 answer

hyperledger fabric No such file or directory when invoke chaincode by sdk-node

This is a tracing network with one channel composed of 3 Orgs, 1 anchor peer per organization, 1 MSP per org, and 1 CA for org3. And I'm not using TLS (because I couldn't find a dependable sample with TLS ON) I'm trying to use Fabric-sdk-node to…
OYU
  • 13
  • 5
0
votes
0 answers

Hyperledger fabric - No response when using sendTransactionProposal() API

This is a tracing network with one channel composed of 3 Orgs, 1 anchor peer per organization, 1 MSP per org, and 1 CA for org3. And I'm not using TLS (because I couldn't find a dependable sample with TLS ON) I'm trying to use Fabric-sdk-node to…