Skip to main content

gRPC API

A Polycentric server exposes its API as gRPC services in the polycentric.v2 package, served as gRPC (HTTP/2 cleartext) and gRPC-Web on one port (3000 by default, see Host a Server).

The reference below is generated when this site is built from the .proto files in protos/polycentric/v2, so it matches the checked-in definitions. Every server also serves the reference for its own build at /docs, generated from gRPC reflection.

Calling a method​

  • Path. A method is POST /{package}.{Service}/{Method}, for example https://srv.harbor.social/polycentric.v2.FeedsService/GetExploreFeed.
  • Encoding. Requests and responses are binary protobuf messages. The Try it out panels below take proto3 JSON (bytes fields are base64, 64-bit integers may be strings), encode it, and send a real gRPC-Web request from your browser to the selected server.
  • Authentication. Methods that act for an identity expect a JWT in the authorization header, see Server Authentication. Push notification registration instead takes a SignedMessage envelope signed by the device's key pair.
  • Reflection. Servers enable gRPC reflection, so tools like grpcurl can list and call methods without the proto files:
grpcurl -plaintext localhost:3000 list
grpcurl -plaintext -d '{"identity": "<identity>"}' localhost:3000 \
polycentric.v2.ProfileService/GetProfile

The messages carried by events (posts, follows, identity documents and so on) are explained in Data Model. Blob bodies are downloaded over plain HTTP, see the HTTP endpoints.

ContentService​

polycentric.v2.ContentService in content.proto

SyncContent​

Synchronises events from a client to the server

POST /polycentric.v2.ContentService/SyncContent

RequestSyncContentRequest

gRPC requests

Field
Type
Description
digest

Digest that was created from the serialized content_bytes

content_bytes
bytes

Serialized Content message

ResponseSyncContentResponse

No fields.

Try it out

UploadBlob​

Uploads a blob. If the blob is not referenced by an event within a time window, it will be deleted. Blob bodies are served back over plain HTTP at GET /blob/{digest}.

POST /polycentric.v2.ContentService/UploadBlob

RequestUploadBlobRequest

Request message for uploading a blob

Field
Type
Description
blob

Reference message of the blob (mime type, content digest).

body
bytes

Body (content) of the blob

ResponseUploadBlobResponse

No fields.

Try it out

UrlInfo​

Fetches a URL server-side and returns its link preview metadata.

POST /polycentric.v2.ContentService/UrlInfo

RequestUrlInfoRequest

Request message for fetching link metadata for a URL.

Field
Type
Description
url
string

The URL to fetch metadata for.

ResponseUrlInfoResponse

Response for UrlInfo: the fetched link-preview metadata.

Field
Type
Description
title
optional string
description
optional string
image
optional string
Try it out

EventSyncService​

Sync between clients and servers

polycentric.v2.EventSyncService in events.proto

ListEvents​

Returns a list of events (with content) from the server

POST /polycentric.v2.EventSyncService/ListEvents

RequestListEventsRequest
Field
Type
Description
filters

Filters

size
optional int32

Max number of events to return

ResponseListEventsResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
Try it out

PutEvents​

Add events (with content) from a client to the server

POST /polycentric.v2.EventSyncService/PutEvents

RequestPutEventsRequest
Field
Type
Description
event_bundles
repeated
ResponsePutEventsResponse
Field
Type
Description
errors
repeated

One entry per event the server could not store. Any error in here means the event was not stored.

Empty when every event in the request was accepted.

requested_blobs
repeated

Blobs referenced by the events that the server does not have. Client should upload these.

warnings
repeated

Zero or more entries per event that caused the content of the event not be stored, the event data is still stored. For example if this contains a warning that the event's application name is too long the event will be stored, but the application will not.

Empty when every event and its content in the request was accepted.

Try it out

ListHeads​

Returns the latest sequence number seen by the server for each (signing key, collection) for the given identity

POST /polycentric.v2.EventSyncService/ListHeads

RequestListHeadsRequest
Field
Type
Description
identity
string
ResponseListHeadsResponse
Field
Type
Description
heads
repeated

Each event key represents the greatest sequence number with the same (identity, public key, collection) known by this server

Try it out

GetReactions​

Get the reactions targeting an event.

POST /polycentric.v2.EventSyncService/GetReactions

RequestGetReactionsRequest
Field
Type
Description
target

Event key of the event to get reactions for

emoji_filter
optional string

Return only reactions with this emoji set

page_params
optional
ResponseGetReactionsResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
Try it out

GetAttributedToReactionCounts​

Get the reaction counts for an out-of-network target (e.g. a video URL).

POST /polycentric.v2.EventSyncService/GetAttributedToReactionCounts

Field
Type
Description
attributed_to

The attributed target (e.g. a video URL) to get reaction counts for.

Field
Type
Description
upvote_count
int64

The server's estimate for positive reactions on the target.

downvote_count
int64

The server's estimate for negative reactions on the target.

Try it out

FeedsService​

Curated feeds provided by servers

polycentric.v2.FeedsService in feeds.proto

GetIdentityFeed​

Posts that belong to an identity

POST /polycentric.v2.FeedsService/GetIdentityFeed

RequestGetIdentityFeedRequest
Field
Type
Description
identity
string

Identity to return the posts of

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

ResponseGetFeedResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
Try it out

GetFollowingFeed​

Get posts created by the identity themselves and all identities they follow.

POST /polycentric.v2.FeedsService/GetFollowingFeed

RequestGetFollowingFeedRequest
Field
Type
Description
follower_identity
string

Identity of the follower to return the feed for

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

sort_by
optional
ResponseGetFeedResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
Try it out

GetRecommendedFeed​

Get posts created by, reacted to, reposted by, quoted or replied to by the identity themselves and all identities they follow.

POST /polycentric.v2.FeedsService/GetRecommendedFeed

RequestGetFollowingFeedRequest
Field
Type
Description
follower_identity
string

Identity of the follower to return the feed for

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

sort_by
optional
ResponseGetFeedResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
Try it out

GetExploreFeed​

Get posts by any identity.

POST /polycentric.v2.FeedsService/GetExploreFeed

RequestGetExploreFeedRequest
Field
Type
Description
identity
optional string

Identity of the caller to return relevant posts for

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

sort_by
optional
ResponseGetFeedResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
Try it out

GetPost​

Get a single post.

POST /polycentric.v2.FeedsService/GetPost

