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

bitcoin-rpcauth-js

v1.0.0

Published

Create login credentials for a JSON-RPC user

Downloads

1

Readme

bitcoin-rpcauth-js

Create login credentials for a JSON-RPC user

Bitcoin 'rpcauth' option generator

A canonical python script is included in share/rpcauth.

-rpcauth=<userpw>
  Username and HMAC-SHA-256 hashed password for JSON-RPC connections. The
  field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A
  canonical python script is included in share/rpcauth. The client
  then connects normally using the
  rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This
  option can be specified multiple times

Requirements

Usage In your PC

bitcoin-rpcauth [username] [password] [salt]

Create login credentials for a Bitcoin JSON-RPC user

Positionals:
  username, u  the username for authentication                          [string]
  password, p  leave empty to gen a random password                     [string]
  salt, s      the byte hex salt                                        [string]

Options:
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]

Usage:

bitcoin-rpcauth user_777
# or
bitcoin-rpcauth --username user_777
# or
bitcoin-rpcauth -u=user_777

Returned:

String to be appended to bitcoin.conf:
rpcauth=user_777:a031c9a6bf82e4c5af455fe2f1aae67d$d801b2e75986c51c2d898e66d33e58ef3557adf509efcb227d5141eb1aa77fd9
Your password:
Sywps_2-pL4uLYf-DzWfJYxOQfFRJcmu0kUBhKOs-4c

Installation in your PC through yarn

yarn global add bitcoin-rpcauth-js

Installation in your PC through yarn from GitHub

yarn global add https://github.com/an-ivannikov-dev/bitcoin-rpcauth-js

Removing from your PC

yarn global remove bitcoin-rpcauth-js

Installation in your PC through git clone from GitHub

git clone https://github.com/an-ivannikov-dev/bitcoin-rpcauth-js.git
cd bitcoin-rpcauth-js
yarn install

Usage:

yarn start user_777
# or
yarn start --username user_777
# or
yarn start -u=user_777

Returned:

String to be appended to bitcoin.conf:
rpcauth=user_777:a031c9a6bf82e4c5af455fe2f1aae67d$d801b2e75986c51c2d898e66d33e58ef3557adf509efcb227d5141eb1aa77fd9
Your password:
Sywps_2-pL4uLYf-DzWfJYxOQfFRJcmu0kUBhKOs-4c

Usage In your Project

const {
  genSalt, genPass, genUser, genHash, genRpcAuth, genRpcAuthStr,
} = require('bitcoin-rpcauth-js');


const username = genUser();
console.log('username:', username);

const password = genPass();
console.log('password:', password);

const salt = genSalt();
console.log('salt:', salt);

const hash = genHash(password, salt);
console.log('hash:', hash);

const rpcAuth = genRpcAuthStr(username, password, salt);
console.log('rpcAuth:', rpcAuth);

const rpcAuthObj = genRpcAuth(username, password, salt);
console.log('rpcAuthObj:', rpcAuthObj);

const rpcAuthObj2 = genRpcAuth();
console.log('rpcAuthObj2:', rpcAuthObj2);

Returned:

username: user_157
password: lrD7Cr_BTwgwT6XJo1-LFdHSri6AtUGHfPppRioSnFI
salt: 105e26017130cece3a7fa3d78b91c468
hash: b666ac313db0bc5e23177a8a2f47529820367fe313e2660f0091a67d726fbc9f
rpcauth: rpcauth=user_157:105e26017130cece3a7fa3d78b91c468$b666ac313db0bc5e23177a8a2f47529820367fe313e2660f0091a67d726fbc9f
rpcAuthObj: {
  username: 'user_157',
  password: 'lrD7Cr_BTwgwT6XJo1-LFdHSri6AtUGHfPppRioSnFI',
  salt: '105e26017130cece3a7fa3d78b91c468',
  hash: 'b666ac313db0bc5e23177a8a2f47529820367fe313e2660f0091a67d726fbc9f'
}
rpcAuthObj2: {
  username: 'user_362',
  password: 'hkF59PZb7LTLUzCMhht7gysNoR9YMTCDPC9DuYaD-2Q',
  salt: '69d971c0750e4e4c90babc769a154186',
  hash: 'c0ab0c03f2f9a4ee8b68ce5a4521474c154fc2f3546a9415375d4459138fb9c7'
}

Installation in your Project through yarn

yarn add bitcoin-rpcauth-js

Installation in your Project through yarn from GitHub

yarn add https://github.com/an-ivannikov-dev/bitcoin-rpcauth-js.git