]> Untitled Git - bdk/commit
feat(wallet)!: introduce `WalletPersister`
author志宇 <hello@evanlinjin.me>
Fri, 9 Aug 2024 16:14:15 +0000 (16:14 +0000)
committer志宇 <hello@evanlinjin.me>
Thu, 15 Aug 2024 04:05:32 +0000 (04:05 +0000)
commit039622fd1de7ee331eceb7a4c77751bd8ecccda0
tree231ca42a9d6cf3a2a209969a6c0e0328b5eaaf2d
parente0822d7a7654a9e0669a43bdd50894872aa49f1a
feat(wallet)!: introduce `WalletPersister`

This replaces `bdk_chain::PersistWith` which wanted to persist anything
(not only `Wallet`), hence, requiring a whole bunch of generic
parameters.

Having `WalletPersister` dedicated to persisting `Wallet` simplifies the
trait by a lot.

In addition, `AsyncWalletPersister` has proper lifetime bounds whereas
`bdk_chain::PersistAsyncWith` did not.
crates/wallet/src/wallet/params.rs
crates/wallet/src/wallet/persisted.rs
crates/wallet/tests/wallet.rs