@_koii/task-node 1.12.37 → 1.12.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -37
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,49 +1,37 @@
1
- # K2-Node:
2
- ****
3
- ## TL;DR
4
- # How to to run a node:
1
+ # KOII Task Node
5
2
 
6
- 1. Clone the repo repo : https://gitlab.com/koii-network/task-node
7
- 2. do `npm install`
8
- 3. do `npm run build:watch`
9
- 4. on another terminal do `npm start ` this will start a **K2** node with attention game running.
10
- ****
11
- ## Full Guide
12
- ## How Attention game works
3
+ > Internal engine powering Koii Task Nodes – interacting with the K2 blockchain, coordinating task execution, and managing on-chain operations.
13
4
 
14
- The node collects PoRTs for a whole epoch and generates a distribution list and add its to the attention account of the node using a uploader contract which breaks the data into small chunks and then combines it into a big data chunk in the program. The node will also expose the port list on an endpoint
15
- On the next Epoch the node will do voting by getting all the attention accounts and pings all the registered nodes and get all the posts the generates distribution list after verifying that teh list is correct or not.
5
+ ## Overview
16
6
 
7
+ `@_koii/task-node` is a core package used in Koii Desktop Nodes to handle the internal logic related to running and maintaining tasks on the K2 blockchain. Although the source code is currently closed, this package is open-source and distributed via npm for use within the Koii node ecosystem.
17
8
 
18
- # How to run
19
- ## Deploy Uploader Program
20
- First airdrop 1000 tokens to your default wallet.
21
- after that clone https://github.com/koii-network/k2-contracts this repo and deployed the uploader program by running `init.sh` file after installing dependencies using `npm install`. This will deploy the uploader program used by attention game.
9
+ It provides:
22
10
 
23
- ## Run Node:
24
- ### Prerequisites:
25
- 1. You will need to create a task staking account in order to run tasks other than the attention contract.
26
- 1.1 You can create a staking wallet by using the staking cli `npm run stake`
11
+ - 🧠 Core logic for interacting with Koii's decentralized task economy
12
+ - 🔗 Communication utilities with the K2 blockchain
13
+ - 🔒 Cryptographic utilities and key management
14
+ - Task life cycle handling (registration, staking, validation, and rewards)
15
+ - 🧰 A wide range of utility methods used across node operations
27
16
 
28
- ### Running a Node:
29
- To run a node run `npm run build:watch` and ona different terminal run `npm start` to start the node.
17
+ > **Note**: This package is intended to be used as part of the official [Koii Desktop Node](https://koii.network/) and is not designed for general-purpose consumption.
30
18
 
31
- ### Working of stakes
19
+ ---
32
20
 
33
- The attention program needs 2 accounts one is the attentions staking account and data program account. Which executable makes from the mainAccount according to the stake amount set in the env variable (no preconfiguration needed)
21
+ ## Installation
34
22
 
35
- In-order to run tasks other than attention program, you need to make a staking account `npm run stake`, allocate some funds in that wallet and then the task you want to execute stake some tokens to that task id using the cli. After that you will be able to execute task and make rewards out of that.
23
+ ```bash
24
+ npm install @_koii/task-node
25
+ ```
26
+ > Requires **Node.js v16+**
27
+ ## Usage
28
+ -----
36
29
 
30
+ The module exports a compiled JavaScript library (`dist/taskNodeLib.js`) which is consumed by the Koii Desktop Node.
37
31
 
38
- #### Note: Attention task is different than the other tasks
39
- ****
40
- # Trouble Shooting:
41
- ## Insufficient Balance:
42
- You might get this error if you have restated the network and you are trying to run deploy uploader program or running attention game. In this cases try `solana airdrop <AMOUNT> <ADDRESS> `.
32
+ While direct usage is not typically needed for most developers, here's an example import:
43
33
 
44
- ## Program doesn't exists
45
- You will get this error if you have restarted the network (Wiped out the data) and you are trying to run run attention game attention game, deleting `namespace/Attention22222222222222222222222222222222222/attentionAccountWallet.json` and `namespace/Attention22222222222222222222222222222222222/uploadAccountWallet.json` will fix the issue.
46
-
47
-
48
-
49
- ****
34
+ ```ts
35
+ import { SomeInternalFunction } from '@_koii/task-node'
36
+ // Note: Actual exports and usage are internal to Koii's node runtime.
37
+ ```
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "files": [
4
4
  "dist"
5
5
  ],
6
- "version": "1.12.37",
6
+ "version": "1.12.38",
7
7
  "description": "Node repo for k2",
8
8
  "main": "dist/taskNodeLib.js",
9
9
  "types": "dist/taskNodeLib.d.ts",