MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getCredentialBadgeUrl

Function getCredentialBadgeUrl

server/src/services/certifier-client.ts:109–116  ·  view source on GitHub ↗
(credentialId: string)

Source from the content-addressed store, hash-verified

107 * Looks for a design with "badge" in its name, falls back to the first design.
108 */
109export async function getCredentialBadgeUrl(credentialId: string): Promise<string | null> {
110 const designs = await getCredentialDesigns(credentialId);
111 if (!designs.length) return null;
112
113 const badge = designs.find(d => d.name.toLowerCase().includes('badge')) || designs[0];
114 const png = badge.previews.find(p => p.format === 'png');
115 return png?.url || null;
116}
117
118/**
119 * Check whether Certifier integration is configured.

Callers 2

issueCertifierBadgeFunction · 0.85

Calls 1

getCredentialDesignsFunction · 0.85

Tested by

no test coverage detected