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

@bearnetwork/bnes-pqc-snap

v0.1.2

Published

BearNetworkChain ML-DSA-87 quantum transaction Snap

Readme

@bearnetwork/bnes-pqc-snap

BearNetworkChain 主網(Chain ID 641230)專用的 MetaMask Snap。它從既有錢包的 snap_getEntropy 值,以 HKDF-SHA-512 決定性衍生一把 ML-DSA-87 BNES_WALLET_QTX_V1 身分金鑰,並簽署 BNES 0x04 Quantum Envelope 的 PQCSigningHash()

這是獨立套件;它不修改 MetaMask upstream 核心邏輯,亦不保存、匯出或回傳 seed / 私鑰。

凍結的 v1 規格

  • Snap ID:npm:@bearnetwork/bnes-pqc-snap
  • 網路:BearNetworkChain mainnet,Chain ID 641230 (0x9c8ce)
  • 熵來源:snap_getEntropy,version 1,salt BNES_WALLET_QTX_V1
  • 衍生:HKDF-SHA-512,輸出固定 32 bytes,餵入 FIPS 204 ML-DSA-87 seed key generation
  • HKDF salt:SHA-512("BNES:WALLET-PQC:HKDF-SALT:v1")
  • HKDF info:"BNES:WALLET-PQC:ML-DSA-87:v1" || 00 || "BNES_WALLET_QTX_V1" || 00 || U64BE(641230) || "npm:@bearnetwork/bnes-pqc-snap" || 01
  • 公鑰:2592-byte ML-DSA-87 serialized public key
  • 簽章:4627-byte raw ML-DSA-87 signature,context 為空
  • 交易雜湊:Keccak-256(RLP([chainId, nonce, gasPrice, gas, to, value, data, accessList])),與 BNES Node PQCSigningHash() 相同

固定 HKDF 向量(00..1f 的 32-byte entropy)會衍生:

9f48a59eee7a59c00aeeff6c7aef2aafc06e929bc59a20ad10a53d23b334e09f

RPC

僅允許明確列入 allowlist 的 HTTPS origins:https://bearnetwork.nethttps://www.bearnetwork.nethttps://wallet.bearnetwork.net,以及 brnkc-mainnetbrnkc-mainnet1rpc-cirpc-ci1bnes-mainnetbnes-mainnet1 六個 bearnetwork.net RPC 主機,並接受 https://*.bearnetwork.net 與未來 BNS 自訂協定的 bnes://*.bnes。比對會要求協定與完整網域邊界。 每次簽署均須在 Snap 對話框確認主網、收款地址、金額、nonce 與 canonical PQC hash。

  • bnes_getPqcPublicKey
  • bnes_getPqcStatus
  • bnes_signQuantumTransaction

Snap state 僅含 publicKeyderivationVersioninitializedAt;衍生 seed 和私鑰 只存在於短暫記憶體,使用完畢即清除。

開發與驗證

先安裝 Rust wasm32-unknown-unknown target,再執行:

npm ci
npm run check
npm run sbom
npm run integrity
npm pack --dry-run

npm run check 會以乾淨建置重新產生 WASM、Snap manifest hash,並測試 HKDF 還原、 ML-DSA-87 簽署/驗證、竄改拒絕、非主網拒絕、未授權來源與私密資料不落入 Snap state。

發布

GitHub Actions 使用 npm trusted publishing(OIDC)執行 npm publish --provenance。 在 npm 套件設定中,將 trusted publisher 綁定至本儲存庫與 release.yml;不需要 npm access token。只有 v* tag 才會執行發布。

授權

Apache-2.0;見 LICENSE