Struct bitcoin_psbt::ExternalSigner
source · pub struct ExternalSigner { /* private fields */ }
Expand description
| Enables interaction with an external signing | device or service, such as a hardware | wallet. See doc/external-signer.md
Implementations§
source§impl ExternalSigner
impl ExternalSigner
sourcepub fn new(
command: &String,
chain: String,
fingerprint: &String,
name: String
) -> Self
pub fn new( command: &String, chain: String, fingerprint: &String, name: String ) -> Self
| @param[in] command | | the command which handles interaction | with the external signer | ––––– | @param[in] fingerprint | | master key fingerprint of the signer | ––––– | @param[in] chain | | “main”, “test”, “regtest” or “signet” | ––––– | @param[in] name | | device name |
pub fn network_arg(&self) -> String
sourcepub fn enumerate(
&mut self,
command: &String,
signers: &mut Vec<ExternalSigner>,
chain: String
) -> bool
pub fn enumerate( &mut self, command: &String, signers: &mut Vec<ExternalSigner>, chain: String ) -> bool
| Obtain a list of signers. Calls <command> | enumerate
.
|
| ———–
| @param[in] command
|
| the command which handles interaction
| with the external signer
| –––––
| @param[in,out] signers
|
| vector to which new signers (with a unique
| master key fingerprint) are added
| –––––
| @param chain
|
| “main”, “test”, “regtest” or “signet”
|
| ———–
| @return
|
| success
|
sourcepub fn display_address(&self, descriptor: &String) -> UniValue
pub fn display_address(&self, descriptor: &String) -> UniValue
| Display address on the device. Calls
| <command> displayaddress --desc | <descriptor>
.
|
| ———–
| @param[in] descriptor
|
| Descriptor specifying which address
| to display.
|
| Must include a public key or xpub, as
| well as key origin.
|
sourcepub fn get_descriptors(&mut self, account: i32) -> UniValue
pub fn get_descriptors(&mut self, account: i32) -> UniValue
| Get receive and change Descriptor(s)
| from device for a given account.
|
| Calls <command> getdescriptors --account | <account>
|
| ———–
| @param[in] account
|
| which BIP32 account to use (e.g. m/44'/0'/account'
)
|
| ———–
| @return
|
| see doc/external-signer.md
|
sourcepub fn sign_transaction(
&mut self,
psbtx: &mut PartiallySignedTransaction,
error: &mut String
) -> bool
pub fn sign_transaction( &mut self, psbtx: &mut PartiallySignedTransaction, error: &mut String ) -> bool
| Sign PartiallySignedTransaction
| on the device.
|
| Calls <command> signtransaction
| and passes the PSBT via stdin.
|
| ———–
| @param[in,out] psbt
|
| PartiallySignedTransaction to be
| signed
|