On 05/23/2016 12:13 AM, Johny George wrote: > I am trying to develop an application using |bitcoinj| library. I want > to get the |bitcoin transaction| details.
Hey, that's great! > The details, that I want to extract from a |transaction| includes the > following. > > > 1) Who send me the |transaction| (|Address| and |Public Key| of the sender). The concept of a "from address" is not well defined, actually it's discouraged to think that way and instead assign a unique receiving address for each sender instead. BIP32 HD wallets make it cheap to derive addresses. > 2) The amount that I received. Easy: Transaction.getValueSentToMe() > 3) When was the |transaction| issued. The signing date is usually not known. Transaction.getUpdateTime() holds the time the transaction was first seen by your client. Which of course can be long after it was sent, depending on how your app connects to the P2P network. > 4) Get the data stored in the transaction in |OP_RETURN|. For this, you'd need to examine all the scripts in the relevant transaction outputs. See Script.isOpReturn(). > > -- > You received this message because you are subscribed to the Google > Groups "bitcoinj" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
