Following up on a discussion we had on Telegram, I was mentioning that it would be great to have a CLI implementation of WalletConnect that would allow CLI to easily connect to a user’s wallet.
Today, it is extremely difficult to connect to a user’s wallet from, say, a command line python script. It is easy only if there is a synced ethereum node running locally (in which case we can tap into the go-ethereum API to connect to the local ethereum accounts of the user). But given the size of the ethereum blockchain and the strong requirement (bandwith, disk I/O…) to keep a local node in sync, it is fair to assume that it is almost never the case. So we need a solution to address this problem and it seems totally within the scope of WalletConnect.
Crypto is programmable money right? So it’d be nice to actually be able to easily write programs that interacts with smart-contract for starters. Have you ever tried to deploy or interact with a smart-contract from a command line script? (to say the least).
Today, the only reasonable alternative, is to ask the user to:
- create an account on Infura and input his API key in some config file
- programmatically create an ethereum account for him via Infura
- ask him to transfer some eth to the newly created account
It’s clearly suboptimal because:
- lots of friction: need to create an Infura account (plus, on a personal level, I don’t think it’s good that all ethereum development relies on a centralized service, no matter how good it is)
- security issues: the private key of the ethereum account has to be stored locally so it is up to the developer to make sure that the private key is safe… what could go wrong?
- need to transfer eth: after that, the user still has to transfer some eth to the new account (and it’s always hard to assess how much is needed to transfer) and wait for the transaction to finalize.
How it would (ideally) work
Using a WalletConnect library, I wish I could display a QR code on the user terminal. There are now lots of library to do this very easily. Here with
The user would then scan it with his WalletConnected-enabled wallet and would be able to easily approve any transaction made by the script from his wallet