Reactive view of the running bridge state, surfaced by
DVAIBridge.instance.stateStream. Idiomatic Flutter consumers wrap
this in StreamBuilder<DVAIBridgeState>, a Riverpod
StreamProvider<DVAIBridgeState>, or a Bloc.
ES256 (P-256 ECDSA) public key in JWK form. Mirrors the JS-side
DvaiPublicKeyJwk interface: every other DVAI-Bridge SDK consumes
the same JWK shape so the same .jwt license file works across
platforms.
Had a valid license but exp is past. The validate() API
returns this; validateAndAssert() THROWS
LicenseRequiredException with a FreeExpired status attached.
Production deploy with no valid license. The validate() API
returns this; validateAndAssert() THROWS
LicenseRequiredException with a FreeProd status attached.
Result of license validation. Discriminated sealed-class union so
the consumer's decision tree is exhaustive (Commercial or Trial
→ premium; everything else → free).
Options accepted by LicenseValidator. Mirrors the JS-side
LicenseValidatorOptions interface — extends the discovery
options with key-registry overrides used by tests.
Distributed-inference configuration. Pass to StartOptions.offload
to enable peer-to-peer offload of inference requests when the local
device's hardware can't serve the model fast enough.
One progress event from the native side. Both iOS and Android emit
exactly this shape (see Phase 3F spec §3.5); the fields below are the
union of every variant.
Options for DVAIBridge.start. Shape mirrors the iOS DVAIBridgeConfig
and Android StartOptions 1:1, with backend required and the rest
optional. Per-backend defaults match the underlying SDKs — see the
per-platform docs for the full list.
Stable error-code surface mirrored by iOS DVAIBridgeError cases and
Android DVAIBridgeError subclasses. Consumers switch on the
DVAIBridgeError.kind field to react to failure modes.
Platform identifiers the SDK recognises in license platforms
claims. The wire format matches the JS-side enum string values
exactly so the same JWT can activate multiple SDKs.
Lifecycle mode the SDK would enter on start(). Returned by
DVAIBridge.assessHardware. Matches the kebab-case enum values
used on every other platform so cross-platform consumers see the
same strings regardless of host.
kid reserved for the placeholder key above. The validator refuses
to accept tokens signed with this kid unless the caller explicitly
opts in (allowPlaceholderKey: true passed to the
LicenseValidator constructor). Used by tests and by the sample
license printed by generate-keypair.mjs.
The single error type thrown across the public Dart surface of
dvai_bridge. Sealed so consumers can exhaustively switch on
concrete subtypes; kind mirrors the iOS / Android wire identifier.
Thrown by LicenseValidator.validateAndAssert when an SDK consumer
attempts to run the library in a production / release context
without a valid commercial or trial license.