Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeReact

useTransferName

Transfers a name to another account. Signature, options, result and examples for useTransferName in @ensforge/react. Includes examples.

Write hookstable
Since v1.0.0View source

Transfers a name to another account. Preset of useWrite(Actions.name.transfer).

It wraps name.transfer: the same options, result and errors.

Signature

function useTransferName(config?: Parameters<typeof useWrite>[1]): WriteResult< Parameters<typeof Actions.name.transfer>[1], Actions.name.transfer.ReturnType, Actions.name.transfer.ErrorType >

Examples

A button that sends it
import { useTransferName } from "@ensforge/react"

function Send() {
  const { mutate, isPending } = useTransferName()
  return <button disabled={isPending} onClick={() => mutate({ name: "alice.eth", to: recipient })}>Send</button>
}

See also

  • The hook types: ReadResult, WriteResult and ReadConfig.

Was this page helpful?