Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / comments / CommentData

Type Alias: CommentData

type CommentData = {
  app: Hex;
  author: Hex;
  channelId: bigint;
  commentType: string;
  content: string;
  createdAt: bigint;
  hookData: string;
  metadata: string;
  parentId: Hex;
  targetUri: string;
  updatedAt: bigint;
};

Defined in: packages/sdk/src/comments/types.ts:74

The data structure of a comment returned by the contract

Properties

app

app: Hex;

Defined in: packages/sdk/src/comments/types.ts:108

The address of the app signer


author

author: Hex;

Defined in: packages/sdk/src/comments/types.ts:104

The address of the author of the comment


channelId

channelId: bigint;

Defined in: packages/sdk/src/comments/types.ts:94

The ID of the channel


commentType

commentType: string;

Defined in: packages/sdk/src/comments/types.ts:90

The type of the comment


content

content: string;

Defined in: packages/sdk/src/comments/types.ts:78

The content of the comment


createdAt

createdAt: bigint;

Defined in: packages/sdk/src/comments/types.ts:112

The timestamp of the comment creation in seconds since epoch


hookData

hookData: string;

Defined in: packages/sdk/src/comments/types.ts:120

Additional data for the comment, added by a hook.


metadata

metadata: string;

Defined in: packages/sdk/src/comments/types.ts:82

Metadata about the comment


parentId

parentId: Hex;

Defined in: packages/sdk/src/comments/types.ts:100

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:86

Empty string for replies


updatedAt

updatedAt: bigint;

Defined in: packages/sdk/src/comments/types.ts:116

The timestamp of the comment update in seconds since epoch