Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
web3-eth-iban
Advanced tools
This package converts Ethereum addresses to IBAN addresses and vice versa.
The web3-eth-iban npm package is a utility for handling IBAN (International Bank Account Number) addresses in the context of Ethereum. It allows for the conversion between IBAN and Ethereum addresses, validation of IBAN addresses, and other related functionalities.
Convert Ethereum address to IBAN
This feature allows you to convert a standard Ethereum address to an IBAN address. The code sample demonstrates how to use the `toIban` method to achieve this.
const Web3EthIban = require('web3-eth-iban');
const iban = Web3EthIban.toIban('0x1234567890123456789012345678901234567890');
console.log(iban);
Convert IBAN to Ethereum address
This feature allows you to convert an IBAN address back to a standard Ethereum address. The code sample demonstrates how to use the `toAddress` method to achieve this.
const Web3EthIban = require('web3-eth-iban');
const address = Web3EthIban.toAddress('XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS');
console.log(address);
Validate IBAN address
This feature allows you to validate whether a given IBAN address is valid. The code sample demonstrates how to use the `isValid` method to achieve this.
const Web3EthIban = require('web3-eth-iban');
const isValid = Web3EthIban.isValid('XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS');
console.log(isValid);
The ethereumjs-util package provides a variety of utility functions for Ethereum, including address manipulation and validation. While it does not specifically handle IBAN addresses, it offers a broader range of utilities for Ethereum development.
The web3-utils package is part of the Web3.js library and provides various utility functions for Ethereum, such as address validation, conversion, and formatting. Similar to ethereumjs-util, it does not focus on IBAN addresses but offers a wide array of general-purpose utilities.
This is a sub-package of web3.js.
web3-eth-iban
This package converts Ethereum addresses to IBAN addresses a vice versa.
You can install the package either using NPM or using Yarn
npm install web3-eth-iban
yarn add web3-eth-iban
Script | Description |
---|---|
clean | Uses rimraf to remove dist/ |
build | Uses tsc to build package and dependent packages |
lint | Uses eslint to lint package |
lint:fix | Uses eslint to check and fix any warnings |
format | Uses prettier to format the code |
test | Uses jest to run unit tests |
test:integration | Uses jest to run tests under /test/integration |
test:unit | Uses jest to run tests under /test/unit |
[4.0.1-rc.0]
registeredSubscriptions
was added by default in web3 constructor (#5792)web3-types
, web3-errors
and web3
. (#5771)new Web3().eth.contract
(#5824)useRpcCallSpecification
at enableExperimentalFeatures
is true
) (#5525)safe
and finalized
block tags (#5823)InvalidMethodParamsError
and error code ERR_INVALID_METHOD_PARAMS = 207
(#5824)request
property to ResponseError
(#5854)data
property to TransactionRevertInstructionError
(#5854)TransactionRevertWithCustomError
was added to handle custom solidity errors (#5854)createAccessList
functionality ( #5780 )safe
and finalized
block tags (#5823)contractAbi
option to SendTransactionOptions
and SendSignedTransactionOptions
to added the ability to parse custom solidity errors (#5854)decodeErrorData
from web3-eth-contract
is now exported from this package and was renamed to decodeContractErrorData
(#5844)createAccessList
for contracts ( #5780 )Contract
will subscribeToContextEvents
upon instantiation if syncWithContext
is set to true
and the constructor is passed an instance of Web3Context
(#5833)safe
and finalized
block tags (#5823)HttpProvider
(#5771)IpcProvider
(#5771)_socketOptions
from IpcProvider
constructor to the underlying Socket
(#5891)SocketConnection
in IpcProvider
(inherited from SocketProvider
) returns net.Socket
(#5891)WebSocketProvider
(#5771)SocketConnection
in WebSocketProvider
(inherited from SocketProvider
) returns isomorphic WebSocket
(#5891)createAccessList
functionality ( #5780 )safe
and finalized
block tags (#5823)web3-eth-abi
and TypedArray
from (#5771)TypedArray
from web3-utils
and web3-validator
(it was defined twice) (#5771)safe
and finalized
block tags in BlockTags
and BlockTag
types (#5823)safe
and finalized
block tags (#5823)safe
and finalized
block tags in isBlockTag
method (#5823)require('web3')
will now return all web3 exported-objects organized in namespaces . (#5771)Web3Error
is renamed to BaseWeb3Error
(#5771)MaxAttemptsReachedOnReconnectingError
with the same message for 1.x but also adding the maxAttempts
(#5894)sendTransaction
and sendSignedTransaction
now errors with (and error
event emits) the following possible errors: TransactionRevertedWithoutReasonError
, TransactionRevertInstructionError
, TransactionRevertWithCustomError
, InvalidResponseError
, or ContractExecutionError
(#5854)compareBlockNumbers
function now only supports comparison of both blocktags params ( except earliest
vs number) or both block number params (#5842)SocketProvider
abstract class now resolves JSON RPC response errors instead of rejecting them (#5844)SocketConnection
in SocketProvider
(#5891)_contracts:Contract[]
and static setProvider
function was removed (#5792)getRevertReason
is no longer exported (#5844)web3-types
(#5771)decodeErrorData
is no longer exported (method was moved to web3-eth-abi
and renamed decodeContractErrorData
) (#5844)TypedArray
to web3-types
(was also duplicated at web3-validator
) (#5771)genesis
tag in compareBlockNumbers
function (#5823)TypedArray
to web3-types
(was also duplicated at web3-utils
) (#5771)FAQs
This package converts Ethereum addresses to IBAN addresses and vice versa.
The npm package web3-eth-iban receives a total of 503,209 weekly downloads. As such, web3-eth-iban popularity was classified as popular.
We found that web3-eth-iban demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.