FOUR SDK / V1.0.0
Production HTTP client
Copy .env.example to .env for application configuration. The
template defaults to local mode without credentials. The SDK does not automatically
load environment files or read these variables; load them in your application and
pass them explicitly to the client. Treat blank optional values as undefined
(for example, process.env.FOURBTD_API_KEY || undefined). The offline examples
need no .env file. The template is included in the repository, not the npm tarball.
const fourBtd = new FourBTDClient({
apiKey: process.env.FOURBTD_API_KEY,
network: 'solana-devnet',
baseUrl: 'https://your-backend.example.com',
timeoutMs: 15_000,
retries: 2,
backoffMs: 100,
maxBackoffMs: 10_000,
jitter: 0.2,
});An explicit baseUrl is required for non-local clients without a custom transport;
the SDK does not guess a production hostname. Base paths are supported. HTTPS is required
except for HTTP loopback development endpoints. URLs with credentials, queries or fragments
are rejected. Redirects are never followed. Supply server credentials only from a trusted server.
