BellaClientOptions class

Options for initializing a BellaClient.

Provide exactly one of apiKey or accessToken:

  • apiKey: HMAC-signed auth (bax-<keyId>-<signingSecret> format).
  • accessToken: Bearer JWT auth (injected by bella exec in SSO/OAuth mode).

Constructors

BellaClientOptions({String baseUrl = 'https://api.bella-baxter.io', String? apiKey, String? accessToken, String? appClient, Duration connectTimeout = const Duration(seconds: 10), Duration receiveTimeout = const Duration(seconds: 30), SecretCache? cache, Uint8List? privateKey, void onWrappedDekReceived(String, String, String, DateTime?)?})

Properties

accessToken String?
Short-lived JWT access token. Injected as BELLA_BAXTER_ACCESS_TOKEN by bella exec in SSO mode. Mutually exclusive with apiKey.
final
apiKey String?
API key in bax-<keyId>-<signingSecretHex> format. Mutually exclusive with accessToken.
final
appClient String?
Optional app name sent as X-App-Client header for audit logs. Falls back to the BELLA_BAXTER_APP_CLIENT env var.
final
baseUrl String
The base URL of the Bella Baxter API. Defaults to 'https://api.bella-baxter.io' (hosted cloud). Override for self-hosted deployments.
final
cache SecretCache?
Optional encrypted cache.
final
connectTimeout Duration
Connection timeout (default: 10 seconds).
final
hashCode int
The hash code for this object.
no setterinherited
onWrappedDekReceived → void Function(String, String, String, DateTime?)?
Optional callback invoked when the server returns an X-Bella-Wrapped-Dek response header (ZKE key-wrapping flow).
final
privateKey Uint8List?
Optional PKCS#8 DER bytes for ZKE (Zero-Knowledge Encryption) mode.
final
receiveTimeout Duration
Receive timeout (default: 30 seconds).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited