Signing Requests
ChainStream uses API keys to authenticate all API calls. The Base API URL will be one of the following depending on your workspace environment type:- Mainnet:
https://api.chainstream.io/
Authorization- This value should be set toBearer <Access Token>. The access token is a Base64 encoded JSON Web Token (JWT).
Generating JWT Token
You can generate a JWT token using the following code. Thescope parameter is optional and controls access permissions for specific API modules.
Available Scopes
The following scopes are currently supported:webhook.read- Read access to Webhook API endpointswebhook.write- Write access to Webhook API endpointskyt.read- Read access to KYT (Know Your Transaction) API endpointskyt.write- Write access to KYT API endpoints
If no scope is specified, the token will have access to all general API endpoints. Scopes are only required when accessing protected Webhook or KYT endpoints.
JavaScript
Example 1: Without scope (general API access)Using SDKs
After generating the JWT token, you can use it to initialize the SDK:JavaScript SDK
Make sure to replace the placeholder values with your actual API credentials.

