Skip to main content

Module record

Module record 

Source
Expand description

The bot.did.operator record a claim writes, the key it is written at, and the claim a reader parses it back into.

One builder, so a claim written from the command line and a claim written from the policy page are the same record: the same fields in the same order, at the same key. One parser, OperatorClaim::from_json, so the server polling for its own standing and a verifier checking somebody else’s read it the same way.

Structs§

Allowance
One creates entry: who may create beneath the subject, and what.
OperatorClaim
One bot.did.operator record read out of the operator’s repository.

Enums§

Credential
One way a process logs in to the hosting server as an account.
Scope
Which accounts an allowance covers.

Constants§

COLLECTION
The lexicon this record is written under. See lexicons/bot/did/operator.json.
CREDENTIAL_COLLECTION
The collection an account’s credentials are written under. See lexicons/bot/did/credential.json.
OIDC_IDENTITY_TYPE
The $type of an OpenID Connect identity credential.
PUBLIC_KEY_TYPE
The $type of a key credential.

Functions§

credential_record
The record body the server writes for one of did’s credentials, field for field matching lexicons/bot/did/credential.json and Credential::from_record.
key_fingerprint
The fingerprint a key is named by in a record and on a screen: SHA256: and the unpadded base64url digest of the multibase text, the way OpenSSH shows a key.
operator_record
The record body a claim writes, field for field matching lexicons/bot/did/operator.json and OperatorClaim::from_json: subject and createdAt, plus the $type every atproto record carries, and creates only when there is something to say.
record_key
The record key a claim on subject is written at: the subject’s authority as its own DID spells it, decoded.