3.0.0 • Published 5 years ago
@withtally/address-helper v3.0.0
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;
  }
}