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

@kodechain/sdk-ts

v1.0.2

Published

Official JavaScript/TypeScript SDK for KodeChain blockchain

Readme

KodeChain Web SDK

NPM Version License TypeScript Quantum Resistant

The official KodeChain Web SDK for JavaScript and TypeScript. Build high-performance, secure decentralised applications on the KodeChain network with native support for dual-chain consensus and quantum-resistant cryptography.

Explore DocumentationView ExamplesReport Issue


✨ Key Features

  • ⚛️ Quantum-Resistant: Native implementation of ML-DSA-65 for post-quantum security.
  • ⛓️ Dual-Chain Architecture: Seamless interaction with DPOS (Financial) and PBFT (Records/Processes) chains.
  • 🏦 Smart Accounts: Hybrid accounts with cross-chain transfer capabilities and billing management.
  • 📜 DVM (Dual Virtual Machine): Comprehensive tools for deploying and interacting with smart contracts.
  • 🛡️ Type-Safety: Built with TypeScript for a robust developer experience.
  • ⛽ Smart Gas: Automatic gas estimation and PBFT billing cycle management.

📦 Installation

Install the SDK using your favorite package manager:

# Using NPM
npm install @kodechain/sdk-ts

# Using Yarn
yarn add @kodechain/sdk-ts

# Using PNPM
pnpm add @kodechain/sdk-ts

🚀 Quick Start

Initialize the client and check node health in seconds:

import { KodeChainClient } from '@kodechain/sdk-ts';

// 1. Initialize Client
const client = new KodeChainClient({
  nodeUrl: 'http://34.28.74.25:8084',
  defaultConsensus: 'DPOS',
});

async function run() {
  await client.connect();
  
  // 2. Query Blockchain State
  const health = await client.getHealth();
  const height = await client.getBlockHeight();
  
  console.log(`Connected to KodeChain! Height: ${height} | Status: ${health.status}`);
}

run();

💡 Core Concepts

Dual-Chain Synergy

KodeChain operates two parallel chains to optimize for different use cases:

  • DPOS (Delegated Proof of Stake): Optimized for fast financial transactions, token transfers (KDC), and staking.
  • PBFT (Practical Byzantine Fault Tolerance): Optimized for critical records, immutable logs, and complex business processes that require immediate finality.

Quantum Security

Every account in KodeChain is protected by ML-DSA (Module-Lattice-Based Digital Signature Algorithm), making your assets and data safe even against future quantum computing threats.


🛠️ Usage Guide

1. Quantum Wallet Management

Create or import wallets with post-quantum security.

import { Wallet } from '@kodechain/sdk-ts';

// Create a new ML-DSA-65 wallet
const wallet = Wallet.createRandom(client);
console.log(`Address: ${wallet.address}`);

// Sign a message (Quantum-Resistant)
const signature = await wallet.sign("Secure data package");

2. Smart Contract Interaction

Deploy contracts or interact with existing ones using the DVM.

import { ContractFactory } from '@kodechain/sdk-ts';

const factory = new ContractFactory(client);
const contract = await factory.attach('0xContractAddress...', ABI);

// Call a state-changing function
const tx = await contract.call('transfer', ['0xRecipient...', '1000n'], {
  caller: wallet.address
});

// Query a view function
const balance = await contract.view('balanceOf', [wallet.address]);

3. Smart Account Operations

Manage hybrid balances and cross-chain transfers.

import { SmartAccountManager } from '@kodechain/sdk-ts';

const manager = new SmartAccountManager(client);
const account = await manager.getAccount('0xAddress...');

// Transfer KDC from DPOS to PBFT chain
await account.transferCrossChain('5000n', 'DPOS', 'PBFT');

// Register a critical record on PBFT
await account.registerCriticalRecord({
  type: 'AUDIT_LOG',
  data: { action: 'LOGIN', result: 'SUCCESS' }
});

📂 Examples

Visit the /examples directory for complete, runnable scripts:

| Example | Description | | :--- | :--- | | basic-usage.ts | Connection, node info, and health checks | | crypto-wallet.ts | Quantum keys and message signing | | staking-delegation.ts | Validator management and voting | | smart-account-example.ts | Advanced hybrid account features | | abicoder-usage.ts | Manual data encoding/decoding |


🤝 Contributing

We welcome contributions to the KodeChain SDK!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


🔗 Links & Resources

Copyright © 2025 KodeChain Network. All rights reserved.