import { encode } from 'eip55' ; const AddressRegex = /0x[a-fA-F0-9]{40}/ ; const Alias = /@[a-z]+/ ; export const address_checker = ( address ) : string => { if ( ! AddressRegex . test ( address ) ) { if ( ! Alias . test ( address ) ) { throw new Error ( `Invalid Ethereum Address ${ address }` ) ; } else { return address ; } } return encode ( address ) ; } ;