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

allianza-qss-js

v1.0.0

Published

Quantum Security Service SDK - Bring quantum-resistant security to any blockchain

Readme

@allianza/qss-js

🔐 Quantum Security Service SDK - Bring quantum-resistant security to any blockchain

npm version License: MIT

The first SDK in the world that enables any blockchain to use quantum-resistant cryptography (PQC) without native support.

🚀 Quick Start

npm install @allianza/qss-js
import QSS from '@allianza/qss-js';

// Generate quantum proof for any blockchain transaction
const proof = await QSS.generateProof('bitcoin', txid);

// Verify the proof
const result = await QSS.verifyProof(proof);
console.log('Valid:', result.valid);

// Anchor proof on Bitcoin
const instructions = await QSS.anchorOnBitcoin(proof, 'tb1q...');

📖 Documentation

Basic Usage

Generate Quantum Proof

import QSS from '@allianza/qss-js';

// Generate proof for Bitcoin transaction
const proof = await QSS.generateProof('bitcoin', 'abc123...', {
  block_height: 12345,
  amount: '0.01'
});

console.log('Proof Hash:', proof.proof_hash);
console.log('Signature Scheme:', proof.quantum_signature_scheme);

Verify Proof

const result = await QSS.verifyProof(proof);

if (result.valid) {
  console.log('✅ Proof is valid!');
  console.log('Signature valid:', result.verification_details?.signature_valid);
  console.log('Merkle proof valid:', result.verification_details?.merkle_proof_valid);
} else {
  console.log('❌ Proof is invalid');
}

Anchor on Bitcoin

// Get anchor instructions
const instructions = await QSS.anchorOnBitcoin(proof, 'tb1q...');

// instructions.data contains OP_RETURN data
// Use with your Bitcoin library (e.g., bitcoinjs-lib)
console.log('OP_RETURN data:', instructions.data);

Anchor on Ethereum/Polygon

import { ethers } from 'ethers';

const { instructions, transactionData } = await QSS.anchorOnEVM(
  proof,
  '0x...', // QuantumSecurityAdapter contract address
  'ethereum'
);

// Sign and send transaction
const signer = new ethers.Wallet(privateKey, provider);
const tx = await signer.sendTransaction(transactionData);
await tx.wait();

Advanced Usage

Custom Configuration

import { QSSClient } from '@allianza/qss-js';

const client = new QSSClient({
  apiUrl: 'https://api.allianza.tech/qss',
  timeout: 60000,
  apiKey: 'your-api-key'
});

const proof = await client.generateProof('ethereum', txHash);

Using Blockchain Helpers

import { BitcoinAnchor, EVMAnchor } from '@allianza/qss-js';

// Create OP_RETURN data
const opReturnData = BitcoinAnchor.createOPReturnData(proofHash);

// Extract proof hash from OP_RETURN
const extractedHash = BitcoinAnchor.extractProofHash(opReturnData);

// Create EVM transaction
const txData = EVMAnchor.createAnchorTransaction(contractAddress, proofHash);

🌐 Supported Blockchains

  • Bitcoin (via OP_RETURN)
  • Ethereum (via Smart Contracts)
  • Polygon (via Smart Contracts)
  • BSC (via Smart Contracts)
  • Solana (via Account Data)
  • Cosmos (via IBC)
  • Avalanche (via Smart Contracts)
  • Any EVM-compatible chain

🔐 Security Features

  • ML-DSA (Dilithium) - NIST PQC Standard
  • SPHINCS+ - Hash-based signatures
  • QRS-3 - Triple redundancy (ECDSA + ML-DSA + SPHINCS+)
  • Merkle Proofs - Verifiable inclusion proofs
  • Consensus Proofs - Blockchain finality verification

📚 API Reference

QSS.generateProof(chain, txHash, metadata?)

Generate a quantum proof for a transaction.

Parameters:

  • chain (string): Blockchain name (bitcoin, ethereum, polygon, etc.)
  • txHash (string): Transaction hash
  • metadata (object, optional): Transaction metadata

Returns: Promise<QuantumProof>

QSS.verifyProof(proof)

Verify a quantum proof.

Parameters:

  • proof (QuantumProof): Quantum proof object

Returns: Promise<VerificationResult>

QSS.anchorOnBitcoin(proof, targetAddress?)

Get anchor instructions for Bitcoin.

Parameters:

  • proof (QuantumProof): Quantum proof object
  • targetAddress (string, optional): Bitcoin address

Returns: Promise<AnchorInstructions>

QSS.anchorOnEVM(proof, contractAddress, targetChain?)

Get anchor instructions and transaction data for EVM chains.

Parameters:

  • proof (QuantumProof): Quantum proof object
  • contractAddress (string): QuantumSecurityAdapter contract address
  • targetChain (string, optional): Target chain (default: 'ethereum')

Returns: Promise<{instructions, transactionData}>

🎯 Use Cases

1. Cross-Chain Bridges

// Bridge transaction from Polygon to Bitcoin
const polygonTx = '0x...';
const proof = await QSS.generateProof('polygon', polygonTx);

// Anchor proof on Bitcoin
await QSS.anchorOnBitcoin(proof);

2. Exchange Security

// Generate proof for exchange withdrawal
const withdrawalTx = '0x...';
const proof = await QSS.generateProof('ethereum', withdrawalTx);

// Verify before processing
const result = await QSS.verifyProof(proof);
if (result.valid) {
  // Process withdrawal
}

3. DeFi Protocol Protection

// Protect smart contract interactions
const swapTx = '0x...';
const proof = await QSS.generateProof('polygon', swapTx);

// Anchor on-chain for verification
const { transactionData } = await QSS.anchorOnEVM(proof, contractAddress);

🔗 Links

📄 License

MIT

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide first.

⚠️ Disclaimer

This SDK is in active development. Use at your own risk in production environments.


Made with ❤️ by Allianza Blockchain

🔐 The Chainlink of Quantum Security