@ecp.eth/sdk / indexer/webhooks / ChannelCreatedEvent
Type Alias: ChannelCreatedEvent
type ChannelCreatedEvent = {
blockNumber: bigint;
chainId: number;
data: {
channel: {
chainId: number;
createdAt: Date;
description: string;
hook: null | `0x${string}`;
id: bigint;
metadata: {
key: `0x${string}`;
value: `0x${string}`;
}[];
name: string;
owner: `0x${string}`;
updatedAt: Date;
};
};
event: "channel:created";
logIndex: number;
txHash: `0x${string}`;
uid: string;
version: 1;
};Defined in: packages/sdk/src/indexer/webhooks/schemas/channel.ts:86
An event sent to webhook when a channel is created.
Type declaration
blockNumber
blockNumber: bigint = StringBigintSchema;Block number. On wire it is a stringified bigint.
chainId
chainId: number;Chain ID
data
data: {
channel: {
chainId: number;
createdAt: Date;
description: string;
hook: null | `0x${string}`;
id: bigint;
metadata: {
key: `0x${string}`;
value: `0x${string}`;
}[];
name: string;
owner: `0x${string}`;
updatedAt: Date;
};
};Data of the event
data.channel
channel: {
chainId: number;
createdAt: Date;
description: string;
hook: null | `0x${string}`;
id: bigint;
metadata: {
key: `0x${string}`;
value: `0x${string}`;
}[];
name: string;
owner: `0x${string}`;
updatedAt: Date;
};data.channel.chainId
chainId: number;Chain ID where the channel was created
data.channel.createdAt
createdAt: Date = ISO8601DateSchema;Created at date. On wire it is a ISO 8601 date and time string.
data.channel.description
description: string;Description of the channel
data.channel.hook
hook: null | `0x${string}`;Hook address
data.channel.id
id: bigint = StringBigintSchema;ID of the channel. On wire it is a stringified bigint.
data.channel.metadata
metadata: {
key: `0x${string}`;
value: `0x${string}`;
}[] = MetadataArraySchema;Metadata of the channel
data.channel.name
name: string;Name of the channel
data.channel.owner
owner: `0x${string}` = HexSchema;Owner address
data.channel.updatedAt
updatedAt: Date = ISO8601DateSchema;Updated at date. On wire it is a ISO 8601 date and time string.
event
event: "channel:created";Event type
logIndex
logIndex: number;Log index
txHash
txHash: `0x${string}` = HexSchema;Transaction hash
uid
uid: string;Unique identifier for the event. You can use it to deduplicate events. In case of retry attempts the id is the same.
version
version: 1;Version of the event