This example consumes a Substreams package (specifically, the Ethereum Explorer) using the Substreams JS library in NodeJS.
The API token is provided through an environment variable:
const TOKEN = process.env.SUBSTREAMS_API_TOKEN
If you don't have it, set the SUBSTREAMS_API_TOKEN
environment variable. Then, you can easily get started:
-
Install the dependencies.
npm install
-
Run the script.
node index.js