[#ScriptHash-2constructor-01]
= xref:ScriptHash.adoc[ScriptHash]::ScriptHash
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;addresstype&period;h&gt;`

Construct a null script hash&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ScriptHash/2constructor-07.adoc[ScriptHash]();
----

[.small]#xref:ScriptHash/2constructor-07.adoc[_» more&period;&period;&period;_]#

Construct a script hash from a script&period;


[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&period;&period;&period;_]#

Construct a script hash from a script identifier&period;


[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&period;&period;&period;_]#

Deleted&colon; constructing from a public&hyphen;key hash is disallowed&period;


[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&period;&period;&period;_]#

Deleted&colon; constructing from a witness key hash is disallowed&period;


[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&period;&period;&period;_]#

Construct a script hash from a raw 160&hyphen;bit hash&period;


[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&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *script*
| The script to hash&period;
| *hash*
| The public&hyphen;key hash (unused&semi; deleted overload)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
