How can i know the transaction that i send to the blockchain is confirmed and the transaction is added to the blockchain using web3.js ? methods.myMethod.send returns promise combined with event emitter, when is transactionHash, conformation, and receipt is fired ? and what these three term exactly mean can anyone describe in detail?
transactionHash: when you send a transaction to be included in block, instantly you will get a transactionHash. Now at this time your transaction is in pending state, whenever in future your transaction is mined (included in block), your transaction gets confirmed. Suppose your transaction gets confirmed in nth block, so your transaction confirmation number will be 0. As blockchain grows you transaction confirmation number increases.( at n+1th block it would be 1 and so on). whenever your transaction is confirmed, a transaction receipt object will be available. This transaction receipt object will have all the information related to the transaction like transaction hash,block hash, block number, gas used, event logs etc.