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 🙏

© 2024 – Pkg Stats / Ryan Hefner

secretstore

v1.1.0

Published

EnergyWeb's JS Secret Store client

Downloads

45

Readme

EnergyWeb's Secret Store JS client

npm version

Secret Store JS client, an Npm package for interacting with OpenEthereum's Secret Store rpc and session modules. Abstraction layer on top of the official secretstore RPC API and secretstore sessions. Naming conventions follow the underlying APIs'.

Maintainers

Primary: Adam Nagy (@ngyam)

Documentation

https://energywebfoundation.github.io/secretstore-js/index.html

The documentation is for this package and its functions. For more information on how Secret Store works, please refer to the OpenEthereum wiki. Most of the function descriptions have been copied from there.

Quickstart

In your project:

npm install secretstore

or

yarn add secretstore

Then

Javascript


const secretstore = require("secretstore");

// using the OpenEthereum's secretstore rpc module
// should be used on your local node for trust reasons
const sslac = new secretstore.SecretStoreRpcApiClient("http://127.0.0.1:8545");
sslac.<method>...

// using the OpenEthereum's secretstore session module
const sssc = new secretstore.SecretStoreSessionClient("http://127.0.0.1:8090");
sssc.<method>...

Typescript


import {SecretStoreRpcApiClient, SecretStoreSessionClient} from "secretstore";

// using the OpenEthereum's secretstore rpc module
// should be used on your local node for trust reasons
const sslac = new SecretStoreRpcApiClient("http://127.0.0.1:8545");
sslac.<method>...

// using the OpenEthereum's secretstore session module
const sssc = new SecretStoreSessionClient("http://127.0.0.1:8090");
sssc.<method>...

If you wonder how to set up a Secret Store cluster, check out the official config guide and peek into the nodes_ss_dev/ folder.

Note: Non-session Secret Store RPC calls work with a regular Parity client too, which is not compiled with the special secretstore feature.

Examples

  • You can see some examples amongst the tests.
  • The official Parity Secret Store tutorial was reproduced with this client in this repo: https://github.com/ngyam/tutorial-secretstore-privatetx

Tested with

Contributing

Please read contributing and our code of conduct for details.

Getting started (as a dev)

Prerequisites

  • node, npm

Installing

git clone https://github.com/energywebfoundation/secretstore-js.git
cd secretstore-js
yarn

Running the tests

ACHTUNG: make sure to start the local secret store cluster first.

Your Secret Store enabled Parity/OpenEthereum client binary has to be placed in the root folder of the project with the name parity. It is shown in the official tutorial how to compile with Secret Store enabled. Use latest master branch preferably.

Then:

  1. start nodes
yarn start
  1. run tests
yarn test
  1. When done fiddling around:
yarn stop
  1. Optional: if you need to clean up chaindb/secretstore
yarn clear

To fill up the test accounts with some ethers, you can use the nodes_ss_dev/funclocals.sh script.

Versioning

We use SemVer for versioning.

License

This project is licensed under GPL-3.0 - see the LICENSE file for details.

Acknowledgments

  • Special thanks to Parity