[#wallet-LegacyDataSPKM-MigrateToDescriptor]
= xref:wallet.adoc[wallet]::xref:wallet/LegacyDataSPKM.adoc[LegacyDataSPKM]::MigrateToDescriptor
:relfileprefix: ../../
:mrdocs:

Get the DescriptorScriptPubKeyMans (with private keys) that have the same scriptPubKeys as this LegacyDataSPKM&period; Does not modify this LegacyDataSPKM&period;

== Synopsis

Declared in `&lt;wallet&sol;scriptpubkeyman&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;MigrationData&gt;
MigrateToDescriptor();
----

== Return Value

The migration data, or nullopt if migration is not possible&period;


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