
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
@justaname.id/address-resolution
Advanced tools
npm install @justaname.id/address-resolution
import { addressResolution } from "@justaname.id/address-resolution";
const name = addressResolution("address", "providerUrl");
const nameHash = ethers.namehash(testAddress.substring(2) + ".addr.reverse");
The first step would be to query the registry contract to get the resolver contract’s address associated with a given nameHash. This should return the off-chain provider’s resolver contract address.
Call the function [”function supportsInterface(bytes4 interfaceID) returns bool”] with interfaceId = “0x9061b923”.
In case it returns false, call the function [”function name(bytes32 node) returns (string)”] on the Resolver contract. This should return the associated name.
In case it returns true, call the function [”resolve(bytes name, bytes data) returns (bytes)”] on the Off-chain Resolver Contract.
The param name should be the DNS-encoded nameHash.
The param data should be [”name(bytes32)”]
The rest of the flow would be an extension to CCIP-Read and ENSIP-10 The contract should revert with the same error:
error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);
Query the gateway on the url returned by the contract in step2, and pass the sender with the calldata. Example: {url}/resolve/{sender}/{callData}.json
The off-chain gateway handling the request should add its own logic for handling the [”name(bytes32)”] and return the correct data, similar to how it is handling the logic of:
[”addr(bytes32)”, “addr(bytes32,uint256)”, “text(bytes32,string)”, “contenthash(bytes32)”]
Call the callbackFunction of the contract (returned in revert error of step 2), and pass the gateway response of step3, along with the extraData returned in step 2. The response returned from the contract should be decoded and will return the primary name associated with the nameHash.
FAQs
Resolve address to its primary name
We found that @justaname.id/address-resolution demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.