MultiversX Tracker is Live!

How do i loop through all the related address in a given wallet address

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 188 Views

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.?


Get BONUS $200 for FREE!

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