1

What's the most efficient and trust-less way to sign a transaction through a middle-ware?

Thanks for your help.

  • Short answer is assemble it and sign it with Web3. I think we need more details about what you want to accomplish to give a more precise solution. – Rob Hitchens Dec 10 '19 at 22:38
  • Thanks for your answer @RobHitchens-B9lab actually I want to send transactions to a smart contract via a restful API, is there any pattern to delegate transaction signature to the API without having to store user private key. – Arsalen Dec 11 '19 at 10:28
  • 1
    That's the thing. If something can sign it then it must have the private key. There is no known way around that, by design. Good news. There is no reason I can think of for the client not to sign. Signing is not sending (to Ethereum) or paying for gas and a user can send a "signed" message (properly formed transaction) to something else that is willing to submit and pay for gas, if that is the goal. – Rob Hitchens Dec 11 '19 at 14:11
  • 1
    Speaking of gas, there is a meta transaction pattern that is not easy to understand or implement but it let's users sign and send without paying for gas, with the help of a third party that is will to pay for gas. – Rob Hitchens Dec 11 '19 at 14:13
  • Thanks for the explanation @RobHitchens-B9lab, very informative, the purpose of the whole design is to get rid of the complexity on the client side (going through the pain of having to install Metamask). Therefore, I though about setting up a transaction factory to pay for gas (Meta transaction pattern is very interesting as well) and store the key pair in a local storage, still remains the signature issue (at least that I'm aware of). Using a web3 provider that requires a significant effort from the end user is not an option though. – Arsalen Dec 11 '19 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.