This project is a challenge proposed by Klever, for the sake of ethics, I will pass on basic information.
Klever.io is a crypto wallet ecosystem serving over 2 million users from more than 200 countries worldwide.
The Blockbook platform has an API in which shows transactions made in bitcoins, contains: id, values, confirmations, etc:
https://blockbook-bitcoin.tronwallet.me/api/v2/
But you need to use an address code, like this:
bc1q7cyrfmck2ffu2ud3rn5l5a8yv6f0chkp0zpemf
provided by the platform itself, see.
So it is possible to consult the API:
{
"txid": "fe3e19c13f64e5f6ea02f4ee4dc13e4f292a41179c117773b808fc7c79b96a74",
"vout": 8,
"value": "371910169",
"confirmations": 0
}
Notice that there is an attribute with the name 'confirmations'. For a confirmation to be valid, a minimum of 2 confirmations must occur.
The challenge is to obtain records of valid confirmations and generate your balance, as well as invalid confirmations and generate your balance.
The challenge has some technical prerequisites, but for the sake of ethics I will pass only what is necessary.