valid-wallet-address
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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
  1. Import the isValidAddress function from the package:
import { isValidAddress } from 'valid-wallet-address'
  1. 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.

Readme

Keywords

none

Package Sidebar

Install

npm i valid-wallet-address

Weekly Downloads

14

Version

0.1.1

License

MIT

Unpacked Size

8.13 kB

Total Files

13

Last publish

Collaborators

  • shreyas0924