You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A drop-in web component for decentralized commit verification — the decentralized equivalent of GitHub's green "Verified" badge. Powered by [Auths](https://github.com/bordumb/auths) cryptographic attestation verification via WASM.
6
+
A drop-in web component that verifies [Auths](https://github.com/bordumb/auths) decentralized identities — the open-source equivalent of GitHub's green "Verified" badge. Point it at any repository that uses Auths, and it cryptographically verifies the identity chain in the browser via WASM.
1. Call the GitHub API to read the repository's `refs/auths/` identity data
37
+
2. Extract the public key from the identity's `did:key`
38
+
3. Load the WASM verification engine
39
+
4. Cryptographically verify the full attestation chain
40
+
5. Display a badge showing the result (Verified, Invalid, Expired, etc.)
41
+
42
+
**Prerequisite:** The repository owner must have set up an Auths identity with [`auths init`](https://github.com/bordumb/auths). If the repo doesn't have Auths identity data, the widget will show an error.
43
+
44
+
**Supported forges:** GitHub and Gitea (including self-hosted). GitLab is not supported for auto-resolve because its API does not expose custom Git refs — use manual mode instead.
|`auto-verify`| boolean |`true`| Verify on connect/attribute change |
69
-
70
-
When `repo` is set, the widget auto-resolves `attestations` and `public-key` from the forge before running WASM verification. GitHub and Gitea are supported. GitLab does not expose custom Git refs — use manual attributes for GitLab repos.
If you already have the attestation data (e.g., from a CI pipeline, from a GitLab repo, or for offline verification), you can supply it directly instead of using `repo`:
Available properties: `--auths-{state}-bg`, `--auths-{state}-fg`, `--auths-{state}-border` for each state (`verified`, `invalid`, `expired`, `revoked`, `error`, `loading`, `idle`), plus `--auths-font-family`, `--auths-font-size`, `--auths-border-radius`, `--auths-detail-border-radius`.
109
158
159
+
## How It Works
160
+
161
+
When you set `repo="https://github.com/user/repo"`:
162
+
163
+
1. The widget parses the URL and detects the forge (GitHub, Gitea, or GitLab)
164
+
2. It calls the forge's REST API to list Git refs under `refs/auths/`
165
+
3. It reads `identity.json` from `refs/auths/identity` to get the controller DID
166
+
4. It extracts the Ed25519 public key from the `did:key:z...` identifier (pure TypeScript, no WASM needed)
167
+
5. It reads `attestation.json` from each device ref under `refs/auths/devices/nodes/`
168
+
6. It loads the WASM verification engine and cryptographically verifies the attestation chain
169
+
7. It renders the result as a badge
170
+
171
+
The resolver layer uses dynamic imports — if you only use manual `attestation`/`public-key` attributes, the resolver code is never loaded (zero bundle size impact).
172
+
110
173
## Development
111
174
112
175
### Prerequisites
@@ -154,28 +217,14 @@ Opens the examples directory with hot reload via Vite.
154
217
### Production build
155
218
156
219
```bash
157
-
# Build WASM first
158
220
npm run build:wasm
159
-
160
-
# Build both full (inlined WASM) and slim (split WASM) bundles
161
221
npm run build
162
222
```
163
223
164
224
Outputs:
165
-
-`dist/auths-verify.mjs` — single file with WASM base64-inlined (~100-200KB gzipped)
225
+
-`dist/auths-verify.mjs` — single file with WASM base64-inlined
0 commit comments