[#ScriptHash-2constructor-01] = xref:ScriptHash.adoc[ScriptHash]::ScriptHash :relfileprefix: ../ :mrdocs: Constructors == Synopses Declared in `<addresstype.h>` Construct a null script hash. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:ScriptHash/2constructor-07.adoc[ScriptHash](); ---- [.small]#xref:ScriptHash/2constructor-07.adoc[_» more..._]# Construct a script hash from a script. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:ScriptHash/2constructor-0f.adoc[ScriptHash](xref:CScript.adoc[CScript] const& script); ---- [.small]#xref:ScriptHash/2constructor-0f.adoc[_» more..._]# Construct a script hash from a script identifier. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:ScriptHash/2constructor-0b.adoc[ScriptHash](xref:CScriptID.adoc[CScriptID] const& script); ---- [.small]#xref:ScriptHash/2constructor-0b.adoc[_» more..._]# Deleted: constructing from a public‐key hash is disallowed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:ScriptHash/2constructor-09.adoc[ScriptHash](xref:PKHash.adoc[PKHash] const& hash) = delete; ---- [.small]#xref:ScriptHash/2constructor-09.adoc[_» more..._]# Deleted: constructing from a witness key hash is disallowed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:ScriptHash/2constructor-0d.adoc[ScriptHash](xref:WitnessV0KeyHash.adoc[WitnessV0KeyHash] const& hash) = delete; ---- [.small]#xref:ScriptHash/2constructor-0d.adoc[_» more..._]# Construct a script hash from a raw 160‐bit hash. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:ScriptHash/2constructor-08.adoc[ScriptHash](xref:uint160.adoc[uint160] const& hash); ---- [.small]#xref:ScriptHash/2constructor-08.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *script* | The script to hash. | *hash* | The public‐key hash (unused; deleted overload). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#