refactor and export get_address_type()

also updated the API in README
Merge pull request #2 from ralphtheninja/master

refactor and export get_address_type()