I am creating an atomic swap interface between Bitcoin and EVM using hashed timelock contracts as the underlying swapping mechanism. The idea is to support atomic swaps via the browser, using browser-based wallets.
To do this I need my web interface to be able to create Bitcoin scripts programmatically and create transactions to which those scripts are attached – all via the web interface. Metamask uses Web3.js for the EVM side of this transaction, but I am not sure which browser-based Bitcoin wallet has similar functionality.
I need to support a bitcoin wallet that can invoke new bitcoin scripts via javascript and create transactions based on those scripts. Does such a browser-based wallet exist for Bitcoin?
I have looked at Xverse and Trust wallet, but no such support seems to exist.
Question:
Is there a browser-based bitcoin wallet that can support the programmatic creation of transactions that include custom Bitcoin scripts?