idquia
Version:
Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, mul
30 lines (22 loc) • 539 B
text/typescript
export interface Uns {
name: string
}
const unstoppableResolution = async (address: string): Promise<Uns | null> => {
if (!address) return null
try {
let uns = null
const { Resolution } = await import('@unstoppabledomains/resolution')
const resolutionInstance = new Resolution()
const name = await resolutionInstance.reverse(address)
if (name) {
uns = {
name
}
}
return uns
} catch (error) {
console.error(error)
return null
}
}
export default unstoppableResolution