pub fn p2shwsh(script: &script::Script, network: Network) -> Address {
        let ws = script::Builder::new()
            .push_int(0)
            .push_slice(&sha256::Hash::hash(&script[..])[..])
            .into_script();

        Address {
            network: network,
            payload: Payload::ScriptHash(hash160::Hash::hash(&ws[..])),
        }
    }
/// Create a pay to script address that embeds a witness pay to script hash address
/// This is a segwit address type that looks familiar (as p2sh) to legacy clients
Create a pay to script address that embeds a witness pay to script hash address
This is a segwit address type that looks familiar (as p2sh) to legacy clients
Create a pay to script address that embeds a witness pay to script hash address This is a segwit address type that looks familiar ( as p2sh ) to legacy clients
pub fn p2shwsh(script: &script::Script, network: Network) -> Address {
        let ws = script::Builder::new()
            .push_int(0)
            .push_slice(&sha256::Hash::hash(&script[..])[..])
            .into_script();
        Address {
            network: network,
            payload: Payload::ScriptHash(hash160::Hash::hash(&ws[..])),
        }
    }
pub fn p2shwsh ( script : & script :: Script , network : Network ) -> Address { let ws = script :: Builder :: new ( ) . push_int ( 0 ) . push_slice ( & sha256 :: Hash :: hash ( & script [ .. ] ) [ .. ] ) . into_script ( ) ; Address { network : network , payload : Payload :: ScriptHash ( hash160 :: Hash :: hash ( & ws [ .. ] ) ) , } }
Create a pay to script address that embeds a witness pay to script hash address
This is a segwit address type that looks familiar (as p2sh) to legacy clients
Create a pay to script address that embeds a witness pay to script hash address This is a segwit address type that looks familiar ( as p2sh ) to legacy clients
script
&script::Script
network
Network
script
&script::Script
network
Network