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

@_koi/logs

v1.0.5-beta

Published

Koi is a network designed to reward and help to coordinate the creation of public data resources. Install the SDK to register your gateway to the network and begin receiving traffic awards when you contribute logging data.

Downloads

6

Readme

NOTE: This project is a work in progress. Currently testing is in progress on the Arweave Gateway Network, but this repo represents the current state of the work there for reference.

Koi Logs SDK

Koi is a network designed to reward and help to coordinate the creation of public data resources. Install the SDK to register your gateway to the network and begin receiving traffic awards when you contribute logging data.

Implementation

Koi is installed as a feature of any gateway or software library to track traffic reliably and provide access to it when audited by another node.

Installation

Koi gateway logging can be implemented for express servers by adding the necessary routes and middleware shown below:

 

var app = new express();

app.get("/logs/", async function (req, res) {
  return await koiLogger.koiLogsHelper(req, res)
});
app.get("/logs/raw/", async function(req, res) { 
  return await koiLogger.koiRawLogsHelper(req, res)
});

app.use(koiLogger.logger);

app.get("/info/", async function (req, res) {
  return res.status(200).send("<html><i>Welcome to the fish pond.</i><html>");
})

Now, any traffic on your gateway will automatically be obfuscated and provided to the koi network, and you'll earn some koi.

Permissions

Please note: your /tmp/ directory must be writeable to your runtime user to ensure that the logs can be written properly.

Submitting Proofs

If you are building a tool that will interact with Koi gateways, you can submit two headers to opt into verifiable attention monitoring. This process is designed to be pseudonymous, but ensures the long term viability of attention tracking by substantiating raw traffic volume with bellweather data which can identify when there is a sufficiently large abnormality to represent possibly falsified traffic.

Proofs can be submitted by attaching two additional HTTP headers to all requests to gateways: KOI => < base 64 sha 256 hash of id metadata + timestamp + requested resource, with difficulty below network limit > KOI_ID => < Any valid arweave address >

The proof data is stored in the standard log files, and provides an added layer of security and verification. Participating members of the community, in turn, receive Koi tokens proportionate to their value as a bellweather.

Log Files & Clearing Cycle

Each day, log files are updated over a 24 hour period, and subsequently released for public consumption via a /logs endpoint.

Example

Check run yarn test to start.