lib/transaction.js
function addressToScript(address, blockHeight, blockHash) {
  // P2SH replay starts with a 's', or 'r'
  if (address[1] === 's' || address[1] === 'r') {
    return mkScriptHashReplayScript(address, blockHeight, blockHash);
  }

  // P2PKH-replay is a replacement for P2PKH
  return mkPubkeyHashReplayScript(address, blockHeight, blockHash);
}
function addressToScript(address, blockHeight, blockHash) {
  // P2SH replay starts with a 's', or 'r'
  if (address[1] === 's' || address[1] === 'r') {
    return mkScriptHashReplayScript(address, blockHeight, blockHash);
  }

  // P2PKH-replay is a replacement for P2PKH
  return mkPubkeyHashReplayScript(address, blockHeight, blockHash);
}
function addressToScript ( address , blockHeight , blockHash ) { // P2SH replay starts with a 's', or 'r' if ( address [ 1 ] === 's' || address [ 1 ] === 'r' ) { return mkScriptHashReplayScript ( address , blockHeight , blockHash ) ; } // P2PKH-replay is a replacement for P2PKH return mkPubkeyHashReplayScript ( address , blockHeight , blockHash ) ; }
/*
Given an address, generates an output script
@param {String} address
@param {Number} blockHeight
@param {Number} blockHash
return {String} output script
/ * Given an address generates an output script