If it's of any use. I'm the developer of a side project called NVault -> https://github.com/VnUgE/NVault/tree/develop/extension. This is the link to the web extension portion. Signing happens on a remote server, so only the message passing, privacy, and user settings are part of the web extension package.
It might have some useful code for your project, licensed under AGPL3.