Open artistic709 opened 2 months ago
Hi @artistic709 , Could you elaborate a bit on the use case you have in mind please? There is a plan to run anvil on localhost to be able to fork etc, which would make it possible to connect eclair and the browser wallet to the same development node. Is it what you have in mind?
Hi @danhper , this is the scenario I'm considering: I want to send transactions in production environment via command line. Rather than using a hardware wallet or importing a private key, I would prefer to use, say, a MetaMask account to sign transactions.
Ahhh, I see, that makes sense! In theory this is definitely doable but it might be a bit of work, especially given that alloy does not seem to support anything like this out of the box.
I think that the flow could look like:
This does look like a fun little project but there are a few things I'll be prioritising before it, so I can't really give a timeline for when I think it might be ready. If you'd like to give it a shot, I'm of course more than open to contributions! Thanks again for the idea!
Yeah I think that will be really helpful for advanced users. Unfortunately I don't write Rust, but I can make a proof of concept in Python + vanilla JS.
BTW the 5th and 6th steps might not work because it's very difficult (if not impossible) to ask MetaMask to sign a raw transaction. Instead, we'll just let MetaMask broadcast the tx and wait for the txid to come back.
I see, thanks for the explanation! Yeah, then the transaction would be sent by metamask and the txid would be sent back to eclair via websocket. A proof-of-concept would be super helpful and the JS part could be used directly, so that would definitely be very welcome, thanks!
Added a way to connect extension wallets: using a localhost web server to forward signature requests to the browser.