I want to build a app which takes transaction id, source and destination address as input and need to validate the transaction (the specified amount is sent from address1 to address2.

What is the best solution can I relay on blockinfo or chain.com api's? or is it better to start own JSON RPC node and validate?

If its 2nd can someone help me to write java code to kick start the process.

  • I think this totally depends on the purpose of the application. Nodes such as blockchain.info are well connected nodes that most likely will receive transactions before your own node will. The problem is whether you trust in the information they provide your or not. From my point of view, I think that the chances of a node like this misbehaving are really low. However, as I said before, it is completely subjective. – sr-gi Feb 20 '17 at 15:33
  • Thanks for the reply. I am going through these API's can you help me to understand the json (transaction json). How or where do we see source address in transaction json (blockchain.info/rawtx/$tx_hash). Its giving us the destination address. But where Can I find the source address from which address this transaction is been triggered ? – Jamy Feb 21 '17 at 5:54
  • If we take this transaction as an example: b8a70c542d9d8229b88d995d86a59f740e13d13473473484420cb366a33b0e1e, you can find inside the label "inputs ", "prev_out" a label called "addr", that is in this case: 1PRJ3qqB3gAP5XgtdQmG5JsKb8n2UzepYS. Moreover, to check the outputs, go to label "out" and inside each array you will find another "addr" field, that corresponds to the destination "i", where "i" is the position inside the array. If you edit your question, or ask it separately, I will post it as better formatted answer, since comments do not allow quite much. – sr-gi Feb 21 '17 at 8:43
  • Thanks for the reply but the address in ("inputs ", "prev_out") is not the address from where I initiated the transaction. How do I trace that. – Jamy Feb 21 '17 at 10:47
  • Can you provide the tx id you are analysing and the bitcoin address where the funds are supposed to came from? – sr-gi Feb 21 '17 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.