stellar / stellar-cli

CLI for Stellar developers
68 stars 66 forks source link

Enable `--sign-with-lab` to return the signed tx to CLI for submission #1640

Open janewang opened 4 days ago

janewang commented 4 days ago

Follow up work from this issue: https://github.com/stellar/stellar-cli/issues/1428. Enable a signed tx to be returned to the CLI for submission

leighmcculloch commented 4 days ago

This is critical for the --sign-with-lab feature to be usable by the average contract developer.

Iirc the main reason we wanted to do sign-with-lab was so that folks could sign with their wallets. Most users will only sign as part of the regular flow of doing operations like stellar contract deploy, and in that flow we can only offer sign-with-lab if the tx is returned, because they are sometimes multi-step flows where multiple transactions are submitted.

Power users will be able to do stellar contract deploy --build-only | stellar tx simulate | stellar tx sign --sign-with-lab, but that flow is really intended for power users, and less-power users using wallets should be able to sign with their wallet without going the power user route by doing stellar contract deploy --sign-with-lab.

willemneal commented 4 days ago

Also as is right no, users won't be able to stellar contract install because the current solution is opening a link, which cannot handle the size of the upload transaction. And currently I assume that many devs use --wasm with deploy which requires an install. (I wish I had pushed more to remove that so feature so deploy only did one thing).

I also think that less power users would want to make use of their browser wallets and would like signing and sending from lab.

Perhaps we should poll users on discord. Also @kalepail 's work on passkeys might offer a way to create the passkey with the browser for lab once and then users could use it via the CLI, but that's perhaps more advanced (and we might not even need the browser to create the passkey?)