Skip to content

Descriptor pubkeys fixups #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/descriptor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
//! these with BIP32 paths, pay-to-contract instructions, etc.
//!
use std::fmt;
use std::str::{self, FromStr};
use std::{error, fmt};

use bitcoin::blockdata::{opcodes, script};
use bitcoin::hashes::hash160;
Expand Down Expand Up @@ -104,6 +104,16 @@ impl fmt::Display for DescriptorKeyParseError {
}
}

impl error::Error for DescriptorKeyParseError {
fn description(&self) -> &str {
""
}

fn cause(&self) -> Option<&error::Error> {
None
}
}

impl fmt::Display for DescriptorPublicKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ use std::{error, fmt, hash, str};
use bitcoin::blockdata::{opcodes, script};
use bitcoin::hashes::{hash160, sha256, Hash};

pub use descriptor::{Descriptor, SatisfiedConstraints};
pub use descriptor::{Descriptor, DescriptorPublicKey, SatisfiedConstraints};
pub use miniscript::context::{Legacy, ScriptContext, Segwitv0};
pub use miniscript::decode::Terminal;
pub use miniscript::satisfy::{BitcoinSig, Satisfier};
Expand Down