subgraph > getNamesForAddress
getNamesForAddress(
client,parameters):Promise<GetNamesForAddressReturnType>
Gets the names for an address from the subgraph.
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
import { addEnsContracts } from '@ensdomains/ensjs'
import { getNamesForAddress } from '@ensdomains/ensjs/subgraph'
const client = createPublicClient({
chain: addEnsContracts(mainnet),
transport: http(),
})
const result = await getNamesForAddress(client, {
address: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7',
})| Parameter | Type | Description |
|---|---|---|
client |
ClientWithEns |
ClientWithEns |
parameters |
GetNamesForAddressParameters |
GetNamesForAddressParameters |
Promise< GetNamesForAddressReturnType >
Name array. GetNamesForAddressReturnType
packages/ensjs/src/functions/subgraph/getNamesForAddress.ts:161
Generated using TypeDoc and typedoc-plugin-markdown