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

@contexttrust/seal

v1.3.0

Published

Implementação de referência do selo cøntextTrust V1.2 — normalização canônica, BLAKE3, composite hash, assinatura Ed25519 e verificação. Código puro: sem rede, sem banco, sem servidor.

Readme

@contexttrust/seal

Implementação de referência do selo cøntextTrust V1.2.

A especificação é SPEC.md. Quando código e spec divergirem, a spec é a autoridade e o código é o bug.

O que este pacote é

Código puro: normalização canônica, BLAKE3-256, composite hash, assinatura Ed25519 e verificação. Sem fetch, sem banco, sem variável de ambiente, sem DOM, sem domínio padrão.

É essa pureza que torna o cøntextTrust um protocolo e não uma API: verificar um selo não exige servidor de ninguém — nem o nosso.

O que este pacote NÃO é

Não faz armazenamento, identidade, cobrança, ancoragem on-chain nem descoberta. Isso é papel de uma aplicação. O trustLayers é uma dessas aplicações — a primeira, não a única.

Uso

import { sealContent, verifySeal, generateKeyPair } from '@contexttrust/seal'

const kp = await generateKeyPair()

const { envelope } = await sealContent({
  text: 'Conteúdo a selar',
  author: { displayName: 'Fulano', pubkey: bytesToHex(kp.publicKey) },
  privateKey: kp.privateKey,
  platforms: [],
  baseUrl: 'https://sua-aplicacao.exemplo',   // obrigatório: o protocolo não tem domínio
})

const r = await verifySeal(envelope)
r.valid // true

Verificar um selo de terceiro exige apenas o envelope:

const r = await verifySeal(JSON.parse(await fs.readFile('prova.json', 'utf8')).envelope)

Conformidade

npm test

A suíte não importa este pacote para checar a spec: reimplementa a SPEC.md do zero e confere contra selos reais de produção (test/vectors.json). Se a spec estiver ambígua ou incompleta, o teste quebra. Depois disso, compara o pacote com a spec para garantir que não divergiram.

Armadilhas conhecidas

  1. A mensagem assinada é a string hexadecimal do compositeHash, não os 32 bytes que ela representa. Errar isso falha em 100% dos selos (SPEC §5).
  2. verifyUrl não é assinado. Um selo não prova onde foi criado (SPEC §4, §8).
  3. bindingDomain é fixo em cøntextTrust:polygon-mainnet:137, com ø (U+00F8). Mudar de chain invalida toda assinatura existente — de propósito.

Licença

Apache-2.0. Ver LICENSE e NOTICE na raiz do repositório. A licença cobre o código; a marca cøntextTrust não é licenciada por ela.