File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1846,11 +1846,25 @@ impl<D> Wallet<D> {
18461846 self . persist . staged ( )
18471847 }
18481848
1849+ /// Stages wallet changes in memory for later commit.
1850+ ///
1851+ /// To commit changes to the persistence backend, call [`commit`].
1852+ ///
1853+ /// [`commit`]: Self::commit
1854+ pub fn stage ( & mut self , changeset : ChangeSet ) where D : PersistBackend < ChangeSet > {
1855+ self . persist . stage ( changeset) ;
1856+ }
1857+
18491858 /// Get a reference to the inner [`TxGraph`].
18501859 pub fn tx_graph ( & self ) -> & TxGraph < ConfirmationTimeAnchor > {
18511860 self . indexed_graph . graph ( )
18521861 }
18531862
1863+ /// Get a mutable reference to the inner [`IndexedTxGraph`].
1864+ pub fn mut_indexed_tx_graph ( & mut self ) -> & mut IndexedTxGraph < ConfirmationTimeAnchor , KeychainTxOutIndex < KeychainKind > > {
1865+ & mut self . indexed_graph
1866+ }
1867+
18541868 /// Get a reference to the inner [`KeychainTxOutIndex`].
18551869 pub fn spk_index ( & self ) -> & KeychainTxOutIndex < KeychainKind > {
18561870 & self . indexed_graph . index
@@ -1860,6 +1874,11 @@ impl<D> Wallet<D> {
18601874 pub fn local_chain ( & self ) -> & LocalChain {
18611875 & self . chain
18621876 }
1877+
1878+ /// Get a mutable reference to the inner [`LocalChain`].
1879+ pub fn mut_local_chain ( & mut self ) -> & mut LocalChain {
1880+ & mut self . chain
1881+ }
18631882}
18641883
18651884impl < D > AsRef < bdk_chain:: tx_graph:: TxGraph < ConfirmationTimeAnchor > > for Wallet < D > {
You can’t perform that action at this time.
0 commit comments