Struct bdk_wallet::ChangeSet
source · #[non_exhaustive]pub struct ChangeSet {
pub descriptor: Option<Descriptor<DescriptorPublicKey>>,
pub change_descriptor: Option<Descriptor<DescriptorPublicKey>>,
pub network: Option<Network>,
pub local_chain: ChangeSet,
pub tx_graph: ChangeSet<ConfirmationBlockTime>,
pub indexer: ChangeSet,
}
Expand description
A changeset for Wallet
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.descriptor: Option<Descriptor<DescriptorPublicKey>>
Descriptor for recipient addresses.
change_descriptor: Option<Descriptor<DescriptorPublicKey>>
Descriptor for change addresses.
network: Option<Network>
Stores the network type of the transaction data.
local_chain: ChangeSet
Changes to the LocalChain
.
tx_graph: ChangeSet<ConfirmationBlockTime>
Changes to TxGraph
.
indexer: ChangeSet
Changes to KeychainTxOutIndex
.
Implementations§
source§impl ChangeSet
impl ChangeSet
sourcepub const WALLET_SCHEMA_NAME: &'static str = "bdk_wallet"
pub const WALLET_SCHEMA_NAME: &'static str = "bdk_wallet"
Schema name for wallet.
sourcepub const WALLET_TABLE_NAME: &'static str = "bdk_wallet"
pub const WALLET_TABLE_NAME: &'static str = "bdk_wallet"
Name of table to store wallet descriptors and network.
sourcepub fn init_sqlite_tables(db_tx: &Transaction<'_>) -> Result<()>
pub fn init_sqlite_tables(db_tx: &Transaction<'_>) -> Result<()>
Initialize sqlite tables for wallet tables.
sourcepub fn from_sqlite(db_tx: &Transaction<'_>) -> Result<Self>
pub fn from_sqlite(db_tx: &Transaction<'_>) -> Result<Self>
Recover a ChangeSet
from sqlite database.
sourcepub fn persist_to_sqlite(&self, db_tx: &Transaction<'_>) -> Result<()>
pub fn persist_to_sqlite(&self, db_tx: &Transaction<'_>) -> Result<()>
Persist ChangeSet
to sqlite database.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ChangeSet
impl<'de> Deserialize<'de> for ChangeSet
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ChangeSet
impl PartialEq for ChangeSet
impl StructuralPartialEq for ChangeSet
Auto Trait Implementations§
impl !Freeze for ChangeSet
impl RefUnwindSafe for ChangeSet
impl Send for ChangeSet
impl Sync for ChangeSet
impl Unpin for ChangeSet
impl UnwindSafe for ChangeSet
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more