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

anuastra

v1.1.2

Published

Official Node.js SDK for the Aṇu Astra Virtual Quantum Processor and Post-Quantum Cryptography API

Readme

Aṇu Astra Node.js SDK (v1.1.0)

The official Node.js SDK for the Aṇu Astra Virtual Quantum Processor and Post-Quantum Cryptography (PQC) API.

Build and evaluate path-integral quantum circuits locally, run native OpenQASM 2.0 payloads, and secure your applications against "Store Now, Decrypt Later" threats using NIST-standardized Kyber and Dilithium algorithms.

Installation

Install the package via npm:

npm install anuastra

Quick Start: Quantum Execution (Qiskit-Style)

The QuantumCircuit builder provides a declarative, strictly-typed interface mirroring industry standards like IBM Qiskit.

import { AṇuAstra, QuantumCircuit } from 'anuastra';

// As of v1.1.0, the baseUrl automatically points to astra.cryptopix.in
const astra = new AṇuAstra({ apiKey: 'YOUR_API_KEY_HERE' });

async function runQuantum() {
    // Scaffold a 2-qubit circuit
    const circuit = new QuantumCircuit(2);
    
    // Create a Bell State (Superposition + Entanglement)
    circuit.h(0);
    circuit.cx(0, 1);

    // Execute the circuit using the Aṇu Astra path-integral engine
    const result = await astra.executeQuantum(circuit, 1);
    
    // Extracted telemetry and engine data
    console.log(`Executed on: ${result.engine}`);
    console.log(`Feynman Paths Explored: ${result.telemetry.feynman_paths_explored}`);
    
    // The quantum state collapse result (e.g. "00" or "11")
    console.log(`Measurement Result (Binary): ${result.results.state_binary}`);
}

runQuantum();

Supported Quantum Gates

Aṇu Astra natively supports a sprawling library of quantum operators. You can chain these directly onto your QuantumCircuit object in JavaScript or TypeScript.

| Category | Supported Gates & Method Shortcuts | | :--- | :--- | | Pauli & Basic | h(q), x(q), y(q), z(q), id(q) | | Phase & S/T | s(q), sdg(q), t(q), tdg(q), p(q, lambda) | | Rotations | rx(q, theta), ry(q, theta), rz(q, theta) | | Square Root | sx(q), sxdg(q) | | General Unitary | u1(q, l), u2(q, p, l), u3(q, t, p, l) / u(...) | | 2-Qubit (Controlled) | cnot(c, t) / cx(...), cz(c, t), cy(c, t), ch(c, t) | | 2-Qubit (Advanced) | swap(q1, q2), iswap(q1, q2), ecr(q1, q2), dcx(q1, q2) | | 2-Qubit (Rotations)| crx(c, t, theta), cry(...), crz(...), cp(...), cu(...) | | 2-Qubit (Ising/XX) | rxx(q1, q2, theta), ryy(...), rzz(...), rzx(...) | | 3+ Qubit (Multi) | ccx(q1, q2, q3) / toffoli(...), ccz(...), cswap(...) / fredkin(...), c3x(...), c4x(...) / quadx(...) |

Quick Start: OpenQASM 2.0 Ingestion

For research teams migrating from legacy hardware (like IBM Quantum), Aṇu Astra natively ingests raw .qasm strings and executes them instantly.

import { AṇuAstra } from 'anuastra';

const astra = new AṇuAstra({ apiKey: 'YOUR_API_KEY' });

const qasmPayload = `OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0],q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];
`;

async function runQasm() {
    // Execute the raw OpenQASM string natively
    const response = await astra.executeQasm(qasmPayload);
    
    // Log the JSON parsed results
    console.log(JSON.stringify(response.results, null, 2));
}

runQasm();

Post-Quantum Cryptography (PQC)

The Aṇu Astra SDK exposes NIST FIPS-203 and FIPS-204 standardized algorithms.

1. Key Encapsulation (ML-KEM / Kyber)

Used for establishing symmetric quantum-resistant tunnels over public networks (TLS/TCP).

[!IMPORTANT] Zero-Trust Architecture (v1.0.2+): keygen and decapsulate are now executed entirely locally on your device using WebAssembly/JS runtimes. Aṇu Astra never transmits or stores your private parameters.

// 1. Generate keys LOCALLY (Server A)
// No private keys leave your device
const { public_key, private_key } = await astra.kyber.keygen(768);

// 2. Encapsulate via VQP (Server B)
// Server B uses Public Key to create a Shared Secret + Ciphertext via Aṇu Astra 
const capsule = await astra.kyber.encapsulate(public_key);

// 3. Decapsulate LOCALLY (Server A)
// Server A uses Private Key + Ciphertext to derive the exact same Shared Secret
const resolved = await astra.kyber.decapsulate(capsule.ciphertext, private_key);

console.log(`Shared Secret Established: ${resolved.shared_secret === capsule.shared_secret}`);

2. Digital Signatures (ML-DSA / Dilithium)

Used for unbreakable document signing, firmware validation, and transaction authentication.

const { public_key, private_key } = await astra.dilithium.keygen(3);

const message = "Quantum Safe transaction payload";
const { signature } = await astra.dilithium.sign(message, private_key);

const validation = await astra.dilithium.verify(signature, message, public_key);
console.log(validation.is_valid);

TypeScript Support

This SDK is written entirely in TypeScript. Type definitions are automatically bundled, providing comprehensive intellisense and compile-time validation.

License

MIT