Skip to content

Events ​

Events represent state changes, like a new message or contract event.

Hubble emit events whenever it observes a state change. Since a hub may see messages in a different order than other hubs, events ordering is specific to each hub. Clients can subscribe to the hub using the Events API to get a live stream of changes to the hub.

Hubble keeps event around for 3 days after which they are deleted to save space. To get older data, use the GRPC or HTTP APIs.

HubEvent ​

FieldTypeLabelDescription
typeHubEventType
iduint64
bodyMergeMessageBody,
PruneMessageBody,
RevokeMessageBody,
MergeUserNameProofBody,
MergeOnChainEventBody
oneOf

HubEventType ​

NameNumberDescription
HUB_EVENT_TYPE_NONE0
HUB_EVENT_TYPE_MERGE_MESSAGE1
HUB_EVENT_TYPE_PRUNE_MESSAGE2
HUB_EVENT_TYPE_REVOKE_MESSAGE3
HUB_EVENT_TYPE_MERGE_USERNAME_PROOF6
HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT9

MergeMessageBody ​

FieldTypeLabelDescription
messageMessage
deleted_messagesMessagerepeated

MergeUserNameProofBody ​

FieldTypeLabelDescription
username_proofUserNameProof
deleted_username_proofUserNameProof
username_proof_messageMessage
deleted_username_proof_messageMessage

PruneMessageBody ​

FieldTypeLabelDescription
messageMessage

RevokeMessageBody ​

FieldTypeLabelDescription
messageMessage

MergeOnChainEventBody ​

FieldTypeLabelDescription
on_chain_eventOnChainEvent

OnChainEvent ​

FieldTypeLabelDescription
typeOnChainEventTypeThe type of onchain event
chain_iduint32The chain id for the event
block_numberuint32The block number for the event
block_hashbytesThe block hash for the event
block_timestampuint64The block timestamp for the event
transaction_hashbytesThe transaction hash for the event
log_indexuint32The log index for the event
fiduint64The fid the event is associated with
bodySignerEventBody,
SignerMigratedEventBody,
IdRegisterEventBody,
StorageRentEventBody
oneOf
tx_indexuint32The tx index for the event

OnChainEventType ​

NameNumberDescription
EVENT_TYPE_NONE0
EVENT_TYPE_SIGNER1
EVENT_TYPE_SIGNER_MIGRATED2
EVENT_TYPE_ID_REGISTER3
EVENT_TYPE_STORAGE_RENT4

SignerEventBody ​

FieldTypeLabelDescription
keybytesThe bytes of the public key for the signer
key_typeuint32The type of the key (currently only set to 1)
event_typeSignerEventTypeThe type of the signer event
metadatabytesThe metadata associated with the key
metadata_typeuint32The type of the metadata (currently only set to 1)

SignerEventType ​

NameNumberDescription
SIGNER_EVENT_TYPE_NONE0
SIGNER_EVENT_TYPE_ADD1
SIGNER_EVENT_TYPE_REMOVE2
SIGNER_EVENT_TYPE_ADMIN_RESET3

SignerMigratedEventBody ​

FieldTypeLabelDescription
migrated_atuint32The timestamp at which hubs were migrated to OP mainnet

SignerEventBody ​

FieldTypeLabelDescription
tobytesThe address the fid was registers/transferred to
event_typeIdRegisterEventTypeThe type of the id register event
frombytesThe address the transfer originated from
recover_addressbytesThe recovery address for the fid

IdRegisterEventType ​

NameNumberDescription
ID_REGISTER_EVENT_TYPE_NONE0
ID_REGISTER_EVENT_TYPE_REGISTER0
ID_REGISTER_EVENT_TYPE_TRANSFER0
ID_REGISTER_EVENT_TYPE_CHANGE_RECOVERY0

StorageRentEventBody ​

FieldTypeLabelDescription
payerbytesThe address of the payer
unitsuint32The number of units of storage purchased
expiryuint32The timestamp at which these units of storage will expire