@ecp.eth/sdk / indexer/webhooks
indexer/webhooks
Ethereum Comments Protocol SDK Indexer Functionality for constructing events from webhook requests.
Classes
| Class | Description |
|---|---|
| InvalidEventError | Thrown when the event is invalid. |
| InvalidEventSignatureError | Thrown when the event signature is invalid. |
| InvalidRequestBodyError | Thrown when the request body is not valid JSON object. |
Type Aliases
| Type Alias | Description |
|---|---|
| ApprovalAddedEvent | An event sent to webhook when an approval is added |
| ApprovalRemovedEvent | An event sent to webhook when an approval is removed |
| ChannelCreatedEvent | An event sent to webhook when a channel is created. |
| ChannelHookStatusUpdatedEvent | An event sent to webhook when a channel hook status is updated. |
| ChannelMetadataSetEvent | An event sent to webhook when a channel metadata is set. |
| ChannelTransferredEvent | An event sent to webhook when a channel is transferred. |
| ChannelUpdatedEvent | An event sent to webhook when a channel is updated. |
| CommentAddedEvent | An event sent to webhook when a comment is added. |
| CommentDeletedEvent | An event sent to webhook when a comment is deleted. |
| CommentEditedEvent | An event sent to webhook when a comment is edited. |
| CommentHookMetadataSetEvent | An event sent to webhook when a comment hook metadata is set. |
| CommentModerationStatus | Comment moderation status schema. |
| CommentModerationStatusUpdatedEvent | An event sent to webhook when a comment moderation status is updated. |
| CommentReactionsUpdatedEvent | An event sent to webhook when a comment reactions are updated. |
| CommentReferencesUpdatedEvent | - |
| ConstructEventResult | All events schema. |
| TestEvent | An event sent to webhook when a test event is triggered. |
Variables
| Variable | Description |
|---|---|
| AllEvents | All events. |
| AllEventsSchema | All events schema. |
| ApprovalAddedEventSchema | An event sent to webhook when an approval is added |
| ApprovalEvents | Approval events. |
| ApprovalEventsSchema | Approval events schema. |
| ApprovalRemovedEventSchema | An event sent to webhook when an approval is removed |
| ChannelCreatedEventSchema | An event sent to webhook when a channel is created. |
| ChannelEvents | Channel events. |
| ChannelEventsSchema | Channel events schema. |
| ChannelHookStatusUpdatedEventSchema | An event sent to webhook when a channel hook status is updated. |
| ChannelMetadataSetEventSchema | An event sent to webhook when a channel metadata is set. |
| ChannelTransferredEventSchema | An event sent to webhook when a channel is transferred. |
| ChannelUpdatedEventSchema | An event sent to webhook when a channel is updated. |
| CommentAddedEventSchema | An event sent to webhook when a comment is added. |
| CommentDeletedEventSchema | An event sent to webhook when a comment is deleted. |
| CommentEditedEventSchema | An event sent to webhook when a comment is edited. |
| CommentEvents | Comment events. |
| CommentEventsSchema | Comment events schema. |
| CommentHookMetadataSetEventSchema | An event sent to webhook when a comment hook metadata is set. |
| CommentModerationStatusSchema | Comment moderation status schema. |
| CommentModerationStatusUpdatedEventSchema | An event sent to webhook when a comment moderation status is updated. |
| CommentReactionsUpdatedEventSchema | An 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 | - |
| EventFromChainSchema | Common schema for all events coming from a chain. |
| EventV1Schema | Common schema for all v1 events. |
| ISO8601DateSchema | ISO 8601 date schema. Used to convert the ISO 8601 date from JSON to date. |
| MetadataSetOperationSchema | Common schema for all metadata set operations. |
| StringBigintSchema | Stringified bigint schema. Used to convert the stringified bigint from JSON to bigint. |
| TestEvents | Test events. |
| TestEventSchema | An event sent to webhook when a test event is triggered. |
Functions
| Function | Description |
|---|---|
| constructEvent | Constructs an event from the request body, signature, and timestamp. |
| constructEventFromRequest | Constructs an event from a request. |