Add JS method of computing script-hash