SDK
- Setup
- TypeScript
- Checks
Reverse lookup of an Ethereum address to a primary name
Performs a reverse lookup of an Ethereum address
to a primary name.
Data sources for the primary name lookup include:
- The Ethereum Provider configured in the NameGuard instance.
- For ENS names using CCIP-Read: requests to externally defined gateway servers.
Returns display_name
to be shown to users and estimates impersonation_status
.
curl --request GET \
--url https://api.nameguard.io/secure-primary-name/{network_name}/{address}
{
"primary_name_status": "normalized",
"impersonation_status": "unlikely",
"primary_name": "vitalik.eth",
"display_name": "vitalik.eth",
"nameguard_result": {
"rating": 3,
"risk_count": 2,
"highest_risk": {
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
},
"name": "vitalìk.eth",
"namehash": "0xd48fd5598e605861cbd8e45419b41b83739bff52eaef0e283181bbe0a43a5b32",
"normalization": "normalized",
"checks": [
{
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
}
],
"labels": [
{
"rating": 3,
"risk_count": 2,
"highest_risk": {
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
},
"label": "vitalìk",
"labelhash": "0x41459971a5b847d0eef67bc11e2845f1074a2aed1ac6a357378b18fba50816e4",
"normalization": "normalized",
"checks": [
{
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
}
],
"graphemes": [
{
"rating": 3,
"risk_count": 2,
"highest_risk": {
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
},
"normalization": "normalized",
"grapheme": "v",
"grapheme_name": "Latin Small Letter V",
"grapheme_type": "simple_letter",
"grapheme_script": "Latin",
"grapheme_description": "A-Z letter",
"title": "<string>",
"subtitle": "<string>"
}
],
"canonical_label": "vitalik",
"title": "<string>",
"subtitle": "<string>",
"beautiful_label": "<string>"
}
],
"canonical_name": "vitalik.eth",
"title": "<string>",
"subtitle": "<string>",
"beautiful_name": "<string>"
}
}
curl --request GET \
--url https://api.nameguard.io/secure-primary-name/{network_name}/{address}
Path Parameters
mainnet
, sepolia
Response
Reverse lookup result.
The status of a secure primary ENS name lookup performed by NameGuard.
normalized
: The ENS primary name was found and it is normalized.no_primary_name
: The ENS primary name was not found.unnormalized
: The ENS primary name was found, but it is not normalized.
normalized
, no_primary_name
, unnormalized
Impersonation status of the primary_name
.
null
ifprimary_name
isnull
unlikely
, potential
Primary ENS name for the Ethereum address.
null
ifprimary_name_status
is any value exceptnormalized
"vitalik.eth"
ENS beautified version of primary_name
.
- if
primary_name
isnull
then provides a fallbackdisplay_name
of "Unnamed [first four hex digits of Ethereum address]", e.g. "Unnamed c2a6"
"vitalik.eth"
NameGuard report for the primary_name
.
null
ifprimary_name_status
isno_primary_name
(primary name is not found)
The rating of a name/label/grapheme based on multiple conducted checks.
pass
: All checks passed.warn
: At least one check failed with aWARN
status but no check failed with anALERT
status.alert
: At least one check failed with anALERT
status.
2
, 3
, 4
3
The number of checks that have a status of alert
or warn
.
2
The check considered to be the highest risk. If no check has a status of alert
or warn
, this field is null
.
The type of a check.
Common:
normalized
: A name/label/grapheme is ENSIP-15 normalized.
Grapheme:
confusables
: A grapheme is visually confusable.invisible
: A grapheme is invisible.typing_difficulty
: A grapheme is difficult to type.font_support
: A grapheme is not supported by common fonts.
Label:
mixed_scripts
: A label contains multiple scripts.namewrapper_compatible
: TODOpunycode_compatible_label
: A label is compatible with Punycode.unknown_label
: A label is unknown.
Name:
impersonation_risk
: A name might be used for impersonation.punycode_compatible_name
: A name is compatible with Punycode.namewrapper_fuses
: The NameWrapper configuration of a name is safe.decentralized_name
: A name is decentralized.
normalized
, confusables
, invisible
, typing_difficulty
, font_support
, mixed_scripts
, namewrapper_compatible
, punycode_compatible_label
, unknown_label
, impersonation_risk
, punycode_compatible_name
, namewrapper_fuses
, decentralized_name
"confusables"
The status of a conducted check.
skip
: This check was skipped because it was not applicable.info
: This check is informational only.pass
: This check passed.warn
: This check failed, this is a minor issue.alert
: This check failed, this is a major issue.
0
, 1
, 2
, 3
, 4
3
A message describing the result of the check.
The human-readable name of the check.
The analyzed name. Can contain labelhashes when some labels are unknown.
"vitalìk.eth"
The namehash of the name in hex format prefixed with 0x
.
"0xd48fd5598e605861cbd8e45419b41b83739bff52eaef0e283181bbe0a43a5b32"
The ENSIP-15 normalization status of a name or label.
normalized
: The name or label is normalized.unnormalized
: The name or label is not normalized.unknown
: The name or label is unknown because it cannot be looked up from its hash.
normalized
, unnormalized
, unknown
A list of checks that were performed on the name.
The result of a conducted check.
The type of a check.
Common:
normalized
: A name/label/grapheme is ENSIP-15 normalized.
Grapheme:
confusables
: A grapheme is visually confusable.invisible
: A grapheme is invisible.typing_difficulty
: A grapheme is difficult to type.font_support
: A grapheme is not supported by common fonts.
Label:
mixed_scripts
: A label contains multiple scripts.namewrapper_compatible
: TODOpunycode_compatible_label
: A label is compatible with Punycode.unknown_label
: A label is unknown.
Name:
impersonation_risk
: A name might be used for impersonation.punycode_compatible_name
: A name is compatible with Punycode.namewrapper_fuses
: The NameWrapper configuration of a name is safe.decentralized_name
: A name is decentralized.
normalized
, confusables
, invisible
, typing_difficulty
, font_support
, mixed_scripts
, namewrapper_compatible
, punycode_compatible_label
, unknown_label
, impersonation_risk
, punycode_compatible_name
, namewrapper_fuses
, decentralized_name
"confusables"
The status of a conducted check.
skip
: This check was skipped because it was not applicable.info
: This check is informational only.pass
: This check passed.warn
: This check failed, this is a minor issue.alert
: This check failed, this is a major issue.
0
, 1
, 2
, 3
, 4
3
A message describing the result of the check.
The human-readable name of the check.
The analyzed labels of the name.
Label analysis result.
The rating of a name/label/grapheme based on multiple conducted checks.
pass
: All checks passed.warn
: At least one check failed with aWARN
status but no check failed with anALERT
status.alert
: At least one check failed with anALERT
status.
2
, 3
, 4
3
The number of checks that have a status of alert
or warn
.
2
The check considered to be the highest risk. If no check has a status of alert
or warn
, this field is null
.
The type of a check.
Common:
normalized
: A name/label/grapheme is ENSIP-15 normalized.
Grapheme:
confusables
: A grapheme is visually confusable.invisible
: A grapheme is invisible.typing_difficulty
: A grapheme is difficult to type.font_support
: A grapheme is not supported by common fonts.
Label:
mixed_scripts
: A label contains multiple scripts.namewrapper_compatible
: TODOpunycode_compatible_label
: A label is compatible with Punycode.unknown_label
: A label is unknown.
Name:
impersonation_risk
: A name might be used for impersonation.punycode_compatible_name
: A name is compatible with Punycode.namewrapper_fuses
: The NameWrapper configuration of a name is safe.decentralized_name
: A name is decentralized.
normalized
, confusables
, invisible
, typing_difficulty
, font_support
, mixed_scripts
, namewrapper_compatible
, punycode_compatible_label
, unknown_label
, impersonation_risk
, punycode_compatible_name
, namewrapper_fuses
, decentralized_name
"confusables"
The status of a conducted check.
skip
: This check was skipped because it was not applicable.info
: This check is informational only.pass
: This check passed.warn
: This check failed, this is a minor issue.alert
: This check failed, this is a major issue.
0
, 1
, 2
, 3
, 4
3
A message describing the result of the check.
The human-readable name of the check.
The analyzed label. If the label is unknown, this field is [labelhash]
.
"vitalìk"
The labelhash of the label in hex format prefixed with 0x
.
"0x41459971a5b847d0eef67bc11e2845f1074a2aed1ac6a357378b18fba50816e4"
The ENSIP-15 normalization status of a name or label.
normalized
: The name or label is normalized.unnormalized
: The name or label is not normalized.unknown
: The name or label is unknown because it cannot be looked up from its hash.
normalized
, unnormalized
, unknown
A list of checks that were performed on the label.
The result of a conducted check.
The type of a check.
Common:
normalized
: A name/label/grapheme is ENSIP-15 normalized.
Grapheme:
confusables
: A grapheme is visually confusable.invisible
: A grapheme is invisible.typing_difficulty
: A grapheme is difficult to type.font_support
: A grapheme is not supported by common fonts.
Label:
mixed_scripts
: A label contains multiple scripts.namewrapper_compatible
: TODOpunycode_compatible_label
: A label is compatible with Punycode.unknown_label
: A label is unknown.
Name:
impersonation_risk
: A name might be used for impersonation.punycode_compatible_name
: A name is compatible with Punycode.namewrapper_fuses
: The NameWrapper configuration of a name is safe.decentralized_name
: A name is decentralized.
normalized
, confusables
, invisible
, typing_difficulty
, font_support
, mixed_scripts
, namewrapper_compatible
, punycode_compatible_label
, unknown_label
, impersonation_risk
, punycode_compatible_name
, namewrapper_fuses
, decentralized_name
"confusables"
The status of a conducted check.
skip
: This check was skipped because it was not applicable.info
: This check is informational only.pass
: This check passed.warn
: This check failed, this is a minor issue.alert
: This check failed, this is a major issue.
0
, 1
, 2
, 3
, 4
3
A message describing the result of the check.
The human-readable name of the check.
A list of graphemes that were analyzed in the label. If the label is unknown, this field is null
.
Grapheme analysis result.
The rating of a name/label/grapheme based on multiple conducted checks.
pass
: All checks passed.warn
: At least one check failed with aWARN
status but no check failed with anALERT
status.alert
: At least one check failed with anALERT
status.
2
, 3
, 4
3
The number of checks that have a status of alert
or warn
.
2
The check considered to be the highest risk. If no check has a status of alert
or warn
, this field is null
.
The type of a check.
Common:
normalized
: A name/label/grapheme is ENSIP-15 normalized.
Grapheme:
confusables
: A grapheme is visually confusable.invisible
: A grapheme is invisible.typing_difficulty
: A grapheme is difficult to type.font_support
: A grapheme is not supported by common fonts.
Label:
mixed_scripts
: A label contains multiple scripts.namewrapper_compatible
: TODOpunycode_compatible_label
: A label is compatible with Punycode.unknown_label
: A label is unknown.
Name:
impersonation_risk
: A name might be used for impersonation.punycode_compatible_name
: A name is compatible with Punycode.namewrapper_fuses
: The NameWrapper configuration of a name is safe.decentralized_name
: A name is decentralized.
normalized
, confusables
, invisible
, typing_difficulty
, font_support
, mixed_scripts
, namewrapper_compatible
, punycode_compatible_label
, unknown_label
, impersonation_risk
, punycode_compatible_name
, namewrapper_fuses
, decentralized_name
"confusables"
The status of a conducted check.
skip
: This check was skipped because it was not applicable.info
: This check is informational only.pass
: This check passed.warn
: This check failed, this is a minor issue.alert
: This check failed, this is a major issue.
0
, 1
, 2
, 3
, 4
3
A message describing the result of the check.
The human-readable name of the check.
The ENSIP-15 normalization status of a grapheme.
This check does not consider the context of the grapheme and is not equivalent to ens_normalize(grapheme)
.
A normalized grapheme can be combined with other normalized graphemes to form an unnormalized label.
The position of a grapheme in a label can also affect the normalization status of the label.
normalized
: The grapheme is normalized.unnormalized
: The grapheme is not normalized.
normalized
, unnormalized
The analyzed grapheme.
"v"
The name of the grapheme.
"Latin Small Letter V"
The type of the grapheme. If all characters in the grapheme have the same type, that type is returned. Otherwise, special
is returned.
simple_letter
-[a-z]
simple_number
-[0-9]
other_letter
- a letter (single-char grapheme) in any script that is not simple;LC
class http://www.unicode.org/reports/tr44/#GC_Values_Tableother_number
- a digit (single-char grapheme) in any script that is not simple;N
class http://www.unicode.org/reports/tr44/#GC_Values_Tablehyphen
- a hyphendollarsign
- a dollar signunderscore
- an underscoreemoji
- an emoji or emoji ZWJ sequenceinvisible
- zero width joiner or non-joinerspecial
- for any grapheme that doesn't match one of the other classifications or if characters have different types
"simple_letter"
Script name of the grapheme computed from the script names of its characters.
"Latin"
Description of the grapheme type.
"A-Z letter"
A human-readable title based on the rating
.
A human-readable subtitle based on the rating
.
The canonical form of the analyzed label.
null
if the canonical form of any grapheme is not knownnull
if the result would be unnormalized, even if the canonical form of all graphemes is known[labelhash]
if the label is unknown
"vitalik"
A human-readable title based on the rating
.
A human-readable subtitle based on the rating
.
Beautified version of label
.
The canonical form of the analyzed name.
null
if the canonical form of any label is not knowncan contain labelhashes when some labels are unknown
"vitalik.eth"
A human-readable title based on the rating
.
A human-readable subtitle based on the rating
.
Beautified version of name
.
curl --request GET \
--url https://api.nameguard.io/secure-primary-name/{network_name}/{address}
{
"primary_name_status": "normalized",
"impersonation_status": "unlikely",
"primary_name": "vitalik.eth",
"display_name": "vitalik.eth",
"nameguard_result": {
"rating": 3,
"risk_count": 2,
"highest_risk": {
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
},
"name": "vitalìk.eth",
"namehash": "0xd48fd5598e605861cbd8e45419b41b83739bff52eaef0e283181bbe0a43a5b32",
"normalization": "normalized",
"checks": [
{
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
}
],
"labels": [
{
"rating": 3,
"risk_count": 2,
"highest_risk": {
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
},
"label": "vitalìk",
"labelhash": "0x41459971a5b847d0eef67bc11e2845f1074a2aed1ac6a357378b18fba50816e4",
"normalization": "normalized",
"checks": [
{
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
}
],
"graphemes": [
{
"rating": 3,
"risk_count": 2,
"highest_risk": {
"check": "confusables",
"status": 3,
"message": "<string>",
"check_name": "<string>"
},
"normalization": "normalized",
"grapheme": "v",
"grapheme_name": "Latin Small Letter V",
"grapheme_type": "simple_letter",
"grapheme_script": "Latin",
"grapheme_description": "A-Z letter",
"title": "<string>",
"subtitle": "<string>"
}
],
"canonical_label": "vitalik",
"title": "<string>",
"subtitle": "<string>",
"beautiful_label": "<string>"
}
],
"canonical_name": "vitalik.eth",
"title": "<string>",
"subtitle": "<string>",
"beautiful_name": "<string>"
}
}