RequestGetPostRequest

Request candidate posts matching these filters.

Field
Type
Description
identity
string
sequence
uint64
omit_labels
repeated string
ResponseGetPostResponse

All candidate post events matching the request's filter.

Field
Type
Description
candidates
repeated
event_hints
repeated
Try it out

GetPostThread​

Replies to a post.

POST /polycentric.v2.FeedsService/GetPostThread

RequestGetPostThreadRequest
Field
Type
Description
event_key

Parent post to return the thread for

limit
int32
omit_labels
repeated string

Label values for which the requester does not want to see content

ResponseGetPostThreadResponse
Field
Type
Description
thread
repeated
event_hints
repeated
Try it out

GetAttributionFeed​

Posts attributed to the same target (e.g. all posts about a URL)

POST /polycentric.v2.FeedsService/GetAttributionFeed

RequestGetAttributionFeedRequest
Field
Type
Description
attributed_to

Attribution to match posts against. A post is included when any of its attributed_to entries is similar to this one — for a link, similar means the same URL, ignoring other Link metadata.

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

ResponseGetFeedResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
Try it out

GraphService​

polycentric.v2.GraphService in graph_service.proto

ListFollowing​

Follow events authored by identity — who they follow.

POST /polycentric.v2.GraphService/ListFollowing

RequestListFollowingRequest
Field
Type
Description
identity
string

Identity whose followed identities are returned.

page_params
optional
ResponseListFollowsResponse
Field
Type
Description
event_bundles
repeated

The active (non-tombstoned) Follow events, newest first.

page_info
optional
event_hints
repeated

Relevant events for the users in the follow events

Try it out

ListFollowers​

Follow events targeting identity — who follows them.

POST /polycentric.v2.GraphService/ListFollowers

RequestListFollowersRequest
Field
Type
Description
identity
string

Identity whose followers are returned.

page_params
optional
ResponseListFollowsResponse
Field
Type
Description
event_bundles
repeated

The active (non-tombstoned) Follow events, newest first.

page_info
optional
event_hints
repeated

Relevant events for the users in the follow events

Try it out

SuggestFollow​

Suggestion what identities to follow.

POST /polycentric.v2.GraphService/SuggestFollow

RequestSuggestFollowRequest
Field
Type
Description
page_params
optional
ResponseSuggestFollowResponse
Field
Type
Description
suggestions
repeated
page_info
optional
event_hints
repeated

Contains profile update events for the suggested to-follow identities (FollowSuggestion.suggestion). Note that the identity events for the to-follow identities can be found in the suggestions.

Also contains identity, profile update and follow events for the suggested the identities of those who already follow those identities (FollowSuggestion.followers).

Try it out

IdentityService​

Identity moderation APIs. The caller is authenticated by its bearer JWT (see auth_middleware); the ban endpoints require a moderator.

polycentric.v2.IdentityService in identity_service.proto

IsModerator​

Returns whether the calling identity is a moderator on this server.

POST /polycentric.v2.IdentityService/IsModerator

RequestIsModeratorRequest

IsModerator: no extra fields.

No fields.

ResponseIsModeratorResponse
Field
Type
Description
is_moderator
bool
Try it out

SetBanStatus​

Bans or unbans an identity on this server.

POST /polycentric.v2.IdentityService/SetBanStatus

RequestSetBanStatusRequest

SetBanStatus: ban or unban an identity.

Field
Type
Description
target_identity
string

Identity key being banned or unbanned.

banned
bool

Desired ban state: true to ban, false to unban.

ResponseSetBanStatusResponse

No fields.

Try it out

IsBanned​

Returns whether an identity is banned on this server.

POST /polycentric.v2.IdentityService/IsBanned

RequestIsBannedRequest

IsBanned: query whether an identity is banned.

Field
Type
Description
target_identity
string

Identity key being asked about.

ResponseIsBannedResponse
Field
Type
Description
is_banned
bool
Try it out

ListBans​

Lists the identities banned on this server.

POST /polycentric.v2.IdentityService/ListBans

RequestListBansRequest

ListBans: paginated, optionally filtered list of banned identities.

Field
Type
Description
limit
optional uint32

Max entries to return; the server clamps to its own bounds.

after
optional string

Opaque cursor from a previous response's page_info.end_cursor.

query
optional string

Case-insensitive prefix filter: keep only identities beginning with this value.

ResponseListBansResponse
Field
Type
Description
banned_identities
repeated string

Identity keys banned on this server, most recently banned first.

page_info
Try it out

NotificationService​

Notifications for an identity. ListNotifications, AcknowledgeNotifications and SubscribeUnreadNotificationCount are served by the server. The push registration methods are served by a push-notifications service; a server without one answers them with NOT_FOUND.

polycentric.v2.NotificationService in notifications.proto

ListNotifications​

Returns notifications for a user

POST /polycentric.v2.NotificationService/ListNotifications

RequestListNotificationsRequest
Field
Type
Description
identity
string
first
optional uint32

Return the 1 X number of notifications

after
optional string

Return notifications after a cursor

omit_labels
repeated string

Label values for which the requester does not want to see content

ResponseListNotificationsResponse
Field
Type
Description
notifications
repeated
event_hints
repeated

Events that help the client resolve with fewer network calls

page_info
Try it out

AcknowledgeNotifications​

Marks the authenticated identity's notifications up to last_seen as read

POST /polycentric.v2.NotificationService/AcknowledgeNotifications

The identity comes from the auth token

Field
Type
Description
last_seen

Trigger event of the newest notification the client has shown. Every notification up to it is marked read, later ones stay unread. A server that does not hold that notification marks everything it has

Empty: success is signalled by the call not failing

No fields.

Try it out

SubscribeUnreadNotificationCount​

Streams the unread notification count of the authenticated identity, now and whenever it changes

POST /polycentric.v2.NotificationService/SubscribeUnreadNotificationCountserver streaming

Empty: the identity comes from the auth token

No fields.

Unread count for the authenticated identity on this server, sent on subscribe and again whenever it changes

Field
Type
Description
count
uint32

Notifications newer than the last acknowledgement, capped by the server

Try it outStreaming methods cannot be called from this page.

RegisterPushNotifications​

This endpoint expects a signed RegisterPushNotificationRequest message

POST /polycentric.v2.NotificationService/RegisterPushNotifications

RequestSignedMessage

