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 🙏

© 2026 – Pkg Stats / Ryan Hefner

iota-payment

v0.0.67

Published

iota payment module for nodejs applications.

Readme

iota payment module

License: MIT node Dependency Status Join Discord Follow on Twitter

How to Use

Still in development and testing. Unexpected errors and loss of funds may occur. Feedback is welcome!

This module can easily extend your nodejs or express app.

Install

npm i iota-payment

Usage

Create a .env file with your settings

Always start with a new unused seed!

Minimum requirement to use it in the comnet:

seed=REPLACEWITHEIGHTYONETRYTESEED

If you want to send payouts, without receiving IOTA tokens via payments first, send the tokens to the first address of the seed (index 0) (is displayed on first start)

You can get test tokens from https://faucet.comnet.einfachiota.de

Example

const { createPaymentRequest, onEvent, sendPayout, getBalance } = require('iota-payment')

async function main() {
  try {
    //create a payment (receiving address), data is optional and is only stored locally
    let payment = await createPaymentRequest({ value: 1, data: { number: 1 } })
    //send a payout with zero value
    let payout = await sendPayout({ address: 'VO9H9GFNRTOLPUHM9MACFWSUFLNLDYCTKIPXCYLTNNNDMURPUIXNVBYQMRKOJDEYM9UDESGXBIWASIDRBFOBHCJGZD', value: 0 })
    //get account balance
    let balance = await getBalance()
    console.log("Balance:", balance)
  } catch (err) {
    console.error(err);
  }
}

//run
main()

//Create an event handler which is called, when a payment was successfull
let onPaymentSuccess = (payment) => {
  //your code
  console.log(`Payment number ${payment.data.number} was paid:`, payment);
}
onEvent('paymentSuccess', onPaymentSuccess);

More examples

Documentation

Additional settings you can add to the .env to override the defaults:

#time after which payments aren't checked anymore in minutes (4320 = 3 days to pay, transactions after that are ignored)
maxPaymentTime=4320
#set custom IOTA nodes
iotaNodes=["https://nodes.comnet.thetangle.org:443"]
#get basic logs
debug=basic
#get all logs
debug=full
#use the mainnet defaults (mainnet nodes, explorer link, mwm)
network=mainnet
#override mwm
mwm=14
#override explorer tx link
explorerTxLink=https://comnet.thetangle.org/transaction/
#don't check if addresses were spent from
wereAddressSpentCheck=false
#custom limit for how many txs a bundle can have, minimum is 4
maxBundleSize=7
#value for payments with the API
value=1
#set origings for websocket connection
socketOrigins=['http://localhost:*', 'http://127.0.0.1:*']
#limit the payment (address) generation over the API in seconds; to allow only 1 every 10 seconds:
minPaymentInterval=10
#use mongodb
db=mongodb
#custom mongodb url
mongodbUrl=mongodb://127.0.0.1:27017/
#enable zmq to detect incoming transactions faster
zmq=true
zmqNode=tcp://tanglebeat.com:5556
#payment success in seconds if a valid transaction was sent (not confirmed), funds may never arrive
fastButRisky=true
#delete payments and payouts at the moment they get confirmed
deletePaidEntries=true


# ---------
# Dashboard
# ---------
## username for login - default: admin
username=your_user_name
## password for login - default: password
password=password
## jwt_token - default: ipm_ipm_ipm
jwt_token=your_jwt_token

Contribute

Have a look at CONTRIBUTING.md.

License

The MIT License