File tree Expand file tree Collapse file tree 1 file changed +1
-30
lines changed
Expand file tree Collapse file tree 1 file changed +1
-30
lines changed Original file line number Diff line number Diff line change @@ -151,36 +151,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
151151
152152## Integration with BDK
153153
154- ### Using BDK's Convenience Constructor (Recommended)
155-
156- ``` rust
157- use bdk_electrum :: {BdkElectrumClient , ConfigBuilder };
158- use std :: sync :: Arc ;
159-
160- // Assuming you have a TokenManager as shown above
161- fn create_bdk_client (
162- token_manager : Arc <KeycloakTokenManager >
163- ) -> Result <BdkElectrumClient <electrum_client :: Client >, Box <dyn std :: error :: Error >> {
164-
165- let config = ConfigBuilder :: new ()
166- . authorization_provider (Some (Arc :: new (move || {
167- token_manager . get_token ()
168- })))
169- . build ();
170-
171- // BDK provides a from_config() convenience method
172- let bdk_client = BdkElectrumClient :: from_config (
173- " tcp://your-api-gateway:50001" ,
174- config
175- )? ;
176-
177- Ok (bdk_client )
178- }
179- ```
180-
181- ### Alternative: Manual Construction
182-
183- If you need more control over the underlying client:
154+ To use with BDK, create the electrum client with your config, then wrap it:
184155
185156``` rust
186157use bdk_electrum :: BdkElectrumClient ;
You can’t perform that action at this time.
0 commit comments