lib/address.js
function multiSigRSToAddress(redeemScript) {
  var scriptHash = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : zconfig.mainnet.scriptHash;

  // Protocol: RIPEMD160(SHA256(script))
  var s256 = zcrypto.sha256(Buffer.from(redeemScript, 'hex'));
  var r160 = zcrypto.ripemd160(Buffer.from(s256, 'hex'));
  return bs58check.encode(Buffer.from(scriptHash + r160, 'hex'));
}
function multiSigRSToAddress(redeemScript) {
  var scriptHash = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : zconfig.mainnet.scriptHash;

  // Protocol: RIPEMD160(SHA256(script))
  var s256 = zcrypto.sha256(Buffer.from(redeemScript, 'hex'));
  var r160 = zcrypto.ripemd160(Buffer.from(s256, 'hex'));
  return bs58check.encode(Buffer.from(scriptHash + r160, 'hex'));
}
/*
Reference: http://www.soroushjp.com/2014/12/20/bitcoin-multisig-the-hard-way-understanding-raw-multisignature-bitcoin-transactions/
Given the multi sig redeem script, return the corresponding address
@param {String} RedeemScript (redeem script)
@return {String} Address