Skip to content

Commit

Permalink
Strict encoding for PSBTs
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jun 14, 2020
1 parent efab4fa commit 0def469
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ miniscript = { git = "https://github.com/LNP-BP/rust-miniscript", branch = "stag
default = ["tor", "lnp", "tokio", "log", "url"]
all = ["tor", "lnp", "tokio", "log", "url", "parse_arg",
"rgb", "daemons", "serde", "keygen", "websockets"]
lnp = ["lightning", "zmq"]
lnp = ["lightning", "async", "zmq"]
async = ["async-trait"]
rgb = ["bulletproofs", "petgraph"]
tor = ["torut/v3", "torut/v2"]
Expand Down
5 changes: 5 additions & 0 deletions src/bp/strict_encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use super::{blind::OutpointHash, blind::OutpointReveal, Network, ShortId};
use crate::strict_encoding::{self, Error, StrictDecode, StrictEncode};
use bitcoin::hashes::{hash160, sha256, sha256d};
use bitcoin::util::psbt::PartiallySignedTransaction;
use bitcoin::{secp256k1, util::bip32, OutPoint, Txid, XpubIdentifier};
use std::io;

Expand All @@ -37,6 +38,10 @@ impl strict_encoding::Strategy for hash160::Hash {
type Strategy = strict_encoding::strategies::HashFixedBytes;
}

impl strict_encoding::Strategy for PartiallySignedTransaction {
type Strategy = strict_encoding::strategies::BitcoinConsensus;
}

impl StrictEncode for secp256k1::PublicKey {
type Error = Error;

Expand Down

0 comments on commit 0def469

Please sign in to comment.