Bitcoin Core 28.99.0
P2P Digital Currency
|
Enables interaction with an external signing device or service, such as a hardware wallet. More...
#include <external_signer.h>
Public Member Functions | |
ExternalSigner (const std::string &command, const std::string chain, const std::string &fingerprint, const std::string name) | |
UniValue | DisplayAddress (const std::string &descriptor) const |
Display address on the device. More... | |
UniValue | GetDescriptors (const int account) |
Get receive and change Descriptor(s) from device for a given account. More... | |
bool | SignTransaction (PartiallySignedTransaction &psbt, std::string &error) |
Sign PartiallySignedTransaction on the device. More... | |
Static Public Member Functions | |
static bool | Enumerate (const std::string &command, std::vector< ExternalSigner > &signers, const std::string chain) |
Obtain a list of signers. More... | |
Public Attributes | |
std::string | m_fingerprint |
Master key fingerprint of the signer. More... | |
std::string | m_name |
Name of signer. More... | |
Private Member Functions | |
std::string | NetworkArg () const |
Private Attributes | |
std::string | m_command |
The command which handles interaction with the external signer. More... | |
std::string | m_chain |
Bitcoin mainnet, testnet, etc. More... | |
Enables interaction with an external signing device or service, such as a hardware wallet.
See doc/external-signer.md
Definition at line 18 of file external_signer.h.
ExternalSigner::ExternalSigner | ( | const std::string & | command, |
const std::string | chain, | ||
const std::string & | fingerprint, | ||
const std::string | name | ||
) |
[in] | command | the command which handles interaction with the external signer |
[in] | fingerprint | master key fingerprint of the signer |
[in] | chain | "main", "test", "regtest" or "signet" |
[in] | name | device name |
Definition at line 18 of file external_signer.cpp.
UniValue ExternalSigner::DisplayAddress | ( | const std::string & | descriptor | ) | const |
Display address on the device.
Calls <command> displayaddress --desc <descriptor>
.
[in] | descriptor | Descriptor specifying which address to display. Must include a public key or xpub, as well as key origin. |
Definition at line 63 of file external_signer.cpp.
|
static |
Obtain a list of signers.
Calls <command> enumerate
.
[in] | command | the command which handles interaction with the external signer |
[in,out] | signers | vector to which new signers (with a unique master key fingerprint) are added |
chain | "main", "test", "regtest" or "signet" |
Definition at line 25 of file external_signer.cpp.
UniValue ExternalSigner::GetDescriptors | ( | const int | account | ) |
Get receive and change Descriptor(s) from device for a given account.
Calls <command> getdescriptors --account <account>
[in] | account | which BIP32 account to use (e.g. ‘m/44’/0'/account'`) |
Definition at line 68 of file external_signer.cpp.
|
private |
bool ExternalSigner::SignTransaction | ( | PartiallySignedTransaction & | psbt, |
std::string & | error | ||
) |
Sign PartiallySignedTransaction on the device.
Calls <command> signtransaction
and passes the PSBT via stdin.
[in,out] | psbt | PartiallySignedTransaction to be signed |
Definition at line 73 of file external_signer.cpp.
|
private |
Bitcoin mainnet, testnet, etc.
Definition at line 25 of file external_signer.h.
|
private |
The command which handles interaction with the external signer.
Definition at line 22 of file external_signer.h.
std::string ExternalSigner::m_fingerprint |
Master key fingerprint of the signer.
Definition at line 37 of file external_signer.h.
std::string ExternalSigner::m_name |
Name of signer.
Definition at line 40 of file external_signer.h.