pub fn p2wsh(script: &script::Script, network: Network) -> Address {
        Address {
            network: network,
            payload: Payload::WitnessProgram {
                version: bech32::u5::try_from_u8(0).expect("0<32"),
                program: sha256::Hash::hash(&script[..])[..].to_vec(),
            },
        }
    }
/// Create a witness pay to script hash address
Create a witness pay to script hash address
Create a witness pay to script hash address
pub fn p2wsh(script: &script::Script, network: Network) -> Address {
        Address {
            network: network,
            payload: Payload::WitnessProgram {
                version: bech32::u5::try_from_u8(0).expect("0<32"),
                program: sha256::Hash::hash(&script[..])[..].to_vec(),
            },
        }
    }
pub fn p2wsh ( script : & script :: Script , network : Network ) -> Address { Address { network : network , payload : Payload :: WitnessProgram { version : bech32 :: u5 :: try_from_u8 ( 0 ) . expect ( " " ) , program : sha256 :: Hash :: hash ( & script [ .. ] ) [ .. ] . to_vec ( ) , } , } }
Create a witness pay to script hash address
Create a witness pay to script hash address
script
&script::Script
network
Network
script
&script::Script
network
Network