[docs] Add docs to the 'descriptor' module
This commit is contained in:
parent
4e771d6546
commit
0f2dc05c08
@ -35,9 +35,9 @@ pub enum Error {
|
|||||||
InvalidHDKeyPath,
|
InvalidHDKeyPath,
|
||||||
|
|
||||||
//KeyParsingError(String),
|
//KeyParsingError(String),
|
||||||
#[allow(missing_docs)]
|
/// Error thrown while working with [`keys`](crate::keys)
|
||||||
Key(crate::keys::KeyError),
|
Key(crate::keys::KeyError),
|
||||||
#[allow(missing_docs)]
|
/// Error while extracting and manipulating policies
|
||||||
Policy(crate::descriptor::policy::PolicyError),
|
Policy(crate::descriptor::policy::PolicyError),
|
||||||
|
|
||||||
//InputIndexDoesntExist,
|
//InputIndexDoesntExist,
|
||||||
@ -47,15 +47,15 @@ pub enum Error {
|
|||||||
InvalidDescriptorCharacter(char),
|
InvalidDescriptorCharacter(char),
|
||||||
|
|
||||||
//CantDeriveWithMiniscript,
|
//CantDeriveWithMiniscript,
|
||||||
#[allow(missing_docs)]
|
/// BIP32 error
|
||||||
BIP32(bitcoin::util::bip32::Error),
|
BIP32(bitcoin::util::bip32::Error),
|
||||||
#[allow(missing_docs)]
|
/// Error during base58 decoding
|
||||||
Base58(bitcoin::util::base58::Error),
|
Base58(bitcoin::util::base58::Error),
|
||||||
#[allow(missing_docs)]
|
/// Key-related error
|
||||||
PK(bitcoin::util::key::Error),
|
PK(bitcoin::util::key::Error),
|
||||||
#[allow(missing_docs)]
|
/// Miniscript error
|
||||||
Miniscript(miniscript::Error),
|
Miniscript(miniscript::Error),
|
||||||
#[allow(missing_docs)]
|
/// Hex decoding error
|
||||||
Hex(bitcoin::hashes::hex::Error),
|
Hex(bitcoin::hashes::hex::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ pub mod checksum;
|
|||||||
mod dsl;
|
mod dsl;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod policy;
|
pub mod policy;
|
||||||
#[allow(missing_docs)] // TODO add missing docs and remove this allow
|
|
||||||
pub mod template;
|
pub mod template;
|
||||||
|
|
||||||
pub use self::checksum::get_checksum;
|
pub use self::checksum::get_checksum;
|
||||||
@ -65,9 +64,9 @@ pub type ExtendedDescriptor = Descriptor<DescriptorPublicKey>;
|
|||||||
/// [`psbt::Output`]: bitcoin::util::psbt::Output
|
/// [`psbt::Output`]: bitcoin::util::psbt::Output
|
||||||
pub type HDKeyPaths = BTreeMap<PublicKey, (Fingerprint, DerivationPath)>;
|
pub type HDKeyPaths = BTreeMap<PublicKey, (Fingerprint, DerivationPath)>;
|
||||||
|
|
||||||
#[allow(missing_docs)] // TODO add missing docs and remove this allow
|
|
||||||
/// Trait for types which can be converted into an [`ExtendedDescriptor`] and a [`KeyMap`] usable by a wallet in a specific [`Network`]
|
/// Trait for types which can be converted into an [`ExtendedDescriptor`] and a [`KeyMap`] usable by a wallet in a specific [`Network`]
|
||||||
pub trait ToWalletDescriptor {
|
pub trait ToWalletDescriptor {
|
||||||
|
/// Convert to wallet descriptor
|
||||||
fn to_wallet_descriptor(
|
fn to_wallet_descriptor(
|
||||||
self,
|
self,
|
||||||
network: Network,
|
network: Network,
|
||||||
@ -187,9 +186,9 @@ impl ToWalletDescriptor for (ExtendedDescriptor, KeyMap, ValidNetworks) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(missing_docs)] // TODO add missing docs and remove this allow
|
|
||||||
/// Trait implemented on [`Descriptor`]s to add a method to extract the spending [`policy`]
|
/// Trait implemented on [`Descriptor`]s to add a method to extract the spending [`policy`]
|
||||||
pub trait ExtractPolicy {
|
pub trait ExtractPolicy {
|
||||||
|
/// Extract the spending [`policy`]
|
||||||
fn extract_policy(
|
fn extract_policy(
|
||||||
&self,
|
&self,
|
||||||
signers: &SignersContainer,
|
signers: &SignersContainer,
|
||||||
|
@ -139,7 +139,7 @@ pub enum SatisfiableItem {
|
|||||||
},
|
},
|
||||||
/// Relative timelock locktime
|
/// Relative timelock locktime
|
||||||
RelativeTimelock {
|
RelativeTimelock {
|
||||||
/// The timelock value
|
/// The locktime value
|
||||||
value: u32,
|
value: u32,
|
||||||
},
|
},
|
||||||
/// Multi-signature public keys with threshold count
|
/// Multi-signature public keys with threshold count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user