Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web3-core-helpers

Package Overview
Dependencies
Maintainers
3
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-core-helpers

Web3 core tools helper for sub packages. This is an internal package.

  • 1.3.2-rc.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
317K
decreased by-31.43%
Maintainers
3
Weekly downloads
 
Created

What is web3-core-helpers?

The web3-core-helpers package is a part of the Web3.js library, which provides utility functions and helpers for interacting with the Ethereum blockchain. It includes features for managing errors, formatting data, and other core functionalities that support the main Web3.js modules.

What are web3-core-helpers's main functionalities?

Error Management

This feature provides utilities for managing and formatting errors that occur during interactions with the Ethereum blockchain.

const { errors } = require('web3-core-helpers');

try {
  // Some code that might throw an error
} catch (error) {
  const formattedError = errors.ErrorResponse(error);
  console.error(formattedError);
}

Data Formatting

This feature includes functions for formatting data, such as converting between different units of Ethereum (e.g., from Wei to Ether).

const { formatters } = require('web3-core-helpers');

const weiValue = '1000000000000000000';
const etherValue = formatters.fromWei(weiValue, 'ether');
console.log(etherValue); // Outputs: 1

Utility Functions

This feature provides various utility functions, such as checking if a string is a valid Ethereum address.

const { utils } = require('web3-core-helpers');

const isAddress = utils.isAddress('0x742d35Cc6634C0532925a3b844Bc454e4438f44e');
console.log(isAddress); // Outputs: true

Other packages similar to web3-core-helpers

FAQs

Package last updated on 21 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