npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@torus-network/sdk

v1.2.3

Published

Torus Network JS SDK

Readme

@torus-network/sdk

A TypeScript SDK for interacting with Torus Network.

Installation

npm install @torus-network/sdk
# or
yarn add @torus-network/sdk
# or
pnpm add @torus-network/sdk

Overview

This SDK provides a comprehensive set of tools and utilities to interact with the Torus Network blockchain. It includes modules for managing addresses, balances, staking, governance, and working with agent metadata.

Features

  • Connection setup with Torus nodes
  • Address validation and handling
  • Balance and staking operations
  • Governance functions (proposals, voting, agent applications)
  • Agent metadata fetching and validation
  • EVM integration
  • Type-safe interaction with the Torus blockchain

Usage

Connection Setup

import { setup } from "@torus-network/sdk";

// Connect to a Torus node
const api = await setup("wss://your-torus-node-endpoint");

Working with Modules

The SDK is organized into modules for different parts of the Torus ecosystem:

  • Subspace module: handles balances, staking, agents, and emission
  • Governance module: handles proposals, agent applications, and voting
  • Address utilities: validation and type-safe address handling
  • Agent metadata: fetching and validating agent information

Examples

Query Balance

import { queryFreeBalance } from "@torus-network/sdk";

const balance = await queryFreeBalance(api, "your-ss58-address");
console.log(`Current balance: ${balance}`);

Query Agents

import { queryAgents } from "@torus-network/sdk";

const agents = await queryAgents(api);
console.log(`Found ${agents.size} agents`);

Working with Governance

import { queryProposals } from "@torus-network/sdk";

const proposals = await queryProposals(api);
console.log(`Found ${proposals.length} proposals`);

Important Notes

  • This package must be built and imported indirectly to avoid typechecking conflicts in the generated/augmented types.
  • The SDK uses Zod for runtime validation, ensuring type safety when interacting with the blockchain.

Structure

  • /src/address.ts - Address utilities
  • /src/agent_metadata/ - Agent metadata handling
  • /src/modules/ - Core modules (governance, subspace)
  • /src/types/ - Type definitions
  • /src/interfaces/ - Polkadot API interfaces and augments

License

See the project license file for details.