@towns-protocol/react-sdk
Version:
React Hooks for Towns Protocol SDK
29 lines • 1.01 kB
TypeScript
import type { Spaces } from '@towns-protocol/sdk';
import { type ActionConfig } from './internals/useAction';
/**
* Hook to create a space.
* @param config - Configuration options for the action.
* @returns The `createSpace` action and its loading state.
*/
export declare const useCreateSpace: (config?: ActionConfig<Spaces["createSpace"]>) => {
data: {
spaceId: string;
defaultChannelId: string;
} | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
/**
* Action to create a space.
* @param opts - Options for the create space action.
* @param signer - The signer used to create the space.
*/
createSpace: (params: Partial<Omit<import("@towns-protocol/web3").CreateSpaceParams, "spaceName">> & {
spaceName: string;
}, signer: import("ethers").Signer) => Promise<{
spaceId: string;
defaultChannelId: string;
}>;
};
//# sourceMappingURL=useCreateSpace.d.ts.map