npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

quorum-middleware

v0.6.0

Published

Middleware between FPT Platform and Quorum Blockchain

Readme

Quorum Middleware in Javascript

Installation

npm i quorum-middleware

or

yarn add quorum-middleware

Usage

import Web3 from "web3";
import { LC, LCWrapper, Permission, PermissionWrapper } from "quorum-middleware";
const web3 = new Web3("http://localhost:8545");
const lc = new LC(web3);
const lcWrapper = new LCWrapper(web3);
const permission = new Permission(web3);
const permissionWrapper = new PermissionWrapper(web3);

OR

const web3 = new Web3("http://localhost:8545");

const customConfig = {
    lCContractAddresses: {
        LCManagement: "0x795C2DeEf13e6D49dF73Ca194250c97511796255",
        Mode: "0x9c2ccBf987b9DC2144ae2c6767475017AeBF42b3",
        RouterService: "0x0B3b181264f97b005e2ceB1Acac082E4ec883d86",
        StandardLCFactory: "0x452EEfa90c9628Df5421e5E1A3fB8F044F2F364b",
        UPASLCFactory: "0x5692c93c784ef84711E6b460CF40577Fc95Bd039",
        AmendRequest: "0xD92cFf94741C78153190f9A060005653f9410d95",
    },
    permissionContractAddresses: {
        OrgManager: "0xf5B2c0829f9485EEB114B11a7C1cb3227B8749Ee",
        AccountManager: "0xc7123BEA05D26823f99bba87a83BADDD021C3c2d",
        PermissionsImplementation: "0x48272bB87cdA70aCd600B7B8883ada2e799983b8",
        PermissionsInterface: "0x638449F761362fB1041a75eE92e86a2e8fe92780",
        PermissionsUpgradable: "0x40686513a73B3e861810345B08Ca2d952CE8E4F4",
        NodeManager: "0xeE2EF0e68A72654C20c6f3dfa43e03816f362B4F",
        RoleManager: "0x09Ad12B57407dEd24ad2789043F8962fe8679DB3",
        VoterManager: "0xF5E507788E7eaa9Dbf8f24a5D24C2de1F9192416",
    },
    chainId: 6788,
    chainName: "FPT Quorum Testnet FIS Gateway",
    url: "http://localhost:8545",
}

const lc = new LC(web3, customConfig);
const lcWrapper = new LCWrapper(web3, customConfig);
const permission = new Permission(web3, customConfig);
const permissionWrapper = new PermissionWrapper(web3, customConfig);

API

LCWrapper.createStandardLC(parties, content, from)

  • parties: string[] - an array of organizations
  • content: object | Name | Type | |----------------------|----------| | prevHash | string | | contentHash | string[] | | url | string | | signedTime | BN | | numOfDocuments | number | | acknowledgeSignature | string |
  • from: string - account send transaction

Return transaction receipt

LCWrapper.createUPASLC(parties, content, from)

  • parties: string[] - an array of organizations
  • content: object | Name | Type | |----------------------|----------| | prevHash | string | | contentHash | string[] | | url | string | | signedTime | BN | | numOfDocuments | number | | acknowledgeSignature | string |
  • from: string - account send transaction

Return transaction receipt

LCWrapper.approveLC(documentId, stage, subStage, content, from)

  • documentId: string - hash of documentId
  • stage: number
  • subStage: number
  • content: object | Name | Type | |----------------------|----------| | contentHash | string[] | | url | string | | signedTime | BN | | numOfDocuments | number | | acknowledgeSignature | string |
  • from: string - account send transaction

Return transaction receipt

LCWrapper.closeLC(documentId, from)

  • documentId: string - hash of documentId
  • from: string - account send transaction

Return transaction receipt

LCWrapper.submitAmendment(documentId, stage, subStage, content, migrateStages, from)

  • documentId: string - hash of documentId
  • stage: number
  • subStage: number
  • content: object | Name | Type | |----------------------|----------| | contentHash | string[] | | url | string | | signedTime | BN | | numOfDocuments | number | | acknowledgeSignature | string |
  • migrateStages:
  • from: string - account send transaction

Return transaction receipt

LCWrapper.approveAmendment(documentId, nonce, from)

  • documentId: string - hash of documentId
  • proposer: string - account submit amend request
  • nonce: BN - nonce when approve LC
  • from: string - account send transaction

Return transaction receipt

LCWrapper.fulfillAmendment(documentId, nonce, from)

  • documentId: string - hash of documentId
  • nonce: BN - nonce when approve LC
  • from: string - account send transaction

Return transaction receipt

PermissionWrapper.assignAccountRole(account, orgId, roleId, from)

  • account: string - account id
  • orgId: string - organization id to which the account belongs
  • roleId: string - role id to be assigned to the account
  • from: string - account send transaction

Return transaction receipt

PermissionWrapper.updateAccountStatus(orgId, account, action, from)

  • orgId: string - unique id of the organization to which the account belongs

  • account: string - account id

  • action: number | Value | Description | |-------|--------------------------------------------| | 1 | for suspending the account | | 2 | for activating the suspended account | | 3 | for denylisting (blacklisting) the account |

  • from: string - account send transaction

Return transaction receipt

Examples