Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
ens-resolved-address
Advanced tools
The Address component is a drop-in React component for your dapps. Anytime you need to take an address as an input, you can use the React ENS Address Component instead to resolve ENS names or provide feedback with reverse records.
React ENS Address Component can be installed via npm:
$ yarn add @ensdomains/react-ens-address
$ npm install --save @ensdomains/react-ens-address
resolutionObject
. This has 4 properties:{
name: 'vitalik.eth',
address: '0x123...',
type: "address" // "address" or "name" is the inputValue type
input: "0x123..." // if the resolve is called and returns an error, it will return with the other properties as null and only input will be defined
}
small
class renders component in small sizeAll styling made in style.css
. It can be take as a start point.
.cmp-address
- reserved class for that component.
.cmp-address.small
- for small type of component. Overriding other classes under that parent you can safety style a component.
import ENSAddress from '@ensdomains/react-ens-address'
function Component() {
return <ENSAddress provider={window.web3 || window.ethereum} />
}
import React, { useState } from 'react'
import ENSAddress from '@ensdomains/react-ens-address'
function AddressInput() {
const [resolved, setResolved] = useState({})
const [type, setType] = useState(undefined)
return (
<>
<ENSAddress
provider={window.web3 || window.ethereum}
onResolve={({ name, address, type }) => {
if (type) {
setResolved({
value: address,
type
})
}
}}
/>
{resolvedInput.type === 'address' &&
`We found your reverse record ${resolved.value}`}
{resolvedInput.type === 'name' &&
`We found your address record ${resolved.value}`}
</>
)
}
Original version was built by @industral, which was then edited and published by @jefflau
FAQs
React ENS address component
We found that ens-resolved-address 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.