siglesiasg / node-red-hyperledger-fabric-gateway

A Hyperledger Fabric Gateway for Node Red 3.x implementation nodes to work with recent HLF networks v2.4 (or later)
Apache License 2.0
1 stars 0 forks source link

Hyperledger Fabric Gateway for Node Red

A Hyperledger Fabric Gateway for Node Red 3.x implementation nodes to work with recent HLF networks v2.4 (or later)

Donate

Overview

Built in Typescript, this package aims to provide an easy to use and up-to-date set of Node Red nodes that enable seamless integration with Hyperledger Fabric blockchain networks.

Developers can leverage the power of the Hyperledger Fabric programming model to rapidly build blockchain-connected applications using Node Red.

Key features

Compatibility

This Nodes are based on fabric gateway and requires Fabric v2.4 (or later) with a Gateway enabled Peer. Additional compatibility information is available in the documentation:

Getting Started

To use this Node-RED package, you first need to configure a connection to your Hyperledger Fabric network.

Create a new connection

A connection requires specifying:

This connection information can then be leveraged in a modular way across nodes that need to interact with the Fabric network.

Basic Connection

Gateway

Gateway needs a peer definition. This peer will be used to execute all requests to HLF.

TODO: Enable selection multiple peers to get complex transaction request.

GW

Peer

To connect to a Hyperledger Fabric peer, you will need to specify the following configuration:

{
    "grpc.default_authority": "testpeer.com:9999",
    "grpc.ssl_target_name_override": "testpeer.com"
}

Refer to the gRPC documentation for full options.

Peer

Identity

An identity can be configured in three different ways using the Cert Type parameter:

Channel

Node to configure the channel name

Channel

Once the connection nodes are configured properly, you can operate with HLF using Hyperledger Gateway nodes.

Transaction Nodes

Transaction Nodes

These nodes work in the same way as HLF's own operations. Configuration can be added to the node or passed as parameters in payload object.

Event Nodes

Event Nodes

Block listener node reads all block events and publishes a message for each block and transaction processed. To prevent saturation of the JavaScript event loop, each message must be acknowledged. If the node restarts, it will resume reading from the last checkpoint.

Block Listener Nodes

Block listener commit node will mark the message as done so next message event will be published. No Configuration needed

Channel Nodes

Channel Nodes

Provide information about the selected channel.

Donate

Do you like my work? Buy me a coffee - or pizza 😜🍕

Donate

License

Source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the [LICENSE] file.