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

0xweb

v0.10.44

Published

Contract package manager and other web3 tools

Downloads

1,646

Readme

0xWeb - Contract package manager and CLI Web3 Toolkit


Website Link Documentation Link NPM version CircleCI

Contract Package Manager

Generate TypeScript classes for contracts fetched from Etherscan and Co.

We use 📦 dequanto library for the wrapped classes

Here the example of generated classes: 0xweb-org/0xweb-sample 🔗

Install

$ npm i 0xweb -g

# Boostrap dequanto library in cwd
$ 0xweb init

# Download sources/ABI and generate TS classes
$ 0xweb install 0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419 --name chainlink/oracle-eth

API Usage

Use autogenerated TypeScript classes for much safer and faster backend implementation

import { ChainlinkOracleEth } from './0xweb/eth/chainlink/oracle-eth/oracle-eth';
import { Config } from '@dequanto/Config';
import { $bigint } from '@dequanto/utils/$bigint';

await Config.fetch();

let oracle = new ChainlinkOracleEth();
let decimals = await oracle.decimals();
let price = await oracle.latestAnswer();

console.log(`ETH Price`, $bigint.toEther(price, decimals));

CLI Usage

READ and WRITE to installed contracts directly from the command line

$ 0xweb contract chainlink/oracle-eth latestAnswer

Config

❗❣️❗ We include our default KEYs for etherscan/co and infura. They are rate-limited. Please, create and insert your keys. Thank you!

$ 0xweb config --edit

## optionally, you can provide the Nodes Endpoint with `--endpoint` flag
$ 0xweb COMMAND --endpoint https://my-node-url-here

Commands overview 🔗

Various Blockchain tools

Get the commands overview

$ 0xweb --help
$ 0xweb install --help

block

  1. Get current block info
$ web3 block get latest

token

  1. Get Token Price
$ 0xweb token price WETH

accounts

🔐 Wallet feature allows to store accounts in encrypted local storage. We use local machine KEY and provided PIN in arguments to create cryptographically strong secrets 🔑 for encryption.

When calling contracts WRITE methods, you should first add an account to the wallet, and then use PIN to unlock the storage

$ 0xweb account add --name foo --key the_private_key --pin foobar
$ 0xweb token transfer USDC --from foo --to 0x123456 --amount 20 --pin foobar

🏁


©️ MIT License.