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

@_koii/k2-port

v0.0.11

Published

Proof of Real Traffic is a cryptographic primitive including a signature from a specific consumer wallet. Each viewer creates a signature and then hashes over it to find a PoRT with a specific [difficulty factor](https://btc.com/stats/diff) generating a P

Downloads

18

Readme

KOII Proof of Real traffic(PoRTs)

What is Proof of Real Traffic:

Proof of Real Traffic is a cryptographic primitive including a signature from a specific consumer wallet. Each viewer creates a signature and then hashes over it to find a PoRT with a specific difficulty factor generating a PoW which represents the content and viewer uniquely.

Introduction:

This package will sign proofs of real traffic via Finnie wallet and submit to Koii Task Nodes and in returns your user can earn some KOII as a token of appreciation for sharing content hosted on Koii Network.

How to use:

Following is the installation guide for KOII PoRT

npm install @_koii/k2-port or yarn add @_koii/k2-port

Or else you can get a binary from our CDN

Then in your index.html file add <script src="./node_modules/@_koii/k2-port/bundle/port.js"></script>

or <script src="https://cdn.koii.live/port-latest.js"></script>

SDK Documentation

First you have to initialize the PoRT class:

import * as port from "@_koii/k2-port"

let portAPI = new port.PoRT({
  trustedNodeAddress: 'https://k2-tasknet.koii.live', //Address of KOII mainnet
  node: 5, //maximum number of nodes to send PoRTs to.
  connectionWait: true, // this parameters waits for Finne to be connected
});

Now here's the list of function this SDK exposes:

PropagatePoRT()

This function is the core of this SDK. It attempts to send Proofs of Real Traffic to Koii network for given Id. Id could be your NFT id, wallet public key, CID from IPFS and your website url. First it tries Finne wallet and if permissions are available to SignPoRTs it will sign PoRTs else it will generate a new Koii wallet in and store it in your browser and Sign PoRTs with them.

Arguments

This function accepts following arguments Id Type: String Required: true description: This must be a valid Id for which you want to send Proofs

ClearFinneRejection()

On connectWallet() when Finne is rejected it saves the rejection status in localStorage and next time you call connect if the rejectedStatus is true it will not connect to Finne instead fallback to anonymous PoRT submission. So to reset the rejection status use this function.

Example

For your NFT id on Arweave:

import * as port from "@_koii/k2-port"

let portAPI = new port.PoRT({
  trustedNodeAddress: 'https://k2-tasknet.koii.live', //Address of KOII mainnet
  node: 5, //maximum number of nodes to send PoRTs to.
  connectionWait: true, // this parameters waits for Finne to be connected
});

//portAPI.propagatePoRT('TI6x7I6wzh2VQhT5qXEFRWQxX2zAj8zGdcadCYn8580')
portAPI.propagatePoRT('<Your NFT id on Arweave>') // NFT id on Arweave

For your Website:

import * as port from "@_koii/k2-port"

let portAPI = new port.PoRT({
  trustedNodeAddress: 'https://k2-tasknet.koii.live', //Address of KOII mainnet
  node: 5, //maximum number of nodes to send PoRTs to.
  connectionWait: true, // this parameters waits for Finne to be connected
});

// portAPI.propagatePoRT('https://www.koii.network/')
portAPI.propagatePoRT('<Your website url>') // Your webiste url

For your CID from IPFS:

import * as port from "@_koii/k2-port"

let portAPI = new port.PoRT({
  trustedNodeAddress: 'https://k2-tasknet.koii.live', //Address of KOII mainnet
  node: 5, //maximum number of nodes to send PoRTs to.
  connectionWait: true, // this parameters waits for Finne to be connected
});

// portAPI.propagatePoRT('bafybeiae5xyoekitp23qiuedcxzjtakh2a2dky5aieajp7qsnwdanvqjri')
portAPI.propagatePoRT('<Your content CID>') // Your content CID