0.1.6 • Published 11 months ago

@atcute/did-plc v0.1.6

Weekly downloads
-
License
0BSD
Repository
github
Last release
11 months ago

@atcute/did-plc

validations, type definitions and schemas for did:plc operations

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);