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

@agentplat/mesh-crypto

v1.2.0

Published

Web Crypto signing and verification contracts for AgentPlat Mesh envelopes.

Readme

@agentplat/mesh-crypto

Provider-neutral Web Crypto contracts for hashing, signing and verifying AgentPlat Mesh envelopes.

Installation (developer preview)

Install the coordinated preview explicitly:

npm install @agentplat/mesh-crypto@next

Keep all @agentplat/* packages on the same release version. npm's default latest tag can point to an older preview. See the release channels for distribution status and version selection.

The Alpha 1 implementation provides:

  • canonical SHA-256 payload digests;
  • Ed25519 signing and verification through Web Crypto;
  • stable fail-closed signing and verification errors;
  • exact tenant, mesh, peer, key and algorithm binding;
  • inclusive validFrom, exclusive validUntil and explicit revocation checks;
  • a fixed, bounded StaticMeshKeyResolver; and
  • public verification fixtures under fixtures/v0.

Use signMeshEnvelope for the reference outbound path and verifyMeshEnvelope for the inbound cryptographic boundary. Injectable class implementations are available through createWebCryptoMeshEnvelopeSigner and createWebCryptoMeshEnvelopeVerifier.

signMeshEnvelopeExternally supports KMS/HSM custody. AgentPlat canonicalizes and hashes the envelope locally, then passes only the immutable signing bytes, algorithm and declared key ID to a MeshExternalSignaturePort. The returned value must be an exact 64-byte Ed25519 signature and is revalidated as a normal Mesh envelope. The port never receives or returns a private key. Provider adapters must still bind workload identity, canonical key ID, audit retention, timeouts and rotation policy; an arbitrary remote signing service is not by itself evidence of independent custody.

The protocol proof.keyId remains a bounded opaque Mesh identifier, not a provider ARN. The external signature port must bind that identifier to the canonical KMS/HSM resource recorded in deployment evidence; it must never trust an ARN supplied inside an envelope.

The Beta 1 signer writes v1 by default. Producing a compatibility v0 envelope requires an immutable construction-bound signingPolicy that lists v0; the signer never relabels an envelope. The verifier reads v0 and v1 by default and may be narrowed through allowedWireVersions. Because wireVersion is in the signing document, copying a valid proof between versions fails verification.

Key resolution is synchronous by design so ordinary inbound verification cannot trigger network access. StaticMeshKeyResolver rejects duplicate bindings and configurations above its explicit record limit.

verifiedAt is trusted local time supplied by the caller; key validity and revocation never depend on the sender-controlled envelope timestamp. Live verification always rejects revoked keys. A separate historical-verification API may be introduced later, but historical results must never re-enter live admission or a reducer.

Public-key import and export use the provider-neutral raw 32-byte Ed25519 representation. Private-key import and export are intentionally outside this package's public surface.

Verification establishes payload integrity, signature validity and authentication of possession of a live locally bound key. It does not provide confidentiality or establish the truth of a sender claim; it does not admit a peer, authorize a message, apply replay state or mutate domain state.

Private keys are never protocol payloads, fixtures or telemetry. Signing tests generate temporary key pairs at runtime; public fixtures contain only a raw public key and its fixed signed envelope.