-5

How can I authenticate users based on their connected wallets using Python. I saw most of the information available is using javascript but I want to do it purely using Python & flask.

I'm working on a Flask web application which will use wallets like meta mask (for now) to authenticate users so that they can deploy smart contracts & other stuff (using ape for smart contract dev) on the web app.

I'm using this code with Moralis API

P.S. Why people are downvoting this post & reducing my reputation? If you think my question is stupid just don't answer. You don't have to be mean about it. Not everyone is a genius. At least I'm trying to learn.

  • Unfortunately, you'll need some JS to do this. There might be a solution using python with webassemly&co (see https://stackoverflow.com/questions/44761748/compiling-python-to-webassembly), but it's unlikely (most crypto stuff that uses system libraries - OpenSSL at least - is not supported currently AFAIC). Also I don't expect any wallets to have python bindings - there must be a JS layer to request something. Finally, none of your users (at least those who understand what a wallet is) will give you their private key, so signing all transactions requires client-side wallet usage. – STerliakov Aug 14 '23 at 13:30

0 Answers0