Platform Components/Middleware and API Layer

Firefly fabconnect

Firefly fabconnect for Hyperledger Fabric Networks

FireFly FabConnect is a Fabric middleware that provides an API layer for interacting with Hyperledger Fabric networks. It abstracts the complexities of Fabric’s native SDKs, enabling developers to interact with the blockchain using RESTful APIs and WebSocket-based event streaming. FireFly FabConnect is designed to handle identity management, transaction submission, and event subscriptions, making it an essential component for enterprise blockchain solutions.

Adding fabconnect middleware in settlemint

  1. Navigate to Middleware Selection

    • Go to the Middleware section in SettleMint.
    • Select FireFly FabConnect from the available options.
  2. Select Network and Nodes

    • Step 1: Enter a name for the middleware instance (e.g., FabConnect).
    • Step 2: Choose a peer node from the available Hyperledger Fabric nodes.
    • Step 3: Select an orderer node to process transactions.
    • Step 4: Confirm the setup and deploy FabConnect.

Once selected, SettleMint automatically installs and configures FireFly FabConnect, making it ready for use with minimal effort.


Api categories

FireFly FabConnect provides three main sets of API endpoints:

  1. Client MSPs (Wallet)

    • Register and enroll Fabric identities.
    • Modify and revoke existing identities.
    • Retrieve identity details.
  2. Transactions

    • Submit transactions to Fabric networks.
    • Query transaction results and receipts.
    • Retrieve ledger details, such as blocks and chain information.
  3. Events

    • Subscribe to blockchain events using regex-based filters.
    • Stream real-time events via WebSocket.

Below is a summary of the available API endpoints:

PathMethodSummary
/identitiesGETList all signing identities registered with the Fabric CA
/identitiesPOSTRegister a new signing account with the Fabric CA
/identities/GETGet the signing identity registered with the Fabric CA
/identities/PUTModify an existing signing identity
/identities/param/enrollPOSTEnroll the registered signing identity with the Fabric CA
/identities/param/reenrollPOSTRe-enroll the registered signing identity with the Fabric CA
/identities/param/revokePOSTRevoke enrollment certificates for the registered signing identity
/chaininfoGETReturn ledger information for a specified channel
/blocks/blockNumberOrHashGETQuery a block by number or hash
/blockByTxId/txIdGETQuery a block by a transaction ID included in the block
/transactionsPOSTSend proposal to peers and transaction with endorsements to the orderer
/transactions/txIdGETQuery a transaction by ID (hash) on a channel
/queryPOSTSend a query request to the target chaincode
/receiptsGETRetrieve transaction receipts from the receipts store
/receipts/receiptIdGETRetrieve a transaction receipt by receipt ID
/eventstreamsGETList all event streams
/eventstreamsPOSTCreate a new event stream
/eventstreams/eventstreamIdGETGet an event stream by ID
/eventstreams/eventstreamIdDELETEDelete an event stream by ID
/subscriptionsGETList all subscriptions under the specified event stream
/subscriptionsPOSTCreate a new subscription under the specified event stream
/subscriptions/subscriptionIdGETGet a subscription by ID
/subscriptions/subscriptionIdDELETEDelete a subscription by ID

For a full API specification, refer to the Swagger Documentation.


Prerequisites

To use FireFly FabConnect within SettleMint, ensure:

  • A Hyperledger Fabric Network is deployed and accessible.
  • Fabric peer and orderer nodes are available for selection.
  • API credentials for Fabric CA (if identity management is required).

Since FireFly FabConnect is managed within SettleMint, there is no need to manually install or configure the service.


Integration & usage

Once FireFly FabConnect is set up in SettleMint:

  1. API Access

    • Use the provided RESTful API endpoints to interact with the Fabric network.
    • Query blockchain data, submit transactions, and manage identities.
  2. Event Subscriptions

    • Set up WebSocket or webhook-based event listeners.
    • Receive real-time updates on transactions and smart contract events.
  3. Identity Management

    • Register new Fabric identities.
    • Enroll and revoke identities as needed.

The API simplifies interaction with the Fabric network, making blockchain integration seamless.


Troubleshooting

  • Nodes Not Available? Ensure your Fabric network is running with active peer and orderer nodes.
  • Transaction Errors? Check the transaction payload format and ensure it matches the Fabric chaincode specifications.
  • Event Subscription Issues? Validate the WebSocket connection and event filters.

For further support, refer to FireFly FabConnect's official documentation.


Additional resources

On this page