Sign inDemoInstall


Package Overview
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies



Dummy keychain implementation doing NO encryption and storing everything in-memory. Only suitable for development and testing.

Version published
Weekly downloads
increased by111.65%
Install size
29.7 MB
Weekly downloads



2.0.0-alpha.2 (2023-09-27)

Bug Fixes

  • besu: testnet web3 version fixed to 1.10.0 (334612d)
  • cactus-core-api: address CVE-2021-38192 - GHSA-x4qm-mcjq-v2gf (ff1afa5), closes #2612
  • cactus-validator-socketio-indy: upgrade pyjwt to 2.4.0 (59f9f91), closes #2614
  • cmd-api-server: fix CVE-2023-36665 protobufjs Prototype Pollution vuln (7bb3957), closes #2682
  • connector-fabric: runTransactionV1 Open API validation crash (516dd49)
  • ejs critical vulnerability CVE-2022-29078 (2813b75)
  • indy-validator: fix package dependencies (a28641a), closes #2596
  • plugin-odap-hermes: fix duplicate enum values of OdapMessageType (292d287), closes #2553
  • security: crash in HeaderParser in dicer (77fb559)
  • security: the CVE-2022-2421 - upgrade to >=4.2.1 (9172172), closes #2229 #2228
  • security: upgrade fabric 2.x deps to 2.2.18 (36988a5), closes #2610
  • security: vulnerabilities found in cactus-whitepaper (c56334d), closes #2038
  • tessera: updated tessera version error in quorum-all-in-one #2411 (759f305), closes #2240 #2274
  • use common conventions: tsconfig.json, package.json (50f5c02), closes #2216
  • vscode/devcontainer: unexpected exit stdout /etc/passwd (eb0134b), closes #2404
  • weaver-corda: throw error correctly in responder flows (b888a5e)
  • webpack: fix broken bundling - cannot find webpack.config.js (794f0b4)

Code Refactoring

  • cmd-api-server: clean up configuration parameters #720 (b8e8388)


  • besu-test-ledger: send funds to already created address (3a58508), closes #2250
  • cacti-cmd-gui-app: add GUI to visualize Fabric, Ethereum blocks (15d9e9d)
  • cactus-common: add createRuntimeErrorWithCause() & newRex() (b3a508c), closes #1702
  • cactus-core: add GetOpenApiSpecV1EndpointBase<S, P> class (6d68292)
  • cactus-plugin-ledger-connector-cdl-socketio: add new connector plugin (aee28fe), closes #2455
  • cactus-plugin-ledger-connector-ethereum: add new connector plugin (f8a2131), closes #2534
  • cbdc-bridging-app: implementation of CBDC bridging example (ca1b3be), closes #2205
  • cmd-api-server: add GetOpenApiSpecV1Endpoint (HTTP GET) (aeebbd4)
  • connector-besu: add GetOpenApiSpecV1Endpoint (HTTP GET) (76744f0)
  • connector-iroha2: update to the new LTS image as of 28.07.2023 (ccdaa12)
  • connector-quorum: add WebsocketProvider options to quorum LP (b7ad571)
  • connector-tcs-huawei: add initial version (d8d538d)
  • corda asset transfer test workflow added and bug fixes (4b5ee09)
  • fabric-test-ledger: add support to enrolling users in different Orgs (b910681), closes #2248
  • geth-all-in-one: add ethereum test image and helper class (fb4231f), closes #2577
  • openapi: upgrade to 6.3.0 phase1 (a094614), closes #2298
  • plugin-htlc-eth-besu: add private HTLCs and forge build & test (aade510)
  • plugin-persistence-fabric: add new fabric persistence plugin (47a64ee), closes #2259 #2265
  • quorum-connector: add script for checking connection status (d306d21), closes #2309
  • quorum: private transaction support (3c944d6)
  • weaver-corda: support array of remote views, consequent user flow call (a8e5d54)
  • weaver/common: add data view protocol buffer spec & RFCs for Besu (97f17e0)
  • weaver: added multiple participants support for data sharing in corda (4e81b92)


  • cmd-api-server: Removed the keyPairPem parameter from the API server configuration.




Prometheus Exporter

This class creates a prometheus exporter, which scrapes the transactions (total transaction count) for the use cases incorporating the use of Keychain memory plugin.


The prometheus exporter object is initialized in the PluginKeychainMemory class constructor itself, so instantiating the object of the PluginKeychainMemory class, gives access to the exporter object. You can also initialize the prometheus exporter object seperately and then pass it to the IPluginKeychainMemoryOptions interface for PluginKeychainMemory constructor.

getPrometheusMetricsV1 function returns the prometheus exporter metrics, currently displaying the total key count, which currently updates everytime a new key is added/removed from the list of total keys.

Prometheus Integration

To use Prometheus with this exporter make sure to install Prometheus main component. Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml

- job_name: 'keychain_memory_exporter'
  metrics_path: api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics
  scrape_interval: 5s
    - targets: ['{host}:{port}']

Here the host:port is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-keychain-memory/src/test/typescript/unit/plugin-keychain-memory.test.ts) exposes it over and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL) Metrics URL:

Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. On the prometheus graphical interface (defaulted to http://localhost:9090), choose Graph from the menu bar, then select the Console tab. From the Insert metric at cursor drop down, select cactus_keychain_memory_total_key_count and click execute

Helper code


This file contains the various responses of the metrics.


This file contains functions encasing the logic to process the data points


This file lists all the prometheus metrics and what they are used for.



Last updated on 04 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.


Related posts

SocketSocket SOC 2 Logo


  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc