@thenamespace/offchain-manager 1.1.3, the latest release. See the Offchain SDK changelog for earlier versions.
- npm
- Yarn
Creating a Client
To interact with the Offchain SDK, create a client instance. You can obtain your API key from the Namespace App.- Default
- Network Configuration
- Address-based API Key
- Domain-based API Keys
Configuration Options
mode: Network mode - choose between “mainnet” for production or “sepolia” for testingtimeout: Request timeout in milliseconds (optional)defaultApiKey: Address-based API key for all domains registered to your addressdomainApiKeys: Object mapping specific ENS domains to their API keyscustomHeaders: HTTP headers sent with every request, such as a trace ID (optional). You can also set them later withclient.setCustomHeaders(headers). The API key travels in thex-auth-tokenheader, so anx-auth-tokenvalue here replaces it.backendUri: Custom backend URL (optional). Defaults to the Namespace API for the selectedmode.
timeout comes from.
