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

node-tip-bot

v1.0.0

Published

node.js based tipping bot for script altcoins

Downloads

11

Readme

Installation

To install node-tip-bot simply clone this repo and install dependencies:

git clone https://github.com/nrpatten/node-tip-bot
cd node-tip-bot
npm install

After installation proceed to the configuration.

Configuration

To configure, copy the config/config.sample.yml file to config/config.yml.

connection

IRC network connection info.

  • host - hostname of the IRC server
  • port - port of the IRC server
  • secure - use secured connection
  • status_command - NickServ command to get nick's login status, ACC on freenode, STATUS on some other networks

login

IRC network connection and login info.

  • nickname - bot's nickname
  • username - bot's username
  • realname - bot's realname
  • nickserv_password - nickserv password to identify with

channels

List of channels to auto-join to.

webadmin

Web interface settings.

  • enabled - enabled web admin
  • port - port to bound to
  • users - list of users with access to web interface in name: password format

log

Logging settings.

  • file - file to log to. Set to false to disable logging to file.

rpc

JSON RPC API connection info.

  • host - JSON RPC API hostname
  • port - API port (by default 9332 for litecoin)
  • user - API username
  • pass - API password (keep that secure)

coin

Basic coin settings.

  • withdrawal_fee - fee charged on withdraw to cover up txfee, the rest goes to bot's wallet.
  • min_withdraw - minimum amount of coins to withdraw
  • min_confirmations - minimum amount of confirmations needed to tip/withdraw coins
  • min_tip - minimum amount of coins to tip
  • min_rain - minimum amount of coins to make rain
  • short_name - short coin's name (eg. LTC)
  • full_name - full coin's name (eg. Litecoin)

commands

Here you can restrict some commands to work only on PM/channel.

messages

Whatever the bot says. Supports expandable variables (eg. %nick% for bot's nick). By default all config vars from rpc section are available.

How does it work?

Every nickname has it's own account in your wallet. When tipping or withdrawing, bot checks if user is registered and identified with NickServ. If so, he moves the money from one account to another, or when withdrawing, transfers coins to other wallet.

How to run it?

Before running the bot, you have to be running your coin daemon with JSON-RPC API enabled. To enable, add this to your coin daemon configuration file (eg. ~/.litecoin/litcoin.conf):

server=1
daemon=1
rpcuser=<your username>
rpcpassword=<your super secret password>
rpcallowip=<your bot's ip address or just 127.0.0.1 if hosted on the same machine>

Start The Bot

To run the bot simply use node bin/tipbot or npm start.

IF you ger this error:

npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

Run:

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs

Edits

To change the ticker for your coin edit config/config.yml line 39 - 50 and add your own Cryptsy, AllCoin and BTC-e coin ticker link. Currently only supports Cryptsy, AllCoin and BTC-e. See config/config.yml line 33 - 50, 61 -75, 104 -108 and bin/tipbot.js 267 to 351 to add your own exchange json.

Commands

| Command | Arguments | Description |-------------|-------------------|-------------------------------------------------------------------- | balance | | displays your current wallet balance | address | | displays address where you can send your funds to the tip bot | withdraw | <address> | withdraws your whole wallet balance to specified address | tip | <nick> <amount> | sends the specified amount of coins to the specified nickname | rain | <amount> [max] | sends the specified amount of coins to the channel | networkhps| | displays the current network hashpersec | diff | | displays the current network difficulty | block | | displays the current network block | info | | displays the current network khps/difficulty/block | ticker | | displays your current Allcoin coin price | ticker2 | | displays your current Cryptsy coin price | btc | | displays the current BTC-e BTC price | joke | | displays a random joke | random | | displays a random quote | help | | displays configured help message (by default similiar to this one) | terms | | displays terms and conditions for using the tip bot