[#XOnlyPubKey-2constructor-00]
= xref:XOnlyPubKey.adoc[XOnlyPubKey]::XOnlyPubKey
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

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

Construct an empty x&hyphen;only pubkey&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:XOnlyPubKey/2constructor-05c.adoc[XOnlyPubKey]() = default;
----

[.small]#xref:XOnlyPubKey/2constructor-05c.adoc[_» more&period;&period;&period;_]#

Copy&hyphen;construct an x&hyphen;only pubkey from another&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:XOnlyPubKey/2constructor-0f.adoc[XOnlyPubKey](xref:XOnlyPubKey.adoc[XOnlyPubKey] const& other) = default;
----

[.small]#xref:XOnlyPubKey/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Construct an x&hyphen;only pubkey from exactly 32 bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
explicit
xref:XOnlyPubKey/2constructor-051.adoc[XOnlyPubKey](std::span&lt;unsigned char const&gt; bytes);
----

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

Construct an x&hyphen;only pubkey from a normal pubkey&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:XOnlyPubKey/2constructor-06.adoc[XOnlyPubKey](xref:CPubKey.adoc[CPubKey] const& pubkey);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The pubkey to copy from&period;
| *bytes*
| The 32&hyphen;byte x coordinate&period;
| *pubkey*
| The full public key whose x coordinate is used&period;
|===


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