Skip to content

Commit 441e27c

Browse files
committed
contract: add Xchain::method method
1 parent d5c3874 commit 441e27c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/contract/seal.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub use bp::seals::txout::blind::{
3131
ChainBlindSeal as GraphSeal, ParseError, SecretSeal, SingleBlindSeal as GenesisSeal,
3232
};
3333
pub use bp::seals::txout::TxoSeal;
34-
use bp::seals::txout::{ExplicitSeal, SealTxid};
34+
use bp::seals::txout::{CloseMethod, ExplicitSeal, SealTxid};
3535
use bp::Txid;
3636
use commit_verify::{strategies, CommitVerify, Conceal, DigestExt, Sha256, UntaggedProtocol};
3737
use strict_encoding::{StrictDecode, StrictDumb, StrictEncode, StrictType, StrictWriter};
@@ -132,6 +132,13 @@ impl<U: ExposedSeal> Xchain<U> {
132132
}
133133
}
134134

135+
pub fn method(self) -> CloseMethod {
136+
match self {
137+
Xchain::Bitcoin(seal) => seal.method(),
138+
Xchain::Liquid(seal) => seal.method(),
139+
}
140+
}
141+
135142
#[inline]
136143
pub fn to_output_seal(self) -> Option<OutputSeal> {
137144
Some(match self {

0 commit comments

Comments
 (0)