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

powsrv.js

v1.0.4

Published

Fast and efficient PoWaaS (PoW-as-a-service) for IOTA

Downloads

5

Readme

iota.lib.js.powsrvio - Use powsrv.io PoW with IOTA.js Library

This library is used to add an alternative attachToTangle function to the iota.js library to delegate Proof-of-work to powsrv.io. This enables for users to offload PoW from low-power IoT devices, mobile and desktop devices without capabilities.

Getting Started

Add the package to your project:

npm install powsrv.js

Basic Usage

const remoteATT = require('powsrv.js')
const attachToTangle = remoteATT(5000, "your9api9key")

// Set attachToTangle to your IOTA client
const { composeAPI } = require('@iota/core')
const iota = composeAPI({
  provider: 'http://localhost:14265',
  attachToTangle
})
  1. delay: Integer Milliseconds to wait before PoW server timeout. Null value defaults to 5000
  2. key: String API key used to get access to powsrv.io.

API Key

Register on my.powsrv.io to get an API key

My first transaction with PoW done by powsrv.io

  1. Change to a directory of your choice.
  2. Clone or download iota.lib.js.powsrvio
  3. Change to the iota.lib.js.powsrvio/examples directory.
  4. Install the iota.js core lib with npm install @iota/core.
  5. Change the provider in test_transaction_powsrv.js to your node's address.
  6. Change your9api9key to your API key
  7. Run node test_transaction_powsrv.js (if there is no node.js on your system install it first)
  8. The output shuold be like this: Published transaction with tail hash: XNQY...
  9. Great, now you are able to send IOTA transactions with super fast PoW.

My first public MAM stream with PoW done by powsrv.io

  1. Change to a directory of your choice.
  2. Clone or download iota.lib.js.powsrvio
  3. Change to the iota.lib.js.powsrvio/examples directory.
  4. Install the mam.client.js lib with npm install @iota/mam.
  5. Install the iota.js core lib with npm install @iota/core.
  6. Change the provider in publishAndFetchPublic.js to your node's address.
  7. Change your9api9key to your API key
  8. Run node publishAndFetchPublic.js (if there is no node.js on your system install it first)
  9. The output shuold be like this: Published { message: 'Message from Alice',timestamp: '2019-2-10 10:54:47' } ...
  10. Great, now you are able to publish MAM streams with super fast PoW