[docs] Various fixes to the docs
This commit is contained in:
parent
a1db9f633b
commit
9bafdfe2d4
@ -95,7 +95,7 @@ pub trait BlockchainMarker {}
|
||||
/// The [`BlockchainMarker`] marker trait is automatically implemented for [`Blockchain`] types
|
||||
impl<T: Blockchain> BlockchainMarker for T {}
|
||||
|
||||
/// Type that only implements [`Blockchain`] and is always "offline"
|
||||
/// Type that only implements [`BlockchainMarker`] and is always "offline"
|
||||
pub struct OfflineBlockchain;
|
||||
impl BlockchainMarker for OfflineBlockchain {}
|
||||
|
||||
|
@ -201,7 +201,8 @@ macro_rules! impl_sortedmulti {
|
||||
|
||||
/// Macro to write full descriptors with code
|
||||
///
|
||||
/// This macro expands to an object of type `Result<(Descriptor<DescriptorPublicKey>, KeyMap, ValidNetworks), Error>`.
|
||||
/// This macro expands to a `Result` of
|
||||
/// [`DescriptorTemplateOut`](super::template::DescriptorTemplateOut) and [`Error`](crate::Error)
|
||||
///
|
||||
/// ## Example
|
||||
///
|
||||
|
@ -52,7 +52,8 @@ pub mod template;
|
||||
pub use self::checksum::get_checksum;
|
||||
use self::error::Error;
|
||||
pub use self::policy::Policy;
|
||||
use crate::keys::{KeyError, ToDescriptorKey, ValidNetworks};
|
||||
use self::template::DescriptorTemplateOut;
|
||||
use crate::keys::{KeyError, ToDescriptorKey};
|
||||
use crate::wallet::signer::SignersContainer;
|
||||
use crate::wallet::utils::{descriptor_to_pk_ctx, SecpCtx};
|
||||
|
||||
@ -151,7 +152,7 @@ impl ToWalletDescriptor for (ExtendedDescriptor, KeyMap) {
|
||||
}
|
||||
}
|
||||
|
||||
impl ToWalletDescriptor for (ExtendedDescriptor, KeyMap, ValidNetworks) {
|
||||
impl ToWalletDescriptor for DescriptorTemplateOut {
|
||||
fn to_wallet_descriptor(
|
||||
self,
|
||||
network: Network,
|
||||
|
@ -36,8 +36,10 @@ use bip39::{Language, Mnemonic, MnemonicType, Seed};
|
||||
|
||||
use super::{any_network, DerivableKey, DescriptorKey, GeneratableKey, GeneratedKey, KeyError};
|
||||
|
||||
/// Type for a BIP39 mnemonic with an optional passphrase
|
||||
pub type MnemonicWithPassphrase = (Mnemonic, Option<String>);
|
||||
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "keys-bip39")))]
|
||||
impl<Ctx: ScriptContext> DerivableKey<Ctx> for Seed {
|
||||
fn add_metadata(
|
||||
self,
|
||||
@ -54,6 +56,7 @@ impl<Ctx: ScriptContext> DerivableKey<Ctx> for Seed {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "keys-bip39")))]
|
||||
impl<Ctx: ScriptContext> DerivableKey<Ctx> for MnemonicWithPassphrase {
|
||||
fn add_metadata(
|
||||
self,
|
||||
@ -66,6 +69,7 @@ impl<Ctx: ScriptContext> DerivableKey<Ctx> for MnemonicWithPassphrase {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "keys-bip39")))]
|
||||
impl<Ctx: ScriptContext> DerivableKey<Ctx> for Mnemonic {
|
||||
fn add_metadata(
|
||||
self,
|
||||
@ -76,6 +80,7 @@ impl<Ctx: ScriptContext> DerivableKey<Ctx> for Mnemonic {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "keys-bip39")))]
|
||||
impl<Ctx: ScriptContext> GeneratableKey<Ctx> for Mnemonic {
|
||||
type Entropy = [u8; 32];
|
||||
|
||||
|
@ -257,8 +257,9 @@ impl OutputGroup {
|
||||
}
|
||||
}
|
||||
|
||||
/// Branch and bound coin selection. Code adapted from Bitcoin Core's implementation and from Mark
|
||||
/// Erhardt Master's Thesis (http://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf)
|
||||
/// Branch and bound coin selection
|
||||
///
|
||||
/// Code adapted from Bitcoin Core's implementation and from Mark Erhardt Master's Thesis: <http://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf>
|
||||
#[derive(Debug)]
|
||||
pub struct BranchAndBoundCoinSelection {
|
||||
size_of_change: u64,
|
||||
|
Loading…
x
Reference in New Issue
Block a user