OverviewFilesCommitsIssuesDocsReleasesPeers

favela-identity / index.js

18 lines · javascript ref:
// favela-identity — the identity primitives, shared.
//
// ⛔ EXTRACTED SO THERE IS ONE COPY. `lib/attestation.js` decodes `ProofEncoding` from
// keet-identity-key's internal `lib/`, and its own header says that coupling "lives HERE so there is
// one place to fix if it moves". A second copy in ap-bridge would put it in two, which is exactly
// the failure `favela-markdown/lib/reach.js` names: "written three times… and the third one would
// eventually be written wrong".
//
// ⚠ It is a PURE VERIFIER. `readAttested` is a function of the proof's bytes — no disk, no network,
// no clock — which is what lets a bridge establish who someone is while holding nothing of theirs.
// That property is the reason admission to a bridge can be proved by a favela identity rather than
// by an atproto DID.
export { readAttested, readProof, signAttested } from './lib/attestation.js'

// The bytes a peer signs to claim a name on a bridge. Here so the claimant and the verifier
// cannot disagree about them — a mismatch is indistinguishable from a forged proof.
export { claimBytes, releaseBytes, frontBytes, CLAIM, RELEASE, FRONT } from './lib/bridge-claim.js'