All transactions need to be signed. Otherwise they are considered invalid transactions and will not be included in the blockchain.
A raw transaction is a transaction in raw bytes. If one has the raw bytes of a valid transaction, they can use sendRawTransaction
. Otherwise, web3.js creates the signed transaction's bytes for you automatically as part of sendTransaction()
. web3.js converts the JSON transaction {from:..., to:..., value:...}
to the raw bytes and signs it for you automatically.
Raw bytes are required if you are using a platform like infura.io which does not handle private keys but deal only with signed transactions.