Skip to content

Commit 0d4206d

Browse files
committed
Remove reference to convenience method in bdk
1 parent ca0f266 commit 0d4206d

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

examples/JWT_AUTH_EXAMPLE.md

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff 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
186157
use bdk_electrum::BdkElectrumClient;

0 commit comments

Comments
 (0)