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

pocket-node

v0.0.12

Published

A Pocket Network client for Pocket Nodes, which are the actors within the Pocket Network that execute the Relays.

Downloads

26

Readme

pocket-node

A Pocket Network client for Pocket Nodes, which are the actors within the Pocket Network that execute the Relays.

For more about the Pocket Network please visit our website

Installation

You can install using npm:

npm install -g pocket-node

Running the server

To start the server, just run:

pocket-node start -p [port number] -h -w

The -h and -w flags are to enable the HTTP and WebSocket endpoints respectively. Before you can start relaying transactions, read below on how to install the different plugins which will allow your Node to connect to the different blockchains (ETH, BTC, LTC, etc.).

Using Docker

The .env file is an example set of environment variables that docker-compose will use by default when bringing up the container.

The pocket-node image will be built and container may be started simply by running:

docker-compose up -d

If you are iterating on the codebase and changing things, this is the best way to ensure your changes are included in the resultant docker image and spawned container:

docker-compose build pocket-node && docker-compose up -d --force-recreate pocket-node

If you want to run the geth integration with pocket just do:

cd integrations/geth
docker-compose build && docker-compose up

What is a Pocket Node Plugin?

The Pocket Node Plugin System allows the Pocket Node app to support any decentralized network as a Relay Node in the Pocket Network.

Each plugin can be created independently and supported individually as a NPM package, and each node can pick and choose whichever plugins they wanna use to support on their network.

For example, if you wanted to add Ethereum support for your node, you can use our Pocket Node Ethereum Plugin

Installing a Pocket Node Plugin

To install a plugin from NPM just run the following command:

pocket-node install <npm package name>

As simple as that and your Pocket Node will support the network described by this plugin.

Note: Please note that if you install multiple plugins for the same network, only the latest one you installed will be used, the older ones will be uninstalled.

Listing your Pocket Node Plugins

To see which plugins you have installed just run the following command:

pocket-node list

Configuring your Pocket Node Plugins

Each Plugin requires a configuration file which is a JSON object with all the pre-determined configurations. Please refer to each Plugin's documentation to see how you can configure your Plugin using the following command:

pocket-node configure <network token ID (ETH, BTC, etc.)> /path/to/configuration.json

Removing a Pocket Node Plugin

To remove a specific plugin just run the following command:

pocket-node remove -n <network token ID (ETH, BTC, etc.)>

You can also remove all installed plugins with the following command:

pocket-node remove -a

Notes:

  1. In case you have multiple plugins with the same network, all will be removed.
  2. If you remove a plugin, your configuration for that plugin will be removed as well, as such you will have to reconfigure the plugin if you decide to re-install it.