a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: flesh out identity READMEs a little bit

Mary 8f29c616 9edfda26

+12 -9
+10 -7
packages/identity/did-plc/README.md
··· 21 21 const response = await fetch(`https://plc.directory/${did}/log/audit`); 22 22 const json = await response.json(); 23 23 24 - const logs = defs.indexedOperationLog.parse(json); 24 + const logs = defs.indexedEntryLog.parse(json); 25 25 const { canonical, nullified } = await processIndexedEntryLog(did, logs); 26 26 ``` 27 27 ··· 41 41 ```ts 42 42 import { isDisputePeriodActive, getDisputeCandidates } from '@atcute/did-plc'; 43 43 44 - // check if an operation can still be disputed (72-hour window) 45 - if (isDisputePeriodActive(operation)) { 46 - // operation is still within the recovery window 44 + // assuming `canonical` from processIndexedEntryLog result above 45 + 46 + // find operations that a rotation key can dispute 47 + const candidates = getDisputeCandidates(canonical, 'did:key:z...'); 48 + 49 + // check if a specific operation can still be disputed (72-hour window) 50 + const entry = canonical.at(-1); 51 + if (entry && isDisputePeriodActive(entry)) { 52 + // entry is still within the dispute window 47 53 } 48 - 49 - // find operations that a key can dispute 50 - const candidates = getDisputeCandidates(canonicalLog, rotationKey); 51 54 ```
+1 -1
packages/identity/identity-resolver/README.md
··· 208 208 209 209 ```ts 210 210 const plcResolver = new PlcDidDocumentResolver({ 211 - plcUrl: 'https://plc.wtf', // mirror of plc.directory 211 + apiUrl: 'https://plc.wtf', // mirror of plc.directory 212 212 }); 213 213 ``` 214 214
+1 -1
packages/identity/identity/lib/methods/web.ts
··· 10 10 11 11 /** 12 12 * checks if input is a did:web identifier, note that you should probably use 13 - * `isAtprotoDidWeb` for atproto-related cases as atproto only supports a subset 13 + * `isAtprotoWebDid` for atproto-related cases as atproto only supports a subset 14 14 * of the did:web specification (namely, no custom paths) 15 15 */ 16 16 export const isWebDid = (input: string): input is Did<'web'> => {