Legacy
sendTransaction (Legacy)
Sends a transaction to the network.
Note: Only the account having AccountKeyLegacy
can send this transaction.
Parameters
The parameters of sendTransaction are a transaction object and a callback function.
A transaction object of type LEGACY
has the following structure:
Return Value
The callback
will return the 32-byte transaction hash.
PromiEvent
: A promise combined event emitter. Will be resolved when the transaction receipt is available. Additionally the following events are available:
"transactionHash"
returnsString
: Is fired right after the transaction is sent and a transaction hash is available."receipt"
returnsObject
: Is fired when the transaction receipt is available."error"
returnsError
: Is fired if an error occurs during sending. On an out-of-gas error, the second parameter is the receipt.
Example
Last updated