This repository contains the scripts used to build Brave's Transparency Report Data which drives pages like brave.com/transparency and basicattentiontoken.org/growth.
Clone and npm install to get started.
Several environment variables will be required for a successful run:
COINBASE_API_KEYCOINBASE_API_SECRETCOINBASE_API_PASSPHRASEGEMINI_API_KEYGEMINI_API_SECRETADS_SERVER_STATS_CREDENTIALBRAVE_MAUDAU_URL
With the environment variables in place, and having already ran npm install, you can now run npm run build or npm run test to build and/or test, respectively. Running the build script will attempt to generate (or overwrite) a local transparency.json file. Running the test script will run the same script with verbose logging enabled, but will make no attempt to save the resulting file.
This project pulls data from various services and providers:
| Provider | API Key Required | Explanation of Use |
|---|---|---|
| Coinbase | ✔ | Querying for previous BAT purchases |
| Gemini | ✔ | Querying for previous BAT purchases |
| Uphold | ✖ | Querying for previous BAT purchase details |
| bravebat.info | ✖ | Creator growth metrics |
| Ethplorer | ✔* | Querying for BAT info and metrics |
| CryptoCompare | ✖ | Querying for historical BAT value data |
| Brave | ✔ | Querying for Ads data and Rewards metrics |
* Ethplorer offers a "freekey" API key for low-traffic, infrequent pings.