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

nimiq

v1.0.1

Published

**[Nimiq](https://nimiq.com/)** is a frictionless payment protocol for the web.

Downloads

29

Readme

Nimiq Blockchain Build Status

Nimiq is a frictionless payment protocol for the web.

For a high-level introduction check out the Nimiq White Paper.

To dive into the details of the protocol architecture check out the Nimiq Developer Reference.

Library Demo

Check out our testnet Browser Miner and Wallet.

Quickstart

  1. Install Node.js v8.0.0 or higher.
  2. On Ubuntu, install git and build-essential: sudo apt-get install -y git build-essential.
  3. If you want to use yarn to manage the dependencies, run: sudo npm install -g yarn.
  4. Install gulp globally: sudo npm install -g gulp or yarn global add gulp.
  5. Clone this repository: git clone https://github.com/nimiq-network/core.
  6. Enter the core directory: cd core.
  7. Run: npm install or yarn.
  8. Run: npm run build or yarn build.
  9. Open clients/browser/index.html in your browser.

Web Developers

Most simple Web Application on top of the Nimiq Blockchain

A good way to get started is to have a look at the most simple web application on top of the Nimiq Blockchain.

Installation for Web Developers

Follow the Quickstart guide or use our CDN:

<script src="https://cdn.nimiq.com/core/nimiq.js"></script>

Run browser client

Open clients/browser/index.html in your browser.

Build your own browser client

Just include <script src="dist/nimiq.js"></script> in your project.

API

Visit the API Documentation.

Node.js client

Run Node.js client

To run a Node.js client you will need a publicly routable IP, Domain and SSL Certificate (get a free one at letsencrypt.org). Start the client by running clients/nodejs/index.js.

cd clients/nodejs/
node index.js --host=HOSTNAME --port=PORT --cert=SSL_CERT_FILE --key=SSL_KEY_FILE [options]

| Configuration | | | :--- | :--- | | --host=HOSTNAME | Hostname of the Node.js client. | | --port=PORT | Port to listen on for connections. | | --cert=SSL_CERT_FILE | SSL certificate file for your domain. CN should match HOSTNAME. | | --key=SSL_KEY_FILE | SSL private key file for your domain. | | Options | | | --help | Show usage instructions. | | --log[=LEVEL] | Configure global log level. | | --log-tag=TAG[:LEVEL] | Configure log level for a specific tag. | | --miner[=THREADS] | Activate mining on this node with THREADS parallel threads. | | --passive | Do not actively connect to the network. | | --rpc[=PORT] | Start JSON-RPC server on port PORT (default: 8648). | | --statistics[=INTERVAL] | Output miner statistics every INTERVAL seconds. | | --type=TYPE | Configure the consensus type, one of full (default), light or nano. | | --wallet-seed=SEED | Initialize wallet using SEED as a wallet seed. | | --wallet-address=ADDRESS | Initialize wallet using ADDRESS as a wallet address. |

Build binary packages for Linux distributions

Debian/Ubuntu (deb package format)

After running npm install or yarn (from the Quickstart section):

  1. Make sure you have dpkg, jq and fakeroot installed (if you don't, they can be easily installed with apt).
  2. Run npm run build-deb.
  3. The .deb package will be located in the dist/ directory.

Note: creating deb packages only works on Debian-based distributions (only has been extensively tested on Ubuntu).

Fedora/CentOS/RHEL (rpm package format)

After running npm install or yarn (from the Quickstart section):

  1. Make sure you have rpm-build installed (if you don't, it can be easily installed with yum or dnf).
  2. Run npm run build-rpm.
  3. The .rpm package will be located in the dist/ directory.

Note: creating rpm packages only works on rpm-based distributions (only has been extensively tested on Fedora).

Core Developers

Developers are free to choose between npm and yarn for managing the dependencies.

Installation for Core Developers (using npm)

  • Node.js latest version (> 8.0.0)
  • Dependencies: npm install

Installation for Core Developers (using yarn)

  • Node.js latest version (> 8.0.0)
  • Dependencies: yarn

Test and Build

Run Testsuite

  • npm test or yarn test runs browser and Node.js tests.
  • npm run test-browser or yarn test-browser runs the testsuite in your browser only.
  • npm run test-node or yarn test-node runs the testsuite in Node.js only.

Run ESLint

npm run lint or yarn lint runs the ESLint javascript linter.

Build

Executing npm run build or yarn build concatenates all sources into dist/{web,web-babel,web-crypto,node}.js

Docker

A Dockerfile is provided which allows for creating your own backbone image using the following arguments.

| Argument | Description | | --- | --- | | BRANCH | Defaults to master but can be any available git branch | | PORT | Defaults to TCP port 8080 | | DOMAIN | Domain to be used for hosting the backbone node | | KEY | Path to an existing certificate key for the DOMAIN | | CRT | Path to an existing signed certificate for the DOMAIN | | WALLET_SEED | Pre-existing wallet private key |

Building the Docker image using the above arguments

docker build \
  --build-arg DOMAIN=<DOMAIN> \
  --build-arg BRANCH=<BRANCH> \
  --build-arg WALLET_SEED=<WALLET_SEED> \
  --build-arg KEY=<KEY> \
  --build-arg CRT=<CRT> \
  --build-arg PORT=<PORT> \
  -t nimiq .

Running an instance of the image

docker run -d -p 8080:8080 -v /etc/letsencrypt/:/etc/letsencrypt/ --name "nimiq" nimiq

Note that you can override any of the arguments which were baked into the image at runtime with exception to the BRANCH. The -v flag here allows for mapping a local system path into the container for the purpose of using the existing DOMAIN certificates.

Check status

docker logs -f <instance_id_or_name>

Contribute

If you'd like to contribute to the development of Nimiq please follow our Code of Conduct and Contributing Guidelines.

License

This project is under the Apache License 2.0.