I want to use Web3.js APIs to create an Ethereum transaction from an address (not a smart contract) to another address using sendTransaction method (https://web3js.readthedocs.io/en/1.0/web3-eth.html#sendtransaction)


  1. Is it feasible?
  2. If user has to provide it's private key for every transaction, wouldn't it breach the security? That is, it is possible to have multiple send transactions once private key is received.

1 Answer 1

  • Yes check this

  • It is always a security risk if you share your private key. But in some cases you need to. You need to be more specific about your "security" in order to answer correctly this.

  • Thanks for your response. Yes I have gone through the link provided. But I wish to create send transaction without creating contract Instance. Is it possible to generate transaction with the default eth account directly?
    – Gagan
    Jun 11, 2018 at 13:34
  • @Gagan It dependson what you want to do. If it's to send eth, yes. If it's to send transaction to a contract, then you need the instance Jun 11, 2018 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.