
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@web3-name-sdk/core
Advanced tools
Web3 Name SDK is an universal web3 identity solution for domain name resolution. Developers can easily get access to .eth, .bnb, .arb, .lens, .crypto names and more.
Developers can resolve web3 domain name or reverse resolve address with web3 name SDK with zero configuration.
npm install @web3-name-sdk/core viem
import { createWeb3Name } from '@web3-name-sdk/core'
const web3Name = createWeb3Name()
You can get address from domain name with a single request:
const address = await web3name.getAddress('spaceid.bnb')
// expect: '0xb5932a6b7d50a966aec6c74c97385412fb497540'
const address = await web3name.getAddress('bts_official.lens')
// expect: '0xd80efa68b50d21e548b9cdb092ebc6e5bca113e7'
const address = await web3name.getAddress('beresnev.crypto')
// expect: '0x6ec0deed30605bcd19342f3c30201db263291589'
There are optional parameters in the method to select your target chain or TLD (top-level domain).
By providing chain IDs, you can resolve addresses on selected chains and get an available domain name from all TLDs deployed on these chains.
// Resolve an address from BNB Chain
const name = await web3name.getDomainName({
address: '0xb5932a6b7d50a966aec6c74c97385412fb497540',
queryChainIdList: [56],
})
// expect: spaceid.bnb
By providing TLDs, address can be resolved from the selected TLDs and get an available TLD primary name.
// Resolve an address from BNB Chain
const name = await web3name.getDomainName({
address: '0xb5932a6b7d50a966aec6c74c97385412fb497540',
queryTldList: ['arb'],
})
// expect: spaceid.arb
Domain text records can be fetched by providing domain name and the key. For example, the avatar record of spaceid.bnb
is returned from this method given key name avatar
:
const record = await sid.getDomainRecord({ name: 'spaceid.bnb', key: 'avatar' })
Domain metadata can be fetched by SDK directly.
// Requestgin
const metadata = await web3Name.getMetadata({ name: 'foryou.kkk1' })
As an all-in-one domain name SDK, non-EVM web3 domain name services are also included. Now we support SNS (Solana Name Service, .sol), Sei Name Service (.sei) and Injective Name Service (.inj).
Install additional corresponding dependencies for Solana environment:
npm install @solana/web3 @bonfida/spl-name-service
Create client and query domains:
const web3Name = createSolName()
const domain = await web3Name.getDomainName({
address: 'Crf8hzfthWGbGbLTVCiqRqV5MVnbpHB1L9KQMd6gsinb',
}) // expect: bonfida
Install additional corresponding dependencies for Sei environment:
npm install @sei-js/core @siddomains/sei-sidjs
Create client and query domains:
const web3Name = createSeiName()
const domain = await web3Name.getDomainName({
address: 'sei1tmew60aj394kdfff0t54lfaelu3p8j8lz93pmf',
}) // expect: allen.sei
Install additional corresponding dependencies for Injective environment:
npm install @siddomains/injective-sidjs '@injectivelabs/networks' '@injectivelabs/ts-types'
Create client and query domains:
const web3Name = createInjName()
const domain = await web3Name.getDomainName({
address: 'inj10zvhv2a2mam8w7lhy96zgg2v8d800xcs7hf2tf',
}) // expect: testtest.inj
FAQs
One stop Web3 domain name resolution
The npm package @web3-name-sdk/core receives a total of 720 weekly downloads. As such, @web3-name-sdk/core popularity was classified as not popular.
We found that @web3-name-sdk/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.