I want to sign every transaction server side from the same address/wallet through web3.
What's the best way to tackle this? Do I need to:
- first use
web3.eth.sendTransaction
- Use
web3.eth.sign
to sign the transaction?
Cheers and happe new year!
If you want to just send the transaction immediately, web3.eth.sendTransaction
is all you need (or just call a method on a contract or whatever you're doing).
If you want to sign the transaction in advance but not yet submit it to the network, you can use web3.eth.signTransaction
.