From 2bae74688e07f64b9682fad7c836c89b490fdd36 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 7 Oct 2022 14:25:21 -0700 Subject: [PATCH] Add `Script::builder` convenience function --- bitcoin/src/blockdata/script.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bitcoin/src/blockdata/script.rs b/bitcoin/src/blockdata/script.rs index fc536f23..0b9af510 100644 --- a/bitcoin/src/blockdata/script.rs +++ b/bitcoin/src/blockdata/script.rs @@ -354,6 +354,11 @@ impl Script { /// Creates a new empty script. pub fn new() -> Script { Script(vec![].into_boxed_slice()) } + /// Creates a new script builder + pub fn builder() -> Builder { + Builder::new() + } + /// Generates P2PK-type of scriptPubkey. pub fn new_p2pk(pubkey: &PublicKey) -> Script { Builder::new()