diff --git a/examples/pset_blind_coinjoin.rs b/examples/pset_blind_coinjoin.rs index 66ae0abd..333710f9 100644 --- a/examples/pset_blind_coinjoin.rs +++ b/examples/pset_blind_coinjoin.rs @@ -8,6 +8,7 @@ //! 6. A signs it's input //! 7. A finalizes the pset //! 8. A extracts and broadcasts the transaction +//! //! During the entire interaction, the output blinding factors for A and B are not //! shared with each other. extern crate bitcoin; diff --git a/src/opcodes.rs b/src/opcodes.rs index d8e0bcad..03c4025a 100644 --- a/src/opcodes.rs +++ b/src/opcodes.rs @@ -459,10 +459,10 @@ pub mod all { pub const OP_INSPECTINPUTVALUE: All = All {code: 0xc9}; /// Pop a CScriptNum input index idx and push the following depending the type of scriptPubkey: /// - If the scriptPubKey is not a native segwit program, push a single sha256 - /// hash of the scriptPubKey on stack top. Next, push a CScriptNum(-1) to - /// indicate a non-native segwit scriptPubKey. + /// hash of the scriptPubKey on stack top. Next, push a CScriptNum(-1) to + /// indicate a non-native segwit scriptPubKey. /// - If the scriptPubKey is a native segwit program, push the witness program(2-40) - /// followed by a push for segwit version(0-1). + /// followed by a push for segwit version(0-1). pub const OP_INSPECTINPUTSCRIPTPUBKEY: All = All {code: 0xca}; /// Pop a CScriptNum input index idx and push the nSequence(4) as little-endian number. pub const OP_INSPECTINPUTSEQUENCE: All = All {code: 0xcb}; @@ -544,6 +544,7 @@ pub mod all { /// 1) a 32 byte big endian, unsigned scalar k. /// 2) Compressed EC point P, and /// 3) compressed EC point Q. + /// /// Abort if P, Q is invalid or k is not 32 bytes and outside of secp256k1 curve order. /// Abort if Q != k*P. pub const OP_ECMULSCALARVERIFY: All = All {code: 0xe3}; diff --git a/src/schnorr.rs b/src/schnorr.rs index d2921843..66b3bf07 100644 --- a/src/schnorr.rs +++ b/src/schnorr.rs @@ -116,6 +116,7 @@ impl TapTweak for UntweakedKeypair { /// * p is the internal private key /// * H is the hash function /// * c is the commitment data + /// /// The public key is generated from a private key by multiplying with generator point, Q = qG. /// /// # Returns diff --git a/src/taproot.rs b/src/taproot.rs index 37f6f393..a336f621 100644 --- a/src/taproot.rs +++ b/src/taproot.rs @@ -621,7 +621,7 @@ impl ControlBlock { /// /// # Errors: /// - If the control block size is not of the form 33 + 32m where - /// 0 <= m <= 128, InvalidControlBlock is returned + /// 0 <= m <= 128, InvalidControlBlock is returned pub fn from_slice(sl: &[u8]) -> Result { if sl.len() < TAPROOT_CONTROL_BASE_SIZE || (sl.len() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE != 0