sdk.js
function deriveWalletAddress(publicKey, type) {
  let keyBuffer = new Buffer(publicKey, 'hex');
  let firstHash = crypto.createHash('sha256').update(keyBuffer).digest();
  let secondHash = ripemd160(firstHash);
  let extendedHash = (type === 'issuer' ? '57' : '87') + secondHash.toString('hex');
  let base58Public = bs58check.encode(new Buffer(extendedHash, 'hex'));

  return base58Public;
}
function deriveWalletAddress(publicKey, type) {
  let keyBuffer = new Buffer(publicKey, 'hex');
  let firstHash = crypto.createHash('sha256').update(keyBuffer).digest();
  let secondHash = ripemd160(firstHash);
  let extendedHash = (type === 'issuer' ? '57' : '87') + secondHash.toString('hex');
  let base58Public = bs58check.encode(new Buffer(extendedHash, 'hex'));

  return base58Public;
}
function deriveWalletAddress ( publicKey , type ) { let keyBuffer = new Buffer ( publicKey , 'hex' ) ; let firstHash = crypto . createHash ( 'sha256' ) . update ( keyBuffer ) . digest ( ) ; let secondHash = ripemd160 ( firstHash ) ; let extendedHash = ( type === 'issuer' ? '57' : '87' ) + secondHash . toString ( 'hex' ) ; let base58Public = bs58check . encode ( new Buffer ( extendedHash , 'hex' ) ) ; return base58Public ; }
Derives a wallet address from a public key
@param {<type>} publicKey - A public key to derive the address from
@param {string} type - The type of wallet address to derive
@return {string} base58public - A base58check encoded wallet address
Derives a wallet address from a public key