Skip to content
Documentation
Hevia for developers

Sign packagesBeta

Sign a package with your own Ed25519 key so customers can see that it is exactly what you published.

A signature says: this key vouches for exactly this package. Hevia checks it when you submit, when the operator publishes and when a business installs, and the listing shows "Signed by <your name> (key fingerprint)" or "Not signed". A signature does not say what the app does (that is the review) and does not prove who you are (that is the publisher verification and the domain proof).

What is signed

The signed text is two lines: hevia-pack/v1, a line break, and the content hash of the validated package (sha256:…, the hash npm run hevia-app -- pack package.json prints). The signature is Ed25519 over those UTF-8 bytes. It travels next to the package, never inside it:

JSON
{ "fingerprint": "0f1e2d3c4b5a69788796a5b4c3d2e1f0", "signature": "ed25519:…" }

The fingerprint is the first 32 hex characters of the SHA-256 of the public key text (ed25519: and the 32 key bytes in unpadded base64url).

1. Make a key and sign

JavaScript
// sign.mjs: node sign.mjs sha256:<content hash>   (the private key stays in your hands)
import { createHash, generateKeyPairSync, sign } from "node:crypto";

const { publicKey, privateKey } = generateKeyPairSync("ed25519"); // do this once and keep the private key
const raw = publicKey.export({ format: "der", type: "spki" }).subarray(-32);
const publicText = `ed25519:${raw.toString("base64url")}`;
const fingerprint = createHash("sha256").update(publicText).digest("hex").slice(0, 32);

const contentHash = process.argv[2];
const message = `hevia-pack/v1\n${contentHash}`;
const signature = `ed25519:${sign(null, Buffer.from(message), privateKey).toString("base64url")}`;
console.log(JSON.stringify({ publicKey: publicText, fingerprint, signature }));

In this repository the same is built in: npm run packs:sign -- keygen writes a key pair, npm run packs:sign -- sign package.json --key key.pem signs a package and npm run packs:sign -- verify package.json --signature sig.json --public ed25519:… checks one. Without a subcommand npm run packs:sign still writes the integrity lock of the first-party packs.

2. Register the public key

On the developer page, section Trust: paste the publicKey value. Up to 10 keys that are active or retired, 3 of them active; a public key can belong to one publisher only.

ActionEffect
RegisterThe key is active: it signs new submissions and verifies.
RotateA new key is registered and the old one is retired. A retired key may not sign new submissions; versions it signed stay valid.
RetireLike rotating without a new key.
RevokeFor a lost or leaked key; needs a reason and cannot be undone. Nothing it signed counts any more: installing such a version is refused, installed copies keep running and show a warning. Sign the version again with an active key to repair it.

3. Send the signature with the package

Paste the signature JSON next to the package on the developer page. The automated check signature then has one of these results:

ResultMeaningSubmission
passValid signature of an active keygoes to review
warn unsignedNo signature sentgoes to review, shown as "Not signed"
fail invalidThe signature does not match this package, or the keychecks failed
fail unknownKeyThe fingerprint is not one of your keyschecks failed
fail revoked, retiredThe key may not signchecks failed
fail malformedNot a fingerprint and an ed25519: signaturechecks failed

A version that is already in review or live can be signed afterwards (section Trust, "Sign a version afterwards"); the package is not touched. If the signature of a published version stops matching its stored package, the version disappears from the listing and cannot be installed.

Account deletion

When a developer account is deleted, all its keys are revoked and its proven domains removed. The publisher profile stays anonymised, installed copies keep running, and new installs of signed versions are blocked until an operator or a new account takes the app over.

API

The developer page uses POST /api/developer/trust (signed-in session, same origin, not an API key). Actions: keyAdd, keyRotate, keyRetire, keyRevoke, sign. The submission itself is POST /api/developer/apps with action: "submit" and the optional field signature.

Generated from the product's own registries, so the reference matches the API.