bitpay/bitcore — pull request #237 by ryanxcharles (2014-04-09 16:25:42+00:00)
Title: new convenient interface for creating addresses

To create an address from a public key or script, you used to have to do the
hashing yourself, and find the version yourself. For example:

var hash = bitcore.util.sha256ripe160(pubkey);
var version = bitcore.networks['livenet'].addressVersion;
var addr = new Address(version, hash);

But with this interface, things are much simpler:

var addr = Address.fromPubKey(pubkey);

The new convenience methods are:

Address.fromPubKey (for regular pubkeyhash addresses)
Address.fromPubKeys (for p2sh multisig addresses)
Address.fromScript (for any p2sh address)