Comment
Create a new Sage comment
import { useSignAndExecuteTransaction } from '@mysten/dapp-kit';
import { usePost } from '@sage-app/sdk/react';
interface CommentCreateInput {
amounts: number[]; // payment amounts set to [0, 0]
data: string; // markdown string input
description: string; // markdown string input
parentPostId: string; // address of parent post
self: string; // user's wallet address
soulId: string; // address of user's owned soul
title: string; // markdown string input
}
...
const { mutateAsync: signAndExecuteTransaction } = useSignAndExecuteTransaction();
const { comment } = usePost();
...
const createComment = async (data: CommentCreateInput) => {
const { ok, err, transaction } = comment(data);
const { digest } = await signAndExecuteTransaction({
transaction
});
};Error Codes
Code
Value
Meaning
Code
Value
Meaning
Querying for New Comment Events
Last updated