Skip to main content

Module context

Module context 

Source
Expand description

Runtime context shared by every command.

Builds the QuicknodeSdk from GlobalArgs and attaches an OutputCtx.

Structs§

Ctx
GlobalArgs
Top-level flags inherited by every subcommand.

Functions§

sdk_config
Base SDK config shared by every construction site (Ctx::from_global and the auth commands): the API key plus the CLI User-Agent. Custom headers in HttpConfig override SDK-managed headers of the same name, which is the SDK’s supported way to replace its auto-generated User-Agent.
sdk_config_with_base
Like sdk_config but also honors an optional --base-url override. Used by the auth commands, which build the SDK outside Ctx.
user_agent
The User-Agent sent with every API request. Mirrors the SDK’s own shape (quicknode-sdk-<lang>/<ver> (<os>-<arch>; …)) with the CLI as the product: quicknode-cli/<version> (<os>-<arch>).