Raw code example of creating a P2PKH (aka legacy) public address in ARTSNL:
The below code utilizes the uncompressed version of a public key. A compressed version of a public key will generate a totally different public address.
let result = ecc.pointFromScalar(privateKey, false)
let riped = bitcoin.crypto.hash160(result)
let prefix = Buffer.from("6F", "hex")
let prefix_riped = [prefix, riped]
let combined_prefix_riped = Buffer.concat(prefix_riped)
let checksum = bitcoin.crypto.sha256(bitcoin.crypto.sha256(combined_prefix_riped)).slice(0, 4)
let arr = [prefix, riped, checksum]
let combinedBuff = Buffer.concat(arr)
let address = base58.encode(combinedBuff)