Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / indexer/webhooks

indexer/webhooks

Ethereum Comments Protocol SDK Indexer Functionality for constructing events from webhook requests.

Classes

ClassDescription
InvalidEventErrorThrown when the event is invalid.
InvalidEventSignatureErrorThrown when the event signature is invalid.
InvalidRequestBodyErrorThrown when the request body is not valid JSON object.

Type Aliases

Type AliasDescription
ApprovalAddedEventAn event sent to webhook when an approval is added
ApprovalRemovedEventAn event sent to webhook when an approval is removed
ChannelCreatedEventAn event sent to webhook when a channel is created.
ChannelHookStatusUpdatedEventAn event sent to webhook when a channel hook status is updated.
ChannelMetadataSetEventAn event sent to webhook when a channel metadata is set.
ChannelTransferredEventAn event sent to webhook when a channel is transferred.
ChannelUpdatedEventAn event sent to webhook when a channel is updated.
CommentAddedEventAn event sent to webhook when a comment is added.
CommentDeletedEventAn event sent to webhook when a comment is deleted.
CommentEditedEventAn event sent to webhook when a comment is edited.
CommentHookMetadataSetEventAn event sent to webhook when a comment hook metadata is set.
CommentModerationStatusComment moderation status schema.
CommentModerationStatusUpdatedEventAn event sent to webhook when a comment moderation status is updated.
CommentReactionsUpdatedEventAn event sent to webhook when a comment reactions are updated.
CommentReferencesUpdatedEvent-
ConstructEventResultAll events schema.
TestEventAn event sent to webhook when a test event is triggered.

Variables

VariableDescription
AllEventsAll events.
AllEventsSchemaAll events schema.
ApprovalAddedEventSchemaAn event sent to webhook when an approval is added
ApprovalEventsApproval events.
ApprovalEventsSchemaApproval events schema.
ApprovalRemovedEventSchemaAn event sent to webhook when an approval is removed
ChannelCreatedEventSchemaAn event sent to webhook when a channel is created.
ChannelEventsChannel events.
ChannelEventsSchemaChannel events schema.
ChannelHookStatusUpdatedEventSchemaAn event sent to webhook when a channel hook status is updated.
ChannelMetadataSetEventSchemaAn event sent to webhook when a channel metadata is set.
ChannelTransferredEventSchemaAn event sent to webhook when a channel is transferred.
ChannelUpdatedEventSchemaAn event sent to webhook when a channel is updated.
CommentAddedEventSchemaAn event sent to webhook when a comment is added.
CommentDeletedEventSchemaAn event sent to webhook when a comment is deleted.
CommentEditedEventSchemaAn event sent to webhook when a comment is edited.
CommentEventsComment events.
CommentEventsSchemaComment events schema.
CommentHookMetadataSetEventSchemaAn event sent to webhook when a comment hook metadata is set.
CommentModerationStatusSchemaComment moderation status schema.
CommentModerationStatusUpdatedEventSchemaAn event sent to webhook when a comment moderation status is updated.
CommentReactionsUpdatedEventSchemaAn event sent to webhook when a comment reactions are updated.
CommentReferencesUpdatedEventSchema-
EVENT_APPROVAL_ADDED-
EVENT_APPROVAL_REMOVED-
EVENT_CHANNEL_CREATED-
EVENT_CHANNEL_HOOK_STATUS_UPDATED-
EVENT_CHANNEL_METADATA_SET-
EVENT_CHANNEL_TRANSFERRED-
EVENT_CHANNEL_UPDATED-
EVENT_COMMENT_ADDED-
EVENT_COMMENT_DELETED-
EVENT_COMMENT_EDITED-
EVENT_COMMENT_HOOK_METADATA_SET-
EVENT_COMMENT_MODERATION_STATUS_UPDATED-
EVENT_COMMENT_REACTIONS_UPDATED-
EVENT_COMMENT_REFERENCES_UPDATED-
EVENT_TEST-
EventFromChainSchemaCommon schema for all events coming from a chain.
EventV1SchemaCommon schema for all v1 events.
ISO8601DateSchemaISO 8601 date schema. Used to convert the ISO 8601 date from JSON to date.
MetadataSetOperationSchemaCommon schema for all metadata set operations.
StringBigintSchemaStringified bigint schema. Used to convert the stringified bigint from JSON to bigint.
TestEventsTest events.
TestEventSchemaAn event sent to webhook when a test event is triggered.

Functions

FunctionDescription
constructEventConstructs an event from the request body, signature, and timestamp.
constructEventFromRequestConstructs an event from a request.