Expand description
DKB (Deutsche Kreditbank) high-level API.
Provides a clean, bank-specific entry point for DKB FinTS operations. All methods use the typestate Dialog under the hood — you cannot misuse them.
§Interactive two-step flow
use fints::{dkb, Account, UserId, Pin, ProductId};
// Step 1: Connect and get TAN challenge
let (session, challenge) = dkb::connect(
&UserId::new("username"), &Pin::new("pin"), &ProductId::new("PRODUCT_ID"), None,
).await?;
println!("Please confirm in your banking app: {}", challenge.challenge);
// Step 2: Create a validated account (BIC required — compile-time safety)
let account = Account::new("DE12345678901234", "BYLADEM1001")?;
// Step 3: After user confirms, fetch data
let result = session.fetch(&account, 365).await?;
println!("Balance: {:?}", result.balance);
println!("{} transactions", result.transactions.len());Re-exports§
pub use crate::workflow::FetchResult as SyncData;
Structs§
- Challenge
- Challenge information returned from
connect().
Enums§
- Session
- A DKB session in progress. Wraps the dialog state machine.
Functions§
- connect
- Connect to DKB and get a TAN challenge.