MCPcopy Index your code
hub / github.com/did-method-plc/did-method-plc

github.com/did-method-plc/did-method-plc @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
262 symbols 633 edges 62 files 0 documented · 0% updated 5d ago★ 32529 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DID PLC Method (did:plc)

DID PLC is a self-authenticating DID which is strongly-consistent, recoverable, and allows for key rotation.

An example DID is: did:plc:ewvi7nxzyoun6zhxrhs64oiz

Control over a did:plc identity rests in a set of reconfigurable rotation keys pairs. These keys can sign update operations to mutate the identity (including key rotations), with each operation referencing a prior version of the identity state by hash. Each identity starts from an initial genesis operation, and the hash of this initial object is what defines the DID itself (that is, the DID URI identifier string). A central directory server collects and validates operations, and maintains a transparent log of operations for each DID.

This git repository contains a TypeScript reference implementation of the method (@did-plc/lib) and a directory server @did-plc/server, both in the package/ directory. The go-didplc/directory is intended to hold a golang implementation.

Motivation

Bluesky Social PBC developed DID PLC when designing the AT Protocol (atproto) because we were not satisfied with any of the existing DID methods. We wanted a strongly consistent, highly available, recoverable, and cryptographically secure method with fast and cheap propagation of updates.

PLC stands for "Public Ledger of Credentials". We expect to evolve the system (in a backwards-compatible manner) into something less centralized - likely a permissioned DID consortium. That being said, we do intend to support did:plc in the current form until after any successor is deployed, with a reasonable grace period. We would also provide a migration route to allow continued use of existing did:plc identifiers.

How it works

See the specification.

License

This project is dual-licensed under MIT and Apache 2.0 terms:

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Downstream projects and users may chose either license, or both, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.

Bluesky Social PBC has committed to a software patent non-aggression pledge. For details see the original announcement.

Extension points exported contracts — how you extend this code

PlcDatabase (Interface)
(no doc) [4 implementers]
packages/server/src/db/types.ts
SequencerEmitter (Interface)
(no doc) [1 implementers]
packages/server/src/sequencer/sequencer.ts
Request (Interface)
(no doc)
packages/server/src/types.ts
IncomingMessage (Interface)
(no doc)
packages/server/src/types.ts
DidsTable (Interface)
(no doc)
packages/server/src/db/types.ts

Core symbols most depended-on inside this repo

create
called by 38
packages/server/src/index.ts
on
called by 37
packages/server/src/sequencer/sequencer.ts
createDid
called by 19
packages/server/tests/_util.ts
close
called by 11
packages/server/src/db/types.ts
sendOperation
called by 10
packages/lib/src/client.ts
requestSeqRange
called by 10
packages/server/src/sequencer/sequencer.ts
updateAtprotoKey
called by 9
packages/lib/src/client.ts
events
called by 9
packages/server/src/sequencer/outbox.ts

Shape

Method 122
Function 80
Class 44
Interface 8
Struct 7
Enum 1

Languages

TypeScript90%
Go10%

Modules by API surface

packages/lib/src/error.ts25 symbols
packages/lib/src/client.ts25 symbols
packages/lib/src/operations.ts19 symbols
packages/server/src/db/index.ts18 symbols
packages/server/src/sequencer/sequencer.ts15 symbols
packages/server/src/db/types.ts14 symbols
packages/server/src/db/leader.ts14 symbols
website/server.go12 symbols
packages/server/src/sequencer/outbox.ts11 symbols
packages/server/src/db/mock.ts11 symbols
packages/server/src/sequencer/sequencer-leader.ts8 symbols
packages/server/src/context.ts8 symbols

Datastores touched

plc_devDatabase · 1 repos
postgresDatabase · 1 repos

For agents

$ claude mcp add did-method-plc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact