Documentation Index
Fetch the complete documentation index at: https://docs.towns.com/llms.txt
Use this file to discover all available pages before exploring further.
Hook to set the ENS address of the current user in a stream. You should be validating if the ENS address belongs to the user before setting it.
Imports
import { useSetEnsAddress } from '@towns-protocol/react-sdk'
Definition
function useSetEnsAddress(
streamId: string,
config?: ActionConfig<Myself["setEnsAddress"]>,
): {
data: void | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
setEnsAddress: (ensAddress: `0x${string}`) => Promise<void>;
}
Source: useSetEnsAddress
Parameters
streamId
The id of the stream to set the ENS address of.
config
- Type:
ActionConfig<Myself["setEnsAddress"]>
- Optional
Configuration options for the action.
Return Type
The setEnsAddress action and its loading state.
{
data: void | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
setEnsAddress: (ensAddress: `0x${string}`) => Promise<void>;
}