UNPKG

@towns-protocol/react-sdk

Version:

React Hooks for Towns Protocol SDK

23 lines 870 B
import type { Space } from '@towns-protocol/sdk'; import { type ActionConfig } from './internals/useAction'; /** * Hook to create a channel. * @param config - Configuration options for the action. * @returns The `createChannel` action and its loading state. */ export declare const useCreateChannel: (spaceId: string, config?: ActionConfig<Space["createChannel"]>) => { data: string | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; /** * Action to create a channel. * @param name - The name of the channel to create. * @param signer - The signer to use to create the channel. */ createChannel: (channelName: string, signer: import("ethers").Signer, opts?: { topic?: string; } | undefined) => Promise<string>; }; //# sourceMappingURL=useCreateChannel.d.ts.map