[#btck-ScriptPubkeyApi-02]
= xref:btck.adoc[btck]::ScriptPubkeyApi
:relfileprefix: ../
:mrdocs:

CRTP mixin adding script&hyphen;pubkey operations shared by the view and owning types&period;

== Synopsis

Declared in `&lt;kernel&sol;bitcoinkernel&lowbar;wrapper&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Derived&gt;
class ScriptPubkeyApi;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:btck/ScriptPubkeyApi-02/ToBytes.adoc[`ToBytes`] 
| Serializes the script pubkey to its raw bytes&period;
| xref:btck/ScriptPubkeyApi-02/Verify.adoc[`Verify`] 
| Verifies a spending input against this script pubkey&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `Derived`
| 
|===

== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:btck/ScriptPubkey.adoc[`ScriptPubkey`] 
| Owning wrapper over a `btck&lowbar;ScriptPubkey` output script&period;
| xref:btck/ScriptPubkeyView.adoc[`ScriptPubkeyView`] 
| Non&hyphen;owning view over a `btck&lowbar;ScriptPubkey`&period;
|===


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