Socket
Socket
Sign inDemoInstall

@ethersproject/address

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/address

Utilities for handling Ethereum Addresses for ethers.


Version published
Weekly downloads
870K
decreased by-1.64%
Maintainers
1
Weekly downloads
 
Created

What is @ethersproject/address?

@ethersproject/address is a part of the ethers.js library, which provides utilities for handling Ethereum addresses. It includes functions for address validation, checksum address generation, and address formatting.

What are @ethersproject/address's main functionalities?

Address Validation

This feature allows you to check if a given string is a valid Ethereum address.

const { isAddress } = require('@ethersproject/address');

const address = '0x742d35Cc6634C0532925a3b844Bc454e4438f44e';
console.log(isAddress(address)); // true

Checksum Address Generation

This feature converts an Ethereum address to its checksummed version, which includes mixed-case letters to help prevent errors.

const { getAddress } = require('@ethersproject/address');

const address = '0x742d35Cc6634C0532925a3b844Bc454e4438f44e';
const checksumAddress = getAddress(address);
console.log(checksumAddress); // '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'

Address Formatting

This feature formats an Ethereum address to its canonical form, ensuring consistency in address representation.

const { getAddress } = require('@ethersproject/address');

const address = '0x742d35Cc6634C0532925a3b844Bc454e4438f44e';
const formattedAddress = getAddress(address);
console.log(formattedAddress); // '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'

Other packages similar to @ethersproject/address

Keywords

FAQs

Package last updated on 08 Jan 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc