Skip to main content

Attention Mining

banner

Collect Proofs of Real Traffic on your content to mine new KOII tokens each day!

warning

This project was developed on the legacy testnet. If you have any questions about this project, please don't hesitate to contact us on Discord.

KOII tokens are earned by tracking Proofs of Real Traffic (PoRT) on your website or content.

Proof of Real Traffic (PoRT) is generated by a user's wallet when they visit a website or view content. The Finnie wallet composes these in the background as users browse, then broadcasts the PoRTs to Koii nodes at regular intervals.

This can be implemented in any web client by installing the PoRT library like so:

npm install @_koii/k2-port
info

This package will sign proofs of real traffic via Finnie wallet and submit them to KOII nodes, and in return, your users can earn some KOII as a token of appreciation for sharing content hosted on the KOII network.

Or else you can get a binary from our CDN.

Then in your index.html file add

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

Example code:

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 parameter waits for Finne to be connected
});

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 parameter 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 parameter waits for Finne to be connected
});

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

SDK Documentation

PropagatePoRT()

This function is the core of this SDK. It attempts to send Proofs of Real Traffic to the KOII network for a given transaction Id. First, it tries Finnie wallet and if permissions are available to SignPoRTs it will sign PoRTs else it will generate a new wallet store it in your browser, and sign PoRTs with them.

Arguments

This function accepts the following arguments trxId
Type: String
Required: true
description: This must be a valid IPFS/Arweave CID for which you want to send proof

ClearFinnieRejection()

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

Support

Check on our GitHub to learn more about this SDK. If you need any help or find any issue, please create a new GitHub issue with your code, error and, screenshot. We will get in touch with it quickly.

Why Attention?

Human time is the scarcest and most expensive resource we have access to today, and attention is how we use that time to absorb new knowledge and transfer it to others. This superpower has led our species to an almost inconceivably powerful position, and we hope to use Koii to help everyone participate in the governance of our communal attention.

While KOII tokens are used as a compute resource, we are more concerned with creating a safe protocol for the storage of our communal history. The attention economy is everyone's opportunity to build reputation and trust, and ultimately run their node and receive rewards for supporting the ecosystem.

For further reading, Albert Wenger summarizes several key points in The World After Capital.