blockchain-http icon indicating copy to clipboard operation
blockchain-http copied to clipboard

Transactions API documentation needs update for subnetworks

Open jshprentz opened this issue 3 years ago • 0 comments

With the activation of Mobile mining, the documentation is out-of-date for the transactions API at https://docs.helium.com/api/blockchain/transactions. Mobile mining introduces new transaction types, new data fields, and new transaction units.

For example, https://api.helium.io/v1/transactions/MAEqNcpVi5X3FEJaClBZKXBeQdjAEp9NWEdysXTT5fM returns:

"data": {
        "end_epoch": 1475658,
        "hash": "MAEqNcpVi5X3FEJaClBZKXBeQdjAEp9NWEdysXTT5fM",
        "height": 1475685,
        "rewards": [
            {
                "account": "14GYbgQvRcow5DMn4tRaF1bHb6MR1HECBp8ynR4hhbGZTBGryec",
                "amount": 2500000000000000000,
                "type": "subnetwork_reward"
            },
            {
                "account": "1398hLeHESZHE5jVtaLAV5fdg2vrUeZEs2B92t7TzeQTtugr8dL",
                "amount": 1500000000000000000,
                "type": "subnetwork_reward"
            }
        ],
        "start_epoch": 1475513,
        "time": 1660324655,
        "token_type": "mobile",
        "type": "subnetwork_rewards_v1"
    }
}

The transaction type subnetwork_rewards_v1 is new.

The token_type field is new.

The transaction amounts are not denominated in bones (10^-8 HNT). According to the Discord announcement at https://discord.com/channels/404106811252408320/730418759298318346/1007700200711782421, the amounts are 25B and 15B Mobile. Thus the JSON transaction amounts are denominated in 10^-8 Mobile (can we call them phones?). These units are new.

Please document all changes to the transactions API.

jshprentz avatar Aug 12 '22 21:08 jshprentz