Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / comments

comments

Ethereum Comments Protocol SDK Comments Core functionality for managing comments and approvals

Type Aliases

Type AliasDescription
AddApprovalParams-
AddApprovalResult-
AddApprovalTypedDataSchemaType-
AddApprovalWithSigParams-
AddApprovalWithSigResult-
AddCommentTypedDataSchemaType-
BaseEditCommentDataParams-
CommentDataThe data structure of a comment returned by the contract
CommentInputDataComment input data schema. This is used as input of the functions.
CommentManagerABIType-
ContractReadFunctions-
ContractWriteFunctions-
CreateApprovalTypedDataParams-
CreateApprovalTypedDataResult-
CreateCommentData-
CreateCommentDataParams-
CreateCommentDataParamsSharedThe shared parameters for creating a comment
CreateCommentTypedDataParams-
CreateDeleteCommentTypedDataParams-
CreateEditCommentTypedDataParams-
CreateRemoveApprovalTypedDataParams-
CreateRemoveApprovalTypedDataResult-
CreateReplyCommentDataParamsThe parameters for creating a reply comment
CreateRootCommentDataParamsThe parameters for creating a root comment
DeleteCommentParams-
DeleteCommentResult-
DeleteCommentTypedDataSchemaType-
DeleteCommentWithSigParams-
DeleteCommentWithSigResult-
EditCommentDataEdit comment data schema. This is used as input of the functions.
EditCommentDataParams-
EditCommentDataParamsWithMetadataObject-
EditCommentDataParamsWithMetadataRaw-
EditCommentParams-
EditCommentResult-
EditCommentTypedDataSchemaType-
EditCommentWithSigParams-
EditCommentWithSigResult-
GetAddApprovalHashData-
GetAddApprovalHashParams-
GetAddApprovalHashResult-
GetChannelManagerParams-
GetCommentIdParams-
GetCommentParams-
GetCommentResult-
GetContractNameParams-
GetContractVersionParams-
GetDeleteCommentHashParams-
GetDomainSeparatorParams-
GetEditCommentHashParams-
GetNonceParams-
GetRemoveApprovalHashParams-
GetRemoveApprovalHashResult-
IsApprovedParams-
Json-
JsonArray-
JsonLiteral-
JsonObject-
PostCommentParams-
PostCommentResult-
PostCommentWithSigParams-
PostCommentWithSigResult-
RemoveApprovalTypedDataSchemaType-
RevokeApprovalParams-
RevokeApprovalResult-
RevokeApprovalWithSigParams-
RevokeApprovalWithSigResult-
UpdateChannelContractParams-
UpdateChannelContractResult-

Variables

VariableDescription
AddApprovalTypedDataSchema-
AddCommentTypedDataSchema-
CommentDataSchema-
CommentInputDataSchemaComment input data schema. This is used as input of the functions.
CommentMetadataSchema-
CreateCommentDataSchema-
deleteCommentDelete a comment as an author
DeleteCommentTypedDataSchema-
deleteCommentWithSigDelete a comment with app signature verification
editCommentEdit a comment as an author
EditCommentDataSchemaEdit comment data schema. This is used as input of the functions.
EditCommentTypedDataSchema-
editCommentWithSigEdit a comment
JsonLiteralSchema-
JsonObjectSchema-
JsonSchema-
postCommentPosts a comment as an author
postCommentWithSigPosts a comment with author signature verification
RemoveApprovalTypedDataSchema-
ReplyCommentInputDataSchema-
RootCommentInputDataSchema-

Functions

FunctionDescription
addApprovalApproves an app signer directly as author
addApprovalWithSigAdds an app signer approval with signature verification
createApprovalTypedDataCreate the EIP-712 typed data structure for approving comment
createCommentDataCreate the data structure of a comment
createCommentTypedDataCreate the EIP-712 typed data structure for adding comment
createDeleteCommentTypedDataCreate the EIP-712 typed data structure for deleting comment
createEditCommentDataCreate the data structure of a comment for editing
createEditCommentTypedDataCreate the EIP-712 typed data structure for editing comment
createRemoveApprovalTypedDataCreate the EIP-712 typed data structure for removing approval
getAddApprovalHashGets the EIP-712 hash for adding approval
getChannelManagerGets the channel manager contract address
getCommentGet a comment by ID
getCommentIdGet the ID for a comment before it is posted
getContractNameGets the contract name
getContractVersionGets the contract version
getDeleteCommentHashGet the hash for deleting a comment
getDomainSeparatorGets the EIP-712 domain separator
getEditCommentHashGet the hash for editing a comment
getNonceGet the nonce for the author and app signer
getRemoveApprovalHashGets the EIP-712 hash for removing approval
isApprovedChecks if an app signer is approved for an author
revokeApprovalRevokes an app signer approval directly as author
revokeApprovalWithSigRemoves an app signer approval with signature verification
updateChannelContractUpdates the channel manager contract address (only owner)