Envelope for requests authenticated with a key pair instead of a bearer token.

Field
Type
Description
signature
bytes

Signature by public_key over message_bytes.

message_bytes
bytes

The serialized request message, e.g. a RegisterPushNotificationRequest.

public_key

No fields.

Try it out

UnregisterPushNotifications​

This endpoint expects a signed UnregisterPushNotificationRequest message

POST /polycentric.v2.NotificationService/UnregisterPushNotifications

RequestSignedMessage

Envelope for requests authenticated with a key pair instead of a bearer token.

Field
Type
Description
signature
bytes

Signature by public_key over message_bytes.

message_bytes
bytes

The serialized request message, e.g. a RegisterPushNotificationRequest.

public_key

No fields.

Try it out

PairingService​

Pairing APIs used for device pairing: linking a new device (the claimer) to an existing identity (the issuer).

The issuer creates a session with PutPairingSession by uploading its first SignedIssuerState. The session is addressed by the SHA-256 of the serialized PairingSessionDigest inside that state. The issuer shares a PairingInfo (server URL and digest hash) with the claimer out-of-band, for example as a QR code. The claimer fetches the session with GetPairingSession, checks that the digest hashes to the shared value and that the issuer state is signed by issuer_signer, then registers its key with JoinPairingSession. The issuer polls GetPairingSession for claimers, authorizes the claimer's key in a new identity event and uploads it in its next issuer state, which the claimer polls for.

polycentric.v2.PairingService in pairing_service.proto

PutPairingSession​

Creates or updates a pairing session after authorizing the request as valid.

POST /polycentric.v2.PairingService/PutPairingSession

RequestPutPairingSessionRequest

Wrapper request for PutPairingSession RPC.

Field
Type
Description
issuer_state
ResponsePutPairingSessionResponse

Wrapper response for PutPairingSession RPC.

Field
Type
Description
session_state
Try it out

GetPairingSession​

Fetch a pairing session.

POST /polycentric.v2.PairingService/GetPairingSession

RequestGetPairingSessionRequest

Request payload for fetching a pairing session.

Field
Type
Description
digest_sha256
bytes
ResponseGetPairingSessionResponse

Wrapper response for GetPairingSession RPC.

Field
Type
Description
session_state
Try it out

JoinPairingSession​

Registers a claimer to a pairing session.

POST /polycentric.v2.PairingService/JoinPairingSession

RequestJoinPairingSessionRequest

Wrapper request for JoinPairingSession RPC.

Field
Type
Description
digest_sha256
bytes

SHA256 of the pairing session digest to join.

claimer_key

Public key that the claimer wishes to join with.

ResponseJoinPairingSessionResponse

Wrapper response for JoinPairingSession RPC.

Field
Type
Description
session_state
Try it out

ProfileService​

polycentric.v2.ProfileService in profile_service.proto

GetProfile​

A profile with its aggregate counters.

POST /polycentric.v2.ProfileService/GetProfile

RequestGetProfileRequest
Field
Type
Description
identity
string
ResponseGetProfileResponse
Field
Type
Description
event_bundles
repeated

The identity's latest profile events.

event_hints
repeated

