AddAndGetDestinationForScript

Get a destination of the requested type (if possible) to the specified script. This function will automatically add the script (and any other necessary scripts) to the keystore.

Synopsis

Declared in <outputtype.h>

CTxDestination
AddAndGetDestinationForScript(
    FlatSigningProvider& keystore,
    CScript const& script,
    OutputType type);

Return Value

The destination of the requested type for the script.

Parameters

NameDescription
keystoreThe signing provider that receives the required scripts.
scriptThe script to derive the destination for.
typeThe requested output type.