-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!(bdk): Update wallet start_sync, start_scan to return new Sy…
…ncRequest, ScanRequest structs Update esplora async_ext sync and scan to use new SyncRequest and ScanRequest
- Loading branch information
1 parent
c97ddef
commit 9e01dee
Showing
5 changed files
with
119 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::local_chain::CheckPoint; | ||
use alloc::vec::Vec; | ||
use bitcoin::{OutPoint, ScriptBuf, Txid}; | ||
use std::collections::BTreeMap; | ||
|
||
/// A list of blockchain entities for which we want to receive any related transaction data. | ||
pub struct SyncRequest { | ||
/// transactions that spend from or two these script pubkeys | ||
pub spks: Vec<ScriptBuf>, | ||
/// Transactions with these txids | ||
pub txids: Vec<Txid>, | ||
/// Transactions with these outpoints or spend from these outpoints | ||
pub outpoints: Vec<OutPoint>, | ||
/// The local chain checkpoint. The sync process will return a new chain that extends this one. | ||
pub checkpoint: Option<CheckPoint>, | ||
} | ||
|
||
/// Script pubkeys indexed by their keychain. | ||
pub struct ScanRequest<K, I> { | ||
/// Iterators of script pubkeys indexed by the keychain index | ||
pub spks_by_keychain: BTreeMap<K, I>, | ||
/// The local chain checkpoint. The scan process will return a new chain that extends this one. | ||
pub checkpoint: Option<CheckPoint>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters