Rosetta construction payload API locally in javascript

I want to build the functionality provided by the rosetta construction api in javascript for ICP. I dont want to call the rosetta server

I found a github repo but i believe it uses an old implementation because it is using nonce