Expose Script.to_bytes() method
This commit is contained in:
parent
5092987b26
commit
3cb2c2c394
@ -496,4 +496,6 @@ enum WitnessVersion {
|
||||
|
||||
interface Script {
|
||||
constructor(sequence<u8> raw_output_script);
|
||||
|
||||
sequence<u8> to_bytes();
|
||||
};
|
||||
|
@ -438,6 +438,10 @@ impl Script {
|
||||
let script: BdkScript = BdkScript::from(raw_output_script);
|
||||
Script { script }
|
||||
}
|
||||
|
||||
fn to_bytes(&self) -> Vec<u8> {
|
||||
self.script.to_bytes()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BdkScript> for Script {
|
||||
|
Loading…
x
Reference in New Issue
Block a user