Basically im following a tutorial online where first we generate a fresh bitcoin address that users can send btc to on page load using the wallet api. (code example below)
That said i was trying to get the network propagation percentage for the "latest transaction" on the new address that just got generated.. ( $parseAddy )
$newAddy = json_decode(file_get_contents("https://blockchain.info/merchant/$ID/new_address?password=$PW"), true);
$parseAddy = $newAddy[address];
What i really want to do is determine if the network propagation percentage for the latest transaction on that address is low or high!
I was told when waiting for a confirmation, if the network propagation percentage for that transaction is high like 99% then the chance of a double spend is really low and so it would be ok to accept the payment with a low confirmation number even 0 confirmations. ( items worth $20-$100)
That said im trying to put something together that checks the balance of the freshly created address and then checks the network propagation percentage of the latest transaction on that address and if it has a high percentage say greater than 97% than i want the transaction to immediately complete and forward the user to the product.
If the network propagation percentage for the latest transaction in that address is low, like 10% then i want the script to keep waiting for 2-3 confirmations instead of completing the transaction and forwarding the user.