Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 513 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 513 Bytes

@atcute/did-plc

Note

not yet published.

lightweight did:plc utilities library, currently only provides type definitions and basic validations around the audit log.

import { defs, validateIndexedOperationLog } from '@atcute/did-plc';

const did = `did:plc:ragtjsm2j2vknwkz3zp4oxrd`;

const response = await fetch(`https://plc.directory/${did}/log/audit`);
const json = await response.json();

const logs = defs.indexedOperationLog.parse(json);
await validateIndexedOperationLog(did, logs);