<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></div>
</a><div class="sidebar-elems"><h2 class="location">In <a href="index.html">bdk</a></h2><div id="sidebar-vars" data-name="version" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../bdk/index.html">
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
- <h1 class="fqn"><span class="in-band">Function <a href="index.html">bdk</a>::<wbr><a class="fn" href="#">version</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/bdk/lib.rs.html#282-284" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn version() -> &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Get the version of BDK at runtime</p>
+ <h1 class="fqn"><span class="in-band">Function <a href="index.html">bdk</a>::<wbr><a class="fn" href="#">version</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/bdk/lib.rs.html#284-286" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>pub fn version() -> &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Get the version of BDK at runtime</p>
</div></details></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="bdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0-nightly (51126be1b 2022-01-24)" ></div>
</body></html>
\ No newline at end of file
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></div>
</a><h2 class="location"><a href="#">Crate bdk</a></h2><div class="sidebar-elems"><div class="block"><ul><li class="version">Version 0.23.0</li><li><a id="all-types" href="all.html">All Items</a></li></div></ul><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><div id="sidebar-vars" data-name="bdk" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../bdk/index.html">
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
- <h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">bdk</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/bdk/lib.rs.html#13-284" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A modern, lightweight, descriptor-based wallet library written in Rust.</p>
+ <h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">bdk</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/bdk/lib.rs.html#13-286" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A modern, lightweight, descriptor-based wallet library written in Rust.</p>
<h2 id="about" class="section-header"><a href="#about">About</a></h2>
<p>The BDK library aims to be the core building block for Bitcoin wallets of any kind.</p>
<ul>
<li><code>key-value-db</code>: key value <a href="database/index.html"><code>database</code></a> based on <a href="crate::sled"><code>sled</code></a> for caching blockchain data</li>
</ul>
</div></details><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
-<div class="item-table"><div class="item-row"><div class="item-left"><code>pub extern crate bitcoin;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate bitcoincore_rpc;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate electrum_client;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate esplora_client;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate miniscript;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate rusqlite;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate sled;</code></div></div><div class="item-row"><div class="item-left import-item"><code>pub use descriptor::<a class="mod" href="descriptor/template/index.html" title="mod bdk::descriptor::template">template</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use descriptor::<a class="type" href="descriptor/type.HdKeyPaths.html" title="type bdk::descriptor::HdKeyPaths">HdKeyPaths</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="mod" href="wallet/address_validator/index.html" title="mod bdk::wallet::address_validator">address_validator</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="mod" href="wallet/signer/index.html" title="mod bdk::wallet::signer">signer</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::signer::<a class="struct" href="wallet/signer/struct.SignOptions.html" title="struct bdk::wallet::signer::SignOptions">SignOptions</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::tx_builder::<a class="struct" href="wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="struct" href="wallet/struct.SyncOptions.html" title="struct bdk::wallet::SyncOptions">SyncOptions</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="struct" href="wallet/struct.Wallet.html" title="struct bdk::wallet::Wallet">Wallet</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
+<div class="item-table"><div class="item-row"><div class="item-left"><code>pub extern crate bitcoin;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate bitcoincore_rpc;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate electrum_client;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate esplora_client;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate hwi;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate miniscript;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate rusqlite;</code></div></div><div class="item-row"><div class="item-left"><code>pub extern crate sled;</code></div></div><div class="item-row"><div class="item-left import-item"><code>pub use descriptor::<a class="mod" href="descriptor/template/index.html" title="mod bdk::descriptor::template">template</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use descriptor::<a class="type" href="descriptor/type.HdKeyPaths.html" title="type bdk::descriptor::HdKeyPaths">HdKeyPaths</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="mod" href="wallet/address_validator/index.html" title="mod bdk::wallet::address_validator">address_validator</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="mod" href="wallet/signer/index.html" title="mod bdk::wallet::signer">signer</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::signer::<a class="struct" href="wallet/signer/struct.SignOptions.html" title="struct bdk::wallet::signer::SignOptions">SignOptions</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::tx_builder::<a class="struct" href="wallet/tx_builder/struct.TxBuilder.html" title="struct bdk::wallet::tx_builder::TxBuilder">TxBuilder</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="struct" href="wallet/struct.SyncOptions.html" title="struct bdk::wallet::SyncOptions">SyncOptions</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use wallet::<a class="struct" href="wallet/struct.Wallet.html" title="struct bdk::wallet::Wallet">Wallet</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="blockchain/index.html" title="bdk::blockchain mod">blockchain</a></div><div class="item-right docblock-short"><p>Blockchain backends</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="database/index.html" title="bdk::database mod">database</a></div><div class="item-right docblock-short"><p>Database types</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="descriptor/index.html" title="bdk::descriptor mod">descriptor</a></div><div class="item-right docblock-short"><p>Descriptors</p>
-initSidebarItems({"enum":[["Error","Errors that can be thrown by the `Wallet`"],["KeychainKind","Types of keychains"],["Utxo","An unspent transaction output (UTXO)."]],"externcrate":[["bitcoin",""],["bitcoincore_rpc",""],["electrum_client",""],["esplora_client",""],["miniscript",""],["rusqlite",""],["sled",""]],"fn":[["version","Get the version of BDK at runtime"]],"macro":[["descriptor","Macro to write full descriptors with code"],["fragment","Macro to write descriptor fragments with code"]],"mod":[["blockchain","Blockchain backends"],["database","Database types"],["descriptor","Descriptors"],["keys","Key formats"],["psbt","Additional functions on the `rust-bitcoin` `PartiallySignedTransaction` structure."],["wallet","Wallet"]],"struct":[["Balance","Balance differentiated in various categories"],["BlockTime","Block height and timestamp of a block"],["FeeRate","Fee rate"],["LocalUtxo","An unspent output owned by a `Wallet`."],["TransactionDetails","A wallet transaction"],["WeightedUtxo","A [`Utxo`] with its `satisfaction_weight`."]],"trait":[["Vbytes","Trait implemented by types that can be used to measure weight units."]],"type":[["ConfirmationTime","DEPRECATED: Confirmation time of a transaction"]]});
\ No newline at end of file
+initSidebarItems({"enum":[["Error","Errors that can be thrown by the `Wallet`"],["KeychainKind","Types of keychains"],["Utxo","An unspent transaction output (UTXO)."]],"externcrate":[["bitcoin",""],["bitcoincore_rpc",""],["electrum_client",""],["esplora_client",""],["hwi",""],["miniscript",""],["rusqlite",""],["sled",""]],"fn":[["version","Get the version of BDK at runtime"]],"macro":[["descriptor","Macro to write full descriptors with code"],["fragment","Macro to write descriptor fragments with code"]],"mod":[["blockchain","Blockchain backends"],["database","Database types"],["descriptor","Descriptors"],["keys","Key formats"],["psbt","Additional functions on the `rust-bitcoin` `PartiallySignedTransaction` structure."],["wallet","Wallet"]],"struct":[["Balance","Balance differentiated in various categories"],["BlockTime","Block height and timestamp of a block"],["FeeRate","Fee rate"],["LocalUtxo","An unspent output owned by a `Wallet`."],["TransactionDetails","A wallet transaction"],["WeightedUtxo","A [`Utxo`] with its `satisfaction_weight`."]],"trait":[["Vbytes","Trait implemented by types that can be used to measure weight units."]],"type":[["ConfirmationTime","DEPRECATED: Confirmation time of a transaction"]]});
\ No newline at end of file
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></div>
</a><h2 class="location"><a href="#">Module hardwaresigner</a></h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><div id="sidebar-vars" data-name="hardwaresigner" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../bdk/index.html">
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
- <h1 class="fqn"><span class="in-band">Module <a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a class="mod" href="#">hardwaresigner</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#12-64" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>HWI Signer</p>
-<p>This module contains a simple implementation of a Custom signer for rust-hwi</p>
+ <h1 class="fqn"><span class="in-band">Module <a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a class="mod" href="#">hardwaresigner</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#12-97" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>HWI Signer</p>
+<p>This module contains HWISigner, an implementation of a <a href="../signer/trait.TransactionSigner.html" title="TransactionSigner">TransactionSigner</a> to be
+used with hardware wallets.</p>
+
+<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let</span> <span class="ident">devices</span> <span class="op">=</span> <span class="ident">HWIClient::enumerate</span>()<span class="question-mark">?</span>;
+<span class="kw">let</span> <span class="ident">first_device</span> <span class="op">=</span> <span class="ident">devices</span>.<span class="ident">first</span>().<span class="ident">expect</span>(<span class="string">"No devices found!"</span>);
+<span class="kw">let</span> <span class="ident">custom_signer</span> <span class="op">=</span> <span class="ident">HWISigner::from_device</span>(<span class="ident">first_device</span>, <span class="ident">HWIChain::Test</span>)<span class="question-mark">?</span>;
+
+<span class="comment">// Adding the hardware signer to the BDK wallet</span>
+<span class="ident">wallet</span>.<span class="ident">add_signer</span>(
+ <span class="ident">KeychainKind::External</span>,
+ <span class="ident">SignerOrdering</span>(<span class="number">200</span>),
+ <span class="ident">Arc::new</span>(<span class="ident">custom_signer</span>),
+);
+</code></pre></div>
</div></details><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.HWISigner.html" title="bdk::wallet::hardwaresigner::HWISigner struct">HWISigner</a></div><div class="item-right docblock-short"><p>Custom signer for Hardware Wallets</p>
</div></div></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="bdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0-nightly (51126be1b 2022-01-24)" ></div>
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></div>
</a><h2 class="location"><a href="#">HWISigner</a></h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#implementations">Associated Constants</a></h3><div class="sidebar-links"><a href="#associatedconstant.ALIGN">ALIGN</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.from_device">from_device</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-SignerCommon">SignerCommon</a><a href="#impl-TransactionSigner">TransactionSigner</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow<T></a><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><a href="#impl-From%3CT%3E">From<T></a><a href="#impl-Into%3CU%3E">Into<U></a><a href="#impl-Pointable">Pointable</a><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a><a href="#impl-TryInto%3CU%3E">TryInto<U></a><a href="#impl-VZip%3CV%3E">VZip<V></a></div></div><h2 class="location">In <a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a href="index.html">hardwaresigner</a></h2><div id="sidebar-vars" data-name="HWISigner" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../bdk/index.html">
<img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
- <h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a href="index.html">hardwaresigner</a>::<wbr><a class="struct" href="#">HWISigner</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#30-33" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct HWISigner { /* private fields */ }</code></pre></div><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Custom signer for Hardware Wallets</p>
+ <h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">bdk</a>::<wbr><a href="../index.html">wallet</a>::<wbr><a href="index.html">hardwaresigner</a>::<wbr><a class="struct" href="#">HWISigner</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#63-66" title="goto source code">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct HWISigner { /* private fields */ }</code></pre></div><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Custom signer for Hardware Wallets</p>
<p>This ignores <code>sign_options</code> and leaves the decisions up to the hardware wallet.</p>
-</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#35-44" title="goto source code">source</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_device" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#37-43" title="goto source code">source</a></div><a href="#method.from_device" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_device" class="fnname">from_device</a>(<br> device: &HWIDevice, <br> chain: HWIChain<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a>, Error></h4></div></summary><div class="docblock"><p>Create a instance from the specified device and chain</p>
-</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#26" title="goto source code">source</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#26" title="goto source code">source</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
-</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-SignerCommon" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#46-50" title="goto source code">source</a></div><a href="#impl-SignerCommon" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="../signer/trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#47-49" title="goto source code">source</a></div><a href="#method.id" class="anchor"></a><h4 class="code-header">fn <a href="../signer/trait.SignerCommon.html#tymethod.id" class="fnname">id</a>(&self, _secp: &Secp256k1<All>) -> <a class="enum" href="../signer/enum.SignerId.html" title="enum bdk::wallet::signer::SignerId">SignerId</a></h4></div></summary><div class='docblock'><p>Return the <a href="../signer/enum.SignerId.html" title="SignerId"><code>SignerId</code></a> for this signer <a href="../signer/trait.SignerCommon.html#tymethod.id">Read more</a></p>
+</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#68-77" title="goto source code">source</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from_device" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#70-76" title="goto source code">source</a></div><a href="#method.from_device" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.from_device" class="fnname">from_device</a>(<br> device: &HWIDevice, <br> chain: HWIChain<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a>, Error></h4></div></summary><div class="docblock"><p>Create a instance from the specified device and chain</p>
+</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#59" title="goto source code">source</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#59" title="goto source code">source</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-SignerCommon" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#79-83" title="goto source code">source</a></div><a href="#impl-SignerCommon" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="../signer/trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#80-82" title="goto source code">source</a></div><a href="#method.id" class="anchor"></a><h4 class="code-header">fn <a href="../signer/trait.SignerCommon.html#tymethod.id" class="fnname">id</a>(&self, _secp: &Secp256k1<All>) -> <a class="enum" href="../signer/enum.SignerId.html" title="enum bdk::wallet::signer::SignerId">SignerId</a></h4></div></summary><div class='docblock'><p>Return the <a href="../signer/enum.SignerId.html" title="SignerId"><code>SignerId</code></a> for this signer <a href="../signer/trait.SignerCommon.html#tymethod.id">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.descriptor_secret_key" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#240-242" title="goto source code">source</a></div><a href="#method.descriptor_secret_key" class="anchor"></a><h4 class="code-header">fn <a href="../signer/trait.SignerCommon.html#method.descriptor_secret_key" class="fnname">descriptor_secret_key</a>(&self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="enum" href="../../keys/enum.DescriptorSecretKey.html" title="enum bdk::keys::DescriptorSecretKey">DescriptorSecretKey</a>></h4></div></summary><div class='docblock'><p>Return the secret key for the signer <a href="../signer/trait.SignerCommon.html#method.descriptor_secret_key">Read more</a></p>
-</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TransactionSigner" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#53-64" title="goto source code">source</a></div><a href="#impl-TransactionSigner" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="../signer/trait.TransactionSigner.html" title="trait bdk::wallet::signer::TransactionSigner">TransactionSigner</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="docblock"><p>This implementation ignores <code>sign_options</code></p>
-</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.sign_transaction" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#54-63" title="goto source code">source</a></div><a href="#method.sign_transaction" class="anchor"></a><h4 class="code-header">fn <a href="../signer/trait.TransactionSigner.html#tymethod.sign_transaction" class="fnname">sign_transaction</a>(<br> &self, <br> psbt: &mut PartiallySignedTransaction, <br> _sign_options: &<a class="struct" href="../signer/struct.SignOptions.html" title="struct bdk::wallet::signer::SignOptions">SignOptions</a>, <br> _secp: &Secp256k1<All><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../signer/enum.SignerError.html" title="enum bdk::wallet::signer::SignerError">SignerError</a>></h4></div></summary><div class='docblock'><p>Sign all the inputs of the psbt</p>
+</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TransactionSigner" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#86-97" title="goto source code">source</a></div><a href="#impl-TransactionSigner" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="../signer/trait.TransactionSigner.html" title="trait bdk::wallet::signer::TransactionSigner">TransactionSigner</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></summary><div class="docblock"><p>This implementation ignores <code>sign_options</code></p>
+</div><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.sign_transaction" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#87-96" title="goto source code">source</a></div><a href="#method.sign_transaction" class="anchor"></a><h4 class="code-header">fn <a href="../signer/trait.TransactionSigner.html#tymethod.sign_transaction" class="fnname">sign_transaction</a>(<br> &self, <br> psbt: &mut PartiallySignedTransaction, <br> _sign_options: &<a class="struct" href="../signer/struct.SignOptions.html" title="struct bdk::wallet::signer::SignOptions">SignOptions</a>, <br> _secp: &Secp256k1<All><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../signer/enum.SignerError.html" title="enum bdk::wallet::signer::SignerError">SignerError</a>></h4></div></summary><div class='docblock'><p>Sign all the inputs of the psbt</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132-136" title="goto source code">source</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#133" title="goto source code">source</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#209-214" title="goto source code">source</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211" title="goto source code">source</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-222" title="goto source code">source</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219" title="goto source code">source</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
<p>This is used internally to reconstruct the original descriptor that may contain secrets.
External signers that are meant to keep key isolated should just return <code>None</code> here (which
is the default for this method, if not overridden).</p>
-</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-SignerCommon" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#46-50" title="goto source code">source</a></div><a href="#impl-SignerCommon" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="../hardwaresigner/struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div></div><div id="impl-SignerCommon-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#290-298" title="goto source code">source</a></div><a href="#impl-SignerCommon-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="struct.SignerWrapper.html" title="struct bdk::wallet::signer::SignerWrapper">SignerWrapper</a><<a class="struct" href="../../descriptor/struct.DescriptorXKey.html" title="struct bdk::descriptor::DescriptorXKey">DescriptorXKey</a><ExtendedPrivKey>></h3></div><div id="impl-SignerCommon-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#370-381" title="goto source code">source</a></div><a href="#impl-SignerCommon-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="struct.SignerWrapper.html" title="struct bdk::wallet::signer::SignerWrapper">SignerWrapper</a><PrivateKey></h3></div></div><script type="text/javascript" src="../../../implementors/bdk/wallet/signer/trait.SignerCommon.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="bdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0-nightly (51126be1b 2022-01-24)" ></div>
+</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-SignerCommon" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#79-83" title="goto source code">source</a></div><a href="#impl-SignerCommon" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="../hardwaresigner/struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div></div><div id="impl-SignerCommon-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#290-298" title="goto source code">source</a></div><a href="#impl-SignerCommon-1" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="struct.SignerWrapper.html" title="struct bdk::wallet::signer::SignerWrapper">SignerWrapper</a><<a class="struct" href="../../descriptor/struct.DescriptorXKey.html" title="struct bdk::descriptor::DescriptorXKey">DescriptorXKey</a><ExtendedPrivKey>></h3></div><div id="impl-SignerCommon-2" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#370-381" title="goto source code">source</a></div><a href="#impl-SignerCommon-2" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.SignerCommon.html" title="trait bdk::wallet::signer::SignerCommon">SignerCommon</a> for <a class="struct" href="struct.SignerWrapper.html" title="struct bdk::wallet::signer::SignerWrapper">SignerWrapper</a><PrivateKey></h3></div></div><script type="text/javascript" src="../../../implementors/bdk/wallet/signer/trait.SignerCommon.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="bdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0-nightly (51126be1b 2022-01-24)" ></div>
</body></html>
\ No newline at end of file
<p>This trait can be implemented when the signer can’t sign inputs individually, but signs the whole transaction
at once.</p>
</div></details><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.sign_transaction" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#267-272" title="goto source code">source</a></div><h4 class="code-header">fn <a href="#tymethod.sign_transaction" class="fnname">sign_transaction</a>(<br> &self, <br> psbt: &mut PartiallySignedTransaction, <br> sign_options: &<a class="struct" href="struct.SignOptions.html" title="struct bdk::wallet::signer::SignOptions">SignOptions</a>, <br> secp: &Secp256k1<All><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.SignerError.html" title="enum bdk::wallet::signer::SignerError">SignerError</a>></h4></div></summary><div class="docblock"><p>Sign all the inputs of the psbt</p>
-</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-TransactionSigner" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#53-64" title="goto source code">source</a></div><a href="#impl-TransactionSigner" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TransactionSigner.html" title="trait bdk::wallet::signer::TransactionSigner">TransactionSigner</a> for <a class="struct" href="../hardwaresigner/struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div></div><div class="docblock"><p>This implementation ignores <code>sign_options</code></p>
+</div></details></div><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"><div id="impl-TransactionSigner" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/hardwaresigner.rs.html#86-97" title="goto source code">source</a></div><a href="#impl-TransactionSigner" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.TransactionSigner.html" title="trait bdk::wallet::signer::TransactionSigner">TransactionSigner</a> for <a class="struct" href="../hardwaresigner/struct.HWISigner.html" title="struct bdk::wallet::hardwaresigner::HWISigner">HWISigner</a></h3><div class="item-info"><div class="stab portability">This is supported on <strong>crate feature <code>hardware-signer</code></strong> only.</div></div></div><div class="docblock"><p>This implementation ignores <code>sign_options</code></p>
</div><div id="impl-TransactionSigner-1" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../../src/bdk/wallet/signer.rs.html#275-288" title="goto source code">source</a></div><a href="#impl-TransactionSigner-1" class="anchor"></a><h3 class="code-header in-band">impl<T: <a class="trait" href="trait.InputSigner.html" title="trait bdk::wallet::signer::InputSigner">InputSigner</a>> <a class="trait" href="trait.TransactionSigner.html" title="trait bdk::wallet::signer::TransactionSigner">TransactionSigner</a> for T</h3></div></div><script type="text/javascript" src="../../../implementors/bdk/wallet/signer/trait.TransactionSigner.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="bdk" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0-nightly (51126be1b 2022-01-24)" ></div>
</body></html>
\ No newline at end of file
<span id="282">282</span>
<span id="283">283</span>
<span id="284">284</span>
+<span id="285">285</span>
+<span id="286">286</span>
</pre><pre class="rust"><code><span class="comment">// Bitcoin Dev Kit</span>
<span class="comment">// Written in 2020 by Alekos Filini <alekos.filini@gmail.com></span>
<span class="comment">//</span>
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">serde</span>;
<span class="attribute">#[<span class="ident">macro_use</span>]</span>
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">serde_json</span>;
+<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"hardware-signer"</span>)]</span>
+<span class="kw">pub</span> <span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">hwi</span>;
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">all</span>(<span class="ident">feature</span> <span class="op">=</span> <span class="string">"reqwest"</span>, <span class="ident">feature</span> <span class="op">=</span> <span class="string">"ureq"</span>))]</span>
<span class="macro">compile_error!</span>(<span class="string">"Features reqwest and ureq are mutually exclusive and cannot be enabled together"</span>);
<span id="62">62</span>
<span id="63">63</span>
<span id="64">64</span>
+<span id="65">65</span>
+<span id="66">66</span>
+<span id="67">67</span>
+<span id="68">68</span>
+<span id="69">69</span>
+<span id="70">70</span>
+<span id="71">71</span>
+<span id="72">72</span>
+<span id="73">73</span>
+<span id="74">74</span>
+<span id="75">75</span>
+<span id="76">76</span>
+<span id="77">77</span>
+<span id="78">78</span>
+<span id="79">79</span>
+<span id="80">80</span>
+<span id="81">81</span>
+<span id="82">82</span>
+<span id="83">83</span>
+<span id="84">84</span>
+<span id="85">85</span>
+<span id="86">86</span>
+<span id="87">87</span>
+<span id="88">88</span>
+<span id="89">89</span>
+<span id="90">90</span>
+<span id="91">91</span>
+<span id="92">92</span>
+<span id="93">93</span>
+<span id="94">94</span>
+<span id="95">95</span>
+<span id="96">96</span>
+<span id="97">97</span>
</pre><pre class="rust"><code><span class="comment">// Bitcoin Dev Kit</span>
<span class="comment">// Written in 2020 by Alekos Filini <alekos.filini@gmail.com></span>
<span class="comment">//</span>
<span class="doccomment">//! HWI Signer</span>
<span class="doccomment">//!</span>
-<span class="doccomment">//! This module contains a simple implementation of a Custom signer for rust-hwi</span>
+<span class="doccomment">//! This module contains HWISigner, an implementation of a [TransactionSigner] to be</span>
+<span class="doccomment">//! used with hardware wallets.</span>
+<span class="doccomment">//! ```no_run</span>
+<span class="doccomment">//! # use bdk::bitcoin::Network;</span>
+<span class="doccomment">//! # use bdk::database::MemoryDatabase;</span>
+<span class="doccomment">//! # use bdk::signer::SignerOrdering;</span>
+<span class="doccomment">//! # use bdk::wallet::hardwaresigner::HWISigner;</span>
+<span class="doccomment">//! # use bdk::wallet::AddressIndex::New;</span>
+<span class="doccomment">//! # use bdk::{FeeRate, KeychainKind, SignOptions, SyncOptions, Wallet};</span>
+<span class="doccomment">//! # use hwi::{types::HWIChain, HWIClient};</span>
+<span class="doccomment">//! # use std::sync::Arc;</span>
+<span class="doccomment">//! #</span>
+<span class="doccomment">//! # fn main() -> Result<(), Box<dyn std::error::Error>> {</span>
+<span class="doccomment">//! let devices = HWIClient::enumerate()?;</span>
+<span class="doccomment">//! let first_device = devices.first().expect("No devices found!");</span>
+<span class="doccomment">//! let custom_signer = HWISigner::from_device(first_device, HWIChain::Test)?;</span>
+<span class="doccomment">//!</span>
+<span class="doccomment">//! # let mut wallet = Wallet::new(</span>
+<span class="doccomment">//! # "",</span>
+<span class="doccomment">//! # None,</span>
+<span class="doccomment">//! # Network::Testnet,</span>
+<span class="doccomment">//! # MemoryDatabase::default(),</span>
+<span class="doccomment">//! # )?;</span>
+<span class="doccomment">//! #</span>
+<span class="doccomment">//! // Adding the hardware signer to the BDK wallet</span>
+<span class="doccomment">//! wallet.add_signer(</span>
+<span class="doccomment">//! KeychainKind::External,</span>
+<span class="doccomment">//! SignerOrdering(200),</span>
+<span class="doccomment">//! Arc::new(custom_signer),</span>
+<span class="doccomment">//! );</span>
+<span class="doccomment">//!</span>
+<span class="doccomment">//! # Ok(())</span>
+<span class="doccomment">//! # }</span>
+<span class="doccomment">//! ```</span>
<span class="kw">use</span> <span class="ident">bitcoin::psbt::PartiallySignedTransaction</span>;
<span class="kw">use</span> <span class="ident">bitcoin::secp256k1</span>::{<span class="ident">All</span>, <span class="ident">Secp256k1</span>};