<p>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.</p>

<p>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?</p>

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

CC BY-SA 3.0
2017-02-20T15:33:16.347Z
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
CC BY-SA 3.0
2017-02-21T05:54:38.560Z
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 (https://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
CC BY-SA 3.0
2017-02-21T08:43:47.727Z
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
CC BY-SA 3.0
2017-02-21T10:47:25.340Z
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
CC BY-SA 3.0
2017-02-21T10:49:03.387Z
Can you provide the tx id you are analysing and the bitcoin address where the funds are supposed to came from?
sr_gi
CC BY-SA 3.0
2017-02-21T11:28:42.660Z
Trans ID : 3e1cdd97a3e2eac0229ae34b90f3da96f75e52000cf5ac0aaecfbf15ded69b53 
Soruce : 36BGE5c3PKSHmR3oGTq6CHEH7KTzPUPvXn
Destination :1PW4LiHUVvobKgbesiXxgMhD9yRMQoKmBE
Amount : 700000 

Kindly help with this, this is very important for the idea/project I am planning

Thanks in Advance,
Jamy
CC BY-SA 3.0
2017-02-21T11:50:13.227Z
The transaction you provided do not match the information you said. It indeed has an output (index 0) with amount 700000 associated to  the destination address you provided ("1PW4LiHUVvobKgbesiXxgMhD9yRMQoKmBE"). However, the source of the transaction is "3BN213CZxMJr6ajCQQavXkMoS2FSeuTdQP", not "36BGE5c3PKSHmR3oGTq6CHEH7KTzPUPvXn".
sr_gi
<transactions><json-rpc><payment><java><spv>
Payment Transaction Validation
Jamy
# Payment Transaction Validation

(Asked by: username_0 on 2017-02-20)

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.

**Tags:** transactions, json-rpc, payment, java, spv

> **Comments:**
> **username_1**: 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.  
> **username_0**: 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 (https://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 ?  
> **username_1**: 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.  
> **username_0**: 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.  
> **username_1**: Can you provide the tx id you are analysing and the bitcoin address where the funds are supposed to came from?  
> **username_0**: Trans ID : 3e1cdd97a3e2eac0229ae34b90f3da96f75e52000cf5ac0aaecfbf15ded69b53  Soruce : 36BGE5c3PKSHmR3oGTq6CHEH7KTzPUPvXn Destination :1PW4LiHUVvobKgbesiXxgMhD9yRMQoKmBE Amount : 700000   Kindly help with this, this is very important for the idea/project I am planning  Thanks in Advance,  
> **username_1**: The transaction you provided do not match the information you said. It indeed has an output (index 0) with amount 700000 associated to  the destination address you provided ("1PW4LiHUVvobKgbesiXxgMhD9yRMQoKmBE"). However, the source of the transaction is "3BN213CZxMJr6ajCQQavXkMoS2FSeuTdQP", not "36BGE5c3PKSHmR3oGTq6CHEH7KTzPUPvXn".  

---

## 0 answers

