Search code examples
blockchainethereumbinance-smart-chainethers.js

Sign transaction on behalf of a 3rd party wallet


Is it possible to authorize a server to sign transactions on user's behalf?

Flow:

  1. User connects wallet in the frontend
  2. User authorizes server to sign transactions for their wallet
  3. Server listens for events on the chain
  4. Server signs and executes transaction on user's behalf

I'm new to web3 overall, so I don't even know where to start looking for a solution. I do know about approve on contracts. Do I have to deploy such a contract and use that?

Naturally, I don't want to ask my users for their private key/mnemonic.


Solution

  • Is it possible to authorize a server to sign transactions on user's behalf?

    No.

    Or: only if your smart contracts support some kind of specially signed messages, but they aren't compatible with any normal Ethereum transactions and this is your application-specific logic.