]> Untitled Git - bdk/commitdiff
Add small clarification to docs
authorthunderbiscuit <thunderbiscuit@protonmail.com>
Thu, 19 Jan 2023 20:03:37 +0000 (15:03 -0500)
committerthunderbiscuit <thunderbiscuit@protonmail.com>
Tue, 31 Jan 2023 02:35:35 +0000 (21:35 -0500)
examples/compiler.rs
src/descriptor/template.rs
src/keys/mod.rs
src/psbt/mod.rs
src/types.rs
src/wallet/mod.rs

index 2ddabffd30ea3d9db88390828be74ee2340642b1..e17feb3ad752eb93c299ec1ab8e74f81d744b5c3 100644 (file)
@@ -29,7 +29,7 @@ use bdk::wallet::AddressIndex::New;
 use bdk::{KeychainKind, Wallet};
 
 /// Miniscript policy is a high level abstraction of spending conditions. Defined in the
-/// rust-miscript library here  https://docs.rs/miniscript/7.0.0/miniscript/policy/index.html
+/// rust-miniscript library here  https://docs.rs/miniscript/7.0.0/miniscript/policy/index.html
 /// rust-miniscript provides a `compile()` function that can be used to compile any miniscript policy
 /// into a descriptor. This descriptor then in turn can be used in bdk a fully functioning wallet
 /// can be derived from the policy.
index 3bd2c59e30ff123757ab8b2fbb5a3866fa9edcd9..060cd997112ba7d85dc09a06c305a289109a7865 100644 (file)
@@ -287,7 +287,7 @@ impl<K: DerivableKey<Segwitv0>> DescriptorTemplate for Bip49<K> {
 
 /// BIP49 public template. Expands to `sh(wpkh(key/{0,1}/*))`
 ///
-/// This assumes that the key used has already been derived with `m/49'/0'/0'`.
+/// This assumes that the key used has already been derived with `m/49'/0'/0'` for Mainnet or `m/49'/1'/0'` for Testnet.
 ///
 /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs.
 ///
@@ -366,7 +366,7 @@ impl<K: DerivableKey<Segwitv0>> DescriptorTemplate for Bip84<K> {
 
 /// BIP84 public template. Expands to `wpkh(key/{0,1}/*)`
 ///
-/// This assumes that the key used has already been derived with `m/84'/0'/0'`.
+/// This assumes that the key used has already been derived with `m/84'/0'/0'` for Mainnet or `m/84'/1'/0'` for Testnet.
 ///
 /// This template requires the parent fingerprint to populate correctly the metadata of PSBTs.
 ///
index da541e1c5c83aceba8f317da8defef2482a5c705..7c57b376f71b34872310dd5c0683c02822ce100a 100644 (file)
@@ -40,7 +40,7 @@ pub mod bip39;
 /// Set of valid networks for a key
 pub type ValidNetworks = HashSet<Network>;
 
-/// Create a set containing mainnet, testnet and regtest
+/// Create a set containing mainnet, testnet, signet, and regtest
 pub fn any_network() -> ValidNetworks {
     vec![
         Network::Bitcoin,
@@ -95,7 +95,7 @@ impl<Ctx: ScriptContext> DescriptorKey<Ctx> {
     }
 
     // This method is used internally by `bdk::fragment!` and `bdk::descriptor!`. It has to be
-    // public because it is effectively called by external crates, once the macros are expanded,
+    // public because it is effectively called by external crates once the macros are expanded,
     // but since it is not meant to be part of the public api we hide it from the docs.
     #[doc(hidden)]
     pub fn extract(
@@ -375,7 +375,7 @@ impl<Ctx: ScriptContext> From<bip32::ExtendedPrivKey> for ExtendedKey<Ctx> {
 /// `(DerivableKey, KeySource, DerivationPath)` tuples.
 ///
 /// For key types that don't encode any indication about the path to use (like bip39), it's
-/// generally recommended to implemented this trait instead of [`IntoDescriptorKey`]. The same
+/// generally recommended to implement this trait instead of [`IntoDescriptorKey`]. The same
 /// rules regarding script context and valid networks apply.
 ///
 /// ## Examples
index b6119a443a4cf89b03c58c6654fdb6c5b78f09b2..04aa84160018f8ee96dd48e108daf13556d20182 100644 (file)
@@ -22,7 +22,7 @@ pub trait PsbtUtils {
     /// Get the `TxOut` for the specified input index, if it doesn't exist in the PSBT `None` is returned.
     fn get_utxo_for(&self, input_index: usize) -> Option<TxOut>;
 
-    /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats.
+    /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in sats.
     /// If the PSBT is missing a TxOut for an input returns None.
     fn fee_amount(&self) -> Option<u64>;
 
index 631c93b3140534d5bbdc901d83450642d0696d35..cd2ad5b36825b47195025ddb9653ef65861bede4 100644 (file)
@@ -230,7 +230,6 @@ pub struct TransactionDetails {
     pub transaction: Option<Transaction>,
     /// Transaction id
     pub txid: Txid,
-
     /// Received value (sats)
     /// Sum of owned outputs of this transaction.
     pub received: u64,
@@ -242,7 +241,7 @@ pub struct TransactionDetails {
     /// Server backend, but it could be `None` with a Bitcoin RPC node without txindex that receive
     /// funds while offline.
     pub fee: Option<u64>,
-    /// If the transaction is confirmed, contains height and timestamp of the block containing the
+    /// If the transaction is confirmed, contains height and Unix timestamp of the block containing the
     /// transaction, unconfirmed transaction contains `None`.
     pub confirmation_time: Option<BlockTime>,
 }
index f65440e178ad84158e36f6af039abf163b9b20bc..eb344bf6632ef614c14fff42b10732b333fca451 100644 (file)
@@ -132,7 +132,7 @@ pub enum AddressIndex {
     Reset(u32),
 }
 
-/// A derived address and the index it was found at
+/// A derived address and the index it was found at.
 /// For convenience this automatically derefs to `Address`
 #[derive(Debug, PartialEq, Eq)]
 pub struct AddressInfo {