code: function addressFor(network, rnd) {
    var version = PROTOCOL_VERSIONS[network];
  
    //                      ver   payload  checksum
    var packed = new Buffer('00' + rnd + '00112233', 'hex');
  
    packed[0] = version;
  
    var hash = crypto.createHash('sha256').update(packed.slice(0, packed.length - 4)).digest();
  
    hash = crypto.createHash('sha256').update(hash).digest();
  
    packed[packed.length - 4] = hash[0];
    packed[packed.length - 3] = hash[1];
    packed[packed.length - 2] = hash[2];
    packed[packed.length - 1] = hash[3];
  
    return base58(packed);
  }
docs: internal
  addressFor(network[, rnd]) -> String
  - network(String): network we're getting address for
  - rnd(Buffer): hash of a private key (generated randomly if not supplied)
  
  Generate bitcoin address for a given network