Search…
burnKoiAttention
Content creators can earn attention rewards in KOII by registering content with Koii Network. Register once and get rewarded forever.
This function enables content to earn attention rewards for anything that has already been uploaded on Arweave.

Parameters

  • reward: (Optional) <string> Custom reward for smartweave transaction
  • nftTxId: <string> ID of the NFT to be preregistered

Example Code

1
const knode = require("@_koi/sdk/node");
2
const ktools = new knode.Node();
3
const walletKeyLocation = "arweaveWallet.json";
4
​
5
async function testburnKoiAttention() {
6
const jwk = await ktools.loadFile(walletKeyLocation);
7
await ktools.loadWallet(jwk);
8
9
let txId = "rnc8IO7O7fd8Hovvvmq2YZ4y1CI-O0tdRavSGj_meYE";
10
var result = await ktools.burnKoiAttention(txId);
11
12
console.log("transaction", result);
13
}
14
​
15
​
16
testburnKoiAttention();
Copied!

Example Code Output

1
Initialized Koii Tools for true ownership and direct communication using version QA7AIFVx1KBBmzC7WUNhJbDsHlSJArUT0jWrhZMZPS8
2
transaction ySdfS6tWYa0aCn6PNaXD7lmvFz3FHowwI6Tsiujg7tU
Copied!

Returns

Promise <string> - Arweave transaction ID
​