-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# `getAddress` | ||
|
||
The `getAddress` utility is designed to retrieve an address from an onchain identity provider for a given name. | ||
|
||
## Usage | ||
|
||
Get ENS Name from mainnet chain | ||
|
||
:::code-group | ||
```tsx [code] | ||
import { getAddress } from '@coinbase/onchainkit/identity'; | ||
|
||
const address = await getAddress({ name: 'zizzamia.eth' }); | ||
``` | ||
|
||
```ts [return value] | ||
0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1 | ||
``` | ||
|
||
::: | ||
|
||
Get Basename from base chain | ||
|
||
:::code-group | ||
|
||
```tsx [code] | ||
import { getAddress } from '@coinbase/onchainkit/identity'; | ||
import { base } from 'viem/chains'; | ||
|
||
const address = await getAddress({ name: 'zizzamia.base.eth', chain: base }); | ||
``` | ||
|
||
```ts [return value] | ||
0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1 | ||
``` | ||
|
||
::: | ||
|
||
## Returns | ||
|
||
[`Promise<GetAddressReturnType>`](/identity/types#getaddressreturntype) | ||
|
||
## Parameters | ||
|
||
[`GetAddress`](/identity/types#getaddress) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters