Set up the client
Create the one client object you use for everything in the SDK.
Create the client
Create the client once at app startup and reuse the same instance everywhere. Import from @bdk/native/browser or the package root — both work.
Configure the client
Every option is optional with a safe default, so most apps pass nothing. Set removeLoading: "manual" to dismiss the native splash screen yourself, and pass onError to centralize error reporting (it receives a BdkError).
Wait for the app to be ready
Wait for device info at startup before using native features. Pass a timeout to wait that many milliseconds; in a plain browser it resolves to null when the timeout elapses.
Detect native vs. browser
Branch between native-only features and web fallbacks. bdk.isNative() returns true once device info has arrived; bdk.getDeviceInfo() returns the cached BdkDeviceInfo or null. Prefer await bdk.ready(...) first.
Clean up in tests
Tear down the client between instances, such as in tests or when hot-reloading a single-page app. You rarely need this in production.