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