From 1857c114f42a5a8f6d73a98075cbefc1c9966098 Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Tue, 27 Aug 2024 16:38:17 -0700 Subject: [PATCH] dope --- site/docs/pages/identity/use-address.mdx | 20 ++++++++++++++++++++ site/docs/pages/identity/use-avatar.mdx | 17 ++++++----------- site/docs/pages/identity/use-name.mdx | 17 ++++++----------- 3 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 site/docs/pages/identity/use-address.mdx diff --git a/site/docs/pages/identity/use-address.mdx b/site/docs/pages/identity/use-address.mdx new file mode 100644 index 0000000000..555bc694cf --- /dev/null +++ b/site/docs/pages/identity/use-address.mdx @@ -0,0 +1,20 @@ +# `useAddress` + +The `useAddress` hook is used to get an address from an onchain identity provider for a given name. + +## Usage + +```tsx +import { useAddress } from '@coinbase/onchainkit/identity'; + +const { data: address, isLoading } = useAddress({ name: 'zizzamia.base.eth' }); +``` + +## Returns + +[`useQuery>`](/identity/types#getaddressreturntype) + +## Parameters + +[`UseAddressOptions`](/identity/types#useaddressoptions) +[`UseQueryOptions`](/identity/types#usequeryoptions) diff --git a/site/docs/pages/identity/use-avatar.mdx b/site/docs/pages/identity/use-avatar.mdx index ff29b202b5..d162370c17 100644 --- a/site/docs/pages/identity/use-avatar.mdx +++ b/site/docs/pages/identity/use-avatar.mdx @@ -17,14 +17,9 @@ const { data: avatar, isLoading } = useAvatar({ ensName: 'vitalik.eth' }); ## Returns -```ts -type UseAvatarOptions = { - ensName: string; - chain?: Chain; -}; - -type UseAvatarQueryOptions = { - enabled?: boolean; - cacheTime?: number; -}; -``` +[`useQuery>`](/identity/types#getaddressreturntype) + +## Parameters + +[`UseAvatarOptions`](/identity/types#useavataroptions) +[`UseQueryOptions`](/identity/types#usequeryoptions) diff --git a/site/docs/pages/identity/use-name.mdx b/site/docs/pages/identity/use-name.mdx index 05ce3dda4c..d5ae3f37ae 100644 --- a/site/docs/pages/identity/use-name.mdx +++ b/site/docs/pages/identity/use-name.mdx @@ -17,14 +17,9 @@ const { data: name, isLoading } = useName({ address: '0x1234' }); ## Returns -```ts -type UseNameOptions = { - address: Address; // The Ethereum address for which the ENS name is to be fetched. - chain?: Chain; // Optional chain for domain resolution -}; - -type UseNameQueryOptions = { - enabled?: boolean; - cacheTime?: number; -}; -``` +[`useQuery>`](/identity/types#getaddressreturntype) + +## Parameters + +[`UseNameOptions`](/identity/types#usenameoptions) +[`UseQueryOptions`](/identity/types#usequeryoptions)