Open john-light opened 1 year ago
I don't understand the need for requiring specific wallets for the app in the first place. Can't it just show a BTC address to send to from any wallet?
@raucao I am not working on this app, but if I had to take a guess at why the app currently only works with Ledger, Trezor, and Liquality, it is because these are the only wallets that currently support easily "pushing" a specific bitcoin tx that must be signed to the wallet, where it can then be signed and broadcast without any further work on the part of the end user.
Specifically, the 2WP app enables the user to specify a Rootstock address at which their RBTC will be received. This is a relatively new feature of the Powpeg bridge. Previously, the user could only receive RBTC at the Rootstock address that is derived from the public key of the user's BTC sending address. To use this new feature, the tx must have at least two outputs: one sending the desired amount of BTC to the Powpeg deposit address, and a second OP_RETURN output that contains some metadata about the tx including the desired Rootstock receiving address. Pushing this tx data to a Ledger, Trezor, or Liquality wallet to sign is trivial. Pushing it to other wallets may not be as easy or even possible -- do you know other wallets that a web app can push a sendmany tx to with OP_RETURN outputs?
P.S. FWIW, you can already get the UX of "show a BTC address to send to from any wallet" by following the manual bridge interaction instructions here. Note however that this has the limitation I described earlier regarding how the Rootstock receiving address is derived. And because you are interacting with the bridge manually, not using a GUI that guides you through the process, there are more possibilities for footguns. So, DYOR, caveat emptor, and good luck if you go this route!
To use this new feature, the tx must have at least two outputs: one sending the desired amount of BTC to the Powpeg deposit address, and a second OP_RETURN output that contains some metadata about the tx including the desired Rootstock receiving address.
I see. Thanks for the explanation!
Pushing this tx data to a Ledger, Trezor, or Liquality wallet to sign is trivial. Pushing it to other wallets may not be as easy or even possible -- do you know other wallets that a web app can push a sendmany tx to with OP_RETURN outputs?
The nature of the transaction doesn't really matter, does it? You could at least just download a file, or even copy the raw tx, and import it in a wallet for signing. Some wallets can also scan QR codes of transactions.
@raucao
The nature of the transaction doesn't really matter, does it? You could at least just download a file, or even copy the raw tx, and import it in a wallet for signing.
It depends on the wallet. Some would support that, some wouldn't. For users who don't have a wallet with those capabilities, it could be a confusing UX. I personally wouldn't mind having this "download or copy the PSBT" with a disclaimer that it will only work with certain wallets, but not sure if that is the UX the app devs are going for. It's a good suggestion though!
@raucao says here: