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

ringtooljs

v1.0.9

Published

Tool for the Lightning Network and Node Management

Downloads

3

Readme

Ringtool for easy rebalancing big lightning SWAPS

This CMD Tool facilitates the Reblance of big SWAPS

Advantages

  • Gives you an overview wether a Channel has alreasdy been opended before reblancing
  • Possibility to set fees to zero, circumventing the gossip protocol (which might be slow for less connected nodes)
  • Inserts a default (fake) policy in case no policy for the channel has been propagated.

Installation

Tested on Raspiblitz and Umbrel!

Fetching it from the npm Repo

  • Check that nodejs is at least version >v16 (if not update with sudo npm install -g n && sudo n stable)
  • Install the software globally with sudo npm install -g ringtooljs

Build from Source

  • Fetch this repo with git clone url
  • Change in this directory cd ringtooljs
  • Check whether nodejs is installed with node -v (if not install: sudo apt install nodejs npm)
  • Install dependencies with npm install
  • To make the Ringtool globally available type sudo npm install -g
  • Check whether everything is working with ringtooljs -h
ringtooljs -h

   ringtooljs 1.0.0 

   USAGE

     ringtooljs <command> [options]

   COMMANDS

     ignite [pubkeys...]      Ignite the ROF (Rebalance Lightning Channels)        
     status [pubkeys...]      Status of Channels of the ROF (whether opened or not)
     help <command>           Display help for a specific command                  

   GLOBAL OPTIONS

     -h, --help         Display help                                      
     -V, --version      Display version                                   
     --no-color         Disable colors                                    
     --quiet            Quiet mode - only displays warn and error messages
     -v, --verbose      Verbose mode - will also output debug messages    

Usage

This tool is based on Balance of Sathosi. Every Command has ARGUMENTS and OPTIONS. In the Help Menu it is always shown whether each commands are mandatory the some default values.

To see the help of commands type ringtooljs ignite -h

For example:

 USAGE

     ringtooljs ignite [pubkeys...]

   ARGUMENTS

     [pubkeys...]      provide pubkeys in the ROF order separated by comma or newline, your node does not need to be first      optional      

   OPTIONS

     --max-fee-sats <max-fee-sats>             maxfees in sats willing to pay for the rebalance            optional      default: 100                
     --amount-rebalance <amount-reblance>      amount to rebalance                                         optional      default: "Channelcapacity/2"
     -z, --zero-fees                           Force Zero fees                                             optional      default: false              
     -l, --ln-dir <ln-dir>                     Path to lnd directory                                       optional      default: ""                 
     --dry-run <dryrun>                        Dummy Payment is sent to simulate the ROF Igntion           optional                                  
     --pubkey-file <pubkey-file>               When no pubkeys are provide specify a pubkey-file Path      optional                                  

   GLOBAL OPTIONS

     -h, --help         Display help                                      
     -V, --version      Display version                                   
     --no-color         Disable colors                                    
     --quiet            Quiet mode - only displays warn and error messages
     -v, --verbose      Verbose mode - will also output debug messages    

To reblance a big SWAP, just put the files in a txt-File:

cat  pubkeys.txt 

       │ File: pubkeys.txt 
Line   | pubkey,[Telegram Handle]
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1      | 02bc320249b608a53a76cf3cbd448fdd3ab8f3766f96e8649c2edc26cf03bf8277,@LNClash
2      | 02b2d5b1e3167287ea4d1835e5272d99f7beb8c283f7a27d15198270630d3eb23a,@FollowTheWhiteRabbit
3      | 034997db2fa4563a86b0a06103944ad8eb5c2ff013e58afaa90f3de8a7bfd2b6d6,@Mongo
4      | 0258adfbecc79c65f5d32ff0d7e9da6dc5e765140a8e8de7ed5ca0c6a4f6d37fb3,@Spast
5      | 02826f50035eca93c7ebfbad4f9621a8eb201f4e28f994db5b6b5af32a65efb6b9,@ziggie
6      | 02ba62f2cf65a10b9867477f266e67ef7e5f34b8b8b128916497bf54e0603a4693,@Anathos    

You can either provide the file with the option --pubkey-file or just do it in the following way:

ringtooljs status $(cat pubkeys.txt)


┌───────────────────────┬─────────────────────────┬───────────────┬────────────────────────────────────────────────────────────────────┬────────────────┬────────────────┐
│ Telegram Name         │ alias                   │ ChanID        │ Public Key to open Channel with                                    │ Basefee [msat] │ Feerate [ppm]) │
├───────────────────────┼─────────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────┼────────────────┼────────────────┤
│ @ziggie               │ ✅ hippiesabotage       │ 709514x183x2  │ 0258adfbecc79c65f5d32ff0d7e9da6dc5e765140a8e8de7ed5ca0c6a4f6d37fb3 │ 0              │ 150            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────┼────────────────┼────────────────┤
│ @Spast                │ ✅ 0258adfbecc79c65f5d3 │ 709567x2332x1 │ 02bc320249b608a53a76cf3cbd448fdd3ab8f3766f96e8649c2edc26cf03bf8277 │ 0              │ -              │
├───────────────────────┼─────────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────┼────────────────┼────────────────┤
│ @LNClash              │ ✅ LNClash              │ 709519x1674x0 │ 02b2d5b1e3167287ea4d1835e5272d99f7beb8c283f7a27d15198270630d3eb23a │ 0              │ 40             │
├───────────────────────┼─────────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────┼────────────────┼────────────────┤
│ @FollowTheWhiteRabbit │ ✅ FollowTheWhiteRabbit │ 709543x1609x0 │ 034997db2fa4563a86b0a06103944ad8eb5c2ff013e58afaa90f3de8a7bfd2b6d6 │ 0              │ 100            │
├───────────────────────┼─────────────────────────┼───────────────┼────────────────────────────────────────────────────────────────────┼────────────────┼────────────────┤
│ @Mongo                │ ✅ 034997db2fa4563a86b0 │ 709522x1475x1 │ 02826f50035eca93c7ebfbad4f9621a8eb201f4e28f994db5b6b5af32a65efb6b9 │ 1000           │ 10             │
└───────────────────────┴─────────────────────────┴───────────────┴────────────────────────────────────────────────────────────────────┴────────────────┴────────────────┘

Commands will be added and the tool further enhanced