Search…
⌃K
Links

Attention Mining

Collect Proofs of Real Traffic on your content to mine new KOII tokens each day!
KOII tokens are earned by tracking Proofs of Real Traffic (PoRT) on your website or content.
Proof of Real Traffic 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
or
yarn add @_koii/k2-port
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 parameters waits for Finne to be connected
});
​
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

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 and store it in your browser and Sign PoRTs with them.
Arguments
This function accepts the following arguments
Id 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 fall 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 anything 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 own node and receive rewards for supporting the ecosystem. For further reading, Albert Wenger summarizes a number of key points in The World After Capital.