Resolver

resolver.resolveName

Get the owner of a userDID. If not found in communities ID, it will find in ens. If you pass binance or arbitrum rpc url, it will also find address in space id.

Input:

Name
Type
Description
required

name

string

The name of the userDID, the format should be ${userDID}.${brandDID}

true

Output: Promise<string | null>

Example:

const res = await resolver.resolveName('a.did')

resolver.lookupAddress

Get primary did of an address. If not found in communities ID, it will find in ens. If you pass binance or arbitrum rpc url, it will also find address in space id.

Input:

Name
Type
Description
required

address

string

The address of the user DID

true

Output: Promise<string | null>

Example:

const res = await resolver.lookupAddress('0x0000000000000000000000000000000000000000')

Last updated