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

dequanto

v0.0.7

Published

[![Documentation Link](https://img.shields.io/badge/%E2%9D%93-documentation-green.svg)](https://docs.0xweb.org/dequanto) [![CircleCI](https://circleci.com/gh/0xweb-org/dequanto.svg?style=svg)](https://circleci.com/gh/0xweb-org/dequanto)

Downloads

26

Readme

dequanto

Documentation Link CircleCI

Here we share our library to work with Ethereum Virtual Machine RPC Nodes: Ethereum, Polygon, BSC, Arbitrum, etc. We use web3 and ethers to provide new Features and to simplify the API.

  1. RPC Client Pool
  2. Transaction Builder
  3. Generated TypeScript classes for contracts
  4. Etherscan & Co clients
  5. Tokens provider - get token data by symbol, address, platform.
  6. Tokens service - transfer and swap
  7. Transaction Indexers - listens to blocks and parse new transactions to simplify further processing
  8. Native BigInt types and various utility methods
  9. OpenZeppelin contracts

Source-Code Distribution

Not as a library, but as the source code. Clone or fork it and use it as a submodule. Means: a) you can import any class, namespace and utility method. b) you can easily extend and modify any class, namespace and utility method. c) you get the documentation direct from the code. We don't have much time yet to document all the parts

And path prefix (alias) to your tsconfig.json

{
    "compilerOptions": {
        "paths": {
            "@dequanto/*": [ "your-sub-module-folder/src/*" ],
            "@dequanto-contract/*": [ "your-sub-module-folder/contract/*" ]
        }
    }
}

Configuration

Before you use the code, you should prepare the configuration for it: Node RPC URLs, Accounts, Blockchain Explorer API Keys, etc.

1. RPC Client Pool

Provide multiple RPC Node URLs, this will make your application much more reliable. Even if one of the Nodes goes down or for some reason is not in-sync, all your RPC calls will still work.

Web3Client is the base class for all the EVM Platforms. This wraps web3 to provide pool-based communication with nodes. It handles also Gas and Nonce Values.

2. Transaction Builder

TxDataBuilder and TxWriter to create and submit transaction.

3. Generated TypeScript classes for contracts

With auto-generated classes you can

a) type-safe method read and write(transaction) calls to blockchain b) parse receipts of the contract transactions c) easily subscribe to event streams of the contract

4. Etherscan&Co clients

Ready to use Etherscan&Co classes to consume their API. Just drop-in the KEYs.

5. Tokens provider

Get Tokens Data (address, decimals, etc) by symbol and platform

6. Tokens service

One-liners to transfer tokens from A to B, or swap the tokens using popular DEXes

7. Transaction Indexers

Start listening the blockchain with less code

8. Utils

Lots of Utility methods. BigInt are the first-class citizens in the code.

9. OpenZeppelin contracts

We prebuild generic OpenZeppelin contracts

import { ERC20 } from '@dequanto-contracts/openzeppelin/ERC20

let erc20 = new ERC20(`0x...`);
let balance = await erc20.balanceOf('0x...');