@ecp.eth/sdk / comments / CommentData
Type Alias: CommentData
type CommentData = {
app: Hex;
authMethod: AuthorAuthMethod;
author: Hex;
channelId: bigint;
commentType: number;
content: string;
createdAt: bigint;
parentId: Hex;
targetUri: string;
updatedAt: bigint;
};
Defined in: packages/sdk/src/comments/types.ts:102
The data structure of a comment returned by the contract
Properties
app
app: Hex;
Defined in: packages/sdk/src/comments/types.ts:137
The address of the app signer
authMethod
authMethod: AuthorAuthMethod;
Defined in: packages/sdk/src/comments/types.ts:119
The authentication method used to create this comment 0 = DIRECT_TX, 1 = APP_APPROVAL, 2 = AUTHOR_SIGNATURE
author
author: Hex;
Defined in: packages/sdk/src/comments/types.ts:133
The address of the author of the comment
channelId
channelId: bigint;
Defined in: packages/sdk/src/comments/types.ts:123
The ID of the channel
commentType
commentType: number;
Defined in: packages/sdk/src/comments/types.ts:114
The type of the comment (0 = comment, 1 = reaction)
content
content: string;
Defined in: packages/sdk/src/comments/types.ts:106
The content of the comment
createdAt
createdAt: bigint;
Defined in: packages/sdk/src/comments/types.ts:141
The timestamp of the comment creation in seconds since epoch
parentId
parentId: Hex;
Defined in: packages/sdk/src/comments/types.ts:129
id of parent comments if it has one, 0x for no parent comment
Remarks
This zero address (32 bytes of zeros) indicates the comment has no parent and is a top-level comment
targetUri
targetUri: string;
Defined in: packages/sdk/src/comments/types.ts:110
Empty string for replies
updatedAt
updatedAt: bigint;
Defined in: packages/sdk/src/comments/types.ts:145
The timestamp of the comment update in seconds since epoch