Bcoin is a javascript bitcoin library which
does a lot of hard bitcoin things for you.

Read the docs.

Read the code.