You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@hyperledger/cactus-plugin-keychain-memory

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperledger/cactus-plugin-keychain-memory

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


Version published
Weekly downloads
1.1K
increased by47.33%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

2.0.0-rc.2 (2024-07-03)

Bug Fixes

  • cmd-api-server: shutdown hook was not waiting for promises (d14bf02)
  • cmd-api-server: stop changing LoggerProvider log level (6ef514c)
  • deps: fix batch of missing production dependencies v2.0.0-rc.1 (51d64ee), closes #3344
  • go-sdk: use protos v1 api for fabric-protos-go unmarshal (8896518)
  • plugin-persistence-ethereum: make created_at TIMESTAMPTZ in schema (08925ff), closes #3373

Features

  • cactus-example-tcs-huawei: remove deprecated sample app (45fadcd), closes #3155 #3157
  • connector-besu: expose API client and OpenAPI code for web builds (199c1f0)
  • connector-corda: add initial set of JvmObject factory functions (d9d5904)
  • connector-corda: add JSON classname->JVM class object deserialize (0508f14)
  • fabric-driver: added weaver fabric driver as cacti plugin package (36b8470)
  • ledger-browser: refactor eth dashboard page (c69fb4c), closes #3207
  • ledger-browser: refactor eth tokens page into accounts page (0b0c22c), closes #3237
  • ledger-browser: refactor routing, improve UI (3fcc7a1)
  • ledger-browser: use react query in eth app (4d3fb7e), closes #3203

Readme

Source

@hyperledger/cactus-plugin-keychain-memory

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.

Usage

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
  static_configs:
    - 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 0.0.0.0 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: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-keychain-memory/get-prometheus-exporter-metrics

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

response.type.ts

This file contains the various responses of the metrics.

data-fetcher.ts

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

metrics.ts

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

Keywords

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc