Skip to content
On this page

API

Documentation for gRPC endpoints exposed by Hubble.

We recommend using a library like hub-nodejs to interact with Hubble's gRPC APIs.

1. Signer Service

Used to retrieve valid and revoked Signers

Method NameRequest TypeResponse TypeDescription
GetSignerSignerRequestMessagesReturns a specific SignerAddMessage for an Fid
GetSignersByFidFidRequestMessagesResponseReturns all SignerAddMessages for an Fid
GetAllSignerMessagesByFidFidRequestMessagesResponseReturns all SignerMessages for an Fid

Signer Request

FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the Signer
signerbytesPublic Key of the Signer

Fid Request

FieldTypeLabelDescription
fiduint64Farcaster ID of the user
page_sizeuint32(optional) Type of the Link being requested
page_tokenbytes(optional)Type of the Link being requested
reverseboolean(optional) Ordering of the response

Messages Response

FieldTypeLabelDescription
messagesMessagerepeatedFarcaster Message
next_page_tokenbytesoptional

2. UserData Service

Users to retrieve the current metadata associated with a user

Method NameRequest TypeResponse TypeDescription
GetUserDataUserDataRequestMessageReturns a specific UserData for an Fid
GetUserDataByFidFidRequestMessagesResponseReturns all UserData for an Fid
GetAllUserDataMessagesByFidFidRequestMessagesResponseReturns all UserData for an Fid
GetCurrentStorageLimitsByFidFidRequestStorageLimitsResponseReturns StorageLimits for an Fid

UserData Request

FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the UserData
user_data_typeUserDataTypeType of UserData being requested

StorageLimitsResponse

FieldTypeLabelDescription
limitsStorageLimitrepeatedStorage limits per store type

StorageLimit

FieldTypeLabelDescription
store_typeStoreTypeThe specific type being managed by the store
limituint64The limit of the store type, scaled by the user's rent

3. Cast Service

Used to retrieve valid casts or tombstones for deleted casts

Method NameRequest TypeResponse TypeDescription
GetCastCastIdMessageReturns a specific Cast
GetCastsByFidFidRequestMessagesResponseReturns CastAdds for an Fid in reverse chron order
GetCastsByParentCastIdMessagesResponseReturns CastAdd replies to a given Cast in reverse chron order
GetCastsByMentionFidRequestMessagesResponseReturns CastAdds that mention an Fid in reverse chron order
GetAllCastMessagesByFidFidRequestMessagesResponseReturns Casts for an Fid in reverse chron order

CastsByParentRequest

FieldTypeLabelDescription
parent_cast_idCastId
parent_urlstring
page_sizeuint32optional
page_tokenbytesoptional
reversebooloptional

4. Reaction Service

Method NameRequest TypeResponse TypeDescription
GetReactionReactionRequestMessageReturns a specific Reaction
GetReactionsByFidReactionsByFidRequestMessagesResponseReturns Reactions made by an Fid in reverse chron order
GetReactionsByCastReactionsByCastRequestMessagesResponseReturns ReactionAdds for a given Cast in reverse chron order
GetReactionsByTargetReactionsByTargetRequestMessagesResponseReturns ReactionAdds for a given Cast in reverse chron order
GetAllReactionMessagesByFidFidRequestMessagesResponseReturns Reactions made by an Fid in reverse chron order

Reaction Request

Users to retrieve valid or revoked reactions

FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the Reaction
reaction_typeReactionTypeType of the Reaction being requested
target_cast_idCastId(optional) Identifier of the Cast whose reactions are being requested
target_urlstring(optional) Identifier of the Url whose reactions are being requested

ReactionsByFid Request

FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the Reaction
reaction_typeReactionTypeType of the Reaction being requested
page_sizeuint32(optional) Type of the Link being requested
page_tokenbytes(optional)Type of the Link being requested
reverseboolean(optional) Ordering of the response

ReactionsByCast Request

FieldTypeLabelDescription
cast_idCastIdIdentifier of the Cast whose reactions are being requested
reaction_typeReactionTypeType of the Reaction being requested
page_sizeuint32(optional) Type of the Link being requested
page_tokenbytes(optional)Type of the Link being requested
reverseboolean(optional) Ordering of the response

ReactionsByTargetRequest

FieldTypeLabelDescription
target_cast_idCastId
target_urlstring
reaction_typeReactionTypeoptional
page_sizeuint32optional
page_tokenbytesoptional
reversebooloptional
Method NameRequest TypeResponse TypeDescription
GetLinkLinkRequestMessageReturns a specific Link
GetLinksByFidLinksByFidRequestMessagesResponseReturns Links made by an fid in reverse chron order
GetLinksByTargetLinksByTargetRequestMessagesResponseReturns LinkAdds for a given target in reverse chron order
GetAllLinkMessagesByFidFidRequestMessagesResponseReturns Links made by an fid in reverse chron order
FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the Link
link_typestringType of the Link being requested
target_fiduint64Fid of the target

LinksByFid Request

FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the Link
link_typestringType of the Link being requested
page_sizeuint32(optional) Type of the Link being requested
page_tokenbytes(optional)Type of the Link being requested
reverseboolean(optional) Ordering of the response

LinksByTarget Request

FieldTypeLabelDescription
target_fiduint64Farcaster ID of the user who generated the Link
link_typestring(optional) Type of the Link being requested
page_sizeuint32(optional) Type of the Link being requested
page_tokenbytes(optional)Type of the Link being requested
reverseboolean(optional) Ordering of the response
FieldTypeLabelDescription
uint64
link_typestring
page_sizeuint32optional
page_tokenbytesoptional
reversebooloptional

6. Verification Service

Used to retrieve valid or revoked proof of ownership of an Ethereum Address.

Method NameRequest TypeResponse TypeDescription
GetVerificationVerificationRequestMessageReturns a VerificationAdd for an Ethereum Address
GetVerificationsByFidFidRequestMessagesResponseReturns all VerificationAdds made by an Fid
GetAllVerificationMessagesByFidFidRequestMessagesResponseReturns all Verifications made by an Fid

Verification Request

FieldTypeLabelDescription
fiduint64Farcaster ID of the user who generated the Verification
addressbytesEthereum Address being verified

7. Event Service

Used to subscribe to real-time event updates from the Farcaster Hub

Method NameRequest TypeResponse TypeDescription
SubscribeSubscribeRequeststream HubEventStreams new Events as they occur
GetEventEventRequestHubEventStreams new Events as they occur

SubscribeRequest

FieldTypeLabelDescription
event_typesEventTyperepeatedTypes of events to subscribe to
from_iduint64optionalEvent ID to start streaming from

EventRequest

FieldTypeLabelDescription
iduint64

8. Submit Service

Method NameRequest TypeResponse TypeDescription
SubmitMessageMessageMessageSubmits a Message to the Hub

9. Contract Service

Used to query the Hubs for the state of the Farcaster Id Registry and Farcaster Name Registry contracts on Ethereum.

Method NameRequest TypeResponse TypeDescription
GetFidsFidsRequestFidsResponseReturns the most recent Fids that were registered
GetIdRegistryEventIdRegistryEventRequestIdRegistryEventReturns the most recent IdRegistryEvent for an Fid
GetIdRegistryEventByAddressIdRegistryEventByAddressRequestIdRegistryEvent
GetNameRegistryEventNameRegistryEventRequestNameRegistryEventReturns the most recent NameRegistryEvent for an Fname

FidsRequest

FieldTypeLabelDescription
page_sizeuint32optional
page_tokenbytesoptional
reversebooloptional

Fids Response

FieldTypeLabelDescription
fidsuint64repeatedFid of the user
next_page_tokenbytesoptional

IdRegistryEventRequest

FieldTypeLabelDescription
fiduint64

IdRegistryEventByAddressRequest

FieldTypeLabelDescription
addressbytes

NameRegistryEvent Request

FieldTypeLabelDescription
namebytesFname of the user whose NameRegistry event is being requested

10. Username Proofs Service

Method NameRequest TypeResponse TypeDescription
GetUsernameProofUsernameProofRequestUserNameProofUsername Proof
GetUserNameProofsByFidFidRequestUsernameProofsResponse

UsernameProofRequest

FieldTypeLabelDescription
namebytes

UsernameProofsResponse

FieldTypeLabelDescription
proofsUserNameProofrepeated

UserNameProof

