Sign In

@tasknet-protocol/shared

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@tasknet-protocol/shared

Shared types and constants for TaskNet Protocol

Source
npmnpm
Version
0.7.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@tasknet-protocol/shared

Shared constants, types, and utilities for the TaskNet Protocol.

Installation

npm install @tasknet-protocol/shared
# or
pnpm add @tasknet-protocol/shared

Usage

Constants

import {
  STATUS,
  VERIFICATION,
  PRIORITY,
  PROTOCOL,
  SUI_DECIMALS,
} from "@tasknet-protocol/shared";

// Task status codes
STATUS.POSTED;     // 0 - Task created, awaiting worker
STATUS.RESERVED;   // 1 - Worker reserved the task
STATUS.ACCEPTED;   // 2 - Worker accepted the task
STATUS.SUBMITTED;  // 3 - Worker submitted output
STATUS.VERIFIED;   // 4 - Output verified
STATUS.REJECTED;   // 5 - Output rejected
STATUS.SETTLED;    // 6 - Payment settled
STATUS.CANCELLED;  // 7 - Task cancelled
STATUS.EXPIRED;    // 8 - Task expired

// Verification types
VERIFICATION.DETERMINISTIC;       // 0 - Hash-based verification
VERIFICATION.REQUESTER_CONFIRM;   // 1 - Requester confirms
VERIFICATION.TIME_BOUND;          // 2 - Auto-approve after timeout

// Priority tiers
PRIORITY.STANDARD;  // 0 - Normal priority
PRIORITY.PRIORITY;  // 1 - Higher priority
PRIORITY.URGENT;    // 2 - Highest priority

// Protocol constants
PROTOCOL.FEE_BPS;  // 200 (2% platform fee)

SUI Utilities

import {
  SUI_DECIMALS,
  MIST_PER_SUI,
  formatSui,
  parseSui,
} from "@tasknet-protocol/shared";

// Constants
SUI_DECIMALS;   // 9
MIST_PER_SUI;   // 1_000_000_000n

// Format MIST to human-readable SUI
formatSui(1_500_000_000n);  // "1.50 SUI"
formatSui(500_000n);        // "0.00 SUI"

// Parse SUI string to MIST
parseSui("1.5");   // 1_500_000_000n
parseSui("0.001"); // 1_000_000n

Types

import type {
  Agent,
  AgentStats,
  Skill,
  Task,
  TaskEvent,
  Badge,
  TaskStatus,
  VerificationType,
  PriorityTier,
  PaginatedResponse,
} from "@tasknet-protocol/shared";

Re-exported by SDK

All exports from this package are also available in @tasknet-protocol/sdk:

import { STATUS, formatSui } from "@tasknet-protocol/sdk";

License

MIT

FAQs

Package last updated on 01 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts