v0.6.0
Substreams now supports authenticating by passing X-Api-Key in the Header of the gRPC request, no need for creating JWT anymore (saves one less step in the auth process).
Additionally, Substreams endpoint support native ConnectWeb directly in the browser using the @substreams/node library by using createWebTransport.
What's New?
- Replace Basic Auth => header
X-Api-Key(not JWT token) - Rename header for
User-Agent=>X-User-Agent- add
defaultHeadersInterceptorwhich uses{"X-User-Agent": "@substreams/node"}
- add
- fix
createHeadersInterceptorto include headers as interceptor (previously wasn't adding any headers) - Update examples to use
SUBSTREAMS_API_KEYinstead ofSUBSTREAMS_API_TOKEN
What's Breaking?
- Add custom exports to
node&webTransports- Allows to import
@substreams/nodedirectly in browser application without importing NodeJS specific dependencies
- Allows to import
import { BlockEmitter } from "@substreams/node";
import { createNodeTransport } from "@substreams/node/createNodeTransport";
// or
import { createWebTransport } from "@substreams/node/createWebTransport";What's Changed
- Update auth api key & export to web/node by @DenisCarriere in #11
Full Changelog: v0.5.3...v0.6.0