FieldTypeLabelDescription
timestampuint64
namebytes
ownerbytes
signaturebytes
fiduint64
typeUserNameType

UserNameProof

FieldTypeLabelDescription
timestampuint64
namebytes
ownerbytes
signaturebytes
fiduint64
typeUserNameType

11. Sync Service

Method NameRequest TypeResponse TypeDescription
GetInfoHubInfoRequestHubInfoResponseReturns metadata about the hub's state.
GetSyncStatusSyncStatusRequestSyncStatusResponseReturns the hub's sync status.
GetAllSyncIdsByPrefixTrieNodePrefixSyncIdsTBD
GetAllMessagesBySyncIdsSyncIdsMessagesResponseTBD
GetSyncMetadataByPrefixTrieNodePrefixTrieNodeMetadataResponseTBD
GetSyncSnapshotByPrefixTrieNodePrefixTrieNodeSnapshotResponseTBD

HubInfoRequest

FieldTypeLabelDescription
db_statsbool

HubInfoResponse

Response Types for the Sync RPC Methods

FieldTypeLabelDescription
versionstring
is_syncingbool
nicknamestring
root_hashstring
db_statsDbStats

SyncStatusRequest

FieldTypeLabelDescription
peerIdstringoptional

SyncStatusResponse

FieldTypeLabelDescription
is_syncingbool
sync_statusSyncStatusrepeated

SyncStatus

FieldTypeLabelDescription
peerIdstring
inSyncstring
shouldSyncbool
divergencePrefixstring
divergenceSecondsAgoint32
theirMessagesuint64
ourMessagesuint64
lastBadSyncint64

TrieNodePrefix

FieldTypeLabelDescription
prefixbytes

SyncIds

FieldTypeLabelDescription
sync_idsbytesrepeated

TrieNodeMetadataResponse

FieldTypeLabelDescription
prefixbytes
num_messagesuint64
hashstring
childrenTrieNodeMetadataResponserepeated

TrieNodeSnapshotResponse

FieldTypeLabelDescription
prefixbytes
excluded_hashesstringrepeated
num_messagesuint64
root_hashstring

DbStats

FieldTypeLabelDescription
num_messagesuint64
num_fid_eventsuint64
num_fname_eventsuint64

12. Storage Service

Method NameRequest TypeResponse TypeDescription
GetRentRegistryEvents.RentRegistryEventsRequest.RentRegistryEventsResponse

RentRegistryEvent

FieldTypeLabelDescription
block_numberuint32
block_hashbytes
transaction_hashbytes
log_indexuint32
payerbytes
fiduint64
typeStorageRegistryEventType
unitsuint32
expiryuint32

StorageRegistryEventType

NameNumberDescription
STORAGE_REGISTRY_EVENT_TYPE_NONE0
STORAGE_REGISTRY_EVENT_TYPE_RENT1
STORAGE_REGISTRY_EVENT_TYPE_SET_PRICE2
STORAGE_REGISTRY_EVENT_TYPE_SET_MAX_UNITS3
STORAGE_REGISTRY_EVENT_TYPE_SET_DEPRECATION_TIMESTAMP4
STORAGE_REGISTRY_EVENT_TYPE_SET_GRACE_PERIOD5

RentRegistryEventsRequest

FieldTypeLabelDescription
fiduint64

RentRegistryEventsResponse

FieldTypeLabelDescription
eventsRentRegistryEventrepeated

13. Admin Service

Method NameRequest TypeResponse TypeDescription
RebuildSyncTrie.Empty.Empty
DeleteAllMessagesFromDb.Empty.Empty
SubmitIdRegistryEvent.IdRegistryEvent.IdRegistryEvent
SubmitNameRegistryEvent.NameRegistryEvent.NameRegistryEvent
SubmitRentRegistryEvent.RentRegistryEvent.RentRegistryEvent
SubmitStorageAdminRegistryEvent.StorageAdminRegistryEvent.StorageAdminRegistryEvent

StorageAdminRegistryEventRequest

FieldTypeLabelDescription
transaction_hashbytes

StorageAdminRegistryEvent

FieldTypeLabelDescription
block_numberuint32
block_hashbytes
transaction_hashbytes
log_indexuint32
timestampuint64
frombytes
typeStorageRegistryEventType
valuebytes