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

web3tbanknet

v0.7.1

Published

Unified Open Source Coin Registry (Same interface for all possible coins, tokens)

Downloads

3

Readme

Implementation of web3 protocol

Demo


WEB3 Wallet

Install


npm i web3t

Benefits


  • Web3t is open source free covered by test library available for everyone and can be used to build an exchange, wallet and other crypto systems.
  • Opened Standard. Everyone can contribute to add his coin.
  • Used by WEB3 Wallet
  • Partially Compatible with WEB3 Wallet
  • Compatible with MetaMask Web3 Standard for Ethereum

Support


  • BTC (Bitcoin)
  • LTC (Litecoin)
  • ETH (Ethereum)
  • DASH
  • XEM (NEM)
  • XRP (Ripple)
  • [ANY_COIN]

Init Builder



var buildWeb3t = require('web3t');

Build Testnet

Just pass the testnet word into constructor.


function testnet(err, web3t) {
    ... 

}

buildWeb3t("testnet", testnet);

There are other advanced possible ways to build the web3 object for case when you need to define a special testnet. It is useful for case when you have a lot of faucets of special testnet and write unit tests.

function testnet(err, web3t) {
    ... 

}

buildWeb3t("testnet, ropsten for eth", testnet);

button

Build Mainnet


function mainnet(err, web3t) {
    ... 
}

buildWeb3t("mainnet", mainnet);

button

Advanced Builder


function mainnet(err, web3t) {
    ... 
}

var config = {
   mode: "mainnet"
   plugins: {},
   providers: {}
}

buildWeb3t(config, mainnet);

Example



web3t.eth.sendTransaction({ to, amount }, cb);

web3t.btc.sendTransaction({ to, amount }, cb);

web3t.zec.sendTransaction({ to, amount }, cb);

web3t.[ANY_COIN].sendTransaction({ to, amount }, cb);
  

Send All Funds


Simplified Method to Send All Funds. Wrapper on sendTransaction


var cb => (err, tx) {
  
}

web3t.[ANY_COIN].sendAllFunds({ to, data }, cb);
  

button

Create Account


You can create a lot of addresses by providing different index


var cb => (err, { address, privateKey, publicKey }) {
  
}

web3t.[ANY_COIN].createAccount({ mnemonic, index }, cb);
  

button

Get Balance


Get Balance by account object ({ address, privateKey }) Usually it does not need the private key but coins like monero needs decrypt data to read the balance


  var cb => (err, balance) {
  
  }

  web3t.[ANY_COIN].getBalance({ account }, cb);
  

button

Get History of Transactions


List of all transactions. Same result structure for all coins

  
  var cb => (err, transactions) {
  
  }
  
  web3t.[ANY_COIN].getHistory({ account }, cb);
  

button

Calc Fee


You need to define the default fee in plugin but for NEM, Monero and other coins you need to calculate the fee

  
  var cb => (err, amountFee) {
  
  }
  
  web3t.[ANY_COIN].calcFee({ account, to, amount, data}, cb); // => fee
  

button

Create and Send Transaction


This transaction consists of create, sign, push transaction


  var cb => (err, receipt) {
  
  }

  web3t.[ANY_COIN].createTransaction({ account, to, amount, data}, cb); // => tx

button

Create and Sign Transaction


In some cases you need to have the hex of transaction before for some reason before you push it


  var cb => (err, rawtx) {
  
  }

  web3t.[ANY_COIN].signTransaction({ account, to, amount, data}, cb); // => rawtx

button

Broadcast the Signed Transaction


Push the signed transaction (hex) into blockchain


  var cb => (err, receipt) {
  
  }

  web3t.[ANY_COIN].pushTransaction(rawtx, cb); // => rawtx

button

Compatibility


sendTransaction and getBalance are compatible with WEB3 Wallet

How to Contibute


You can find issues but we improve it daily. Please do not judge but help.

  1. Please modify only plugins, providers, package.json
  2. plugin should consists only network information and implements Interfaces/coin-interface.ts
  3. provider should implements Interfaces/protocol-interface.ts
  4. Send a pull request
  5. Any question [email protected]

Simple Summary


The management of different coins should be similar, so that there is no need for each to develop a new infrastructure, and connect it to the existing one

Abstract


Web 3.0 is an inclusive set of protocols to provide building blocks for application makers. These building blocks take the place of traditional web technologies like HTTP, AJAX and MySQL, but present a whole new way of creating applications. These technologies give the user strong and verifiable guarantees about the information they are receiving, what information they are giving away, and what they are paying and what they are receiving in return. By empowering users to act for themselves within low-barrier markets, we can ensure censorship and monopolization have fewer places to hide. Consider Web 3.0 to be an executable Magna Carta — “the foundation of the freedom of the individual against the arbitrary authority of the despot.”

Please read more here article

Motivation


There was already implemented solution Web 3.0 in Metamask Wallet and used by dozen of dapps. It is great. But it is available only for ETH. We would like to extend the same protocol for other coins It will help to

  • connect different coins to existent web 2.0
  • quickly create a list of supported crypto currency for exchanges, multicurrency wallets and help new projects get the existing infrastructure instantly and effortlessly
  • develop the cross-chain interface

Copyright


Copyright and related rights waived via CC0.