@zanii/embed
v0.1.0
Published
Drop a "Verified by Zanii" badge onto any website - framework-free, zero-dependency SVG + snippet builders linking to public verify and agent-profile pages.
Readme
@zanii/embed
Drop a "Verified by Zanii" badge onto any website — a press page, an agent's marketing site, a live-podcast overlay. Framework-free, zero-dependency string builders: a shields-style SVG, an agent-profile badge, and a copy-paste snippet.
npm install @zanii/embedUsage
import { agentBadge, badgeSVG, proofBadgeSVG, embedSnippet } from '@zanii/embed';
// a plain badge
badgeSVG({ label: 'zanii', message: 'verified', color: 'green' }); // → <svg …>
// a badge linking to the agent's public profile
const { svg, html, profileUrl } = agentBadge({ did });
// pass/fail badge for a single proof
proofBadgeSVG({ ok: true }); // → green "proven"
// copy-paste HTML for marketing
console.log(embedSnippet({ did }));Everything is a pure function returning a string — render it on a server, in a build step, or in the browser. All interpolated text is escaped, so an untrusted DID or label can't break out of the markup.
Changelog
- 0.1.0 — initial release:
badgeSVG,agentBadge,proofBadgeSVG,embedSnippet.
License
Apache-2.0.
