[#ExtractDestination] = ExtractDestination :mrdocs: Parse a scriptPubKey for the destination. == Synopsis Declared in `<addresstype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool ExtractDestination( xref:CScript.adoc[CScript] const& scriptPubKey, xref:CTxDestination.adoc[CTxDestination]& addressRet); ---- == Description For standard scripts that have addresses (and P2PK as an exception), a corresponding CTxDestination is assigned to addressRet. For all other scripts. addressRet is assigned as a CNoDestination containing the scriptPubKey. == Return Value True for standard destinations with addresses ‐ P2PKH, P2SH, P2WPKH, P2WSH, P2TR and P2W??? scripts. False for non‐standard destinations and those without addresses ‐ P2PK, bare multisig, null data, and nonstandard scripts. == Parameters [cols="1,4"] |=== | Name| Description | *scriptPubKey* | The output script to parse. | *addressRet* | Receives the extracted destination. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#