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

@cessnetwork/types

v0.1.1

Published

Type definitions for CESS SDK

Readme

@cessnetwork/types

CESS Type definitions for CESS SDK.

Installation

npm install @cessnetwork/types

Overview

This package provides TypeScript type definitions for the CESS (Content Edge Storage Space) blockchain SDK. It includes interfaces, types, and HTTP response types for various pallets and modules used in the CESS network.

Exports

This package exports type definitions organized into three main categories:

1. Core Types

  • Common utility types and constants
  • Type aliases for blockchain primitives
  • Event interfaces

2. Pallet Types

  • Audit: Types for auditing and proof verification (ChallengeInfo, MinerSnapShot, SpaceProof, etc.)
  • Balances: Types for token and balance management
  • File Bank: Types for file storage and management (FileMetadata, BucketInfo, etc.)
  • OSS: Types for Object Storage Service integration
  • RPC: Types for Remote Procedure Call interfaces
  • Sminer: Types for mining operations (MinerInfo, MinerLedger, etc.)
  • Staking: Types for staking and validator operations
  • Storage Handler: Types for storage management operations
  • System: System-level types
  • TEE: Types for Trusted Execution Environment operations

3. HTTP Types

  • Common HTTP response types
  • Gateway API response types
  • Sminer-related HTTP response types

Usage

import { 
  // Core types
  AccountIdInput, 
  BalanceInput,
  TokenPrecision_CESS,
  
  // Audit types
  ChallengeInfo, 
  MinerSnapShot,
  SpaceProofInfo,
  
  // Sminer types
  MinerInfo,
  
  // File Bank types
  FileMetadata,
  
  // Event types
  Event_UploadDeclaration,
  
  // HTTP types
  GatewayResponse
} from '@cessnetwork/types';

// Use the types in your application
const challenge: ChallengeInfo = {
  minerSnapshot: {
    idleSpace: BigInt(1000000),
    serviceSpace: BigInt(500000),
    serviceBloomFilter: [],
    spaceProofInfo: {
      miner: "cX...",
      front: 0,
      rear: 10,
      poisKey: { g: "0x...", n: "0x..." },
      accumulator: "0x..."
    },
    teeSignature: "0x..."
  },
  challengeElement: {
    start: Date.now(),
    idleSlip: 1,
    serviceSlip: 1,
    verifySlip: 1,
    spaceParam: [],
    serviceParam: {
      randomIndexList: [1, 2, 3],
      randomList: ["0x...", "0x..."]
    }
  },
  proveInfo: {
    assign: 1,
    idleProve: null,
    serviceProve: null
  }
};

// Common input types for API parameters
const accountId: AccountIdInput = "cXhT9Xh3DhrBMDmXcGeMPDmTzDm1J8vDxBtKvogV33pShnWS";
const balance: BalanceInput = BigInt(1000000000000000000); // 1 CESS token

Common Constants and Utilities

The package also exports useful constants and utilities:

import { 
  TokenPrecision_CESS, 
  StakeForOneTB, 
  BlockInterval, 
  Size, 
  AddressSs58Format,
  NumberOfDataCopies,
  SegmentSize,
  FragmentSize
} from '@cessnetwork/types';

// Token precision for CESS (10^18)
console.log(TokenPrecision_CESS); // 1000000000000000000n

// Size constants
console.log(Size.SIZE_1GiB); // 1073741824

// Address format for mainnet and testnet
console.log(AddressSs58Format.MAIN_NET); // 11331

Documentation

For more detailed documentation, please visit CESS official documentation.

License

This project is licensed under the Apache-2.0 License.