
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language 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
The npm package @justaname.id/address-resolution receives a total of 12 weekly downloads. As such, @justaname.id/address-resolution popularity was classified as not popular.
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
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

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