Skip to main content

Module wire

Module wire 

Source
Expand description

The JSON shapes the XRPC routes read and write.

These types exist separately from the engine’s types on purpose. The engine speaks OffsetDateTime and Vec<u8>; the wire speaks RFC 3339 and hex. Keeping the conversion in one place means a field can be renamed in the engine without silently renaming it for every client.

Structs§

AccountSummary
One entry in the listAccounts response.
ApplyWritesRequest
Body of com.atproto.repo.applyWrites.
ApproveAuthorizationRequest
Body of bot.did.approveAuthorization.
BlobsView
The blobs member of StatsResponse: this deployment’s blobs, by the state each one is in.
CreateAccountRequest
Body of bot.did.createAccount.
CreateRecordRequest
Body of com.atproto.repo.createRecord.
CreateRecordResponse
Response of com.atproto.repo.createRecord.
DeclineAuthorizationRequest
Body of bot.did.declineAuthorization.
DeleteRecordRequest
Body of com.atproto.repo.deleteRecord.
DescribeRepoQuery
Query of com.atproto.repo.describeRepo.
DescribeRepoResponse
Response of com.atproto.repo.describeRepo.
DescribeServerResponse
Response of com.atproto.server.describeServer.
DidRequest
Body of bot.did.deleteAccount, and of the freeze and deactivate routes and their inverses.
Fragment
Text for one slot of a pool’s naming scheme.
GetBlobQuery
Query of com.atproto.sync.getBlob.
GetRecordQuery
Query of com.atproto.repo.getRecord.
GetRecordResponse
Response of com.atproto.repo.getRecord.
GetRepoQuery
Query of com.atproto.sync.getRepo.
LedgerQuery
Query of bot.did.getAccountLedger.
LifecycleLine
What this deployment is doing right now, for a reader with no credential.
ListBlobsQuery
Query of com.atproto.sync.listBlobs.
ListRecordsQuery
Query of com.atproto.repo.listRecords.
ListReposQuery
Query of com.atproto.sync.listRepos.
ParkKeyRequest
Body of bot.did.parkKey.
ParkedKeyQuery
Query of bot.did.describeParkedKey.
PolicyBindingView
One bot.did.policyBinding record in force, and whom it reaches.
PolicyRecordView
One bot.did.policy record in force.
PolicyRefusalView
One record a build would not honour, and why.
PolicyView
The policy member of StatsResponse.
PutRecordRequest
Body of com.atproto.repo.putRecord.
RecordView
One entry in the listRecords response.
SessionQuery
Query of bot.did.createSession.
StatsResponse
Response of bot.did.stats.
Swap
The compare-and-swap fields, as they arrive on the wire.
SyncGetRecordQuery
Query of com.atproto.sync.getRecord.
TallyView
How many blobs, and what they occupy.
TreeView
The tree member of StatsResponse: one field per [tree] key, spelled the way the key is.

Enums§

AccountProof
What the account’s own DID document offers a stranger as proof of being it, beside the #atproto key this server signs its commits with.
EdgeState
Whether the edge from an account to its operator still stands.
RepoWrite
One operation in a com.atproto.repo.applyWrites batch.
WriteResult
One entry in the applyWrites results, one per write, in order.

Constants§

DEFAULT_REPO_LIMIT
The default page size com.atproto.sync.listRepos declares.
MAX_APPLY_WRITES
The most writes one com.atproto.repo.applyWrites batch may carry.
MAX_LIST_LIMIT
The most records listRecords will return in one answer.
MAX_REPO_LIMIT
The largest page com.atproto.sync.listRepos declares.

Functions§

parse_kind
The kind a request names, or a 400 naming what it accepts.
parse_swap_cid 🔒
Decodes a swap field, or refuses the request.
percent_decode 🔒
Percent-decoding, with + as a space, as a query string is written.
present 🔒
Reads a field that may be present and null.
record_uri
The at:// URI naming one record.
refuse_skipped_validation
The validate flag, which is atproto’s own name for the three stances.
repeated
Every value given for key in a raw query string, in the order they appear.
require_known_lexicon
The pre-check validate: true asks for, which is the explicit stance for one request.