Payment Transaction Validation

1

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.

Jamy

Posted 2017-02-20T08:18:53.460

Reputation: 11

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 – 2017-02-20T15:33:16.347

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/%24tx_hash). Its giving us the destination address. But where Can I find the source address from which address this transaction is been triggered ?

– Jamy – 2017-02-21T05:54:38.560

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 – 2017-02-21T08:43:47.727

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 – 2017-02-21T10:47:25.340

Can you provide the tx id you are analysing and the bitcoin address where the funds are supposed to came from? – sr-gi – 2017-02-21T10:49:03.387

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 – 2017-02-21T11:28:42.660

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 – 2017-02-21T11:50:13.227

No answers