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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vigcoin/webapi

v0.1.1

Published

webapi

Readme

Build Status Coverage Status License: GPL v3

Web Api for vigcoin

Setup

Webapi is tested on ubuntu 16.04. Other Linux platform can easily adapte to use vigcoin webapi.

Before running webapi, here are some bash steps you should follow:

sudo apt-get install gcc
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
curl -o- https://raw.githubusercontent.com/calidion/chinese-noder-the-easy-way/master/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

config npm (For Chinese)

If you are in China and find it very slow to install npm packages. The following instruction will be helpful.

Create a file

touch ~/.npmrc

with the following content.

registry=https://registry.npm.taobao.org/

You can add the following optional content when necessary:

disturl=https://npm.taobao.org/dist
chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
operadriver_cdnurl=http://cdn.npm.taobao.org/dist/operadriver
phantomjs_cdnurl=http://cdn.npm.taobao.org/dist/phantomjs
fse_binary_host_mirror=https://npm.taobao.org/mirrors/fsevents
sass_binary_site=http://cdn.npm.taobao.org/dist/node-sass
electron_mirror=http://cdn.npm.taobao.org/dist/electron/

Run Web API server

platform: ubuntu 18.04/16.04

Run with ts-node

  1. git clone --depth 1 https://github.com/vigcoin/webapi.git

  2. cd webapi && npm install

  3. npm install -g ts-node

  4. ts-node src/main.ts

default port is 8080, use PORT=8081 ts-node src/main.ts to change port number

Run with pm2

  1. git clone --depth 1 https://github.com/vigcoin/webapi.git

  2. cd webapi && npm install

  3. npm install -g pm2 && pm2 install typescript

  4. pm2 start src/main.ts

Web APIs

Wallet API

Create Wallet

  1. url

/wallet/create

  1. Parameters

None

  1. Response JSON

address: Address for the wallet spend: Private key for spending. view: Private key for viewing.

{
  "code": 0,
  "data": {
    "address": "BFrj6s15vg47Za5ipA46m8CjV59nsEeeNSSozZzs9WEo759Prf3zXke4caP22RESH5Yj2GJubQ6WPCDBR78MX3myNaHsWME",
    "spend": "32e4e5f72797c2fc0e2dda4e80e61bd0093934a305af08c9d3b942715844aa08",
    "view": "95a27c683df6a73bfc238d78fc55f414c699735d60fad4e3a999806763cb340d"
  },
  "message": "成功!",
  "name": "Success"
}

Open Wallet

  1. url

/wallet/open

  1. Parameters

| Parameter Name | Type | Optional | | --- | --- | --- | | file | File | N | | password | String | Y |

  1. Response JSON

address: Address for the wallet spend: Private key for spending. view: Private key for viewing.

{
  "code": 0,
  "data": {
    "address": "BFrj6s15vg47Za5ipA46m8CjV59nsEeeNSSozZzs9WEo759Prf3zXke4caP22RESH5Yj2GJubQ6WPCDBR78MX3myNaHsWME",
    "keys": {
      "spend": "32e4e5f72797c2fc0e2dda4e80e61bd0093934a305af08c9d3b942715844aa08",
      "view": "95a27c683df6a73bfc238d78fc55f414c699735d60fad4e3a999806763cb340d"
    }
  },
  "message": "成功!",
  "name": "Success"
}

Refine Wallet

Old vigcoin saves cache in wallet file. New vigcoin wallet will use no cache in wallet file.

cache files will be separated from wallet.

  1. url

/wallet/refine

  1. Parameters

| Parameter Name | Type | Optional | | --- | --- | --- | | file | File | N | | password | String | Y |

  1. Response File

will retrun an file which is in a vigcoin wallet format

or

return status 500 if wrong.

Generate Wallet from Keys

  1. url

/wallet/export

  1. Parameters

| Parameter Name | Type | Optional | | --- | --- | --- | | spend | String | N | | view | String | N |

spend/view are spend and view private keys.

  1. Response File

will retrun an file which is in a vigcoin wallet format

or

return status 500 if wrong.