refactor(auth): export resolvePds for reuse
This commit is contained in:
@@ -14,7 +14,7 @@ function decodeJwtPayload(token: string): JwtPayload {
|
||||
return JSON.parse(atob(payload));
|
||||
}
|
||||
|
||||
async function resolvePds(did: string): Promise<string> {
|
||||
export async function resolvePds(did: string): Promise<string> {
|
||||
const res = await fetch(`https://plc.directory/${did}`);
|
||||
if (!res.ok) throw new Error(`Failed to resolve DID: ${res.status}`);
|
||||
const doc: DidDocument = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user