Help with Scrypt hashing

I don’t know if this is the right area to ask for help with coding, but I’m studying a while about how cryptocurrencies mining works and I’m developing a miner using NodeJS (JavaScript is not the best language to do this, but it’s the best I know at moment) and I’m having problems with Scrypt hashing.

I’m reproducing the code of Scrypt - Litecoin Wiki and Block hashing algorithm - Litecoin Wiki, but my final hash looks different for some reason.

My code:
let hash = sha256d(Buffer.from(“01000000f615f7ce3b4fc6b8f61e8f89aedb1d0852507650533a9e3b10b9bbcc30639f279fcaa86746e1ef52d3edb3c4ad8259920d509bd073605c9bf1d59983752a6b06b817bb4ea78e011d012d59d4”, “hex”));

hash = reverseBuffer(hash); // swap the endian

console.log("hash = " + hash.toString("hex"))

crypto.scrypt(hash, hash, 32, { N: 1024, r: 1, p: 1 }, (err, data) => {

    console.log("scrypt = " + reverseBuffer(data).toString("hex"))


The console:
hash = adf6e2e56df692822f5e064a8b6404a05d67cccd64bc90f57f65b46805e9a54b
scrypt = db74c847a9feb3c61647f864c7d3931829087348ac62f3374356a9614d2161fd

The expected result should be:
scrypt = 0000000110c8357966576df46f3b802ca897deb7ad18b12f1c24ecff6386ebd9

The Scrypt function: Crypto | Node.js v16.1.0 Documentation