@withtally/address-helper
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Tiny package for treating Ethereum addresses as types instead of strings in typescript.

Built on top of the ethers.js address helpers.

Usage

import { Address, BadAddressException } from '@withtally/address-helper';

try {
  const address = new Address('0x0000000000000000000000000000000000000000');
} catch (e) {
  if (e instanceof BadAddressException) {
    console.log('Bad address');
  } else {
    throw e;
  }
}

Dependents (0)

Package Sidebar

Install

npm i @withtally/address-helper

Weekly Downloads

17

Version

3.0.0

License

MIT

Unpacked Size

6.76 kB

Total Files

10

Last publish

Collaborators

  • afa7789
  • rafso