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

@simbachain/web3-suites

v5.2.0

Published

common code for web3 suite plugins. Code in this repo can be used for truffle or hardhat, but is designed to be applicable to future web3 suite plugins as well.

Downloads

218

Readme

web3-suites-common

Summary

This project contains code that is common to web3 suite plugins for SIMBA Chain (eg Truffle and Hardhat plugings). The objects in this code base handle authentication (through Keycloak device login), http requests, and file systems operations (mainly searching for contracts and other files in web3 projects).

This module does not need to be installed in the web3 project you are using. The Simba web3 plugins install this module, and thus the logic inside this module is abstracted away from the end user. So the layers are:

@simbachain/web3-suites -> simba chain plugin (eg @simbachain/hardhat) -> web3 project (eg a hardhat project)

So a developer will not be exposed to the code contained in this module.

Installation

Installation only needs to be performed by devs working on the @simbachain/truffle and @simbachain/hardhat plugins. For such installation, run:

$ npm install @simbachain/web3-suites

Usage

As stated above, developers will not directly be using this module's code in their web3 projects. But some notes on how this code and its objects are structured is provided here.

Static vs. Non-Static Methods

The code in this module has been written so that methods for SimbaConfig can usually be called as either static or non-static methods, but will achieve the same result. So sometimes in the web3 plugins that use this library, you will see something like config.ProjectConfigStore.get("clientID"), while other times you will see SimbaConfig.ProjectConfigStore.get("clientID"). Both code examples do the same thing. The reason for this is that the truffle plugin was written first, and used instances of SimbaConfig, while the Hardhat plugin was built after, and mainly used static methods. So this was an attempt to not break the Truffle plugin interface.

SimbaConfig.ConfigStore vs. SimbaConfig.ProjectConfigStore

This project uses Configstore objects from the configstore library to manage auth and config info. When you see references to SimbaConfig.ConfigStore, understand that this object operates on and interacts with a .json file containing auth info (authconfig.json). When you see a reference to SimbaConfig.ProjectConfigStore, understand that this object operates on and interacts with a .json file containing project info for the user's web3 project (simba.json).

Authentication and HTTP Requests

Auth and HTTP requests are handled by SimbaConfig.authStore. SimbaConfig.authStore is actually instantiated by passing the SimbaConfig.ProjectConfigStore property and SimbaConfig.ConfigStore property. So the ProjectConfigStore and ConfigStore properties are the same for both SimbaConfig and SimbaConfig.authStore. In other words, SimbaConfig.authStore.projectConfig === SimbaConfig.ProjectConfigStore. Access / Auth tokens obtained by SimbaConfig.authStore are stored in SimbaConfig.ConfigStore (or SimbaConfig.authStore.configStore).