Side information needed to validate the bundles (the identity's key chain).

following_count
uint64

Distinct identities this identity follows.

followers_count
uint64

Distinct identities following this identity.

Try it out

SearchService​

polycentric.v2.SearchService in search.proto

SearchUsers​

Search users.

POST /polycentric.v2.SearchService/SearchUsers

RequestSearchUsersRequest
Field
Type
Description
query
string
sort_by
optional
page_params
optional
ResponseSearchUsersResponse
Field
Type
Description
results
repeated

Relevant search results.

page_info
optional
event_hints
repeated

Relevant events for the events in the search results.

Try it out

SearchPosts​

Search posts.

POST /polycentric.v2.SearchService/SearchPosts

RequestSearchPostsRequest
Field
Type
Description
query
string
sort_by
optional
page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content.

ResponseSearchPostsResponse
Field
Type
Description
results
repeated

Relevant search results.

page_info
optional
event_hints
repeated

Relevant events for the events in the search results.

Try it out

ServerService​

polycentric.v2.ServerService in server.proto

GetInfo​

Returns relevant information about a server

POST /polycentric.v2.ServerService/GetInfo

RequestGetServerInfoRequest

No fields.

ResponseGetServerInfoResponse
Field
Type
Description
server_info
Try it out

VerificationsService​

polycentric.v2.VerificationsService in verifications_service.proto

ListVerificationClaims​

VerificationClaim events published by an identity, with each claim's targets and verifies.

POST /polycentric.v2.VerificationsService/ListVerificationClaims

RequestListVerificationClaimsRequest
Field
Type
Description
claimed_by_identity
string
ResponseListVerificationClaimsResponse
Field
Type
Description
claim_bundles
repeated
event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

Try it out

ListVerificationTargets​

VerificationTarget events for a claim: who has been asked to verify.

POST /polycentric.v2.VerificationsService/ListVerificationTargets

RequestListVerificationTargetsRequest
Field
Type
Description
claim_event_key
ResponseListVerificationTargetsResponse
Field
Type
Description
event_bundles
repeated

VerificationTarget events for the claim, published by the claim's owner — who has been asked to verify.

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

Try it out

ListVerificationVerifies​

VerificationVerify events for a claim: who has verified it.

POST /polycentric.v2.VerificationsService/ListVerificationVerifies

Field
Type
Description
claim_event_key
Field
Type
Description
event_bundles
repeated

VerificationVerify events for the claim.

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

Try it out

ListTargetedVerificationClaims​

Claims whose owner asked target_identity for verification, with each claim's targets and verifies.

POST /polycentric.v2.VerificationsService/ListTargetedVerificationClaims

Field
Type
Description
target_identity
string
Field
Type
Description
claim_bundles
repeated

Claims whose owner targeted target_identity. The 'inbox'.

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

Try it out

ResolveVerifiedClaims​

Reverse lookup: claims matching the given schema + field values that are verified by a trusted identity, with each claim's targets and verifies.

POST /polycentric.v2.VerificationsService/ResolveVerifiedClaims

RequestResolveVerifiedClaimsRequest

Reverse lookup: find the identities that claim something, starting from the claim's field values rather than from an identity. Answers "who claims this (e.g. this platform channel, this occupation), verified by a trusted party?" — the inverse of the identity-keyed queries above. Works for any claim type.

Field
Type
Description
schema_digest

Optional type scope: restrict to claims of exactly this schema, by the schema's content digest. Unset (or empty value) = any schema. This is the schema's content-addressed identifier; it only groups cross-client when claimants pin identical canonical schema bytes.

fields
map<string, string>

Field key/value pairs a claim's (STRING) fields must contain, matched by JSONB containment. A claim matches only when it contains every supplied pair (AND); it may carry additional fields. A claim missing any supplied field does not match. May be empty when schema_digest scopes the query.

verified_by_identities
repeated string

Only return claims that carry a VerificationVerify authored by one of these identities (the trust roots). Required and non-empty — this is what makes a match "verified" rather than merely "claimed".

ResponseResolveVerifiedClaimsResponse
Field
Type
Description
claim_bundles
repeated

Matching claims, each wrapped with its targets and verifies (the verifies include at least one authored by a trusted identity).

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

Try it out

Schemas​

Every message and enum of the polycentric.v2 package, by file. Type names in the field lists above link here.

backup.proto​

IdentityBackupMessage to hex-encode and store securely for account recovery.

Message to hex-encode and store securely for account recovery.

Field
Type
Description
identity_key
string

The hex string of the identity.

identity_chain
repeated

The signed events for the canonical identity chain at the time of creating this backup.

recovery_key

The private key corresponding to the recovery public key in the latest identity document.

common.proto​

PageInfoReturned by paginated feeds to aid in future queries.

Returned by paginated feeds to aid in future queries.

Field
Type
Description
start_cursor
string

Opaque string that can be included in a request to the server to receive the previous page of data.

end_cursor
string

Opaque string that can be included in a request to the server to receive the next page of data.

has_previous_page
bool

True if there is likely more data preceding start_cursor.

has_next_page
bool

True if there is likely more data following end_cursor.

PageParamsSent by clients to servers for fetching paginated data.

Sent by clients to servers for fetching paginated data.

Field
Type
Description
limit
optional int32

Max events to return.

backward_token
optional string

Request data preceding this start cursor in the feed.

forward_token
optional string

Request data following this end cursor in the feed.

ContentDigest
Field
Type
Description
type
value
bytes

We hash the serialized bytes

ContentDigestTypeenum
CONTENT_DIGEST_TYPE_UNSPECIFIED
= 0
CONTENT_DIGEST_TYPE_SHA256
= 1

content.proto​

ContentContent of the event

Content of the event

Field
Type
Description
one of (content_body)
post
delete
follow
block
reaction
attributed_to_reaction
profile_update
identity
repost
report
labels
verification_claim

Verifications (see verifications.proto)

verification_verify
verification_target
SerializedContentSerialized content.

Serialized content. This is what we do the ContentDigest / Checksum on.

Field
Type
Description
content_bytes
bytes
Post
Field
Type
Description
text
string

Main text content of the post

reply
optional
images
repeated

Multiple images

quote
optional
links
repeated

Link previews for URLs in the post text

labels
repeated string

Labels the creator / client applies themselves

attributed_to
repeated

If any, where the post is attributed to.

AttributedTo
Field
Type
Description
one of (to)
link

Remote resource

PostReply
Field
Type
Description
root

Initial post in the reply chain.

parent

Post that is being replied to

Repost
Field
Type
Description
post
optional
DeleteWhen processed by a server it should check if the data is referenced by any events If the Content is linked elswhere, the DELETE is ignored and the server should keep the data.

When processed by a server it should check if the data is referenced by any events If the Content is linked elswhere, the DELETE is ignored and the server should keep the data. If the Content is not linked elsewhere then it can be deleted / purged by the server. Essentially, a DELETE means; Ignore (or forget about) the contents of a previous event.

Field
Type
Description
event_key

Event key to be deleted

Follow
Field
Type
Description
identity
string
Block
Field
Type
Description
identity
string
Reaction
Field
Type
Description
event_key

Key of the event being reacted to

emoji
optional string

Optional emoji

positive
bool

Upvote = true. Downvote = false.

AttributedToReactionA reaction targeting something that is not an in-network event — e.g. a URL (reacting to a video).

A reaction targeting something that is not an in-network event — e.g. a URL (reacting to a video). The out-of-network counterpart of Reaction.

Field
Type
Description
attributed_to

What the reaction is attributed to (e.g. a link/URL).

emoji
optional string

Optional emoji

positive
bool

Upvote = true. Downvote = false.

ProfileUpdate
Field
Type
Description
name
optional string

A friendly display name for the user

avatar
optional

Reference to the Blob for the avatar (support multiple different sizes)

banner
optional

Reference to the Blob of a banner (support multiple different sizes)

description
optional string

Bio

alias
optional string

A domain-based alias (e.g. [email protected]) the profile claims for itself.

BlobIf an uploaded Blob is uploaded to the servers Object Storage and not then attached added to the Content repository, the server will delete from Object Storage.

If an uploaded Blob is uploaded to the servers Object Storage and not then attached added to the Content repository, the server will delete from Object Storage.

Field
Type
Description
digest

Digest/Checksum of the blob

mime_type
string
size
int64
ImageSingle image with reference to the blob

Single image with reference to the blob

Field
Type
Description
blob
width
int32
height
int32
ImageSetCollection of different variants of an image

Collection of different variants of an image

Field
Type
Description
images
repeated
Report
Field
Type
Description
event_key

Event that is being reported

category
additional_info
string
Labels
Field
Type
Description
event_key

Event that is being labeled

label_values
repeated string
SyncContentRequestgRPC requests

gRPC requests

Field
Type
Description
digest

Digest that was created from the serialized content_bytes

content_bytes
bytes

Serialized Content message

SyncContentResponse

No fields.

UploadBlobRequestRequest message for uploading a blob

Request message for uploading a blob

Field
Type
Description
blob

Reference message of the blob (mime type, content digest).

body
bytes

Body (content) of the blob

UploadBlobResponse

No fields.

UrlInfoRequestRequest message for fetching link metadata for a URL.

Request message for fetching link metadata for a URL.

Field
Type
Description
url
string

The URL to fetch metadata for.

UrlInfoResponseResponse for UrlInfo: the fetched link-preview metadata.

Response for UrlInfo: the fetched link-preview metadata.

Field
Type
Description
title
optional string
description
optional string
image
optional string
ReportCategoryenum
REPORT_CATEGORY_UNSPECIFIED
= 0
REPORT_CATEGORY_SPAM
= 1
REPORT_CATEGORY_CHILD_SAFETY
= 3
REPORT_CATEGORY_COPYRIGHT
= 6
REPORT_CATEGORY_SERVER_POLICY
= 7
REPORT_CATEGORY_VIOLENCE
= 8
REPORT_CATEGORY_SELF_HARM
= 9
REPORT_CATEGORY_SEXUALLY_EXPLICIT
= 10
REPORT_CATEGORY_HATE
= 11

event_key.proto​

EventKeyEventKey's are the unique identitifiers of Events

EventKey's are the unique identitifiers of Events

Field
Type
Description
collection
int32

Collection of the stream the event is connected with Reserved collections are:

1 -> Polycentric Identity
2 -> Polycentric feed
3 -> Polycentric profile
4 -> Polycentric interactions (likes etc)
5 -> Polycentric social graph (follows)
6 -> Polycentric reports
7 -> Polycentric labels
8 -> Polycentric verifications
identity
string

Identity Key (sha256 hash of the initial Identity content)

signed_by

Public key that signed the event

sequence
uint64

Sequence number of the event in the collection (our logical clock)

events.proto​

VectorClockContains the sequences (of the same event collection) that the current KeyPair is aware of.

Contains the sequences (of the same event collection) that the current KeyPair is aware of. The order of the sequences is determined by the keys listed in the relevant identity document: The rotation keys first and then the signing keys, with duplicates skipped when they appear again. Use Identity::deduplicated_keys() to get the keys in this order.

Field
Type
Description
sequence
repeated uint64
ApplicationThe application that authored an event.

The application that authored an event.

Field
Type
Description
name
string

Human-readable name, e.g. "Harbor".

id
string

Reverse-DNS package or bundle identifier, e.g. "org.futo.polycentric".

version
string

Version of the application, e.g. "1.2.0".

url
string

Website of the application, e.g. "https://harbor.social".

EventEvent messages reference, but do not include, content

Event messages reference, but do not include, content

Field
Type
Description
key

Key for the event

identity_sequence
uint64

Reference to the sequence, of the Identity Collection (1), that holds the identity document

vector_clock

Vector clock

previous_signature
bytes

Signature of the previous event signed by the same key. Assists in creating immutable collections.

content_digest

Digest of the content

created_at
uint64

Timestamp, in milliseconds, of when the event was created

previous_root
bytes

RFC 6962 Merkle root over this signer's prior signatures in this collection (leaf_count = key.sequence - 1). Lets later events attest to the writer's history; consumed by EventProof for membership verification.

application
optional

The application that created the event. Absent when unknown.

SignedEvent
Field
Type
Description
signature
bytes

Signature of events_bytes below (not the Event message)

event_bytes
bytes

Serialized representation of the Event message that is signed against

EventBundleBundle of the SignedEvent and SerializedContent messages We use SerializedContent so that the checksum of the content can be verified

Bundle of the SignedEvent and SerializedContent messages We use SerializedContent so that the checksum of the content can be verified

Field
Type
Description
signed_event
serialized_content
optional
event_proofs
repeated
meta
optional
EventProofMerkle inclusion proof: the SignedEvent in this bundle is the leaf at `leaf_index` in the tree rooted at the `EventProofTarget` identified by `target_signature`.

Merkle inclusion proof: the SignedEvent in this bundle is the leaf at leaf_index in the tree rooted at the EventProofTarget identified by target_signature.

Field
Type
Description
target_signature
bytes
leaf_index
uint64

Canonical position of this event in the target's tree.

audit_path
repeated bytes

RFC 6962 audit path: sibling hashes from leaf toward root.

EventMetadataOptional helper data that servers can include to help clients better present information to users.

Optional helper data that servers can include to help clients better present information to users.

Field
Type
Description
reply_count
optional int32

This server's estimate for how many replies a post has.

reaction_count
optional int32

This server's estimate for the total number of reactions a post has.

upvote_count
optional int32

This server's estimate for the total number of positive reactions a post has.

downvote_count
optional int32

This server's estimate for the total number of negative reactions a post has.

emoji_reactions
repeated

This server's estimate for the count for each reaction type a post has.

ReactionTallyConveys the number of times a specific reaction was given.

Conveys the number of times a specific reaction was given.

Field
Type
Description
emoji
string
positive
bool
count
int32
EventHintHints are additional events that the server provides that may be useful to the client and avoid additional network requests.

Hints are additional events that the server provides that may be useful to the client and avoid additional network requests. For example, a reply to post event could return the root/parent posts along with the most recent profile event

Field
Type
Description
event_bundle
ListEventsFilters
Field
Type
Description
collection
optional int32

Collection to filter events by

identity
string

Identity key to filter events by

signed_by
optional

Filter events to those signed by this public key

sequence_gt
optional int64

Return sequences greater than

sequence_lt
optional int64

Return sequences less than

heads
repeated

When an event matches a head's identity, collection, and signer, only return it if its sequence number is higher than the head

ListEventsRequest
Field
Type
Description
filters

Filters

size
optional int32

Max number of events to return

ListEventsResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
PutEventsRequest
Field
Type
Description
event_bundles
repeated
PutEventErrorPer-event failure reported by PutEvents.

Per-event failure reported by PutEvents. The call as a whole still succeeds — these entries are diagnostic for events the server skipped.

Field
Type
Description
event_bundle_index
uint32

Index of the failed entry in PutEventsRequest.event_bundles.

message
string

Human-readable reason mirroring the gRPC Status ingest would otherwise have returned for this event in isolation.

PutEventsResponse
Field
Type
Description
errors
repeated

One entry per event the server could not store. Any error in here means the event was not stored.

Empty when every event in the request was accepted.

requested_blobs
repeated

Blobs referenced by the events that the server does not have. Client should upload these.

warnings
repeated

Zero or more entries per event that caused the content of the event not be stored, the event data is still stored. For example if this contains a warning that the event's application name is too long the event will be stored, but the application will not.

Empty when every event and its content in the request was accepted.

ListHeadsRequest
Field
Type
Description
identity
string
ListHeadsResponse
Field
Type
Description
heads
repeated

Each event key represents the greatest sequence number with the same (identity, public key, collection) known by this server

GetReactionsRequest
Field
Type
Description
target

Event key of the event to get reactions for

emoji_filter
optional string

Return only reactions with this emoji set

page_params
optional
GetReactionsResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
GetAttributedToReactionCountsRequest
Field
Type
Description
attributed_to

The attributed target (e.g. a video URL) to get reaction counts for.

GetAttributedToReactionCountsResponse
Field
Type
Description
upvote_count
int64

The server's estimate for positive reactions on the target.

downvote_count
int64

The server's estimate for negative reactions on the target.

feeds.proto​

GetIdentityFeedRequest
Field
Type
Description
identity
string

Identity to return the posts of

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

GetFollowingFeedRequest
Field
Type
Description
follower_identity
string

Identity of the follower to return the feed for

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

sort_by
optional
GetExploreFeedRequest
Field
Type
Description
identity
optional string

Identity of the caller to return relevant posts for

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

sort_by
optional
GetFeedResponse
Field
Type
Description
event_bundles
repeated
event_hints
repeated
page_info
optional
GetPostThreadResponse
Field
Type
Description
thread
repeated
event_hints
repeated
GetPostRequestRequest candidate posts matching these filters.

Request candidate posts matching these filters.

Field
Type
Description
identity
string
sequence
uint64
omit_labels
repeated string
GetPostResponseAll candidate post events matching the request's filter.

All candidate post events matching the request's filter.

Field
Type
Description
candidates
repeated
event_hints
repeated
GetPostThreadRequest
Field
Type
Description
event_key

Parent post to return the thread for

limit
int32
omit_labels
repeated string

Label values for which the requester does not want to see content

GetAttributionFeedRequest
Field
Type
Description
attributed_to

Attribution to match posts against. A post is included when any of its attributed_to entries is similar to this one — for a link, similar means the same URL, ignoring other Link metadata.

page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content

FeedAlgorithmenum
FEED_ALGORITHM_UNSPECIFIED
= 0
FEED_ALGORITHM_FOLLOWING
= 1
FEED_ALGORITHM_SUGGESTED
= 2

graph_service.proto​

ListFollowingRequest
Field
Type
Description
identity
string

Identity whose followed identities are returned.

page_params
optional
ListFollowersRequest
Field
Type
Description
identity
string

Identity whose followers are returned.

page_params
optional
SuggestFollowRequest
Field
Type
Description
page_params
optional
ListFollowsResponse
Field
Type
Description
event_bundles
repeated

The active (non-tombstoned) Follow events, newest first.

page_info
optional
event_hints
repeated

Relevant events for the users in the follow events

SuggestFollowResponse
Field
Type
Description
suggestions
repeated
page_info
optional
event_hints
repeated

Contains profile update events for the suggested to-follow identities (FollowSuggestion.suggestion). Note that the identity events for the to-follow identities can be found in the suggestions.

Also contains identity, profile update and follow events for the suggested the identities of those who already follow those identities (FollowSuggestion.followers).

FollowSuggestion
Field
Type
Description
suggestion

Identity (event) to follow.

followers
repeated string

Identities that are following the suggested identity.

identity_service.proto​

IsModeratorRequestIsModerator: no extra fields.

IsModerator: no extra fields.

No fields.

IsModeratorResponse
Field
Type
Description
is_moderator
bool
SetBanStatusRequestSetBanStatus: ban or unban an identity.

SetBanStatus: ban or unban an identity.

Field
Type
Description
target_identity
string

Identity key being banned or unbanned.

banned
bool

Desired ban state: true to ban, false to unban.

SetBanStatusResponse

No fields.

IsBannedRequestIsBanned: query whether an identity is banned.

IsBanned: query whether an identity is banned.

Field
Type
Description
target_identity
string

Identity key being asked about.

IsBannedResponse
Field
Type
Description
is_banned
bool
ListBansRequestListBans: paginated, optionally filtered list of banned identities.

ListBans: paginated, optionally filtered list of banned identities.

Field
Type
Description
limit
optional uint32

Max entries to return; the server clamps to its own bounds.

after
optional string

Opaque cursor from a previous response's page_info.end_cursor.

query
optional string

Case-insensitive prefix filter: keep only identities beginning with this value.

ListBansResponse
Field
Type
Description
banned_identities
repeated string

Identity keys banned on this server, most recently banned first.

page_info

identity.proto​

Identity
Field
Type
Description
rotation_keys
repeated

List of the currently-active rotation keys. These keys can publish events, including identity events with updates made to the identity document.

signing_keys
repeated

List of keys that are allowed to sign events (but not change the identity content).

revocation_bounds
repeated

In order to retain valid events from a revoked keypair, we store their last known signature for each collection the key participated in.

servers

Preferred servers of this identity (where they push and pull from). Absent means the identity has not configured a server list yet and clients fall back to their defaults; present-but-empty is intentional.

recovery_key
optional

Backup key for recovering an account with no active sessions. Its only use is for producing recovery signatures.

recovery_signature
optional bytes

Signature from the recovery key in the preceding identity document. The content signed should be (identity_string, new_rotation_key).

ServerList
Field
Type
Description
urls
repeated string
RevocationBound
Field
Type
Description
revoked_key

Key that is revoked

targets
repeated

One target per collection revoked_key wrote in, anchoring proof verification at that collection's head event.

EventProofTargetPer-collection target for verifying an EventProof.

Per-collection target for verifying an EventProof.

Field
Type
Description
collection
int32
signature
bytes

Event's signature; matched by EventProof.target_signature.

root
bytes

Event's previous_root — the Merkle root proofs verify against.

leaf_count
uint64

Leaf count of the tree at root (the number of events the head's signer was aware of when they signed it).

keypair.proto​

PublicKeyPublicKeys signs all events on the polycentric network.

PublicKeys signs all events on the polycentric network. There is usually one public key per account, per device.

Field
Type
Description
key_type

Type of key used. Defaults to ED25519.

key
bytes

Value of the key

PrivateKeyThe private key corresponding to a public key.

The private key corresponding to a public key.

Field
Type
Description
key_type

Type of key used. Defaults to ED25519.

key
bytes

Value of the key

KeyTypeenum
KEY_TYPE_UNSPECIFIED
= 0
KEY_TYPE_ED25519
= 1

notifications.proto​

Notification
Field
Type
Description
trigger_event

Event that triggered the notification

target_event

Event that the notification is in relation to

kind

Kind of the notification

ListNotificationsRequest
Field
Type
Description
identity
string
first
optional uint32

Return the 1 X number of notifications

after
optional string

Return notifications after a cursor

omit_labels
repeated string

Label values for which the requester does not want to see content

ListNotificationsResponse
Field
Type
Description
notifications
repeated
event_hints
repeated

Events that help the client resolve with fewer network calls

page_info
AcknowledgeNotificationsRequestThe identity comes from the auth token

The identity comes from the auth token

Field
Type
Description
last_seen

Trigger event of the newest notification the client has shown. Every notification up to it is marked read, later ones stay unread. A server that does not hold that notification marks everything it has

AcknowledgeNotificationsResponseEmpty: success is signalled by the call not failing

Empty: success is signalled by the call not failing

No fields.

SubscribeUnreadNotificationCountRequestEmpty: the identity comes from the auth token

Empty: the identity comes from the auth token

No fields.

SubscribeUnreadNotificationCountResponseUnread count for the authenticated identity on this server, sent on subscribe and again whenever it changes

Unread count for the authenticated identity on this server, sent on subscribe and again whenever it changes

Field
Type
Description
count
uint32

Notifications newer than the last acknowledgement, capped by the server

RegisterPushNotificationRequest
Field
Type
Description
service
string

Push provider the token belongs to. expo is the only provider currently supported.

token
string

Device token issued by the push provider.

RegisterPushNotificationResponse

No fields.

UnregisterPushNotificationRequest
Field
Type
Description
service
string

Push provider the token belongs to, see RegisterPushNotificationRequest.

token
string
UnregisterPushNotificationResponse

No fields.

NotificationKindenum
NOTIFICATION_KIND_UNSPECIFIED
= 0
NOTIFICATION_KIND_FOLLOW
= 1
NOTIFICATION_KIND_REPLY
= 2
NOTIFICATION_KIND_REPOST
= 3
NOTIFICATION_KIND_REACTION
= 4
NOTIFICATION_KIND_QUOTE
= 5
NOTIFICATION_KIND_VERIFICATION_REQUEST
= 6
NOTIFICATION_KIND_VERIFICATION_COMPLETE
= 7
NOTIFICATION_KIND_MENTION
= 8

pairing_service.proto​

PairingSessionDigestImmutable state created at the start of a pairing session that uniquely identifies it.

Immutable state created at the start of a pairing session that uniquely identifies it.

Field
Type
Description
issuer_identity
string

Trusted source of truth for the identity being paired with.

issuer_signer

Each issuer state must be signed by this key and this key must be authorized for rotation.

nonce
bytes

Random bitstring to add entropy and keep session identifiers unpredictable.

initial_timestamp
int64

Timestamp in posix epoch millis. Used for expiration and preventing replay attacks.

ttl_millis
int64

The number of milliseconds after the initial timestamp for which this session is considered valid.

PairingInfoData to share out-of-band between the issuer and claimer.

Data to share out-of-band between the issuer and claimer. This means using copy/paste or a QR code.

Field
Type
Description
server
string

URL of the server that holds this pairing session.

digest_sha256
bytes

SHA256 hash of the pairing session digest.

IssuerPairingStateSigned payload from issuers that contains pairing state information.

Signed payload from issuers that contains pairing state information. Contains authenticated information about the pairing session for claimers and servers to read. Clients and servers should only obtain messages of this type from a SignedIssuerState message and must check its signature.

Field
Type
Description
session_digest
bytes

Serialized PairingSessionDigest message. Identifies the pairing session that this state belongs to. This should be kept constant throughout the session. Clients should verify that the SHA256 hash and content of this field matches what they expect.

identity_state

The most recent identity event for this identity as reported by the issuer. Claimers should verify the full identity chain before fully trusting the content of this field. Even when not fully trusted, it is still useful for:

- seeding the list of servers to query.

- deciding when to try claiming.

sequence
int64

A counter that gets incremented for each new state in this pairing session. This keeps updates well-ordered and prevents replay attacks from rolling back state. Starts at 1 for each pairing session.

SignedIssuerStateEncapsulates an issuer's signed pairing state and its signature.

Encapsulates an issuer's signed pairing state and its signature.

Field
Type
Description
state_bytes
bytes

Serialized IssuerPairingState message from the issuer.

signature
bytes

Signature over state_bytes. Must use the key pair specified in the digest.

PairingSessionStateServer-aggregated state for a pairing session containing input from the issuer and claimers.

Server-aggregated state for a pairing session containing input from the issuer and claimers.

Field
Type
Description
issuer_state
claimers
repeated

Server-managed list of claimers.

GetPairingSessionRequestRequest payload for fetching a pairing session.

Request payload for fetching a pairing session.

Field
Type
Description
digest_sha256
bytes
PutPairingSessionRequestWrapper request for PutPairingSession RPC.

Wrapper request for PutPairingSession RPC.

Field
Type
Description
issuer_state
PutPairingSessionResponseWrapper response for PutPairingSession RPC.

Wrapper response for PutPairingSession RPC.

Field
Type
Description
session_state
GetPairingSessionResponseWrapper response for GetPairingSession RPC.

Wrapper response for GetPairingSession RPC.

Field
Type
Description
session_state
JoinPairingSessionRequestWrapper request for JoinPairingSession RPC.

Wrapper request for JoinPairingSession RPC.

Field
Type
Description
digest_sha256
bytes

SHA256 of the pairing session digest to join.

claimer_key

Public key that the claimer wishes to join with.

JoinPairingSessionResponseWrapper response for JoinPairingSession RPC.

Wrapper response for JoinPairingSession RPC.

Field
Type
Description
session_state

profile_service.proto​

GetProfileRequest
Field
Type
Description
identity
string
GetProfileResponse
Field
Type
Description
event_bundles
repeated

The identity's latest profile events.

event_hints
repeated

Side information needed to validate the bundles (the identity's key chain).

following_count
uint64

Distinct identities this identity follows.

followers_count
uint64

Distinct identities following this identity.

search.proto​

SearchUsersRequest
Field
Type
Description
query
string
sort_by
optional
page_params
optional
SearchPostsRequest
Field
Type
Description
query
string
sort_by
optional
page_params
optional
omit_labels
repeated string

Label values for which the requester does not want to see content.

SearchUsersResponse
Field
Type
Description
results
repeated

Relevant search results.

page_info
optional
event_hints
repeated

Relevant events for the events in the search results.

SearchPostsResponse
Field
Type
Description
results
repeated

Relevant search results.

page_info
optional
event_hints
repeated

Relevant events for the events in the search results.

SearchResult
Field
Type
Description
event_bundle
rank
float

Search rank, higher means more relevant.

SortUsersByenum
SORT_USERS_BY_DEFAULT
= 0

Default sorting by relevancy.

SORT_USERS_BY_ALPHA
= 1

Alphabetic order of profile name.

SortPostsByenum
SORT_POSTS_BY_DEFAULT
= 0

Default sorting by relevancy.

SORT_POSTS_BY_TOP
= 1

Top post first.

SORT_POSTS_BY_LATEST
= 2

Latests post first.

server.proto​

ServerVersionCurrent version the server is running on.

Current version the server is running on.

Field
Type
Description
version
string
ServerInfoRelevant information about the current server, such as version, public endpoints, etc.

Relevant information about the current server, such as version, public endpoints, etc.

Field
Type
Description
version
cdn_url
string

URL used to resolve HTTP assets (blobs, images, etc), the server's HARBOR_CDN_URL setting.

GetServerInfoRequest

No fields.

GetServerInfoResponse
Field
Type
Description
server_info
SignedMessageEnvelope for requests authenticated with a key pair instead of a bearer token.

Envelope for requests authenticated with a key pair instead of a bearer token.

Field
Type
Description
signature
bytes

Signature by public_key over message_bytes.

message_bytes
bytes

The serialized request message, e.g. a RegisterPushNotificationRequest.

public_key

verifications_service.proto​

VerificationClaimBundleA claim with the verification state around it, so lists can show each claim's verified status from a single response.

A claim with the verification state around it, so lists can show each claim's verified status from a single response.

Field
Type
Description
claim

The VerificationClaim event.

targets
repeated

VerificationTarget events published by the claim's owner

verifies
repeated

VerificationVerify events.

ListVerificationClaimsRequest
Field
Type
Description
claimed_by_identity
string
ListVerificationClaimsResponse
Field
Type
Description
claim_bundles
repeated
event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

ListVerificationTargetsRequest
Field
Type
Description
claim_event_key
ListVerificationTargetsResponse
Field
Type
Description
event_bundles
repeated

VerificationTarget events for the claim, published by the claim's owner — who has been asked to verify.

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

ListVerificationVerifiesRequest
Field
Type
Description
claim_event_key
ListVerificationVerifiesResponse
Field
Type
Description
event_bundles
repeated

VerificationVerify events for the claim.

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

ListTargetedVerificationClaimsRequest
Field
Type
Description
target_identity
string
ListTargetedVerificationClaimsResponse
Field
Type
Description
claim_bundles
repeated

Claims whose owner targeted target_identity. The 'inbox'.

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

ResolveVerifiedClaimsRequestReverse lookup: find the identities that claim something, starting from the claim's field values rather than from an identity.

Reverse lookup: find the identities that claim something, starting from the claim's field values rather than from an identity. Answers "who claims this (e.g. this platform channel, this occupation), verified by a trusted party?" — the inverse of the identity-keyed queries above. Works for any claim type.

Field
Type
Description
schema_digest

Optional type scope: restrict to claims of exactly this schema, by the schema's content digest. Unset (or empty value) = any schema. This is the schema's content-addressed identifier; it only groups cross-client when claimants pin identical canonical schema bytes.

fields
map<string, string>

Field key/value pairs a claim's (STRING) fields must contain, matched by JSONB containment. A claim matches only when it contains every supplied pair (AND); it may carry additional fields. A claim missing any supplied field does not match. May be empty when schema_digest scopes the query.

verified_by_identities
repeated string

Only return claims that carry a VerificationVerify authored by one of these identities (the trust roots). Required and non-empty — this is what makes a match "verified" rather than merely "claimed".

ResolveVerifiedClaimsResponse
Field
Type
Description
claim_bundles
repeated

Matching claims, each wrapped with its targets and verifies (the verifies include at least one authored by a trusted identity).

event_hints
repeated

Additional events that may be helpful, like relevant identity and profiles

verifications.proto​

VerificationSchemaSchema that defines the verification These are self describing schemas and are intended to be specified in a `VerificationClaim`.

Schema that defines the verification These are self describing schemas and are intended to be specified in a VerificationClaim.

Field
Type
Description
name
string

Human readable name of the schema (ie. X Verification).

description
string
fields
repeated
FieldDef
Field
Type
Description
key
string

Key used in VerificationClaim.fields, e.g. "handle", "proof_url".

kind

How to decode this field's bytes.

format
string

Semantic refinement of kind: "url", "email", "iso8601-date", "hex". Free-form so new formats need no proto change.

required
bool
description
string
regex
optional string
max_len
optional uint32
SerializedVerificationSchemaProtobuf serialization is non-deteministic.

Protobuf serialization is non-deteministic. We hash the serialized schema so we have the canonical hash - this aids with grouping of claims.

Field
Type
Description
schema_bytes
bytes

Serialized VerificationSchema.

digest

Digest over schema_bytes. Verify digest == hash(schema_bytes).

VerificationClaimClaim a user makes

Claim a user makes

Field
Type
Description
schema

The schema this claim instantiates, carried inline.

fields
map<string, bytes>

Values keyed by FieldDef.key, decoded per the schema's FieldKind.

VerificationTargetTargets a claim at one or more identities.

Targets a claim at one or more identities. Separate from the claim so targeting can be set (or changed) after the claim is created.

Field
Type
Description
claim_event_key

The claim event being targeted.

target_identities
repeated string

Identities the claim is intended for.

VerificationVerify── A verification of a claim ──

── A verification of a claim ──

Field
Type
Description
claim_event_key

The claim event being verified. The event's author is the verifier.

FieldKindenumCanonical byte encoding per kind (claims are hashed, so reject non-canonical): STRING -> UTF-8 INT -> int64 little-endian, 8 bytes BOOL -> 0x00 / 0x01 BYTES -> verbatim

Canonical byte encoding per kind (claims are hashed, so reject non-canonical):

 STRING -> UTF-8        INT   -> int64 little-endian, 8 bytes
 BOOL   -> 0x00 / 0x01  BYTES -> verbatim
FIELD_KIND_UNSPECIFIED
= 0
FIELD_KIND_STRING
= 1
FIELD_KIND_INT
= 2
FIELD_KIND_BOOL
= 3
FIELD_KIND_BYTES
= 4