Authentication
StreamingFast Substreams authentication reference
Running a Substreams involves sending your package (.spkg
) to a a Substreams provider for execution. Usually, the Substreams provider will require you to authenticate to avoid abuses on the service.
Authentication with The Graph Market
You can directly authenticate with The Graph Market (https://thegraph.market) by creating a new API key and obtaining the corresponding JWT token.
Get the JWT Token
Navigate to the https://thegraph.market. Log in your account or create a new account if you don't have one.
Click on
Dashboard
or nagivate to https://thegraph.market/dashboard.
Then, click on
Create New Key
. You will be provided with a JWT token. Copy and save this token in a safe place.
Use the JWT Token
Once you have your JWT token, you can you it to consume data in Substreams. By default, the Substreams execution will inspect the SUBSTREAMS_API_TOKEN
environment variable in your computer looking for a valid JWT token.
Setting the local environment variable might vary depending on your operating system. For Unix-like operating systems (Mac and Linux):
Open a command-line terminal.
Run the following command.
Just replace <YOUR-JWT-TOKEN>
with the actual JWT token.
Verify the Authentication Works
To verify that everything works correctly, you can run a pre-built Substreams. In the following example, you run the ERC20 Balance Changes Substreams against the Ethereum Mainnet endpoint (mainnet.eth.streamingfast.io:443
) of StreamingFast.
The StreamingFast team is also available on Discord to help you.
Last updated