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

quanta-sdk

v0.1.2

Published

JS/TS SDK for the Quanta Protocol Ecosystem

Downloads

37

Readme

Quanta SDK

The official JavaScript/TypeScript developer toolkit for the Quanta Protocol.

npm License: ISC

The SDK provides a complete abstraction over the Quanta Node REST API and integrates the quanta-wasm Falcon-512 post-quantum cryptography engine. Use it to build wallets, explorers, exchanges, and any integration with the Quanta Protocol.


Installation

npm install quanta-sdk

Quick Start

import { QuantaClient, QuantaWallet, TransactionBuilder, initQuanta } from 'quanta-sdk';

// 1. Initialize the WASM crypto engine (once at startup)
await initQuanta();

// 2. Create or restore a wallet
const wallet = QuantaWallet.create();
console.log('Address:', wallet.address);
console.log('Mnemonic:', wallet.mnemonic);  // store offline

// 3. Connect to a node
const client = new QuantaClient('https://rpc.quantachain.org');

// 4. Check balance (amounts are in microunits: 1 QUA = 1,000,000)
const balance = await client.getBalance(wallet.address);
console.log(`Balance: ${balance / 1_000_000} QUA`);

// 5. Send a transaction
const nonce = await client.getNonce(wallet.address);
const unsignedTx = TransactionBuilder.createUnsigned(
  wallet.address, '0xRECIPIENT', 5_000_000, nonce + 1  // 5 QUA
);
const signedTx = TransactionBuilder.sign(unsignedTx, wallet);
const { tx_hash } = await client.submitTransaction(signedTx);
console.log('Sent:', tx_hash);

Features

  • Post-Quantum Cryptography — Falcon-512 key generation and transaction signing via quanta-wasm
  • Node Client — typed interface to the Quanta REST API (blocks, accounts, mempool, transactions)
  • Transaction Builder — builds and signs Transfer, TimeLockTransfer, and MultiSigTransfer transactions
  • Wallet Management — create, restore from mnemonic, and derive addresses
  • CLI Utilitynpx quanta-cli for wallet generation and node inspection
  • TypeScript — full type definitions included

API Reference

initQuanta()

Initializes the WASM cryptography module. Must be called once before any wallet or signing operation.

await initQuanta();

QuantaClient

HTTP client for the Quanta REST API.

const client = new QuantaClient(nodeUrl: string);

| Method | Returns | Description | |--------|---------|-------------| | client.getHealth() | NodeHealth | Node status, height, peer count | | client.getLatestBlock() | Block | Latest confirmed block | | client.getBlock(height) | Block | Block by height | | client.getTransaction(hash) | Transaction | Transaction by hash | | client.getBalance(address) | number | Balance in microunits | | client.getNonce(address) | number | Current account nonce | | client.getMempool() | MempoolInfo | Pending transactions | | client.submitTransaction(tx) | { tx_hash } | Broadcast signed transaction | | client.getNetworkStats() | NetworkStats | Height, TPS, peer count |


QuantaWallet

Wallet creation and restoration.

// Create new wallet with fresh Falcon-512 keypair
const wallet = QuantaWallet.create();
// wallet.address  — "0x..." 
// wallet.mnemonic — 24-word BIP39 phrase

// Restore from mnemonic
const wallet = QuantaWallet.fromMnemonic("word1 word2 ... word24");

TransactionBuilder

Builds and signs transactions.

// Standard transfer
const tx = TransactionBuilder.createUnsigned(
  sender,     // "0x..." address
  recipient,  // "0x..." address
  amount,     // microunits
  nonce,      // current nonce + 1
  txType?     // optional: TimeLockTransfer | MultiSigTransfer
);

const signedTx = TransactionBuilder.sign(tx, wallet);

TimeLock Transfer

const tx = TransactionBuilder.createUnsigned(
  sender, recipient, amount, nonce,
  { type: 'TimeLockTransfer', unlock_height: 20000 }
);

MultiSig Transfer

const tx = TransactionBuilder.createUnsigned(
  sender, recipient, amount, nonce,
  { type: 'MultiSigTransfer', signers_required: 3 }
);

CLI

# Generate a new wallet
npx quanta-cli wallet generate

# Check node status
npx quanta-cli node status https://rpc.quantachain.org

# Check balance
npx quanta-cli balance 0xYOUR_ADDRESS

Units

All amounts in the API and SDK are in microunits:

| QUA | Microunits | |-----|-----------| | 1 QUA | 1,000,000 | | 5 QUA | 5,000,000 | | Min fee | 100 (0.0001 QUA) |


Architecture

quanta-sdk
├── QuantaClient      — REST API wrapper
├── QuantaWallet      — Falcon-512 keypair, address derivation, mnemonic
├── TransactionBuilder — Canonical tx construction + signing contract
└── quanta-wasm       — Rust/WASM Falcon-512 crypto engine (bundled)

quanta-sdk bundles and manages quanta-wasm internally. You do not need to install quanta-wasm separately unless you need the raw WASM API.


Public Testnet Endpoint

https://rpc.quantachain.org

For high-volume integrations, run your own node. See the node documentation.


License

ISC License