]> Untitled Git - bdk/commit
feat(wallet)!: add `new_or_load` methods
author志宇 <hello@evanlinjin.me>
Fri, 27 Oct 2023 06:14:25 +0000 (14:14 +0800)
committer志宇 <hello@evanlinjin.me>
Wed, 15 Nov 2023 23:07:48 +0000 (07:07 +0800)
commitd294e2e3189dc14efe5b9916cf83f5e7f8592c64
tree8fd4bdb14222b063493dc37064f42413c0b34aa3
parent7c6cbc4d9f7349e769594151936b3e2947b79d00
feat(wallet)!: add `new_or_load` methods

These methods try to load wallet from persistence and initializes the
wallet instead if non-existant.

An internal helper method `create_signers` is added to reuse code.
Documentation is also improved.
crates/bdk/src/wallet/mod.rs
example-crates/wallet_esplora_async/src/main.rs
example-crates/wallet_esplora_blocking/src/main.rs