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

klayr-reg

v1.0.4

Published

Klayr Sidechain Registration CLI Tools

Downloads

13

Readme

Klayr-REG CLI

Klayr-REG is a command-line tool designed to make sidechain registration on Klayr fun again!

Features

  • Load configuration from command-line options, config file, or environment variables.
  • Prompt the user for missing options interactively.
  • Optionally authorize chain-connector plugin (CC).
  • Verbose mode for detailed logs.

Prerequisites

Ensure that you have the following installed:

  • Node.js (>= 14.x)
  • NPM (Node Package Manager)

Usage

Use Klayr-REG easily using npx:

npx klayr-reg [options]

Example:

npx klayr-reg --prompt-path --authorize-cc

Install Globally

To install Klayr-REG globally, execute following command:

npm install -g klayr-reg

Once installed globally, you can use the klayr-reg command without npx.

Options

Below is a list of all available options and their corresponding environment variables:

| Option | Description | Environment Variable | | -------------------------------- | -------------------------------------------- | ------------------------------------ | | -v, --verbose | Verbose mode for more detailed logs | KLAYR_REG_VERBOSE | | -c, --config <path> | Config file path | KLAYR_REG_CONFIG | | --side-name <name> | Sidechain name for registration | KLAYR_REG_SIDECHAIN_NAME | | --keys <path> | Path to sidechain validators keys | KLAYR_REG_SIDECHAIN_KEYS | | --main-ipc <path> | Mainchain IPC path | KLAYR_REG_MAINCHAIN_IPC | | --main-ws <url> | Mainchain WebSocket URL | KLAYR_REG_MAINCHAIN_WS | | --side-ipc <path> | Sidechain IPC path | KLAYR_REG_SIDECHAIN_IPC | | --side-ws <url> | Sidechain WebSocket URL | KLAYR_REG_SIDECHAIN_WS | | --authorize-cc | Authorize chain-connector plugin | KLAYR_REG_AUTHORIZE_CC | | --cc-pass <password> | CC password for both mainchain and sidechain | KLAYR_REG_CC_PASSWORD | | --main-cc-pass <password> | CC password for mainchain | KLAYR_REG_MAINCHAIN_CC_PASSWORD | | --side-cc-pass <password> | CC password for sidechain | KLAYR_REG_SIDECHAIN_CC_PASSWORD | | --relayer-phrase <phrase> | Relayer phrase for both chains | KLAYR_REG_RELAYER_PHRASE | | --main-relayer-phrase <phrase> | Relayer phrase for mainchain | KLAYR_REG_MAINCHAIN_RELAYER_PHRASE | | --side-relayer-phrase <phrase> | Relayer phrase for sidechain | KLAYR_REG_SIDECHAIN_RELAYER_PHRASE | | --prompt-path | Prompt to set phrase path | KLAYR_REG_PROMPT_PATH | | --phrase-path <path> | Phrase path for both chains | KLAYR_REG_PHRASE_PATH | | --main-phrase-path <path> | Phrase path for mainchain | KLAYR_REG_MAINCHAIN_PHRASE_PATH | | --side-phrase-path <path> | Phrase path for sidechain | KLAYR_REG_SIDECHAIN_PHRASE_PATH | | --register-mainchain-fee <fee> | Custom registerMainchain transaction fee | KLAYR_REG_REGISTER_MAINCHAIN_FEE | | --register-sidechain-fee <fee> | Custom registerSidechain transaction fee | KLAYR_REG_REGISTER_SIDECHAIN_FEE |

Configuration with .env

You can also use a .env file to store the options. For example:

KLAYR_REG_SIDECHAIN_NAME=mySidechain
KLAYR_REG_MAINCHAIN_IPC=/path/to/mainchain/folder
KLAYR_REG_SIDECHAIN_IPC=/path/to/sidechain/folder
KLAYR_REG_SIDECHAIN_KEYS=/path/to/validators_keys.json
KLAYR_REG_AUTHORIZE_CC=true
KLAYR_REG_CC_PASSWORD=myCCPassword

Interactive Mode

If any of the required options are missing, the CLI will prompt you for input interactively. For example, if no sidechain name is provided, it will ask for one.

Verbose Mode

For more detailed logs, use the --verbose flag:

npx klayr-reg --verbose

Build From Source

To build Klayr-REG CLI from source, clone the repository, install dependencies, and install globally:

git clone https://github.com/swaptoshi/klayr-reg
cd klayr-reg
npm install
npm install -g .

Once installed globally, you can use the klayr-reg command.

License

This project is licensed under the Apache 2.0 License.