New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

valid-wallet-address

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valid-wallet-address

A utility to validate Ethereum wallet addresses for their correctness and existence on the Ethereum network.

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Ethereum Address Validator

npm version License

A utility to validate Ethereum wallet addresses for their correctness and existence on the Ethereum network.

Installation

You can install the Ethereum Address Validator package using npm:

npm install valid-wallet-address
  • Import the isValidAddress function from the package:
import { isValidAddress } from 'valid-wallet-address'
  • Provide an Ethereum address to the isValidAddress function:
const address = '0x1212'
isValidAddress(address)
  .then((valid) => {
    if (valid) {
      console.log('Valid Ethereum address')
    } else {
      console.log('Invalid Ethereum address')
    }
  })
  .catch((error) => console.error('Error:', error))

The function returns a Promise that resolves to true for a valid Ethereum address and false for an invalid one.

FAQs

Package last updated on 24 Aug 2023

Did you know?

Socket

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.

Install

Related posts