1. Client Initialization & Regional Routing
Establish authenticated connections with automated retries and OpenTelemetry tracing
All BlackShield SDKs support explicit regional routing (e.g. EU data residency in Ireland `eu-west-1`), automated exponential backoff on 429/5xx errors, and W3C TraceContext header propagation.
import { BlackShieldClient } from "@blackshield/sdk";
// Initialize with environment API key and regional data residency
export const blackshield = new BlackShieldClient({
apiKey: process.env.BLACKSHIELD_API_KEY!,
region: "eu-west-1", // Routes to https://api.eu-west-1.blackshield.chaplau.com
timeoutMs: 30_000,
maxRetries: 3,
enableOpenTelemetry: true, // Injects traceparent & tracestate
});