So you guys know, you have an error in your verification script. You have typed
const hash = crypto.createHmac('sha512', n + ':' + ss + ':' + n).update(n +':' + cs + 'n')
when you meant to type
const hash = crypto.createHmac('sha512', n + ':' + ss + ':' + n).update(n +':' + cs + ':' + n)
Making this change allowed the script to work for me.