I am using bitcoin block chain API, it is possible to get amount sent in a transaction id and the addresses it was sent to. My problem is getting the RELATED ADDRESSES to the address that sent the payment.. The only fact is that I want to be able to validate who sent the money and who it was sent to.. eg. my site involve users sending bitcoin to other users and submitting transaction ID. Each user register and input their wallet address. if User A sends to USer B and submits transaction ID, I want to be able to find out if the transaction is coming from the Sender User and is going to the Receiver Address. Validating for the receiver address is simple with my lines of code:
$requesturl='https://blockchain.info/tx-index/'.$comment.'? format=json'; $ch=curl_init($requesturl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $cexecute=curl_exec($ch); curl_close($ch); $result = json_decode($cexecute,true); for($i=0; $i<count($result['out']); $i++) { $result['out'][$i]["addr"]; }
I can get the receiver addresses from the loop above and validate, and if want to get the sending addresses it is also possible with:
for($i=0; $i<count($result['inputs']); $i++) { // the addr is in the input }
Now my problem is if the wallet Address the User A submitted on our website is not in the sending address list, how do I know his address is there in the list.?
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments